sql/sql_parse.cc:239: bool some_non_temp_table_to_be_updated(THD*, TABLE_LIST*): Assertion `table->db && table->table_name' failed. | abort in some_non_temp_table_to_be_updated

Bug #1392952 reported by Roel Van de Paar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Status tracked in 5.7
5.1
Invalid
Undecided
Unassigned
5.5
Invalid
Undecided
Unassigned
5.6
Triaged
High
Unassigned
5.7
Invalid
High
Unassigned

Bug Description

(gdb) bt
#0 0x00007f0bcb6e0771 in pthread_kill () from /lib64/libpthread.so.0
#1 0x0000000000ab7cf6 in my_write_core (sig=6) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/mysys/stacktrace.c:422
#2 0x000000000072fcd3 in handle_fatal_signal (sig=6) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/sql/signal_handler.cc:236
#3 <signal handler called>
#4 0x00007f0bca2e45c9 in raise () from /lib64/libc.so.6
#5 0x00007f0bca2e5cd8 in abort () from /lib64/libc.so.6
#6 0x00007f0bca2dd536 in __assert_fail_base () from /lib64/libc.so.6
#7 0x00007f0bca2dd5e2 in __assert_fail () from /lib64/libc.so.6
#8 0x00000000007dc7d7 in some_non_temp_table_to_be_updated (thd=0x7f0b36ff2000, tables=0x7f0b0dc95418) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/sql/sql_parse.cc:239
#9 0x00000000007de9d1 in deny_updates_if_read_only_option (thd=0x7f0b36ff2000, all_tables=0x7f0b0dc95418) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/sql/sql_parse.cc:1105
#10 0x00000000007e2a28 in mysql_execute_command (thd=0x7f0b36ff2000) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/sql/sql_parse.cc:2783
#11 0x0000000000806192 in Prepared_statement::execute (this=0x7f0b0dc8a600, expanded_query=0x7f0bcbcd0b60, open_cursor=false) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/sql/sql_prepare.cc:4343
#12 0x00000000008051de in Prepared_statement::execute_loop (this=0x7f0b0dc8a600, expanded_query=0x7f0bcbcd0b60, open_cursor=false, packet=0x0, packet_end=0x0) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/sql/sql_prepare.cc:3991
#13 0x0000000000802b7b in mysql_sql_stmt_execute (thd=0x7f0b36ff2000) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/sql/sql_prepare.cc:2921
#14 0x00000000007e3135 in mysql_execute_command (thd=0x7f0b36ff2000) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/sql/sql_parse.cc:2975
#15 0x00000000007ed4bf in mysql_parse (thd=0x7f0b36ff2000, rawbuf=0x7f0b0dc1f010 "execute stmt", length=12, parser_state=0x7f0bcbcd1df0) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/sql/sql_parse.cc:6777
#16 0x00000000007df8de in dispatch_command (command=COM_QUERY, thd=0x7f0b36ff2000, packet=0x7f0b2da41001 "execute stmt", packet_length=12) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/sql/sql_parse.cc:1432
#17 0x00000000007de7fc in do_command (thd=0x7f0b36ff2000) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/sql/sql_parse.cc:1049
#18 0x00000000007a67b9 in do_handle_one_connection (thd_arg=0x7f0b36ff2000) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/sql/sql_connect.cc:1532
#19 0x00000000007a62c1 in handle_one_connection (arg=0x7f0b36ff2000) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/sql/sql_connect.cc:1443
#20 0x0000000000dc631c in pfs_spawn_thread (arg=0x7f0bc4f51b00) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/storage/perfschema/pfs.cc:1860
#21 0x00007f0bcb6dbdf3 in start_thread () from /lib64/libpthread.so.0
#22 0x00007f0bca3a501d in clone () from /lib64/libc.so.6

DROP DATABASE test;CREATE DATABASE test;USE test;
CREATE TABLE t1(c1 MEDIUMINT,c2 VARBINARY(1),c3 TINYINT(1),c4 VARBINARY(1) KEY,c5 MEDIUMINT UNIQUE KEY,c6 DECIMAL(10,8) DEFAULT 3.141592);
set global super_read_only=1;
prepare stmt from "insert INTO t1 (id,value) select * FROM (SELECT 1) as y on duplicate key update y.value='a'";
CREATE TEMPORARY TABLE t1(a INT) ENGINE=MyISAM;
execute stmt;

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

Does this become an Oracle bug if you replace super_read_only with regular read_only and execute with non-SUPER user?

Revision history for this message
Roel Van de Paar (roel11) wrote :

No. Checked on 5.6.23.

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

Thank you. Optionally, perhaps you could also test Oracle 5.7?

Revision history for this message
Roel Van de Paar (roel11) wrote :

Checked 5.7 also, idem.

Revision history for this message
Roel Van de Paar (roel11) wrote :

Also, 5.7 output with super_read_only in use:

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 t1(c1 MEDIUMINT,c2 VARBINARY(1),c3 TINYINT(1),c4 VARBINARY(1) KEY,c5 MEDIUMINT UNIQUE KEY,c6 DECIMAL(10,8) DEFAULT 3.141592);

Query OK, 0 rows affected (0.91 sec)

mysql> set global super_read_only=1;
Query OK, 0 rows affected (0.00 sec)

mysql> prepare stmt from "insert INTO t1 (id,value) select * FROM (SELECT 1) as y on duplicate key update y.value='a'";
ERROR 1054 (42S22): Unknown column 'id' in 'field list'
mysql> CREATE TEMPORARY TABLE t1(a INT) ENGINE=MyISAM;
Query OK, 0 rows affected (0.00 sec)

mysql> execute stmt;
ERROR 1243 (HY000): Unknown prepared statement handler (stmt) given to EXECUTE

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-847

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.