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

ERROR 1064 & 1033 and SIGSEGV on CREATE TABLE w/ various charsets on 10.4/5 optimized builds | Assertion `(uint) (table_check_constraints - share->check_constraints) == (uint) (share->table_check_constraints - share->field_check_constraints)' failed

    XMLWordPrintable

Details

    Description

      USE test;
      SET @@SESSION.COLLATION_CONNECTION=utf16_hungarian_ci;
      CREATE TABLE t(c ENUM('aaaaaaaa') CHARACTER SET 'Binary',d JSON);   # ERROR 1064 (42000): You have an error in your SQL syntax
      CREATE TABLE t(c ENUM('aaaaaaaaa') CHARACTER SET 'Binary',d JSON);   # ERROR 1033 (HY000): Incorrect information in file: './test/t.frm'
      CREATE TABLE t(c ENUM('aaaaaaaaaa') CHARACTER SET 'Binary',d JSON);   # Sig 11
      

      All three queries succeed on MySQL 8.0 without warnings (opt+dbg tested).

      Sig 11 (from last query) backtrace;

      Core was generated by `/data/MD180320-mariadb-10.5.2-linux-x86_64-opt/bin/mysqld --no-defaults --core-'.
      Program terminated with signal SIGSEGV, Segmentation fault.
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11)
          at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      57	../sysdeps/unix/sysv/linux/pthread_kill.c: No such file or directory.
      [Current thread is 1 (Thread 0x7f82aa6a6700 (LWP 4464))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11)
          at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      #1  0x0000564ed4087877 in my_write_core (sig=sig@entry=11)
          at /data/git/10.5_opt/mysys/stacktrace.c:518
      #2  0x0000564ed3a4615a in handle_fatal_signal (sig=11) at /data/git/10.5_opt/sql/signal_handler.cc:325
      #3  <signal handler called>
      #4  0x0000564ed390b2d0 in TABLE_SHARE::init_from_binary_frm_image (this=this@entry=0x7f82aa6a3c80, 
          thd=thd@entry=0x7f8272c12018, write=<optimized out>, frm_image=<optimized out>, 
          frm_length=<optimized out>) at /data/git/10.5_opt/sql/table.cc:3031
      #5  0x0000564ed3a4fc20 in ha_create_table (thd=thd@entry=0x7f8272c12018, 
          path=path@entry=0x7f82aa6a4940 "./test/t", db=0x7f8272c47850 "test", 
          table_name=0x7f8272c47148 "t", create_info=create_info@entry=0x7f82aa6a4d20, 
          frm=frm@entry=0x7f82aa6a4930) at /data/git/10.5_opt/sql/handler.cc:5300
      #6  0x0000564ed38e52ea in create_table_impl (thd=thd@entry=0x7f8272c12018, orig_db=..., 
          orig_table_name=..., db=..., table_name=..., path=path@entry=0x7f82aa6a4940 "./test/t", 
          options=..., create_info=0x7f82aa6a4d20, alter_info=0x7f82aa6a4c50, create_table_mode=0, 
          is_trans=0x7f82aa6a4bc7, key_info=0x7f82aa6a4928, key_count=0x7f82aa6a4924, frm=0x7f82aa6a4930)
          at /data/git/10.5_opt/sql/sql_table.cc:5084
      #7  0x0000564ed38e568b in mysql_create_table_no_lock (thd=thd@entry=0x7f8272c12018, 
          db=db@entry=0x7f8272c47198, table_name=table_name@entry=0x7f8272c471a8, 
          create_info=create_info@entry=0x7f82aa6a4d20, alter_info=0x7f82aa6a4c50, 
          is_trans=is_trans@entry=0x7f82aa6a4bc7, create_table_mode=0, table_list=0x7f8272c47180)
          at /data/git/10.5_opt/sql/sql_table.cc:5168
      #8  0x0000564ed38e58a1 in mysql_create_table (thd=thd@entry=0x7f8272c12018, 
          create_table=create_table@entry=0x7f8272c47180, create_info=create_info@entry=0x7f82aa6a4d20, 
          alter_info=alter_info@entry=0x7f82aa6a4c50) at /data/git/10.5_opt/sql/sql_table.cc:5260
      #9  0x0000564ed38e6c46 in Sql_cmd_create_table_like::execute (this=<optimized out>, 
          thd=0x7f8272c12018) at /data/git/10.5_opt/sql/sql_table.cc:11592
      #10 0x0000564ed38511b4 in mysql_execute_command (thd=thd@entry=0x7f8272c12018)
          at /data/git/10.5_opt/sql/sql_parse.cc:5887
      #11 0x0000564ed38590bc in mysql_parse (thd=thd@entry=0x7f8272c12018, rawbuf=<optimized out>, 
          length=66, parser_state=parser_state@entry=0x7f82aa6a54d0, is_com_multi=is_com_multi@entry=false, 
          is_next_command=is_next_command@entry=false) at /data/git/10.5_opt/sql/sql_parse.cc:7926
      #12 0x0000564ed384e049 in dispatch_command (command=command@entry=COM_QUERY, 
          thd=thd@entry=0x7f8272c12018, 
          packet=packet@entry=0x7f8272c3a019 "CREATE TABLE t(c ENUM('aaaaaaaaaa') CHARACTER SET 'Binary',d JSON)", packet_length=packet_length@entry=66, is_com_multi=is_com_multi@entry=false, 
          is_next_command=is_next_command@entry=false) at /data/git/10.5_opt/sql/sql_parse.cc:1839
      #13 0x0000564ed384c3c0 in do_command (thd=0x7f8272c12018) at /data/git/10.5_opt/sql/sql_parse.cc:1358
      #14 0x0000564ed39403ae in do_handle_one_connection (connect=<optimized out>, 
          connect@entry=0x7f82a78329b8, put_in_cache=put_in_cache@entry=true)
          at /data/git/10.5_opt/sql/sql_connect.cc:1422
      #15 0x0000564ed3940554 in handle_one_connection (arg=arg@entry=0x7f82a78329b8)
          at /data/git/10.5_opt/sql/sql_connect.cc:1319
      #16 0x0000564ed3caf02a in pfs_spawn_thread (arg=0x7f82a784b018)
          at /data/git/10.5_opt/storage/perfschema/pfs.cc:2201
      #17 0x00007f82a91596db in start_thread (arg=0x7f82aa6a6700) at pthread_create.c:463
      #18 0x00007f82a855788f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.4.13 (opt), 10.5.2 (opt), 10.5.4 (opt)

      Bug confirmed not present in:
      MariaDB: 10.1.45 (dbg), 10.1.45 (opt), 10.2.32 (dbg), 10.2.32 (opt), 10.3.23 (dbg), 10.3.23 (opt), 10.4.13 (dbg), 10.5.2 (dbg)
      MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.47 (dbg), 5.6.47 (opt), 5.7.29 (dbg), 5.7.29 (opt), 8.0.19 (dbg), 8.0.19 (opt)

      Attachments

        Issue Links

          Activity

            People

              bar Alexander Barkov
              Roel Roel Van de Paar
              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.