Details

    Description

      Note: once again, the test case is fragile, so there is no certainty in which version the problem appeared or whether it exists in 10.0 (it doesn't crash on my builds of 10.0).
      Please also see MDEV-7590, MDEV-7581.

      Stack trace from 5.5 rev fdd6c111c254c5044cd9b6c2f7e4d0c74f427a79

      #3  <signal handler called>
      #4  0x0000000000603109 in Item::delete_self (this=0x7ff52720c7d8) at 5.5/sql/item.h:1434
      #5  0x00000000005fd3cd in Query_arena::free_items (this=0x7ff52af49078) at 5.5/sql/sql_class.cc:3160
      #6  0x00000000005f8d6c in THD::cleanup_after_query (this=0x7ff52af49060) at 5.5/sql/sql_class.cc:1883
      #7  0x000000000063b317 in mysql_parse (thd=0x7ff52af49060, rawbuf=0x7ff527288078 "SELECT * FROM (INFORMATION_SCHEMA.`STATISTICS` AS table1 LEFT OUTER JOIN mysql.`time_zone` AS table2 ON ( table2.`Time_zone_id` = table1.`PACKED` ) ) WHERE NOT ( ( ( ( ( ( ( ( ( ( ( (NOT (NOT ( table2"..., length=930, parser_state=0x7ff527bb5620) at 5.5/sql/sql_parse.cc:5926
      #8  0x000000000062ee51 in dispatch_command (command=COM_QUERY, thd=0x7ff52af49060, packet=0x7ff5281e8061 "", packet_length=930) at 5.5/sql/sql_parse.cc:1079
      #9  0x000000000062dfdd in do_command (thd=0x7ff52af49060) at 5.5/sql/sql_parse.cc:793
      #10 0x000000000073072a in do_handle_one_connection (thd_arg=0x7ff52af49060) at 5.5/sql/sql_connect.cc:1266
      #11 0x00000000007301e9 in handle_one_connection (arg=0x7ff52af49060) at 5.5/sql/sql_connect.cc:1181
      #12 0x0000000000b66b61 in pfs_spawn_thread (arg=0x7ff5281518e0) at 5.5/storage/perfschema/pfs.cc:1015
      #13 0x00007ff52dea0b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
      #14 0x00007ff52c7ae70d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112

      Test case

      SET sql_mode=ONLY_FULL_GROUP_BY;
       
      CREATE TABLE C (
        pk INTEGER AUTO_INCREMENT,
        col_int_nokey INTEGER,
        col_int_key INTEGER,
        col_date_key DATE,
        col_date_nokey DATE,
        col_time_key TIME,
        col_time_nokey TIME,
        col_datetime_key DATETIME,
        col_datetime_nokey DATETIME,
        col_varchar_key VARCHAR(1),
        col_varchar_nokey VARCHAR(1),
        PRIMARY KEY (pk)
      ) ENGINE=MyISAM;
      CREATE VIEW view_C AS SELECT * FROM C;
      CREATE TABLE E (
        pk INTEGER AUTO_INCREMENT,
        col_int_key INTEGER,
        col_varchar_key VARCHAR(1),
        PRIMARY KEY (pk)
      ) ENGINE=MyISAM;
      CREATE TABLE BB (
        pk INTEGER AUTO_INCREMENT,
        col_int_key INTEGER,
        col_varchar_key VARCHAR(1),
        PRIMARY KEY (pk)
      ) ENGINE=MyISAM;
      CREATE TABLE CC (
        pk INTEGER AUTO_INCREMENT,
        col_int_nokey INTEGER,
        col_int_key INTEGER,
        col_date_key DATE,
        col_date_nokey DATE,
        col_time_key TIME,
        col_time_nokey TIME,
        col_datetime_key DATETIME,
        col_datetime_nokey DATETIME,
        col_varchar_key VARCHAR(1),
        col_varchar_nokey VARCHAR(1),
        PRIMARY KEY (pk)
      ) ENGINE=MyISAM;
       
      CREATE TRIGGER tr1 BEFORE INSERT ON BB FOR EACH ROW INSERT INTO CC SELECT * FROM view_C LIMIT 0 ; 
      INSERT INTO BB () VALUES ();
      CREATE TRIGGER tr2 BEFORE INSERT ON E FOR EACH ROW INSERT INTO view_C SELECT * FROM CC LIMIT 0 ; 
      INSERT INTO E () VALUES ();
      --send
      	SELECT * FROM (INFORMATION_SCHEMA.`STATISTICS` AS table1 LEFT OUTER JOIN mysql.`time_zone` AS table2 ON ( table2.`Time_zone_id` = table1.`PACKED` ) ) WHERE NOT ( ( ( ( ( ( ( ( ( ( ( (NOT (NOT ( table2.`Time_zone_id` IN ( 6, 1, 4 ) AND table1.`NULLABLE` LIKE 'wait/synch/mutex/%') OR table1.`SUB_PART` > table1.`INDEX_SCHEMA`) AND table1.`TABLE_SCHEMA` <= 'm') OR table2.`Time_zone_id` = table1.`NULLABLE`) OR table1.`TABLE_SCHEMA` <> table2.`Use_leap_seconds`) AND table1.`INDEX_TYPE` IN ( 2, 1, 9 )) OR table1.`TABLE_NAME` IN ( 3, 5, 9 )) OR table1.`COLUMN_NAME` < '2008-07-11 08:47:37.057066') OR table2.`Time_zone_id` >= 8) AND table2.`Time_zone_id` < table2.`Use_leap_seconds`) OR table1.`TABLE_SCHEMA` IN ( 3, 2, 5 )) OR table2.`Time_zone_id` IN ( 7, 8, 7 )) AND table2.`Use_leap_seconds` LIKE 'wait/synch%') OR table1.`INDEX_SCHEMA` < 'uh') OR table2.`Use_leap_seconds` LIKE 'wait/synch/cond%' ORDER BY table1.`INDEX_SCHEMA`;
       
      --connect (con1,localhost,root,,test)
      INSERT INTO BB () VALUES ();
       
      --connection default
      --reap

      Attachments

        Activity

          People

            monty Michael Widenius
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.