We're updating the issue view to help you get more done. 

Assertion `name != __null' failed in ACL_internal_schema_registry::lookup on 2nd execution os PS with multi-table update

Description

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 CREATE TABLE t1 (f1 INT); INSERT INTO t1 VALUES (1),(2); CREATE TABLE t2 (f2 INT); INSERT INTO t2 VALUES (3),(4); CREATE TABLE t3 (f3 INT); INSERT INTO t3 VALUES (5),(6); PREPARE stmt FROM ' UPDATE t1, t2 SET f1 = 5 WHERE 8 IN ( SELECT MIN(f3) FROM t3 ) '; EXECUTE stmt; EXECUTE stmt;

Stack trace from 10.0 commit 50d98e9c

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 10.0/sql/sql_acl.cc:10717: static const ACL_internal_schema_access* ACL_internal_schema_registry::lookup(const char*): Assertion `name != __null' failed. 150409 20:14:21 [ERROR] mysqld got signal 6 ; #6 0x00007f5990d3b311 in *__GI___assert_fail (assertion=0xef24c4 "name != __null", file=<optimized out>, line=10717, function=0xef3aa0 "static const ACL_internal_schema_access* ACL_internal_schema_registry::lookup(const char*)") at assert.c:81 #7 0x000000000060fe2a in ACL_internal_schema_registry::lookup (name=0x0) at 10.0/sql/sql_acl.cc:10717 #8 0x000000000060fee0 in get_cached_schema_access (grant_internal_info=0x7f59891f4358, schema_name=0x0) at 10.0/sql/sql_acl.cc:10744 #9 0x000000000060ff63 in get_cached_table_access (grant_internal_info=0x7f59891f4358, schema_name=0x0, table_name=0x0) at 10.0/sql/sql_acl.cc:10767 #10 0x0000000000605179 in check_grant (thd=0x7f598bb2f070, want_access=4, tables=0x7f59891f4088, any_combination_will_do=false, number=0, no_errors=true) at 10.0/sql/sql_acl.cc:6680 #11 0x00000000006898e2 in multi_update_precheck (thd=0x7f598bb2f070, tables=0x7f59893475c0) at 10.0/sql/sql_parse.cc:7746 #12 0x000000000067e437 in mysql_execute_command (thd=0x7f598bb2f070) at 10.0/sql/sql_parse.cc:3313 #13 0x000000000069f51e in Prepared_statement::execute (this=0x7f5989291470, expanded_query=0x7f5992f43ae0, open_cursor=false) at 10.0/sql/sql_prepare.cc:3971 #14 0x000000000069e5f9 in Prepared_statement::execute_loop (this=0x7f5989291470, expanded_query=0x7f5992f43ae0, open_cursor=false, packet=0x0, packet_end=0x0) at 10.0/sql/sql_prepare.cc:3626 #15 0x000000000069c8fb in mysql_sql_stmt_execute (thd=0x7f598bb2f070) at 10.0/sql/sql_prepare.cc:2777 #16 0x000000000067c68c in mysql_execute_command (thd=0x7f598bb2f070) at 10.0/sql/sql_parse.cc:2560 #17 0x0000000000686e85 in mysql_parse (thd=0x7f598bb2f070, rawbuf=0x7f59890e0088 "EXECUTE stmt", length=12, parser_state=0x7f5992f44600) at 10.0/sql/sql_parse.cc:6517 #18 0x00000000006798b1 in dispatch_command (command=COM_QUERY, thd=0x7f598bb2f070, packet=0x7f598afeb071 "EXECUTE stmt", packet_length=12) at 10.0/sql/sql_parse.cc:1300 #19 0x0000000000678c47 in do_command (thd=0x7f598bb2f070) at 10.0/sql/sql_parse.cc:996 #20 0x0000000000796457 in do_handle_one_connection (thd_arg=0x7f598bb2f070) at 10.0/sql/sql_connect.cc:1375 #21 0x00000000007961aa in handle_one_connection (arg=0x7f598bb2f070) at 10.0/sql/sql_connect.cc:1289 #22 0x0000000000cd391e in pfs_spawn_thread (arg=0x7f598af6ce70) at 10.0/storage/perfschema/pfs.cc:1860 #23 0x00007f5992b35b50 in start_thread (arg=<optimized out>) at pthread_create.c:304 #24 0x00007f5990deb95d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112

The problem appeared in 10.0 tree with this commit:

1 2 3 4 5 6 7 commit 775528ada3c2cc3a2a7ebafadebbcf44530aab50 0f8b194146b50afe442682c5a14a8a179e28f3b8 Author: Sergei Petrunia <psergey@askmonty.org> Date: Fri Feb 20 03:17:46 2015 +0300 MDEV-7220: Materialization strategy is not used for REPLACE ... SELECT Enable subquery materialization for non-SELECT queries with a SELECT part

Environment

None

Status

Assignee

Sergei Petrunia

Reporter

Elena Stepanova

Labels

None

External issue ID

None

External issue ID

None

Sprint

None

Fix versions

Affects versions

10.0
10.1

Priority

Major