Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-34060

Unexpected behavior upon reading I_S.ALL_PLUGINS under limited tmp space

    XMLWordPrintable

Details

    Description

      The test case below seems to consist of unrelated (although simple) statements, which is the point of this bug report. I can't make it more logical, because I don't understand what's going on here, only guessing that something is probably happening under the hood, upon opening/reading plugin libraries.

      --source include/have_sequence.inc
      --source include/have_binlog_format_row.inc
       
      CREATE TABLE t (a DATETIME) ENGINE=MyISAM;
      INSERT INTO t SELECT NOW() FROM seq_1_to_6000;
       
      SET max_tmp_session_space_usage = 64*1024;
      SELECT * FROM information_schema.ALL_PLUGINS LIMIT 1;
       
      # Cleanup
      DROP TABLE t;
      

      So, SELECT from ALL_PLUGINS succeeds, although with warnings, with the first warning being "Error 200 Local temporary space limit reached".
      This is in itself strange, why is it a warning of a type Error and not an actual Error.

      Further, there is a bunch of other warnings, mostly "Error 1114 The table '(temporary)' is full". This is the main point of concern, because these, unlike the first one, are also written into the error log (and as errors, not as warnings).

      ORDER BY and LIMIT aren't important here, they are just added to keep the output shorter. They also don't seem to affect the number of warnings produced.

      bb-11.5-monty 8c22c8fa8e4030aa790cc89d89faab45be026ae0

      SELECT * FROM information_schema.ALL_PLUGINS ORDER BY PLUGIN_NAME LIMIT 1;
      PLUGIN_NAME	PLUGIN_VERSION	PLUGIN_STATUS	PLUGIN_TYPE	PLUGIN_TYPE_VERSION	PLUGIN_LIBRARY	PLUGIN_LIBRARY_VERSION	PLUGIN_AUTHOR	PLUGIN_DESCRIPTION	PLUGIN_LICENSE	LOAD_OPTION	PLUGIN_MATURITY	PLUGIN_AUTH_VERSION
      Aria	1.5	ACTIVE	STORAGE ENGINE	110500.0	NULL	NULL	MariaDB Corporation Ab	Crash-safe tables with MyISAM heritage. Used for internal temporary tables and privilege tables	GPL	FORCE	Stable	1.5
      Warnings:
      Error	200	Local temporary space limit reached
      Error	1114	The table '(temporary)' is full
      Error	1114	The table '(temporary)' is full
      Error	1114	The table '(temporary)' is full
      Error	1127	Can't find symbol '_mysql_plugin_interface_version_' in library
      Error	1114	The table '(temporary)' is full
      Error	1114	The table '(temporary)' is full
      Error	1114	The table '(temporary)' is full
      Error	1114	The table '(temporary)' is full
      Error	1127	Can't find symbol '_mysql_plugin_interface_version_' in library
      Error	1114	The table '(temporary)' is full
      Error	1114	The table '(temporary)' is full
      Error	1114	The table '(temporary)' is full
      Error	1114	The table '(temporary)' is full
      Error	1114	The table '(temporary)' is full
      Error	1114	The table '(temporary)' is full
      Error	1114	The table '(temporary)' is full
      Error	1114	The table '(temporary)' is full
      Error	1114	The table '(temporary)' is full
      Error	1114	The table '(temporary)' is full
      Error	1114	The table '(temporary)' is full
      Error	1114	The table '(temporary)' is full
      Error	1114	The table '(temporary)' is full
      Error	1114	The table '(temporary)' is full
      Error	1114	The table '(temporary)' is full
      Error	1114	The table '(temporary)' is full
      Error	1114	The table '(temporary)' is full
      Error	1114	The table '(temporary)' is full
      

      error log

      Version: '11.5.0-MariaDB-debug-log'  socket: '/dev/shm/var_tmp3a/tmp/mysqld.1.sock'  port: 16020  Source distribution
      2024-05-02 21:28:38 5 [ERROR] mariadbd: The table '(temporary)' is full
      2024-05-02 21:28:38 5 [ERROR] mariadbd: The table '(temporary)' is full
      2024-05-02 21:28:38 5 [ERROR] mariadbd: The table '(temporary)' is full
      2024-05-02 21:28:38 5 [ERROR] mariadbd: The table '(temporary)' is full
      2024-05-02 21:28:38 5 [ERROR] mariadbd: The table '(temporary)' is full
      2024-05-02 21:28:38 5 [ERROR] mariadbd: The table '(temporary)' is full
      2024-05-02 21:28:38 5 [ERROR] mariadbd: The table '(temporary)' is full
      2024-05-02 21:28:38 5 [ERROR] mariadbd: The table '(temporary)' is full
      2024-05-02 21:28:38 5 [ERROR] mariadbd: The table '(temporary)' is full
      2024-05-02 21:28:38 5 [ERROR] mariadbd: The table '(temporary)' is full
      2024-05-02 21:28:38 5 [ERROR] mariadbd: The table '(temporary)' is full
      2024-05-02 21:28:38 5 [ERROR] mariadbd: The table '(temporary)' is full
      2024-05-02 21:28:38 5 [ERROR] mariadbd: The table '(temporary)' is full
      2024-05-02 21:28:38 5 [ERROR] mariadbd: The table '(temporary)' is full
      2024-05-02 21:28:38 5 [ERROR] mariadbd: The table '(temporary)' is full
      2024-05-02 21:28:38 5 [ERROR] mariadbd: The table '(temporary)' is full
      2024-05-02 21:28:38 5 [ERROR] mariadbd: The table '(temporary)' is full
      2024-05-02 21:28:38 5 [ERROR] mariadbd: The table '(temporary)' is full
      2024-05-02 21:28:38 5 [ERROR] mariadbd: The table '(temporary)' is full
      2024-05-02 21:28:38 5 [ERROR] mariadbd: The table '(temporary)' is full
      2024-05-02 21:28:38 5 [ERROR] mariadbd: The table '(temporary)' is full
      2024-05-02 21:28:38 5 [ERROR] mariadbd: The table '(temporary)' is full
      2024-05-02 21:28:38 5 [ERROR] mariadbd: The table '(temporary)' is full
      2024-05-02 21:28:38 5 [ERROR] mariadbd: The table '(temporary)' is full
      2024-05-02 21:28:38 5 [ERROR] mariadbd: The table '(temporary)' is full
      2024-05-02 21:28:39 0 [Note] /mnt8t/bld/bb-11.5-monty-asan/sql/mariadbd (initiated by: root[root] @ localhost [127.0.0.1]): Normal shutdown
      

      Another oddity is that all this only happens with binlog enabled, and with the previous DML. Even though the DML has already been executed successfully (and it was executed with the normal tmp space), somehow it affects the outcome of SELECT from ALL_PLUGINS. If binlog is not enabled, or if the event isn't so long, then no warnings occur. Maybe it has something to do with binlog being a "plugin".

      Attachments

        Issue Links

          Activity

            People

              monty Michael Widenius
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.