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

Server crashes on truncating a temporary InnoDB table on Windows

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 10.0.9
    • Fix Version/s: 10.0.10
    • Component/s: None
    • Labels:
      None
    • Environment:
      Windows

      Description

      
      --source include/have_innodb.inc
      
      create temporary table tmp (i int) engine=innodb;
      truncate table tmp;
      
      mysqld.exe!handle_rtc_failure(int err_type, const char * file, int line, const char * module, const char * format, ...)  Line 284	C
      mysqld.exe!failwithmessage(void * retaddr, int crttype, int errnum, const char * msg)  + 0x223 bytes	C++
      mysqld.exe!_RTC_UninitUse(const char * varname)  + 0xee bytes	C++
      mysqld.exe!Sql_cmd_truncate_table::handler_truncate(THD * thd, TABLE_LIST * table_ref, bool is_tmp_table)  Line 228 + 0x13 bytes	C++
      mysqld.exe!Sql_cmd_truncate_table::truncate_table(THD * thd, TABLE_LIST * table_ref)  Line 444 + 0x20 bytes	C++
      mysqld.exe!Sql_cmd_truncate_table::execute(THD * thd)  Line 534 + 0x1a bytes	C++
      mysqld.exe!mysql_execute_command(THD * thd)  Line 5109 + 0x2c bytes	C++
      mysqld.exe!mysql_parse(THD * thd, char * rawbuf, unsigned int length, Parser_state * parser_state)  Line 6452 + 0xd bytes	C++
      mysqld.exe!dispatch_command(enum_server_command command, THD * thd, char * packet, unsigned int packet_length)  Line 1311	C++
      mysqld.exe!do_command(THD * thd)  Line 1005 + 0x25 bytes	C++
      mysqld.exe!do_handle_one_connection(THD * thd_arg)  Line 1379 + 0xa bytes	C++
      mysqld.exe!handle_one_connection(void * arg)  Line 1294	C++
      mysqld.exe!pfs_spawn_thread(void * arg)  Line 1855	C++
      mysqld.exe!pthread_start(void * p)  Line 61	C
      mysqld.exe!_callthreadstartex()  Line 314 + 0x17 bytes	C
      mysqld.exe!_threadstartex(void * ptd)  Line 297	C
      
      revision-id: monty@mariadb.org-20140328194257-zr9f894fd4h9lqgy
      date: 2014-03-28 21:42:57 +0200
      build-date: 2014-03-28 13:17:47 -0700
      revno: 4134
      branch-nick: 10.0
      

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            psergey Sergei Petrunia added a comment -

            The code in Sql_cmd_truncate_table::handler_truncate goes like this:

              uint flags;
              ...
              if (!is_tmp_table)
              {
                 ...
                flags= MYSQL_OPEN_IGNORE_FLUSH;
                 ...
              }
            
              if (open_and_lock_tables(thd, table_ref, FALSE, flags))
              ..
            

            if is_tmp_table==true, then 'flags' will have garbage value which will be
            passed to open_and_lock_tables.

            Show
            psergey Sergei Petrunia added a comment - The code in Sql_cmd_truncate_table::handler_truncate goes like this: uint flags; ... if (!is_tmp_table) { ... flags= MYSQL_OPEN_IGNORE_FLUSH; ... } if (open_and_lock_tables(thd, table_ref, FALSE, flags)) .. if is_tmp_table==true, then 'flags' will have garbage value which will be passed to open_and_lock_tables.
            Hide
            wlad Vladislav Vaintroub added a comment -

            Microsoft compiler adds runtime checks for uninitialized variables in debug version (of course, it also complains during compilation about possibly uninitialized variables )
            Here, the crash is failed runtime check.

            Show
            wlad Vladislav Vaintroub added a comment - Microsoft compiler adds runtime checks for uninitialized variables in debug version (of course, it also complains during compilation about possibly uninitialized variables ) Here, the crash is failed runtime check.

              People

              • Assignee:
                serg Sergei Golubchik
                Reporter:
                elenst Elena Stepanova
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: