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

lex->no_write_to_binlog is not initialized properly

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 10.4
    • Fix Version/s: 10.4
    • Component/s: Parser, Server
    • Labels:
      None

      Description

      How to reproduce:

      • CREATE TABLE book(a int not null);
      • TRUNCATE table book;

      Thread 37 "mysqld" hit Breakpoint 1, mysql_execute_command (thd=0x7fff78001120) at /home/jan/mysql/10.4/sql/sql_parse.cc:6192
      (gdb) where
      #0  mysql_execute_command (thd=0x7fff78001120) at /home/jan/mysql/10.4/sql/sql_parse.cc:6192
      #1  0x0000555555d9e83c in mysql_parse (thd=0x7fff78001120, rawbuf=0x7fff78013468 "TRUNCATE TABLE book", length=19, parser_state=0x7fffe8576430, is_com_multi=false, is_next_command=false) at /home/jan/mysql/10.4/sql/sql_parse.cc:7995
      #2  0x0000555555d9df2e in wsrep_mysql_parse (thd=0x7fff78001120, rawbuf=0x7fff78013468 "TRUNCATE TABLE book", length=19, parser_state=0x7fffe8576430, is_com_multi=false, is_next_command=false) at /home/jan/mysql/10.4/sql/sql_parse.cc:7799
      #3  0x0000555555d8aa42 in dispatch_command (command=COM_QUERY, thd=0x7fff78001120, packet=0x7fff7800abf1 "TRUNCATE TABLE book", packet_length=19, is_com_multi=false, is_next_command=false) at /home/jan/mysql/10.4/sql/sql_parse.cc:1843
      #4  0x0000555555d893b3 in do_command (thd=0x7fff78001120) at /home/jan/mysql/10.4/sql/sql_parse.cc:1373
      #5  0x0000555555f1b7b5 in do_handle_one_connection (connect=0x5555583d1ea0) at /home/jan/mysql/10.4/sql/sql_connect.cc:1420
      #6  0x0000555555f1b451 in handle_one_connection (arg=0x5555583d1ea0) at /home/jan/mysql/10.4/sql/sql_connect.cc:1316
      #7  0x0000555556947f95 in pfs_spawn_thread (arg=0x55555805dbc0) at /home/jan/mysql/10.4/storage/perfschema/pfs.cc:1869
      #8  0x00007ffff7a5f450 in start_thread (arg=0x7fffe8577640) at pthread_create.c:473
      #9  0x00007ffff75f6d53 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      (gdb) p lex->sql_command
      $1 = SQLCOM_TRUNCATE
      (gdb) p lex->no_write_to_binlog
      $2 = 165
      (gdb) p thd->lex->no_write_to_binlog
      $3 = 165
      

      Value 165 is meaningless on TRUNCATE.

        Attachments

          Activity

            People

            Assignee:
            sanja Oleksandr Byelkin
            Reporter:
            jplindst Jan Lindström
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Git Integration