Bug #74848 | !table || (!table->write_set || bitmap_is_set(table->write_set, field_index)) | ||
---|---|---|---|
Submitted: | 14 Nov 2014 2:43 | Modified: | 20 Nov 2019 22:12 |
Reporter: | Ramesh Sivaraman | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | MySQL Server: DML | Severity: | S3 (Non-critical) |
Version: | 5.6.21-debug, 5.6.23 | OS: | Linux (CentOS 7) |
Assigned to: | CPU Architecture: | Any |
[14 Nov 2014 2:43]
Ramesh Sivaraman
[14 Nov 2014 2:44]
Ramesh Sivaraman
Might be this bug is related to http://bugs.mysql.com/bug.php?id=73869
[14 Nov 2014 6:30]
MySQL Verification Team
Hello Ramesh Sivaraman, Thank you for the bug report and test case. Confirmed that 5.6.23 debug build is affected. Thanks, Umesh
[14 Nov 2014 6:31]
MySQL Verification Team
// 5.6.23 optimized build scripts/mysql_install_db --basedir=/data/ushastry/server/mysql-advanced-5.6.23 --datadir=/tmp/bug --user=root bin/mysqld --basedir=/data/ushastry/server/mysql-advanced-5.6.23 --tmpdir=/tmp/bug --datadir=/tmp/bug --core --socket=/tmp/mysql.sock --port=3306 --log-error=/tmp/bug/log.err --maximum-bulk_insert_buffer_size=1M --maximum-join_buffer_size=1M --maximum-max_heap_table_size=1M --maximum-max_join_size=1M --maximum-myisam_max_sort_file_size=1M --maximum-myisam_mmap_size=1M --maximum-myisam_sort_buffer_size=1M --maximum-optimizer_trace_max_mem_size=1M --maximum-preload_buffer_size=1M --maximum-query_alloc_block_size=1M --maximum-query_prealloc_size=1M --maximum-range_alloc_block_size=1M --maximum-read_buffer_size=1M --maximum-read_rnd_buffer_size=1M --maximum-sort_buffer_size=1M --maximum-tmp_table_size=1M --maximum-transaction_alloc_block_size=1M --maximum-transaction_prealloc_size=1M --log-output=none --sql_mode=ONLY_FULL_GROUP_BY --user=root 2>&1 & Only debug builds are affected [root@cluster-repo mysql-advanced-5.6.23]# bin/mysql -u root -p test Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.6.23-enterprise-commercial-advanced MySQL Enterprise Server - Advanced Edition (Commercial) Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> DROP DATABASE test;CREATE DATABASE test;USE test; Query OK, 0 rows affected (0.00 sec) Query OK, 1 row affected (0.00 sec) Database changed mysql> CREATE TABLE t2(a int,b int,primary key (a)); Query OK, 0 rows affected (0.02 sec) mysql> create view t1 as select a from t2; Query OK, 0 rows affected (0.01 sec) mysql> insert into t1 values(a+2); Query OK, 1 row affected (0.01 sec) ## debug build scripts/mysql_install_db --basedir=/data/ushastry/server/mysql-advanced-5.6.23 --datadir=/tmp/bug --user=root bin/mysqld-debug --basedir=/data/ushastry/server/mysql-advanced-5.6.23 --tmpdir=/tmp/bug --datadir=/tmp/bug --core --socket=/tmp/mysql.sock --port=3306 --log-error=/tmp/bug/log.err --maximum-bulk_insert_buffer_size=1M --maximum-join_buffer_size=1M --maximum-max_heap_table_size=1M --maximum-max_join_size=1M --maximum-myisam_max_sort_file_size=1M --maximum-myisam_mmap_size=1M --maximum-myisam_sort_buffer_size=1M --maximum-optimizer_trace_max_mem_size=1M --maximum-preload_buffer_size=1M --maximum-query_alloc_block_size=1M --maximum-query_prealloc_size=1M --maximum-range_alloc_block_size=1M --maximum-read_buffer_size=1M --maximum-read_rnd_buffer_size=1M --maximum-sort_buffer_size=1M --maximum-tmp_table_size=1M --maximum-transaction_alloc_block_size=1M --maximum-transaction_prealloc_size=1M --log-output=none --sql_mode=ONLY_FULL_GROUP_BY --user=root 2>&1 & (gdb) bt #0 __pthread_kill (threadid=<value optimized out>, signo=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:63 #1 0x0000000000affdab in my_write_core (sig=6) at /export/home/pb2/build/sb_0-13622626-1415294505.52/mysqlcom-pro-5.6.23/mysys/stacktrace.c:422 #2 0x000000000077ebbc in handle_fatal_signal (sig=6) at /export/home/pb2/build/sb_0-13622626-1415294505.52/mysqlcom-pro-5.6.23/sql/signal_handler.cc:230 #3 <signal handler called> #4 0x0000003deac32625 in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 #5 0x0000003deac33e05 in abort () at abort.c:92 #6 0x0000003deac2b74e in __assert_fail_base (fmt=<value optimized out>, assertion=0x10a82b0 "!table || (!table->write_set || bitmap_is_set(table->write_set, field_index))", file=0x10a8120 "/export/home/pb2/build/sb_0-13622626-1415294505.52/mysqlcom-pro-5.6.23/sql/field.cc", line=<value optimized out>, function=<value optimized out>) at assert.c:96 #7 0x0000003deac2b810 in __assert_fail (assertion=0x10a82b0 "!table || (!table->write_set || bitmap_is_set(table->write_set, field_index))", file=0x10a8120 "/export/home/pb2/build/sb_0-13622626-1415294505.52/mysqlcom-pro-5.6.23/sql/field.cc", line=3750, function=0x10aca40 "virtual type_conversion_status Field_long::store(longlong, bool)") at assert.c:105 #8 0x000000000095d6d5 in Field_long::store (this=0x7f02fc022b00, nr=2, unsigned_val=false) at /export/home/pb2/build/sb_0-13622626-1415294505.52/mysqlcom-pro-5.6.23/sql/field.cc:3750 #9 0x00000000006b389c in Item::save_in_field (this=0x7f02fc005810, field=0x7f02fc022b00, no_conversions=false) at /export/home/pb2/build/sb_0-13622626-1415294505.52/mysqlcom-pro-5.6.23/sql/item.cc:6339 #10 0x00000000007cca6b in fill_record (thd=0x2e0a200, fields=..., values=..., ignore_errors=false, bitmap=0x0) at /export/home/pb2/build/sb_0-13622626-1415294505.52/mysqlcom-pro-5.6.23/sql/sql_base.cc:8992 #11 0x00000000007ccb81 in fill_record_n_invoke_before_triggers (thd=0x2e0a200, fields=..., values=..., ignore_errors=false, triggers=0x0, event=TRG_EVENT_INSERT) at /export/home/pb2/build/sb_0-13622626-1415294505.52/mysqlcom-pro-5.6.23/sql/sql_base.cc:9037 #12 0x000000000080cd61 in mysql_insert (thd=0x2e0a200, table_list=0x7f02fc0050d8, fields=..., values_list=..., update_fields=..., update_values=..., duplic=DUP_ERROR, ignore=false) at /export/home/pb2/build/sb_0-13622626-1415294505.52/mysqlcom-pro-5.6.23/sql/sql_insert.cc:996 #13 0x000000000082fd39 in mysql_execute_command (thd=0x2e0a200) at /export/home/pb2/build/sb_0-13622626-1415294505.52/mysqlcom-pro-5.6.23/sql/sql_parse.cc:3443 #14 0x0000000000837fa9 in mysql_parse (thd=0x2e0a200, rawbuf=0x7f02fc004ff0 "insert into t1 values(a+2)", length=26, parser_state=0x7f0323242680) at /export/home/pb2/build/sb_0-13622626-1415294505.52/mysqlcom-pro-5.6.23/sql/sql_parse.cc:6357 #15 0x000000000082a92b in dispatch_command (command=COM_QUERY, thd=0x2e0a200, packet=0x2f38a91 "insert into t1 values(a+2)", packet_length=26) at /export/home/pb2/build/sb_0-13622626-1415294505.52/mysqlcom-pro-5.6.23/sql/sql_parse.cc:1332 #16 0x0000000000829990 in do_command (thd=0x2e0a200) at /export/home/pb2/build/sb_0-13622626-1415294505.52/mysqlcom-pro-5.6.23/sql/sql_parse.cc:1034 #17 0x00000000007f0d8f in do_handle_one_connection (thd_arg=0x2e0a200) at /export/home/pb2/build/sb_0-13622626-1415294505.52/mysqlcom-pro-5.6.23/sql/sql_connect.cc:982 #18 0x00000000007f0860 in handle_one_connection (arg=0x2e0a200) at /export/home/pb2/build/sb_0-13622626-1415294505.52/mysqlcom-pro-5.6.23/sql/sql_connect.cc:898 #19 0x0000000000e5f509 in pfs_spawn_thread (arg=0x2efc1c0) at /export/home/pb2/build/sb_0-13622626-1415294505.52/mysqlcom-pro-5.6.23/storage/perfschema/pfs.cc:1860 #20 0x0000003deb0079d1 in start_thread (arg=0x7f0323243700) at pthread_create.c:301 #21 0x0000003deace89dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115
[14 Nov 2014 6:32]
MySQL Verification Team
// 5.7.6 ## Optimized build not affected [root@cluster-repo mysql-advanced-5.7.6]# bin/mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.7.6-m16-enterprise-commercial-advanced MySQL Enterprise Server - Advanced Edition (Commercial) Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> DROP DATABASE test;CREATE DATABASE test;USE test; Query OK, 2 rows affected (0.02 sec) Query OK, 1 row affected (0.00 sec) Database changed mysql> CREATE TABLE t2(a int,b int,primary key (a)); Query OK, 0 rows affected (0.03 sec) mysql> create view t1 as select a from t2; Query OK, 0 rows affected (0.00 sec) mysql> insert into t1 values(a+2); Query OK, 1 row affected (0.01 sec) ## Debug build not affected mysql> show variables like '%version%'; +-------------------------+---------------------------------------------------------------+ | Variable_name | Value | +-------------------------+---------------------------------------------------------------+ | innodb_version | 5.7.6 | | protocol_version | 10 | | slave_type_conversions | | | version | 5.7.6-m16-enterprise-commercial-advanced-debug | | version_comment | MySQL Enterprise Server - Advanced Edition Debug (Commercial) | | version_compile_machine | x86_64 | | version_compile_os | Linux | +-------------------------+---------------------------------------------------------------+ 7 rows in set (0.00 sec) mysql> DROP DATABASE test;CREATE DATABASE test;USE test; ERROR 1008 (HY000): Can't drop database 'test'; database doesn't exist Query OK, 1 row affected (0.01 sec) Database changed mysql> CREATE TABLE t2(a int,b int,primary key (a)); Query OK, 0 rows affected (0.04 sec) mysql> create view t1 as select a from t2; Query OK, 0 rows affected (0.00 sec) mysql> insert into t1 values(a+2); Query OK, 1 row affected (0.00 sec)
[14 Nov 2014 6:37]
MySQL Verification Team
Confirmed that 5.6.21 only debug build is affected // 5.6.21 /data/ushastry/server/mysql-5.6.21/scripts/mysql_install_db --basedir=/data/ushastry/server/mysql-5.6.21 --datadir=/tmp/bug --user=root /data/ushastry/server/mysql-5.6.21/bin/mysqld --basedir=/data/ushastry/server/mysql-5.6.21 --tmpdir=/tmp/bug --datadir=/tmp/bug --core --socket=/tmp/mysql.sock --port=3306 --log-error=/tmp/bug/log.err --maximum-bulk_insert_buffer_size=1M --maximum-join_buffer_size=1M --maximum-max_heap_table_size=1M --maximum-max_join_size=1M --maximum-myisam_max_sort_file_size=1M --maximum-myisam_mmap_size=1M --maximum-myisam_sort_buffer_size=1M --maximum-optimizer_trace_max_mem_size=1M --maximum-preload_buffer_size=1M --maximum-query_alloc_block_size=1M --maximum-query_prealloc_size=1M --maximum-range_alloc_block_size=1M --maximum-read_buffer_size=1M --maximum-read_rnd_buffer_size=1M --maximum-sort_buffer_size=1M --maximum-tmp_table_size=1M --maximum-transaction_alloc_block_size=1M --maximum-transaction_prealloc_size=1M --log-output=none --sql_mode=ONLY_FULL_GROUP_BY --user=root 2>&1 & [root@cluster-repo mysql-5.6.21]# bin/mysql -u root -p test Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.6.21 MySQL Community Server (GPL) Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> show variables like '%version%'; +-------------------------+------------------------------+ | Variable_name | Value | +-------------------------+------------------------------+ | innodb_version | 5.6.21 | | protocol_version | 10 | | slave_type_conversions | | | version | 5.6.21 | | version_comment | MySQL Community Server (GPL) | | version_compile_machine | x86_64 | | version_compile_os | linux-glibc2.5 | +-------------------------+------------------------------+ 7 rows in set (0.00 sec) mysql> DROP DATABASE test;CREATE DATABASE test;USE test; Query OK, 0 rows affected (0.01 sec) Query OK, 1 row affected (0.00 sec) Database changed mysql> CREATE TABLE t2(a int,b int,primary key (a)); Query OK, 0 rows affected (0.02 sec) mysql> create view t1 as select a from t2; Query OK, 0 rows affected (0.00 sec) mysql> insert into t1 values(a+2); Query OK, 1 row affected (0.00 sec) ## debug build affected (gdb) bt #0 __pthread_kill (threadid=<value optimized out>, signo=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:63 #1 0x0000000000aaa203 in my_write_core (sig=6) at /export/home/pb2/build/sb_0-13191046-1410443906.78/mysql-5.6.21/mysys/stacktrace.c:422 #2 0x00000000007140ea in handle_fatal_signal (sig=6) at /export/home/pb2/build/sb_0-13191046-1410443906.78/mysql-5.6.21/sql/signal_handler.cc:230 #3 <signal handler called> #4 0x0000003deac32625 in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 #5 0x0000003deac33e05 in abort () at abort.c:92 #6 0x0000003deac2b74e in __assert_fail_base (fmt=<value optimized out>, assertion=0xf8dc70 "!table || (!table->write_set || bitmap_is_set(table->write_set, field_index))", file=0xf8cf20 "/export/home/pb2/build/sb_0-13191046-1410443906.78/mysql-5.6.21/sql/field.cc", line=<value optimized out>, function=<value optimized out>) at assert.c:96 #7 0x0000003deac2b810 in __assert_fail (assertion=0xf8dc70 "!table || (!table->write_set || bitmap_is_set(table->write_set, field_index))", file=0xf8cf20 "/export/home/pb2/build/sb_0-13191046-1410443906.78/mysql-5.6.21/sql/field.cc", line=3750, function=0xf91f20 "virtual type_conversion_status Field_long::store(longlong, bool)") at assert.c:105 #8 0x00000000008fae9c in Field_long::store (this=0x7ff06400c9d0, nr=2, unsigned_val=false) at /export/home/pb2/build/sb_0-13191046-1410443906.78/mysql-5.6.21/sql/field.cc:3750 #9 0x0000000000637dc4 in Item::save_in_field (this=0x7ff0640075a0, field=0x7ff06400c9d0, no_conversions=false) at /export/home/pb2/build/sb_0-13191046-1410443906.78/mysql-5.6.21/sql/item.cc:6323 #10 0x000000000075351f in fill_record (thd=0x33c7500, fields=..., values=..., ignore_errors=false, bitmap=0x0) at /export/home/pb2/build/sb_0-13191046-1410443906.78/mysql-5.6.21/sql/sql_base.cc:8972 #11 0x0000000000753636 in fill_record_n_invoke_before_triggers (thd=0x33c7500, fields=..., values=..., ignore_errors=false, triggers=0x0, event=TRG_EVENT_INSERT) at /export/home/pb2/build/sb_0-13191046-1410443906.78/mysql-5.6.21/sql/sql_base.cc:9017 #12 0x00000000007ac7d6 in mysql_insert (thd=0x33c7500, table_list=0x7ff064006e68, fields=..., values_list=..., update_fields=..., update_values=..., duplic=DUP_ERROR, ignore=false) at /export/home/pb2/build/sb_0-13191046-1410443906.78/mysql-5.6.21/sql/sql_insert.cc:996 #13 0x00000000007c99f5 in mysql_execute_command (thd=0x33c7500) at /export/home/pb2/build/sb_0-13191046-1410443906.78/mysql-5.6.21/sql/sql_parse.cc:3443 #14 0x00000000007cee85 in mysql_parse (thd=0x33c7500, rawbuf=0x7ff064006d80 "insert into t1 values(a+2)", length=26, parser_state=0x7ff096efe680) at /export/home/pb2/build/sb_0-13191046-1410443906.78/mysql-5.6.21/sql/sql_parse.cc:6245 #15 0x00000000007d0a2f in dispatch_command (command=COM_QUERY, thd=0x33c7500, packet=0x3ba48a1 "insert into t1 values(a+2)", packet_length=26) at /export/home/pb2/build/sb_0-13191046-1410443906.78/mysql-5.6.21/sql/sql_parse.cc:1332 #16 0x00000000007d2269 in do_command (thd=0x33c7500) at /export/home/pb2/build/sb_0-13191046-1410443906.78/mysql-5.6.21/sql/sql_parse.cc:1034 #17 0x0000000000788571 in do_handle_one_connection (thd_arg=0x33c7500) at /export/home/pb2/build/sb_0-13191046-1410443906.78/mysql-5.6.21/sql/sql_connect.cc:982 #18 0x0000000000788637 in handle_one_connection (arg=0x33c7500) at /export/home/pb2/build/sb_0-13191046-1410443906.78/mysql-5.6.21/sql/sql_connect.cc:898 #19 0x0000000000d9bbe2 in pfs_spawn_thread (arg=0x3b3c060) at /export/home/pb2/build/sb_0-13191046-1410443906.78/mysql-5.6.21/storage/perfschema/pfs.cc:1860 #20 0x0000003deb0079d1 in start_thread (arg=0x7ff096eff700) at pthread_create.c:301 #21 0x0000003deace89dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115
[14 Nov 2014 6:40]
MySQL Verification Team
Hi Ramesh, Could you please confirm whether you observed this on debug or optimized build? Thanks, Umesh
[14 Nov 2014 7:30]
Ramesh Sivaraman
Hi Umesh, Able to reproduce only with debug build. Sorry for not tagging to debug build. Thanks, Ramesh
[14 Nov 2014 7:45]
MySQL Verification Team
Np, thank you for confirming. Removing security designation as only debug builds are affected. Thanks, Umesh
[20 Nov 2019 22:12]
Roy Lyseng
Posted by developer: Not reproducible in 5.7.