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

main.information_schema_tables fails sporadically with ER_NEED_REPREPARE or extra warning

    XMLWordPrintable

    Details

      Description

      Since the commit where it was added, main.information_schema_tables fails sporadically in buildbot and outside.

      With ps-protocol it's easily reproducible, run the test with --repeat, it fails within a few attempts:

      main.information_schema_tables           [ fail ]
              Test ended at 2022-04-24 21:28:02
       
      CURRENT_TEST: main.information_schema_tables
      mysqltest: At line 28: query 'SELECT v.* FROM v JOIN INFORMATION_SCHEMA.TABLES WHERE DATA_LENGTH = -1' failed: 1615: Prepared statement needs to be re-prepared
       
      The result from queries just before the failure was:
      < snip >
      #
      #
      # MDEV-25243 ASAN heap-use-after-free in Item_func_sp::execute_impl upon concurrent view DDL and I_S query with view and function
      #
      # The originally reported non-deterministic test.
      # It did not fail reliably on every run.
      CREATE TABLE t (a INT);
      INSERT INTO t VALUES (1),(2);
      CREATE FUNCTION f(b INT) RETURNS INT RETURN 1;
      CREATE VIEW v AS SELECT f(SUM(a)) FROM t;
      connect  con1,localhost,root,,test;
      LOOP
      CREATE OR REPLACE VIEW vv AS SELECT 1;
      END LOOP $
      connection default;
      SELECT v.* FROM v JOIN INFORMATION_SCHEMA.TABLES WHERE DATA_LENGTH = -1;
      

      In was also seen to fail in buildbot in the normal mode, but it seems much less likely:

      main.information_schema_tables           w3 [ fail ]
              Test ended at 2022-04-24 10:46:58
       
      CURRENT_TEST: main.information_schema_tables
      --- /mnt/buildbot/build/mariadb-10.2.44/mysql-test/r/information_schema_tables.result	2022-04-24 09:49:39.000000000 -0400
      +++ /mnt/buildbot/build/mariadb-10.2.44/mysql-test/r/information_schema_tables.reject	2022-04-24 10:46:58.795856264 -0400
      @@ -21,6 +21,8 @@
       disconnect con1;
       connection default;
       DROP VIEW IF EXISTS vv;
      +Warnings:
      +Note	1051	Unknown table 'test.vv'
       DROP VIEW v;
       DROP FUNCTION f;
       DROP TABLE t;
       
      mysqltest: Result length mismatch
      

        Attachments

          Activity

            People

            Assignee:
            bar Alexander Barkov
            Reporter:
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.