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

ERROR 1939 (HY000): Engine PERFORMANCE_SCHEMA failed to discover table

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.1.3
    • Fix Version/s: 10.1.5
    • Component/s: Admin statements
    • Environment:
      Ubuntu 14.04.1 LTS - Mariadb 10.1.13 - debug base on source compiling

      Description

      Hi, i did some test about performance schema sql in mariadb 10.1.13

      I think that mariadb has erase .frm file about pfs(performance_shcema) since version 10.1.13
      but that point is some problem i think below test case.

      [TEST CASE]
      1) start mysqld (or mysqld_safe) : Mariadb start
      2) Sql run : select * from PERFORMANCE_SCHEMA.xxx ( NOT use performance_schema before)
      => Error Occur! : ERROR 1939 (HY000): Engine PERFORMANCE_SCHEMA failed to discover table
      => i think than error happen in function (sql_cache.cc :640 line open_table_def(thd, share, flags | GTS_USE_DISCOVERY)

      IF you use "use performance_schema" statement before sql run, that's ok
      because i think "use pfs" is load table definition info to cache, so skip "open_table_def" function.

      open_table_def fuuction finally search .frm file .. but pfs is no have .frm file since 10.1.13

      So, Any Idea about loading pfs schema tables definition to cache during start mariadb (ex: background thread run "use pfs" ?!, or anything ..)
      or other plan about this ?

      sehyoo@sehyoo-VirtualBox:/maria/maria-10.1.13_src/mariadb-10.1.3-linux-x86_64$ ./connect.sh 
      Welcome to the MariaDB monitor.  Commands end with ; or \g.
      Your MariaDB connection id is 2
      Server version: 10.1.3-MariaDB-wsrep-debug MariaDB Server, wsrep_25.10.r4144
      
      Copyright (c) 2000, 2014, Oracle, MariaDB Corporation Ab and others.
      
      Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
      
      MariaDB [(none)]> select * from performance_schema.events_statements_current;
      ERROR 1939 (HY000): Engine PERFORMANCE_SCHEMA failed to discover table `performance_schema`.`events_statements_current` with 'CREATE TABLE events_statements_current(THREAD_ID BIGINT unsigned not null,EVENT_ID BIGINT unsigned not null,END_EVENT_ID BIGINT unsigned,EVENT_NAME VARCHAR(128) not null,SOURCE VARCHAR(64),TIMER_START BIGINT unsigned,TIMER_END BIGINT unsigned,TIMER_WAIT BIGINT unsigned,LOCK_TIME bigint unsigned not null,SQL_TEXT LONGTEXT,DIGEST VARCHAR(32),DIGEST_TEXT LONGTEXT,CURRENT_SCHEMA VARCHAR(64),OBJECT_TYPE VAR
      MariaDB [(none)]>
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              elenst Elena Stepanova added a comment -

              Note: to reproduce, one should not use any default schema. That is, not only use performance_schema makes the problem disappear, but so does use test, or just using a default schema on the client command line.

              Show
              elenst Elena Stepanova added a comment - Note: to reproduce, one should not use any default schema. That is, not only use performance_schema makes the problem disappear, but so does use test , or just using a default schema on the client command line.
              Hide
              svoj Sergey Vojtovich added a comment -

              Sergei Golubchik, please review fix for this bug.

              Show
              svoj Sergey Vojtovich added a comment - Sergei Golubchik , please review fix for this bug.

                People

                • Assignee:
                  svoj Sergey Vojtovich
                  Reporter:
                  seung hoon seung hoon yoo
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Time Tracking

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - 0 minutes
                    0m
                    Logged:
                    Time Spent - 10 minutes
                    10m