summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Docs/README-wsrep6
-rw-r--r--Docs/myisam.txt2
-rw-r--r--client/mysqlbinlog.cc2
-rw-r--r--client/mysqlshow.c14
-rw-r--r--config.h.cmake7
-rw-r--r--include/my_sys.h11
-rw-r--r--libmysqld/CMakeLists.txt12
-rw-r--r--mysql-test/include/ipv6.inc1
-rw-r--r--mysql-test/include/master-slave.inc2
-rw-r--r--mysql-test/main/analyze_stmt_privileges.result6
-rw-r--r--mysql-test/main/analyze_stmt_privileges2.result1794
-rw-r--r--mysql-test/main/bootstrap.test2
-rw-r--r--mysql-test/main/bootstrap_innodb.test2
-rw-r--r--mysql-test/main/create_or_replace.result12
-rw-r--r--mysql-test/main/create_or_replace.test17
-rw-r--r--mysql-test/main/create_or_replace_permission.result2
-rw-r--r--mysql-test/main/cte_grant.result4
-rw-r--r--mysql-test/main/cte_nonrecursive_not_embedded.result2
-rw-r--r--mysql-test/main/cte_recursive.result586
-rw-r--r--mysql-test/main/cte_recursive.test664
-rw-r--r--mysql-test/main/flush-innodb-notembedded.result2
-rw-r--r--mysql-test/main/gis_notembedded.result2
-rw-r--r--mysql-test/main/grant.result92
-rw-r--r--mysql-test/main/grant2.result22
-rw-r--r--mysql-test/main/grant4.result26
-rw-r--r--mysql-test/main/grant5.result61
-rw-r--r--mysql-test/main/grant5.test72
-rw-r--r--mysql-test/main/grant_cache_no_prot.result6
-rw-r--r--mysql-test/main/grant_cache_ps_prot.result6
-rw-r--r--mysql-test/main/grant_explain_non_select.result68
-rw-r--r--mysql-test/main/grant_lowercase_fs.result4
-rw-r--r--mysql-test/main/information_schema_db.result16
-rw-r--r--mysql-test/main/insert_notembedded.result6
-rw-r--r--mysql-test/main/invisible_field_grant_completely.result4
-rw-r--r--mysql-test/main/invisible_field_grant_system.result4
-rw-r--r--mysql-test/main/kill.result2
-rw-r--r--mysql-test/main/kill.test4
-rw-r--r--mysql-test/main/log_slow.test2
-rw-r--r--mysql-test/main/lowercase_fs_off.result2
-rw-r--r--mysql-test/main/mysql_upgrade.test1
-rw-r--r--mysql-test/main/mysqlbinlog.result2
-rw-r--r--mysql-test/main/mysqldump.result16
-rw-r--r--mysql-test/main/mysqldump.test35
-rw-r--r--mysql-test/main/openssl_1.result6
-rw-r--r--mysql-test/main/partition_alter.result11
-rw-r--r--mysql-test/main/partition_alter.test11
-rw-r--r--mysql-test/main/partition_explicit_prune.result82
-rw-r--r--mysql-test/main/partition_explicit_prune.test35
-rw-r--r--mysql-test/main/partition_grant.result4
-rw-r--r--mysql-test/main/plugin_auth.test1
-rw-r--r--mysql-test/main/plugin_not_embedded.result2
-rw-r--r--mysql-test/main/ps_ddl.result12
-rw-r--r--mysql-test/main/ps_ddl.test14
-rw-r--r--mysql-test/main/ps_grant.result4
-rw-r--r--mysql-test/main/show_check.result8
-rw-r--r--mysql-test/main/sp-security-anchor-type.result18
-rw-r--r--mysql-test/main/sp-security.result28
-rw-r--r--mysql-test/main/status.result8
-rw-r--r--mysql-test/main/timezone_grant.result12
-rw-r--r--mysql-test/main/trigger_notembedded.result10
-rw-r--r--mysql-test/main/union.result85
-rw-r--r--mysql-test/main/union.test70
-rw-r--r--mysql-test/main/view.result28
-rw-r--r--mysql-test/main/view.test40
-rw-r--r--mysql-test/main/view_grant.result122
-rwxr-xr-xmysql-test/std_data/wsrep_notify.sh139
-rwxr-xr-xmysql-test/std_data/wsrep_notify_ssl.sh196
-rw-r--r--mysql-test/suite/compat/oracle/r/sp-security.result20
-rw-r--r--mysql-test/suite/engines/funcs/r/rpl_sp.result2
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_storedproc_06.result32
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_trig_03.result12
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_trig_03e.result68
-rw-r--r--mysql-test/suite/funcs_1/r/is_columns.result6
-rw-r--r--mysql-test/suite/funcs_1/r/is_table_constraints.result2
-rw-r--r--mysql-test/suite/funcs_1/r/is_triggers.result4
-rw-r--r--mysql-test/suite/funcs_1/r/is_user_privileges.result16
-rw-r--r--mysql-test/suite/funcs_1/r/memory_storedproc_06.result32
-rw-r--r--mysql-test/suite/funcs_1/r/memory_trig_03.result12
-rw-r--r--mysql-test/suite/funcs_1/r/memory_trig_03e.result68
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_storedproc_06.result32
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_trig_03.result12
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_trig_03e.result68
-rw-r--r--mysql-test/suite/funcs_1/r/storedproc.result2
-rw-r--r--mysql-test/suite/galera/r/galera_roles.result20
-rw-r--r--mysql-test/suite/galera/r/galera_rsu_wsrep_desync.result4
-rw-r--r--mysql-test/suite/galera/r/galera_sync_wait_show.result2
-rw-r--r--mysql-test/suite/galera/r/galera_toi_ddl_error.result4
-rw-r--r--mysql-test/suite/galera/r/galera_var_notify_ssl_ipv6.result11
-rw-r--r--mysql-test/suite/galera/r/lp1376747-4.result6
-rw-r--r--mysql-test/suite/galera/r/rename.result2
-rw-r--r--mysql-test/suite/galera/t/galera_var_notify_ssl_ipv6-master.opt1
-rw-r--r--mysql-test/suite/galera/t/galera_var_notify_ssl_ipv6.cnf20
-rw-r--r--mysql-test/suite/galera/t/galera_var_notify_ssl_ipv6.test20
-rw-r--r--mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result3
-rw-r--r--mysql-test/suite/gcol/r/innodb_virtual_index.result65
-rw-r--r--mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test3
-rw-r--r--mysql-test/suite/gcol/t/innodb_virtual_index.test50
-rw-r--r--mysql-test/suite/innodb/r/innodb-64k.result4
-rw-r--r--mysql-test/suite/innodb/r/innodb-table-online.result52
-rw-r--r--mysql-test/suite/innodb/r/purge_secondary.result15
-rw-r--r--mysql-test/suite/innodb/t/alter_missing_tablespace.test1
-rw-r--r--mysql-test/suite/innodb/t/ibuf_not_empty.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb-64k.test5
-rw-r--r--mysql-test/suite/innodb/t/innodb-get-fk.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb-table-online.test59
-rw-r--r--mysql-test/suite/innodb/t/missing_tablespaces.test1
-rw-r--r--mysql-test/suite/innodb/t/purge_secondary.test32
-rw-r--r--mysql-test/suite/innodb/t/table_flags.test6
-rw-r--r--mysql-test/suite/innodb/t/xa_recovery.test1
-rw-r--r--mysql-test/suite/innodb_fts/r/misc_debug.result3
-rw-r--r--mysql-test/suite/innodb_fts/r/misc_debug2.result5
-rw-r--r--mysql-test/suite/innodb_fts/t/misc_debug.test3
-rw-r--r--mysql-test/suite/innodb_fts/t/misc_debug2.test5
-rw-r--r--mysql-test/suite/mariabackup/big_innodb_log.test2
-rw-r--r--mysql-test/suite/mariabackup/log_page_corruption.test1
-rw-r--r--mysql-test/suite/parts/r/partition_exch_qa_5_innodb.result10
-rw-r--r--mysql-test/suite/parts/r/partition_exch_qa_5_myisam.result10
-rw-r--r--mysql-test/suite/parts/r/partition_exch_qa_6.result6
-rw-r--r--mysql-test/suite/parts/r/partition_exch_qa_8_innodb.result4
-rw-r--r--mysql-test/suite/parts/r/partition_exch_qa_8_myisam.result4
-rw-r--r--mysql-test/suite/perfschema/r/connect_attrs.result4
-rw-r--r--mysql-test/suite/perfschema/r/dml_accounts.result14
-rw-r--r--mysql-test/suite/perfschema/r/dml_cond_instances.result12
-rw-r--r--mysql-test/suite/perfschema/r/dml_esgs_by_account_by_event_name.result14
-rw-r--r--mysql-test/suite/perfschema/r/dml_esgs_by_host_by_event_name.result14
-rw-r--r--mysql-test/suite/perfschema/r/dml_esgs_by_thread_by_event_name.result14
-rw-r--r--mysql-test/suite/perfschema/r/dml_esgs_by_user_by_event_name.result14
-rw-r--r--mysql-test/suite/perfschema/r/dml_esgs_global_by_event_name.result14
-rw-r--r--mysql-test/suite/perfschema/r/dml_esms_by_account_by_event_name.result14
-rw-r--r--mysql-test/suite/perfschema/r/dml_esms_by_digest.result14
-rw-r--r--mysql-test/suite/perfschema/r/dml_esms_by_host_by_event_name.result14
-rw-r--r--mysql-test/suite/perfschema/r/dml_esms_by_thread_by_event_name.result14
-rw-r--r--mysql-test/suite/perfschema/r/dml_esms_by_user_by_event_name.result14
-rw-r--r--mysql-test/suite/perfschema/r/dml_esms_global_by_event_name.result14
-rw-r--r--mysql-test/suite/perfschema/r/dml_events_stages_current.result14
-rw-r--r--mysql-test/suite/perfschema/r/dml_events_stages_history.result14
-rw-r--r--mysql-test/suite/perfschema/r/dml_events_stages_history_long.result14
-rw-r--r--mysql-test/suite/perfschema/r/dml_events_statements_current.result14
-rw-r--r--mysql-test/suite/perfschema/r/dml_events_statements_history.result14
-rw-r--r--mysql-test/suite/perfschema/r/dml_events_statements_history_long.result14
-rw-r--r--mysql-test/suite/perfschema/r/dml_events_waits_current.result14
-rw-r--r--mysql-test/suite/perfschema/r/dml_events_waits_history.result14
-rw-r--r--mysql-test/suite/perfschema/r/dml_events_waits_history_long.result14
-rw-r--r--mysql-test/suite/perfschema/r/dml_ews_by_account_by_event_name.result14
-rw-r--r--mysql-test/suite/perfschema/r/dml_ews_by_host_by_event_name.result14
-rw-r--r--mysql-test/suite/perfschema/r/dml_ews_by_instance.result14
-rw-r--r--mysql-test/suite/perfschema/r/dml_ews_by_thread_by_event_name.result14
-rw-r--r--mysql-test/suite/perfschema/r/dml_ews_by_user_by_event_name.result14
-rw-r--r--mysql-test/suite/perfschema/r/dml_ews_global_by_event_name.result14
-rw-r--r--mysql-test/suite/perfschema/r/dml_file_instances.result12
-rw-r--r--mysql-test/suite/perfschema/r/dml_fs_by_event_name.result14
-rw-r--r--mysql-test/suite/perfschema/r/dml_fs_by_instance.result14
-rw-r--r--mysql-test/suite/perfschema/r/dml_host_cache.result14
-rw-r--r--mysql-test/suite/perfschema/r/dml_hosts.result14
-rw-r--r--mysql-test/suite/perfschema/r/dml_mutex_instances.result12
-rw-r--r--mysql-test/suite/perfschema/r/dml_os_global_by_type.result14
-rw-r--r--mysql-test/suite/perfschema/r/dml_performance_timers.result12
-rw-r--r--mysql-test/suite/perfschema/r/dml_rwlock_instances.result12
-rw-r--r--mysql-test/suite/perfschema/r/dml_session_account_connect_attrs.result14
-rw-r--r--mysql-test/suite/perfschema/r/dml_session_connect_attrs.result14
-rw-r--r--mysql-test/suite/perfschema/r/dml_setup_consumers.result6
-rw-r--r--mysql-test/suite/perfschema/r/dml_setup_instruments.result6
-rw-r--r--mysql-test/suite/perfschema/r/dml_setup_timers.result6
-rw-r--r--mysql-test/suite/perfschema/r/dml_socket_instances.result12
-rw-r--r--mysql-test/suite/perfschema/r/dml_socket_summary_by_event_name.result14
-rw-r--r--mysql-test/suite/perfschema/r/dml_socket_summary_by_instance.result14
-rw-r--r--mysql-test/suite/perfschema/r/dml_threads.result6
-rw-r--r--mysql-test/suite/perfschema/r/dml_tiws_by_index_usage.result14
-rw-r--r--mysql-test/suite/perfschema/r/dml_tiws_by_table.result14
-rw-r--r--mysql-test/suite/perfschema/r/dml_tlws_by_table.result14
-rw-r--r--mysql-test/suite/perfschema/r/dml_users.result14
-rw-r--r--mysql-test/suite/perfschema/r/misc.result2
-rw-r--r--mysql-test/suite/perfschema/r/privilege.result128
-rw-r--r--mysql-test/suite/perfschema/r/setup_actors.result2
-rw-r--r--mysql-test/suite/roles/definer.result8
-rw-r--r--mysql-test/suite/roles/recursive.result16
-rw-r--r--mysql-test/suite/roles/recursive_dbug.result16
-rw-r--r--mysql-test/suite/roles/role_case_sensitive-10744.result4
-rw-r--r--mysql-test/suite/roles/role_grant_propagate-29458.result2
-rw-r--r--mysql-test/suite/roles/roles_tables_priv-29465.result6
-rw-r--r--mysql-test/suite/roles/set_and_drop.result18
-rw-r--r--mysql-test/suite/roles/set_default_role_clear.result4
-rw-r--r--mysql-test/suite/roles/set_default_role_for.result4
-rw-r--r--mysql-test/suite/roles/set_default_role_invalid.result6
-rw-r--r--mysql-test/suite/roles/set_default_role_new_connection.result6
-rw-r--r--mysql-test/suite/roles/set_role-5232.result2
-rw-r--r--mysql-test/suite/roles/set_role-database-recursive.result6
-rw-r--r--mysql-test/suite/roles/set_role-database-simple.result12
-rw-r--r--mysql-test/suite/roles/set_role-multiple-role.result6
-rw-r--r--mysql-test/suite/roles/set_role-recursive.result8
-rw-r--r--mysql-test/suite/roles/set_role-simple.result4
-rw-r--r--mysql-test/suite/roles/set_role-table-column-priv.result4
-rw-r--r--mysql-test/suite/roles/set_role-table-simple.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_img_sequence.result2290
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_img_sequence_full.result767
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_img_sequence_min.result797
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_img_sequence_noblob.result796
-rw-r--r--mysql-test/suite/rpl/r/rpl_sp.result2
-rw-r--r--mysql-test/suite/rpl/t/rpl_gtid_stop_start.test1
-rw-r--r--mysql-test/suite/rpl/t/rpl_mdev12179.test1
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_img_sequence_full.cnf (renamed from mysql-test/suite/rpl/t/rpl_row_img_sequence.cnf)0
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_img_sequence_full.test48
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_img_sequence_min.cnf21
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_img_sequence_min.test (renamed from mysql-test/suite/rpl/t/rpl_row_img_sequence.test)29
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_img_sequence_noblob.cnf21
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_img_sequence_noblob.test51
-rw-r--r--mysql-test/suite/sql_sequence/alter_notembedded.result8
-rw-r--r--mysql-test/suite/sql_sequence/grant.result10
-rw-r--r--mysql-test/suite/sql_sequence/gtid.result10
-rw-r--r--mysql-test/suite/sql_sequence/replication.result4
-rw-r--r--mysql-test/suite/sys_vars/r/wsrep_on_without_provider.result5
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_buffer_pool_dump_at_shutdown_basic.test1
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_flush_method_func.test2
-rw-r--r--mysql-test/suite/sys_vars/t/wsrep_on_basic.test45
-rw-r--r--mysql-test/suite/sys_vars/t/wsrep_on_without_provider.test9
-rw-r--r--mysql-test/suite/versioning/r/not_embedded.result2
-rw-r--r--plugin/wsrep_info/mysql-test/wsrep_info/suite.pm2
-rw-r--r--sql/CMakeLists.txt11
-rw-r--r--sql/ha_partition.cc15
-rw-r--r--sql/item.h1
-rw-r--r--sql/item_subselect.cc44
-rw-r--r--sql/item_subselect.h1
-rw-r--r--sql/mysqld.cc24
-rw-r--r--sql/parse_file.cc21
-rw-r--r--sql/share/errmsg-utf8.txt38
-rw-r--r--sql/sp_head.cc2
-rw-r--r--sql/sql_acl.cc13
-rw-r--r--sql/sql_analyse.cc60
-rw-r--r--sql/sql_base.cc23
-rw-r--r--sql/sql_class.cc2
-rw-r--r--sql/sql_class.h20
-rw-r--r--sql/sql_cte.cc100
-rw-r--r--sql/sql_cte.h20
-rw-r--r--sql/sql_lex.cc18
-rw-r--r--sql/sql_lex.h2
-rw-r--r--sql/sql_list.h12
-rw-r--r--sql/sql_parse.cc24
-rw-r--r--sql/sql_prepare.cc4
-rw-r--r--sql/sql_repl.cc2
-rw-r--r--sql/sql_show.cc31
-rw-r--r--sql/sql_table.cc48
-rw-r--r--sql/sql_trigger.cc25
-rw-r--r--sql/sql_trigger.h4
-rw-r--r--sql/sql_tvc.cc2
-rw-r--r--sql/sql_udf.cc5
-rw-r--r--sql/sql_union.cc9
-rw-r--r--sql/sql_view.cc84
-rw-r--r--sql/sql_yacc.yy10
-rw-r--r--sql/sql_yacc_ora.yy3
-rw-r--r--sql/table.cc92
-rw-r--r--sql/table.h69
-rw-r--r--sql/wsrep_var.cc6
-rw-r--r--storage/connect/bsonudf.cpp4
-rw-r--r--storage/connect/global.h2
-rw-r--r--storage/connect/ha_connect.cc18
-rw-r--r--storage/connect/ha_connect.h24
-rw-r--r--storage/connect/jdbconn.cpp10
-rw-r--r--storage/connect/json.cpp6
-rw-r--r--storage/connect/jsonudf.cpp4
-rw-r--r--storage/connect/libdoc.cpp38
-rw-r--r--storage/connect/mysql-test/connect/r/mysql.result22
-rw-r--r--storage/connect/mysql-test/connect/r/odbc_postgresql.result24
-rw-r--r--storage/connect/mysql-test/connect/t/mysql.test20
-rw-r--r--storage/connect/mysql-test/connect/t/odbc_postgresql.sql3
-rw-r--r--storage/connect/mysql-test/connect/t/odbc_postgresql.test6
-rw-r--r--storage/connect/plugutil.cpp17
-rw-r--r--storage/connect/tabbson.cpp4
-rw-r--r--storage/connect/tabodbc.cpp18
-rw-r--r--storage/connect/tabwmi.cpp2
-rw-r--r--storage/connect/valblk.cpp2
-rw-r--r--storage/federatedx/ha_federatedx.cc4
-rw-r--r--storage/innobase/CMakeLists.txt5
-rw-r--r--storage/innobase/btr/btr0btr.cc6
-rw-r--r--storage/innobase/btr/btr0bulk.cc7
-rw-r--r--storage/innobase/btr/btr0cur.cc86
-rw-r--r--storage/innobase/btr/btr0pcur.cc6
-rw-r--r--storage/innobase/btr/btr0sea.cc59
-rw-r--r--storage/innobase/buf/buf0buf.cc22
-rw-r--r--storage/innobase/dict/dict0dict.cc4
-rw-r--r--storage/innobase/fts/fts0fts.cc4
-rw-r--r--storage/innobase/gis/gis0sea.cc8
-rw-r--r--storage/innobase/handler/ha_innodb.cc7
-rw-r--r--storage/innobase/include/btr0cur.h77
-rw-r--r--storage/innobase/include/btr0pcur.h55
-rw-r--r--storage/innobase/include/btr0pcur.inl58
-rw-r--r--storage/innobase/include/btr0sea.h1
-rw-r--r--storage/innobase/include/row0mysql.h9
-rw-r--r--storage/innobase/include/row0upd.h5
-rw-r--r--storage/innobase/include/trx0rec.h26
-rw-r--r--storage/innobase/row/row0ins.cc12
-rw-r--r--storage/innobase/row/row0log.cc14
-rw-r--r--storage/innobase/row/row0merge.cc7
-rw-r--r--storage/innobase/row/row0purge.cc135
-rw-r--r--storage/innobase/row/row0sel.cc21
-rw-r--r--storage/innobase/row/row0upd.cc3
-rw-r--r--storage/innobase/trx/trx0rec.cc176
-rw-r--r--storage/innobase/trx/trx0trx.cc2
-rw-r--r--storage/mroonga/mrn_mysql_compat.h2
-rw-r--r--storage/myisam/ha_myisam.cc2
-rw-r--r--storage/rocksdb/CMakeLists.txt2
-rw-r--r--storage/spider/ha_spider.cc4
-rw-r--r--storage/spider/mysql-test/spider/bugfix/include/restart_spider.inc8
-rw-r--r--storage/spider/mysql-test/spider/bugfix/r/mdev_29352.result12
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/mdev_29352.test11
-rw-r--r--storage/spider/spd_group_by_handler.cc2
-rw-r--r--storage/spider/spd_ping_table.cc11
-rw-r--r--storage/tokudb/mysql-test/tokudb_parts/r/partition_exch_qa_5_tokudb.result10
-rw-r--r--storage/tokudb/mysql-test/tokudb_parts/r/partition_exch_qa_8_tokudb.result4
-rwxr-xr-x[-rw-r--r--]support-files/wsrep_notify.sh138
309 files changed, 8060 insertions, 5264 deletions
diff --git a/Docs/README-wsrep b/Docs/README-wsrep
index 79278ed8927..2e3bf52219d 100644
--- a/Docs/README-wsrep
+++ b/Docs/README-wsrep
@@ -365,7 +365,7 @@ wsrep_forced_binlog_format=none
special value NONE, meaning that there is no forced binlog format in effect.
This variable was introduced to support STATEMENT format replication during
rolling schema upgrade processing. However, in most cases ROW replication
- is valid for asymmetrict schema replication.
+ is valid for asymmetric schema replication.
State snapshot transfer options.
@@ -416,7 +416,7 @@ wsrep_sst_donor=
6. ONLINE SCHEMA UPGRADE
- Schema upgrades mean any data definition statements (DDL statemnents) run
+ Schema upgrades mean any data definition statements (DDL statements) run
for the database. They change the database structure and are non-
transactional.
@@ -429,7 +429,7 @@ wsrep_sst_donor=
With earlier releases, DDL processing happened always by Total Order
Isolation (TOI) method. With TOI, the DDL was scheduled to be processed in
- same transaction seqeuncing 'slot' in each cluster node.
+ same transaction sequencing 'slot' in each cluster node.
The processing is secured by locking the affected table from any other use.
With TOI method, the whole cluster has part of the database locked for the
duration of the DDL processing.
diff --git a/Docs/myisam.txt b/Docs/myisam.txt
index db41fb911ca..f959d8eb775 100644
--- a/Docs/myisam.txt
+++ b/Docs/myisam.txt
@@ -177,7 +177,7 @@ HA_EXTRA_NO_KEYREAD=8 Normal read of records (def)
HA_EXTRA_NO_USER_CHANGE=9 No user is allowed to write
HA_EXTRA_KEY_CACHE=10
HA_EXTRA_NO_KEY_CACHE=11
-HA_EXTRA_WAIT_LOCK=12 Wait until file is avalably (def)
+HA_EXTRA_WAIT_LOCK=12 Wait until file is available (def)
HA_EXTRA_NO_WAIT_LOCK=13 If file is locked, return quickly
HA_EXTRA_WRITE_CACHE=14 Use write cache in ha_write()
HA_EXTRA_FLUSH_CACHE=15 flush write_record_cache
diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc
index 1f1bb204493..7d2c5f7fdef 100644
--- a/client/mysqlbinlog.cc
+++ b/client/mysqlbinlog.cc
@@ -1788,7 +1788,7 @@ that may lead to an endless loop.",
&opt_binlog_rows_event_max_encoded_size, 0,
GET_ULONG, REQUIRED_ARG, UINT_MAX/4, 256, ULONG_MAX, 0, 256, 0},
#endif
- {"verify-binlog-checksum", 'c', "Verify checksum binlog events.",
+ {"verify-binlog-checksum", 'c', "Verify binlog event checksums.",
(uchar**) &opt_verify_binlog_checksum, (uchar**) &opt_verify_binlog_checksum,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"rewrite-db", OPT_REWRITE_DB,
diff --git a/client/mysqlshow.c b/client/mysqlshow.c
index dfa1eac3673..d4085988342 100644
--- a/client/mysqlshow.c
+++ b/client/mysqlshow.c
@@ -449,7 +449,7 @@ list_dbs(MYSQL *mysql,const char *wild)
MYSQL_RES *tresult = mysql_list_tables(mysql,(char*)NULL);
if (mysql_affected_rows(mysql) > 0)
{
- sprintf(tables,"%6lu",(ulong) mysql_affected_rows(mysql));
+ snprintf(tables, sizeof(tables), "%6lu",(ulong) mysql_affected_rows(mysql));
rowcount = 0;
if (opt_verbose > 1)
{
@@ -470,13 +470,13 @@ list_dbs(MYSQL *mysql,const char *wild)
}
}
}
- sprintf(rows,"%12lu",rowcount);
+ snprintf(rows, sizeof(rows), "%12lu", rowcount);
}
}
else
{
- sprintf(tables,"%6d",0);
- sprintf(rows,"%12d",0);
+ snprintf(tables, sizeof(tables), "%6d" ,0);
+ snprintf(rows, sizeof(rows), "%12d", 0);
}
mysql_free_result(tresult);
}
@@ -594,7 +594,7 @@ list_tables(MYSQL *mysql,const char *db,const char *table)
}
else
{
- sprintf(fields,"%8u",(uint) mysql_num_fields(rresult));
+ snprintf(fields, sizeof(fields), "%8u", (uint) mysql_num_fields(rresult));
mysql_free_result(rresult);
if (opt_verbose > 1)
@@ -610,10 +610,10 @@ list_tables(MYSQL *mysql,const char *db,const char *table)
rowcount += (unsigned long) strtoull(rrow[0], (char**) 0, 10);
mysql_free_result(rresult);
}
- sprintf(rows,"%10lu",rowcount);
+ snprintf(rows, sizeof(rows), "%10lu", rowcount);
}
else
- sprintf(rows,"%10d",0);
+ snprintf(rows, sizeof(rows), "%10d", 0);
}
}
}
diff --git a/config.h.cmake b/config.h.cmake
index 962efeb13ba..10da62abbbf 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -261,9 +261,6 @@
#cmakedefine STRUCT_TIMESPEC_HAS_TV_SEC 1
#cmakedefine STRUCT_TIMESPEC_HAS_TV_NSEC 1
-#define USE_MB 1
-#define USE_MB_IDENT 1
-
/* this means that valgrind headers and macros are available */
#cmakedefine HAVE_VALGRIND_MEMCHECK_H 1
@@ -462,8 +459,8 @@
#cmakedefine MYSQL_DEFAULT_CHARSET_NAME "@MYSQL_DEFAULT_CHARSET_NAME@"
#cmakedefine MYSQL_DEFAULT_COLLATION_NAME "@MYSQL_DEFAULT_COLLATION_NAME@"
-#cmakedefine USE_MB 1
-#cmakedefine USE_MB_IDENT 1
+#cmakedefine USE_MB
+#cmakedefine USE_MB_IDENT
/* This should mean case insensitive file system */
#cmakedefine FN_NO_CASE_SENSE 1
diff --git a/include/my_sys.h b/include/my_sys.h
index 5cabfc25c12..a32a0c09234 100644
--- a/include/my_sys.h
+++ b/include/my_sys.h
@@ -964,6 +964,17 @@ extern ulonglong my_getcputime(void);
#define hrtime_sec_part(X) ((ulong)((X).val % HRTIME_RESOLUTION))
#define my_time(X) hrtime_to_time(my_hrtime_coarse())
+/**
+ Make high resolution time from two parts.
+*/
+
+static inline my_hrtime_t make_hr_time(my_time_t time, ulong time_sec_part)
+{
+ my_hrtime_t res= {((ulonglong) time)*1000000 + time_sec_part};
+ return res;
+}
+
+
#if STACK_DIRECTION < 0
#define available_stack_size(CUR,END) (long) ((char*)(CUR) - (char*)(END))
#else
diff --git a/libmysqld/CMakeLists.txt b/libmysqld/CMakeLists.txt
index 8886d69851b..070ef3af70d 100644
--- a/libmysqld/CMakeLists.txt
+++ b/libmysqld/CMakeLists.txt
@@ -29,15 +29,23 @@ ${SSL_INTERNAL_INCLUDE_DIRS}
)
SET(GEN_SOURCES
-${CMAKE_BINARY_DIR}/sql/sql_yacc.hh
+${CMAKE_BINARY_DIR}/sql/sql_yacc.hh
${CMAKE_BINARY_DIR}/sql/sql_yacc.cc
${CMAKE_BINARY_DIR}/sql/sql_yacc_ora.hh
${CMAKE_BINARY_DIR}/sql/sql_yacc_ora.cc
-${CMAKE_BINARY_DIR}/sql/lex_hash.h
+${CMAKE_BINARY_DIR}/sql/lex_hash.h
)
SET_SOURCE_FILES_PROPERTIES(${GEN_SOURCES} PROPERTIES GENERATED TRUE)
+IF(CMAKE_C_COMPILER_ID MATCHES "Clang" AND
+ NOT CMAKE_C_COMPILER_VERSION VERSION_LESS "13.0.0")
+ ADD_COMPILE_FLAGS(
+ ${CMAKE_BINARY_DIR}/sql/sql_yacc.cc
+ ${CMAKE_BINARY_DIR}/sql/sql_yacc_ora.cc
+ COMPILE_FLAGS "-Wno-unused-but-set-variable")
+ENDIF()
+
SET(SQL_EMBEDDED_SOURCES emb_qcache.cc libmysqld.c lib_sql.cc
libmysql.c ../sql-common/errmsg.c
../sql-common/client.c
diff --git a/mysql-test/include/ipv6.inc b/mysql-test/include/ipv6.inc
index 3d8fdcfbc3c..05c65d7817a 100644
--- a/mysql-test/include/ipv6.inc
+++ b/mysql-test/include/ipv6.inc
@@ -22,4 +22,3 @@ eval SET PASSWORD FOR testuser1@'$IPv6' = PASSWORD ('9876');
--replace_result ::1 localhost
SELECT USER();
eval DROP USER testuser1@'$IPv6';
-
diff --git a/mysql-test/include/master-slave.inc b/mysql-test/include/master-slave.inc
index 9ed206b2c22..5b603fbfdb3 100644
--- a/mysql-test/include/master-slave.inc
+++ b/mysql-test/include/master-slave.inc
@@ -1,3 +1,5 @@
+--source include/no_valgrind_without_big.inc
+
# ==== Purpose ====
#
# Configure two servers to be replication master and slave.
diff --git a/mysql-test/main/analyze_stmt_privileges.result b/mysql-test/main/analyze_stmt_privileges.result
index d54b5b37863..092f577e1bd 100644
--- a/mysql-test/main/analyze_stmt_privileges.result
+++ b/mysql-test/main/analyze_stmt_privileges.result
@@ -11,11 +11,11 @@ CREATE USER u1@localhost;
grant ALL on db.v1 to u1@localhost;
connect con1,localhost,u1,,;
select * from db.t1;
-ERROR 42000: SELECT command denied to user 'u1'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'u1'@'localhost' for table `db`.`t1`
explain select * from db.t1;
-ERROR 42000: SELECT command denied to user 'u1'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'u1'@'localhost' for table `db`.`t1`
analyze select * from db.t1;
-ERROR 42000: SELECT command denied to user 'u1'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'u1'@'localhost' for table `db`.`t1`
select * from db.v1;
i c
2 bar
diff --git a/mysql-test/main/analyze_stmt_privileges2.result b/mysql-test/main/analyze_stmt_privileges2.result
index f269aaf540b..2b75f736a22 100644
--- a/mysql-test/main/analyze_stmt_privileges2.result
+++ b/mysql-test/main/analyze_stmt_privileges2.result
@@ -29,89 +29,89 @@ connection con1;
# because the query itself cannot be executed
#------------------------------------------------------------------------
INSERT INTO t1 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN INSERT INTO t1 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE INSERT INTO t1 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
INSERT INTO t1 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN INSERT INTO t1 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE INSERT INTO t1 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
REPLACE INTO t1 (a) VALUES (10);
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN REPLACE INTO t1 (a) VALUES (10);
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE REPLACE INTO t1 (a) VALUES (10);
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
REPLACE INTO t1 SELECT * FROM t2;
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN REPLACE INTO t1 SELECT * FROM t2;
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE REPLACE INTO t1 SELECT * FROM t2;
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
UPDATE t1 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN UPDATE t1 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE UPDATE t1 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
UPDATE t1 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN UPDATE t1 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE UPDATE t1 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
UPDATE t1, t2 SET t1.a = t1.a + 1 WHERE t1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN UPDATE t1, t2 SET t1.a = t1.a + 1 WHERE t1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE UPDATE t1, t2 SET t1.a = t1.a + 1 WHERE t1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
DELETE FROM t1;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN DELETE FROM t1;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE DELETE FROM t1;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
DELETE FROM t1 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN DELETE FROM t1 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE DELETE FROM t1 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
DELETE FROM t1 USING t1, t2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN DELETE FROM t1 USING t1, t2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE DELETE FROM t1 USING t1, t2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
DELETE FROM t1 USING t1, t2 WHERE t1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN DELETE FROM t1 USING t1, t2 WHERE t1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE DELETE FROM t1 USING t1, t2 WHERE t1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
SELECT * FROM t1;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN SELECT * FROM t1;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE SELECT * FROM t1;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
SELECT * FROM t1 WHERE a = 10;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN SELECT * FROM t1 WHERE a = 10;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE SELECT * FROM t1 WHERE a = 10;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
SELECT * FROM t1 WHERE a IN ( SELECT a FROM t2 );
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN SELECT * FROM t1 WHERE a IN ( SELECT a FROM t2 );
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE SELECT * FROM t1 WHERE a IN ( SELECT a FROM t2 );
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
#------------------------------------------------------------------------
# I/R/U/D/S on the inner view
# Expectation: Can run the queries, but not EXPLAIN or ANALYZE
@@ -283,71 +283,71 @@ connection con1;
# Expectation: Can only run SELECT, EXPLAIN SELECT, ANALYZE SELECT
#------------------------------------------------------------------------
INSERT INTO t1 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN INSERT INTO t1 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE INSERT INTO t1 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
INSERT INTO t1 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN INSERT INTO t1 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE INSERT INTO t1 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
REPLACE INTO t1 (a) VALUES (10);
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN REPLACE INTO t1 (a) VALUES (10);
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE REPLACE INTO t1 (a) VALUES (10);
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
REPLACE INTO t1 SELECT * FROM t2;
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN REPLACE INTO t1 SELECT * FROM t2;
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE REPLACE INTO t1 SELECT * FROM t2;
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
UPDATE t1 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN UPDATE t1 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE UPDATE t1 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
UPDATE t1 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN UPDATE t1 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE UPDATE t1 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
UPDATE t1, t2 SET t1.a = t1.a + 1 WHERE t1.a = t2.a;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN UPDATE t1, t2 SET t1.a = t1.a + 1 WHERE t1.a = t2.a;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE UPDATE t1, t2 SET t1.a = t1.a + 1 WHERE t1.a = t2.a;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
DELETE FROM t1;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN DELETE FROM t1;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE DELETE FROM t1;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
DELETE FROM t1 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN DELETE FROM t1 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE DELETE FROM t1 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
DELETE FROM t1 USING t1, t2;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN DELETE FROM t1 USING t1, t2;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE DELETE FROM t1 USING t1, t2;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
DELETE FROM t1 USING t1, t2 WHERE t1.a = t2.a;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN DELETE FROM t1 USING t1, t2 WHERE t1.a = t2.a;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE DELETE FROM t1 USING t1, t2 WHERE t1.a = t2.a;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
SELECT * FROM t1;
a b
10 NULL
@@ -634,77 +634,77 @@ ANALYZE INSERT INTO t1 SELECT * FROM t2;
id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 3 3.00 100.00 100.00
REPLACE INTO t1 (a) VALUES (10);
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN REPLACE INTO t1 (a) VALUES (10);
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE REPLACE INTO t1 (a) VALUES (10);
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
REPLACE INTO t1 SELECT * FROM t2;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN REPLACE INTO t1 SELECT * FROM t2;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE REPLACE INTO t1 SELECT * FROM t2;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
UPDATE t1 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN UPDATE t1 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE UPDATE t1 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
UPDATE t1 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN UPDATE t1 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE UPDATE t1 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
UPDATE t1, t2 SET t1.a = t1.a + 1 WHERE t1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN UPDATE t1, t2 SET t1.a = t1.a + 1 WHERE t1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE UPDATE t1, t2 SET t1.a = t1.a + 1 WHERE t1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
DELETE FROM t1;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN DELETE FROM t1;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE DELETE FROM t1;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
DELETE FROM t1 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN DELETE FROM t1 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE DELETE FROM t1 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
DELETE FROM t1 USING t1, t2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN DELETE FROM t1 USING t1, t2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE DELETE FROM t1 USING t1, t2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
DELETE FROM t1 USING t1, t2 WHERE t1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN DELETE FROM t1 USING t1, t2 WHERE t1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE DELETE FROM t1 USING t1, t2 WHERE t1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
SELECT * FROM t1;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN SELECT * FROM t1;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE SELECT * FROM t1;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
SELECT * FROM t1 WHERE a = 10;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN SELECT * FROM t1 WHERE a = 10;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE SELECT * FROM t1 WHERE a = 10;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
SELECT * FROM t1 WHERE a IN ( SELECT a FROM t2 );
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN SELECT * FROM t1 WHERE a IN ( SELECT a FROM t2 );
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE SELECT * FROM t1 WHERE a IN ( SELECT a FROM t2 );
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
#------------------------------------------------------------------------
# I/R/U/D/S on the inner view
# Expectation: Can run the queries, but not EXPLAIN or ANALYZE
@@ -879,29 +879,29 @@ connection con1;
# read columns fail with ER_COLUMNACCESS_DENIED_ERROR
#------------------------------------------------------------------------
INSERT INTO t1 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN INSERT INTO t1 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE INSERT INTO t1 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE INSERT INTO t1 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE INSERT INTO t1 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE INSERT INTO t1 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
REPLACE INTO t1 (a) VALUES (10);
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN REPLACE INTO t1 (a) VALUES (10);
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE REPLACE INTO t1 (a) VALUES (10);
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
REPLACE INTO t1 SELECT * FROM t2;
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN REPLACE INTO t1 SELECT * FROM t2;
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE REPLACE INTO t1 SELECT * FROM t2;
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
UPDATE t1 SET a = 10;
EXPLAIN UPDATE t1 SET a = 10;
id select_type table type possible_keys key key_len ref rows Extra
@@ -922,47 +922,47 @@ ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for column 'a'
ANALYZE UPDATE t1, t2 SET t1.a = t1.a + 1 WHERE t1.a = t2.a;
ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for column 'a' in table 't1'
DELETE FROM t1;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN DELETE FROM t1;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE DELETE FROM t1;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
DELETE FROM t1 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN DELETE FROM t1 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE DELETE FROM t1 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
DELETE FROM t1 USING t1, t2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN DELETE FROM t1 USING t1, t2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE DELETE FROM t1 USING t1, t2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
DELETE FROM t1 USING t1, t2 WHERE t1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN DELETE FROM t1 USING t1, t2 WHERE t1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE DELETE FROM t1 USING t1, t2 WHERE t1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
SELECT * FROM t1;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN SELECT * FROM t1;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE SELECT * FROM t1;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
SELECT * FROM t1 WHERE a = 10;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN SELECT * FROM t1 WHERE a = 10;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE SELECT * FROM t1 WHERE a = 10;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
SELECT * FROM t1 WHERE a IN ( SELECT a FROM t2 );
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN SELECT * FROM t1 WHERE a IN ( SELECT a FROM t2 );
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE SELECT * FROM t1 WHERE a IN ( SELECT a FROM t2 );
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
#------------------------------------------------------------------------
# I/R/U/D/S on the inner view
# Expectation: Can run the queries, but not EXPLAIN or ANALYZE
@@ -1138,47 +1138,47 @@ connection con1;
#------------------------------------------------------------------------
# Note: ANALYZE DELETE FROM t1 USING t1, t2 ... fails due to MDEV-7043
INSERT INTO t1 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN INSERT INTO t1 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE INSERT INTO t1 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
INSERT INTO t1 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN INSERT INTO t1 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE INSERT INTO t1 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
REPLACE INTO t1 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN REPLACE INTO t1 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE REPLACE INTO t1 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
REPLACE INTO t1 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN REPLACE INTO t1 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE REPLACE INTO t1 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
UPDATE t1 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN UPDATE t1 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE UPDATE t1 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
UPDATE t1 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN UPDATE t1 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE UPDATE t1 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
UPDATE t1, t2 SET t1.a = t1.a + 1 WHERE t1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN UPDATE t1, t2 SET t1.a = t1.a + 1 WHERE t1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE UPDATE t1, t2 SET t1.a = t1.a + 1 WHERE t1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
DELETE FROM t1;
EXPLAIN DELETE FROM t1;
id select_type table type possible_keys key key_len ref rows Extra
@@ -1193,35 +1193,35 @@ ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for column 'a'
ANALYZE DELETE FROM t1 WHERE a = 10;
ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for column 'a' in table 't1'
DELETE FROM t1 USING t1, t2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN DELETE FROM t1 USING t1, t2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE DELETE FROM t1 USING t1, t2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
DELETE FROM t1 USING t1, t2 WHERE t1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN DELETE FROM t1 USING t1, t2 WHERE t1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE DELETE FROM t1 USING t1, t2 WHERE t1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
SELECT * FROM t1;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN SELECT * FROM t1;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE SELECT * FROM t1;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
SELECT * FROM t1 WHERE a = 10;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN SELECT * FROM t1 WHERE a = 10;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE SELECT * FROM t1 WHERE a = 10;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
SELECT * FROM t1 WHERE a IN ( SELECT a FROM t2 );
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN SELECT * FROM t1 WHERE a IN ( SELECT a FROM t2 );
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE SELECT * FROM t1 WHERE a IN ( SELECT a FROM t2 );
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
#------------------------------------------------------------------------
# I/R/U/D/S on the inner view
# Expectation: Can run the queries, but not EXPLAIN or ANALYZE
@@ -1394,47 +1394,47 @@ connection con1;
# Expectation: Can run DELETE, EXPLAIN DELETE, ANALYZE DELETE
#------------------------------------------------------------------------
INSERT INTO t1 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN INSERT INTO t1 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE INSERT INTO t1 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
INSERT INTO t1 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN INSERT INTO t1 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE INSERT INTO t1 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
REPLACE INTO t1 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN REPLACE INTO t1 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE REPLACE INTO t1 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
REPLACE INTO t1 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN REPLACE INTO t1 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE REPLACE INTO t1 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
UPDATE t1 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN UPDATE t1 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE UPDATE t1 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
UPDATE t1 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN UPDATE t1 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE UPDATE t1 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
UPDATE t1, t2 SET t1.a = t1.a + 1 WHERE t1.a = t2.a;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN UPDATE t1, t2 SET t1.a = t1.a + 1 WHERE t1.a = t2.a;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE UPDATE t1, t2 SET t1.a = t1.a + 1 WHERE t1.a = t2.a;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
DELETE FROM t1;
EXPLAIN DELETE FROM t1;
id select_type table type possible_keys key key_len ref rows Extra
@@ -1465,23 +1465,23 @@ ANALYZE DELETE FROM t1 USING t1, t2 WHERE t1.a = t2.a;
id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL no matching row in const table
SELECT * FROM t1;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN SELECT * FROM t1;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE SELECT * FROM t1;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
SELECT * FROM t1 WHERE a = 10;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN SELECT * FROM t1 WHERE a = 10;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE SELECT * FROM t1 WHERE a = 10;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
SELECT * FROM t1 WHERE a IN ( SELECT a FROM t2 );
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN SELECT * FROM t1 WHERE a IN ( SELECT a FROM t2 );
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
ANALYZE SELECT * FROM t1 WHERE a IN ( SELECT a FROM t2 );
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
#------------------------------------------------------------------------
# I/R/U/D/S on the inner view
# Expectation: Can run everything: SELECT access to the column `a`
@@ -2077,89 +2077,89 @@ connection con1;
# Expectation: Cannot run anything
#------------------------------------------------------------------------
INSERT INTO v1 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN INSERT INTO v1 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE INSERT INTO v1 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
INSERT INTO v1 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN INSERT INTO v1 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE INSERT INTO v1 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
REPLACE INTO v1 (a) VALUES (10);
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN REPLACE INTO v1 (a) VALUES (10);
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE REPLACE INTO v1 (a) VALUES (10);
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
REPLACE INTO v1 SELECT * FROM t2;
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN REPLACE INTO v1 SELECT * FROM t2;
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE REPLACE INTO v1 SELECT * FROM t2;
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
UPDATE v1 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN UPDATE v1 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE UPDATE v1 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
UPDATE v1 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN UPDATE v1 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE UPDATE v1 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
UPDATE v1, t2 SET v1.a = v1.a + 1 WHERE v1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN UPDATE v1, t2 SET v1.a = v1.a + 1 WHERE v1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE UPDATE v1, t2 SET v1.a = v1.a + 1 WHERE v1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
DELETE FROM v1;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN DELETE FROM v1;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE DELETE FROM v1;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
DELETE FROM v1 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN DELETE FROM v1 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE DELETE FROM v1 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
DELETE FROM v1 USING v1, t2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN DELETE FROM v1 USING v1, t2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE DELETE FROM v1 USING v1, t2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
DELETE FROM v1 USING v1, t2 WHERE v1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN DELETE FROM v1 USING v1, t2 WHERE v1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE DELETE FROM v1 USING v1, t2 WHERE v1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
SELECT * FROM v1;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN SELECT * FROM v1;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE SELECT * FROM v1;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
SELECT * FROM v1 WHERE a = 10;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN SELECT * FROM v1 WHERE a = 10;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE SELECT * FROM v1 WHERE a = 10;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
SELECT * FROM v1 WHERE a IN ( SELECT a FROM t2 );
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN SELECT * FROM v1 WHERE a IN ( SELECT a FROM t2 );
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE SELECT * FROM v1 WHERE a IN ( SELECT a FROM t2 );
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
#------------------------------------------------------------------------
# I/R/U/D/S on the outer view
# Expectation: Can run the queries, but not EXPLAIN or ANALYZE
@@ -2252,89 +2252,89 @@ connection con1;
# Expectation: Cannot run anything
#------------------------------------------------------------------------
INSERT INTO v1 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN INSERT INTO v1 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE INSERT INTO v1 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
INSERT INTO v1 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN INSERT INTO v1 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE INSERT INTO v1 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
REPLACE INTO v1 (a) VALUES (10);
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN REPLACE INTO v1 (a) VALUES (10);
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE REPLACE INTO v1 (a) VALUES (10);
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
REPLACE INTO v1 SELECT * FROM t2;
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN REPLACE INTO v1 SELECT * FROM t2;
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE REPLACE INTO v1 SELECT * FROM t2;
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
UPDATE v1 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN UPDATE v1 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE UPDATE v1 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
UPDATE v1 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN UPDATE v1 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE UPDATE v1 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
UPDATE v1, t2 SET v1.a = v1.a + 1 WHERE v1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN UPDATE v1, t2 SET v1.a = v1.a + 1 WHERE v1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE UPDATE v1, t2 SET v1.a = v1.a + 1 WHERE v1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
DELETE FROM v1;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN DELETE FROM v1;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE DELETE FROM v1;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
DELETE FROM v1 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN DELETE FROM v1 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE DELETE FROM v1 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
DELETE FROM v1 USING v1, t2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN DELETE FROM v1 USING v1, t2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE DELETE FROM v1 USING v1, t2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
DELETE FROM v1 USING v1, t2 WHERE v1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN DELETE FROM v1 USING v1, t2 WHERE v1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE DELETE FROM v1 USING v1, t2 WHERE v1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
SELECT * FROM v1;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN SELECT * FROM v1;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE SELECT * FROM v1;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
SELECT * FROM v1 WHERE a = 10;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN SELECT * FROM v1 WHERE a = 10;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE SELECT * FROM v1 WHERE a = 10;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
SELECT * FROM v1 WHERE a IN ( SELECT a FROM t2 );
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN SELECT * FROM v1 WHERE a IN ( SELECT a FROM t2 );
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE SELECT * FROM v1 WHERE a IN ( SELECT a FROM t2 );
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
#------------------------------------------------------------------------
# I/R/U/D/S on the outer view
# Expectation: Can run the queries, but not EXPLAIN or ANALYZE
@@ -2430,71 +2430,71 @@ connection con1;
# (it could have revealed the structure of the view)
#------------------------------------------------------------------------
INSERT INTO v1 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN INSERT INTO v1 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE INSERT INTO v1 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
INSERT INTO v1 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN INSERT INTO v1 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE INSERT INTO v1 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
REPLACE INTO v1 (a) VALUES (10);
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN REPLACE INTO v1 (a) VALUES (10);
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE REPLACE INTO v1 (a) VALUES (10);
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
REPLACE INTO v1 SELECT * FROM t2;
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN REPLACE INTO v1 SELECT * FROM t2;
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE REPLACE INTO v1 SELECT * FROM t2;
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
UPDATE v1 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN UPDATE v1 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE UPDATE v1 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
UPDATE v1 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN UPDATE v1 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE UPDATE v1 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
UPDATE v1, t2 SET v1.a = v1.a + 1 WHERE v1.a = t2.a;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN UPDATE v1, t2 SET v1.a = v1.a + 1 WHERE v1.a = t2.a;
ERROR HY000: ANALYZE/EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
ANALYZE UPDATE v1, t2 SET v1.a = v1.a + 1 WHERE v1.a = t2.a;
ERROR HY000: ANALYZE/EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
DELETE FROM v1;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN DELETE FROM v1;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE DELETE FROM v1;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
DELETE FROM v1 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN DELETE FROM v1 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE DELETE FROM v1 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
DELETE FROM v1 USING v1, t2;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN DELETE FROM v1 USING v1, t2;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE DELETE FROM v1 USING v1, t2;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
DELETE FROM v1 USING v1, t2 WHERE v1.a = t2.a;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN DELETE FROM v1 USING v1, t2 WHERE v1.a = t2.a;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE DELETE FROM v1 USING v1, t2 WHERE v1.a = t2.a;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
SELECT * FROM v1;
a b
EXPLAIN SELECT * FROM v1;
@@ -2612,71 +2612,71 @@ connection con1;
# Expectation: Can run SELECT, EXPLAIN SELECT, ANALYZE SELECT
#------------------------------------------------------------------------
INSERT INTO v1 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN INSERT INTO v1 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE INSERT INTO v1 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
INSERT INTO v1 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN INSERT INTO v1 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE INSERT INTO v1 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
REPLACE INTO v1 (a) VALUES (10);
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN REPLACE INTO v1 (a) VALUES (10);
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE REPLACE INTO v1 (a) VALUES (10);
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
REPLACE INTO v1 SELECT * FROM t2;
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN REPLACE INTO v1 SELECT * FROM t2;
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE REPLACE INTO v1 SELECT * FROM t2;
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
UPDATE v1 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN UPDATE v1 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE UPDATE v1 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
UPDATE v1 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN UPDATE v1 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE UPDATE v1 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
UPDATE v1, t2 SET v1.a = v1.a + 1 WHERE v1.a = t2.a;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN UPDATE v1, t2 SET v1.a = v1.a + 1 WHERE v1.a = t2.a;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE UPDATE v1, t2 SET v1.a = v1.a + 1 WHERE v1.a = t2.a;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
DELETE FROM v1;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN DELETE FROM v1;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE DELETE FROM v1;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
DELETE FROM v1 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN DELETE FROM v1 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE DELETE FROM v1 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
DELETE FROM v1 USING v1, t2;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN DELETE FROM v1 USING v1, t2;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE DELETE FROM v1 USING v1, t2;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
DELETE FROM v1 USING v1, t2 WHERE v1.a = t2.a;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN DELETE FROM v1 USING v1, t2 WHERE v1.a = t2.a;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE DELETE FROM v1 USING v1, t2 WHERE v1.a = t2.a;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
SELECT * FROM v1;
a b
EXPLAIN SELECT * FROM v1;
@@ -2838,77 +2838,77 @@ ERROR HY000: ANALYZE/EXPLAIN/SHOW can not be issued; lacking privileges for unde
ANALYZE INSERT INTO v1 SELECT * FROM t2;
ERROR HY000: ANALYZE/EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
REPLACE INTO v1 (a) VALUES (10);
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN REPLACE INTO v1 (a) VALUES (10);
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE REPLACE INTO v1 (a) VALUES (10);
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
REPLACE INTO v1 SELECT * FROM t2;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN REPLACE INTO v1 SELECT * FROM t2;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE REPLACE INTO v1 SELECT * FROM t2;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
UPDATE v1 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN UPDATE v1 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE UPDATE v1 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
UPDATE v1 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN UPDATE v1 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE UPDATE v1 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
UPDATE v1, t2 SET v1.a = v1.a + 1 WHERE v1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN UPDATE v1, t2 SET v1.a = v1.a + 1 WHERE v1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE UPDATE v1, t2 SET v1.a = v1.a + 1 WHERE v1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
DELETE FROM v1;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN DELETE FROM v1;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE DELETE FROM v1;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
DELETE FROM v1 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN DELETE FROM v1 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE DELETE FROM v1 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
DELETE FROM v1 USING v1, t2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN DELETE FROM v1 USING v1, t2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE DELETE FROM v1 USING v1, t2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
DELETE FROM v1 USING v1, t2 WHERE v1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN DELETE FROM v1 USING v1, t2 WHERE v1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE DELETE FROM v1 USING v1, t2 WHERE v1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
SELECT * FROM v1;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN SELECT * FROM v1;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE SELECT * FROM v1;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
SELECT * FROM v1 WHERE a = 10;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN SELECT * FROM v1 WHERE a = 10;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE SELECT * FROM v1 WHERE a = 10;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
SELECT * FROM v1 WHERE a IN ( SELECT a FROM t2 );
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN SELECT * FROM v1 WHERE a IN ( SELECT a FROM t2 );
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE SELECT * FROM v1 WHERE a IN ( SELECT a FROM t2 );
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
#------------------------------------------------------------------------
# I/R/U/D/S on the outer view
# Expectation: Can run the queries, but not EXPLAIN or ANALYZE
@@ -3005,29 +3005,29 @@ connection con1;
# (it could have revealed the structure of the view).
#------------------------------------------------------------------------
INSERT INTO v1 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN INSERT INTO v1 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE INSERT INTO v1 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
INSERT INTO v1 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN INSERT INTO v1 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE INSERT INTO v1 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
REPLACE INTO v1 (a) VALUES (10);
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN REPLACE INTO v1 (a) VALUES (10);
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE REPLACE INTO v1 (a) VALUES (10);
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
REPLACE INTO v1 SELECT * FROM t2;
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN REPLACE INTO v1 SELECT * FROM t2;
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE REPLACE INTO v1 SELECT * FROM t2;
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
UPDATE v1 SET a = 10;
EXPLAIN UPDATE v1 SET a = 10;
ERROR HY000: ANALYZE/EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
@@ -3045,47 +3045,47 @@ ERROR HY000: ANALYZE/EXPLAIN/SHOW can not be issued; lacking privileges for unde
ANALYZE UPDATE v1, t2 SET v1.a = v1.a + 1 WHERE v1.a = t2.a;
ERROR HY000: ANALYZE/EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
DELETE FROM v1;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN DELETE FROM v1;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE DELETE FROM v1;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
DELETE FROM v1 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN DELETE FROM v1 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE DELETE FROM v1 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
DELETE FROM v1 USING v1, t2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN DELETE FROM v1 USING v1, t2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE DELETE FROM v1 USING v1, t2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
DELETE FROM v1 USING v1, t2 WHERE v1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN DELETE FROM v1 USING v1, t2 WHERE v1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE DELETE FROM v1 USING v1, t2 WHERE v1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
SELECT * FROM v1;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN SELECT * FROM v1;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE SELECT * FROM v1;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
SELECT * FROM v1 WHERE a = 10;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN SELECT * FROM v1 WHERE a = 10;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE SELECT * FROM v1 WHERE a = 10;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
SELECT * FROM v1 WHERE a IN ( SELECT a FROM t2 );
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN SELECT * FROM v1 WHERE a IN ( SELECT a FROM t2 );
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE SELECT * FROM v1 WHERE a IN ( SELECT a FROM t2 );
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
#------------------------------------------------------------------------
# I/R/U/D/S on the outer view
# Expectation: Can run the queries, but not EXPLAIN or ANALYZE
@@ -3181,29 +3181,29 @@ connection con1;
# (it could have revealed the structure of the view)
#------------------------------------------------------------------------
INSERT INTO v1 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN INSERT INTO v1 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE INSERT INTO v1 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
INSERT INTO v1 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN INSERT INTO v1 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE INSERT INTO v1 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
REPLACE INTO v1 (a) VALUES (10);
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN REPLACE INTO v1 (a) VALUES (10);
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE REPLACE INTO v1 (a) VALUES (10);
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
REPLACE INTO v1 SELECT * FROM t2;
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN REPLACE INTO v1 SELECT * FROM t2;
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE REPLACE INTO v1 SELECT * FROM t2;
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
UPDATE v1 SET a = 10;
EXPLAIN UPDATE v1 SET a = 10;
ERROR HY000: ANALYZE/EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
@@ -3220,43 +3220,43 @@ ERROR HY000: ANALYZE/EXPLAIN/SHOW can not be issued; lacking privileges for unde
ANALYZE UPDATE v1, t2 SET v1.a = v1.a + 1 WHERE v1.a = t2.a;
ERROR HY000: ANALYZE/EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
DELETE FROM v1;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN DELETE FROM v1;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE DELETE FROM v1;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
DELETE FROM v1 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN DELETE FROM v1 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE DELETE FROM v1 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
DELETE FROM v1 USING v1, t2;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN DELETE FROM v1 USING v1, t2;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE DELETE FROM v1 USING v1, t2;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
DELETE FROM v1 USING v1, t2 WHERE v1.a = t2.a;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN DELETE FROM v1 USING v1, t2 WHERE v1.a = t2.a;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE DELETE FROM v1 USING v1, t2 WHERE v1.a = t2.a;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
SELECT * FROM v1;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN SELECT * FROM v1;
ERROR HY000: ANALYZE/EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
ANALYZE SELECT * FROM v1;
ERROR HY000: ANALYZE/EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
SELECT * FROM v1 WHERE a = 10;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN SELECT * FROM v1 WHERE a = 10;
ERROR HY000: ANALYZE/EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
ANALYZE SELECT * FROM v1 WHERE a = 10;
ERROR HY000: ANALYZE/EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
SELECT * FROM v1 WHERE a IN ( SELECT a FROM t2 );
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN SELECT * FROM v1 WHERE a IN ( SELECT a FROM t2 );
ERROR HY000: ANALYZE/EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
ANALYZE SELECT * FROM v1 WHERE a IN ( SELECT a FROM t2 );
@@ -3356,29 +3356,29 @@ connection con1;
# (it could have revealed the structure of the view)
#------------------------------------------------------------------------
INSERT INTO v1 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN INSERT INTO v1 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE INSERT INTO v1 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
INSERT INTO v1 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN INSERT INTO v1 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE INSERT INTO v1 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
REPLACE INTO v1 (a) VALUES (10);
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN REPLACE INTO v1 (a) VALUES (10);
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE REPLACE INTO v1 (a) VALUES (10);
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
REPLACE INTO v1 SELECT * FROM t2;
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN REPLACE INTO v1 SELECT * FROM t2;
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE REPLACE INTO v1 SELECT * FROM t2;
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
UPDATE v1 SET a = 10;
EXPLAIN UPDATE v1 SET a = 10;
ERROR HY000: ANALYZE/EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
@@ -3395,29 +3395,29 @@ ERROR HY000: ANALYZE/EXPLAIN/SHOW can not be issued; lacking privileges for unde
ANALYZE UPDATE v1, t2 SET v1.a = v1.a + 1 WHERE v1.a = t2.a;
ERROR HY000: ANALYZE/EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
DELETE FROM v1;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN DELETE FROM v1;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE DELETE FROM v1;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
DELETE FROM v1 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN DELETE FROM v1 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE DELETE FROM v1 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
DELETE FROM v1 USING v1, t2;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN DELETE FROM v1 USING v1, t2;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE DELETE FROM v1 USING v1, t2;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
DELETE FROM v1 USING v1, t2 WHERE v1.a = t2.a;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN DELETE FROM v1 USING v1, t2 WHERE v1.a = t2.a;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE DELETE FROM v1 USING v1, t2 WHERE v1.a = t2.a;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
SELECT * FROM v1;
a b
EXPLAIN SELECT * FROM v1;
@@ -3532,47 +3532,47 @@ connection con1;
# (it could have revealed the structure of the view)
#------------------------------------------------------------------------
INSERT INTO v1 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN INSERT INTO v1 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE INSERT INTO v1 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
INSERT INTO v1 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN INSERT INTO v1 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE INSERT INTO v1 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
REPLACE INTO v1 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN REPLACE INTO v1 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE REPLACE INTO v1 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
REPLACE INTO v1 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN REPLACE INTO v1 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE REPLACE INTO v1 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
UPDATE v1 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN UPDATE v1 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE UPDATE v1 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
UPDATE v1 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN UPDATE v1 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE UPDATE v1 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
UPDATE v1, t2 SET v1.a = v1.a + 1 WHERE v1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN UPDATE v1, t2 SET v1.a = v1.a + 1 WHERE v1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE UPDATE v1, t2 SET v1.a = v1.a + 1 WHERE v1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
DELETE FROM v1;
EXPLAIN DELETE FROM v1;
ERROR HY000: ANALYZE/EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
@@ -3585,35 +3585,35 @@ ERROR HY000: ANALYZE/EXPLAIN/SHOW can not be issued; lacking privileges for unde
ANALYZE DELETE FROM v1 WHERE a = 10;
ERROR HY000: ANALYZE/EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
DELETE FROM v1 USING v1, t2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN DELETE FROM v1 USING v1, t2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE DELETE FROM v1 USING v1, t2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
DELETE FROM v1 USING v1, t2 WHERE v1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN DELETE FROM v1 USING v1, t2 WHERE v1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE DELETE FROM v1 USING v1, t2 WHERE v1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
SELECT * FROM v1;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN SELECT * FROM v1;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE SELECT * FROM v1;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
SELECT * FROM v1 WHERE a = 10;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN SELECT * FROM v1 WHERE a = 10;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE SELECT * FROM v1 WHERE a = 10;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
SELECT * FROM v1 WHERE a IN ( SELECT a FROM t2 );
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN SELECT * FROM v1 WHERE a IN ( SELECT a FROM t2 );
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE SELECT * FROM v1 WHERE a IN ( SELECT a FROM t2 );
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
#------------------------------------------------------------------------
# I/R/U/D/S on the outer view
# Expectation: Can run the queries, but not EXPLAIN or ANALYZE
@@ -3708,47 +3708,47 @@ connection con1;
# which don't read any columns
#------------------------------------------------------------------------
INSERT INTO v1 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN INSERT INTO v1 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE INSERT INTO v1 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
INSERT INTO v1 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN INSERT INTO v1 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE INSERT INTO v1 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
REPLACE INTO v1 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN REPLACE INTO v1 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE REPLACE INTO v1 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
REPLACE INTO v1 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN REPLACE INTO v1 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE REPLACE INTO v1 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
UPDATE v1 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN UPDATE v1 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE UPDATE v1 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
UPDATE v1 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN UPDATE v1 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE UPDATE v1 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
UPDATE v1, t2 SET v1.a = v1.a + 1 WHERE v1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN UPDATE v1, t2 SET v1.a = v1.a + 1 WHERE v1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE UPDATE v1, t2 SET v1.a = v1.a + 1 WHERE v1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
DELETE FROM v1;
EXPLAIN DELETE FROM v1;
id select_type table type possible_keys key key_len ref rows Extra
@@ -3763,35 +3763,35 @@ ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for column 'a'
ANALYZE DELETE FROM v1 WHERE a = 10;
ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for column 'a' in table 'v1'
DELETE FROM v1 USING v1, t2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN DELETE FROM v1 USING v1, t2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE DELETE FROM v1 USING v1, t2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN DELETE FROM v1 USING v1, t2 WHERE v1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN DELETE FROM v1 USING v1, t2 WHERE v1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE DELETE FROM v1 USING v1, t2 WHERE v1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
SELECT * FROM v1;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN SELECT * FROM v1;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE SELECT * FROM v1;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
SELECT * FROM v1 WHERE a = 10;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN SELECT * FROM v1 WHERE a = 10;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE SELECT * FROM v1 WHERE a = 10;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
SELECT * FROM v1 WHERE a IN ( SELECT a FROM t2 );
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
EXPLAIN SELECT * FROM v1 WHERE a IN ( SELECT a FROM t2 );
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
ANALYZE SELECT * FROM v1 WHERE a IN ( SELECT a FROM t2 );
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v1`
#------------------------------------------------------------------------
# I/R/U/D/S on the outer view
# Expectation: Can run the queries, but not EXPLAIN or ANALYZE
@@ -4123,89 +4123,89 @@ connection con1;
# Expectation: Cannot run anything
#------------------------------------------------------------------------
INSERT INTO v2 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN INSERT INTO v2 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE INSERT INTO v2 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
INSERT INTO v2 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN INSERT INTO v2 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE INSERT INTO v2 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
REPLACE INTO v2 (a) VALUES (10);
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN REPLACE INTO v2 (a) VALUES (10);
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE REPLACE INTO v2 (a) VALUES (10);
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
REPLACE INTO v2 SELECT * FROM t2;
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN REPLACE INTO v2 SELECT * FROM t2;
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE REPLACE INTO v2 SELECT * FROM t2;
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
UPDATE v2 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN UPDATE v2 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE UPDATE v2 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
UPDATE v2 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN UPDATE v2 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE UPDATE v2 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
UPDATE v2, t2 SET v2.a = v2.a + 1 WHERE v2.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN UPDATE v2, t2 SET v2.a = v2.a + 1 WHERE v2.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE UPDATE v2, t2 SET v2.a = v2.a + 1 WHERE v2.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
DELETE FROM v2;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN DELETE FROM v2;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE DELETE FROM v2;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
DELETE FROM v2 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN DELETE FROM v2 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE DELETE FROM v2 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
DELETE FROM v2 USING v2, t2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN DELETE FROM v2 USING v2, t2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE DELETE FROM v2 USING v2, t2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
DELETE FROM v2 USING v2, t2 WHERE v2.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN DELETE FROM v2 USING v2, t2 WHERE v2.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE DELETE FROM v2 USING v2, t2 WHERE v2.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
SELECT * FROM v2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN SELECT * FROM v2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE SELECT * FROM v2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
SELECT * FROM v2 WHERE a = 10;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN SELECT * FROM v2 WHERE a = 10;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE SELECT * FROM v2 WHERE a = 10;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
SELECT * FROM v2 WHERE a IN ( SELECT a FROM t2 );
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN SELECT * FROM v2 WHERE a IN ( SELECT a FROM t2 );
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE SELECT * FROM v2 WHERE a IN ( SELECT a FROM t2 );
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
#========================================================================
# Test: Grant SHOW VIEW on the outer view
@@ -4219,89 +4219,89 @@ connection con1;
# Expectation: Cannot run anything
#------------------------------------------------------------------------
INSERT INTO v2 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN INSERT INTO v2 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE INSERT INTO v2 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
INSERT INTO v2 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN INSERT INTO v2 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE INSERT INTO v2 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
REPLACE INTO v2 (a) VALUES (10);
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN REPLACE INTO v2 (a) VALUES (10);
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE REPLACE INTO v2 (a) VALUES (10);
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
REPLACE INTO v2 SELECT * FROM t2;
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN REPLACE INTO v2 SELECT * FROM t2;
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE REPLACE INTO v2 SELECT * FROM t2;
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
UPDATE v2 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN UPDATE v2 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE UPDATE v2 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
UPDATE v2 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN UPDATE v2 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE UPDATE v2 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
UPDATE v2, t2 SET v2.a = v2.a + 1 WHERE v2.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN UPDATE v2, t2 SET v2.a = v2.a + 1 WHERE v2.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE UPDATE v2, t2 SET v2.a = v2.a + 1 WHERE v2.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
DELETE FROM v2;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN DELETE FROM v2;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE DELETE FROM v2;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
DELETE FROM v2 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN DELETE FROM v2 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE DELETE FROM v2 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
DELETE FROM v2 USING v2, t2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN DELETE FROM v2 USING v2, t2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE DELETE FROM v2 USING v2, t2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
DELETE FROM v2 USING v2, t2 WHERE v2.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN DELETE FROM v2 USING v2, t2 WHERE v2.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE DELETE FROM v2 USING v2, t2 WHERE v2.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
SELECT * FROM v2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN SELECT * FROM v2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE SELECT * FROM v2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
SELECT * FROM v2 WHERE a = 10;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN SELECT * FROM v2 WHERE a = 10;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE SELECT * FROM v2 WHERE a = 10;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
SELECT * FROM v2 WHERE a IN ( SELECT a FROM t2 );
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN SELECT * FROM v2 WHERE a IN ( SELECT a FROM t2 );
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE SELECT * FROM v2 WHERE a IN ( SELECT a FROM t2 );
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
#========================================================================
# Test: Grant SHOW VIEW, SELECT(a) on the outer view
@@ -4317,71 +4317,71 @@ connection con1;
# when only `a` column is involved
#------------------------------------------------------------------------
INSERT INTO v2 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN INSERT INTO v2 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE INSERT INTO v2 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
INSERT INTO v2 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN INSERT INTO v2 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE INSERT INTO v2 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
REPLACE INTO v2 (a) VALUES (10);
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN REPLACE INTO v2 (a) VALUES (10);
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE REPLACE INTO v2 (a) VALUES (10);
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
REPLACE INTO v2 SELECT * FROM t2;
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN REPLACE INTO v2 SELECT * FROM t2;
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE REPLACE INTO v2 SELECT * FROM t2;
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
UPDATE v2 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN UPDATE v2 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE UPDATE v2 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
UPDATE v2 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN UPDATE v2 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE UPDATE v2 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
UPDATE v2, t2 SET v2.a = v2.a + 1 WHERE v2.a = t2.a;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN UPDATE v2, t2 SET v2.a = v2.a + 1 WHERE v2.a = t2.a;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE UPDATE v2, t2 SET v2.a = v2.a + 1 WHERE v2.a = t2.a;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
DELETE FROM v2;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN DELETE FROM v2;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE DELETE FROM v2;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
DELETE FROM v2 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN DELETE FROM v2 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE DELETE FROM v2 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
DELETE FROM v2 USING v2, t2;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN DELETE FROM v2 USING v2, t2;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE DELETE FROM v2 USING v2, t2;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
DELETE FROM v2 USING v2, t2 WHERE v2.a = t2.a;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN DELETE FROM v2 USING v2, t2 WHERE v2.a = t2.a;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE DELETE FROM v2 USING v2, t2 WHERE v2.a = t2.a;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
SELECT a FROM v2;
a
EXPLAIN SELECT a FROM v2;
@@ -4391,17 +4391,17 @@ ANALYZE SELECT a FROM v2;
id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 39 39.00 100.00 0.00 Using where
SELECT * FROM v2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN SELECT * FROM v2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE SELECT * FROM v2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
SELECT * FROM v2 WHERE a = 10;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN SELECT * FROM v2 WHERE a = 10;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE SELECT * FROM v2 WHERE a = 10;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
SELECT a FROM v2 WHERE a = 10;
a
EXPLAIN SELECT a FROM v2 WHERE a = 10;
@@ -4411,11 +4411,11 @@ ANALYZE SELECT a FROM v2 WHERE a = 10;
id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 39 39.00 100.00 0.00 Using where
SELECT * FROM v2 WHERE a IN ( SELECT a FROM t2 );
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN SELECT * FROM v2 WHERE a IN ( SELECT a FROM t2 );
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE SELECT * FROM v2 WHERE a IN ( SELECT a FROM t2 );
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
#========================================================================
# Test: Grant SELECT on the outer view
@@ -4432,71 +4432,71 @@ connection con1;
# (it could have revealed the structure of the view)
#------------------------------------------------------------------------
INSERT INTO v2 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN INSERT INTO v2 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE INSERT INTO v2 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
INSERT INTO v2 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN INSERT INTO v2 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE INSERT INTO v2 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
REPLACE INTO v2 (a) VALUES (10);
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN REPLACE INTO v2 (a) VALUES (10);
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE REPLACE INTO v2 (a) VALUES (10);
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
REPLACE INTO v2 SELECT * FROM t2;
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN REPLACE INTO v2 SELECT * FROM t2;
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE REPLACE INTO v2 SELECT * FROM t2;
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
UPDATE v2 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN UPDATE v2 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE UPDATE v2 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
UPDATE v2 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN UPDATE v2 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE UPDATE v2 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
UPDATE v2, t2 SET v2.a = v2.a + 1 WHERE v2.a = t2.a;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN UPDATE v2, t2 SET v2.a = v2.a + 1 WHERE v2.a = t2.a;
ERROR HY000: ANALYZE/EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
ANALYZE UPDATE v2, t2 SET v2.a = v2.a + 1 WHERE v2.a = t2.a;
ERROR HY000: ANALYZE/EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
DELETE FROM v2;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN DELETE FROM v2;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE DELETE FROM v2;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
DELETE FROM v2 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN DELETE FROM v2 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE DELETE FROM v2 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
DELETE FROM v2 USING v2, t2;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN DELETE FROM v2 USING v2, t2;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE DELETE FROM v2 USING v2, t2;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
DELETE FROM v2 USING v2, t2 WHERE v2.a = t2.a;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN DELETE FROM v2 USING v2, t2 WHERE v2.a = t2.a;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE DELETE FROM v2 USING v2, t2 WHERE v2.a = t2.a;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
SELECT * FROM v2;
a b
EXPLAIN SELECT * FROM v2;
@@ -4529,71 +4529,71 @@ connection con1;
# Expectation: Can run SELECT, EXPLAIN SELECT, ANALYZE SELECT
#------------------------------------------------------------------------
INSERT INTO v2 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN INSERT INTO v2 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE INSERT INTO v2 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
INSERT INTO v2 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN INSERT INTO v2 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE INSERT INTO v2 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
REPLACE INTO v2 (a) VALUES (10);
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN REPLACE INTO v2 (a) VALUES (10);
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE REPLACE INTO v2 (a) VALUES (10);
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
REPLACE INTO v2 SELECT * FROM t2;
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN REPLACE INTO v2 SELECT * FROM t2;
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE REPLACE INTO v2 SELECT * FROM t2;
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
UPDATE v2 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN UPDATE v2 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE UPDATE v2 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
UPDATE v2 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN UPDATE v2 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE UPDATE v2 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
UPDATE v2, t2 SET v2.a = v2.a + 1 WHERE v2.a = t2.a;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN UPDATE v2, t2 SET v2.a = v2.a + 1 WHERE v2.a = t2.a;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE UPDATE v2, t2 SET v2.a = v2.a + 1 WHERE v2.a = t2.a;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
DELETE FROM v2;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN DELETE FROM v2;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE DELETE FROM v2;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
DELETE FROM v2 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN DELETE FROM v2 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE DELETE FROM v2 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
DELETE FROM v2 USING v2, t2;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN DELETE FROM v2 USING v2, t2;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE DELETE FROM v2 USING v2, t2;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
DELETE FROM v2 USING v2, t2 WHERE v2.a = t2.a;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN DELETE FROM v2 USING v2, t2 WHERE v2.a = t2.a;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE DELETE FROM v2 USING v2, t2 WHERE v2.a = t2.a;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
SELECT * FROM v2;
a b
EXPLAIN SELECT * FROM v2;
@@ -4649,77 +4649,77 @@ ERROR HY000: ANALYZE/EXPLAIN/SHOW can not be issued; lacking privileges for unde
ANALYZE INSERT INTO v2 SELECT * FROM t2;
ERROR HY000: ANALYZE/EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
REPLACE INTO v2 (a) VALUES (10);
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN REPLACE INTO v2 (a) VALUES (10);
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE REPLACE INTO v2 (a) VALUES (10);
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
REPLACE INTO v2 SELECT * FROM t2;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN REPLACE INTO v2 SELECT * FROM t2;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE REPLACE INTO v2 SELECT * FROM t2;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
UPDATE v2 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN UPDATE v2 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE UPDATE v2 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
UPDATE v2 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN UPDATE v2 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE UPDATE v2 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
UPDATE v2, t2 SET v2.a = v2.a + 1 WHERE v2.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN UPDATE v2, t2 SET v2.a = v2.a + 1 WHERE v2.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE UPDATE v2, t2 SET v2.a = v2.a + 1 WHERE v2.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
DELETE FROM v2;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN DELETE FROM v2;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE DELETE FROM v2;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
DELETE FROM v2 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN DELETE FROM v2 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE DELETE FROM v2 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
DELETE FROM v2 USING v2, t2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN DELETE FROM v2 USING v2, t2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE DELETE FROM v2 USING v2, t2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
DELETE FROM v2 USING v2, t2 WHERE v2.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN DELETE FROM v2 USING v2, t2 WHERE v2.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE DELETE FROM v2 USING v2, t2 WHERE v2.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
SELECT * FROM v2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN SELECT * FROM v2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE SELECT * FROM v2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
SELECT * FROM v2 WHERE a = 10;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN SELECT * FROM v2 WHERE a = 10;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE SELECT * FROM v2 WHERE a = 10;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
SELECT * FROM v2 WHERE a IN ( SELECT a FROM t2 );
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN SELECT * FROM v2 WHERE a IN ( SELECT a FROM t2 );
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE SELECT * FROM v2 WHERE a IN ( SELECT a FROM t2 );
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
#========================================================================
# Test: Grant UPDATE on the outer view
@@ -4738,29 +4738,29 @@ connection con1;
# (it could have revealed the structure of the view)
#------------------------------------------------------------------------
INSERT INTO v2 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN INSERT INTO v2 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE INSERT INTO v2 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
INSERT INTO v2 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN INSERT INTO v2 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE INSERT INTO v2 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
REPLACE INTO v2 (a) VALUES (10);
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN REPLACE INTO v2 (a) VALUES (10);
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE REPLACE INTO v2 (a) VALUES (10);
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
REPLACE INTO v2 SELECT * FROM t2;
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN REPLACE INTO v2 SELECT * FROM t2;
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE REPLACE INTO v2 SELECT * FROM t2;
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
UPDATE v2 SET a = 10;
EXPLAIN UPDATE v2 SET a = 10;
ERROR HY000: ANALYZE/EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
@@ -4778,47 +4778,47 @@ ERROR HY000: ANALYZE/EXPLAIN/SHOW can not be issued; lacking privileges for unde
ANALYZE UPDATE v2, t2 SET v2.a = v2.a + 1 WHERE v2.a = t2.a;
ERROR HY000: ANALYZE/EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
DELETE FROM v2;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN DELETE FROM v2;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE DELETE FROM v2;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
DELETE FROM v2 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN DELETE FROM v2 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE DELETE FROM v2 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
DELETE FROM v2 USING v2, t2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN DELETE FROM v2 USING v2, t2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE DELETE FROM v2 USING v2, t2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
DELETE FROM v2 USING v2, t2 WHERE v2.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN DELETE FROM v2 USING v2, t2 WHERE v2.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE DELETE FROM v2 USING v2, t2 WHERE v2.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
SELECT * FROM v2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN SELECT * FROM v2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE SELECT * FROM v2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
SELECT * FROM v2 WHERE a = 10;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN SELECT * FROM v2 WHERE a = 10;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE SELECT * FROM v2 WHERE a = 10;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
SELECT * FROM v2 WHERE a IN ( SELECT a FROM t2 );
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN SELECT * FROM v2 WHERE a IN ( SELECT a FROM t2 );
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE SELECT * FROM v2 WHERE a IN ( SELECT a FROM t2 );
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
#========================================================================
# Test: Grant UPDATE, SHOW VIEW on the outer view
@@ -4834,29 +4834,29 @@ connection con1;
# which do not read any columns
#------------------------------------------------------------------------
INSERT INTO v2 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN INSERT INTO v2 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE INSERT INTO v2 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
INSERT INTO v2 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN INSERT INTO v2 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE INSERT INTO v2 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
REPLACE INTO v2 (a) VALUES (10);
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN REPLACE INTO v2 (a) VALUES (10);
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE REPLACE INTO v2 (a) VALUES (10);
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
REPLACE INTO v2 SELECT * FROM t2;
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN REPLACE INTO v2 SELECT * FROM t2;
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE REPLACE INTO v2 SELECT * FROM t2;
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
UPDATE v2 SET a = 10;
EXPLAIN UPDATE v2 SET a = 10;
id select_type table type possible_keys key key_len ref rows Extra
@@ -4878,47 +4878,47 @@ ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for column 'a'
ANALYZE UPDATE v2, t2 SET v2.a = v2.a + 1 WHERE v2.a = t2.a;
ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for column 'a' in table 'v2'
DELETE FROM v2;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN DELETE FROM v2;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE DELETE FROM v2;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
DELETE FROM v2 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN DELETE FROM v2 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE DELETE FROM v2 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
DELETE FROM v2 USING v2, t2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN DELETE FROM v2 USING v2, t2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE DELETE FROM v2 USING v2, t2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
DELETE FROM v2 USING v2, t2 WHERE v2.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN DELETE FROM v2 USING v2, t2 WHERE v2.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE DELETE FROM v2 USING v2, t2 WHERE v2.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
SELECT * FROM v2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN SELECT * FROM v2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE SELECT * FROM v2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
SELECT * FROM v2 WHERE a = 10;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN SELECT * FROM v2 WHERE a = 10;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE SELECT * FROM v2 WHERE a = 10;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
SELECT * FROM v2 WHERE a IN ( SELECT a FROM t2 );
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN SELECT * FROM v2 WHERE a IN ( SELECT a FROM t2 );
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE SELECT * FROM v2 WHERE a IN ( SELECT a FROM t2 );
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
#========================================================================
# Test: Grant DELETE on the outer view
@@ -4936,47 +4936,47 @@ connection con1;
# (it could have revealed the structure of the view)
#------------------------------------------------------------------------
INSERT INTO v2 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN INSERT INTO v2 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE INSERT INTO v2 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
INSERT INTO v2 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN INSERT INTO v2 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE INSERT INTO v2 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
REPLACE INTO v2 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN REPLACE INTO v2 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE REPLACE INTO v2 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
REPLACE INTO v2 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN REPLACE INTO v2 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE REPLACE INTO v2 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
UPDATE v2 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN UPDATE v2 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE UPDATE v2 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
UPDATE v2 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN UPDATE v2 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE UPDATE v2 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
UPDATE v2, t2 SET v2.a = v2.a + 1 WHERE v2.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN UPDATE v2, t2 SET v2.a = v2.a + 1 WHERE v2.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE UPDATE v2, t2 SET v2.a = v2.a + 1 WHERE v2.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
DELETE FROM v2;
EXPLAIN DELETE FROM v2;
ERROR HY000: ANALYZE/EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
@@ -4989,35 +4989,35 @@ ERROR HY000: ANALYZE/EXPLAIN/SHOW can not be issued; lacking privileges for unde
ANALYZE DELETE FROM v2 WHERE a = 10;
ERROR HY000: ANALYZE/EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
DELETE FROM v2 USING v2, t2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN DELETE FROM v2 USING v2, t2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE DELETE FROM v2 USING v2, t2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
DELETE FROM v2 USING v2, t2 WHERE v2.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN DELETE FROM v2 USING v2, t2 WHERE v2.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE DELETE FROM v2 USING v2, t2 WHERE v2.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
SELECT * FROM v2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN SELECT * FROM v2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE SELECT * FROM v2;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
SELECT * FROM v2 WHERE a = 10;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN SELECT * FROM v2 WHERE a = 10;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE SELECT * FROM v2 WHERE a = 10;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
SELECT * FROM v2 WHERE a IN ( SELECT a FROM t2 );
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN SELECT * FROM v2 WHERE a IN ( SELECT a FROM t2 );
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE SELECT * FROM v2 WHERE a IN ( SELECT a FROM t2 );
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
#========================================================================
# Test: Grant DELETE, SELECT on the outer view
@@ -5034,43 +5034,43 @@ connection con1;
# (it could have revealed the structure of the view)
#------------------------------------------------------------------------
INSERT INTO v2 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN INSERT INTO v2 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE INSERT INTO v2 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
INSERT INTO v2 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN INSERT INTO v2 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE INSERT INTO v2 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
REPLACE INTO v2 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN REPLACE INTO v2 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE REPLACE INTO v2 (a) VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
REPLACE INTO v2 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN REPLACE INTO v2 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE REPLACE INTO v2 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
UPDATE v2 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN UPDATE v2 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE UPDATE v2 SET a = 10;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
UPDATE v2 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN UPDATE v2 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
ANALYZE UPDATE v2 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
UPDATE v2, t2 SET v2.a = v2.a + 1 WHERE v2.a = t2.a;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 'v2'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`v2`
EXPLAIN UPDATE v2, t2 SET v2.a = v2.a + 1 WHERE v2.a = t2.a;
ERROR HY000: ANALYZE/EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
ANALYZE UPDATE v2, t2 SET v2.a = v2.a + 1 WHERE v2.a = t2.a;
diff --git a/mysql-test/main/bootstrap.test b/mysql-test/main/bootstrap.test
index cd13a2748d1..683033979fe 100644
--- a/mysql-test/main/bootstrap.test
+++ b/mysql-test/main/bootstrap.test
@@ -7,7 +7,7 @@ drop table if exists t1;
# Add the datadir to the bootstrap command
let $MYSQLD_DATADIR= `select @@datadir`;
-let $MYSQLD_BOOTSTRAP_CMD= $MYSQLD_BOOTSTRAP_CMD --datadir=$MYSQLD_DATADIR --default-storage-engine=MyISAM --loose-skip-innodb --plugin-maturity=unknown;
+let $MYSQLD_BOOTSTRAP_CMD= $MYSQLD_BOOTSTRAP_CMD --datadir=$MYSQLD_DATADIR --tmpdir=$MYSQL_TMP_DIR --default-storage-engine=MyISAM --loose-skip-innodb --plugin-maturity=unknown;
#
# Check that --bootstrap reads from stdin
#
diff --git a/mysql-test/main/bootstrap_innodb.test b/mysql-test/main/bootstrap_innodb.test
index ddaefb32155..eb3d09c0e74 100644
--- a/mysql-test/main/bootstrap_innodb.test
+++ b/mysql-test/main/bootstrap_innodb.test
@@ -19,7 +19,7 @@ rollback to savepoint s1;
insert t1 values (5);
commit;
EOF
-exec $MYSQLD_BOOTSTRAP_CMD --datadir=$datadir --innodb < $MYSQLTEST_VARDIR/tmp/bootstrap_test.sql >> $MYSQLTEST_VARDIR/tmp/bootstrap.log 2>&1;
+exec $MYSQLD_BOOTSTRAP_CMD --datadir=$datadir --tmpdir=$MYSQL_TMP_DIR --innodb < $MYSQLTEST_VARDIR/tmp/bootstrap_test.sql >> $MYSQLTEST_VARDIR/tmp/bootstrap.log 2>&1;
remove_file $MYSQLTEST_VARDIR/tmp/bootstrap_test.sql;
source include/start_mysqld.inc;
diff --git a/mysql-test/main/create_or_replace.result b/mysql-test/main/create_or_replace.result
index c9863f56154..ad05f1dcdc4 100644
--- a/mysql-test/main/create_or_replace.result
+++ b/mysql-test/main/create_or_replace.result
@@ -532,3 +532,15 @@ SELECT * FROM t3;
ERROR HY000: Table 't3' was not locked with LOCK TABLES
UNLOCK TABLES;
DROP TABLE t3;
+#
+# MDEV-29697 Assertion failure in Diagnostics_area::set_ok_status
+# upon CREATE OR REPLACE causing ER_UPDATE_TABLE_USED
+#
+CREATE TABLE t (a INT) ENGINE=MyISAM;
+CREATE TABLE tm (a INT) ENGINE=MERGE UNION(t);
+CREATE OR REPLACE TABLE t LIKE tm;
+ERROR HY000: Table 'tm' is specified twice, both as a target for 'CREATE' and as a separate source for data
+DROP TABLE IF EXISTS tm, t;
+#
+# End of 10.3 tests
+#
diff --git a/mysql-test/main/create_or_replace.test b/mysql-test/main/create_or_replace.test
index 5bce08949ba..8c807adc328 100644
--- a/mysql-test/main/create_or_replace.test
+++ b/mysql-test/main/create_or_replace.test
@@ -489,3 +489,20 @@ SELECT * FROM t3;
UNLOCK TABLES;
DROP TABLE t3;
--enable_service_connection
+
+--echo #
+--echo # MDEV-29697 Assertion failure in Diagnostics_area::set_ok_status
+--echo # upon CREATE OR REPLACE causing ER_UPDATE_TABLE_USED
+--echo #
+CREATE TABLE t (a INT) ENGINE=MyISAM;
+CREATE TABLE tm (a INT) ENGINE=MERGE UNION(t);
+--error ER_UPDATE_TABLE_USED
+CREATE OR REPLACE TABLE t LIKE tm;
+
+# Cleanup
+DROP TABLE IF EXISTS tm, t;
+
+
+--echo #
+--echo # End of 10.3 tests
+--echo #
diff --git a/mysql-test/main/create_or_replace_permission.result b/mysql-test/main/create_or_replace_permission.result
index b9938e4270a..1ea15d9621b 100644
--- a/mysql-test/main/create_or_replace_permission.result
+++ b/mysql-test/main/create_or_replace_permission.result
@@ -32,7 +32,7 @@ CREATE OR REPLACE DATABASE db2;
ERROR 42000: Access denied for user 'mysqltest_1'@'localhost' to database 'db2'
USE db1;
CREATE OR REPLACE TABLE t1(id INT);
-ERROR 42000: DROP command denied to user 'mysqltest_1'@'localhost' for table 't1'
+ERROR 42000: DROP command denied to user 'mysqltest_1'@'localhost' for table `db1`.`t1`
CREATE OR REPLACE PROCEDURE proc1 (OUT cnt INT) BEGIN END;
ERROR 42000: alter routine command denied to user 'mysqltest_1'@'localhost' for routine 'db1.proc1'
CREATE OR REPLACE FUNCTION lookup RETURNS STRING SONAME "UDF_EXAMPLE_LIB";
diff --git a/mysql-test/main/cte_grant.result b/mysql-test/main/cte_grant.result
index 2ee31be3435..96588d26b6c 100644
--- a/mysql-test/main/cte_grant.result
+++ b/mysql-test/main/cte_grant.result
@@ -51,7 +51,7 @@ c
select d from mysqltest.v2;
ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for column 'd' in table 'v2'
select * from mysqltest.v3;
-ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 'v3'
+ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table `mysqltest`.`v3`
connection root;
grant select on mysqltest.v3 to mysqltest_1@localhost;
connection user1;
@@ -116,7 +116,7 @@ revoke SELECT on db.t1 from foo@localhost;
connection con1;
with cte as (select * from t1 where i < 4)
select * from cte;
-ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table `db`.`t1`
disconnect con1;
connection default;
drop database db;
diff --git a/mysql-test/main/cte_nonrecursive_not_embedded.result b/mysql-test/main/cte_nonrecursive_not_embedded.result
index c96a1ec2849..fa4d97d7bc5 100644
--- a/mysql-test/main/cte_nonrecursive_not_embedded.result
+++ b/mysql-test/main/cte_nonrecursive_not_embedded.result
@@ -39,7 +39,7 @@ cte3 AS
cte4 AS
(SELECT cte2.a FROM t2,cte2 WHERE cte2.a = t2.a)
SELECT * FROM cte4 as r;
-ERROR 42000: SELECT command denied to user 'u1'@'localhost' for table 't2'
+ERROR 42000: SELECT command denied to user 'u1'@'localhost' for table `db`.`t2`
disconnect u1;
connection default;
DROP USER 'u1'@'localhost';
diff --git a/mysql-test/main/cte_recursive.result b/mysql-test/main/cte_recursive.result
index bf95ba11a7d..7f535fc3125 100644
--- a/mysql-test/main/cte_recursive.result
+++ b/mysql-test/main/cte_recursive.result
@@ -5017,5 +5017,591 @@ t2 CREATE TABLE `t2` (
set @@sql_mode=default;
drop table t1,t2;
#
+# MDEV-29361: Embedded recursive / non-recursive CTE within
+# the scope of another embedded CTE with the same name
+#
+create table t1 (a int);
+insert into t1 values (4), (5);
+create table t2 (a int);
+insert into t2 values (6), (8);
+create table t3 (a int);
+insert into t3 values (1), (9);
+with recursive
+x as
+(
+select a from t1 union select a+1 from x as r1 where a < 7
+)
+select * from x as s1;
+a
+4
+5
+6
+7
+with recursive
+x as
+(
+select a from t2
+union
+select a+2 from x as r2 where a < 10
+)
+select a from x as s2;
+a
+6
+8
+10
+with
+cte as
+(
+with recursive
+x as
+(
+select a from t1 union select a+1 from x as r1 where a < 7
+)
+select * from x as s1
+where s1.a in (
+with recursive
+x as
+(
+select a from t2
+union
+select a+2 from x as r2 where a < 10
+)
+select a from x as s2
+)
+)
+select * from cte;
+a
+6
+with
+cte as
+(
+with recursive
+x(a) as
+(
+select a from t1 union select a+1 from x as r1 where a < 7
+)
+select s1.a from x as s1, x
+where s1.a = x.a and
+x.a in (
+with recursive
+x(a) as
+(
+select a from t2
+union
+select a+2 from x as r2 where a < 10
+)
+select a from x as s2
+)
+)
+select * from cte;
+a
+6
+with
+cte as
+(
+with
+x as
+(
+select a from t1 union select a+1 from x as r1 where a < 7
+)
+select * from x as s1
+where s1.a in (
+with recursive
+x as
+(
+select a from t2
+union
+select a+2 from x as r2 where a < 10
+)
+select a from x as s2
+)
+)
+select * from cte;
+ERROR 42S02: Table 'test.x' doesn't exist
+with
+cte as
+(
+with recursive
+x as
+(
+select a from t1 union select a+1 from x as r1 where a < 7
+)
+select * from x as s1
+where s1.a in (
+with
+x as
+(
+select a from t2
+union
+select a+2 from x as r2 where a < 10
+)
+select a from x as s2
+)
+)
+select * from cte;
+a
+6
+7
+with
+cte as
+(
+with
+x as
+(
+select a from t1 union select a+1 from x as r1 where a < 7
+)
+select * from x as s1
+where s1.a in (
+with
+x as
+(
+select a from t2
+union
+select a+2 from x as r2 where a < 10
+)
+select a from x as s2
+)
+)
+select * from cte;
+ERROR 42S02: Table 'test.x' doesn't exist
+with
+cte as
+(
+with recursive
+y as
+(
+select a from t1 union select a+1 from y as r1 where a < 7
+)
+select * from y as s1
+where s1.a in (
+with
+x as
+(
+select a from t2
+union
+select a+2 from x as r2 where a < 10
+)
+select a from x as s2
+)
+)
+select * from cte;
+ERROR 42S02: Table 'test.x' doesn't exist
+with
+cte as
+(
+with
+y(a) as
+(
+select a+5 from t1
+)
+select * from y as s1
+where s1.a in (
+with
+x as
+(
+select a from t2
+union
+select a+2 from x as r2 where a < 10
+)
+select a from x as s2
+)
+)
+select * from cte;
+ERROR 42S02: Table 'test.x' doesn't exist
+with
+cte as
+(
+select (
+with
+x as
+(
+select a from x as r1
+)
+select * from x as s1
+where s1.a in (
+with recursive
+x as
+(
+select a from t2
+union
+select a+2 from x as r2 where a < 10
+)
+select a from x as s2
+)
+) as r
+from t3
+)
+select * from cte;
+ERROR 42S02: Table 'test.x' doesn't exist
+with
+cte as
+(
+select (
+with
+x as
+(
+select a from x as r1
+)
+select * from x as s1
+where s1.a < 5 and
+s1.a in (
+with
+x as
+(
+select a from t2
+union
+select a+2 from x as r2 where a < 10
+)
+select a from x as s2
+)
+) as r
+from t3
+)
+select * from cte;
+ERROR 42S02: Table 'test.x' doesn't exist
+with
+cte as
+(
+select (
+with recursive
+x(a) as
+(
+select a+3 from t1 union select a+1 from x as r1 where a < 7
+)
+select * from x as s1
+where s1.a < 8 and
+s1.a in (
+with recursive
+x(a) as
+(
+select a-2 from t2
+union
+select a+1 from x as r2 where a < 10
+)
+select a from x as s2
+)
+) as r
+from t3
+)
+select * from cte;
+r
+7
+7
+with
+cte as
+(
+select (
+with recursive
+x as
+(
+select a from t1 union select a+1 from x as r1 where a < 7
+)
+select * from x as s1
+where s1.a in (
+with recursive
+x as
+(
+select a from t2
+union
+select a+2 from x as r2 where a < 10
+)
+select a from x as s2
+)
+) as r
+from t3
+)
+select * from cte;
+r
+6
+6
+create table x (a int);
+insert into x values (3), (7), (1), (5), (6);
+with
+cte as
+(
+select (
+with
+x as
+(
+select ( select a from x as r1 ) as a from t1
+)
+select * from x as s1
+where s1.a in (
+with recursive
+x as
+(
+select a from t2
+union
+select a+2 from x as r2 where a < 10
+)
+select a from x s2
+)
+) as r
+from t3
+)
+select * from cte;
+ERROR 21000: Subquery returns more than 1 row
+with
+cte as
+(
+select (
+with
+x as
+(
+select ( select a from x ) as a from t1
+)
+select exists (
+with recursive
+x as
+(
+select a from t2
+union
+select a+2 from x as r2 where a < 10
+)
+select a from x
+)
+) as r
+from t3
+)
+select * from cte;
+r
+1
+1
+with
+cte_e as
+(
+with
+cte as
+(
+select (
+with
+x as
+(
+select ( select a from x ) from t1
+)
+select exists (
+with recursive
+x as
+(
+select a from t2
+union
+select a+2 from x as r2 where a < 10
+)
+select a from x
+)
+) as r
+from t3
+)
+select * from cte
+)
+select s1.*, s2.* from cte_e as s1, cte_e as s2;
+r r
+1 1
+1 1
+1 1
+1 1
+with
+x as
+(
+select a from t1 union select a+1 from x as r1 where a < 7
+)
+select * from x as s1;
+a
+4
+5
+2
+6
+7
+with
+x as
+(
+select a from t2
+union
+select a+2 from x as r2 where a < 10
+)
+select a from x as s2;
+a
+6
+8
+5
+9
+3
+7
+with recursive
+x as
+(
+select a from t1 union select a+1 from x as r1 where a < 7
+)
+select * from x as s1;
+a
+4
+5
+6
+7
+with recursive
+x as
+(
+select a from t2
+union
+select a+2 from x as r2 where a < 10
+)
+select a from x as s2;
+a
+6
+8
+10
+with
+cte as
+(
+with
+x as
+(
+select a from t1 union select a+1 from x as r1 where a < 7
+)
+select * from x as s1
+where s1.a in (
+with recursive
+x as
+(
+select a from t2
+union
+select a+2 from x as r2 where a < 10
+)
+select a from x as s2
+)
+)
+select * from cte;
+a
+6
+with
+cte as
+(
+with
+x as
+(
+select a from t1 union select a+1 from x as r1 where a < 7
+)
+select * from x as s1
+where s1.a in (
+with
+x as
+(
+select a from t2
+union
+select a+2 from x as r2 where a < 10
+)
+select a from x as s2
+)
+)
+select * from cte;
+a
+4
+6
+7
+with
+cte as
+(
+with recursive
+y as
+(
+select a from t1 union select a+1 from y as r1 where a < 7
+)
+select * from y as s1
+where s1.a in (
+with
+x as
+(
+select a from t2
+union
+select a+2 from x as r2 where a < 10
+)
+select a from x as s2
+)
+)
+select * from cte;
+a
+5
+6
+7
+with
+cte as
+(
+with
+y(a) as
+(
+select a+5 from t1
+)
+select * from y as s1
+where s1.a in (
+with
+x as
+(
+select a from t2
+union
+select a+2 from x as r2 where a < 10
+)
+select a from x as s2
+)
+)
+select * from cte;
+a
+9
+with
+cte as
+(
+select (
+with
+x as
+(
+select a from x as r1
+)
+select * from x as s1
+where s1.a in (
+with
+recursive x as
+(
+select a from t2
+union
+select a+2 from x as r2 where a < 10
+)
+select a from x as s2
+)
+) as r
+from t3
+)
+select * from cte;
+r
+6
+6
+with
+cte as
+(
+select (
+with
+x as
+(
+select a from x as r1
+)
+select * from x as s1
+where s1.a < 5 and
+s1.a in (
+with
+x as
+(
+select a from t2
+union
+select a+2 from x as r2 where a < 10
+)
+select a from x as s2
+)
+) as r
+from t3
+)
+select * from cte;
+r
+3
+3
+drop table t1,t2,t3,x;
+#
# End of 10.3 tests
#
diff --git a/mysql-test/main/cte_recursive.test b/mysql-test/main/cte_recursive.test
index ca97c2d2900..f5babc6cb65 100644
--- a/mysql-test/main/cte_recursive.test
+++ b/mysql-test/main/cte_recursive.test
@@ -3207,5 +3207,669 @@ set @@sql_mode=default;
drop table t1,t2;
--echo #
+--echo # MDEV-29361: Embedded recursive / non-recursive CTE within
+--echo # the scope of another embedded CTE with the same name
+--echo #
+
+create table t1 (a int);
+insert into t1 values (4), (5);
+create table t2 (a int);
+insert into t2 values (6), (8);
+create table t3 (a int);
+insert into t3 values (1), (9);
+
+
+with recursive
+x as
+(
+ select a from t1 union select a+1 from x as r1 where a < 7
+)
+select * from x as s1;
+
+with recursive
+x as
+(
+ select a from t2
+ union
+ select a+2 from x as r2 where a < 10
+)
+select a from x as s2;
+
+# All recursive CTEs with name x are embedded in in the definition of 'cte',
+# without this embedding CTE the bug could not be reproduced
+
+# two recursive CTEs with name x, the second CTE is in the scope
+# of the first one, but does not use it
+# before fix of this bug: wrong result set
+
+with
+cte as
+(
+ with recursive
+ x as
+ (
+ select a from t1 union select a+1 from x as r1 where a < 7
+ )
+ select * from x as s1
+ where s1.a in (
+ with recursive
+ x as
+ (
+ select a from t2
+ union
+ select a+2 from x as r2 where a < 10
+ )
+ select a from x as s2
+ )
+)
+select * from cte;
+
+
+# two recursive CTEs with name x, the second CTE is in the scope of the first
+# one, but does not use it; there are two non-recursive references to the latter
+# before fix of this bug: wrong result set
+
+with
+cte as
+(
+ with recursive
+ x(a) as
+ (
+ select a from t1 union select a+1 from x as r1 where a < 7
+ )
+ select s1.a from x as s1, x
+ where s1.a = x.a and
+ x.a in (
+ with recursive
+ x(a) as
+ (
+ select a from t2
+ union
+ select a+2 from x as r2 where a < 10
+ )
+ select a from x as s2
+ )
+)
+select * from cte;
+
+
+# x as r1 belongs to the definition of CTE x from non-RECURSIVE with clause
+# before fix of this bug: infinite sequence of recursive calls
+
+--error ER_NO_SUCH_TABLE
+with
+cte as
+(
+ with
+ x as
+ (
+ select a from t1 union select a+1 from x as r1 where a < 7
+ )
+ select * from x as s1
+ where s1.a in (
+ with recursive
+ x as
+ (
+ select a from t2
+ union
+ select a+2 from x as r2 where a < 10
+ )
+ select a from x as s2
+ )
+)
+select * from cte;
+
+
+# x as r2 belongs to the definition of CTE x from non-RECURSIVE with clause
+# yet it is in the scope of another CTE with the same name
+# before fix of this bug: crash in With_element::get_name()
+
+with
+cte as
+(
+ with recursive
+ x as
+ (
+ select a from t1 union select a+1 from x as r1 where a < 7
+ )
+ select * from x as s1
+ where s1.a in (
+ with
+ x as
+ (
+ select a from t2
+ union
+ select a+2 from x as r2 where a < 10
+ )
+ select a from x as s2
+ )
+)
+select * from cte;
+
+
+# x as r1 is in the definition of CTE x from non-RECURSIVE with clause, thus
+# although x as r2 is in the scope of the first CTE x an error is expected
+# before fix of this bug: crash in With_element::get_name()
+
+--error ER_NO_SUCH_TABLE
+with
+cte as
+(
+ with
+ x as
+ (
+ select a from t1 union select a+1 from x as r1 where a < 7
+ )
+ select * from x as s1
+ where s1.a in (
+ with
+ x as
+ (
+ select a from t2
+ union
+ select a+2 from x as r2 where a < 10
+ )
+ select a from x as s2
+ )
+)
+select * from cte;
+
+
+# x as r2 belongs to the definition of CTE x from non-RECURSIVE with clause
+# and in the scope of recursive CTE y, but does not use the latter
+# before fix of this bug: crash in With_element::get_name()
+
+--error ER_NO_SUCH_TABLE
+with
+cte as
+(
+ with recursive
+ y as
+ (
+ select a from t1 union select a+1 from y as r1 where a < 7
+ )
+ select * from y as s1
+ where s1.a in (
+ with
+ x as
+ (
+ select a from t2
+ union
+ select a+2 from x as r2 where a < 10
+ )
+ select a from x as s2
+ )
+)
+select * from cte;
+
+
+# x as r2 belongs to the definition of CTE x from non-RECURSIVE with clause
+# and in the scope of non-recursive CTE y, but does not use the latter
+# before fix of this bug: crash in With_element::get_name()
+
+--error ER_NO_SUCH_TABLE
+with
+cte as
+(
+ with
+ y(a) as
+ (
+ select a+5 from t1
+ )
+ select * from y as s1
+ where s1.a in (
+ with
+ x as
+ (
+ select a from t2
+ union
+ select a+2 from x as r2 where a < 10
+ )
+ select a from x as s2
+ )
+)
+select * from cte;
+
+
+# in the subquery of the embedding CTE cte:
+# x as r1 is in the definition of CTE x from non-RECURSIVE with clause;
+# x as t2 is in the definition of CTE x from RECURSIVE with clause;
+# an error is expected to be reported for x as r1
+# before fix of this bug: infinite sequence of recursive calls
+
+--error ER_NO_SUCH_TABLE
+with
+cte as
+(
+ select (
+ with
+ x as
+ (
+ select a from x as r1
+ )
+ select * from x as s1
+ where s1.a in (
+ with recursive
+ x as
+ (
+ select a from t2
+ union
+ select a+2 from x as r2 where a < 10
+ )
+ select a from x as s2
+ )
+ ) as r
+ from t3
+)
+select * from cte;
+
+
+# in the subquery of the embedding CTE cte:
+# x as r1 is in the definition of CTE x from non-RECURSIVE with clause, thus
+# although x as r2 is in the scope of the first CTE x an error is expected
+# before fix of this bug: crash in With_element::get_name()
+
+--error ER_NO_SUCH_TABLE
+with
+cte as
+(
+ select (
+ with
+ x as
+ (
+ select a from x as r1
+ )
+ select * from x as s1
+ where s1.a < 5 and
+ s1.a in (
+ with
+ x as
+ (
+ select a from t2
+ union
+ select a+2 from x as r2 where a < 10
+ )
+ select a from x as s2
+ )
+ ) as r
+ from t3
+)
+select * from cte;
+
+
+# in the subquery of the embedding CTE cte:
+# two recursive CTEs with name x, the second CTE is in the scope
+# of the first one, but does not use it
+# before fix of this bug: wrong result set
+
+with
+cte as
+(
+ select (
+ with recursive
+ x(a) as
+ (
+ select a+3 from t1 union select a+1 from x as r1 where a < 7
+ )
+ select * from x as s1
+ where s1.a < 8 and
+ s1.a in (
+ with recursive
+ x(a) as
+ (
+ select a-2 from t2
+ union
+ select a+1 from x as r2 where a < 10
+ )
+ select a from x as s2
+ )
+ ) as r
+ from t3
+)
+select * from cte;
+
+
+# in the subquery of the embedding CTE cte:
+# two recursive CTEs with name x, the second CTE is in the scope
+# of the first one, but does not use it
+# before fix of this bug: Subquery returns more than 1 row
+
+with
+cte as
+(
+ select (
+ with recursive
+ x as
+ (
+ select a from t1 union select a+1 from x as r1 where a < 7
+ )
+ select * from x as s1
+ where s1.a in (
+ with recursive
+ x as
+ (
+ select a from t2
+ union
+ select a+2 from x as r2 where a < 10
+ )
+ select a from x as s2
+ )
+ ) as r
+ from t3
+)
+select * from cte;
+
+
+create table x (a int);
+insert into x values (3), (7), (1), (5), (6);
+
+
+# in the subquery of the embedding CTE cte:
+# one non-recursive CTEs with name x using table t in a subquery, the second
+# CTE x is recursive and is in the scope of the first one, but does not use it;
+# the query uses both CTE with name x.
+# before fix of this bug: infinite sequence of recursive calls
+
+--error ER_SUBQUERY_NO_1_ROW
+with
+cte as
+(
+ select (
+ with
+ x as
+ (
+ select ( select a from x as r1 ) as a from t1
+ )
+ select * from x as s1
+ where s1.a in (
+ with recursive
+ x as
+ (
+ select a from t2
+ union
+ select a+2 from x as r2 where a < 10
+ )
+ select a from x s2
+ )
+ ) as r
+ from t3
+)
+select * from cte;
+
+
+# in the subquery of the embedding CTE cte:
+# one non-recursive CTEs with name x using table t, the second CTE x is
+# recursive and is in the scope of the first one, but does not use it;
+# the query uses only the second CTE with name x.
+# before fix of this bug: Subquery returns more than 1 row
+
+with
+cte as
+(
+ select (
+ with
+ x as
+ (
+ select ( select a from x ) as a from t1
+ )
+ select exists (
+ with recursive
+ x as
+ (
+ select a from t2
+ union
+ select a+2 from x as r2 where a < 10
+ )
+ select a from x
+ )
+ ) as r
+ from t3
+)
+select * from cte;
+
+
+# in the subquery of the embedding CTE cte embedded in the CTE cte_e
+# one non-recursive CTEs with name x uses table t1, the second CTE x is
+# recursive and is in the scope of the first one, but does not use it;
+# CTE cte uses only the second CTE with name x;
+# the query has two refeences to cte_e
+# before fix of this bug: infinite sequence of recursive calls
+
+with
+cte_e as
+(
+ with
+ cte as
+ (
+ select (
+ with
+ x as
+ (
+ select ( select a from x ) from t1
+ )
+ select exists (
+ with recursive
+ x as
+ (
+ select a from t2
+ union
+ select a+2 from x as r2 where a < 10
+ )
+ select a from x
+ )
+ ) as r
+ from t3
+ )
+ select * from cte
+)
+select s1.*, s2.* from cte_e as s1, cte_e as s2;
+
+
+# check : with base table x all queries abobe that returned error
+# message ER_NO_SUCH_TABLE now return proper result sets
+
+with
+x as
+(
+ select a from t1 union select a+1 from x as r1 where a < 7
+)
+select * from x as s1;
+
+with
+x as
+(
+ select a from t2
+ union
+ select a+2 from x as r2 where a < 10
+)
+select a from x as s2;
+
+with recursive
+x as
+(
+ select a from t1 union select a+1 from x as r1 where a < 7
+)
+select * from x as s1;
+
+with recursive
+x as
+(
+ select a from t2
+ union
+ select a+2 from x as r2 where a < 10
+)
+select a from x as s2;
+
+
+# x as r1 is bound to table x, x as s1 is bound to the first CTE x
+# x as r2 and x as s2 are bound to the second CTE x
+# before fix of this bug: infinite sequence of recursive calls
+
+with
+cte as
+(
+ with
+ x as
+ (
+ select a from t1 union select a+1 from x as r1 where a < 7
+ )
+ select * from x as s1
+ where s1.a in (
+ with recursive
+ x as
+ (
+ select a from t2
+ union
+ select a+2 from x as r2 where a < 10
+ )
+ select a from x as s2
+ )
+)
+select * from cte;
+
+
+# x as r1 is bound to table x, x as s1 is bound to the first CTE x
+# x as r1 is bound to the first CTE x, x as s2 is bound to the second CTE x
+# before fix of this bug: crash in With_element::get_name()
+
+with
+cte as
+(
+ with
+ x as
+ (
+ select a from t1 union select a+1 from x as r1 where a < 7
+ )
+ select * from x as s1
+ where s1.a in (
+ with
+ x as
+ (
+ select a from t2
+ union
+ select a+2 from x as r2 where a < 10
+ )
+ select a from x as s2
+ )
+)
+select * from cte;
+
+
+# x as r2 is bound to table x, x as s2 is bound to CTE x
+# before fix of this bug: crash in With_element::get_name()
+
+with
+cte as
+(
+ with recursive
+ y as
+ (
+ select a from t1 union select a+1 from y as r1 where a < 7
+ )
+ select * from y as s1
+ where s1.a in (
+ with
+ x as
+ (
+ select a from t2
+ union
+ select a+2 from x as r2 where a < 10
+ )
+ select a from x as s2
+ )
+)
+select * from cte;
+
+
+# x as r2 is bound to table x, x as s2 is bound to CTE x
+# before fix of this bug: crash in With_element::get_name()
+
+with
+cte as
+(
+ with
+ y(a) as
+ (
+ select a+5 from t1
+ )
+ select * from y as s1
+ where s1.a in (
+ with
+ x as
+ (
+ select a from t2
+ union
+ select a+2 from x as r2 where a < 10
+ )
+ select a from x as s2
+ )
+)
+select * from cte;
+
+
+# x as r1 is bound to table x, x as s1 is bound to the first CTE x
+# x as r2 and x as s2 are bound to the second CTE x
+# before fix of this bug: infinite sequence of recursive calls
+
+with
+cte as
+(
+ select (
+ with
+ x as
+ (
+ select a from x as r1
+ )
+ select * from x as s1
+ where s1.a in (
+ with
+ recursive x as
+ (
+ select a from t2
+ union
+ select a+2 from x as r2 where a < 10
+ )
+ select a from x as s2
+ )
+ ) as r
+ from t3
+)
+select * from cte;
+
+
+# x as r1 is bound to table x, x as s1 is bound to the first CTE x
+# x as r2 is bound to the first CTE x, x as s2 is bound to the second CTE x
+# before fix of this bug: crash in With_element::get_name()
+
+with
+cte as
+(
+ select (
+ with
+ x as
+ (
+ select a from x as r1
+ )
+ select * from x as s1
+ where s1.a < 5 and
+ s1.a in (
+ with
+ x as
+ (
+ select a from t2
+ union
+ select a+2 from x as r2 where a < 10
+ )
+ select a from x as s2
+ )
+ ) as r
+ from t3
+)
+select * from cte;
+
+
+drop table t1,t2,t3,x;
+
+--echo #
--echo # End of 10.3 tests
--echo #
diff --git a/mysql-test/main/flush-innodb-notembedded.result b/mysql-test/main/flush-innodb-notembedded.result
index 0b63a7b3519..279e52ae1cf 100644
--- a/mysql-test/main/flush-innodb-notembedded.result
+++ b/mysql-test/main/flush-innodb-notembedded.result
@@ -30,7 +30,7 @@ disconnect con1;
connection default;
connect con1, localhost, user5;
FLUSH TABLE db1.t1 FOR EXPORT;
-ERROR 42000: SELECT command denied to user 'user5'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'user5'@'localhost' for table `db1`.`t1`
disconnect con1;
connection default;
DROP USER user1@localhost, user2@localhost, user3@localhost,
diff --git a/mysql-test/main/gis_notembedded.result b/mysql-test/main/gis_notembedded.result
index 9120a2a1fa6..05be4e61dd6 100644
--- a/mysql-test/main/gis_notembedded.result
+++ b/mysql-test/main/gis_notembedded.result
@@ -39,7 +39,7 @@ create user foo@localhost;
grant execute on mysql.* to foo@localhost;
connect foo, localhost, foo;
call mysql.AddGeometryColumn('', 'mysql', 'proc', 'c', 10);
-ERROR 42000: ALTER command denied to user 'foo'@'localhost' for table 'proc'
+ERROR 42000: ALTER command denied to user 'foo'@'localhost' for table `mysql`.`proc`
disconnect foo;
connection default;
drop user foo@localhost;
diff --git a/mysql-test/main/grant.result b/mysql-test/main/grant.result
index f0359b4aca2..332b74d2e93 100644
--- a/mysql-test/main/grant.result
+++ b/mysql-test/main/grant.result
@@ -549,9 +549,9 @@ ERROR 42000: UPDATE command denied to user 'mysqltest_3'@'localhost' for column
update mysqltest_1.t2, mysqltest_2.t2 set d=20 where d=1;
ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for column 'd' in table 't2'
update mysqltest_1.t1, mysqltest_2.t2 set d=20 where d=1;
-ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for table `mysqltest_1`.`t1`
update mysqltest_2.t1, mysqltest_1.t2 set c=20 where b=1;
-ERROR 42000: UPDATE command denied to user 'mysqltest_3'@'localhost' for table 't1'
+ERROR 42000: UPDATE command denied to user 'mysqltest_3'@'localhost' for table `mysqltest_2`.`t1`
update mysqltest_2.t1, mysqltest_2.t2 set d=10 where s=2;
ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for column 's' in table 't1'
update mysqltest_1.t1, mysqltest_2.t2 set a=10,d=10;
@@ -577,14 +577,14 @@ connection conn2;
use mysqltest_1;
update mysqltest_2.t1, mysqltest_2.t2 set c=500,d=600;
update mysqltest_1.t1, mysqltest_1.t2 set a=100,b=200;
-ERROR 42000: UPDATE command denied to user 'mysqltest_3'@'localhost' for table 't1'
+ERROR 42000: UPDATE command denied to user 'mysqltest_3'@'localhost' for table `mysqltest_1`.`t1`
use mysqltest_2;
update mysqltest_1.t1, mysqltest_1.t2 set a=100,b=200;
-ERROR 42000: UPDATE command denied to user 'mysqltest_3'@'localhost' for table 't1'
+ERROR 42000: UPDATE command denied to user 'mysqltest_3'@'localhost' for table `mysqltest_1`.`t1`
update mysqltest_2.t1, mysqltest_1.t2 set c=100,b=200;
-ERROR 42000: UPDATE command denied to user 'mysqltest_3'@'localhost' for table 't2'
+ERROR 42000: UPDATE command denied to user 'mysqltest_3'@'localhost' for table `mysqltest_1`.`t2`
update mysqltest_1.t1, mysqltest_2.t2 set a=100,d=200;
-ERROR 42000: UPDATE command denied to user 'mysqltest_3'@'localhost' for table 't1'
+ERROR 42000: UPDATE command denied to user 'mysqltest_3'@'localhost' for table `mysqltest_1`.`t1`
connection master;
select t1.*,t2.* from mysqltest_1.t1,mysqltest_1.t2;
a q b r
@@ -642,7 +642,7 @@ grant all on mysqltest.t1 to mysqltest_1@localhost;
connect user1,localhost,mysqltest_1,,mysqltest,$MASTER_MYPORT,$MASTER_MYSOCK;
connection user1;
alter table t1 rename t2;
-ERROR 42000: INSERT, CREATE command denied to user 'mysqltest_1'@'localhost' for table 't2'
+ERROR 42000: INSERT, CREATE command denied to user 'mysqltest_1'@'localhost' for table `mysqltest`.`t2`
disconnect user1;
connection root;
revoke all privileges on mysqltest.t1 from mysqltest_1@localhost;
@@ -831,7 +831,7 @@ grant insert, create on db27515.t2 to user27515@localhost;
connect conn27515, localhost, user27515, , db27515;
connection conn27515;
rename table t1 to t2;
-ERROR 42000: DROP command denied to user 'user27515'@'localhost' for table 't1'
+ERROR 42000: DROP command denied to user 'user27515'@'localhost' for table `db27515`.`t1`
disconnect conn27515;
connection master;
revoke all privileges, grant option from user27515@localhost;
@@ -1065,13 +1065,13 @@ GRANT SELECT ON mysqltest2.* TO 'mysqltest_1'@'localhost' IDENTIFIE
GRANT SHOW VIEW,SELECT ON mysqltest2.v_yy TO 'mysqltest_1'@'localhost' IDENTIFIED BY 'mysqltest_1';
connect mysqltest_1, localhost, mysqltest_1, mysqltest_1,;
SHOW CREATE VIEW mysqltest2.v_nn;
-ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table 'v_nn'
+ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table `mysqltest2`.`v_nn`
SHOW CREATE TABLE mysqltest2.v_nn;
-ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table 'v_nn'
+ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table `mysqltest2`.`v_nn`
SHOW CREATE VIEW mysqltest2.v_yn;
-ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table 'v_yn'
+ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table `mysqltest2`.`v_yn`
SHOW CREATE TABLE mysqltest2.v_yn;
-ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table 'v_yn'
+ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table `mysqltest2`.`v_yn`
SHOW CREATE TABLE mysqltest2.v_ny;
View Create View character_set_client collation_connection
v_ny CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `mysqltest2`.`v_ny` AS select `mysqltest2`.`t_nn`.`c1` AS `c1` from `mysqltest2`.`t_nn` latin1 latin1_swedish_ci
@@ -1079,13 +1079,13 @@ SHOW CREATE VIEW mysqltest2.v_ny;
View Create View character_set_client collation_connection
v_ny CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `mysqltest2`.`v_ny` AS select `mysqltest2`.`t_nn`.`c1` AS `c1` from `mysqltest2`.`t_nn` latin1 latin1_swedish_ci
SHOW CREATE TABLE mysqltest3.t_nn;
-ERROR 42000: SHOW command denied to user 'mysqltest_1'@'localhost' for table 't_nn'
+ERROR 42000: SHOW command denied to user 'mysqltest_1'@'localhost' for table `mysqltest3`.`t_nn`
SHOW CREATE VIEW mysqltest3.t_nn;
-ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 't_nn'
+ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table `mysqltest3`.`t_nn`
SHOW CREATE VIEW mysqltest3.v_nn;
-ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 'v_nn'
+ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table `mysqltest3`.`v_nn`
SHOW CREATE TABLE mysqltest3.v_nn;
-ERROR 42000: SHOW command denied to user 'mysqltest_1'@'localhost' for table 'v_nn'
+ERROR 42000: SHOW command denied to user 'mysqltest_1'@'localhost' for table `mysqltest3`.`v_nn`
SHOW CREATE TABLE mysqltest2.t_nn;
Table Create Table
t_nn CREATE TABLE `t_nn` (
@@ -1150,17 +1150,17 @@ Grants for mysqltest_1@localhost
GRANT USAGE ON *.* TO `mysqltest_1`@`localhost`
GRANT SELECT ON `mysqltest1`.`t1` TO `mysqltest_1`@`localhost`
RENAME TABLE t1 TO t2;
-ERROR 42000: DROP, ALTER command denied to user 'mysqltest_1'@'localhost' for table 't1'
+ERROR 42000: DROP, ALTER command denied to user 'mysqltest_1'@'localhost' for table `mysqltest1`.`t1`
ALTER TABLE t1 RENAME TO t2;
-ERROR 42000: DROP, ALTER command denied to user 'mysqltest_1'@'localhost' for table 't1'
+ERROR 42000: DROP, ALTER command denied to user 'mysqltest_1'@'localhost' for table `mysqltest1`.`t1`
disconnect conn42;
connection default;
GRANT DROP ON mysqltest1.t1 TO mysqltest_1@localhost;
connect conn42,localhost,mysqltest_1,,mysqltest1;
RENAME TABLE t1 TO t2;
-ERROR 42000: ALTER command denied to user 'mysqltest_1'@'localhost' for table 't1'
+ERROR 42000: ALTER command denied to user 'mysqltest_1'@'localhost' for table `mysqltest1`.`t1`
ALTER TABLE t1 RENAME TO t2;
-ERROR 42000: ALTER command denied to user 'mysqltest_1'@'localhost' for table 't1'
+ERROR 42000: ALTER command denied to user 'mysqltest_1'@'localhost' for table `mysqltest1`.`t1`
disconnect conn42;
connection default;
GRANT ALTER ON mysqltest1.t1 TO mysqltest_1@localhost;
@@ -1170,9 +1170,9 @@ Grants for mysqltest_1@localhost
GRANT USAGE ON *.* TO `mysqltest_1`@`localhost`
GRANT SELECT, DROP, ALTER ON `mysqltest1`.`t1` TO `mysqltest_1`@`localhost`
RENAME TABLE t1 TO t2;
-ERROR 42000: INSERT, CREATE command denied to user 'mysqltest_1'@'localhost' for table 't2'
+ERROR 42000: INSERT, CREATE command denied to user 'mysqltest_1'@'localhost' for table `mysqltest1`.`t2`
ALTER TABLE t1 RENAME TO t2;
-ERROR 42000: INSERT, CREATE command denied to user 'mysqltest_1'@'localhost' for table 't2'
+ERROR 42000: INSERT, CREATE command denied to user 'mysqltest_1'@'localhost' for table `mysqltest1`.`t2`
disconnect conn42;
connection default;
GRANT INSERT, CREATE ON mysqltest1.t1 TO mysqltest_1@localhost;
@@ -1206,9 +1206,9 @@ GRANT USAGE ON *.* TO `mysqltest_1`@`localhost`
GRANT SELECT, CREATE, ALTER ON `mysqltest1`.`t1` TO `mysqltest_1`@`localhost`
GRANT SELECT, CREATE, ALTER ON `mysqltest1`.`t2` TO `mysqltest_1`@`localhost`
RENAME TABLE t1 TO t2;
-ERROR 42000: DROP command denied to user 'mysqltest_1'@'localhost' for table 't1'
+ERROR 42000: DROP command denied to user 'mysqltest_1'@'localhost' for table `mysqltest1`.`t1`
ALTER TABLE t1 RENAME TO t2;
-ERROR 42000: DROP command denied to user 'mysqltest_1'@'localhost' for table 't1'
+ERROR 42000: DROP command denied to user 'mysqltest_1'@'localhost' for table `mysqltest1`.`t1`
disconnect conn42;
connection default;
DROP USER mysqltest_1@localhost;
@@ -1250,7 +1250,7 @@ GRANT DELETE ON t1 TO bug23556@localhost;
connection bug23556;
USE bug23556;
TRUNCATE t1;
-ERROR 42000: DROP command denied to user 'bug23556'@'localhost' for table 't1'
+ERROR 42000: DROP command denied to user 'bug23556'@'localhost' for table `bug23556`.`t1`
connection default;
USE bug23556;
REVOKE DELETE ON t1 FROM bug23556@localhost;
@@ -1328,16 +1328,16 @@ CREATE PROCEDURE mysqltest1.p1() SQL SECURITY INVOKER
SELECT 1;
connect bug27337_con1,localhost,mysqltest_1,,mysqltest2;
CREATE TABLE t1(c INT);
-ERROR 42000: CREATE command denied to user 'mysqltest_1'@'localhost' for table 't1'
+ERROR 42000: CREATE command denied to user 'mysqltest_1'@'localhost' for table `mysqltest2`.`t1`
CALL mysqltest1.p1();
1
1
CREATE TABLE t1(c INT);
-ERROR 42000: CREATE command denied to user 'mysqltest_1'@'localhost' for table 't1'
+ERROR 42000: CREATE command denied to user 'mysqltest_1'@'localhost' for table `mysqltest2`.`t1`
disconnect bug27337_con1;
connect bug27337_con2,localhost,mysqltest_1,,mysqltest2;
CREATE TABLE t1(c INT);
-ERROR 42000: CREATE command denied to user 'mysqltest_1'@'localhost' for table 't1'
+ERROR 42000: CREATE command denied to user 'mysqltest_1'@'localhost' for table `mysqltest2`.`t1`
SHOW TABLES;
Tables_in_mysqltest2
connection default;
@@ -1379,9 +1379,9 @@ EXECUTE stmt1;
ERROR 42000: Access denied for user 'mysqltest_1'@'localhost' to database 'mysqltest1'
connection bug27337_con2;
SHOW COLUMNS FROM mysqltest2.t2;
-ERROR 42000: SELECT command denied to user 'mysqltest_2'@'localhost' for table 't2'
+ERROR 42000: SELECT command denied to user 'mysqltest_2'@'localhost' for table `mysqltest2`.`t2`
EXECUTE stmt2;
-ERROR 42000: SELECT command denied to user 'mysqltest_2'@'localhost' for table 't2'
+ERROR 42000: SELECT command denied to user 'mysqltest_2'@'localhost' for table `mysqltest2`.`t2`
connection default;
disconnect bug27337_con1;
disconnect bug27337_con2;
@@ -1502,11 +1502,11 @@ CALL p1;
ERROR 42000: SELECT command denied to user 'testuser'@'localhost' for column 'b' in table 't1'
# - Check table-level privileges...
SELECT a FROM t2;
-ERROR 42000: SELECT command denied to user 'testuser'@'localhost' for table 't2'
+ERROR 42000: SELECT command denied to user 'testuser'@'localhost' for table `mysqltest1`.`t2`
EXECUTE s2;
-ERROR 42000: SELECT command denied to user 'testuser'@'localhost' for table 't2'
+ERROR 42000: SELECT command denied to user 'testuser'@'localhost' for table `mysqltest1`.`t2`
CALL p2;
-ERROR 42000: SELECT command denied to user 'testuser'@'localhost' for table 't2'
+ERROR 42000: SELECT command denied to user 'testuser'@'localhost' for table `mysqltest1`.`t2`
# - Check database-level privileges...
SHOW TABLES FROM mysqltest2;
ERROR 42000: Access denied for user 'testuser'@'localhost' to database 'mysqltest2'
@@ -1641,9 +1641,9 @@ ERROR 42000: execute command denied to user 'mysqluser1'@'localhost' for routine
select mysqltest1.f1();
ERROR 42000: execute command denied to user 'mysqluser1'@'localhost' for routine 'mysqltest1.f1'
select * from mysqltest1.t11;
-ERROR 42000: SELECT command denied to user 'mysqluser1'@'localhost' for table 't11'
+ERROR 42000: SELECT command denied to user 'mysqluser1'@'localhost' for table `mysqltest1`.`t11`
select * from mysqltest1.t22;
-ERROR 42000: SELECT command denied to user 'mysqluser1'@'localhost' for table 't22'
+ERROR 42000: SELECT command denied to user 'mysqluser1'@'localhost' for table `mysqltest1`.`t22`
disconnect bug36544_con2;
connection default;
#
@@ -1665,9 +1665,9 @@ ERROR 42000: execute command denied to user 'mysqluser1'@'localhost' for routine
select mysqltest1.f1();
ERROR 42000: execute command denied to user 'mysqluser1'@'localhost' for routine 'mysqltest1.f1'
select * from mysqltest1.t11;
-ERROR 42000: SELECT command denied to user 'mysqluser1'@'localhost' for table 't11'
+ERROR 42000: SELECT command denied to user 'mysqluser1'@'localhost' for table `mysqltest1`.`t11`
select * from mysqltest1.t22;
-ERROR 42000: SELECT command denied to user 'mysqluser1'@'localhost' for table 't22'
+ERROR 42000: SELECT command denied to user 'mysqluser1'@'localhost' for table `mysqltest1`.`t22`
disconnect bug36544_con3;
connection default;
#
@@ -1718,7 +1718,7 @@ create table t1 (i INT);
connect user1,localhost,mysqltest,,mysqltest;
connection user1;
insert into t1 values (1);
-ERROR 42000: INSERT command denied to user 'mysqltest'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'mysqltest'@'localhost' for table `mysqltest`.`t1`
create table t2 (i INT);
create table t4 (i INT);
connection default;
@@ -1730,20 +1730,20 @@ flush privileges;
connection user1;
insert into t2 values (1);
create table if not exists t1 select * from t2;
-ERROR 42000: INSERT command denied to user 'mysqltest'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'mysqltest'@'localhost' for table `mysqltest`.`t1`
create table if not exists t3 select * from t2;
-ERROR 42000: INSERT command denied to user 'mysqltest'@'localhost' for table 't3'
+ERROR 42000: INSERT command denied to user 'mysqltest'@'localhost' for table `mysqltest`.`t3`
create table if not exists t4 select * from t2;
Warnings:
Note 1050 Table 't4' already exists
create table if not exists t5 select * from t2;
create table t6 select * from t2;
create table t7 select * from t2;
-ERROR 42000: INSERT command denied to user 'mysqltest'@'localhost' for table 't7'
+ERROR 42000: INSERT command denied to user 'mysqltest'@'localhost' for table `mysqltest`.`t7`
create table t4 select * from t2;
ERROR 42S01: Table 't4' already exists
create table t1 select * from t2;
-ERROR 42000: INSERT command denied to user 'mysqltest'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'mysqltest'@'localhost' for table `mysqltest`.`t1`
connection default;
drop table t1,t2,t4,t5,t6;
revoke create on mysqltest.* from mysqltest@localhost;
@@ -1906,7 +1906,7 @@ connect con1,localhost,testbug,,db1;
SELECT * FROM `../db2/tb2`;
ERROR 42S02: Table 'db1.../db2/tb2' doesn't exist
SELECT * FROM `../db2`.tb2;
-ERROR 42000: SELECT command denied to user 'testbug'@'localhost' for table 'tb2'
+ERROR 42000: SELECT command denied to user 'testbug'@'localhost' for table `../db2`.`tb2`
SELECT * FROM `#mysql50#/../db2/tb2`;
ERROR 42000: Incorrect table name '#mysql50#/../db2/tb2'
connection default;
@@ -1971,7 +1971,7 @@ connect con1,localhost,mysqltest_u1,,mysqltest_db1;
connection con1;
SHOW CREATE TABLE t1;
-ERROR 42000: SHOW command denied to user 'mysqltest_u1'@'localhost' for table 't1'
+ERROR 42000: SHOW command denied to user 'mysqltest_u1'@'localhost' for table `mysqltest_db1`.`t1`
connection default;
disconnect con1;
@@ -2777,10 +2777,10 @@ CREATE DATABASE db;
CREATE TABLE db.t (a INT);
connect con1,localhost,foo,,;
GRANT ALL ON db.t TO foo;
-ERROR 42000: SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, GRANT, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW ... command denied to user 'foo'@'localhost' for table 't'
+ERROR 42000: SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, GRANT, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW ... command denied to user 'foo'@'localhost' for table `db`.`t`
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, GRANT OPTION, REFERENCES,
INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER ON db.t TO foo;
-ERROR 42000: SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, GRANT, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW ... command denied to user 'foo'@'localhost' for table 't'
+ERROR 42000: SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, GRANT, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW ... command denied to user 'foo'@'localhost' for table `db`.`t`
connection default;
disconnect con1;
DROP USER foo;
diff --git a/mysql-test/main/grant2.result b/mysql-test/main/grant2.result
index e94d233c5bf..5bd44d0bd22 100644
--- a/mysql-test/main/grant2.result
+++ b/mysql-test/main/grant2.result
@@ -107,9 +107,9 @@ GRANT USAGE ON *.* TO `mysqltest_1`@`localhost`
GRANT SELECT, INSERT ON `mysqltest`.* TO `mysqltest_1`@`localhost`
insert into t1 values (1, 'I can''t change it!');
update t1 set data='I can change it!' where id = 1;
-ERROR 42000: UPDATE command denied to user 'mysqltest_1'@'localhost' for table 't1'
+ERROR 42000: UPDATE command denied to user 'mysqltest_1'@'localhost' for table `mysqltest`.`t1`
insert into t1 values (1, 'XXX') on duplicate key update data= 'I can change it!';
-ERROR 42000: UPDATE command denied to user 'mysqltest_1'@'localhost' for table 't1'
+ERROR 42000: UPDATE command denied to user 'mysqltest_1'@'localhost' for table `mysqltest`.`t1`
select * from t1;
id data
1 I can't change it!
@@ -126,7 +126,7 @@ connection mrugly;
grant select (a,b) on t1 to mysqltest_2@localhost;
ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for column 'b' in table 't1'
grant select on t1 to mysqltest_3@localhost;
-ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table `mysqltest`.`t1`
disconnect mrugly;
connection default;
drop table t1;
@@ -311,7 +311,7 @@ grant create user on *.* to mysqltest_2@localhost;
connect user3,localhost,mysqltest_2,,;
connection user3;
select host,user,password from mysql.user where user like 'mysqltest_%' order by host,user,password;
-ERROR 42000: SELECT command denied to user 'mysqltest_2'@'localhost' for table 'user'
+ERROR 42000: SELECT command denied to user 'mysqltest_2'@'localhost' for table `mysql`.`user`
create user mysqltest_A@'%';
rename user mysqltest_A@'%' to mysqltest_B@'%';
drop user mysqltest_B@'%';
@@ -327,7 +327,7 @@ Grants for mysqltest_3@localhost
GRANT USAGE ON *.* TO `mysqltest_3`@`localhost`
GRANT INSERT, UPDATE, DELETE ON `mysql`.* TO `mysqltest_3`@`localhost`
select host,user,password from mysql.user where user like 'mysqltest_%' order by host,user,password;
-ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for table 'user'
+ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for table `mysql`.`user`
insert into mysql.user set host='%', user='mysqltest_B';
Warnings:
Warning 1364 Field 'ssl_cipher' doesn't have a default value
@@ -483,9 +483,9 @@ create table t1 (i int);
connect user1,localhost,mysqltest_u1,,mysqltest_1;
connection user1;
show create table mysqltest_2.t1;
-ERROR 42000: SHOW command denied to user 'mysqltest_u1'@'localhost' for table 't1'
+ERROR 42000: SHOW command denied to user 'mysqltest_u1'@'localhost' for table `mysqltest_2`.`t1`
create table t1 like mysqltest_2.t1;
-ERROR 42000: SELECT command denied to user 'mysqltest_u1'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'mysqltest_u1'@'localhost' for table `mysqltest_2`.`t1`
connection default;
grant select on mysqltest_2.t1 to mysqltest_u1@localhost;
connection user1;
@@ -540,7 +540,7 @@ USE db1;
SELECT c FROM t2;
ERROR 42000: SELECT command denied to user 'mysqltest1'@'localhost' for column 'c' in table 't2'
SELECT * FROM t2;
-ERROR 42000: SELECT command denied to user 'mysqltest1'@'localhost' for table 't2'
+ERROR 42000: SELECT command denied to user 'mysqltest1'@'localhost' for table `db1`.`t2`
SELECT * FROM t1 JOIN t2 USING (b);
ERROR 42000: SELECT command denied to user 'mysqltest1'@'localhost' for column 'c' in table 't2'
connection default;
@@ -645,7 +645,7 @@ CREATE TEMPORARY TABLE t4 SELECT * FROM t1;
# temporary table without additional privileges.
CREATE TEMPORARY TABLE t5(a INT) ENGINE = MyISAM;
CREATE TEMPORARY TABLE t6(a INT) ENGINE = MERGE UNION = (t5);
-ERROR 42000: SELECT, UPDATE, DELETE command denied to user 'mysqltest_u1'@'localhost' for table 't5'
+ERROR 42000: SELECT, UPDATE, DELETE command denied to user 'mysqltest_u1'@'localhost' for table `mysqltest_db1`.`t5`
# Check that we allow creation of MERGE table with no underlying table
# without additional privileges.
CREATE TEMPORARY TABLE t6(a INT) ENGINE = MERGE UNION = ();
@@ -673,7 +673,7 @@ ALTER TABLE t6 UNION = ();
# Check that we do *not* allow altering of MERGE table with underlying
# temporary table without additional privileges.
ALTER TABLE t6 UNION = (t5);
-ERROR 42000: SELECT, UPDATE, DELETE command denied to user 'mysqltest_u1'@'localhost' for table 't5'
+ERROR 42000: SELECT, UPDATE, DELETE command denied to user 'mysqltest_u1'@'localhost' for table `mysqltest_db1`.`t5`
#
# Simple INSERT and INSERT ... SELECT.
#
@@ -918,7 +918,7 @@ CREATE TEMPORARY TABLE t9(a INT);
CREATE TEMPORARY TABLE t10(a INT) ENGINE = MERGE UNION = (t7, t8);
ALTER TABLE t10 UNION = (t9);
ALTER TABLE t10 UNION = (mysqltest_db2.t2_1);
-ERROR 42000: SELECT, UPDATE, DELETE command denied to user 'mysqltest_u5'@'localhost' for table 't2_1'
+ERROR 42000: SELECT, UPDATE, DELETE command denied to user 'mysqltest_u5'@'localhost' for table `mysqltest_db2`.`t2_1`
CREATE TEMPORARY TABLE mysqltest_db2.t2_2(a INT) ENGINE = MERGE UNION = (t7, t8);
ALTER TABLE mysqltest_db2.t2_2 UNION = (t9);
ALTER TABLE mysqltest_db2.t2_2 UNION = ();
diff --git a/mysql-test/main/grant4.result b/mysql-test/main/grant4.result
index 5ee7081e98e..5ceee9c0660 100644
--- a/mysql-test/main/grant4.result
+++ b/mysql-test/main/grant4.result
@@ -30,23 +30,23 @@ a int(11) YES NULL
** SHOW COLUMNS
** Should fail because there are no privileges on any column combination.
show columns from mysqltest_db1.t_no_priv;
-ERROR 42000: SELECT command denied to user 'mysqltest_u1'@'localhost' for table 't_no_priv'
+ERROR 42000: SELECT command denied to user 'mysqltest_u1'@'localhost' for table `mysqltest_db1`.`t_no_priv`
** However, select from I_S.COLUMNS will succeed but not show anything:
select column_name as 'Field',column_type as 'Type',is_nullable as 'Null',column_key as 'Key',column_default as 'Default',extra as 'Extra' from information_schema.columns where table_schema='mysqltest_db1' and table_name='t_no_priv';
Field Type Null Key Default Extra
** CREATE TABLE ... LIKE ... require SELECT privleges and will fail.
create table test.t_no_priv like mysqltest_db1.column_priv_only;
-ERROR 42000: SELECT command denied to user 'mysqltest_u1'@'localhost' for table 'column_priv_only'
+ERROR 42000: SELECT command denied to user 'mysqltest_u1'@'localhost' for table `mysqltest_db1`.`column_priv_only`
** Just to be sure... SELECT also fails.
select * from mysqltest_db1.t_column_priv_only;
-ERROR 42000: SELECT command denied to user 'mysqltest_u1'@'localhost' for table 't_column_priv_only'
+ERROR 42000: SELECT command denied to user 'mysqltest_u1'@'localhost' for table `mysqltest_db1`.`t_column_priv_only`
** SHOW CREATE TABLE ... require any privileges on all columns (the entire table).
** First we try and fail on a table with only one column privilege.
show create table mysqltest_db1.t_column_priv_only;
-ERROR 42000: SHOW command denied to user 'mysqltest_u1'@'localhost' for table 't_column_priv_only'
+ERROR 42000: SHOW command denied to user 'mysqltest_u1'@'localhost' for table `mysqltest_db1`.`t_column_priv_only`
** Now we do the same on a table with SELECT privileges.
@@ -72,7 +72,7 @@ t_select_priv CREATE TABLE `t_select_priv` (
** SHOW CREATE TABLE will fail if there is no grants at all:
show create table mysqltest_db1.t_no_priv;
-ERROR 42000: SHOW command denied to user 'mysqltest_u1'@'localhost' for table 't_no_priv'
+ERROR 42000: SHOW command denied to user 'mysqltest_u1'@'localhost' for table `mysqltest_db1`.`t_no_priv`
connection default;
use mysqltest_db1;
@@ -97,7 +97,7 @@ SELECT * FROM INFORMATION_SCHEMA.STATISTICS WHERE table_name='t5';
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT INDEX_COMMENT
** SHOW INDEX FROM t5 will fail because we don't have any privileges on any column combination.
SHOW INDEX FROM t5;
-ERROR 42000: SELECT command denied to user 'mysqltest_u1'@'localhost' for table 't5'
+ERROR 42000: SELECT command denied to user 'mysqltest_u1'@'localhost' for table `mysqltest_db1`.`t5`
** SHOW INDEX FROM t6 will succeed because there exist a privilege on a column combination on t6.
SHOW INDEX FROM t6;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -108,20 +108,20 @@ Table Op Msg_type Msg_text
mysqltest_db1.t6 check status OK
** With no privileges access is naturally denied:
CHECK TABLE t5;
-ERROR 42000: SELECT command denied to user 'mysqltest_u1'@'localhost' for table 't5'
+ERROR 42000: SELECT command denied to user 'mysqltest_u1'@'localhost' for table `mysqltest_db1`.`t5`
** CHECKSUM TABLE requires SELECT privileges on the table. The following should fail:
CHECKSUM TABLE t6;
-ERROR 42000: SELECT command denied to user 'mysqltest_u1'@'localhost' for table 't6'
+ERROR 42000: SELECT command denied to user 'mysqltest_u1'@'localhost' for table `mysqltest_db1`.`t6`
** And this should work:
CHECKSUM TABLE t_select_priv;
Table Checksum
mysqltest_db1.t_select_priv 0
SHOW CREATE VIEW v5;
-ERROR 42000: SELECT command denied to user 'mysqltest_u1'@'localhost' for table 'v5'
+ERROR 42000: SELECT command denied to user 'mysqltest_u1'@'localhost' for table `mysqltest_db1`.`v5`
SHOW CREATE VIEW v6;
-ERROR 42000: SELECT command denied to user 'mysqltest_u1'@'localhost' for table 'v6'
+ERROR 42000: SELECT command denied to user 'mysqltest_u1'@'localhost' for table `mysqltest_db1`.`v6`
SHOW CREATE VIEW v2;
-ERROR 42000: SELECT command denied to user 'mysqltest_u1'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'mysqltest_u1'@'localhost' for table `mysqltest_db1`.`v2`
SHOW CREATE VIEW v3;
View Create View character_set_client collation_connection
v3 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v3` AS select `t_select_priv`.`a` AS `a`,`t_select_priv`.`b` AS `b` from `t_select_priv` latin1 latin1_swedish_ci
@@ -189,10 +189,10 @@ mysqltest_db1.t1 check error Corrupt
# The below statement should fail before repairing t1.
# Otherwise info about such repair will be missing from its result-set.
repair table mysqltest_db1.t1, mysqltest_db1.t2;
-ERROR 42000: SELECT, INSERT command denied to user 'mysqltest_u1'@'localhost' for table 't2'
+ERROR 42000: SELECT, INSERT command denied to user 'mysqltest_u1'@'localhost' for table `mysqltest_db1`.`t2`
# The same is true for CHECK TABLE statement.
check table mysqltest_db1.t1, mysqltest_db1.t2;
-ERROR 42000: SELECT command denied to user 'mysqltest_u1'@'localhost' for table 't2'
+ERROR 42000: SELECT command denied to user 'mysqltest_u1'@'localhost' for table `mysqltest_db1`.`t2`
check table mysqltest_db1.t1;
Table Op Msg_type Msg_text
mysqltest_db1.t1 check warning Table is marked as crashed
diff --git a/mysql-test/main/grant5.result b/mysql-test/main/grant5.result
index 83cd8677089..7868effeb2c 100644
--- a/mysql-test/main/grant5.result
+++ b/mysql-test/main/grant5.result
@@ -181,4 +181,65 @@ GRANT USAGE ON *.* TO `test-user`@`%`
SET DEFAULT ROLE `r``o'l"e` FOR `test-user`@`%`
DROP ROLE `r``o'l"e`;
DROP USER 'test-user';
+#
+# MDEV-28548: ER_TABLEACCESS_DENIED_ERROR is missing information about DB
+#
+create database db1;
+create user foo@localhost;
+grant create on db1.* to foo@localhost;
+connect con1,localhost,foo,,db1;
+create table t(t int);
+show columns in t;
+ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table `db1`.`t`
+show columns in db1.t;
+ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table `db1`.`t`
+create view t_v as select * from t;
+ERROR 42000: CREATE VIEW command denied to user 'foo'@'localhost' for table `db1`.`t_v`
+show create view t_v;
+ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table `db1`.`t_v`
+create table t2(id int primary key, b int);
+create table t3(a int, b int, CONSTRAINT `fk_db2_db1_t1`
+ FOREIGN KEY (a)
+REFERENCES `db1 `.t1 (a)
+ON DELETE CASCADE
+ON UPDATE RESTRICT);
+ERROR 42000: Incorrect database name 'db1 '
+create table t3(a int, b int, CONSTRAINT `fk_db2_db3_t1`
+ FOREIGN KEY (a)
+REFERENCES db3.t1 (a)
+ON DELETE CASCADE
+ON UPDATE RESTRICT);
+ERROR 42000: REFERENCES command denied to user 'foo'@'localhost' for table `db3`.`t1`
+create table t1(a int, b int, CONSTRAINT `fk_db2_db3_t1`
+ FOREIGN KEY (a)
+REFERENCES t2 (id)
+ON DELETE CASCADE
+ON UPDATE RESTRICT);
+ERROR 42000: REFERENCES command denied to user 'foo'@'localhost' for table `db1`.`t2`
+connection default;
+disconnect con1;
+grant create view, select on db1.* to foo@localhost;
+connect con1,localhost,foo,,db1;
+create view t_v as select * from t;
+show grants;
+Grants for foo@localhost
+GRANT USAGE ON *.* TO `foo`@`localhost`
+GRANT SELECT, CREATE, CREATE VIEW ON `db1`.* TO `foo`@`localhost`
+show create view t_v;
+ERROR 42000: SHOW VIEW command denied to user 'foo'@'localhost' for table `db1`.`t_v`
+connection default;
+disconnect con1;
+grant show view on db1.* to foo@localhost;
+connect con1,localhost,foo,,db1;
+show grants;
+Grants for foo@localhost
+GRANT USAGE ON *.* TO `foo`@`localhost`
+GRANT SELECT, CREATE, CREATE VIEW, SHOW VIEW ON `db1`.* TO `foo`@`localhost`
+show create view t_v;
+View Create View character_set_client collation_connection
+t_v CREATE ALGORITHM=UNDEFINED DEFINER=`foo`@`localhost` SQL SECURITY DEFINER VIEW `t_v` AS select `t`.`t` AS `t` from `t` latin1 latin1_swedish_ci
+connection default;
+disconnect con1;
+drop database db1;
+drop user foo@localhost;
# End of 10.3 tests
diff --git a/mysql-test/main/grant5.test b/mysql-test/main/grant5.test
index bd711640acb..dc61c10646b 100644
--- a/mysql-test/main/grant5.test
+++ b/mysql-test/main/grant5.test
@@ -135,4 +135,76 @@ SHOW GRANTS FOR 'test-user';
DROP ROLE `r``o'l"e`;
DROP USER 'test-user';
+--echo #
+--echo # MDEV-28548: ER_TABLEACCESS_DENIED_ERROR is missing information about DB
+--echo #
+
+create database db1;
+create user foo@localhost;
+grant create on db1.* to foo@localhost;
+
+--connect (con1,localhost,foo,,db1)
+create table t(t int);
+--error ER_TABLEACCESS_DENIED_ERROR
+show columns in t;
+--error ER_TABLEACCESS_DENIED_ERROR
+show columns in db1.t;
+# CREATE_VIEW_ACL needed
+--error ER_TABLEACCESS_DENIED_ERROR
+create view t_v as select * from t;
+# show create view needs to have SELECT_ACL and SHOW_VIEW_ACL
+--error ER_TABLEACCESS_DENIED_ERROR
+show create view t_v;
+
+create table t2(id int primary key, b int);
+
+# Reference non existing DB with wrong DB name
+--error ER_WRONG_DB_NAME
+create table t3(a int, b int, CONSTRAINT `fk_db2_db1_t1`
+ FOREIGN KEY (a)
+ REFERENCES `db1 `.t1 (a)
+ ON DELETE CASCADE
+ ON UPDATE RESTRICT);
+
+# Reference non-existing DB (with qualified DB name)
+--error ER_TABLEACCESS_DENIED_ERROR
+create table t3(a int, b int, CONSTRAINT `fk_db2_db3_t1`
+ FOREIGN KEY (a)
+ REFERENCES db3.t1 (a)
+ ON DELETE CASCADE
+ ON UPDATE RESTRICT);
+
+# Reference DB (with not qualified DB name)
+--error ER_TABLEACCESS_DENIED_ERROR
+create table t1(a int, b int, CONSTRAINT `fk_db2_db3_t1`
+ FOREIGN KEY (a)
+ REFERENCES t2 (id)
+ ON DELETE CASCADE
+ ON UPDATE RESTRICT);
+
+--connection default
+--disconnect con1
+# Add CREATE_VIEW_ACL and SELECT_ACL
+grant create view, select on db1.* to foo@localhost;
+
+--connect (con1,localhost,foo,,db1)
+create view t_v as select * from t;
+show grants;
+--error ER_TABLEACCESS_DENIED_ERROR
+show create view t_v;
+
+--connection default
+--disconnect con1
+# Add SHOW_VIEW_ACL
+grant show view on db1.* to foo@localhost;
+
+--connect (con1,localhost,foo,,db1)
+show grants;
+show create view t_v;
+
+--connection default
+--disconnect con1
+drop database db1;
+drop user foo@localhost;
+
--echo # End of 10.3 tests
diff --git a/mysql-test/main/grant_cache_no_prot.result b/mysql-test/main/grant_cache_no_prot.result
index 780fb254b76..1ecfc308422 100644
--- a/mysql-test/main/grant_cache_no_prot.result
+++ b/mysql-test/main/grant_cache_no_prot.result
@@ -154,7 +154,7 @@ a b c a
1 1 1 test.t1
2 2 2 test.t1
select * from t2;
-ERROR 42000: SELECT command denied to user 'mysqltest_2'@'localhost' for table 't2'
+ERROR 42000: SELECT command denied to user 'mysqltest_2'@'localhost' for table `mysqltest`.`t2`
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 6
@@ -170,7 +170,7 @@ select "user3";
user3
user3
select * from t1;
-ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for table `mysqltest`.`t1`
select a from t1;
a
1
@@ -178,7 +178,7 @@ a
select c from t1;
ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for column 'c' in table 't1'
select * from t2;
-ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for table 't2'
+ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for table `mysqltest`.`t2`
select mysqltest.t1.c from test.t1,mysqltest.t1;
ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for column 'c' in table 't1'
show status like "Qcache_queries_in_cache";
diff --git a/mysql-test/main/grant_cache_ps_prot.result b/mysql-test/main/grant_cache_ps_prot.result
index 9dcf8c4aa8f..d6f343d6459 100644
--- a/mysql-test/main/grant_cache_ps_prot.result
+++ b/mysql-test/main/grant_cache_ps_prot.result
@@ -154,7 +154,7 @@ a b c a
1 1 1 test.t1
2 2 2 test.t1
select * from t2;
-ERROR 42000: SELECT command denied to user 'mysqltest_2'@'localhost' for table 't2'
+ERROR 42000: SELECT command denied to user 'mysqltest_2'@'localhost' for table `mysqltest`.`t2`
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 6
@@ -170,7 +170,7 @@ select "user3";
user3
user3
select * from t1;
-ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for table `mysqltest`.`t1`
select a from t1;
a
1
@@ -178,7 +178,7 @@ a
select c from t1;
ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for column 'c' in table 't1'
select * from t2;
-ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for table 't2'
+ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for table `mysqltest`.`t2`
select mysqltest.t1.c from test.t1,mysqltest.t1;
ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for column 'c' in table 't1'
show status like "Qcache_queries_in_cache";
diff --git a/mysql-test/main/grant_explain_non_select.result b/mysql-test/main/grant_explain_non_select.result
index 53b7d687d6c..8400b03ce9f 100644
--- a/mysql-test/main/grant_explain_non_select.result
+++ b/mysql-test/main/grant_explain_non_select.result
@@ -10,13 +10,13 @@ connect con1,localhost,privtest,,;
connection con1;
USE privtest_db;
EXPLAIN INSERT INTO t1 VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
INSERT INTO t1 VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN INSERT INTO t1 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
INSERT INTO t1 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
connection default;
GRANT INSERT ON privtest_db.t1 TO 'privtest'@'localhost';
connection con1;
@@ -32,36 +32,36 @@ connection default;
REVOKE ALL PRIVILEGES ON privtest_db.t1 FROM 'privtest'@'localhost';
connection con1;
EXPLAIN REPLACE INTO t1 VALUES (10);
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
REPLACE INTO t1 VALUES (10);
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN REPLACE INTO t1 SELECT * FROM t2;
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
REPLACE INTO t1 SELECT * FROM t2;
-ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
connection default;
GRANT INSERT ON privtest_db.t1 TO 'privtest'@'localhost';
connection con1;
EXPLAIN REPLACE INTO t1 VALUES (10);
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
REPLACE INTO t1 VALUES (10);
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN REPLACE INTO t1 SELECT * FROM t2;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
REPLACE INTO t1 SELECT * FROM t2;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
connection default;
REVOKE INSERT ON privtest_db.t1 FROM 'privtest'@'localhost';
GRANT DELETE ON privtest_db.t1 TO 'privtest'@'localhost';
connection con1;
EXPLAIN REPLACE INTO t1 VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
REPLACE INTO t1 VALUES (10);
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN REPLACE INTO t1 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
REPLACE INTO t1 SELECT * FROM t2;
-ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
connection default;
GRANT INSERT, DELETE ON privtest_db.t1 TO 'privtest'@'localhost';
connection con1;
@@ -77,13 +77,13 @@ connection default;
REVOKE ALL PRIVILEGES ON privtest_db.t1 FROM 'privtest'@'localhost';
connection con1;
EXPLAIN UPDATE t1 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
UPDATE t1 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN UPDATE t1, t2 SET t1.a = t1.a + 1 WHERE t1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
UPDATE t1, t2 SET t1.a = t1.a + 1 WHERE t1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
connection default;
GRANT UPDATE ON privtest_db.t1 TO 'privtest'@'localhost';
connection con1;
@@ -100,13 +100,13 @@ REVOKE UPDATE ON privtest_db.t1 FROM 'privtest'@'localhost';
GRANT SELECT ON privtest_db.t1 TO 'privtest'@'localhost';
connection con1;
EXPLAIN UPDATE t1 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
UPDATE t1 SET a = a + 1;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN UPDATE t1, t2 SET t1.a = t1.a + 1 WHERE t1.a = t2.a;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
UPDATE t1, t2 SET t1.a = t1.a + 1 WHERE t1.a = t2.a;
-ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
connection default;
GRANT UPDATE, SELECT ON privtest_db.t1 TO 'privtest'@'localhost';
connection con1;
@@ -123,13 +123,13 @@ connection default;
REVOKE ALL PRIVILEGES ON privtest_db.t1 FROM 'privtest'@'localhost';
connection con1;
EXPLAIN DELETE FROM t1 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
DELETE FROM t1 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN DELETE FROM t1 USING t1, t2 WHERE t1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
DELETE FROM t1 USING t1, t2 WHERE t1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
connection default;
GRANT DELETE ON privtest_db.t1 TO 'privtest'@'localhost';
connection con1;
@@ -138,21 +138,21 @@ ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for column 'a'
DELETE FROM t1 WHERE a = 10;
ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for column 'a' in table 't1'
EXPLAIN DELETE FROM t1 USING t1, t2 WHERE t1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
DELETE FROM t1 USING t1, t2 WHERE t1.a = t2.a;
-ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
connection default;
REVOKE ALL PRIVILEGES ON privtest_db.t1 FROM 'privtest'@'localhost';
GRANT SELECT ON privtest_db.t1 TO 'privtest'@'localhost';
connection con1;
EXPLAIN DELETE FROM t1 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
DELETE FROM t1 WHERE a = 10;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
EXPLAIN DELETE FROM t1 USING t1, t2 WHERE t1.a = t2.a;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
DELETE FROM t1 USING t1, t2 WHERE t1.a = t2.a;
-ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 't1'
+ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table `privtest_db`.`t1`
connection default;
REVOKE ALL PRIVILEGES ON privtest_db.t1 FROM 'privtest'@'localhost';
GRANT DELETE, SELECT ON privtest_db.t1 TO 'privtest'@'localhost';
diff --git a/mysql-test/main/grant_lowercase_fs.result b/mysql-test/main/grant_lowercase_fs.result
index e883067eca0..413c3f482a6 100644
--- a/mysql-test/main/grant_lowercase_fs.result
+++ b/mysql-test/main/grant_lowercase_fs.result
@@ -6,12 +6,12 @@ GRANT SELECT ON db1.* to USER_1@localhost;
connect con1,localhost,user_1,,db1;
CREATE TABLE t1(f1 int);
SELECT * FROM t1;
-ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db1`.`t1`
connect con2,localhost,USER_1,,db1;
SELECT * FROM t1;
f1
CREATE TABLE t2(f1 int);
-ERROR 42000: CREATE command denied to user 'USER_1'@'localhost' for table 't2'
+ERROR 42000: CREATE command denied to user 'USER_1'@'localhost' for table `db1`.`t2`
connection default;
disconnect con1;
disconnect con2;
diff --git a/mysql-test/main/information_schema_db.result b/mysql-test/main/information_schema_db.result
index a724340e8aa..3b97b1a4c2d 100644
--- a/mysql-test/main/information_schema_db.result
+++ b/mysql-test/main/information_schema_db.result
@@ -161,17 +161,17 @@ use testdb_1;
revoke select,show view on v6 from testdb_2@localhost;
connection testdb_2;
show fields from testdb_1.v5;
-ERROR 42000: SELECT command denied to user 'testdb_2'@'localhost' for table 'v5'
+ERROR 42000: SELECT command denied to user 'testdb_2'@'localhost' for table `testdb_1`.`v5`
show create view testdb_1.v5;
-ERROR 42000: SELECT command denied to user 'testdb_2'@'localhost' for table 'v5'
+ERROR 42000: SELECT command denied to user 'testdb_2'@'localhost' for table `testdb_1`.`v5`
show fields from testdb_1.v6;
-ERROR 42000: SELECT command denied to user 'testdb_2'@'localhost' for table 'v6'
+ERROR 42000: SELECT command denied to user 'testdb_2'@'localhost' for table `testdb_1`.`v6`
show create view testdb_1.v6;
-ERROR 42000: SELECT command denied to user 'testdb_2'@'localhost' for table 'v6'
+ERROR 42000: SELECT command denied to user 'testdb_2'@'localhost' for table `testdb_1`.`v6`
show fields from testdb_1.v7;
-ERROR 42000: SELECT command denied to user 'testdb_2'@'localhost' for table 'v7'
+ERROR 42000: SELECT command denied to user 'testdb_2'@'localhost' for table `testdb_1`.`v7`
show create view testdb_1.v7;
-ERROR 42000: SELECT command denied to user 'testdb_2'@'localhost' for table 'v7'
+ERROR 42000: SELECT command denied to user 'testdb_2'@'localhost' for table `testdb_1`.`v7`
show create view v4;
View Create View character_set_client collation_connection
v4 CREATE ALGORITHM=UNDEFINED DEFINER=`testdb_2`@`localhost` SQL SECURITY DEFINER VIEW `v4` AS select `v3`.`f1` AS `f1`,`v3`.`f2` AS `f2` from `testdb_1`.`v3` latin1 latin1_swedish_ci
@@ -189,7 +189,7 @@ show create view v2;
View Create View character_set_client collation_connection
v2 CREATE ALGORITHM=UNDEFINED DEFINER=`testdb_2`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS select `v1`.`f1` AS `f1` from `testdb_1`.`v1` latin1 latin1_swedish_ci
show create view testdb_1.v1;
-ERROR 42000: SELECT command denied to user 'testdb_2'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'testdb_2'@'localhost' for table `testdb_1`.`v1`
select table_name from information_schema.columns a
where a.table_name = 'v2';
table_name
@@ -236,7 +236,7 @@ where table_name='v1';
table_schema table_name view_definition
testdb_1 v1
show create view testdb_1.v1;
-ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table `testdb_1`.`v1`
connection default;
drop user mysqltest_1@localhost;
drop database testdb_1;
diff --git a/mysql-test/main/insert_notembedded.result b/mysql-test/main/insert_notembedded.result
index 8dd4aa7d71e..5df69cc8ffe 100644
--- a/mysql-test/main/insert_notembedded.result
+++ b/mysql-test/main/insert_notembedded.result
@@ -38,7 +38,7 @@ INNER JOIN view_stations AS stations
ON table_source.id = stations.icao
LEFT JOIN table_target AS old
USING (mexs_id);
-ERROR 42000: INSERT, DELETE command denied to user 'user20989'@'localhost' for table 'table_target'
+ERROR 42000: INSERT, DELETE command denied to user 'user20989'@'localhost' for table `meow`.`table_target`
REPLACE INTO view_target2
SELECT stations.mexs_id AS mexs_id, datetime AS messzeit
FROM table_source
@@ -46,7 +46,7 @@ INNER JOIN view_stations AS stations
ON table_source.id = stations.icao
LEFT JOIN view_target2 AS old
USING (mexs_id);
-ERROR 42000: INSERT, DELETE command denied to user 'user20989'@'localhost' for table 'view_target2'
+ERROR 42000: INSERT, DELETE command denied to user 'user20989'@'localhost' for table `meow`.`view_target2`
REPLACE INTO view_target3
SELECT stations.mexs_id AS mexs_id, datetime AS messzeit
FROM table_source
@@ -70,7 +70,7 @@ ON table_source.id = stations.icao
LEFT JOIN table_target AS old
USING (mexs_id);
REPLACE INTO table_target2 VALUES ('00X45Y78','2006-07-12 07:50:00');
-ERROR 42000: INSERT, DELETE command denied to user 'user20989'@'localhost' for table 'table_target2'
+ERROR 42000: INSERT, DELETE command denied to user 'user20989'@'localhost' for table `meow`.`table_target2`
REPLACE INTO view_target2 VALUES ('12X45Y78','2006-07-12 07:50:00');
SELECT stations.mexs_id AS mexs_id, datetime AS messzeit
FROM table_source
diff --git a/mysql-test/main/invisible_field_grant_completely.result b/mysql-test/main/invisible_field_grant_completely.result
index aa0a768c51c..b1b313072b2 100644
--- a/mysql-test/main/invisible_field_grant_completely.result
+++ b/mysql-test/main/invisible_field_grant_completely.result
@@ -51,9 +51,9 @@ connection default;
REVOKE ALL PRIVILEGES, GRANT OPTION FROM user_1;
connection con1;
select * from t1;
-ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `d`.`t1`
select invisible from t1;
-ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `d`.`t1`
disconnect con1;
#Final Cleanup
diff --git a/mysql-test/main/invisible_field_grant_system.result b/mysql-test/main/invisible_field_grant_system.result
index b69478c58b3..d2e40c391c4 100644
--- a/mysql-test/main/invisible_field_grant_system.result
+++ b/mysql-test/main/invisible_field_grant_system.result
@@ -57,9 +57,9 @@ connection default;
REVOKE ALL PRIVILEGES, GRANT OPTION FROM user_1;
connection con1;
select * from t1;
-ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `d`.`t1`
select count(row_start) from t1;
-ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `d`.`t1`
disconnect con1;
#Cleanup
diff --git a/mysql-test/main/kill.result b/mysql-test/main/kill.result
index 8f9adafada2..4a8bc39b92a 100644
--- a/mysql-test/main/kill.result
+++ b/mysql-test/main/kill.result
@@ -327,6 +327,8 @@ drop table t2;
#
# Test kill USER
#
+set global sql_mode=default;
+set global sql_mode='';
grant ALL on test.* to test@localhost;
grant ALL on test.* to test2@localhost;
connect con3, localhost, test,,;
diff --git a/mysql-test/main/kill.test b/mysql-test/main/kill.test
index 6374e8ba1fe..f7fe0f38272 100644
--- a/mysql-test/main/kill.test
+++ b/mysql-test/main/kill.test
@@ -507,6 +507,9 @@ drop table t2;
--echo #
--echo # Test kill USER
--echo #
+set global sql_mode=default;
+--source include/count_sessions.inc
+set global sql_mode='';
grant ALL on test.* to test@localhost;
grant ALL on test.* to test2@localhost;
connect (con3, localhost, test,,);
@@ -531,6 +534,7 @@ connection con4;
--error 2013,2006,5014
select 1;
connection default;
+--source include/wait_until_count_sessions.inc
--echo #
--echo # MDEV-4911 - add KILL query id, and add query id information to
diff --git a/mysql-test/main/log_slow.test b/mysql-test/main/log_slow.test
index 64fd8202985..b51777d859e 100644
--- a/mysql-test/main/log_slow.test
+++ b/mysql-test/main/log_slow.test
@@ -1,3 +1,5 @@
+--source include/no_valgrind_without_big.inc
+
#
# Testing of slow log query options
#
diff --git a/mysql-test/main/lowercase_fs_off.result b/mysql-test/main/lowercase_fs_off.result
index 3f0b08a78c4..168d5f53c16 100644
--- a/mysql-test/main/lowercase_fs_off.result
+++ b/mysql-test/main/lowercase_fs_off.result
@@ -27,7 +27,7 @@ CREATE TABLE t1(f1 INT);
GRANT SELECT ON T1 to user_1@localhost;
connect con1,localhost,user_1,,d1;
select * from t1;
-ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `d1`.`t1`
select * from T1;
f1
connection default;
diff --git a/mysql-test/main/mysql_upgrade.test b/mysql-test/main/mysql_upgrade.test
index 898fd804a9d..acc4fc31d65 100644
--- a/mysql-test/main/mysql_upgrade.test
+++ b/mysql-test/main/mysql_upgrade.test
@@ -2,6 +2,7 @@
-- source include/have_working_dns.inc
-- source include/have_innodb.inc
-- source include/have_partition.inc
+-- source include/no_valgrind_without_big.inc
set sql_mode="";
diff --git a/mysql-test/main/mysqlbinlog.result b/mysql-test/main/mysqlbinlog.result
index 4c82563e0f6..02aea1c1e45 100644
--- a/mysql-test/main/mysqlbinlog.result
+++ b/mysql-test/main/mysqlbinlog.result
@@ -666,7 +666,7 @@ connect unsecure,localhost,untrusted,,mysqltest1;
mysql mysqltest1 -uuntrusted < var/tmp/bug31611.sql
connection unsecure;
INSERT INTO t1 VALUES (1,USER());
-ERROR 42000: INSERT command denied to user 'untrusted'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'untrusted'@'localhost' for table `mysqltest1`.`t1`
SELECT * FROM t1;
a b
1 root@localhost
diff --git a/mysql-test/main/mysqldump.result b/mysql-test/main/mysqldump.result
index 157f882a404..afaafb4907c 100644
--- a/mysql-test/main/mysqldump.result
+++ b/mysql-test/main/mysqldump.result
@@ -1866,6 +1866,7 @@ drop table `t1`;
create table t1(a int);
create table t2(a int);
create table t3(a int);
+mysqldump: Couldn't find table: "non_existing"
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -3441,6 +3442,8 @@ create table t1 ( id serial );
create view v1 as select * from t1;
drop table t1;
mysqldump {
+mysqldump: Got error: 1356: "View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them" when using LOCK TABLES
+mysqldump: Couldn't execute 'SHOW FIELDS FROM `v1`': View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them (1356)
-- failed on view `v1`: CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `test`.`t1`.`id` AS `id` from `t1`
@@ -3734,6 +3737,9 @@ DROP TABLE t1;
CREATE TABLE t1(a int);
INSERT INTO t1 VALUES (1), (2);
mysqldump: Input filename too long: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+mysqldump: Got error: 1083: "Field separator argument is not what is expected; check the manual" when executing 'SELECT INTO OUTFILE'
+mysqldump: Got error: 1083: "Field separator argument is not what is expected; check the manual" when executing 'SELECT INTO OUTFILE'
+mysqldump: Got error: 1083: "Field separator argument is not what is expected; check the manual" when executing 'SELECT INTO OUTFILE'
DROP TABLE t1;
CREATE TABLE t2 (a INT) ENGINE=MyISAM;
CREATE TABLE t3 (a INT) ENGINE=MyISAM;
@@ -3827,6 +3833,7 @@ grant all privileges on mysqldump_test_db.* to user2;
connect user27293,localhost,user1,,mysqldump_test_db,$MASTER_MYPORT,$MASTER_MYSOCK;
connection user27293;
create procedure mysqldump_test_db.sp1() select 'hello';
+mysqldump: user2 has insufficient privileges to SHOW CREATE PROCEDURE `sp1`!
-- insufficient privileges to SHOW CREATE PROCEDURE `sp1`
-- does user2 have permissions on mysql.proc?
@@ -4058,6 +4065,7 @@ UNLOCK TABLES;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
+mysqldump: Got error: 1146: "Table 'test.???????????????????????' doesn't exist" when using LOCK TABLES
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
@@ -4281,6 +4289,7 @@ Abernathy
aberrant
aberration
drop table words;
+mysqlimport: Error: 1146, Table 'test.words' doesn't exist, when using table: words
drop table t1;
drop table t2;
drop table words2;
@@ -4601,6 +4610,8 @@ CREATE TABLE t1 (a INT, b CHAR(10) CHARSET koi8r, c CHAR(10) CHARSET latin1);
CREATE TABLE t2 LIKE t1;
INSERT INTO t1 VALUES (1, 'ABC-ÐБВ', 'DEF-ÂÃÄ'), (2, NULL, NULL);
# error on multi-character ENCLOSED/ESCAPED BY
+mysqldump: Got error: 1083: "Field separator argument is not what is expected; check the manual" when executing 'SELECT INTO OUTFILE'
+mysqldump: Got error: 1083: "Field separator argument is not what is expected; check the manual" when executing 'SELECT INTO OUTFILE'
# default '--default-charset' (binary):
##################################################
1 ABC-áâ÷ DEF-ÂÃÄ
@@ -5087,6 +5098,7 @@ connection conn_1;
<field name="c1">3</field>
</row>
</table_data>
+mysqldump: user1 has insufficient privileges to SHOW CREATE FUNCTION `hello1`!
<triggers name="t2">
<trigger Trigger="trig1" sql_mode="" character_set_client="latin1" collation_connection="latin1_swedish_ci" Database_Collation="latin1_swedish_ci" Created="--TIME--">
<![CDATA[
@@ -5390,6 +5402,8 @@ ROUTINE_NAME
proc
one
DROP DATABASE bug25717383;
+mysqldump: Got error: 2005: "Unknown MySQL server host 'unknownhost'" when trying to connect
+mysqldump: Couldn't execute 'SHOW SLAVE STATUS': MySQL server has gone away (2006)
Usage: mysqldump [OPTIONS] database [tables]
OR mysqldump [OPTIONS] --databases DB1 [DB2 DB3...]
OR mysqldump [OPTIONS] --all-databases
@@ -5619,6 +5633,7 @@ t1_id int,
CONSTRAINT fk
FOREIGN KEY (t1_id) REFERENCES t1 (id)
) ENGINE = InnoDB;
+mysqlimport: Error: 1452, Cannot add or update a child row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `fk` FOREIGN KEY (`t1_id`) REFERENCES `t1` (`id`)), when using table: t2
select count(*) from t2;
count(*)
1
@@ -6297,6 +6312,7 @@ j integer
INSERT INTO t VALUES (1,1),(2,2),(3,3),(4,4);
# Dump database 1
# Restore from database 1 to database 2
+ERROR 1100 (HY000) at line 45: Table 'seq_t_i' was not locked with LOCK TABLES
SETVAL(`seq_t_i`, 1, 0)
1
DROP DATABASE IF EXISTS test1;
diff --git a/mysql-test/main/mysqldump.test b/mysql-test/main/mysqldump.test
index bf98a44bc34..89155a435b1 100644
--- a/mysql-test/main/mysqldump.test
+++ b/mysql-test/main/mysqldump.test
@@ -739,7 +739,7 @@ create table t2(a int);
create table t3(a int);
--replace_result mysqldump.exe mysqldump
--error 6
---exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-comments --force --no-data test t3 t1 non_existing t2
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-comments --force --no-data test t3 t1 non_existing t2 2>&1
drop table t1, t2, t3;
@@ -1288,7 +1288,7 @@ drop table t1;
--echo mysqldump {
--replace_result mysqldump.exe mysqldump
--error 2
---exec $MYSQL_DUMP --default-character-set=utf8mb4 --force -N --compact --skip-comments test
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --force -N --compact --skip-comments test 2>&1
--echo } mysqldump
drop view v1;
@@ -1526,13 +1526,13 @@ INSERT INTO t1 VALUES (1), (2);
--exec $MYSQL_DUMP --default-character-set=utf8mb4 --tab=$MYSQLTEST_VARDIR/tmp/ --fields-terminated-by=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa test
--replace_result mysqldump.exe mysqldump
--error 2
---exec $MYSQL_DUMP --default-character-set=utf8mb4 --tab=$MYSQLTEST_VARDIR/tmp/ --fields-enclosed-by=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa test
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --tab=$MYSQLTEST_VARDIR/tmp/ --fields-enclosed-by=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa test 2>&1
--replace_result mysqldump.exe mysqldump
--error 2
---exec $MYSQL_DUMP --default-character-set=utf8mb4 --tab=$MYSQLTEST_VARDIR/tmp/ --fields-optionally-enclosed-by=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa test
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --tab=$MYSQLTEST_VARDIR/tmp/ --fields-optionally-enclosed-by=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa test 2>&1
--replace_result mysqldump.exe mysqldump
--error 2
---exec $MYSQL_DUMP --default-character-set=utf8mb4 --tab=$MYSQLTEST_VARDIR/tmp/ --fields-escaped-by=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa test
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --tab=$MYSQLTEST_VARDIR/tmp/ --fields-escaped-by=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa test 2>&1
--exec $MYSQL_DUMP --default-character-set=utf8mb4 --tab=$MYSQLTEST_VARDIR/tmp/ --lines-terminated-by=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa test
--remove_file $MYSQLTEST_VARDIR/tmp/t1.sql
@@ -1606,7 +1606,7 @@ create procedure mysqldump_test_db.sp1() select 'hello';
--replace_result mysqldump.exe mysqldump
--error 2
---exec $MYSQL_DUMP -f --compact --user=user2 --password= -h 127.0.0.1 -P $MASTER_MYPORT --routines mysqldump_test_db
+--exec $MYSQL_DUMP -f --compact --user=user2 --password= -h 127.0.0.1 -P $MASTER_MYPORT --routines mysqldump_test_db 2>&1
--exec $MYSQL_DUMP -f --compact --user=user1 --password= -h 127.0.0.1 -P $MASTER_MYPORT --routines mysqldump_test_db
@@ -1712,7 +1712,7 @@ CREATE TABLE `כדשגכחךלדגכחשךדגחכךלדגכ` ( f1 INT );
--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --skip-comments --default-character-set=utf8 --compatible=mysql323 test
--replace_result mysqldump.exe mysqldump
--error 2
---exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --skip-comments --default-character-set=latin1 --compatible=mysql323 test
+--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --skip-comments --default-character-set=latin1 --compatible=mysql323 test 2>&1
DROP TABLE `כדשגכחךלדגכחשךדגחכךלדגכ`;
SET NAMES latin1;
@@ -1766,9 +1766,8 @@ select * from words2;
# Drop table "words" and run with threads, should fail
drop table words;
--replace_regex /.*mysqlimport(\.exe)*/mysqlimport/
---replace_result mysqldump.exe mysqldump
--error 1
---exec $MYSQL_IMPORT --silent --use-threads=2 test $MYSQLTEST_VARDIR/tmp/t1.txt $MYSQLTEST_VARDIR/tmp/t2.txt $MYSQLTEST_VARDIR/std_data/words.dat $MYSQLTEST_VARDIR/std_data/words2.dat
+--exec $MYSQL_IMPORT --silent --use-threads=2 test $MYSQLTEST_VARDIR/tmp/t1.txt $MYSQLTEST_VARDIR/tmp/t2.txt $MYSQLTEST_VARDIR/std_data/words.dat $MYSQLTEST_VARDIR/std_data/words2.dat 2>&1
drop table t1;
drop table t2;
@@ -2119,12 +2118,12 @@ INSERT INTO t1 VALUES (1, 'ABC-ÐБВ', 'DEF-ÂÃÄ'), (2, NULL, NULL);
--replace_result mysqldump.exe mysqldump
--error 2
---exec $MYSQL_DUMP --disable-default-character-set --tab=$MYSQLTEST_VARDIR/tmp/ --fields-enclosed-by='12345' test t1
+--exec $MYSQL_DUMP --disable-default-character-set --tab=$MYSQLTEST_VARDIR/tmp/ --fields-enclosed-by='12345' test t1 2>&1
--remove_file $file
--replace_result mysqldump.exe mysqldump
--error 2
---exec $MYSQL_DUMP --disable-default-character-set --tab=$MYSQLTEST_VARDIR/tmp/ --fields-escaped-by='12345' test t1
+--exec $MYSQL_DUMP --disable-default-character-set --tab=$MYSQLTEST_VARDIR/tmp/ --fields-escaped-by='12345' test t1 2>&1
--remove_file $file
--echo # default '--default-charset' (binary):
@@ -2338,7 +2337,7 @@ connection conn_1;
--replace_result mysqldump.exe mysqldump
--error 2
---exec $MYSQL_DUMP --user=user1 -R -E --triggers -X BUG52792
+--exec $MYSQL_DUMP --user=user1 -R -E --triggers -X BUG52792 2>&1
connection default;
disconnect conn_1;
@@ -2546,16 +2545,17 @@ DROP DATABASE bug25717383;
#
# MDEV-6091 mysqldump goes in a loop and segfaults if --dump-slave is specified and it cannot connect to the server
#
+--replace_regex /mysqldump\.exe/mysqldump/ /'unknownhost' \(.*\)/'unknownhost'/
--error 2
---exec $MYSQL_DUMP --default-character-set=utf8mb4 -hunknownhost --dump-slave nulldb
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 -hunknownhost --dump-slave nulldb 2>&1
#
# MDEV-6056 [PATCH] mysqldump writes usage to stdout even when not explicitly requested
#
--replace_result mysqldump.exe mysqldump
--error 1
---exec $MYSQL_DUMP --default-character-set=utf8mb4 --user=foo 2>&1 > $MYSQLTEST_VARDIR/tmp/bug6056.out
---exec $MYSQL_DUMP --help > $MYSQLTEST_VARDIR/tmp/bug6056.out
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --user=foo 2>&1
+--exec $MYSQL_DUMP --help 2>&1 > $MYSQLTEST_VARDIR/tmp/bug6056.out
--echo #
--echo # MDEV-9001 - [PATCH] Fix DB name quoting in mysqldump --routine
@@ -2675,8 +2675,9 @@ create table t2 (
0
EOF
+--replace_regex /.*mysqlimport(\.exe)*/mysqlimport/
--error 1
---exec $MYSQL_IMPORT --silent test $MYSQLTEST_VARDIR/tmp/t2.txt
+--exec $MYSQL_IMPORT --silent test $MYSQLTEST_VARDIR/tmp/t2.txt 2>&1
--exec $MYSQL_IMPORT --silent -k test $MYSQLTEST_VARDIR/tmp/t2.txt
select count(*) from t2;
@@ -2879,7 +2880,7 @@ INSERT INTO t VALUES (1,1),(2,2),(3,3),(4,4);
--echo # Restore from database 1 to database 2
--error 1
---exec $MYSQL test2 < $MYSQLTEST_VARDIR/tmp/dumptest1.sql
+--exec $MYSQL test2 < $MYSQLTEST_VARDIR/tmp/dumptest1.sql 2>&1
--remove_file $MYSQLTEST_VARDIR/tmp/dumptest1.sql
DROP DATABASE IF EXISTS test1;
diff --git a/mysql-test/main/openssl_1.result b/mysql-test/main/openssl_1.result
index a9c092948be..64672655ebe 100644
--- a/mysql-test/main/openssl_1.result
+++ b/mysql-test/main/openssl_1.result
@@ -22,7 +22,7 @@ select * from t1;
f1
5
delete from t1;
-ERROR 42000: DELETE command denied to user 'ssl_user1'@'localhost' for table 't1'
+ERROR 42000: DELETE command denied to user 'ssl_user1'@'localhost' for table `test`.`t1`
connection con3;
SELECT VARIABLE_VALUE <> '' AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher';
have_ssl
@@ -31,7 +31,7 @@ select * from t1;
f1
5
delete from t1;
-ERROR 42000: DELETE command denied to user 'ssl_user3'@'localhost' for table 't1'
+ERROR 42000: DELETE command denied to user 'ssl_user3'@'localhost' for table `test`.`t1`
connection con4;
SELECT VARIABLE_VALUE <> '' AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher';
have_ssl
@@ -40,7 +40,7 @@ select * from t1;
f1
5
delete from t1;
-ERROR 42000: DELETE command denied to user 'ssl_user4'@'localhost' for table 't1'
+ERROR 42000: DELETE command denied to user 'ssl_user4'@'localhost' for table `test`.`t1`
connection default;
disconnect con1;
disconnect con3;
diff --git a/mysql-test/main/partition_alter.result b/mysql-test/main/partition_alter.result
index 18142b63d10..2b0a09d2653 100644
--- a/mysql-test/main/partition_alter.result
+++ b/mysql-test/main/partition_alter.result
@@ -200,4 +200,15 @@ pk
2
delete from t1;
drop table t1;
+#
+# MDEV-28576 RENAME COLUMN with NOCOPY algorithm leads to corrupt partitioned table
+#
+create table t (a int, b int) partition by list (b) (partition p1 values in (1, 2));
+insert into t values (0, 1), (2, 2);
+alter table t change b f int, change a b int, algorithm=nocopy;
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+delete from t order by b limit 1;
+drop table t;
# End of 10.3 tests
diff --git a/mysql-test/main/partition_alter.test b/mysql-test/main/partition_alter.test
index 804b43dc3c2..7a80779e386 100644
--- a/mysql-test/main/partition_alter.test
+++ b/mysql-test/main/partition_alter.test
@@ -185,4 +185,15 @@ select * from t1 partition(p1);
delete from t1;
drop table t1;
+--echo #
+--echo # MDEV-28576 RENAME COLUMN with NOCOPY algorithm leads to corrupt partitioned table
+--echo #
+create table t (a int, b int) partition by list (b) (partition p1 values in (1, 2));
+insert into t values (0, 1), (2, 2);
+alter table t change b f int, change a b int, algorithm=nocopy;
+check table t;
+delete from t order by b limit 1;
+# cleanup
+drop table t;
+
--echo # End of 10.3 tests
diff --git a/mysql-test/main/partition_explicit_prune.result b/mysql-test/main/partition_explicit_prune.result
index 57068732b34..acb4175eac4 100644
--- a/mysql-test/main/partition_explicit_prune.result
+++ b/mysql-test/main/partition_explicit_prune.result
@@ -1888,7 +1888,7 @@ ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2;
SELECT * FROM t1 PARTITION (p0);
i
UNLOCK TABLES;
-DROP TABLE t1;
+DROP TABLE t1, t2;
#
# MDEV-18371 Server crashes in ha_innobase::cmp_ref upon UPDATE with PARTITION clause.
#
@@ -1906,4 +1906,82 @@ a b
4 3
8 2
2 6
-DROP TABLE t1, t2;
+DROP TABLE t1;
+#
+# MDEV-21134 Crash with partitioned table, PARTITION syntax, and index_merge.
+#
+create table t1 (
+pk int primary key,
+a int,
+b int,
+filler char(32),
+key (a),
+key (b)
+) engine=myisam partition by range(pk) (
+partition p0 values less than (10),
+partition p1 values less than MAXVALUE
+) ;
+insert into t1 select
+seq,
+MOD(seq, 100),
+MOD(seq, 100),
+'filler-data-filler-data'
+ from
+seq_1_to_5000;
+explain select * from t1 partition (p1) where a=10 and b=10;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 index_merge a,b a,b 5,5 NULL 1 Using intersect(a,b); Using where
+flush tables;
+select * from t1 partition (p1)where a=10 and b=10;
+pk a b filler
+10 10 10 filler-data-filler-data
+110 10 10 filler-data-filler-data
+210 10 10 filler-data-filler-data
+310 10 10 filler-data-filler-data
+410 10 10 filler-data-filler-data
+510 10 10 filler-data-filler-data
+610 10 10 filler-data-filler-data
+710 10 10 filler-data-filler-data
+810 10 10 filler-data-filler-data
+910 10 10 filler-data-filler-data
+1010 10 10 filler-data-filler-data
+1110 10 10 filler-data-filler-data
+1210 10 10 filler-data-filler-data
+1310 10 10 filler-data-filler-data
+1410 10 10 filler-data-filler-data
+1510 10 10 filler-data-filler-data
+1610 10 10 filler-data-filler-data
+1710 10 10 filler-data-filler-data
+1810 10 10 filler-data-filler-data
+1910 10 10 filler-data-filler-data
+2010 10 10 filler-data-filler-data
+2110 10 10 filler-data-filler-data
+2210 10 10 filler-data-filler-data
+2310 10 10 filler-data-filler-data
+2410 10 10 filler-data-filler-data
+2510 10 10 filler-data-filler-data
+2610 10 10 filler-data-filler-data
+2710 10 10 filler-data-filler-data
+2810 10 10 filler-data-filler-data
+2910 10 10 filler-data-filler-data
+3010 10 10 filler-data-filler-data
+3110 10 10 filler-data-filler-data
+3210 10 10 filler-data-filler-data
+3310 10 10 filler-data-filler-data
+3410 10 10 filler-data-filler-data
+3510 10 10 filler-data-filler-data
+3610 10 10 filler-data-filler-data
+3710 10 10 filler-data-filler-data
+3810 10 10 filler-data-filler-data
+3910 10 10 filler-data-filler-data
+4010 10 10 filler-data-filler-data
+4110 10 10 filler-data-filler-data
+4210 10 10 filler-data-filler-data
+4310 10 10 filler-data-filler-data
+4410 10 10 filler-data-filler-data
+4510 10 10 filler-data-filler-data
+4610 10 10 filler-data-filler-data
+4710 10 10 filler-data-filler-data
+4810 10 10 filler-data-filler-data
+4910 10 10 filler-data-filler-data
+DROP TABLE t1;
diff --git a/mysql-test/main/partition_explicit_prune.test b/mysql-test/main/partition_explicit_prune.test
index e630572dbce..72f0c2db797 100644
--- a/mysql-test/main/partition_explicit_prune.test
+++ b/mysql-test/main/partition_explicit_prune.test
@@ -1,5 +1,6 @@
--source include/have_innodb.inc
--source include/have_partition.inc
+--source include/have_sequence.inc
# Helper statement
let $get_handler_status_counts= SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
@@ -877,8 +878,9 @@ SELECT * FROM t1 PARTITION (p0);
ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2;
SELECT * FROM t1 PARTITION (p0);
UNLOCK TABLES;
-DROP TABLE t1;
+DROP TABLE t1, t2;
--enable_service_connection
+
--echo #
--echo # MDEV-18371 Server crashes in ha_innobase::cmp_ref upon UPDATE with PARTITION clause.
--echo #
@@ -888,7 +890,34 @@ INSERT INTO t1 VALUES (3,0),(8,2),(7,8),(3,4),(2,4),(0,7),(4,3),(3,6);
FLUSH TABLES;
UPDATE t1 PARTITION (p3,p1) SET a = 2 WHERE a = 3;
SELECT * FROM t1;
+DROP TABLE t1;
+--echo #
+--echo # MDEV-21134 Crash with partitioned table, PARTITION syntax, and index_merge.
+--echo #
-# Cleanup
-DROP TABLE t1, t2;
+create table t1 (
+ pk int primary key,
+ a int,
+ b int,
+ filler char(32),
+ key (a),
+ key (b)
+ ) engine=myisam partition by range(pk) (
+ partition p0 values less than (10),
+ partition p1 values less than MAXVALUE
+ ) ;
+
+insert into t1 select
+seq,
+ MOD(seq, 100),
+ MOD(seq, 100),
+ 'filler-data-filler-data'
+ from
+ seq_1_to_5000;
+
+explain select * from t1 partition (p1) where a=10 and b=10;
+flush tables;
+select * from t1 partition (p1)where a=10 and b=10;
+
+DROP TABLE t1;
diff --git a/mysql-test/main/partition_grant.result b/mysql-test/main/partition_grant.result
index 41934896aeb..c269896975d 100644
--- a/mysql-test/main/partition_grant.result
+++ b/mysql-test/main/partition_grant.result
@@ -14,7 +14,7 @@ GRANT USAGE ON *.* TO `mysqltest_1`@`localhost`
GRANT SELECT, ALTER ON `mysqltest_1`.* TO `mysqltest_1`@`localhost`
alter table t1 add b int;
alter table t1 drop partition p2;
-ERROR 42000: DROP command denied to user 'mysqltest_1'@'localhost' for table 't1'
+ERROR 42000: DROP command denied to user 'mysqltest_1'@'localhost' for table `mysqltest_1`.`t1`
disconnect conn1;
connection default;
grant drop on mysqltest_1.* to mysqltest_1@localhost;
@@ -25,7 +25,7 @@ connection default;
revoke alter on mysqltest_1.* from mysqltest_1@localhost;
connect conn3,localhost,mysqltest_1,,mysqltest_1;
alter table t1 drop partition p3;
-ERROR 42000: ALTER command denied to user 'mysqltest_1'@'localhost' for table 't1'
+ERROR 42000: ALTER command denied to user 'mysqltest_1'@'localhost' for table `mysqltest_1`.`t1`
disconnect conn3;
connection default;
revoke select,alter,drop on mysqltest_1.* from mysqltest_1@localhost;
diff --git a/mysql-test/main/plugin_auth.test b/mysql-test/main/plugin_auth.test
index 1700a755492..0fde2953352 100644
--- a/mysql-test/main/plugin_auth.test
+++ b/mysql-test/main/plugin_auth.test
@@ -2,6 +2,7 @@
--source include/not_embedded.inc
--source include/mysql_upgrade_preparation.inc
--source include/have_innodb.inc
+--source include/no_valgrind_without_big.inc
SET GLOBAL SQL_MODE="";
SET LOCAL SQL_MODE="";
diff --git a/mysql-test/main/plugin_not_embedded.result b/mysql-test/main/plugin_not_embedded.result
index 84e47b4a4bc..490dd2a0423 100644
--- a/mysql-test/main/plugin_not_embedded.result
+++ b/mysql-test/main/plugin_not_embedded.result
@@ -6,7 +6,7 @@ GRANT INSERT ON mysql.plugin TO bug51770@localhost;
connect con1,localhost,bug51770,,;
INSTALL PLUGIN example SONAME 'ha_example.so';
UNINSTALL PLUGIN example;
-ERROR 42000: DELETE command denied to user 'bug51770'@'localhost' for table 'plugin'
+ERROR 42000: DELETE command denied to user 'bug51770'@'localhost' for table `mysql`.`plugin`
connection default;
GRANT DELETE ON mysql.plugin TO bug51770@localhost;
connection con1;
diff --git a/mysql-test/main/ps_ddl.result b/mysql-test/main/ps_ddl.result
index 68acf50aee1..ffbc20f2c0b 100644
--- a/mysql-test/main/ps_ddl.result
+++ b/mysql-test/main/ps_ddl.result
@@ -214,7 +214,7 @@ new trigger: 10
drop trigger t1_bd;
set @val=11;
execute stmt using @val;
-call p_verify_reprepare_count(1);
+call p_verify_reprepare_count(0);
SUCCESS
select @message;
@@ -224,7 +224,7 @@ Test 6-e: removing a relevant trigger
drop trigger t1_bi;
set @val=12;
execute stmt using @val;
-call p_verify_reprepare_count(1);
+call p_verify_reprepare_count(0);
SUCCESS
select @message;
@@ -384,7 +384,7 @@ a
flush table t1;
set @var=9;
execute stmt using @var;
-call p_verify_reprepare_count(1);
+call p_verify_reprepare_count(0);
SUCCESS
select * from t2;
@@ -830,7 +830,7 @@ a b c
10 20 50
20 40 100
30 60 150
-call p_verify_reprepare_count(1);
+call p_verify_reprepare_count(0);
SUCCESS
# Check that we properly handle ALTER VIEW statements.
@@ -1206,7 +1206,7 @@ drop trigger v2_bi;
set @message=null;
set @var=9;
execute stmt using @var;
-call p_verify_reprepare_count(1);
+call p_verify_reprepare_count(0);
SUCCESS
select @message;
@@ -2578,7 +2578,7 @@ SELECT * FROM t1;
a
2048
1025
-1024
+2048
DROP TABLE t1;
#
# End of 10.1 tests
diff --git a/mysql-test/main/ps_ddl.test b/mysql-test/main/ps_ddl.test
index 915537fe951..4f23d308371 100644
--- a/mysql-test/main/ps_ddl.test
+++ b/mysql-test/main/ps_ddl.test
@@ -250,7 +250,8 @@ drop trigger t1_bd;
set @val=11;
execute stmt using @val;
-call p_verify_reprepare_count(1);
+# No trigger in opened table => nothing to check => no reprepare
+call p_verify_reprepare_count(0);
select @message;
--echo Test 6-e: removing a relevant trigger
@@ -259,7 +260,8 @@ drop trigger t1_bi;
set @val=12;
execute stmt using @val;
-call p_verify_reprepare_count(1);
+# No trigger in opened table => nothing to check => no reprepare
+call p_verify_reprepare_count(0);
select @message;
set @val=13;
execute stmt using @val;
@@ -374,7 +376,8 @@ select * from t3;
flush table t1;
set @var=9;
execute stmt using @var;
-call p_verify_reprepare_count(1);
+# flush tables now do not mean reprepare
+call p_verify_reprepare_count(0);
select * from t2;
select * from t3;
drop view v1;
@@ -743,7 +746,7 @@ call p_verify_reprepare_count(1);
flush table t2;
execute stmt;
-call p_verify_reprepare_count(1);
+call p_verify_reprepare_count(0);
--echo # Check that we properly handle ALTER VIEW statements.
execute stmt;
@@ -967,7 +970,8 @@ drop trigger v2_bi;
set @message=null;
set @var=9;
execute stmt using @var;
-call p_verify_reprepare_count(1);
+# No trigger in opened table => nothing to check => no reprepare
+call p_verify_reprepare_count(0);
select @message;
create trigger v2_bi after insert on v2 for each row set @message="v2_ai";
set @var= 10;
diff --git a/mysql-test/main/ps_grant.result b/mysql-test/main/ps_grant.result
index ab21c198b98..88410d6c83c 100644
--- a/mysql-test/main/ps_grant.result
+++ b/mysql-test/main/ps_grant.result
@@ -28,7 +28,7 @@ execute s_t9 ;
my_col
1
select a as my_col from t1;
-ERROR 42000: SELECT command denied to user 'second_user'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'second_user'@'localhost' for table `mysqltest`.`t1`
connection default;
grant select on mysqltest.t1 to second_user@localhost
identified by 'looser' ;
@@ -71,7 +71,7 @@ Grants for second_user@localhost
GRANT USAGE ON *.* TO `second_user`@`localhost` IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3'
GRANT SELECT ON `mysqltest`.`t9` TO `second_user`@`localhost`
execute s_t1 ;
-ERROR 42000: SELECT command denied to user 'second_user'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'second_user'@'localhost' for table `mysqltest`.`t1`
connection default;
disconnect con3;
revoke all privileges, grant option from second_user@localhost ;
diff --git a/mysql-test/main/show_check.result b/mysql-test/main/show_check.result
index e5f6bff04e8..47e3ae9189a 100644
--- a/mysql-test/main/show_check.result
+++ b/mysql-test/main/show_check.result
@@ -535,25 +535,25 @@ show create database mysqltest;
Database Create Database
mysqltest CREATE DATABASE `mysqltest` /*!40100 DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci */
drop table t1;
-ERROR 42000: DROP command denied to user 'mysqltest_1'@'localhost' for table 't1'
+ERROR 42000: DROP command denied to user 'mysqltest_1'@'localhost' for table `mysqltest`.`t1`
drop database mysqltest;
ERROR 42000: Access denied for user 'mysqltest_1'@'localhost' to database 'mysqltest'
disconnect con1;
connect con2,localhost,mysqltest_2,,test;
connection con2;
select * from mysqltest.t1;
-ERROR 42000: SELECT command denied to user 'mysqltest_2'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'mysqltest_2'@'localhost' for table `mysqltest`.`t1`
show create database mysqltest;
ERROR 42000: Access denied for user 'mysqltest_2'@'localhost' to database 'mysqltest'
drop table mysqltest.t1;
-ERROR 42000: DROP command denied to user 'mysqltest_2'@'localhost' for table 't1'
+ERROR 42000: DROP command denied to user 'mysqltest_2'@'localhost' for table `mysqltest`.`t1`
drop database mysqltest;
ERROR 42000: Access denied for user 'mysqltest_2'@'localhost' to database 'mysqltest'
disconnect con2;
connect con3,localhost,mysqltest_3,,test;
connection con3;
select * from mysqltest.t1;
-ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for table `mysqltest`.`t1`
show create database mysqltest;
Database Create Database
mysqltest CREATE DATABASE `mysqltest` /*!40100 DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci */
diff --git a/mysql-test/main/sp-security-anchor-type.result b/mysql-test/main/sp-security-anchor-type.result
index 4ee846f9f2e..12e3c0fa24e 100644
--- a/mysql-test/main/sp-security-anchor-type.result
+++ b/mysql-test/main/sp-security-anchor-type.result
@@ -21,9 +21,9 @@ user1@localhost
# Making sure that user1 does not have privileges to db1.t1
#
SHOW CREATE TABLE db1.t1;
-ERROR 42000: SHOW command denied to user 'user1'@'localhost' for table 't1'
+ERROR 42000: SHOW command denied to user 'user1'@'localhost' for table `db1`.`t1`
SHOW FIELDS IN db1.t1;
-ERROR 42000: SELECT command denied to user 'user1'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'user1'@'localhost' for table `db1`.`t1`
#
# Trigger: using TYPE OF with a table we don't have access to
#
@@ -39,7 +39,7 @@ SET NEW.b = 10;
END
$$
INSERT INTO t1 (a) VALUES (10);
-ERROR 42000: SELECT command denied to user 'user1'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'user1'@'localhost' for table `db1`.`t1`
SELECT * FROM t1;
a b
10 20
@@ -56,7 +56,7 @@ SELECT a;
END;
$$
CALL p1;
-ERROR 42000: SELECT command denied to user 'user1'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'user1'@'localhost' for table `db1`.`t1`
DROP PROCEDURE p1;
#
# Stored procedure: Using TYPE OF for with a table that we don't have access to
@@ -72,7 +72,7 @@ END;
$$
connection conn1;
CALL p1;
-ERROR 42000: SELECT command denied to user 'user1'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'user1'@'localhost' for table `db1`.`t1`
DROP PROCEDURE p1;
connection default;
CREATE PROCEDURE p1()
@@ -84,7 +84,7 @@ END;
$$
connection conn1;
CALL p1;
-ERROR 42000: SELECT command denied to user 'user1'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'user1'@'localhost' for table `db1`.`t1`
DROP PROCEDURE p1;
#
# Stored procedure: Using TYPE OF for with a table that we don't have access to
@@ -129,7 +129,7 @@ RETURN OCTET_LENGTH(a);
END;
$$
SELECT f1();
-ERROR 42000: SELECT command denied to user 'user1'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'user1'@'localhost' for table `db1`.`t1`
DROP FUNCTION f1;
DROP TABLE t1;
#
@@ -147,7 +147,7 @@ END;
$$
connection conn1;
SELECT f1();
-ERROR 42000: SELECT command denied to user 'user1'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'user1'@'localhost' for table `db1`.`t1`
DROP FUNCTION f1;
DROP TABLE t1;
#
@@ -176,7 +176,7 @@ connection conn1;
# Making sure that user1 has access to db1.t1.a, but not to db1.t1.b
#
SHOW CREATE TABLE db1.t1;
-ERROR 42000: SHOW command denied to user 'user1'@'localhost' for table 't1'
+ERROR 42000: SHOW command denied to user 'user1'@'localhost' for table `db1`.`t1`
SHOW FIELDS IN db1.t1;
Field Type Null Key Default Extra
a int(11) YES NULL
diff --git a/mysql-test/main/sp-security.result b/mysql-test/main/sp-security.result
index 1dea23a5271..5df70242c15 100644
--- a/mysql-test/main/sp-security.result
+++ b/mysql-test/main/sp-security.result
@@ -50,7 +50,7 @@ select db1_secret.db();
db1_secret.db()
test
select * from db1_secret.t1;
-ERROR 42000: SELECT command denied to user 'user1'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'user1'@'localhost' for table `db1_secret`.`t1`
create procedure db1_secret.dummy() begin end;
ERROR 42000: Access denied for user 'user1'@'localhost' to database 'db1_secret'
drop procedure db1_secret.dummy;
@@ -65,7 +65,7 @@ select db1_secret.db();
db1_secret.db()
test
select * from db1_secret.t1;
-ERROR 42000: SELECT command denied to user ''@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user ''@'localhost' for table `db1_secret`.`t1`
create procedure db1_secret.dummy() begin end;
ERROR 42000: Access denied for user ''@'%' to database 'db1_secret'
drop procedure db1_secret.dummy;
@@ -102,14 +102,14 @@ db()
test
connection con2user1;
call db1_secret.stamp(5);
-ERROR 42000: INSERT command denied to user 'user1'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'user1'@'localhost' for table `db1_secret`.`t1`
select db1_secret.db();
-ERROR 42000: SELECT command denied to user 'user1'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'user1'@'localhost' for table `db1_secret`.`t1`
connection con3anon;
call db1_secret.stamp(6);
-ERROR 42000: INSERT command denied to user ''@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user ''@'localhost' for table `db1_secret`.`t1`
select db1_secret.db();
-ERROR 42000: SELECT command denied to user ''@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user ''@'localhost' for table `db1_secret`.`t1`
connection con1root;
drop database if exists db2;
create database db2;
@@ -127,7 +127,7 @@ connection con2user1;
use db2;
create procedure p () insert into t2 values (1);
call p();
-ERROR 42000: INSERT command denied to user 'user1'@'localhost' for table 't2'
+ERROR 42000: INSERT command denied to user 'user1'@'localhost' for table `db2`.`t2`
connect con4user2,localhost,user2,,;
connection con4user2;
use db2;
@@ -404,9 +404,9 @@ id int(11) YES NULL
call db_bug14533.bug14533_2();
id
desc db_bug14533.t1;
-ERROR 42000: SELECT command denied to user 'user_bug14533'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'user_bug14533'@'localhost' for table `db_bug14533`.`t1`
select * from db_bug14533.t1;
-ERROR 42000: SELECT command denied to user 'user_bug14533'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'user_bug14533'@'localhost' for table `db_bug14533`.`t1`
connection default;
disconnect user_bug14533;
drop user user_bug14533@localhost;
@@ -566,24 +566,24 @@ END|
CREATE SQL SECURITY INVOKER VIEW v1 AS SELECT f_evil();
connect conn1, localhost, mysqltest_u1,,;
SELECT COUNT(*) FROM t1;
-ERROR 42000: SELECT command denied to user 'mysqltest_u1'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'mysqltest_u1'@'localhost' for table `test`.`t1`
SELECT f_evil();
-ERROR 42000: SELECT command denied to user 'mysqltest_u1'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'mysqltest_u1'@'localhost' for table `test`.`t1`
SELECT @a, @b;
@a @b
mysqltest_u1@localhost NULL
SELECT f_suid(f_evil());
-ERROR 42000: SELECT command denied to user 'mysqltest_u1'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'mysqltest_u1'@'localhost' for table `test`.`t1`
SELECT @a, @b;
@a @b
mysqltest_u1@localhost NULL
CALL p_suid(f_evil());
-ERROR 42000: SELECT command denied to user 'mysqltest_u1'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'mysqltest_u1'@'localhost' for table `test`.`t1`
SELECT @a, @b;
@a @b
mysqltest_u1@localhost NULL
SELECT * FROM v1;
-ERROR 42000: SELECT command denied to user 'mysqltest_u1'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'mysqltest_u1'@'localhost' for table `test`.`v1`
SELECT @a, @b;
@a @b
mysqltest_u1@localhost NULL
diff --git a/mysql-test/main/status.result b/mysql-test/main/status.result
index 688d8acee1a..0f2324e4301 100644
--- a/mysql-test/main/status.result
+++ b/mysql-test/main/status.result
@@ -243,13 +243,13 @@ return (select * from db37908.t1 limit 1)|
connect user1,localhost,mysqltest_1,,test;
connection user1;
select * from db37908.t1;
-ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table `db37908`.`t1`
show status where variable_name ='uptime' and 2 in (select * from db37908.t1);
-ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table `db37908`.`t1`
show procedure status where name ='proc37908' and 1 in (select f1 from db37908.t1);
-ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table `db37908`.`t1`
show function status where name ='func37908' and 1 in (select func37908());
-ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table `db37908`.`t1`
connection default;
disconnect user1;
disconnect root;
diff --git a/mysql-test/main/timezone_grant.result b/mysql-test/main/timezone_grant.result
index bacc8348e89..6d9872448a7 100644
--- a/mysql-test/main/timezone_grant.result
+++ b/mysql-test/main/timezone_grant.result
@@ -25,9 +25,9 @@ convert_tz(b, 'Europe/Moscow', 'UTC')
update t1, t2 set t1.b = convert_tz('2004-10-21 19:00:00', 'Europe/Moscow', 'UTC')
where t1.a = t2.c and t2.d = (select max(d) from t2);
select * from mysql.time_zone_name;
-ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 'time_zone_name'
+ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table `mysql`.`time_zone_name`
select Name, convert_tz('2004-10-21 19:00:00', Name, 'UTC') from mysql.time_zone_name;
-ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 'time_zone_name'
+ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table `mysql`.`time_zone_name`
connection default;
disconnect tzuser;
connection default;
@@ -54,9 +54,9 @@ convert_tz(b, 'Europe/Moscow', 'UTC')
update t1, t2 set t1.b = convert_tz('2004-11-30 12:00:00', 'Europe/Moscow', 'UTC')
where t1.a = t2.c and t2.d = (select max(d) from t2);
select * from mysql.time_zone_name;
-ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 'time_zone_name'
+ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table `mysql`.`time_zone_name`
select Name, convert_tz('2004-11-30 12:00:00', Name, 'UTC') from mysql.time_zone_name;
-ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 'time_zone_name'
+ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table `mysql`.`time_zone_name`
drop table t1, t2;
create table t1 (a int, b datetime);
create table t2 (a int, b varchar(40));
@@ -82,10 +82,10 @@ a lb
1 2001-01-01 03:00:00
2 2002-01-01 03:00:00
select * from v1, mysql.time_zone;
-ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 'time_zone'
+ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table `mysql`.`time_zone`
drop view v1;
create view v1 as select a, convert_tz(b, 'UTC', 'Europe/Moscow') as lb from t1, mysql.time_zone;
-ERROR 42000: ANY command denied to user 'mysqltest_1'@'localhost' for table 'time_zone'
+ERROR 42000: ANY command denied to user 'mysqltest_1'@'localhost' for table `mysql`.`time_zone`
connection default;
disconnect tzuser3;
drop table t1;
diff --git a/mysql-test/main/trigger_notembedded.result b/mysql-test/main/trigger_notembedded.result
index 94e651b1340..1d27b4197da 100644
--- a/mysql-test/main/trigger_notembedded.result
+++ b/mysql-test/main/trigger_notembedded.result
@@ -23,7 +23,7 @@ connection wl2818_definer_con;
CREATE TRIGGER trg1 AFTER INSERT ON t1
FOR EACH ROW
INSERT INTO t2 VALUES(CURRENT_USER());
-ERROR 42000: TRIGGER command denied to user 'mysqltest_dfn'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'mysqltest_dfn'@'localhost' for table `mysqltest_db1`.`t1`
disconnect wl2818_definer_con;
connection default;
GRANT TRIGGER ON mysqltest_db1.t1 TO mysqltest_dfn@localhost;
@@ -38,12 +38,12 @@ REVOKE TRIGGER ON mysqltest_db1.t1 FROM mysqltest_dfn@localhost;
connect wl2818_definer_con,localhost,mysqltest_dfn,,mysqltest_db1;
connection wl2818_definer_con;
DROP TRIGGER trg1;
-ERROR 42000: TRIGGER command denied to user 'mysqltest_dfn'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'mysqltest_dfn'@'localhost' for table `mysqltest_db1`.`t1`
disconnect wl2818_definer_con;
connect wl2818_definer_con,localhost,mysqltest_dfn,,mysqltest_db1;
connection wl2818_definer_con;
INSERT INTO t1 VALUES(0);
-ERROR 42000: TRIGGER command denied to user 'mysqltest_dfn'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'mysqltest_dfn'@'localhost' for table `mysqltest_db1`.`t1`
disconnect wl2818_definer_con;
connection default;
GRANT TRIGGER ON mysqltest_db1.t1 TO mysqltest_dfn@localhost;
@@ -95,7 +95,7 @@ REVOKE INSERT ON mysqltest_db1.t2 FROM mysqltest_dfn@localhost;
connection wl2818_invoker_con;
use mysqltest_db1;
INSERT INTO t1 VALUES(3);
-ERROR 42000: INSERT command denied to user 'mysqltest_dfn'@'localhost' for table 't2'
+ERROR 42000: INSERT command denied to user 'mysqltest_dfn'@'localhost' for table `mysqltest_db1`.`t2`
SELECT * FROM t1;
num_value
1
@@ -563,7 +563,7 @@ INSERT INTO t2 VALUES (2);
connection default;
REVOKE ALL PRIVILEGES, GRANT OPTION FROM mysqltest_u1@localhost;
UPDATE IGNORE t1, t2 SET t1.a1 = 2, t2.a1 = 3 WHERE t1.a1 = 1 AND t2.a1 = 2;
-ERROR 42000: TRIGGER command denied to user 'mysqltest_u1'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'mysqltest_u1'@'localhost' for table `mysqltest_db1`.`t1`
DROP DATABASE mysqltest_db1;
DROP USER mysqltest_u1@localhost;
disconnect con1;
diff --git a/mysql-test/main/union.result b/mysql-test/main/union.result
index 4da774b4c7d..717f7e1c4ec 100644
--- a/mysql-test/main/union.result
+++ b/mysql-test/main/union.result
@@ -2664,5 +2664,90 @@ ALTER TABLE t4 ADD INDEX (`NULL`);
DROP TABLE t1, t2, t3, t4;
set @@default_storage_engine=@save_default_storage_engine;
#
+# MDEV-29022: add_slave destroy child list and has dead code
+# (test added to be sure that ordering by several subqueries works)
+#
+create table t1 (aa int);
+insert into t1 values (-1),(0),(1),(2),(3),(4),(5),(6),(98),(99),(100),(102);
+create table t2 (a int, b int);
+insert into t2 values (2,2),(2,3),(3,4),(3,5);
+select a as a, b as b,
+(select max(aa) from t1 where aa < t2.a) as c,
+(select max(aa) from t1 where aa < t2.b) as d
+from t2
+union select 0 as a, 100 as b,
+(select max(aa) from t1 where aa < 0) as c,
+(select max(aa) from t1 where aa < 100) as d
+union select 0 as a, 99 as b,
+(select max(aa) from t1 where aa < 0) as c,
+(select max(aa) from t1 where aa < 99) as d
+order by (select max(aa) from t1 where aa < a),
+(select max(aa) from t1 where aa < b);
+a b c d
+0 99 -1 98
+0 100 -1 99
+2 2 1 1
+2 3 1 2
+3 4 2 3
+3 5 2 4
+select a as a, b as b,
+(select max(aa) from t1 where aa < t2.a) as c,
+(select 200 - max(aa) from t1 where aa < t2.b) as d
+from t2
+union select 0 as a, 100 as b,
+(select max(aa) from t1 where aa < 0) as c,
+(select 200 - max(aa) from t1 where aa < 100) as d
+union select 0 as a, 99 as b,
+(select max(aa) from t1 where aa < 0) as c,
+(select 200 - max(aa) from t1 where aa < 99) as d
+order by (select max(aa) from t1 where aa < a),
+(select 200 - max(aa) from t1 where aa < b);
+a b c d
+0 100 -1 101
+0 99 -1 102
+2 3 1 198
+2 2 1 199
+3 5 2 196
+3 4 2 197
+(select a as a, b as b,
+(select max(aa) from t1 where aa < t2.a) as c,
+(select max(aa) from t1 where aa < t2.b) as d
+from t2)
+union (select 0 as a, 100 as b,
+(select max(aa) from t1 where aa < 0) as c,
+(select max(aa) from t1 where aa < 100) as d)
+union (select 0 as a, 99 as b,
+(select max(aa) from t1 where aa < 0) as c,
+(select max(aa) from t1 where aa < 99) as d)
+order by (select max(aa) from t1 where aa < a),
+(select max(aa) from t1 where aa < b);
+a b c d
+0 99 -1 98
+0 100 -1 99
+2 2 1 1
+2 3 1 2
+3 4 2 3
+3 5 2 4
+(select a as a, b as b,
+(select max(aa) from t1 where aa < t2.a) as c,
+(select 200 - max(aa) from t1 where aa < t2.b) as d
+from t2)
+union (select 0 as a, 100 as b,
+(select max(aa) from t1 where aa < 0) as c,
+(select 200 - max(aa) from t1 where aa < 100) as d)
+union (select 0 as a, 99 as b,
+(select max(aa) from t1 where aa < 0) as c,
+(select 200 - max(aa) from t1 where aa < 99) as d)
+order by (select max(aa) from t1 where aa < a),
+(select 200 - max(aa) from t1 where aa < b);
+a b c d
+0 100 -1 101
+0 99 -1 102
+2 3 1 198
+2 2 1 199
+3 5 2 196
+3 4 2 197
+drop table t1,t2;
+#
# End of 10.3 tests
#
diff --git a/mysql-test/main/union.test b/mysql-test/main/union.test
index e2e485f6e6b..a3a672e2937 100644
--- a/mysql-test/main/union.test
+++ b/mysql-test/main/union.test
@@ -1917,5 +1917,75 @@ set @@default_storage_engine=@save_default_storage_engine;
--echo #
+--echo # MDEV-29022: add_slave destroy child list and has dead code
+--echo # (test added to be sure that ordering by several subqueries works)
+--echo #
+
+create table t1 (aa int);
+
+insert into t1 values (-1),(0),(1),(2),(3),(4),(5),(6),(98),(99),(100),(102);
+
+
+create table t2 (a int, b int);
+
+insert into t2 values (2,2),(2,3),(3,4),(3,5);
+
+
+select a as a, b as b,
+ (select max(aa) from t1 where aa < t2.a) as c,
+ (select max(aa) from t1 where aa < t2.b) as d
+ from t2
+union select 0 as a, 100 as b,
+ (select max(aa) from t1 where aa < 0) as c,
+ (select max(aa) from t1 where aa < 100) as d
+union select 0 as a, 99 as b,
+ (select max(aa) from t1 where aa < 0) as c,
+ (select max(aa) from t1 where aa < 99) as d
+ order by (select max(aa) from t1 where aa < a),
+ (select max(aa) from t1 where aa < b);
+
+select a as a, b as b,
+ (select max(aa) from t1 where aa < t2.a) as c,
+ (select 200 - max(aa) from t1 where aa < t2.b) as d
+ from t2
+union select 0 as a, 100 as b,
+ (select max(aa) from t1 where aa < 0) as c,
+ (select 200 - max(aa) from t1 where aa < 100) as d
+union select 0 as a, 99 as b,
+ (select max(aa) from t1 where aa < 0) as c,
+ (select 200 - max(aa) from t1 where aa < 99) as d
+ order by (select max(aa) from t1 where aa < a),
+ (select 200 - max(aa) from t1 where aa < b);
+
+
+(select a as a, b as b,
+ (select max(aa) from t1 where aa < t2.a) as c,
+ (select max(aa) from t1 where aa < t2.b) as d
+ from t2)
+union (select 0 as a, 100 as b,
+ (select max(aa) from t1 where aa < 0) as c,
+ (select max(aa) from t1 where aa < 100) as d)
+union (select 0 as a, 99 as b,
+ (select max(aa) from t1 where aa < 0) as c,
+ (select max(aa) from t1 where aa < 99) as d)
+ order by (select max(aa) from t1 where aa < a),
+ (select max(aa) from t1 where aa < b);
+
+(select a as a, b as b,
+ (select max(aa) from t1 where aa < t2.a) as c,
+ (select 200 - max(aa) from t1 where aa < t2.b) as d
+ from t2)
+union (select 0 as a, 100 as b,
+ (select max(aa) from t1 where aa < 0) as c,
+ (select 200 - max(aa) from t1 where aa < 100) as d)
+union (select 0 as a, 99 as b,
+ (select max(aa) from t1 where aa < 0) as c,
+ (select 200 - max(aa) from t1 where aa < 99) as d)
+ order by (select max(aa) from t1 where aa < a),
+ (select 200 - max(aa) from t1 where aa < b);
+
+drop table t1,t2;
+
+--echo #
--echo # End of 10.3 tests
--echo #
diff --git a/mysql-test/main/view.result b/mysql-test/main/view.result
index b14f2af56de..fd84cff9fa1 100644
--- a/mysql-test/main/view.result
+++ b/mysql-test/main/view.result
@@ -6816,6 +6816,34 @@ r
drop view v1;
drop table t1;
#
+# MDEV-17124: mariadb 10.1.34, views and prepared statements:
+# ERROR 1615 (HY000): Prepared statement needs to be re-prepared
+#
+set @tdc= @@table_definition_cache, @tc= @@table_open_cache;
+set global table_definition_cache= 400, table_open_cache= 400;
+create table tt (a int, primary key(a)) engine=MyISAM;
+create view v as select * from tt;
+insert into tt values(1),(2),(3),(4);
+prepare stmt from 'select * from tt';
+#fill table definition cache
+execute stmt;
+a
+1
+2
+3
+4
+prepare stmt from 'select * from v';
+execute stmt;
+a
+1
+2
+3
+4
+drop database db;
+drop view v;
+drop table tt;
+set global table_definition_cache= @tdc, table_open_cache= @tc;
+#
# End of 10.2 tests
#
#
diff --git a/mysql-test/main/view.test b/mysql-test/main/view.test
index 770be8dbb5f..038c7107d07 100644
--- a/mysql-test/main/view.test
+++ b/mysql-test/main/view.test
@@ -6540,6 +6540,46 @@ drop view v1;
drop table t1;
--echo #
+--echo # MDEV-17124: mariadb 10.1.34, views and prepared statements:
+--echo # ERROR 1615 (HY000): Prepared statement needs to be re-prepared
+--echo #
+
+set @tdc= @@table_definition_cache, @tc= @@table_open_cache;
+set global table_definition_cache= 400, table_open_cache= 400;
+
+create table tt (a int, primary key(a)) engine=MyISAM;
+create view v as select * from tt;
+insert into tt values(1),(2),(3),(4);
+
+prepare stmt from 'select * from tt';
+--echo #fill table definition cache
+--disable_query_log
+--disable_result_log
+create database db;
+use db;
+--let $tables=401
+while ($tables)
+{
+ --eval create table t$tables (i int) engine=MyISAM
+ --eval select * from t$tables
+ --dec $tables
+}
+
+use test;
+
+--enable_query_log
+--enable_result_log
+execute stmt;
+prepare stmt from 'select * from v';
+execute stmt;
+
+# Cleanup
+drop database db;
+drop view v;
+drop table tt;
+set global table_definition_cache= @tdc, table_open_cache= @tc;
+
+--echo #
--echo # End of 10.2 tests
--echo #
diff --git a/mysql-test/main/view_grant.result b/mysql-test/main/view_grant.result
index 00a93488919..a5e183952c6 100644
--- a/mysql-test/main/view_grant.result
+++ b/mysql-test/main/view_grant.result
@@ -25,13 +25,13 @@ create definer=root@localhost view v1 as select * from mysqltest.t1;
ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
create view v1 as select * from mysqltest.t1;
alter view v1 as select * from mysqltest.t1;
-ERROR 42000: DROP command denied to user 'mysqltest_1'@'localhost' for table 'v1'
+ERROR 42000: DROP command denied to user 'mysqltest_1'@'localhost' for table `test`.`v1`
create or replace view v1 as select * from mysqltest.t1;
-ERROR 42000: DROP command denied to user 'mysqltest_1'@'localhost' for table 'v1'
+ERROR 42000: DROP command denied to user 'mysqltest_1'@'localhost' for table `test`.`v1`
create view mysqltest.v2 as select * from mysqltest.t1;
-ERROR 42000: CREATE VIEW command denied to user 'mysqltest_1'@'localhost' for table 'v2'
+ERROR 42000: CREATE VIEW command denied to user 'mysqltest_1'@'localhost' for table `mysqltest`.`v2`
create view v2 as select * from mysqltest.t2;
-ERROR 42000: ANY command denied to user 'mysqltest_1'@'localhost' for table 't2'
+ERROR 42000: ANY command denied to user 'mysqltest_1'@'localhost' for table `mysqltest`.`t2`
connection root;
show create view v1;
View Create View character_set_client collation_connection
@@ -98,7 +98,7 @@ c
select c from mysqltest.v4;
c
select c from mysqltest.v5;
-ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 'v5'
+ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table `mysqltest`.`v5`
show columns from mysqltest.v1;
Field Type Null Key Default Extra
c bigint(12) YES NULL
@@ -110,23 +110,23 @@ d bigint(12) YES NULL
explain select c from mysqltest.v1;
ERROR HY000: ANALYZE/EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
show create view mysqltest.v1;
-ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table 'v1'
+ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table `mysqltest`.`v1`
explain select c from mysqltest.v2;
ERROR HY000: ANALYZE/EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
show create view mysqltest.v2;
-ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table 'v2'
+ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table `mysqltest`.`v2`
explain select c from mysqltest.v3;
ERROR HY000: ANALYZE/EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
show create view mysqltest.v3;
-ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table 'v3'
+ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table `mysqltest`.`v3`
explain select c from mysqltest.v4;
ERROR HY000: ANALYZE/EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
show create view mysqltest.v4;
-ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table 'v4'
+ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table `mysqltest`.`v4`
explain select c from mysqltest.v5;
-ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 'v5'
+ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table `mysqltest`.`v5`
show create view mysqltest.v5;
-ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 'v5'
+ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table `mysqltest`.`v5`
connection root;
grant select on mysqltest.v5 to mysqltest_1@localhost;
connection user1;
@@ -136,7 +136,7 @@ v5 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI
explain select c from mysqltest.v1;
ERROR HY000: ANALYZE/EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
show create view mysqltest.v1;
-ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table 'v1'
+ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table `mysqltest`.`v1`
connection root;
grant show view on mysqltest.v1 to mysqltest_1@localhost;
grant select on mysqltest.t1 to mysqltest_1@localhost;
@@ -151,17 +151,17 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI
explain select c from mysqltest.v2;
ERROR HY000: ANALYZE/EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
show create view mysqltest.v2;
-ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table 'v2'
+ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table `mysqltest`.`v2`
explain select c from mysqltest.v3;
ERROR HY000: ANALYZE/EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
show create view mysqltest.v3;
-ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table 'v3'
+ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table `mysqltest`.`v3`
explain select c from mysqltest.v4;
ERROR HY000: ANALYZE/EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
show create view mysqltest.v4;
-ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table 'v4'
+ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table `mysqltest`.`v4`
explain select c from mysqltest.v5;
-ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 'v5'
+ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table `mysqltest`.`v5`
connection root;
grant show view on mysqltest.* to mysqltest_1@localhost;
connection user1;
@@ -248,9 +248,9 @@ ERROR 42000: UPDATE command denied to user 'mysqltest_1'@'localhost' for column
update v2 set c=a+c;
ERROR 42000: UPDATE command denied to user 'mysqltest_1'@'localhost' for column 'c' in table 'v2'
update t2,v3 set v3.a=v3.a+v3.c where t2.x=v3.c;
-ERROR 42000: UPDATE command denied to user 'mysqltest_1'@'localhost' for table 'v3'
+ERROR 42000: UPDATE command denied to user 'mysqltest_1'@'localhost' for table `mysqltest`.`v3`
update v3 set a=a+c;
-ERROR 42000: UPDATE command denied to user 'mysqltest_1'@'localhost' for table 'v3'
+ERROR 42000: UPDATE command denied to user 'mysqltest_1'@'localhost' for table `mysqltest`.`v3`
use test;
connection root;
REVOKE ALL PRIVILEGES, GRANT OPTION FROM mysqltest_1@localhost;
@@ -281,9 +281,9 @@ select * from t1;
a b
5 10
delete v2 from t2,v2 where t2.x=v2.c;
-ERROR 42000: DELETE command denied to user 'mysqltest_1'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'mysqltest_1'@'localhost' for table `mysqltest`.`v2`
delete from v2 where c < 4;
-ERROR 42000: DELETE command denied to user 'mysqltest_1'@'localhost' for table 'v2'
+ERROR 42000: DELETE command denied to user 'mysqltest_1'@'localhost' for table `mysqltest`.`v2`
use test;
connection root;
REVOKE ALL PRIVILEGES, GRANT OPTION FROM mysqltest_1@localhost;
@@ -316,9 +316,9 @@ a b
5 6
3 4
insert into v2 values (5,6);
-ERROR 42000: INSERT command denied to user 'mysqltest_1'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'mysqltest_1'@'localhost' for table `mysqltest`.`v2`
insert into v2 select x,y from t2;
-ERROR 42000: INSERT command denied to user 'mysqltest_1'@'localhost' for table 'v2'
+ERROR 42000: INSERT command denied to user 'mysqltest_1'@'localhost' for table `mysqltest`.`v2`
use test;
connection root;
REVOKE ALL PRIVILEGES, GRANT OPTION FROM mysqltest_1@localhost;
@@ -336,7 +336,7 @@ connection user1;
create view v1 as select * from mysqltest.t1;
create view v2 as select b from mysqltest.t2;
create view mysqltest.v1 as select * from mysqltest.t1;
-ERROR 42000: CREATE VIEW command denied to user 'mysqltest_1'@'localhost' for table 'v1'
+ERROR 42000: CREATE VIEW command denied to user 'mysqltest_1'@'localhost' for table `mysqltest`.`v1`
create view v3 as select a from mysqltest.t2;
ERROR 42000: ANY command denied to user 'mysqltest_1'@'localhost' for column 'a' in table 't2'
connection root;
@@ -609,7 +609,7 @@ connection user1;
use mysqltest;
LOCK TABLES v1 READ;
SHOW CREATE TABLE v1;
-ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table 'v1'
+ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table `mysqltest`.`v1`
UNLOCK TABLES;
use test;
connection root;
@@ -668,29 +668,29 @@ ERROR HY000: View 'mysqltest1.v_t1' references invalid table(s) or column(s) or
SELECT 1 FROM mysqltest1.v_t1;
ERROR HY000: View 'mysqltest1.v_t1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
SELECT * FROM mysqltest1.t1;
-ERROR 42000: SELECT command denied to user 'readonly'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'readonly'@'localhost' for table `mysqltest1`.`t1`
SELECT * FROM mysqltest1.v_ts;
x
1
2
SELECT * FROM mysqltest1.v_ts, mysqltest1.t1 WHERE mysqltest1.t1.x = mysqltest1.v_ts.x;
-ERROR 42000: SELECT command denied to user 'readonly'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'readonly'@'localhost' for table `mysqltest1`.`t1`
SELECT * FROM mysqltest1.v_ti;
-ERROR 42000: SELECT command denied to user 'readonly'@'localhost' for table 'v_ti'
+ERROR 42000: SELECT command denied to user 'readonly'@'localhost' for table `mysqltest1`.`v_ti`
INSERT INTO mysqltest1.v_ts VALUES (100);
-ERROR 42000: INSERT command denied to user 'readonly'@'localhost' for table 'v_ts'
+ERROR 42000: INSERT command denied to user 'readonly'@'localhost' for table `mysqltest1`.`v_ts`
INSERT INTO mysqltest1.v_ti VALUES (100);
UPDATE mysqltest1.v_ts SET x= 200 WHERE x = 100;
-ERROR 42000: UPDATE command denied to user 'readonly'@'localhost' for table 'v_ts'
+ERROR 42000: UPDATE command denied to user 'readonly'@'localhost' for table `mysqltest1`.`v_ts`
UPDATE mysqltest1.v_ts SET x= 200;
-ERROR 42000: UPDATE command denied to user 'readonly'@'localhost' for table 'v_ts'
+ERROR 42000: UPDATE command denied to user 'readonly'@'localhost' for table `mysqltest1`.`v_ts`
UPDATE mysqltest1.v_tu SET x= 200 WHERE x = 100;
UPDATE mysqltest1.v_tus SET x= 200 WHERE x = 100;
UPDATE mysqltest1.v_tu SET x= 200;
DELETE FROM mysqltest1.v_ts WHERE x= 200;
-ERROR 42000: DELETE command denied to user 'readonly'@'localhost' for table 'v_ts'
+ERROR 42000: DELETE command denied to user 'readonly'@'localhost' for table `mysqltest1`.`v_ts`
DELETE FROM mysqltest1.v_ts;
-ERROR 42000: DELETE command denied to user 'readonly'@'localhost' for table 'v_ts'
+ERROR 42000: DELETE command denied to user 'readonly'@'localhost' for table `mysqltest1`.`v_ts`
DELETE FROM mysqltest1.v_td WHERE x= 200;
ERROR 42000: SELECT command denied to user 'readonly'@'localhost' for column 'x' in table 'v_td'
DELETE FROM mysqltest1.v_tds WHERE x= 200;
@@ -842,7 +842,7 @@ connect inv,localhost,inv_17254,,db17254;
connection inv;
for a user
SELECT * FROM v1;
-ERROR 42000: SELECT command denied to user 'inv_17254'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'inv_17254'@'localhost' for table `db17254`.`v1`
connection root;
for a superuser
SELECT * FROM v1;
@@ -886,11 +886,11 @@ REVOKE SELECT ON t2 FROM mysqltest_u2@localhost;
UPDATE t2 SET s = 'private' WHERE s = 'public';
connection conn2;
SELECT * FROM mysqltest_db1.v1, mysqltest_db1.t2;
-ERROR 42000: SELECT command denied to user 'mysqltest_u2'@'localhost' for table 't2'
+ERROR 42000: SELECT command denied to user 'mysqltest_u2'@'localhost' for table `mysqltest_db1`.`t2`
EXECUTE stmt1;
-ERROR 42000: SELECT command denied to user 'mysqltest_u2'@'localhost' for table 't2'
+ERROR 42000: SELECT command denied to user 'mysqltest_u2'@'localhost' for table `mysqltest_db1`.`t2`
EXECUTE stmt2;
-ERROR 42000: SELECT command denied to user 'mysqltest_u2'@'localhost' for table 't2'
+ERROR 42000: SELECT command denied to user 'mysqltest_u2'@'localhost' for table `mysqltest_db1`.`t2`
disconnect conn2;
disconnect conn1;
connection default;
@@ -915,9 +915,9 @@ GRANT SELECT ON db26813.t1 TO u26813@localhost;
connect u1,localhost,u26813,,db26813;
connection u1;
ALTER VIEW v1 AS SELECT f2 FROM t1;
-ERROR 42000: CREATE VIEW command denied to user 'u26813'@'localhost' for table 'v1'
+ERROR 42000: CREATE VIEW command denied to user 'u26813'@'localhost' for table `db26813`.`v1`
ALTER VIEW v2 AS SELECT f2 FROM t1;
-ERROR 42000: DROP command denied to user 'u26813'@'localhost' for table 'v2'
+ERROR 42000: DROP command denied to user 'u26813'@'localhost' for table `db26813`.`v2`
ALTER VIEW v3 AS SELECT f2 FROM t1;
ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
connection root;
@@ -1080,13 +1080,13 @@ f1
SELECT f2 FROM t1;
ERROR 42000: SELECT command denied to user 'foo'@'localhost' for column 'f2' in table 't1'
SELECT * FROM t1;
-ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table `db1`.`t1`
SELECT f1 FROM v1;
f1
SELECT f2 FROM v1;
ERROR 42000: SELECT command denied to user 'foo'@'localhost' for column 'f2' in table 'v1'
SELECT * FROM v1;
-ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table `db1`.`v1`
connection default;
disconnect root;
disconnect addconfoo;
@@ -1183,9 +1183,9 @@ disconnect test11765687;
connect test11765687,localhost,cecil,,mysqltest1;
connection test11765687;
select * from v1;
-ERROR 42000: SELECT command denied to user 'cecil'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'cecil'@'localhost' for table `mysqltest1`.`v1`
explain select * from v1;
-ERROR 42000: SELECT command denied to user 'cecil'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'cecil'@'localhost' for table `mysqltest1`.`v1`
disconnect test11765687;
... as dan
connect test11765687,localhost,dan,,mysqltest1;
@@ -1213,11 +1213,11 @@ show create view v2;
View Create View character_set_client collation_connection
v2 CREATE ALGORITHM=UNDEFINED DEFINER=`alice`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS select `v1`.`i` AS `i`,`t2`.`j` AS `j` from (`v1` join `t2`) latin1 latin1_swedish_ci
explain select * from t1;
-ERROR 42000: SELECT command denied to user 'fiona'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'fiona'@'localhost' for table `mysqltest1`.`t1`
explain select * from v1;
-ERROR 42000: SELECT command denied to user 'fiona'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'fiona'@'localhost' for table `mysqltest1`.`v1`
explain select * from t2;
-ERROR 42000: SELECT command denied to user 'fiona'@'localhost' for table 't2'
+ERROR 42000: SELECT command denied to user 'fiona'@'localhost' for table `mysqltest1`.`t2`
explain select * from v2;
ERROR HY000: ANALYZE/EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
disconnect test11765687;
@@ -1227,7 +1227,7 @@ connection test11765687;
select * from v2;
i j
explain select * from v1;
-ERROR 42000: SELECT command denied to user 'greg'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'greg'@'localhost' for table `mysqltest1`.`v1`
explain select * from v2;
ERROR HY000: ANALYZE/EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
disconnect test11765687;
@@ -1235,9 +1235,9 @@ disconnect test11765687;
connect test11765687,localhost,han,,mysqltest1;
connection test11765687;
select * from t3;
-ERROR 42000: SELECT command denied to user 'han'@'localhost' for table 't3'
+ERROR 42000: SELECT command denied to user 'han'@'localhost' for table `mysqltest1`.`t3`
explain select * from t3;
-ERROR 42000: SELECT command denied to user 'han'@'localhost' for table 't3'
+ERROR 42000: SELECT command denied to user 'han'@'localhost' for table `mysqltest1`.`t3`
select k from t3;
k
explain select k from t3;
@@ -1277,9 +1277,9 @@ disconnect test11765687;
connect test11765687,localhost,lena,,mysqltest1;
connection test11765687;
select * from v2;
-ERROR 42000: SELECT command denied to user 'lena'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'lena'@'localhost' for table `mysqltest1`.`v2`
explain select * from v2;
-ERROR 42000: SELECT command denied to user 'lena'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'lena'@'localhost' for table `mysqltest1`.`v2`
disconnect test11765687;
... as mhairi
connect test11765687,localhost,mhairi,,mysqltest1;
@@ -1397,9 +1397,9 @@ connect connection1, localhost, mysqluser1, , mysqltest1;
This would lead to failed assertion.
CREATE VIEW v1 AS SELECT a, b FROM t1, t2;
SELECT * FROM v1;
-ERROR 42000: SELECT command denied to user 'mysqluser1'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'mysqluser1'@'localhost' for table `mysqltest1`.`v1`
SELECT b FROM v1;
-ERROR 42000: SELECT command denied to user 'mysqluser1'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'mysqluser1'@'localhost' for table `mysqltest1`.`v1`
disconnect connection1;
connection default;
DROP TABLE t1, t2;
@@ -1418,9 +1418,9 @@ GRANT SELECT( a ) ON v1 TO mysqluser1@localhost;
GRANT UPDATE( b ) ON t2 TO mysqluser1@localhost;
connect connection1, localhost, mysqluser1, , test;
SELECT * FROM mysqltest1.v1;
-ERROR 42000: SELECT command denied to user 'mysqluser1'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'mysqluser1'@'localhost' for table `mysqltest1`.`v1`
CREATE VIEW v1 AS SELECT * FROM mysqltest1.t2;
-ERROR 42000: ANY command denied to user 'mysqluser1'@'localhost' for table 't2'
+ERROR 42000: ANY command denied to user 'mysqluser1'@'localhost' for table `mysqltest1`.`t2`
disconnect connection1;
connection default;
DROP TABLE t1, t2;
@@ -1443,9 +1443,9 @@ connection default;
REVOKE SELECT ON mysqltest1.* FROM mysqluser1@localhost;
connection connection1;
EXECUTE stmt_v1;
-ERROR 42000: SELECT command denied to user 'mysqluser1'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'mysqluser1'@'localhost' for table `mysqltest1`.`v1`
EXECUTE stmt_v2;
-ERROR 42000: SELECT command denied to user 'mysqluser1'@'localhost' for table 'v2'
+ERROR 42000: SELECT command denied to user 'mysqluser1'@'localhost' for table `mysqltest1`.`v2`
disconnect connection1;
connect connection2, localhost, mysqluser1,,;
PREPARE stmt FROM "SELECT a FROM v3";
@@ -1605,11 +1605,11 @@ REVOKE SHOW VIEW ON v_f1 FROM mysqluser1@localhost;
REVOKE SHOW VIEW ON v_v1 FROM mysqluser1@localhost;
connection connection1;
SHOW CREATE VIEW mysqltest1.v_t1;
-ERROR 42000: SHOW VIEW command denied to user 'mysqluser1'@'localhost' for table 'v_t1'
+ERROR 42000: SHOW VIEW command denied to user 'mysqluser1'@'localhost' for table `mysqltest1`.`v_t1`
SHOW CREATE VIEW mysqltest1.v_f1;
-ERROR 42000: SHOW VIEW command denied to user 'mysqluser1'@'localhost' for table 'v_f1'
+ERROR 42000: SHOW VIEW command denied to user 'mysqluser1'@'localhost' for table `mysqltest1`.`v_f1`
SHOW CREATE VIEW mysqltest1.v_v1;
-ERROR 42000: SHOW VIEW command denied to user 'mysqluser1'@'localhost' for table 'v_v1'
+ERROR 42000: SHOW VIEW command denied to user 'mysqluser1'@'localhost' for table `mysqltest1`.`v_v1`
SHOW CREATE VIEW v_mysqluser1_t1;
View Create View character_set_client collation_connection
v_mysqluser1_t1 CREATE ALGORITHM=UNDEFINED DEFINER=`mysqluser1`@`localhost` SQL SECURITY DEFINER VIEW `v_mysqluser1_t1` AS select `mysqltest1`.`t1`.`a` AS `a` from `mysqltest1`.`t1` latin1 latin1_swedish_ci
@@ -1860,7 +1860,7 @@ update mysqltest2.t2 as t2, mysqltest1.v1_temp as v1 set t2.val= 'test4'
# Temptable views can't be updated.
update mysqltest2.t2 as t2, mysqltest1.v1_merge as v1 set v1.val= 'test5'
where t2.id= v1.id;
-ERROR 42000: UPDATE command denied to user 'user_11766767'@'localhost' for table 'v1_merge'
+ERROR 42000: UPDATE command denied to user 'user_11766767'@'localhost' for table `mysqltest1`.`v1_merge`
update mysqltest1.t1 as t1, mysqltest2.v2_merge as v2 set v2.val= 'test6'
where t1.id= v2.id;
#
@@ -1884,7 +1884,7 @@ update mysqltest2.t2 as t2, mysqltest1.v11_temp as v11 set t2.val= 'test10'
# on a view.
update mysqltest2.t2 as t2, mysqltest1.v11_merge as v11 set v11.val= 'test11'
where t2.id= v11.id;
-ERROR 42000: UPDATE command denied to user 'user_11766767'@'localhost' for table 'v11_merge'
+ERROR 42000: UPDATE command denied to user 'user_11766767'@'localhost' for table `mysqltest1`.`v11_merge`
update mysqltest1.t1 as t1, mysqltest2.v21_merge as v21 set v21.val= 'test12'
where t1.id= v21.id;
# As before, temptable views are not updateable.
diff --git a/mysql-test/std_data/wsrep_notify.sh b/mysql-test/std_data/wsrep_notify.sh
index 7036f603c84..5dfd63462b9 100755
--- a/mysql-test/std_data/wsrep_notify.sh
+++ b/mysql-test/std_data/wsrep_notify.sh
@@ -4,22 +4,44 @@
# It will create 'wsrep' schema and two tables in it: 'membeship' and 'status'
# and fill them on every membership or node status change.
#
-# Edit parameters below to specify the address and login to server.
-
+# Edit parameters below to specify the address and login to server:
+#
USER=root
+PSWD=
+#
+# If these parameters are not set, then the values
+# passed by the server are taken:
+#
HOST=127.0.0.1
PORT=$NODE_MYPORT_1
+#
+# Edit parameters below to specify SSL parameters:
+#
+ssl_key=
+ssl_cert=
+ssl_ca=
+ssl_capath=
+ssl_cipher=
+ssl_crl=
+ssl_crlpath=
+ssl_verify_server_cert=0
+#
+# Client executable path:
+#
+CLIENT="$EXE_MYSQL"
SCHEMA="mtr_wsrep_notify"
MEMB_TABLE="$SCHEMA.membership"
STATUS_TABLE="$SCHEMA.status"
-BEGIN="
-SET wsrep_on=0;
+WSREP_ON='SET wsrep_on=ON'
+WSREP_OFF='SET wsrep_on=OFF'
+
+BEGIN="$WSREP_OFF;
CREATE SCHEMA IF NOT EXISTS $SCHEMA;
CREATE TABLE IF NOT EXISTS $MEMB_TABLE (
idx INT,
- uuid CHAR(40), /* node UUID */
+ uuid CHAR(40), /* node UUID */
name VARCHAR(32), /* node name */
addr VARCHAR(256) /* node address */
) ENGINE=MEMORY;
@@ -30,9 +52,8 @@ CREATE TABLE IF NOT EXISTS $STATUS_TABLE (
uuid CHAR(40), /* cluster UUID */
prim BOOLEAN /* if component is primary */
) ENGINE=MEMORY;
-BEGIN;
-"
-END="COMMIT;"
+BEGIN"
+END="COMMIT; $WSREP_ON"
configuration_change()
{
@@ -40,7 +61,7 @@ configuration_change()
local idx=0
- for NODE in $(echo $MEMBERS | sed s/,/\ /g)
+ for NODE in $(echo "$MEMBERS" | sed s/,/\ /g)
do
echo "INSERT INTO $MEMB_TABLE VALUES ( $idx, "
# Don't forget to properly quote string values
@@ -51,25 +72,52 @@ configuration_change()
echo "INSERT INTO $STATUS_TABLE VALUES($idx, $INDEX, '$STATUS', '$CLUSTER_UUID', $PRIMARY);"
- echo "$END"
+ echo "$END;"
}
status_update()
{
- echo "SET wsrep_on=0; BEGIN; UPDATE $STATUS_TABLE SET status='$STATUS'; COMMIT;"
+ echo "$BEGIN; UPDATE $STATUS_TABLE SET status='$STATUS'; $END;"
+}
+
+trim_string()
+{
+ if [ -n "${BASH_VERSION:-}" ]; then
+ local pattern="[![:space:]${2:-}]"
+ local x="${1#*$pattern}"
+ local z=${#1}
+ x=${#x}
+ if [ $x -ne $z ]; then
+ local y="${1%$pattern*}"
+ y=${#y}
+ x=$(( z-x-1 ))
+ y=$(( y-x+1 ))
+ printf '%s' "${1:$x:$y}"
+ else
+ printf ''
+ fi
+ else
+ local pattern="[[:space:]${2:-}]"
+ echo "$1" | sed -E "s/^$pattern+|$pattern+\$//g"
+ fi
}
COM=status_update # not a configuration change by default
-while [ $# -gt 0 ]
-do
+STATUS=""
+CLUSTER_UUID=""
+PRIMARY="0"
+INDEX=""
+MEMBERS=""
+
+while [ $# -gt 0 ]; do
case $1 in
--status)
- STATUS=$2
+ STATUS=$(trim_string "$2")
shift
;;
--uuid)
- CLUSTER_UUID=$2
+ CLUSTER_UUID=$(trim_string "$2")
shift
;;
--primary)
@@ -78,22 +126,71 @@ do
shift
;;
--index)
- INDEX=$2
+ INDEX=$(trim_string "$2")
shift
;;
--members)
- MEMBERS=$2
+ MEMBERS=$(trim_string "$2")
shift
;;
esac
shift
done
-# Undefined means node is shutting down
-if [ "$STATUS" != "Undefined" ]
+USER=$(trim_string "$USER")
+PSWD=$(trim_string "$PSWD")
+
+HOST=$(trim_string "$HOST")
+PORT=$(trim_string "$PORT")
+
+case "$HOST" in
+\[*)
+ HOST="${HOST##\[}"
+ HOST=$(trim_string "${HOST%%\]}")
+ ;;
+esac
+
+if [ -z "$HOST" ]; then
+ HOST="${NOTIFY_HOST:-}"
+fi
+if [ -z "$PORT" ]; then
+ PORT="${NOTIFY_PORT:-}"
+fi
+
+ssl_key=$(trim_string "$ssl_key");
+ssl_cert=$(trim_string "$ssl_cert");
+ssl_ca=$(trim_string "$ssl_ca");
+ssl_capath=$(trim_string "$ssl_capath");
+ssl_cipher=$(trim_string "$ssl_cipher");
+ssl_crl=$(trim_string "$ssl_crl");
+ssl_crlpath=$(trim_string "$ssl_crlpath");
+ssl_verify_server_cert=$(trim_string "$ssl_verify_server_cert");
+
+SSL_PARAM=""
+
+if [ -n "$ssl_key" -o -n "$ssl_cert" -o \
+ -n "$ssl_ca" -o -n "$ssl_capath" -o \
+ -n "$ssl_cipher" ]
then
- $COM | mysql -B -u$USER -h$HOST -P$PORT
+ SSL_PARAM=' --ssl'
+ [ -n "$ssl_key" ] && SSL_PARAM="$SSL_PARAM --ssl-key='$ssl_key'"
+ [ -n "$ssl_cert" ] && SSL_PARAM="$SSL_PARAM --ssl-cert='$ssl_cert'"
+ [ -n "$ssl_ca" ] && SSL_PARAM="$SSL_PARAM --ssl-ca='$ssl_ca'"
+ [ -n "$ssl_capath" ] && SSL_PARAM="$SSL_PARAM --ssl-capath='$ssl_capath'"
+ [ -n "$ssl_cipher" ] && SSL_PARAM="$SSL_PARAM --ssl-cipher='$ssl_cipher'"
+ [ -n "$ssl_crl" ] && SSL_PARAM="$SSL_PARAM --ssl-crl='$ssl_crl'"
+ [ -n "$ssl_crlpath" ] && SSL_PARAM="$SSL_PARAM --ssl-crlpath='$ssl_crlpath'"
+ if [ -n "$ssl_verify_server_cert" ]; then
+ if [ $ssl_verify_server_cert -ne 0 ]; then
+ SSL_PARAM+=' --ssl-verify-server-cert'
+ fi
+ fi
+fi
+
+# Undefined means node is shutting down
+if [ "$STATUS" != 'Undefined' ]; then
+ "$COM" | eval "$CLIENT" -B "-u'$USER'"${PSWD:+" -p'$PSWD'"}\
+ "-h'$HOST'" "-P$PORT"$SSL_PARAM
fi
exit 0
-#
diff --git a/mysql-test/std_data/wsrep_notify_ssl.sh b/mysql-test/std_data/wsrep_notify_ssl.sh
new file mode 100755
index 00000000000..2c6b6f4dacb
--- /dev/null
+++ b/mysql-test/std_data/wsrep_notify_ssl.sh
@@ -0,0 +1,196 @@
+#!/bin/sh -eu
+
+# This is a simple example of wsrep notification script (wsrep_notify_cmd).
+# It will create 'wsrep' schema and two tables in it: 'membeship' and 'status'
+# and fill them on every membership or node status change.
+#
+# Edit parameters below to specify the address and login to server:
+#
+USER=root
+PSWD=
+#
+# If these parameters are not set, then the values
+# passed by the server are taken:
+#
+HOST=127.0.0.1
+PORT=$NODE_MYPORT_1
+#
+# Edit parameters below to specify SSL parameters:
+#
+ssl_cert="$MYSQL_TEST_DIR/std_data/client-cert.pem"
+ssl_key="$MYSQL_TEST_DIR/std_data/client-key.pem"
+ssl_ca="$MYSQL_TEST_DIR/std_data/cacert.pem"
+ssl_capath=
+ssl_cipher=
+ssl_crl=
+ssl_crlpath=
+ssl_verify_server_cert=0
+#
+# Client executable path:
+#
+CLIENT="$EXE_MYSQL"
+
+SCHEMA="mtr_wsrep_notify"
+MEMB_TABLE="$SCHEMA.membership"
+STATUS_TABLE="$SCHEMA.status"
+
+WSREP_ON='SET wsrep_on=ON'
+WSREP_OFF='SET wsrep_on=OFF'
+
+BEGIN="$WSREP_OFF;
+CREATE SCHEMA IF NOT EXISTS $SCHEMA;
+CREATE TABLE IF NOT EXISTS $MEMB_TABLE (
+ idx INT,
+ uuid CHAR(40), /* node UUID */
+ name VARCHAR(32), /* node name */
+ addr VARCHAR(256) /* node address */
+) ENGINE=MEMORY;
+CREATE TABLE IF NOT EXISTS $STATUS_TABLE (
+ size INT, /* component size */
+ idx INT, /* this node index */
+ status CHAR(16), /* this node status */
+ uuid CHAR(40), /* cluster UUID */
+ prim BOOLEAN /* if component is primary */
+) ENGINE=MEMORY;
+BEGIN"
+END="COMMIT; $WSREP_ON"
+
+configuration_change()
+{
+ echo "$BEGIN;"
+
+ local idx=0
+
+ for NODE in $(echo "$MEMBERS" | sed s/,/\ /g)
+ do
+ echo "INSERT INTO $MEMB_TABLE VALUES ( $idx, "
+ # Don't forget to properly quote string values
+ echo "'$NODE'" | sed s/\\//\',\'/g
+ echo ");"
+ idx=$(( $idx + 1 ))
+ done
+
+ echo "INSERT INTO $STATUS_TABLE VALUES($idx, $INDEX, '$STATUS', '$CLUSTER_UUID', $PRIMARY);"
+
+ echo "$END;"
+}
+
+status_update()
+{
+ echo "$BEGIN; UPDATE $STATUS_TABLE SET status='$STATUS'; $END;"
+}
+
+trim_string()
+{
+ if [ -n "${BASH_VERSION:-}" ]; then
+ local pattern="[![:space:]${2:-}]"
+ local x="${1#*$pattern}"
+ local z=${#1}
+ x=${#x}
+ if [ $x -ne $z ]; then
+ local y="${1%$pattern*}"
+ y=${#y}
+ x=$(( z-x-1 ))
+ y=$(( y-x+1 ))
+ printf '%s' "${1:$x:$y}"
+ else
+ printf ''
+ fi
+ else
+ local pattern="[[:space:]${2:-}]"
+ echo "$1" | sed -E "s/^$pattern+|$pattern+\$//g"
+ fi
+}
+
+COM=status_update # not a configuration change by default
+
+STATUS=""
+CLUSTER_UUID=""
+PRIMARY="0"
+INDEX=""
+MEMBERS=""
+
+while [ $# -gt 0 ]; do
+ case $1 in
+ --status)
+ STATUS=$(trim_string "$2")
+ shift
+ ;;
+ --uuid)
+ CLUSTER_UUID=$(trim_string "$2")
+ shift
+ ;;
+ --primary)
+ [ "$2" = "yes" ] && PRIMARY="1" || PRIMARY="0"
+ COM=configuration_change
+ shift
+ ;;
+ --index)
+ INDEX=$(trim_string "$2")
+ shift
+ ;;
+ --members)
+ MEMBERS=$(trim_string "$2")
+ shift
+ ;;
+ esac
+ shift
+done
+
+USER=$(trim_string "$USER")
+PSWD=$(trim_string "$PSWD")
+
+HOST=$(trim_string "$HOST")
+PORT=$(trim_string "$PORT")
+
+case "$HOST" in
+\[*)
+ HOST="${HOST##\[}"
+ HOST=$(trim_string "${HOST%%\]}")
+ ;;
+esac
+
+if [ -z "$HOST" ]; then
+ HOST="${NOTIFY_HOST:-}"
+fi
+if [ -z "$PORT" ]; then
+ PORT="${NOTIFY_PORT:-}"
+fi
+
+ssl_key=$(trim_string "$ssl_key");
+ssl_cert=$(trim_string "$ssl_cert");
+ssl_ca=$(trim_string "$ssl_ca");
+ssl_capath=$(trim_string "$ssl_capath");
+ssl_cipher=$(trim_string "$ssl_cipher");
+ssl_crl=$(trim_string "$ssl_crl");
+ssl_crlpath=$(trim_string "$ssl_crlpath");
+ssl_verify_server_cert=$(trim_string "$ssl_verify_server_cert");
+
+SSL_PARAM=""
+
+if [ -n "$ssl_key" -o -n "$ssl_cert" -o \
+ -n "$ssl_ca" -o -n "$ssl_capath" -o \
+ -n "$ssl_cipher" ]
+then
+ SSL_PARAM=' --ssl'
+ [ -n "$ssl_key" ] && SSL_PARAM="$SSL_PARAM --ssl-key='$ssl_key'"
+ [ -n "$ssl_cert" ] && SSL_PARAM="$SSL_PARAM --ssl-cert='$ssl_cert'"
+ [ -n "$ssl_ca" ] && SSL_PARAM="$SSL_PARAM --ssl-ca='$ssl_ca'"
+ [ -n "$ssl_capath" ] && SSL_PARAM="$SSL_PARAM --ssl-capath='$ssl_capath'"
+ [ -n "$ssl_cipher" ] && SSL_PARAM="$SSL_PARAM --ssl-cipher='$ssl_cipher'"
+ [ -n "$ssl_crl" ] && SSL_PARAM="$SSL_PARAM --ssl-crl='$ssl_crl'"
+ [ -n "$ssl_crlpath" ] && SSL_PARAM="$SSL_PARAM --ssl-crlpath='$ssl_crlpath'"
+ if [ -n "$ssl_verify_server_cert" ]; then
+ if [ $ssl_verify_server_cert -ne 0 ]; then
+ SSL_PARAM+=' --ssl-verify-server-cert'
+ fi
+ fi
+fi
+
+# Undefined means node is shutting down
+if [ "$STATUS" != 'Undefined' ]; then
+ "$COM" | eval "$CLIENT" -B "-u'$USER'"${PSWD:+" -p'$PSWD'"}\
+ "-h'$HOST'" "-P$PORT"$SSL_PARAM
+fi
+
+exit 0
diff --git a/mysql-test/suite/compat/oracle/r/sp-security.result b/mysql-test/suite/compat/oracle/r/sp-security.result
index b98ecaca972..db29a17a210 100644
--- a/mysql-test/suite/compat/oracle/r/sp-security.result
+++ b/mysql-test/suite/compat/oracle/r/sp-security.result
@@ -23,9 +23,9 @@ user1@localhost
# Making sure that user1 does not have privileges to db1.t1
#
SHOW CREATE TABLE db1.t1;
-ERROR 42000: SHOW command denied to user 'user1'@'localhost' for table 't1'
+ERROR 42000: SHOW command denied to user 'user1'@'localhost' for table `db1`.`t1`
SHOW FIELDS IN db1.t1;
-ERROR 42000: SELECT command denied to user 'user1'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'user1'@'localhost' for table `db1`.`t1`
#
# Trigger: using %TYPE with a table we don't have access to
#
@@ -43,7 +43,7 @@ END;
END
$$
INSERT INTO t1 (a) VALUES (10);
-ERROR 42000: SELECT command denied to user 'user1'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'user1'@'localhost' for table `db1`.`t1`
SELECT * FROM t1;
a b
10 20
@@ -61,7 +61,7 @@ SELECT a;
END;
$$
CALL p1;
-ERROR 42000: SELECT command denied to user 'user1'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'user1'@'localhost' for table `db1`.`t1`
DROP PROCEDURE p1;
CREATE PROCEDURE p1()
AS
@@ -71,7 +71,7 @@ SELECT a.a;
END;
$$
CALL p1;
-ERROR 42000: SELECT command denied to user 'user1'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'user1'@'localhost' for table `db1`.`t1`
DROP PROCEDURE p1;
#
# Stored procedure: Using %TYPE for with a table that we don't have access to
@@ -88,7 +88,7 @@ END;
$$
connection conn1;
CALL p1;
-ERROR 42000: SELECT command denied to user 'user1'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'user1'@'localhost' for table `db1`.`t1`
DROP PROCEDURE p1;
connection default;
CREATE PROCEDURE p1()
@@ -101,7 +101,7 @@ END;
$$
connection conn1;
CALL p1;
-ERROR 42000: SELECT command denied to user 'user1'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'user1'@'localhost' for table `db1`.`t1`
DROP PROCEDURE p1;
#
# Stored procedure: Using %TYPE for with a table that we don't have access to
@@ -149,7 +149,7 @@ RETURN OCTET_LENGTH(a);
END;
$$
SELECT f1();
-ERROR 42000: SELECT command denied to user 'user1'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'user1'@'localhost' for table `db1`.`t1`
DROP FUNCTION f1;
DROP TABLE t1;
#
@@ -168,7 +168,7 @@ END;
$$
connection conn1;
SELECT f1();
-ERROR 42000: SELECT command denied to user 'user1'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'user1'@'localhost' for table `db1`.`t1`
DROP FUNCTION f1;
DROP TABLE t1;
#
@@ -198,7 +198,7 @@ connection conn1;
# Making sure that user1 has access to db1.t1.a, but not to db1.t1.b
#
SHOW CREATE TABLE db1.t1;
-ERROR 42000: SHOW command denied to user 'user1'@'localhost' for table 't1'
+ERROR 42000: SHOW command denied to user 'user1'@'localhost' for table `db1`.`t1`
SHOW FIELDS IN db1.t1;
Field Type Null Key Default Extra
a int(11) YES NULL
diff --git a/mysql-test/suite/engines/funcs/r/rpl_sp.result b/mysql-test/suite/engines/funcs/r/rpl_sp.result
index 0e5929bcbd7..4202c849e4e 100644
--- a/mysql-test/suite/engines/funcs/r/rpl_sp.result
+++ b/mysql-test/suite/engines/funcs/r/rpl_sp.result
@@ -301,7 +301,7 @@ select * from t2;
a
connection con1;
create trigger trg before insert on t1 for each row set new.a= 10;
-ERROR 42000: TRIGGER command denied to user 'zedjzlcsjhd'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'zedjzlcsjhd'@'localhost' for table `mysqltest1`.`t1`
connection master;
delete from t1;
create trigger trg before insert on t1 for each row set new.a= 10;
diff --git a/mysql-test/suite/funcs_1/r/innodb_storedproc_06.result b/mysql-test/suite/funcs_1/r/innodb_storedproc_06.result
index 6db6e374ca7..88269f25a01 100644
--- a/mysql-test/suite/funcs_1/r/innodb_storedproc_06.result
+++ b/mysql-test/suite/funcs_1/r/innodb_storedproc_06.result
@@ -221,31 +221,31 @@ connect user5_2, localhost, user_2, , db_storedproc_1;
user_2@localhost db_storedproc_1
CALL sp5_s_i();
-ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
+ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
CALL sp5_ins();
-ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table 't3165'
+ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
CALL sp5_sel();
-ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
+ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
connection default;
root@localhost db_storedproc_1
CALL sp5_sel();
-ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
+ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
grant insert on db_storedproc_1.* to 'user_1'@'localhost';
flush privileges;
connection user5_2;
user_2@localhost db_storedproc_1
CALL sp5_s_i();
-ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
+ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
CALL sp5_ins();
CALL sp5_sel();
-ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
+ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
connection default;
root@localhost db_storedproc_1
CALL sp5_sel();
-ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
+ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
grant SELECT on db_storedproc_1.* to 'user_1'@'localhost';
flush privileges;
connection user5_2;
@@ -276,9 +276,9 @@ inserted outside of SP NULL
inserted from sp5_ins 2000-10-00
inserted from sp5_s_i 2000-10-00
inserted from sp5_ins 2000-10-00
-ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table 't3165'
+ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
CALL sp5_ins();
-ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table 't3165'
+ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
CALL sp5_sel();
c1 c2 c3
inserted outside of SP NULL
@@ -294,11 +294,11 @@ connection user5_2;
user_2@localhost db_storedproc_1
CALL sp5_s_i();
-ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
+ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
CALL sp5_ins();
-ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table 't3165'
+ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
CALL sp5_sel();
-ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
+ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
disconnect user5_2;
connection default;
@@ -348,9 +348,9 @@ user_2@localhost db_storedproc_1
CALL sp3166_s_i();
c1
inserted outside SP
-ERROR 42000: INSERT command denied to user 'user_2'@'localhost' for table 't3166'
+ERROR 42000: INSERT command denied to user 'user_2'@'localhost' for table `db_storedproc_1`.`t3166`
CALL sp3166_ins();
-ERROR 42000: INSERT command denied to user 'user_2'@'localhost' for table 't3166'
+ERROR 42000: INSERT command denied to user 'user_2'@'localhost' for table `db_storedproc_1`.`t3166`
CALL sp3166_sel();
c1
inserted outside SP
@@ -390,10 +390,10 @@ connect user6_4, localhost, user_2, , db_storedproc_1;
user_2@localhost db_storedproc_1
CALL sp3166_s_i();
-ERROR 42000: SELECT command denied to user 'user_2'@'localhost' for table 't3166'
+ERROR 42000: SELECT command denied to user 'user_2'@'localhost' for table `db_storedproc_1`.`t3166`
CALL sp3166_ins();
CALL sp3166_sel();
-ERROR 42000: SELECT command denied to user 'user_2'@'localhost' for table 't3166'
+ERROR 42000: SELECT command denied to user 'user_2'@'localhost' for table `db_storedproc_1`.`t3166`
disconnect user6_4;
connection default;
CALL sp3166_s_i();
diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_03.result b/mysql-test/suite/funcs_1/r/innodb_trig_03.result
index 9f9bf1ca4de..8e8606c6754 100644
--- a/mysql-test/suite/funcs_1/r/innodb_trig_03.result
+++ b/mysql-test/suite/funcs_1/r/innodb_trig_03.result
@@ -99,7 +99,7 @@ test_noprivs@localhost
use priv_db;
create trigger trg1_1 before INSERT on t1 for each row
set new.f1 = 'trig 3.5.3.2_1-no';
-ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table `priv_db`.`t1`
connection default;
use priv_db;
insert into t1 (f1) values ('insert 3.5.3.2-no');
@@ -135,7 +135,7 @@ Testcase 3.5.3.6:
connection no_privs;
use priv_db;
drop trigger trg1_2;
-ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table `priv_db`.`t1`
connection default;
use priv_db;
insert into t1 (f1) values ('insert 3.5.3.6-yes');
@@ -688,7 +688,7 @@ insert into t2 values (new.f1);
connection default;
use priv_db;
insert into t1 (f1) values (4);
-ERROR 42000: INSERT command denied to user 'test_yesprivs'@'localhost' for table 't2'
+ERROR 42000: INSERT command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
revoke SELECT on priv_db.t2 from test_yesprivs@localhost;
grant INSERT on priv_db.t2 to test_yesprivs@localhost;
insert into t1 (f1) values (4);
@@ -706,7 +706,7 @@ update t2 set f2=new.f1-1;
connection default;
use priv_db;
insert into t1 (f1) values (2);
-ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for table 't2'
+ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
revoke INSERT on priv_db.t2 from test_yesprivs@localhost;
grant UPDATE on priv_db.t2 to test_yesprivs@localhost;
insert into t1 (f1) values (2);
@@ -725,7 +725,7 @@ select f2 into @aaa from t2 where f2=new.f1;
connection default;
use priv_db;
insert into t1 (f1) values (1);
-ERROR 42000: SELECT command denied to user 'test_yesprivs'@'localhost' for table 't2'
+ERROR 42000: SELECT command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
revoke UPDATE on priv_db.t2 from test_yesprivs@localhost;
grant SELECT on priv_db.t2 to test_yesprivs@localhost;
insert into t1 (f1) values (1);
@@ -748,7 +748,7 @@ delete from t2;
connection default;
use priv_db;
insert into t1 (f1) values (1);
-ERROR 42000: DELETE command denied to user 'test_yesprivs'@'localhost' for table 't2'
+ERROR 42000: DELETE command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
revoke SELECT on priv_db.t2 from test_yesprivs@localhost;
grant DELETE on priv_db.t2 to test_yesprivs@localhost;
insert into t1 (f1) values (1);
diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_03e.result b/mysql-test/suite/funcs_1/r/innodb_trig_03e.result
index c869b5cc5bc..48ad0c8d05f 100644
--- a/mysql-test/suite/funcs_1/r/innodb_trig_03e.result
+++ b/mysql-test/suite/funcs_1/r/innodb_trig_03e.result
@@ -31,7 +31,7 @@ no trigger privilege on db level for create:
use priv_db;
create trigger trg1_1 before INSERT on t1 for each row
set new.f1 = 'trig 1_1-no';
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
connect no_privs,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
use priv_db;
insert into t1 (f1) values ('insert-yes');
@@ -107,7 +107,7 @@ current_user
test_yesprivs@localhost
use priv_db;
drop trigger trg1_2;
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
connection no_privs;
select current_user;
current_user
@@ -117,7 +117,7 @@ use priv_db;
no trigger privilege at activation time:
----------------------------------------
insert into t1 (f1) values ('insert-yes');
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
select f1 from t1 order by f1;
f1
insert-yes
@@ -155,7 +155,7 @@ Grants for test_yesprivs@localhost
GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT, UPDATE, TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost`
drop trigger trg1_2;
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
takes effect after use priv_db:
-------------------------------
@@ -195,14 +195,14 @@ test_yesprivs@localhost
use no_priv_db;
create trigger trg1_3 before INSERT on t1 for each row
set new.f1 = 'trig 1_3-no';
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `no_priv_db`.`t1`
use priv_db;
create trigger trg1_3 before INSERT on t1 for each row
set new.f1 = 'trig 1_3-yes';
use no_priv_db;
create trigger trg1_4 before UPDATE on t1 for each row
set new.f1 = 'trig 1_4-no';
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `no_priv_db`.`t1`
use priv_db;
create trigger trg1_4 before UPDATE on t1 for each row
set new.f1 = 'trig 1_4-yes';
@@ -302,7 +302,7 @@ Tables_in_priv_db
t1
create trigger trg1_1 before INSERT on t1 for each row
set new.f1 = 'trig 1_1-no';
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
connection no_privs;
select current_user;
current_user
@@ -376,7 +376,7 @@ select current_user;
current_user
test_yesprivs@localhost
drop trigger trg1_2;
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
no trigger privilege at activation time:
----------------------------------------
@@ -385,7 +385,7 @@ select current_user;
current_user
test_noprivs@localhost
insert into t1 (f1) values ('insert5-no');
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
select f1 from t1 order by f1;
f1
insert1-yes
@@ -476,12 +476,12 @@ current_user
test_yesprivs@localhost
create trigger trg2_1 before INSERT on t2 for each row
set new.f1 = 'trig 2_1-no';
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't2'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
create trigger trg1_3 before INSERT on t1 for each row
set new.f1 = 'trig 1_3-yes';
create trigger trg2_2 before UPDATE on t2 for each row
set new.f1 = 'trig 2_2-no';
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't2'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
create trigger trg1_4 before UPDATE on t1 for each row
set new.f1 = 'trig 1_4-yes';
show triggers;
@@ -615,7 +615,7 @@ Trigger Event Table Statement Timing Created sql_mode Definer character_set_clie
select * from information_schema.triggers;
TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
drop trigger trg1_1;
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
connection default;
select current_user;
current_user
@@ -635,7 +635,7 @@ current_user
test_yesprivs@localhost
create trigger trg1_1 before INSERT on t1 for each row
set new.f1 = 'trig 1_1-no';
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
connection no_privs;
select current_user;
current_user
@@ -671,11 +671,11 @@ set new.f1 = 'trig 1_2-yes';
create trigger no_priv_db.trg1_9 before insert on no_priv_db.t1
for each row
set new.f1 = 'trig 1_9-yes';
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `no_priv_db`.`t1`
use no_priv_db;
create trigger trg1_2 before INSERT on t1 for each row
set new.f1 = 'trig 1_2-no';
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `no_priv_db`.`t1`
create trigger priv_db.trg1_9 before UPDATE on priv_db.t1
for each row
set new.f1 = 'trig 1_9-yes';
@@ -699,7 +699,7 @@ select f1 from t1 order by f1;
f1
insert-yes
drop trigger priv_db.trg1_9;
-ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table `priv_db`.`t1`
connection default;
select current_user;
current_user
@@ -708,7 +708,7 @@ drop trigger priv_db.trg1_9;
revoke TRIGGER on priv_db.* from test_yesprivs@localhost;
use priv_db;
insert into t1 (f1) values ('insert-yes');
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
select f1 from t1 order by f1;
f1
insert-yes
@@ -728,7 +728,7 @@ test_yesprivs@localhost
use no_priv_db;
create trigger trg1_2 before INSERT on t1 for each row
set new.f1 = 'trig 1_2-no';
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `no_priv_db`.`t1`
connection no_privs;
select current_user;
current_user
@@ -843,7 +843,7 @@ set new.f1 = 'trig 2_1-yes';
use priv2_db;
create trigger trg1_1 before INSERT on t1 for each row
set new.f1 = 'trig1_1-yes';
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv2_db`.`t1`
connection no_privs;
select current_user;
current_user
@@ -918,7 +918,7 @@ test_yesprivs@localhost
use priv1_db;
create trigger trg1_1 before INSERT on t1 for each row
set new.f1 = 'trig 1_1-no';
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv1_db`.`t1`
connection default;
select current_user;
current_user
@@ -945,7 +945,7 @@ create trigger trg1_2 before INSERT on t1 for each row
set new.f1 = 'trig 1_2-yes';
create trigger trg2_1 before INSERT on t2 for each row
set new.f1 = 'trig 2_1-no';
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't2'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv1_db`.`t2`
connection no_privs;
select current_user;
current_user
@@ -986,7 +986,7 @@ current_user
test_yesprivs@localhost
create trigger trg2_1 before INSERT on t2 for each row
set new.f1 = 'trig 2_1-yes';
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't2'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv1_db`.`t2`
use priv1_db;
create trigger trg2_1 before INSERT on t2 for each row
set new.f1 = 'trig 2_1-yes';
@@ -1110,7 +1110,7 @@ select current_user;
current_user
test_yesprivs@localhost
execute ins1;
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
select f1 from t1 order by f1;
f1
trig 1_1-yes
@@ -1122,7 +1122,7 @@ current_user
test_useprivs@localhost
prepare ins1 from 'insert into t1 (f1) values (''insert5-no'')';
execute ins1;
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
select f1 from t1 order by f1;
f1
trig 1_1-yes
@@ -1173,7 +1173,7 @@ select current_user;
current_user
test_yesprivs@localhost
execute ins1;
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
select f1 from t1 order by f1;
f1
trig 1_1-yes
@@ -1185,7 +1185,7 @@ select current_user;
current_user
test_useprivs@localhost
execute ins1;
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
select f1 from t1 order by f1;
f1
trig 1_1-yes
@@ -1240,7 +1240,7 @@ select current_user;
current_user
test_yesprivs@localhost
execute ins1;
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
select f1 from t1 order by f1;
f1
trig 1_1-yes
@@ -1255,7 +1255,7 @@ select current_user;
current_user
test_useprivs@localhost
execute ins1;
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
select f1 from t1 order by f1;
f1
trig 1_1-yes
@@ -1323,11 +1323,11 @@ current_user
test_yesprivs@localhost
use priv_db;
insert into t1 (f1) values ('insert-no');
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
select f1 from t1 order by f1;
f1
drop trigger trg1_0;
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
connection default;
select current_user;
current_user
@@ -1638,12 +1638,12 @@ update t1 set f1 = 'update6_no'
where f1 like '%insert%';
update t2 set f1 = 'update6_no'
where f1 like '%insert%';
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't2'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
update t1 set f1 = 'update7_no'
where f1 like '%insert%';
update t2 set f1 = 'update7_no'
where f1 like '%insert%';
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't2'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
select f1 from t1 order by f1;
f1
trig 1_1-yes
@@ -1669,7 +1669,7 @@ test_noprivs@localhost
update t1 set f1 = 'update8-no',
f2 = 'update8-no'
where f2 like '%yes';
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
select * from t1 order by f1,f2,f3;
f1 f2 f3
trig 1_1-yes NULL NULL
@@ -1743,7 +1743,7 @@ current_user
test_noprivs@localhost
use priv_db;
update t1 set f3= f3+1;
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
select f3 from t1 order by f3;
f3
NULL
diff --git a/mysql-test/suite/funcs_1/r/is_columns.result b/mysql-test/suite/funcs_1/r/is_columns.result
index 52afcb3cf28..cc22ec442d8 100644
--- a/mysql-test/suite/funcs_1/r/is_columns.result
+++ b/mysql-test/suite/funcs_1/r/is_columns.result
@@ -170,7 +170,7 @@ Field Type Null Key Default Extra
f1 char(10) YES MUL NULL
f2 text YES NULL
SHOW COLUMNS FROM db_datadict.t2;
-ERROR 42000: SELECT command denied to user 'testuser1'@'localhost' for table 't2'
+ERROR 42000: SELECT command denied to user 'testuser1'@'localhost' for table `db_datadict`.`t2`
SHOW COLUMNS FROM db_datadict.v1;
Field Type Null Key Default Extra
f2 int(1) NO 0
@@ -182,13 +182,13 @@ TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAUL
def db_datadict t2 f1 1 NULL NO char 10 10 NULL NULL NULL latin1 latin1_swedish_ci char(10) PRI insert NEVER NULL
def db_datadict t2 f2 2 NULL YES text 65535 65535 NULL NULL NULL latin1 latin1_swedish_ci text insert NEVER NULL
SHOW COLUMNS FROM db_datadict.t1;
-ERROR 42000: SELECT command denied to user 'testuser2'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'testuser2'@'localhost' for table `db_datadict`.`t1`
SHOW COLUMNS FROM db_datadict.t2;
Field Type Null Key Default Extra
f1 char(10) NO PRI NULL
f2 text YES NULL
SHOW COLUMNS FROM db_datadict.v1;
-ERROR 42000: SELECT command denied to user 'testuser2'@'localhost' for table 'v1'
+ERROR 42000: SELECT command denied to user 'testuser2'@'localhost' for table `db_datadict`.`v1`
connection default;
disconnect testuser1;
disconnect testuser2;
diff --git a/mysql-test/suite/funcs_1/r/is_table_constraints.result b/mysql-test/suite/funcs_1/r/is_table_constraints.result
index 3c1cd61c1d0..37765a7bb04 100644
--- a/mysql-test/suite/funcs_1/r/is_table_constraints.result
+++ b/mysql-test/suite/funcs_1/r/is_table_constraints.result
@@ -150,7 +150,7 @@ t1 0 my_idx1 1 f6 ### ### ### ### ### ### ###
t1 0 my_idx1 2 f1 ### ### ### ### ### ### ###
t1 0 my_idx2 1 f3 ### ### ### ### ### ### ###
SHOW INDEXES FROM db_datadict.t2;
-ERROR 42000: SELECT command denied to user 'testuser1'@'localhost' for table 't2'
+ERROR 42000: SELECT command denied to user 'testuser1'@'localhost' for table `db_datadict`.`t2`
connection default;
disconnect testuser1;
DROP USER 'testuser1'@'localhost';
diff --git a/mysql-test/suite/funcs_1/r/is_triggers.result b/mysql-test/suite/funcs_1/r/is_triggers.result
index 98f3810c950..54fef2f2cf8 100644
--- a/mysql-test/suite/funcs_1/r/is_triggers.result
+++ b/mysql-test/suite/funcs_1/r/is_triggers.result
@@ -172,9 +172,9 @@ Grants for testuser4@localhost
GRANT TRIGGER ON *.* TO `testuser4`@`localhost`
# TRIGGER Privilege + no SELECT Privilege on t1 --> result for query
SELECT * FROM db_datadict.t1;
-ERROR 42000: SELECT command denied to user 'testuser4'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'testuser4'@'localhost' for table `db_datadict`.`t1`
DESC db_datadict.t1;
-ERROR 42000: SELECT command denied to user 'testuser4'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'testuser4'@'localhost' for table `db_datadict`.`t1`
SELECT * FROM information_schema.triggers
WHERE trigger_name = 'trg1';
TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
diff --git a/mysql-test/suite/funcs_1/r/is_user_privileges.result b/mysql-test/suite/funcs_1/r/is_user_privileges.result
index b35d7c0bb2a..3b939c4c81b 100644
--- a/mysql-test/suite/funcs_1/r/is_user_privileges.result
+++ b/mysql-test/suite/funcs_1/r/is_user_privileges.result
@@ -1052,7 +1052,7 @@ PRIVILEGE_TYPE UPDATE
IS_GRANTABLE NO
SELECT * FROM mysql.user
WHERE user LIKE 'testuser%' ORDER BY host, user;
-ERROR 42000: SELECT command denied to user 'testuser2'@'localhost' for table 'user'
+ERROR 42000: SELECT command denied to user 'testuser2'@'localhost' for table `mysql`.`user`
SHOW GRANTS;
Grants for testuser2@localhost
GRANT INSERT, UPDATE ON *.* TO `testuser2`@`localhost`
@@ -1066,7 +1066,7 @@ PRIVILEGE_TYPE USAGE
IS_GRANTABLE NO
SELECT * FROM mysql.user
WHERE user LIKE 'testuser%' ORDER BY host, user;
-ERROR 42000: SELECT command denied to user 'testuser3'@'localhost' for table 'user'
+ERROR 42000: SELECT command denied to user 'testuser3'@'localhost' for table `mysql`.`user`
SHOW GRANTS;
Grants for testuser3@localhost
GRANT USAGE ON *.* TO `testuser3`@`localhost`
@@ -1246,12 +1246,12 @@ PRIVILEGE_TYPE USAGE
IS_GRANTABLE NO
SELECT * FROM mysql.user
WHERE user LIKE 'testuser%' ORDER BY host, user;
-ERROR 42000: SELECT command denied to user 'testuser1'@'localhost' for table 'user'
+ERROR 42000: SELECT command denied to user 'testuser1'@'localhost' for table `mysql`.`user`
SHOW GRANTS;
Grants for testuser1@localhost
GRANT USAGE ON *.* TO `testuser1`@`localhost`
CREATE TABLE db_datadict.tb_55 ( c1 TEXT );
-ERROR 42000: CREATE command denied to user 'testuser1'@'localhost' for table 'tb_55'
+ERROR 42000: CREATE command denied to user 'testuser1'@'localhost' for table `db_datadict`.`tb_55`
SELECT * FROM information_schema.user_privileges
WHERE grantee LIKE '''testuser%'''
ORDER BY grantee, table_catalog, privilege_type;
@@ -1261,12 +1261,12 @@ PRIVILEGE_TYPE USAGE
IS_GRANTABLE NO
SELECT * FROM mysql.user
WHERE user LIKE 'testuser%' ORDER BY host, user;
-ERROR 42000: SELECT command denied to user 'testuser1'@'localhost' for table 'user'
+ERROR 42000: SELECT command denied to user 'testuser1'@'localhost' for table `mysql`.`user`
SHOW GRANTS;
Grants for testuser1@localhost
GRANT USAGE ON *.* TO `testuser1`@`localhost`
CREATE TABLE db_datadict.tb_66 ( c1 TEXT );
-ERROR 42000: CREATE command denied to user 'testuser1'@'localhost' for table 'tb_66'
+ERROR 42000: CREATE command denied to user 'testuser1'@'localhost' for table `db_datadict`.`tb_66`
# Add ALL on db_datadict.* (and select on mysql.user) to testuser1;
connection default;
@@ -1591,7 +1591,7 @@ GRANT USAGE ON *.* TO `testuser1`@`localhost`
GRANT ALL PRIVILEGES ON `db_datadict`.* TO `testuser1`@`localhost` WITH GRANT OPTION
GRANT SELECT ON `mysql`.`user` TO `testuser1`@`localhost`
CREATE TABLE db_datadict.tb_56 ( c1 TEXT );
-ERROR 42000: CREATE command denied to user 'testuser1'@'localhost' for table 'tb_56'
+ERROR 42000: CREATE command denied to user 'testuser1'@'localhost' for table `db_datadict`.`tb_56`
USE db_datadict;
SELECT * FROM information_schema.user_privileges
WHERE grantee LIKE '''testuser%'''
@@ -1926,7 +1926,7 @@ PRIVILEGE_TYPE USAGE
IS_GRANTABLE NO
SELECT * FROM mysql.user
WHERE user LIKE 'testuser%' ORDER BY host, user;
-ERROR 42000: SELECT command denied to user 'testuser1'@'localhost' for table 'user'
+ERROR 42000: SELECT command denied to user 'testuser1'@'localhost' for table `mysql`.`user`
SHOW GRANTS;
Grants for testuser1@localhost
GRANT USAGE ON *.* TO `testuser1`@`localhost`
diff --git a/mysql-test/suite/funcs_1/r/memory_storedproc_06.result b/mysql-test/suite/funcs_1/r/memory_storedproc_06.result
index ce1ee82e89a..694cfc0158f 100644
--- a/mysql-test/suite/funcs_1/r/memory_storedproc_06.result
+++ b/mysql-test/suite/funcs_1/r/memory_storedproc_06.result
@@ -221,31 +221,31 @@ connect user5_2, localhost, user_2, , db_storedproc_1;
user_2@localhost db_storedproc_1
CALL sp5_s_i();
-ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
+ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
CALL sp5_ins();
-ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table 't3165'
+ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
CALL sp5_sel();
-ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
+ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
connection default;
root@localhost db_storedproc_1
CALL sp5_sel();
-ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
+ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
grant insert on db_storedproc_1.* to 'user_1'@'localhost';
flush privileges;
connection user5_2;
user_2@localhost db_storedproc_1
CALL sp5_s_i();
-ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
+ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
CALL sp5_ins();
CALL sp5_sel();
-ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
+ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
connection default;
root@localhost db_storedproc_1
CALL sp5_sel();
-ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
+ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
grant SELECT on db_storedproc_1.* to 'user_1'@'localhost';
flush privileges;
connection user5_2;
@@ -276,9 +276,9 @@ inserted outside of SP NULL
inserted from sp5_ins 2000-10-00
inserted from sp5_s_i 2000-10-00
inserted from sp5_ins 2000-10-00
-ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table 't3165'
+ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
CALL sp5_ins();
-ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table 't3165'
+ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
CALL sp5_sel();
c1 c2 c3
inserted outside of SP NULL
@@ -294,11 +294,11 @@ connection user5_2;
user_2@localhost db_storedproc_1
CALL sp5_s_i();
-ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
+ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
CALL sp5_ins();
-ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table 't3165'
+ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
CALL sp5_sel();
-ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
+ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
disconnect user5_2;
connection default;
@@ -348,9 +348,9 @@ user_2@localhost db_storedproc_1
CALL sp3166_s_i();
c1
inserted outside SP
-ERROR 42000: INSERT command denied to user 'user_2'@'localhost' for table 't3166'
+ERROR 42000: INSERT command denied to user 'user_2'@'localhost' for table `db_storedproc_1`.`t3166`
CALL sp3166_ins();
-ERROR 42000: INSERT command denied to user 'user_2'@'localhost' for table 't3166'
+ERROR 42000: INSERT command denied to user 'user_2'@'localhost' for table `db_storedproc_1`.`t3166`
CALL sp3166_sel();
c1
inserted outside SP
@@ -390,10 +390,10 @@ connect user6_4, localhost, user_2, , db_storedproc_1;
user_2@localhost db_storedproc_1
CALL sp3166_s_i();
-ERROR 42000: SELECT command denied to user 'user_2'@'localhost' for table 't3166'
+ERROR 42000: SELECT command denied to user 'user_2'@'localhost' for table `db_storedproc_1`.`t3166`
CALL sp3166_ins();
CALL sp3166_sel();
-ERROR 42000: SELECT command denied to user 'user_2'@'localhost' for table 't3166'
+ERROR 42000: SELECT command denied to user 'user_2'@'localhost' for table `db_storedproc_1`.`t3166`
disconnect user6_4;
connection default;
CALL sp3166_s_i();
diff --git a/mysql-test/suite/funcs_1/r/memory_trig_03.result b/mysql-test/suite/funcs_1/r/memory_trig_03.result
index 75286115d86..6b9c6c8ddc3 100644
--- a/mysql-test/suite/funcs_1/r/memory_trig_03.result
+++ b/mysql-test/suite/funcs_1/r/memory_trig_03.result
@@ -99,7 +99,7 @@ test_noprivs@localhost
use priv_db;
create trigger trg1_1 before INSERT on t1 for each row
set new.f1 = 'trig 3.5.3.2_1-no';
-ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table `priv_db`.`t1`
connection default;
use priv_db;
insert into t1 (f1) values ('insert 3.5.3.2-no');
@@ -135,7 +135,7 @@ Testcase 3.5.3.6:
connection no_privs;
use priv_db;
drop trigger trg1_2;
-ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table `priv_db`.`t1`
connection default;
use priv_db;
insert into t1 (f1) values ('insert 3.5.3.6-yes');
@@ -688,7 +688,7 @@ insert into t2 values (new.f1);
connection default;
use priv_db;
insert into t1 (f1) values (4);
-ERROR 42000: INSERT command denied to user 'test_yesprivs'@'localhost' for table 't2'
+ERROR 42000: INSERT command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
revoke SELECT on priv_db.t2 from test_yesprivs@localhost;
grant INSERT on priv_db.t2 to test_yesprivs@localhost;
insert into t1 (f1) values (4);
@@ -706,7 +706,7 @@ update t2 set f2=new.f1-1;
connection default;
use priv_db;
insert into t1 (f1) values (2);
-ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for table 't2'
+ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
revoke INSERT on priv_db.t2 from test_yesprivs@localhost;
grant UPDATE on priv_db.t2 to test_yesprivs@localhost;
insert into t1 (f1) values (2);
@@ -725,7 +725,7 @@ select f2 into @aaa from t2 where f2=new.f1;
connection default;
use priv_db;
insert into t1 (f1) values (1);
-ERROR 42000: SELECT command denied to user 'test_yesprivs'@'localhost' for table 't2'
+ERROR 42000: SELECT command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
revoke UPDATE on priv_db.t2 from test_yesprivs@localhost;
grant SELECT on priv_db.t2 to test_yesprivs@localhost;
insert into t1 (f1) values (1);
@@ -748,7 +748,7 @@ delete from t2;
connection default;
use priv_db;
insert into t1 (f1) values (1);
-ERROR 42000: DELETE command denied to user 'test_yesprivs'@'localhost' for table 't2'
+ERROR 42000: DELETE command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
revoke SELECT on priv_db.t2 from test_yesprivs@localhost;
grant DELETE on priv_db.t2 to test_yesprivs@localhost;
insert into t1 (f1) values (1);
diff --git a/mysql-test/suite/funcs_1/r/memory_trig_03e.result b/mysql-test/suite/funcs_1/r/memory_trig_03e.result
index 72c269cb89a..a72a8a1221d 100644
--- a/mysql-test/suite/funcs_1/r/memory_trig_03e.result
+++ b/mysql-test/suite/funcs_1/r/memory_trig_03e.result
@@ -32,7 +32,7 @@ no trigger privilege on db level for create:
use priv_db;
create trigger trg1_1 before INSERT on t1 for each row
set new.f1 = 'trig 1_1-no';
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
connect no_privs,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
use priv_db;
insert into t1 (f1) values ('insert-yes');
@@ -108,7 +108,7 @@ current_user
test_yesprivs@localhost
use priv_db;
drop trigger trg1_2;
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
connection no_privs;
select current_user;
current_user
@@ -118,7 +118,7 @@ use priv_db;
no trigger privilege at activation time:
----------------------------------------
insert into t1 (f1) values ('insert-yes');
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
select f1 from t1 order by f1;
f1
insert-yes
@@ -156,7 +156,7 @@ Grants for test_yesprivs@localhost
GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT, UPDATE, TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost`
drop trigger trg1_2;
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
takes effect after use priv_db:
-------------------------------
@@ -196,14 +196,14 @@ test_yesprivs@localhost
use no_priv_db;
create trigger trg1_3 before INSERT on t1 for each row
set new.f1 = 'trig 1_3-no';
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `no_priv_db`.`t1`
use priv_db;
create trigger trg1_3 before INSERT on t1 for each row
set new.f1 = 'trig 1_3-yes';
use no_priv_db;
create trigger trg1_4 before UPDATE on t1 for each row
set new.f1 = 'trig 1_4-no';
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `no_priv_db`.`t1`
use priv_db;
create trigger trg1_4 before UPDATE on t1 for each row
set new.f1 = 'trig 1_4-yes';
@@ -303,7 +303,7 @@ Tables_in_priv_db
t1
create trigger trg1_1 before INSERT on t1 for each row
set new.f1 = 'trig 1_1-no';
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
connection no_privs;
select current_user;
current_user
@@ -377,7 +377,7 @@ select current_user;
current_user
test_yesprivs@localhost
drop trigger trg1_2;
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
no trigger privilege at activation time:
----------------------------------------
@@ -386,7 +386,7 @@ select current_user;
current_user
test_noprivs@localhost
insert into t1 (f1) values ('insert5-no');
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
select f1 from t1 order by f1;
f1
insert1-yes
@@ -477,12 +477,12 @@ current_user
test_yesprivs@localhost
create trigger trg2_1 before INSERT on t2 for each row
set new.f1 = 'trig 2_1-no';
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't2'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
create trigger trg1_3 before INSERT on t1 for each row
set new.f1 = 'trig 1_3-yes';
create trigger trg2_2 before UPDATE on t2 for each row
set new.f1 = 'trig 2_2-no';
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't2'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
create trigger trg1_4 before UPDATE on t1 for each row
set new.f1 = 'trig 1_4-yes';
show triggers;
@@ -616,7 +616,7 @@ Trigger Event Table Statement Timing Created sql_mode Definer character_set_clie
select * from information_schema.triggers;
TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
drop trigger trg1_1;
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
connection default;
select current_user;
current_user
@@ -636,7 +636,7 @@ current_user
test_yesprivs@localhost
create trigger trg1_1 before INSERT on t1 for each row
set new.f1 = 'trig 1_1-no';
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
connection no_privs;
select current_user;
current_user
@@ -672,11 +672,11 @@ set new.f1 = 'trig 1_2-yes';
create trigger no_priv_db.trg1_9 before insert on no_priv_db.t1
for each row
set new.f1 = 'trig 1_9-yes';
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `no_priv_db`.`t1`
use no_priv_db;
create trigger trg1_2 before INSERT on t1 for each row
set new.f1 = 'trig 1_2-no';
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `no_priv_db`.`t1`
create trigger priv_db.trg1_9 before UPDATE on priv_db.t1
for each row
set new.f1 = 'trig 1_9-yes';
@@ -700,7 +700,7 @@ select f1 from t1 order by f1;
f1
insert-yes
drop trigger priv_db.trg1_9;
-ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table `priv_db`.`t1`
connection default;
select current_user;
current_user
@@ -709,7 +709,7 @@ drop trigger priv_db.trg1_9;
revoke TRIGGER on priv_db.* from test_yesprivs@localhost;
use priv_db;
insert into t1 (f1) values ('insert-yes');
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
select f1 from t1 order by f1;
f1
insert-yes
@@ -729,7 +729,7 @@ test_yesprivs@localhost
use no_priv_db;
create trigger trg1_2 before INSERT on t1 for each row
set new.f1 = 'trig 1_2-no';
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `no_priv_db`.`t1`
connection no_privs;
select current_user;
current_user
@@ -844,7 +844,7 @@ set new.f1 = 'trig 2_1-yes';
use priv2_db;
create trigger trg1_1 before INSERT on t1 for each row
set new.f1 = 'trig1_1-yes';
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv2_db`.`t1`
connection no_privs;
select current_user;
current_user
@@ -919,7 +919,7 @@ test_yesprivs@localhost
use priv1_db;
create trigger trg1_1 before INSERT on t1 for each row
set new.f1 = 'trig 1_1-no';
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv1_db`.`t1`
connection default;
select current_user;
current_user
@@ -946,7 +946,7 @@ create trigger trg1_2 before INSERT on t1 for each row
set new.f1 = 'trig 1_2-yes';
create trigger trg2_1 before INSERT on t2 for each row
set new.f1 = 'trig 2_1-no';
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't2'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv1_db`.`t2`
connection no_privs;
select current_user;
current_user
@@ -987,7 +987,7 @@ current_user
test_yesprivs@localhost
create trigger trg2_1 before INSERT on t2 for each row
set new.f1 = 'trig 2_1-yes';
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't2'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv1_db`.`t2`
use priv1_db;
create trigger trg2_1 before INSERT on t2 for each row
set new.f1 = 'trig 2_1-yes';
@@ -1111,7 +1111,7 @@ select current_user;
current_user
test_yesprivs@localhost
execute ins1;
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
select f1 from t1 order by f1;
f1
trig 1_1-yes
@@ -1123,7 +1123,7 @@ current_user
test_useprivs@localhost
prepare ins1 from 'insert into t1 (f1) values (''insert5-no'')';
execute ins1;
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
select f1 from t1 order by f1;
f1
trig 1_1-yes
@@ -1174,7 +1174,7 @@ select current_user;
current_user
test_yesprivs@localhost
execute ins1;
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
select f1 from t1 order by f1;
f1
trig 1_1-yes
@@ -1186,7 +1186,7 @@ select current_user;
current_user
test_useprivs@localhost
execute ins1;
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
select f1 from t1 order by f1;
f1
trig 1_1-yes
@@ -1241,7 +1241,7 @@ select current_user;
current_user
test_yesprivs@localhost
execute ins1;
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
select f1 from t1 order by f1;
f1
trig 1_1-yes
@@ -1256,7 +1256,7 @@ select current_user;
current_user
test_useprivs@localhost
execute ins1;
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
select f1 from t1 order by f1;
f1
trig 1_1-yes
@@ -1324,11 +1324,11 @@ current_user
test_yesprivs@localhost
use priv_db;
insert into t1 (f1) values ('insert-no');
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
select f1 from t1 order by f1;
f1
drop trigger trg1_0;
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
connection default;
select current_user;
current_user
@@ -1577,12 +1577,12 @@ update t1 set f1 = 'update6_no'
where f1 like '%insert%';
update t2 set f1 = 'update6_no'
where f1 like '%insert%';
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't2'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
update t1 set f1 = 'update7_no'
where f1 like '%insert%';
update t2 set f1 = 'update7_no'
where f1 like '%insert%';
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't2'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
select f1 from t1 order by f1;
f1
trig 1_1-yes
@@ -1608,7 +1608,7 @@ test_noprivs@localhost
update t1 set f1 = 'update8-no',
f2 = 'update8-no'
where f2 like '%yes';
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
select * from t1 order by f1,f2,f3;
f1 f2 f3
trig 1_1-yes NULL NULL
@@ -1682,7 +1682,7 @@ current_user
test_noprivs@localhost
use priv_db;
update t1 set f3= f3+1;
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
select f3 from t1 order by f3;
f3
NULL
diff --git a/mysql-test/suite/funcs_1/r/myisam_storedproc_06.result b/mysql-test/suite/funcs_1/r/myisam_storedproc_06.result
index ce1ee82e89a..694cfc0158f 100644
--- a/mysql-test/suite/funcs_1/r/myisam_storedproc_06.result
+++ b/mysql-test/suite/funcs_1/r/myisam_storedproc_06.result
@@ -221,31 +221,31 @@ connect user5_2, localhost, user_2, , db_storedproc_1;
user_2@localhost db_storedproc_1
CALL sp5_s_i();
-ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
+ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
CALL sp5_ins();
-ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table 't3165'
+ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
CALL sp5_sel();
-ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
+ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
connection default;
root@localhost db_storedproc_1
CALL sp5_sel();
-ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
+ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
grant insert on db_storedproc_1.* to 'user_1'@'localhost';
flush privileges;
connection user5_2;
user_2@localhost db_storedproc_1
CALL sp5_s_i();
-ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
+ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
CALL sp5_ins();
CALL sp5_sel();
-ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
+ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
connection default;
root@localhost db_storedproc_1
CALL sp5_sel();
-ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
+ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
grant SELECT on db_storedproc_1.* to 'user_1'@'localhost';
flush privileges;
connection user5_2;
@@ -276,9 +276,9 @@ inserted outside of SP NULL
inserted from sp5_ins 2000-10-00
inserted from sp5_s_i 2000-10-00
inserted from sp5_ins 2000-10-00
-ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table 't3165'
+ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
CALL sp5_ins();
-ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table 't3165'
+ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
CALL sp5_sel();
c1 c2 c3
inserted outside of SP NULL
@@ -294,11 +294,11 @@ connection user5_2;
user_2@localhost db_storedproc_1
CALL sp5_s_i();
-ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
+ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
CALL sp5_ins();
-ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table 't3165'
+ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
CALL sp5_sel();
-ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
+ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
disconnect user5_2;
connection default;
@@ -348,9 +348,9 @@ user_2@localhost db_storedproc_1
CALL sp3166_s_i();
c1
inserted outside SP
-ERROR 42000: INSERT command denied to user 'user_2'@'localhost' for table 't3166'
+ERROR 42000: INSERT command denied to user 'user_2'@'localhost' for table `db_storedproc_1`.`t3166`
CALL sp3166_ins();
-ERROR 42000: INSERT command denied to user 'user_2'@'localhost' for table 't3166'
+ERROR 42000: INSERT command denied to user 'user_2'@'localhost' for table `db_storedproc_1`.`t3166`
CALL sp3166_sel();
c1
inserted outside SP
@@ -390,10 +390,10 @@ connect user6_4, localhost, user_2, , db_storedproc_1;
user_2@localhost db_storedproc_1
CALL sp3166_s_i();
-ERROR 42000: SELECT command denied to user 'user_2'@'localhost' for table 't3166'
+ERROR 42000: SELECT command denied to user 'user_2'@'localhost' for table `db_storedproc_1`.`t3166`
CALL sp3166_ins();
CALL sp3166_sel();
-ERROR 42000: SELECT command denied to user 'user_2'@'localhost' for table 't3166'
+ERROR 42000: SELECT command denied to user 'user_2'@'localhost' for table `db_storedproc_1`.`t3166`
disconnect user6_4;
connection default;
CALL sp3166_s_i();
diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_03.result b/mysql-test/suite/funcs_1/r/myisam_trig_03.result
index 75286115d86..6b9c6c8ddc3 100644
--- a/mysql-test/suite/funcs_1/r/myisam_trig_03.result
+++ b/mysql-test/suite/funcs_1/r/myisam_trig_03.result
@@ -99,7 +99,7 @@ test_noprivs@localhost
use priv_db;
create trigger trg1_1 before INSERT on t1 for each row
set new.f1 = 'trig 3.5.3.2_1-no';
-ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table `priv_db`.`t1`
connection default;
use priv_db;
insert into t1 (f1) values ('insert 3.5.3.2-no');
@@ -135,7 +135,7 @@ Testcase 3.5.3.6:
connection no_privs;
use priv_db;
drop trigger trg1_2;
-ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table `priv_db`.`t1`
connection default;
use priv_db;
insert into t1 (f1) values ('insert 3.5.3.6-yes');
@@ -688,7 +688,7 @@ insert into t2 values (new.f1);
connection default;
use priv_db;
insert into t1 (f1) values (4);
-ERROR 42000: INSERT command denied to user 'test_yesprivs'@'localhost' for table 't2'
+ERROR 42000: INSERT command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
revoke SELECT on priv_db.t2 from test_yesprivs@localhost;
grant INSERT on priv_db.t2 to test_yesprivs@localhost;
insert into t1 (f1) values (4);
@@ -706,7 +706,7 @@ update t2 set f2=new.f1-1;
connection default;
use priv_db;
insert into t1 (f1) values (2);
-ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for table 't2'
+ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
revoke INSERT on priv_db.t2 from test_yesprivs@localhost;
grant UPDATE on priv_db.t2 to test_yesprivs@localhost;
insert into t1 (f1) values (2);
@@ -725,7 +725,7 @@ select f2 into @aaa from t2 where f2=new.f1;
connection default;
use priv_db;
insert into t1 (f1) values (1);
-ERROR 42000: SELECT command denied to user 'test_yesprivs'@'localhost' for table 't2'
+ERROR 42000: SELECT command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
revoke UPDATE on priv_db.t2 from test_yesprivs@localhost;
grant SELECT on priv_db.t2 to test_yesprivs@localhost;
insert into t1 (f1) values (1);
@@ -748,7 +748,7 @@ delete from t2;
connection default;
use priv_db;
insert into t1 (f1) values (1);
-ERROR 42000: DELETE command denied to user 'test_yesprivs'@'localhost' for table 't2'
+ERROR 42000: DELETE command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
revoke SELECT on priv_db.t2 from test_yesprivs@localhost;
grant DELETE on priv_db.t2 to test_yesprivs@localhost;
insert into t1 (f1) values (1);
diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_03e.result b/mysql-test/suite/funcs_1/r/myisam_trig_03e.result
index 8b8df4bd694..f6bd346cabe 100644
--- a/mysql-test/suite/funcs_1/r/myisam_trig_03e.result
+++ b/mysql-test/suite/funcs_1/r/myisam_trig_03e.result
@@ -32,7 +32,7 @@ no trigger privilege on db level for create:
use priv_db;
create trigger trg1_1 before INSERT on t1 for each row
set new.f1 = 'trig 1_1-no';
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
connect no_privs,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
use priv_db;
insert into t1 (f1) values ('insert-yes');
@@ -108,7 +108,7 @@ current_user
test_yesprivs@localhost
use priv_db;
drop trigger trg1_2;
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
connection no_privs;
select current_user;
current_user
@@ -118,7 +118,7 @@ use priv_db;
no trigger privilege at activation time:
----------------------------------------
insert into t1 (f1) values ('insert-yes');
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
select f1 from t1 order by f1;
f1
insert-yes
@@ -156,7 +156,7 @@ Grants for test_yesprivs@localhost
GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT, UPDATE, TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost`
drop trigger trg1_2;
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
takes effect after use priv_db:
-------------------------------
@@ -196,14 +196,14 @@ test_yesprivs@localhost
use no_priv_db;
create trigger trg1_3 before INSERT on t1 for each row
set new.f1 = 'trig 1_3-no';
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `no_priv_db`.`t1`
use priv_db;
create trigger trg1_3 before INSERT on t1 for each row
set new.f1 = 'trig 1_3-yes';
use no_priv_db;
create trigger trg1_4 before UPDATE on t1 for each row
set new.f1 = 'trig 1_4-no';
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `no_priv_db`.`t1`
use priv_db;
create trigger trg1_4 before UPDATE on t1 for each row
set new.f1 = 'trig 1_4-yes';
@@ -303,7 +303,7 @@ Tables_in_priv_db
t1
create trigger trg1_1 before INSERT on t1 for each row
set new.f1 = 'trig 1_1-no';
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
connection no_privs;
select current_user;
current_user
@@ -377,7 +377,7 @@ select current_user;
current_user
test_yesprivs@localhost
drop trigger trg1_2;
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
no trigger privilege at activation time:
----------------------------------------
@@ -386,7 +386,7 @@ select current_user;
current_user
test_noprivs@localhost
insert into t1 (f1) values ('insert5-no');
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
select f1 from t1 order by f1;
f1
insert1-yes
@@ -477,12 +477,12 @@ current_user
test_yesprivs@localhost
create trigger trg2_1 before INSERT on t2 for each row
set new.f1 = 'trig 2_1-no';
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't2'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
create trigger trg1_3 before INSERT on t1 for each row
set new.f1 = 'trig 1_3-yes';
create trigger trg2_2 before UPDATE on t2 for each row
set new.f1 = 'trig 2_2-no';
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't2'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
create trigger trg1_4 before UPDATE on t1 for each row
set new.f1 = 'trig 1_4-yes';
show triggers;
@@ -616,7 +616,7 @@ Trigger Event Table Statement Timing Created sql_mode Definer character_set_clie
select * from information_schema.triggers;
TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
drop trigger trg1_1;
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
connection default;
select current_user;
current_user
@@ -636,7 +636,7 @@ current_user
test_yesprivs@localhost
create trigger trg1_1 before INSERT on t1 for each row
set new.f1 = 'trig 1_1-no';
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
connection no_privs;
select current_user;
current_user
@@ -672,11 +672,11 @@ set new.f1 = 'trig 1_2-yes';
create trigger no_priv_db.trg1_9 before insert on no_priv_db.t1
for each row
set new.f1 = 'trig 1_9-yes';
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `no_priv_db`.`t1`
use no_priv_db;
create trigger trg1_2 before INSERT on t1 for each row
set new.f1 = 'trig 1_2-no';
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `no_priv_db`.`t1`
create trigger priv_db.trg1_9 before UPDATE on priv_db.t1
for each row
set new.f1 = 'trig 1_9-yes';
@@ -700,7 +700,7 @@ select f1 from t1 order by f1;
f1
insert-yes
drop trigger priv_db.trg1_9;
-ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table `priv_db`.`t1`
connection default;
select current_user;
current_user
@@ -709,7 +709,7 @@ drop trigger priv_db.trg1_9;
revoke TRIGGER on priv_db.* from test_yesprivs@localhost;
use priv_db;
insert into t1 (f1) values ('insert-yes');
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
select f1 from t1 order by f1;
f1
insert-yes
@@ -729,7 +729,7 @@ test_yesprivs@localhost
use no_priv_db;
create trigger trg1_2 before INSERT on t1 for each row
set new.f1 = 'trig 1_2-no';
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `no_priv_db`.`t1`
connection no_privs;
select current_user;
current_user
@@ -844,7 +844,7 @@ set new.f1 = 'trig 2_1-yes';
use priv2_db;
create trigger trg1_1 before INSERT on t1 for each row
set new.f1 = 'trig1_1-yes';
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv2_db`.`t1`
connection no_privs;
select current_user;
current_user
@@ -919,7 +919,7 @@ test_yesprivs@localhost
use priv1_db;
create trigger trg1_1 before INSERT on t1 for each row
set new.f1 = 'trig 1_1-no';
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv1_db`.`t1`
connection default;
select current_user;
current_user
@@ -946,7 +946,7 @@ create trigger trg1_2 before INSERT on t1 for each row
set new.f1 = 'trig 1_2-yes';
create trigger trg2_1 before INSERT on t2 for each row
set new.f1 = 'trig 2_1-no';
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't2'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv1_db`.`t2`
connection no_privs;
select current_user;
current_user
@@ -987,7 +987,7 @@ current_user
test_yesprivs@localhost
create trigger trg2_1 before INSERT on t2 for each row
set new.f1 = 'trig 2_1-yes';
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't2'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv1_db`.`t2`
use priv1_db;
create trigger trg2_1 before INSERT on t2 for each row
set new.f1 = 'trig 2_1-yes';
@@ -1111,7 +1111,7 @@ select current_user;
current_user
test_yesprivs@localhost
execute ins1;
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
select f1 from t1 order by f1;
f1
trig 1_1-yes
@@ -1123,7 +1123,7 @@ current_user
test_useprivs@localhost
prepare ins1 from 'insert into t1 (f1) values (''insert5-no'')';
execute ins1;
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
select f1 from t1 order by f1;
f1
trig 1_1-yes
@@ -1174,7 +1174,7 @@ select current_user;
current_user
test_yesprivs@localhost
execute ins1;
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
select f1 from t1 order by f1;
f1
trig 1_1-yes
@@ -1186,7 +1186,7 @@ select current_user;
current_user
test_useprivs@localhost
execute ins1;
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
select f1 from t1 order by f1;
f1
trig 1_1-yes
@@ -1241,7 +1241,7 @@ select current_user;
current_user
test_yesprivs@localhost
execute ins1;
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
select f1 from t1 order by f1;
f1
trig 1_1-yes
@@ -1256,7 +1256,7 @@ select current_user;
current_user
test_useprivs@localhost
execute ins1;
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
select f1 from t1 order by f1;
f1
trig 1_1-yes
@@ -1324,11 +1324,11 @@ current_user
test_yesprivs@localhost
use priv_db;
insert into t1 (f1) values ('insert-no');
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
select f1 from t1 order by f1;
f1
drop trigger trg1_0;
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
connection default;
select current_user;
current_user
@@ -1577,12 +1577,12 @@ update t1 set f1 = 'update6_no'
where f1 like '%insert%';
update t2 set f1 = 'update6_no'
where f1 like '%insert%';
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't2'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
update t1 set f1 = 'update7_no'
where f1 like '%insert%';
update t2 set f1 = 'update7_no'
where f1 like '%insert%';
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't2'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
select f1 from t1 order by f1;
f1
trig 1_1-yes
@@ -1608,7 +1608,7 @@ test_noprivs@localhost
update t1 set f1 = 'update8-no',
f2 = 'update8-no'
where f2 like '%yes';
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
select * from t1 order by f1,f2,f3;
f1 f2 f3
trig 1_1-yes NULL NULL
@@ -1682,7 +1682,7 @@ current_user
test_noprivs@localhost
use priv_db;
update t1 set f3= f3+1;
-ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
select f3 from t1 order by f3;
f3
NULL
diff --git a/mysql-test/suite/funcs_1/r/storedproc.result b/mysql-test/suite/funcs_1/r/storedproc.result
index 37a422f219a..fabf9e6d41f 100644
--- a/mysql-test/suite/funcs_1/r/storedproc.result
+++ b/mysql-test/suite/funcs_1/r/storedproc.result
@@ -1849,7 +1849,7 @@ connection u_1;
user_1@localhost db_storedproc
USE db_storedproc;
CALL sp11();
-ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table `mysql`.`t1`
commit work;
disconnect u_1;
connection default;
diff --git a/mysql-test/suite/galera/r/galera_roles.result b/mysql-test/suite/galera/r/galera_roles.result
index 7d6c57e8131..b23ff238b8f 100644
--- a/mysql-test/suite/galera/r/galera_roles.result
+++ b/mysql-test/suite/galera/r/galera_roles.result
@@ -31,7 +31,7 @@ GRANT USAGE ON *.* TO `foo`@`localhost`
FLUSH TABLES;
ERROR 42000: Access denied; you need (at least one of) the RELOAD privilege(s) for this operation
SELECT * FROM mysql.roles_mapping;
-ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table 'roles_mapping'
+ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table `mysql`.`roles_mapping`
SHOW TABLES FROM test1;
ERROR 42000: Access denied for user 'foo'@'localhost' to database 'test1'
SET ROLE role1;
@@ -49,7 +49,7 @@ a b
1 2
3 4
SELECT * FROM test1.t2;
-ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table 't2'
+ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table `test1`.`t2`
SELECT a FROM test1.t2;
a
5
@@ -67,7 +67,7 @@ GRANT USAGE ON *.* TO `foo`@`localhost`
FLUSH TABLES;
ERROR 42000: Access denied; you need (at least one of) the RELOAD privilege(s) for this operation
SELECT * FROM mysql.roles_mapping;
-ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table 'roles_mapping'
+ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table `mysql`.`roles_mapping`
SHOW TABLES FROM test1;
ERROR 42000: Access denied for user 'foo'@'localhost' to database 'test1'
SET ROLE role1;
@@ -85,7 +85,7 @@ a b
1 2
3 4
SELECT * FROM test1.t2;
-ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table 't2'
+ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table `test1`.`t2`
SELECT a FROM test1.t2;
a
5
@@ -122,11 +122,11 @@ DROP ROLE role1;
connection foo_node_1;
FLUSH TABLES;
SELECT * FROM mysql.roles_mapping;
-ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table 'roles_mapping'
+ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table `mysql`.`roles_mapping`
SELECT * FROM test1.t1;
-ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table `test1`.`t1`
SELECT a FROM test1.t2;
-ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table 't2'
+ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table `test1`.`t2`
SHOW GRANTS;
Grants for foo@localhost
GRANT USAGE ON *.* TO `foo`@`localhost`
@@ -144,11 +144,11 @@ role1
connection foo_node_2;
FLUSH TABLES;
SELECT * FROM mysql.roles_mapping;
-ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table 'roles_mapping'
+ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table `mysql`.`roles_mapping`
SELECT * FROM test1.t1;
-ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table `test1`.`t1`
SELECT a FROM test1.t2;
-ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table 't2'
+ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table `test1`.`t2`
SHOW GRANTS;
Grants for foo@localhost
GRANT USAGE ON *.* TO `foo`@`localhost`
diff --git a/mysql-test/suite/galera/r/galera_rsu_wsrep_desync.result b/mysql-test/suite/galera/r/galera_rsu_wsrep_desync.result
index a103e810588..bc6b263c41e 100644
--- a/mysql-test/suite/galera/r/galera_rsu_wsrep_desync.result
+++ b/mysql-test/suite/galera/r/galera_rsu_wsrep_desync.result
@@ -15,7 +15,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`f1` int(11) DEFAULT NULL,
`f2` int(11) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
SHOW VARIABLES LIKE 'wsrep_desync';
Variable_name Value
wsrep_desync OFF
@@ -42,7 +42,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`f1` int(11) DEFAULT NULL,
`f2` int(11) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
SET wsrep_OSU_method=TOI;
DROP TABLE t1;
SET DEBUG_SYNC= 'RESET';
diff --git a/mysql-test/suite/galera/r/galera_sync_wait_show.result b/mysql-test/suite/galera/r/galera_sync_wait_show.result
index def771ff88d..9edb2cbe780 100644
--- a/mysql-test/suite/galera/r/galera_sync_wait_show.result
+++ b/mysql-test/suite/galera/r/galera_sync_wait_show.result
@@ -5,7 +5,7 @@ CREATE DATABASE db1;
connection node_2;
SHOW CREATE DATABASE db1;
Database Create Database
-db1 CREATE DATABASE `db1` /*!40100 DEFAULT CHARACTER SET latin1 */
+db1 CREATE DATABASE `db1` /*!40100 DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci */
DROP DATABASE db1;
connection node_1;
CREATE PROCEDURE p1 () SELECT 1 FROM DUAL;
diff --git a/mysql-test/suite/galera/r/galera_toi_ddl_error.result b/mysql-test/suite/galera/r/galera_toi_ddl_error.result
index dafad153867..ec4e6203324 100644
--- a/mysql-test/suite/galera/r/galera_toi_ddl_error.result
+++ b/mysql-test/suite/galera/r/galera_toi_ddl_error.result
@@ -10,12 +10,12 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`f1` int(11) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
connection node_1;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`f1` int(11) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
DROP TABLE t1;
DROP TABLE ten;
diff --git a/mysql-test/suite/galera/r/galera_var_notify_ssl_ipv6.result b/mysql-test/suite/galera/r/galera_var_notify_ssl_ipv6.result
new file mode 100644
index 00000000000..823407fbba7
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_var_notify_ssl_ipv6.result
@@ -0,0 +1,11 @@
+connection node_1;
+SELECT COUNT(DISTINCT uuid) AS EXPECT_2 FROM mtr_wsrep_notify.membership;
+EXPECT_2
+2
+SELECT MAX(size) AS EXPECT_2 FROM mtr_wsrep_notify.status;
+EXPECT_2
+2
+SELECT COUNT(DISTINCT idx) AS EXPECT_2 FROM mtr_wsrep_notify.status;
+EXPECT_2
+2
+DROP SCHEMA mtr_wsrep_notify;
diff --git a/mysql-test/suite/galera/r/lp1376747-4.result b/mysql-test/suite/galera/r/lp1376747-4.result
index efce740ea88..0e12d59e922 100644
--- a/mysql-test/suite/galera/r/lp1376747-4.result
+++ b/mysql-test/suite/galera/r/lp1376747-4.result
@@ -14,7 +14,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`id` int(11) NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
SET debug_sync='flush_tables_with_read_lock_after_acquire_locks SIGNAL parked2 WAIT_FOR go2';
FLUSH TABLES t1 WITH READ LOCK;;
connection node_2;
@@ -26,7 +26,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`id` int(11) NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
connection node_2a;
set debug_sync= 'RESET';
UNLOCK TABLES;
@@ -37,7 +37,7 @@ t1 CREATE TABLE `t1` (
`id` int(11) NOT NULL,
`f2` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
SELECT * from t1;
id f2
1 NULL
diff --git a/mysql-test/suite/galera/r/rename.result b/mysql-test/suite/galera/r/rename.result
index a7ec431657b..e3d2f739104 100644
--- a/mysql-test/suite/galera/r/rename.result
+++ b/mysql-test/suite/galera/r/rename.result
@@ -21,7 +21,7 @@ i
1
# Following RENAME should not replicate to other node.
RENAME TABLE t1 TO t2;
-ERROR 42000: DROP, ALTER command denied to user 'foo'@'localhost' for table 't1'
+ERROR 42000: DROP, ALTER command denied to user 'foo'@'localhost' for table `test`.`t1`
# On node 2
connection node_2;
USE test;
diff --git a/mysql-test/suite/galera/t/galera_var_notify_ssl_ipv6-master.opt b/mysql-test/suite/galera/t/galera_var_notify_ssl_ipv6-master.opt
new file mode 100644
index 00000000000..99c5889916b
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_var_notify_ssl_ipv6-master.opt
@@ -0,0 +1 @@
+--wsrep_notify_cmd=$MYSQL_TEST_DIR/std_data/wsrep_notify_ssl.sh --wsrep-sync-wait=0
diff --git a/mysql-test/suite/galera/t/galera_var_notify_ssl_ipv6.cnf b/mysql-test/suite/galera/t/galera_var_notify_ssl_ipv6.cnf
new file mode 100644
index 00000000000..ce121d20e03
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_var_notify_ssl_ipv6.cnf
@@ -0,0 +1,20 @@
+!include ../galera_2nodes.cnf
+
+[mysqld]
+ssl-cert=@ENV.MYSQL_TEST_DIR/std_data/server-cert.pem
+ssl-key=@ENV.MYSQL_TEST_DIR/std_data/server-key.pem
+ssl-ca=@ENV.MYSQL_TEST_DIR/std_data/cacert.pem
+bind-address=::
+
+[mysqld.1]
+wsrep_provider_options='base_port=@mysqld.1.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.1.#galera_port;ist.recv_addr=[::1]:@mysqld.1.#ist_port;gcache.size=1;pc.ignore_sb=true'
+wsrep_node_incoming_address='[::1]:@mysqld.1.port'
+wsrep_node_address=::1
+wsrep_sst_receive_address='[::1]:@mysqld.1.#sst_port'
+
+[mysqld.2]
+wsrep_cluster_address='gcomm://[::1]:@mysqld.1.#galera_port'
+wsrep_provider_options='base_port=@mysqld.2.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.2.#galera_port;ist.recv_addr=[::1]:@mysqld.2.#ist_port;gcache.size=1;pc.ignore_sb=true'
+wsrep_node_address=::1
+wsrep_node_incoming_address='[::1]:@mysqld.2.port'
+wsrep_sst_receive_address='[::1]:@mysqld.2.#sst_port'
diff --git a/mysql-test/suite/galera/t/galera_var_notify_ssl_ipv6.test b/mysql-test/suite/galera/t/galera_var_notify_ssl_ipv6.test
new file mode 100644
index 00000000000..2c2b106c2ae
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_var_notify_ssl_ipv6.test
@@ -0,0 +1,20 @@
+#
+# Test wsrep_notify_cmd. We use a version of the support-files/wsrep_notify.sh script that writes
+# notifications into a table.
+#
+
+--source include/galera_cluster.inc
+--source include/have_ssl_communication.inc
+--source include/check_ipv6.inc
+--source include/force_restart.inc
+
+--connection node_1
+--let $wait_condition = SELECT COUNT(DISTINCT uuid) = 2 FROM mtr_wsrep_notify.membership;
+--source include/wait_condition.inc
+
+SELECT COUNT(DISTINCT uuid) AS EXPECT_2 FROM mtr_wsrep_notify.membership;
+SELECT MAX(size) AS EXPECT_2 FROM mtr_wsrep_notify.status;
+SELECT COUNT(DISTINCT idx) AS EXPECT_2 FROM mtr_wsrep_notify.status;
+
+# CLEANUP
+DROP SCHEMA mtr_wsrep_notify;
diff --git a/mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result b/mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result
index 3ef3679db75..5767aaf63ca 100644
--- a/mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result
+++ b/mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result
@@ -148,10 +148,7 @@ lock table t write;
connection prevent_purge;
commit;
connection default;
-InnoDB 0 transactions not purged
disconnect lock_table;
-start transaction with consistent snapshot;
-commit;
InnoDB 0 transactions not purged
set global debug_dbug=@old_dbug;
drop table t;
diff --git a/mysql-test/suite/gcol/r/innodb_virtual_index.result b/mysql-test/suite/gcol/r/innodb_virtual_index.result
index e63d47391c9..b0c29da2f22 100644
--- a/mysql-test/suite/gcol/r/innodb_virtual_index.result
+++ b/mysql-test/suite/gcol/r/innodb_virtual_index.result
@@ -1,3 +1,4 @@
+SET default_storage_engine= innodb;
SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
#
@@ -248,12 +249,15 @@ ENGINE=InnoDB;
INSERT IGNORE INTO t1 (a,b) VALUES(1,20190132);
Warnings:
Warning 1265 Data truncated for column 'vb' at row 1
+SELECT * FROM t1;
+a b vb
+1 20190132 0000-00-00
BEGIN;
DELETE FROM t1;
INSERT INTO t1 (a,b) VALUES(1,20190123);
-ERROR 22007: Incorrect date value: '20190132' for column `test`.`t1`.`vb` at row 1
SELECT * FROM t1;
a b vb
+1 20190123 2019-01-23
ROLLBACK;
SELECT * FROM t1;
a b vb
@@ -310,3 +314,62 @@ ALTER TABLE t1 ADD KEY (b), ALGORITHM=INPLACE;
# Cleanup
DROP TABLE t1;
# End of 10.2 tests
+#
+# MDEV-29299 SELECT from table with vcol index reports warning
+#
+CREATE TABLE t(fld1 INT NOT NULL,
+fld2 INT AS (100/fld1) VIRTUAL,
+KEY(fld1), KEY(fld2));
+CREATE TABLE t_odd(id int);
+INSERT INTO t(fld1) VALUES(1), (2);
+connect stop_purge,localhost,root;
+START TRANSACTION WITH CONSISTENT SNAPSHOT;
+INSERT INTO t_odd VALUES(10000);
+connection default;
+UPDATE IGNORE t SET fld1= 3 WHERE fld1= 2;
+UPDATE IGNORE t SET fld1= 4 WHERE fld1= 3;
+UPDATE IGNORE t SET fld1= 0 WHERE fld1= 4;
+Warnings:
+Warning 1365 Division by 0
+SELECT fld2 FROM t FORCE INDEX(fld2);
+fld2
+NULL
+100
+SELECT fld2 FROM t FORCE INDEX(fld1);
+fld2
+100
+NULL
+Warnings:
+Warning 1365 Division by 0
+disconnect stop_purge;
+DROP TABLE t, t_odd;
+#
+# MDEV-29753 An error is wrongly reported during INSERT with vcol index
+# See also Bug #22990029
+#
+CREATE TABLE t(pk INT PRIMARY KEY,
+fld1 INT NOT NULL,
+fld2 INT AS (100/fld1) VIRTUAL,
+KEY(fld1), KEY(fld2));
+INSERT IGNORE t(pk, fld1) VALUES(1, 0);
+Warnings:
+Warning 1365 Division by 0
+SELECT * FROM t;
+pk fld1 fld2
+1 0 NULL
+Warnings:
+Warning 1365 Division by 0
+BEGIN;
+DELETE FROM t;
+Warnings:
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+INSERT INTO t (pk, fld1) VALUES(1,1);
+SELECT * FROM t;
+pk fld1 fld2
+1 1 100
+# Cleanup
+ROLLBACK;
+DROP TABLE t;
+# End of 10.3 tests
diff --git a/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test b/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test
index da203f118a8..20db2cd5533 100644
--- a/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test
+++ b/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test
@@ -189,10 +189,7 @@ lock table t write;
connection prevent_purge;
commit;
connection default;
---source ../../innodb/include/wait_all_purged.inc
disconnect lock_table;
-start transaction with consistent snapshot;
-commit;
--source ../../innodb/include/wait_all_purged.inc
set global debug_dbug=@old_dbug;
drop table t;
diff --git a/mysql-test/suite/gcol/t/innodb_virtual_index.test b/mysql-test/suite/gcol/t/innodb_virtual_index.test
index 46ffadcdd8c..747a2fdb64c 100644
--- a/mysql-test/suite/gcol/t/innodb_virtual_index.test
+++ b/mysql-test/suite/gcol/t/innodb_virtual_index.test
@@ -1,6 +1,8 @@
--source include/have_innodb.inc
--source include/have_sequence.inc
+SET default_storage_engine= innodb;
+
# Ensure that the history list length will actually be decremented by purge.
SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
@@ -273,9 +275,9 @@ DROP TABLE t1;
CREATE TABLE t1(a INT PRIMARY KEY, b INT, vb DATE AS(b) VIRTUAL, KEY(vb))
ENGINE=InnoDB;
INSERT IGNORE INTO t1 (a,b) VALUES(1,20190132);
+SELECT * FROM t1;
BEGIN;
DELETE FROM t1;
---error ER_TRUNCATED_WRONG_VALUE
INSERT INTO t1 (a,b) VALUES(1,20190123);
SELECT * FROM t1;
ROLLBACK;
@@ -334,3 +336,49 @@ DROP TABLE t1;
--echo # End of 10.2 tests
+--echo #
+--echo # MDEV-29299 SELECT from table with vcol index reports warning
+--echo #
+
+CREATE TABLE t(fld1 INT NOT NULL,
+ fld2 INT AS (100/fld1) VIRTUAL,
+ KEY(fld1), KEY(fld2));
+CREATE TABLE t_odd(id int);
+INSERT INTO t(fld1) VALUES(1), (2);
+
+--connect stop_purge,localhost,root
+# This prevents purge for records in t
+START TRANSACTION WITH CONSISTENT SNAPSHOT;
+INSERT INTO t_odd VALUES(10000);
+
+--connection default
+UPDATE IGNORE t SET fld1= 3 WHERE fld1= 2;
+UPDATE IGNORE t SET fld1= 4 WHERE fld1= 3;
+UPDATE IGNORE t SET fld1= 0 WHERE fld1= 4;
+SELECT fld2 FROM t FORCE INDEX(fld2);
+SELECT fld2 FROM t FORCE INDEX(fld1);
+
+--disconnect stop_purge
+DROP TABLE t, t_odd;
+
+--echo #
+--echo # MDEV-29753 An error is wrongly reported during INSERT with vcol index
+--echo # See also Bug #22990029
+--echo #
+
+CREATE TABLE t(pk INT PRIMARY KEY,
+ fld1 INT NOT NULL,
+ fld2 INT AS (100/fld1) VIRTUAL,
+ KEY(fld1), KEY(fld2));
+INSERT IGNORE t(pk, fld1) VALUES(1, 0);
+SELECT * FROM t;
+BEGIN;
+DELETE FROM t;
+INSERT INTO t (pk, fld1) VALUES(1,1);
+SELECT * FROM t;
+
+--echo # Cleanup
+ROLLBACK;
+DROP TABLE t;
+
+--echo # End of 10.3 tests
diff --git a/mysql-test/suite/innodb/r/innodb-64k.result b/mysql-test/suite/innodb/r/innodb-64k.result
index 372dbbb91a0..189a615cbe3 100644
--- a/mysql-test/suite/innodb/r/innodb-64k.result
+++ b/mysql-test/suite/innodb/r/innodb-64k.result
@@ -1081,9 +1081,11 @@ COMMIT;
drop table t2;
DROP TABLE t1;
#
-# MDEV-19526 heap number overflow
+# MDEV-19526/MDEV-29742 heap number overflow
#
CREATE TABLE t1(a SMALLINT NOT NULL UNIQUE AUTO_INCREMENT, KEY(a))
ENGINE=InnoDB;
INSERT INTO t1 (a) SELECT seq FROM seq_1_to_8191;
+ALTER TABLE t1 FORCE, ALGORITHM=INPLACE;
DROP TABLE t1;
+# End of 10.3 tests
diff --git a/mysql-test/suite/innodb/r/innodb-table-online.result b/mysql-test/suite/innodb/r/innodb-table-online.result
index 806c2bbc455..ea56ea41c87 100644
--- a/mysql-test/suite/innodb/r/innodb-table-online.result
+++ b/mysql-test/suite/innodb/r/innodb-table-online.result
@@ -18,15 +18,12 @@ ddl_log_file_alter_table 0
SET DEBUG_SYNC = 'RESET';
SET DEBUG_SYNC = 'write_row_noreplace SIGNAL have_handle WAIT_FOR go_ahead';
INSERT INTO t1 VALUES(1,2,3);
-# Establish session con1 (user=root)
connect con1,localhost,root,,;
-connection con1;
SET DEBUG_SYNC = 'now WAIT_FOR have_handle';
SET lock_wait_timeout = 1;
ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
SET DEBUG_SYNC = 'now SIGNAL go_ahead';
-# session default
connection default;
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
SELECT name, count FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE subsystem = 'ddl';
@@ -37,7 +34,6 @@ ddl_online_create_index 0
ddl_pending_alter_table 0
ddl_sort_file_alter_table 0
ddl_log_file_alter_table 0
-# session con1
connection con1;
SET @saved_debug_dbug = @@SESSION.debug_dbug;
SET DEBUG_DBUG = '+d,innodb_OOM_prepare_inplace_alter';
@@ -55,7 +51,6 @@ SET SESSION DEBUG = @saved_debug_dbug;
Warnings:
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
ALTER TABLE t1 ROW_FORMAT=REDUNDANT, ALGORITHM=INPLACE, LOCK=NONE;
-# session default
connection default;
SHOW CREATE TABLE t1;
Table Create Table
@@ -67,22 +62,17 @@ t1 CREATE TABLE `t1` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=REDUNDANT
BEGIN;
INSERT INTO t1 VALUES(7,4,2);
-# session con1
connection con1;
SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL scanned WAIT_FOR insert_done';
ALTER TABLE t1 DROP PRIMARY KEY, ADD UNIQUE INDEX(c2);
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
-# session default
connection default;
COMMIT;
-# session con1
connection con1;
ALTER TABLE t1 DROP PRIMARY KEY, ADD UNIQUE INDEX(c2);
ERROR 23000: Duplicate entry '4' for key 'c2'
-# session default
connection default;
DELETE FROM t1 WHERE c1 = 7;
-# session con1
connection con1;
ALTER TABLE t1 DROP PRIMARY KEY, ADD UNIQUE INDEX(c2), ROW_FORMAT=COMPACT,
LOCK = SHARED, ALGORITHM = INPLACE;
@@ -100,7 +90,6 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `c2_2` (`c2`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=COMPACT
ALTER TABLE t1 DROP INDEX c2, ADD PRIMARY KEY(c1);
-# session default
connection default;
SET DEBUG_SYNC = 'now WAIT_FOR scanned';
SELECT name, count FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE subsystem = 'ddl';
@@ -114,13 +103,10 @@ ddl_log_file_alter_table 0
BEGIN;
INSERT INTO t1 VALUES(4,7,2);
SET DEBUG_SYNC = 'now SIGNAL insert_done';
-# session con1
connection con1;
ERROR 23000: Duplicate entry '4' for key 'PRIMARY'
-# session default
connection default;
ROLLBACK;
-# session con1
connection con1;
SHOW CREATE TABLE t1;
Table Create Table
@@ -142,7 +128,6 @@ ddl_online_create_index 0
ddl_pending_alter_table 0
ddl_sort_file_alter_table 0
ddl_log_file_alter_table 0
-# session default
connection default;
INSERT INTO t1 VALUES(6,3,1);
ERROR 23000: Duplicate entry '3' for key 'c2_2'
@@ -152,14 +137,12 @@ DROP INDEX c2_2 ON t1;
BEGIN;
INSERT INTO t1 VALUES(7,4,2);
ROLLBACK;
-# session con1
connection con1;
KILL QUERY @id;
ERROR 70100: Query execution was interrupted
SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL rebuilt WAIT_FOR dml_done';
SET DEBUG_SYNC = 'row_log_table_apply2_before SIGNAL applied WAIT_FOR kill_done';
ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
-# session default
connection default;
SET DEBUG_SYNC = 'now WAIT_FOR rebuilt';
SELECT name, count FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE subsystem = 'ddl';
@@ -176,7 +159,6 @@ ROLLBACK;
SET DEBUG_SYNC = 'now SIGNAL dml_done WAIT_FOR applied';
KILL QUERY @id;
SET DEBUG_SYNC = 'now SIGNAL kill_done';
-# session con1
connection con1;
ERROR 70100: Query execution was interrupted
SELECT name, count FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE subsystem = 'ddl';
@@ -187,7 +169,6 @@ ddl_online_create_index 0
ddl_pending_alter_table 0
ddl_sort_file_alter_table 0
ddl_log_file_alter_table 0
-# session default
connection default;
CHECK TABLE t1;
Table Op Msg_type Msg_text
@@ -211,7 +192,6 @@ WHERE variable_name = 'innodb_encryption_n_merge_blocks_decrypted');
SET @rowlog_encrypt_0=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_encrypted');
-# session con1
connection con1;
SHOW CREATE TABLE t1;
Table Create Table
@@ -226,7 +206,6 @@ SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL rebuilt2 WAIT_FOR dml2_done
SET lock_wait_timeout = 10;
ALTER TABLE t1 ROW_FORMAT=COMPACT
PAGE_COMPRESSED = YES PAGE_COMPRESSION_LEVEL = 1, ALGORITHM = INPLACE;
-# session default
connection default;
INSERT INTO t1 SELECT 80 + c1, c2, c3 FROM t1;
INSERT INTO t1 SELECT 160 + c1, c2, c3 FROM t1;
@@ -289,7 +268,6 @@ SELECT
sort_balance @merge_encrypt_1>@merge_encrypt_0 @merge_decrypt_1>@merge_decrypt_0 @rowlog_encrypt_1>@rowlog_encrypt_0
0 0 0 0
SET DEBUG_SYNC = 'now SIGNAL dml2_done';
-# session con1
connection con1;
ERROR HY000: Creating index 'PRIMARY' required more than 'innodb_online_alter_log_max_size' bytes of modification log. Please try again
SELECT name, count FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE subsystem = 'ddl';
@@ -320,7 +298,6 @@ ERROR 23000: Duplicate entry '5' for key 'PRIMARY'
ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(c22f,c1,c4(5)),
CHANGE c2 c22f INT, CHANGE c3 c3 CHAR(255) NULL, CHANGE c1 c1 INT AFTER c22f,
ADD COLUMN c4 VARCHAR(6) DEFAULT 'Online', LOCK=NONE;
-# session default
connection default;
SET DEBUG_SYNC = 'now WAIT_FOR rebuilt3';
SELECT name, count FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE subsystem = 'ddl';
@@ -348,7 +325,6 @@ ddl_pending_alter_table 1
ddl_sort_file_alter_table 2
ddl_log_file_alter_table 2
SET DEBUG_SYNC = 'now SIGNAL dml3_done';
-# session con1
connection con1;
SELECT name, count FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE subsystem = 'ddl';
name count
@@ -404,20 +380,16 @@ SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL c3p5_created0 WAIT_FOR ins_
ALTER TABLE t1 MODIFY c3 CHAR(255) NOT NULL, DROP COLUMN c22f,
DROP PRIMARY KEY, ADD PRIMARY KEY(c1,c4(5)),
ADD COLUMN c5 CHAR(5) DEFAULT 'tired' FIRST;
-# session default
connection default;
SET DEBUG_SYNC = 'now WAIT_FOR c3p5_created0';
BEGIN;
INSERT INTO t1 VALUES(347,33101,'Pikku kakkosen posti','YLETV2');
INSERT INTO t1 VALUES(33101,347,NULL,'');
SET DEBUG_SYNC = 'now SIGNAL ins_done0';
-# session con1
connection con1;
ERROR 01000: Data truncated for column 'c3' at row 323
-# session default
connection default;
ROLLBACK;
-# session con1
connection con1;
ALTER TABLE t1 MODIFY c3 CHAR(255) NOT NULL;
SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL c3p5_created WAIT_FOR ins_done';
@@ -425,14 +397,12 @@ ALTER TABLE t1 DROP PRIMARY KEY, DROP COLUMN c22f,
ADD COLUMN c6 VARCHAR(1000) DEFAULT
'I love tracking down hard-to-reproduce bugs.',
ADD PRIMARY KEY c3p5(c3(5), c6(2));
-# session default
connection default;
SET DEBUG_SYNC = 'now WAIT_FOR c3p5_created';
SET DEBUG_SYNC = 'ib_after_row_insert SIGNAL ins_done WAIT_FOR ddl_timed_out';
INSERT INTO t1 VALUES(347,33101,NULL,'');
ERROR 23000: Column 'c3' cannot be null
INSERT INTO t1 VALUES(347,33101,'Pikku kakkosen posti','');
-# session con1
connection con1;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
SET DEBUG_SYNC = 'now SIGNAL ddl_timed_out';
@@ -444,7 +414,6 @@ ddl_online_create_index 0
ddl_pending_alter_table 0
ddl_sort_file_alter_table 6
ddl_log_file_alter_table 2
-# session default
connection default;
SELECT COUNT(*) FROM t1;
COUNT(*)
@@ -462,12 +431,8 @@ c22f c1 c3 c4
5 36 36foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo Online
5 41 41foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo Online
5 46 46foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo Online
-# session con1
connection con1;
ALTER TABLE t1 DISCARD TABLESPACE;
-# Disconnect session con1
-disconnect con1;
-# session default
connection default;
SHOW CREATE TABLE t1;
Table Create Table
@@ -481,6 +446,23 @@ t1 CREATE TABLE `t1` (
SET DEBUG_SYNC = 'RESET';
SET GLOBAL innodb_monitor_disable = module_ddl;
DROP TABLE t1;
+#
+# MDEV-29600 Memory leak in row_log_table_apply_update()
+#
+CREATE TABLE t1 (pk INT PRIMARY KEY, f TEXT) ENGINE=InnoDB;
+INSERT INTO t1 SET pk=1;
+connection con1;
+SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL created WAIT_FOR updated';
+ALTER TABLE t1 FORCE;
+connection default;
+SET DEBUG_SYNC = 'now WAIT_FOR created';
+UPDATE t1 SET f = REPEAT('a', 20000);
+SET DEBUG_SYNC = 'now SIGNAL updated';
+connection con1;
+disconnect con1;
+connection default;
+DROP TABLE t1;
+SET DEBUG_SYNC = 'RESET';
SET GLOBAL innodb_file_per_table = @global_innodb_file_per_table_orig;
SET GLOBAL innodb_monitor_enable = default;
SET GLOBAL innodb_monitor_disable = default;
diff --git a/mysql-test/suite/innodb/r/purge_secondary.result b/mysql-test/suite/innodb/r/purge_secondary.result
index 8f20f5baacb..66aaeb9e1a1 100644
--- a/mysql-test/suite/innodb/r/purge_secondary.result
+++ b/mysql-test/suite/innodb/r/purge_secondary.result
@@ -166,4 +166,19 @@ buffer_LRU_batch_evict_total_pages buffer
# FLUSH TABLES t1 FOR EXPORT;
# UNLOCK TABLES;
DROP TABLE t1;
+#
+# MDEV-29666 InnoDB fails to purge secondary index records
+# when indexed virtual columns exist
+#
+CREATE TABLE t1 (a INT, b INT, a1 INT AS(a) VIRTUAL,
+INDEX(a1),INDEX(b)) ENGINE=InnoDB;
+INSERT INTO t1 SET a=1, b=1;
+UPDATE t1 SET a=2, b=3;
+InnoDB 0 transactions not purged
+FLUSH TABLE t1 FOR EXPORT;
+page 4: N_RECS=0x0001
+page 5: N_RECS=0x0001
+UNLOCK TABLES;
+DROP TABLE t1;
+# End of 10.3 tests
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
diff --git a/mysql-test/suite/innodb/t/alter_missing_tablespace.test b/mysql-test/suite/innodb/t/alter_missing_tablespace.test
index c1cfc0fa092..20088ef9dd3 100644
--- a/mysql-test/suite/innodb/t/alter_missing_tablespace.test
+++ b/mysql-test/suite/innodb/t/alter_missing_tablespace.test
@@ -1,5 +1,6 @@
--source include/not_embedded.inc
--source include/innodb_page_size.inc
+--source include/no_valgrind_without_big.inc
--echo #
--echo # Bug#13955083 ALLOW IN-PLACE DDL OPERATIONS ON MISSING
diff --git a/mysql-test/suite/innodb/t/ibuf_not_empty.test b/mysql-test/suite/innodb/t/ibuf_not_empty.test
index 43f09bf6828..72b57fd48ad 100644
--- a/mysql-test/suite/innodb/t/ibuf_not_empty.test
+++ b/mysql-test/suite/innodb/t/ibuf_not_empty.test
@@ -5,6 +5,7 @@
--source include/not_embedded.inc
# The test is not big enough to use change buffering with larger page size.
--source include/have_innodb_max_16k.inc
+--source include/no_valgrind_without_big.inc
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
--disable_query_log
diff --git a/mysql-test/suite/innodb/t/innodb-64k.test b/mysql-test/suite/innodb/t/innodb-64k.test
index 62d7b929ba1..972ba6bb8b8 100644
--- a/mysql-test/suite/innodb/t/innodb-64k.test
+++ b/mysql-test/suite/innodb/t/innodb-64k.test
@@ -641,9 +641,12 @@ drop table t2;
DROP TABLE t1;
--echo #
---echo # MDEV-19526 heap number overflow
+--echo # MDEV-19526/MDEV-29742 heap number overflow
--echo #
CREATE TABLE t1(a SMALLINT NOT NULL UNIQUE AUTO_INCREMENT, KEY(a))
ENGINE=InnoDB;
INSERT INTO t1 (a) SELECT seq FROM seq_1_to_8191;
+ALTER TABLE t1 FORCE, ALGORITHM=INPLACE;
DROP TABLE t1;
+
+--echo # End of 10.3 tests
diff --git a/mysql-test/suite/innodb/t/innodb-get-fk.test b/mysql-test/suite/innodb/t/innodb-get-fk.test
index 47db92a0c6d..b4b170b89f9 100644
--- a/mysql-test/suite/innodb/t/innodb-get-fk.test
+++ b/mysql-test/suite/innodb/t/innodb-get-fk.test
@@ -2,6 +2,8 @@
--source include/default_charset.inc
# need to restart server
--source include/not_embedded.inc
+--source include/no_valgrind_without_big.inc
+
CREATE SCHEMA `repro`;
CREATE TABLE `repro`.`crew` (
diff --git a/mysql-test/suite/innodb/t/innodb-table-online.test b/mysql-test/suite/innodb/t/innodb-table-online.test
index ce014b0aa00..997b0a5bf10 100644
--- a/mysql-test/suite/innodb/t/innodb-table-online.test
+++ b/mysql-test/suite/innodb/t/innodb-table-online.test
@@ -30,9 +30,7 @@ SET DEBUG_SYNC = 'write_row_noreplace SIGNAL have_handle WAIT_FOR go_ahead';
--send
INSERT INTO t1 VALUES(1,2,3);
---echo # Establish session con1 (user=root)
connect (con1,localhost,root,,);
-connection con1;
# This should block at the end because of the INSERT in connection default
# is holding a metadata lock.
@@ -42,13 +40,11 @@ SET lock_wait_timeout = 1;
ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
SET DEBUG_SYNC = 'now SIGNAL go_ahead';
---echo # session default
connection default;
--error ER_DUP_ENTRY
reap;
eval $innodb_metrics_select;
---echo # session con1
connection con1;
SET @saved_debug_dbug = @@SESSION.debug_dbug;
SET DEBUG_DBUG = '+d,innodb_OOM_prepare_inplace_alter';
@@ -61,14 +57,12 @@ ALTER TABLE t1 ROW_FORMAT=REDUNDANT, ALGORITHM=INPLACE, LOCK=NONE;
SET SESSION DEBUG = @saved_debug_dbug;
ALTER TABLE t1 ROW_FORMAT=REDUNDANT, ALGORITHM=INPLACE, LOCK=NONE;
---echo # session default
connection default;
SHOW CREATE TABLE t1;
# Insert a duplicate entry (4) for the upcoming UNIQUE INDEX(c2).
BEGIN;
INSERT INTO t1 VALUES(7,4,2);
---echo # session con1
connection con1;
# This DEBUG_SYNC should not kick in yet, because the duplicate key will be
# detected before we get a chance to apply the online log.
@@ -78,20 +72,16 @@ SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL scanned WAIT_FOR insert_don
--error ER_LOCK_WAIT_TIMEOUT
ALTER TABLE t1 DROP PRIMARY KEY, ADD UNIQUE INDEX(c2);
---echo # session default
connection default;
COMMIT;
---echo # session con1
connection con1;
--error ER_DUP_ENTRY
ALTER TABLE t1 DROP PRIMARY KEY, ADD UNIQUE INDEX(c2);
---echo # session default
connection default;
DELETE FROM t1 WHERE c1 = 7;
---echo # session con1
connection con1;
ALTER TABLE t1 DROP PRIMARY KEY, ADD UNIQUE INDEX(c2), ROW_FORMAT=COMPACT,
LOCK = SHARED, ALGORITHM = INPLACE;
@@ -106,7 +96,6 @@ SHOW CREATE TABLE t1;
--send
ALTER TABLE t1 DROP INDEX c2, ADD PRIMARY KEY(c1);
---echo # session default
connection default;
SET DEBUG_SYNC = 'now WAIT_FOR scanned';
eval $innodb_metrics_select;
@@ -116,7 +105,6 @@ BEGIN;
INSERT INTO t1 VALUES(4,7,2);
SET DEBUG_SYNC = 'now SIGNAL insert_done';
---echo # session con1
connection con1;
# Because the modification log will be applied in order and we did
# not roll back before the log apply, there will be a duplicate key
@@ -124,11 +112,9 @@ connection con1;
--error ER_DUP_ENTRY
reap;
---echo # session default
connection default;
ROLLBACK;
---echo # session con1
connection con1;
SHOW CREATE TABLE t1;
# Now, rebuild the table without any concurrent DML, while no duplicate exists.
@@ -137,7 +123,6 @@ ALTER TABLE t1 DROP PRIMARY KEY, ADD UNIQUE INDEX(c2), ALGORITHM = INPLACE;
ALTER TABLE t1 DROP INDEX c2, ADD PRIMARY KEY(c1), ALGORITHM = INPLACE;
eval $innodb_metrics_select;
---echo # session default
connection default;
--error ER_DUP_ENTRY
INSERT INTO t1 VALUES(6,3,1);
@@ -148,7 +133,6 @@ BEGIN;
INSERT INTO t1 VALUES(7,4,2);
ROLLBACK;
---echo # session con1
connection con1;
let $ID= `SELECT @id := CONNECTION_ID()`;
--error ER_QUERY_INTERRUPTED
@@ -159,7 +143,6 @@ SET DEBUG_SYNC = 'row_log_table_apply2_before SIGNAL applied WAIT_FOR kill_done'
--send
ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
---echo # session default
connection default;
SET DEBUG_SYNC = 'now WAIT_FOR rebuilt';
eval $innodb_metrics_select;
@@ -171,13 +154,11 @@ let $ignore= `SELECT @id := $ID`;
KILL QUERY @id;
SET DEBUG_SYNC = 'now SIGNAL kill_done';
---echo # session con1
connection con1;
--error ER_QUERY_INTERRUPTED
reap;
eval $innodb_metrics_select;
---echo # session default
connection default;
CHECK TABLE t1;
INSERT INTO t1 SELECT 5 + c1, c2, c3 FROM t1;
@@ -199,7 +180,6 @@ SET @rowlog_encrypt_0=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_encrypted');
---echo # session con1
connection con1;
SHOW CREATE TABLE t1;
ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
@@ -217,7 +197,6 @@ PAGE_COMPRESSED = YES PAGE_COMPRESSION_LEVEL = 1, ALGORITHM = INPLACE;
# Generate some log (delete-mark, delete-unmark, insert etc.)
# while the index creation is blocked. Some of this may run
# in parallel with the clustered index scan.
---echo # session default
connection default;
INSERT INTO t1 SELECT 80 + c1, c2, c3 FROM t1;
INSERT INTO t1 SELECT 160 + c1, c2, c3 FROM t1;
@@ -261,7 +240,6 @@ SELECT
# Release con1.
SET DEBUG_SYNC = 'now SIGNAL dml2_done';
---echo # session con1
connection con1;
# If the following fails with the wrong error, it probably means that
# you should rerun with a larger mtr --debug-sync-timeout.
@@ -295,7 +273,6 @@ ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(c22f,c1,c4(5)),
CHANGE c2 c22f INT, CHANGE c3 c3 CHAR(255) NULL, CHANGE c1 c1 INT AFTER c22f,
ADD COLUMN c4 VARCHAR(6) DEFAULT 'Online', LOCK=NONE;
---echo # session default
connection default;
SET DEBUG_SYNC = 'now WAIT_FOR rebuilt3';
# Generate some log (delete-mark, delete-unmark, insert etc.)
@@ -312,7 +289,6 @@ eval $innodb_metrics_select;
# Release con1.
SET DEBUG_SYNC = 'now SIGNAL dml3_done';
---echo # session con1
connection con1;
reap;
eval $innodb_metrics_select;
@@ -365,7 +341,6 @@ ALTER TABLE t1 MODIFY c3 CHAR(255) NOT NULL, DROP COLUMN c22f,
DROP PRIMARY KEY, ADD PRIMARY KEY(c1,c4(5)),
ADD COLUMN c5 CHAR(5) DEFAULT 'tired' FIRST;
---echo # session default
connection default;
SET DEBUG_SYNC = 'now WAIT_FOR c3p5_created0';
@@ -374,16 +349,13 @@ INSERT INTO t1 VALUES(347,33101,'Pikku kakkosen posti','YLETV2');
INSERT INTO t1 VALUES(33101,347,NULL,'');
SET DEBUG_SYNC = 'now SIGNAL ins_done0';
---echo # session con1
connection con1;
--error WARN_DATA_TRUNCATED
reap;
---echo # session default
connection default;
ROLLBACK;
---echo # session con1
connection con1;
ALTER TABLE t1 MODIFY c3 CHAR(255) NOT NULL;
@@ -394,7 +366,6 @@ ADD COLUMN c6 VARCHAR(1000) DEFAULT
'I love tracking down hard-to-reproduce bugs.',
ADD PRIMARY KEY c3p5(c3(5), c6(2));
---echo # session default
connection default;
SET DEBUG_SYNC = 'now WAIT_FOR c3p5_created';
SET DEBUG_SYNC = 'ib_after_row_insert SIGNAL ins_done WAIT_FOR ddl_timed_out';
@@ -403,33 +374,51 @@ INSERT INTO t1 VALUES(347,33101,NULL,'');
--send
INSERT INTO t1 VALUES(347,33101,'Pikku kakkosen posti','');
---echo # session con1
connection con1;
--error ER_LOCK_WAIT_TIMEOUT
reap;
SET DEBUG_SYNC = 'now SIGNAL ddl_timed_out';
eval $innodb_metrics_select;
---echo # session default
connection default;
reap;
SELECT COUNT(*) FROM t1;
ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
SELECT * FROM t1 LIMIT 10;
---echo # session con1
connection con1;
ALTER TABLE t1 DISCARD TABLESPACE;
---echo # Disconnect session con1
-disconnect con1;
---echo # session default
connection default;
SHOW CREATE TABLE t1;
SET DEBUG_SYNC = 'RESET';
SET GLOBAL innodb_monitor_disable = module_ddl;
DROP TABLE t1;
+--echo #
+--echo # MDEV-29600 Memory leak in row_log_table_apply_update()
+--echo #
+
+CREATE TABLE t1 (pk INT PRIMARY KEY, f TEXT) ENGINE=InnoDB;
+INSERT INTO t1 SET pk=1;
+
+connection con1;
+SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL created WAIT_FOR updated';
+send ALTER TABLE t1 FORCE;
+
+connection default;
+SET DEBUG_SYNC = 'now WAIT_FOR created';
+UPDATE t1 SET f = REPEAT('a', 20000);
+SET DEBUG_SYNC = 'now SIGNAL updated';
+
+connection con1;
+reap;
+disconnect con1;
+
+connection default;
+DROP TABLE t1;
+SET DEBUG_SYNC = 'RESET';
+
# Check that all connections opened by test cases in this file are really
# gone so execution of other tests won't be affected by their presence.
--source include/wait_until_count_sessions.inc
diff --git a/mysql-test/suite/innodb/t/missing_tablespaces.test b/mysql-test/suite/innodb/t/missing_tablespaces.test
index 98efc51d7b8..8dc560e8a07 100644
--- a/mysql-test/suite/innodb/t/missing_tablespaces.test
+++ b/mysql-test/suite/innodb/t/missing_tablespaces.test
@@ -4,6 +4,7 @@
--source include/not_embedded.inc
#Windows has trouble creating files/directories with long names
--source include/not_windows.inc
+--source include/no_valgrind_without_big.inc
--echo #
--echo # Bug#19419026 WHEN A TABLESPACE IS NOT FOUND, DO NOT REPORT "TABLE NOT FOUND"
diff --git a/mysql-test/suite/innodb/t/purge_secondary.test b/mysql-test/suite/innodb/t/purge_secondary.test
index bf702b6b737..530da2c33d9 100644
--- a/mysql-test/suite/innodb/t/purge_secondary.test
+++ b/mysql-test/suite/innodb/t/purge_secondary.test
@@ -149,4 +149,36 @@ WHERE NAME="buffer_LRU_batch_evict_total_pages" AND COUNT > 0;
DROP TABLE t1;
+--echo #
+--echo # MDEV-29666 InnoDB fails to purge secondary index records
+--echo # when indexed virtual columns exist
+--echo #
+
+CREATE TABLE t1 (a INT, b INT, a1 INT AS(a) VIRTUAL,
+INDEX(a1),INDEX(b)) ENGINE=InnoDB;
+INSERT INTO t1 SET a=1, b=1;
+
+UPDATE t1 SET a=2, b=3;
+let DATADIR=`select @@datadir`;
+let PAGE_SIZE=`select @@innodb_page_size`;
+
+source include/wait_all_purged.inc;
+FLUSH TABLE t1 FOR EXPORT;
+
+perl;
+my $ps = $ENV{PAGE_SIZE};
+my $file = "$ENV{DATADIR}/test/t1.ibd";
+open(FILE, "<", $file) or die "Unable to open $file\n";
+die "Unable to read $file\n" unless
+ sysread(FILE, $_, 6*$ps) == 6*$ps;
+close(FILE);
+print "page 4: N_RECS=0x", unpack("H*", substr($_, 4 * $ps + 54, 2)), "\n";
+print "page 5: N_RECS=0x", unpack("H*", substr($_, 5 * $ps + 54, 2)), "\n";
+EOF
+
+UNLOCK TABLES;
+DROP TABLE t1;
+
+--echo # End of 10.3 tests
+
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
diff --git a/mysql-test/suite/innodb/t/table_flags.test b/mysql-test/suite/innodb/t/table_flags.test
index 13e1fc01dc0..9d417909533 100644
--- a/mysql-test/suite/innodb/t/table_flags.test
+++ b/mysql-test/suite/innodb/t/table_flags.test
@@ -2,6 +2,12 @@
# Embedded server tests do not support restarting
--source include/not_embedded.inc
--source include/maybe_debug.inc
+# Slow shutdown may take more than 120 seconds under Valgrind,
+# causing the server to be (silently) killed.
+# Due to that, crash recovery could "heal" the damage that our
+# Perl code is inflicting, and the SELECT statements could succeed
+# instead of failing with ER_NO_SUCH_TABLE_IN_ENGINE.
+--source include/not_valgrind.inc
--disable_query_log
call mtr.add_suppression("InnoDB: Table `mysql`\\.`innodb_table_stats` not found");
diff --git a/mysql-test/suite/innodb/t/xa_recovery.test b/mysql-test/suite/innodb/t/xa_recovery.test
index bb8e3316860..f0fbb1a94c3 100644
--- a/mysql-test/suite/innodb/t/xa_recovery.test
+++ b/mysql-test/suite/innodb/t/xa_recovery.test
@@ -1,6 +1,7 @@
--source include/have_innodb.inc
# Embedded server does not support restarting.
--source include/not_embedded.inc
+--source include/no_valgrind_without_big.inc
# MDEV-8841 - close tables opened by previous tests,
# so they don't get marked crashed when the server gets crashed
diff --git a/mysql-test/suite/innodb_fts/r/misc_debug.result b/mysql-test/suite/innodb_fts/r/misc_debug.result
index 9f13822ecda..be5d9b7698e 100644
--- a/mysql-test/suite/innodb_fts/r/misc_debug.result
+++ b/mysql-test/suite/innodb_fts/r/misc_debug.result
@@ -54,9 +54,8 @@ DROP TABLE t1;
# MDEV-25663 Double free of transaction during TRUNCATE
#
call mtr.add_suppression("InnoDB: \\(Too many concurrent transactions\\)");
-SET DEBUG_DBUG='-d,ib_create_table_fail_too_many_trx';
-CREATE TABLE t1 (b CHAR(12), FULLTEXT KEY(b)) engine=InnoDB;
SET @save_dbug= @@debug_dbug;
+CREATE TABLE t1 (b CHAR(12), FULLTEXT KEY(b)) engine=InnoDB;
SET debug_dbug='+d,ib_create_table_fail_too_many_trx';
TRUNCATE t1;
ERROR HY000: Got error -1 "Internal error < 0 (Not system error)" from storage engine InnoDB
diff --git a/mysql-test/suite/innodb_fts/r/misc_debug2.result b/mysql-test/suite/innodb_fts/r/misc_debug2.result
index 583d43bd9db..a36561df96e 100644
--- a/mysql-test/suite/innodb_fts/r/misc_debug2.result
+++ b/mysql-test/suite/innodb_fts/r/misc_debug2.result
@@ -10,11 +10,12 @@ DROP TABLE mdev21563;
#
CREATE TABLE t1(f1 CHAR(100), FULLTEXT idx(f1))ENGINE=InnoDB;
INSERT INTO t1 VALUES('mysql'), ('innodb');
+SET @save_dbug=@@debug_dbug;
set debug_dbug="+d,fts_instrument_sync_debug";
INSERT INTO t1 VALUES('test');
-set debug_dbug="-d,fts_instrument_sync_debug";
+set debug_dbug=@save_dbug;
INSERT INTO t1 VALUES('This is a fts issue');
set debug_dbug="+d,fts_instrument_sync_debug";
UPDATE t1 SET f1="mariadb";
-set debug_dbug="-d,fts_instrument_sync_debug";
+set debug_dbug=@save_dbug;
DROP TABLE t1;
diff --git a/mysql-test/suite/innodb_fts/t/misc_debug.test b/mysql-test/suite/innodb_fts/t/misc_debug.test
index c8542152d4d..cf3651e14a2 100644
--- a/mysql-test/suite/innodb_fts/t/misc_debug.test
+++ b/mysql-test/suite/innodb_fts/t/misc_debug.test
@@ -84,10 +84,9 @@ DROP TABLE t1;
--echo # MDEV-25663 Double free of transaction during TRUNCATE
--echo #
call mtr.add_suppression("InnoDB: \\(Too many concurrent transactions\\)");
-SET DEBUG_DBUG='-d,ib_create_table_fail_too_many_trx';
+SET @save_dbug= @@debug_dbug;
CREATE TABLE t1 (b CHAR(12), FULLTEXT KEY(b)) engine=InnoDB;
-SET @save_dbug= @@debug_dbug;
SET debug_dbug='+d,ib_create_table_fail_too_many_trx';
--error ER_GET_ERRNO
TRUNCATE t1;
diff --git a/mysql-test/suite/innodb_fts/t/misc_debug2.test b/mysql-test/suite/innodb_fts/t/misc_debug2.test
index 1ba77f2481e..815be816afd 100644
--- a/mysql-test/suite/innodb_fts/t/misc_debug2.test
+++ b/mysql-test/suite/innodb_fts/t/misc_debug2.test
@@ -16,12 +16,13 @@ DROP TABLE mdev21563;
--echo #
CREATE TABLE t1(f1 CHAR(100), FULLTEXT idx(f1))ENGINE=InnoDB;
INSERT INTO t1 VALUES('mysql'), ('innodb');
+SET @save_dbug=@@debug_dbug;
set debug_dbug="+d,fts_instrument_sync_debug";
INSERT INTO t1 VALUES('test');
-set debug_dbug="-d,fts_instrument_sync_debug";
+set debug_dbug=@save_dbug;
INSERT INTO t1 VALUES('This is a fts issue');
--source include/restart_mysqld.inc
set debug_dbug="+d,fts_instrument_sync_debug";
UPDATE t1 SET f1="mariadb";
-set debug_dbug="-d,fts_instrument_sync_debug";
+set debug_dbug=@save_dbug;
DROP TABLE t1;
diff --git a/mysql-test/suite/mariabackup/big_innodb_log.test b/mysql-test/suite/mariabackup/big_innodb_log.test
index 4a87ecb18fe..4cddb5e4a70 100644
--- a/mysql-test/suite/mariabackup/big_innodb_log.test
+++ b/mysql-test/suite/mariabackup/big_innodb_log.test
@@ -7,7 +7,7 @@
--source include/have_debug.inc
--let MYSQLD_DATADIR= `select @@datadir`
-let $MYSQLD_BOOTSTRAP_CMD= $MYSQLD_BOOTSTRAP_CMD --datadir=$MYSQLD_DATADIR --debug-dbug=+d,innodb_small_log_block_no_limit;
+let $MYSQLD_BOOTSTRAP_CMD= $MYSQLD_BOOTSTRAP_CMD --datadir=$MYSQLD_DATADIR --tmpdir=$MYSQL_TMP_DIR --debug-dbug=+d,innodb_small_log_block_no_limit;
--source include/kill_mysqld.inc
--rmdir $MYSQLD_DATADIR
diff --git a/mysql-test/suite/mariabackup/log_page_corruption.test b/mysql-test/suite/mariabackup/log_page_corruption.test
index 0151afb96b4..e14735fd024 100644
--- a/mysql-test/suite/mariabackup/log_page_corruption.test
+++ b/mysql-test/suite/mariabackup/log_page_corruption.test
@@ -1,4 +1,5 @@
--source include/have_debug.inc
+--source include/no_valgrind_without_big.inc
--echo ########
--echo # Test for generating "innodb_corrupted_pages" file during full and
diff --git a/mysql-test/suite/parts/r/partition_exch_qa_5_innodb.result b/mysql-test/suite/parts/r/partition_exch_qa_5_innodb.result
index 2e31fc57dd4..aa35364b811 100644
--- a/mysql-test/suite/parts/r/partition_exch_qa_5_innodb.result
+++ b/mysql-test/suite/parts/r/partition_exch_qa_5_innodb.result
@@ -13,7 +13,7 @@ Grants for test1@localhost
GRANT USAGE ON *.* TO `test1`@`localhost`
GRANT SELECT, INSERT, CREATE, DROP ON `test`.* TO `test1`@`localhost`
ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t_10;
-ERROR 42000: ALTER command denied to user 'test1'@'localhost' for table 'tp'
+ERROR 42000: ALTER command denied to user 'test1'@'localhost' for table `test`.`tp`
disconnect test1;
connect test2,localhost,test2,,test,$MASTER_MYPORT,$MASTER_MYSOCK;
USE test;
@@ -83,7 +83,7 @@ Grants for test2@localhost
GRANT USAGE ON *.* TO `test2`@`localhost`
GRANT SELECT, INSERT, UPDATE, CREATE, DROP ON `test`.* TO `test2`@`localhost`
ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t_10;
-ERROR 42000: ALTER command denied to user 'test2'@'localhost' for table 'tp'
+ERROR 42000: ALTER command denied to user 'test2'@'localhost' for table `test`.`tp`
SELECT * FROM tp WHERE a BETWEEN 0 AND 10;
a b
2 Two
@@ -91,11 +91,11 @@ a b
6 Six
8 Eight
ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t_10;
-ERROR 42000: ALTER command denied to user 'test2'@'localhost' for table 'tp'
+ERROR 42000: ALTER command denied to user 'test2'@'localhost' for table `test`.`tp`
ALTER TABLE tsp EXCHANGE PARTITION sp00 WITH TABLE tsp_00;
-ERROR 42000: ALTER command denied to user 'test2'@'localhost' for table 'tsp'
+ERROR 42000: ALTER command denied to user 'test2'@'localhost' for table `test`.`tsp`
ALTER TABLE tsp EXCHANGE PARTITION sp00 WITH TABLE tsp_00;
-ERROR 42000: ALTER command denied to user 'test2'@'localhost' for table 'tsp'
+ERROR 42000: ALTER command denied to user 'test2'@'localhost' for table `test`.`tsp`
connection default;
disconnect test2;
DROP TABLE IF EXISTS t_10;
diff --git a/mysql-test/suite/parts/r/partition_exch_qa_5_myisam.result b/mysql-test/suite/parts/r/partition_exch_qa_5_myisam.result
index 2e31fc57dd4..aa35364b811 100644
--- a/mysql-test/suite/parts/r/partition_exch_qa_5_myisam.result
+++ b/mysql-test/suite/parts/r/partition_exch_qa_5_myisam.result
@@ -13,7 +13,7 @@ Grants for test1@localhost
GRANT USAGE ON *.* TO `test1`@`localhost`
GRANT SELECT, INSERT, CREATE, DROP ON `test`.* TO `test1`@`localhost`
ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t_10;
-ERROR 42000: ALTER command denied to user 'test1'@'localhost' for table 'tp'
+ERROR 42000: ALTER command denied to user 'test1'@'localhost' for table `test`.`tp`
disconnect test1;
connect test2,localhost,test2,,test,$MASTER_MYPORT,$MASTER_MYSOCK;
USE test;
@@ -83,7 +83,7 @@ Grants for test2@localhost
GRANT USAGE ON *.* TO `test2`@`localhost`
GRANT SELECT, INSERT, UPDATE, CREATE, DROP ON `test`.* TO `test2`@`localhost`
ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t_10;
-ERROR 42000: ALTER command denied to user 'test2'@'localhost' for table 'tp'
+ERROR 42000: ALTER command denied to user 'test2'@'localhost' for table `test`.`tp`
SELECT * FROM tp WHERE a BETWEEN 0 AND 10;
a b
2 Two
@@ -91,11 +91,11 @@ a b
6 Six
8 Eight
ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t_10;
-ERROR 42000: ALTER command denied to user 'test2'@'localhost' for table 'tp'
+ERROR 42000: ALTER command denied to user 'test2'@'localhost' for table `test`.`tp`
ALTER TABLE tsp EXCHANGE PARTITION sp00 WITH TABLE tsp_00;
-ERROR 42000: ALTER command denied to user 'test2'@'localhost' for table 'tsp'
+ERROR 42000: ALTER command denied to user 'test2'@'localhost' for table `test`.`tsp`
ALTER TABLE tsp EXCHANGE PARTITION sp00 WITH TABLE tsp_00;
-ERROR 42000: ALTER command denied to user 'test2'@'localhost' for table 'tsp'
+ERROR 42000: ALTER command denied to user 'test2'@'localhost' for table `test`.`tsp`
connection default;
disconnect test2;
DROP TABLE IF EXISTS t_10;
diff --git a/mysql-test/suite/parts/r/partition_exch_qa_6.result b/mysql-test/suite/parts/r/partition_exch_qa_6.result
index 880886b4fac..7917765c9dd 100644
--- a/mysql-test/suite/parts/r/partition_exch_qa_6.result
+++ b/mysql-test/suite/parts/r/partition_exch_qa_6.result
@@ -117,7 +117,7 @@ Grants for test2@localhost
GRANT USAGE ON *.* TO `test2`@`localhost`
GRANT SELECT, UPDATE, CREATE, DROP, ALTER ON `test`.* TO `test2`@`localhost`
ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t_10;
-ERROR 42000: INSERT command denied to user 'test2'@'localhost' for table 'tp'
+ERROR 42000: INSERT command denied to user 'test2'@'localhost' for table `test`.`tp`
disconnect test2;
connection default;
GRANT INSERT ON test.* TO test2@localhost;
@@ -129,7 +129,7 @@ Grants for test2@localhost
GRANT USAGE ON *.* TO `test2`@`localhost`
GRANT SELECT, INSERT, UPDATE, DROP, ALTER ON `test`.* TO `test2`@`localhost`
ALTER TABLE tsp EXCHANGE PARTITION sp00 WITH TABLE tsp_00;
-ERROR 42000: CREATE command denied to user 'test2'@'localhost' for table 'tsp'
+ERROR 42000: CREATE command denied to user 'test2'@'localhost' for table `test`.`tsp`
disconnect test2;
connection default;
GRANT CREATE ON test.* TO test2@localhost;
@@ -140,7 +140,7 @@ Grants for test2@localhost
GRANT USAGE ON *.* TO `test2`@`localhost`
GRANT SELECT, INSERT, UPDATE, CREATE, ALTER ON `test`.* TO `test2`@`localhost`
ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t_10;
-ERROR 42000: DROP command denied to user 'test2'@'localhost' for table 'tp'
+ERROR 42000: DROP command denied to user 'test2'@'localhost' for table `test`.`tp`
disconnect test2;
connection default;
DROP TABLE IF EXISTS t_10;
diff --git a/mysql-test/suite/parts/r/partition_exch_qa_8_innodb.result b/mysql-test/suite/parts/r/partition_exch_qa_8_innodb.result
index 2fd45be9261..842c93ac403 100644
--- a/mysql-test/suite/parts/r/partition_exch_qa_8_innodb.result
+++ b/mysql-test/suite/parts/r/partition_exch_qa_8_innodb.result
@@ -62,9 +62,9 @@ connection default;
REVOKE INSERT ON testdb.* FROM test2@localhost;
connect test2,localhost,test2,,test,$MASTER_MYPORT,$MASTER_MYSOCK;
ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE testdb.t_10;
-ERROR 42000: INSERT command denied to user 'test2'@'localhost' for table 't_10'
+ERROR 42000: INSERT command denied to user 'test2'@'localhost' for table `testdb`.`t_10`
ALTER TABLE testdb.tp EXCHANGE PARTITION p0 WITH TABLE t_10;
-ERROR 42000: INSERT command denied to user 'test2'@'localhost' for table 'tp'
+ERROR 42000: INSERT command denied to user 'test2'@'localhost' for table `testdb`.`tp`
disconnect test2;
connection default;
DROP TABLE IF EXISTS t_10;
diff --git a/mysql-test/suite/parts/r/partition_exch_qa_8_myisam.result b/mysql-test/suite/parts/r/partition_exch_qa_8_myisam.result
index 2fd45be9261..842c93ac403 100644
--- a/mysql-test/suite/parts/r/partition_exch_qa_8_myisam.result
+++ b/mysql-test/suite/parts/r/partition_exch_qa_8_myisam.result
@@ -62,9 +62,9 @@ connection default;
REVOKE INSERT ON testdb.* FROM test2@localhost;
connect test2,localhost,test2,,test,$MASTER_MYPORT,$MASTER_MYSOCK;
ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE testdb.t_10;
-ERROR 42000: INSERT command denied to user 'test2'@'localhost' for table 't_10'
+ERROR 42000: INSERT command denied to user 'test2'@'localhost' for table `testdb`.`t_10`
ALTER TABLE testdb.tp EXCHANGE PARTITION p0 WITH TABLE t_10;
-ERROR 42000: INSERT command denied to user 'test2'@'localhost' for table 'tp'
+ERROR 42000: INSERT command denied to user 'test2'@'localhost' for table `testdb`.`tp`
disconnect test2;
connection default;
DROP TABLE IF EXISTS t_10;
diff --git a/mysql-test/suite/perfschema/r/connect_attrs.result b/mysql-test/suite/perfschema/r/connect_attrs.result
index 5e45a4cd900..d8cb33960e1 100644
--- a/mysql-test/suite/perfschema/r/connect_attrs.result
+++ b/mysql-test/suite/perfschema/r/connect_attrs.result
@@ -40,10 +40,10 @@ COUNT(DISTINCT PROCESSLIST_ID)
connection non_privileged_user;
SELECT COUNT(DISTINCT PROCESSLIST_ID)
FROM performance_schema.session_account_connect_attrs;
-ERROR 42000: SELECT command denied to user 'wl5924'@'localhost' for table 'session_account_connect_attrs'
+ERROR 42000: SELECT command denied to user 'wl5924'@'localhost' for table `performance_schema`.`session_account_connect_attrs`
SELECT COUNT(DISTINCT PROCESSLIST_ID)
FROM performance_schema.session_connect_attrs;
-ERROR 42000: SELECT command denied to user 'wl5924'@'localhost' for table 'session_connect_attrs'
+ERROR 42000: SELECT command denied to user 'wl5924'@'localhost' for table `performance_schema`.`session_connect_attrs`
connection default;
disconnect non_privileged_user;
grant select on performance_schema.* to wl5924@localhost;
diff --git a/mysql-test/suite/perfschema/r/dml_accounts.result b/mysql-test/suite/perfschema/r/dml_accounts.result
index 7e04bb3ea08..dcbce511faf 100644
--- a/mysql-test/suite/perfschema/r/dml_accounts.result
+++ b/mysql-test/suite/perfschema/r/dml_accounts.result
@@ -5,23 +5,23 @@ where user='FOO' or host='BAR';
insert into performance_schema.accounts
set user='FOO', host='BAR',
current_connections=1, total_connections=2;
-ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'accounts'
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table `performance_schema`.`accounts`
update performance_schema.accounts
set current_connections=12;
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'accounts'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`accounts`
update performance_schema.accounts
set current_connections=12 where host like "FOO";
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'accounts'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`accounts`
delete from performance_schema.accounts
where total_connections=1;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'accounts'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`accounts`
delete from performance_schema.accounts;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'accounts'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`accounts`
LOCK TABLES performance_schema.accounts READ;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'accounts'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`accounts`
UNLOCK TABLES;
LOCK TABLES performance_schema.accounts WRITE;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'accounts'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`accounts`
UNLOCK TABLES;
#
# MDEV-25325 column_comment for performance_schema tables
diff --git a/mysql-test/suite/perfschema/r/dml_cond_instances.result b/mysql-test/suite/perfschema/r/dml_cond_instances.result
index d9baa2a2c0f..2f35b1b391e 100644
--- a/mysql-test/suite/perfschema/r/dml_cond_instances.result
+++ b/mysql-test/suite/perfschema/r/dml_cond_instances.result
@@ -3,20 +3,20 @@ select * from performance_schema.cond_instances
where name='FOO';
insert into performance_schema.cond_instances
set name='FOO', object_instance_begin=12;
-ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'cond_instances'
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table `performance_schema`.`cond_instances`
update performance_schema.cond_instances
set name='FOO';
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'cond_instances'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`cond_instances`
delete from performance_schema.cond_instances
where name like "wait/%";
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'cond_instances'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`cond_instances`
delete from performance_schema.cond_instances;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'cond_instances'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`cond_instances`
LOCK TABLES performance_schema.cond_instances READ;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'cond_instances'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`cond_instances`
UNLOCK TABLES;
LOCK TABLES performance_schema.cond_instances WRITE;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'cond_instances'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`cond_instances`
UNLOCK TABLES;
#
# MDEV-25325 column_comment for performance_schema tables
diff --git a/mysql-test/suite/perfschema/r/dml_esgs_by_account_by_event_name.result b/mysql-test/suite/perfschema/r/dml_esgs_by_account_by_event_name.result
index 9081ee9dfdc..17c390fd203 100644
--- a/mysql-test/suite/perfschema/r/dml_esgs_by_account_by_event_name.result
+++ b/mysql-test/suite/perfschema/r/dml_esgs_by_account_by_event_name.result
@@ -6,23 +6,23 @@ insert into performance_schema.events_stages_summary_by_account_by_event_name
set event_name='FOO', user='BAR', host='BAZ',
count_star=1, sum_timer_wait=2, min_timer_wait=3,
avg_timer_wait=4, max_timer_wait=5;
-ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_stages_summary_by_account_by_event_name'
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table `performance_schema`.`events_stages_summary_by_account_by_event_name`
update performance_schema.events_stages_summary_by_account_by_event_name
set count_star=12;
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_stages_summary_by_account_by_event_name'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`events_stages_summary_by_account_by_event_name`
update performance_schema.events_stages_summary_by_account_by_event_name
set count_star=12 where event_name like "FOO";
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_stages_summary_by_account_by_event_name'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`events_stages_summary_by_account_by_event_name`
delete from performance_schema.events_stages_summary_by_account_by_event_name
where count_star=1;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_stages_summary_by_account_by_event_name'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`events_stages_summary_by_account_by_event_name`
delete from performance_schema.events_stages_summary_by_account_by_event_name;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_stages_summary_by_account_by_event_name'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`events_stages_summary_by_account_by_event_name`
LOCK TABLES performance_schema.events_stages_summary_by_account_by_event_name READ;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_stages_summary_by_account_by_event_name'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`events_stages_summary_by_account_by_event_name`
UNLOCK TABLES;
LOCK TABLES performance_schema.events_stages_summary_by_account_by_event_name WRITE;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_stages_summary_by_account_by_event_name'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`events_stages_summary_by_account_by_event_name`
UNLOCK TABLES;
#
# MDEV-25325 column_comment for performance_schema tables
diff --git a/mysql-test/suite/perfschema/r/dml_esgs_by_host_by_event_name.result b/mysql-test/suite/perfschema/r/dml_esgs_by_host_by_event_name.result
index a8c3584fa6e..2f3b59f138f 100644
--- a/mysql-test/suite/perfschema/r/dml_esgs_by_host_by_event_name.result
+++ b/mysql-test/suite/perfschema/r/dml_esgs_by_host_by_event_name.result
@@ -6,23 +6,23 @@ insert into performance_schema.events_stages_summary_by_host_by_event_name
set event_name='FOO', thread_id=1,
count_star=1, sum_timer_wait=2, min_timer_wait=3,
avg_timer_wait=4, max_timer_wait=5;
-ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_stages_summary_by_host_by_event_name'
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table `performance_schema`.`events_stages_summary_by_host_by_event_name`
update performance_schema.events_stages_summary_by_host_by_event_name
set count_star=12;
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_stages_summary_by_host_by_event_name'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`events_stages_summary_by_host_by_event_name`
update performance_schema.events_stages_summary_by_host_by_event_name
set count_star=12 where event_name like "FOO";
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_stages_summary_by_host_by_event_name'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`events_stages_summary_by_host_by_event_name`
delete from performance_schema.events_stages_summary_by_host_by_event_name
where count_star=1;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_stages_summary_by_host_by_event_name'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`events_stages_summary_by_host_by_event_name`
delete from performance_schema.events_stages_summary_by_host_by_event_name;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_stages_summary_by_host_by_event_name'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`events_stages_summary_by_host_by_event_name`
LOCK TABLES performance_schema.events_stages_summary_by_host_by_event_name READ;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_stages_summary_by_host_by_event_name'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`events_stages_summary_by_host_by_event_name`
UNLOCK TABLES;
LOCK TABLES performance_schema.events_stages_summary_by_host_by_event_name WRITE;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_stages_summary_by_host_by_event_name'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`events_stages_summary_by_host_by_event_name`
UNLOCK TABLES;
#
# MDEV-25325 column_comment for performance_schema tables
diff --git a/mysql-test/suite/perfschema/r/dml_esgs_by_thread_by_event_name.result b/mysql-test/suite/perfschema/r/dml_esgs_by_thread_by_event_name.result
index 4e0fe6c8f24..77dd7b2e2b8 100644
--- a/mysql-test/suite/perfschema/r/dml_esgs_by_thread_by_event_name.result
+++ b/mysql-test/suite/perfschema/r/dml_esgs_by_thread_by_event_name.result
@@ -6,23 +6,23 @@ insert into performance_schema.events_stages_summary_by_thread_by_event_name
set event_name='FOO', thread_id=1,
count_star=1, sum_timer_wait=2, min_timer_wait=3,
avg_timer_wait=4, max_timer_wait=5;
-ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_stages_summary_by_thread_by_event_name'
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table `performance_schema`.`events_stages_summary_by_thread_by_event_name`
update performance_schema.events_stages_summary_by_thread_by_event_name
set count_star=12;
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_stages_summary_by_thread_by_event_name'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`events_stages_summary_by_thread_by_event_name`
update performance_schema.events_stages_summary_by_thread_by_event_name
set count_star=12 where event_name like "FOO";
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_stages_summary_by_thread_by_event_name'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`events_stages_summary_by_thread_by_event_name`
delete from performance_schema.events_stages_summary_by_thread_by_event_name
where count_star=1;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_stages_summary_by_thread_by_event_name'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`events_stages_summary_by_thread_by_event_name`
delete from performance_schema.events_stages_summary_by_thread_by_event_name;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_stages_summary_by_thread_by_event_name'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`events_stages_summary_by_thread_by_event_name`
LOCK TABLES performance_schema.events_stages_summary_by_thread_by_event_name READ;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_stages_summary_by_thread_by_event_name'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`events_stages_summary_by_thread_by_event_name`
UNLOCK TABLES;
LOCK TABLES performance_schema.events_stages_summary_by_thread_by_event_name WRITE;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_stages_summary_by_thread_by_event_name'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`events_stages_summary_by_thread_by_event_name`
UNLOCK TABLES;
#
# MDEV-25325 column_comment for performance_schema tables
diff --git a/mysql-test/suite/perfschema/r/dml_esgs_by_user_by_event_name.result b/mysql-test/suite/perfschema/r/dml_esgs_by_user_by_event_name.result
index bf492015fe4..77855e6b662 100644
--- a/mysql-test/suite/perfschema/r/dml_esgs_by_user_by_event_name.result
+++ b/mysql-test/suite/perfschema/r/dml_esgs_by_user_by_event_name.result
@@ -6,23 +6,23 @@ insert into performance_schema.events_stages_summary_by_user_by_event_name
set event_name='FOO', user='BAR',
count_star=1, sum_timer_wait=2, min_timer_wait=3,
avg_timer_wait=4, max_timer_wait=5;
-ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_stages_summary_by_user_by_event_name'
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table `performance_schema`.`events_stages_summary_by_user_by_event_name`
update performance_schema.events_stages_summary_by_user_by_event_name
set count_star=12;
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_stages_summary_by_user_by_event_name'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`events_stages_summary_by_user_by_event_name`
update performance_schema.events_stages_summary_by_user_by_event_name
set count_star=12 where event_name like "FOO";
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_stages_summary_by_user_by_event_name'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`events_stages_summary_by_user_by_event_name`
delete from performance_schema.events_stages_summary_by_user_by_event_name
where count_star=1;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_stages_summary_by_user_by_event_name'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`events_stages_summary_by_user_by_event_name`
delete from performance_schema.events_stages_summary_by_user_by_event_name;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_stages_summary_by_user_by_event_name'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`events_stages_summary_by_user_by_event_name`
LOCK TABLES performance_schema.events_stages_summary_by_user_by_event_name READ;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_stages_summary_by_user_by_event_name'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`events_stages_summary_by_user_by_event_name`
UNLOCK TABLES;
LOCK TABLES performance_schema.events_stages_summary_by_user_by_event_name WRITE;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_stages_summary_by_user_by_event_name'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`events_stages_summary_by_user_by_event_name`
UNLOCK TABLES;
#
# MDEV-25325 column_comment for performance_schema tables
diff --git a/mysql-test/suite/perfschema/r/dml_esgs_global_by_event_name.result b/mysql-test/suite/perfschema/r/dml_esgs_global_by_event_name.result
index 4fb98fdfdcc..f238c4cbd23 100644
--- a/mysql-test/suite/perfschema/r/dml_esgs_global_by_event_name.result
+++ b/mysql-test/suite/perfschema/r/dml_esgs_global_by_event_name.result
@@ -5,23 +5,23 @@ where event_name='FOO';
insert into performance_schema.events_stages_summary_global_by_event_name
set event_name='FOO', count_star=1, sum_timer_wait=2, min_timer_wait=3,
avg_timer_wait=4, max_timer_wait=5;
-ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_stages_summary_global_by_event_name'
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table `performance_schema`.`events_stages_summary_global_by_event_name`
update performance_schema.events_stages_summary_global_by_event_name
set count_star=12;
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_stages_summary_global_by_event_name'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`events_stages_summary_global_by_event_name`
update performance_schema.events_stages_summary_global_by_event_name
set count_star=12 where event_name like "FOO";
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_stages_summary_global_by_event_name'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`events_stages_summary_global_by_event_name`
delete from performance_schema.events_stages_summary_global_by_event_name
where count_star=1;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_stages_summary_global_by_event_name'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`events_stages_summary_global_by_event_name`
delete from performance_schema.events_stages_summary_global_by_event_name;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_stages_summary_global_by_event_name'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`events_stages_summary_global_by_event_name`
LOCK TABLES performance_schema.events_stages_summary_global_by_event_name READ;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_stages_summary_global_by_event_name'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`events_stages_summary_global_by_event_name`
UNLOCK TABLES;
LOCK TABLES performance_schema.events_stages_summary_global_by_event_name WRITE;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_stages_summary_global_by_event_name'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`events_stages_summary_global_by_event_name`
UNLOCK TABLES;
#
# MDEV-25325 column_comment for performance_schema tables
diff --git a/mysql-test/suite/perfschema/r/dml_esms_by_account_by_event_name.result b/mysql-test/suite/perfschema/r/dml_esms_by_account_by_event_name.result
index fdcf5f45c37..2d34f5ee320 100644
--- a/mysql-test/suite/perfschema/r/dml_esms_by_account_by_event_name.result
+++ b/mysql-test/suite/perfschema/r/dml_esms_by_account_by_event_name.result
@@ -6,23 +6,23 @@ insert into performance_schema.events_statements_summary_by_account_by_event_nam
set event_name='FOO', user='BAR', host='BAZ',
count_star=1, sum_timer_wait=2, min_timer_wait=3,
avg_timer_wait=4, max_timer_wait=5;
-ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_statements_summary_by_account_by_event_name'
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_summary_by_account_by_event_name`
update performance_schema.events_statements_summary_by_account_by_event_name
set count_star=12;
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_statements_summary_by_account_by_event_name'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_summary_by_account_by_event_name`
update performance_schema.events_statements_summary_by_account_by_event_name
set count_star=12 where event_name like "FOO";
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_statements_summary_by_account_by_event_name'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_summary_by_account_by_event_name`
delete from performance_schema.events_statements_summary_by_account_by_event_name
where count_star=1;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_statements_summary_by_account_by_event_name'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_summary_by_account_by_event_name`
delete from performance_schema.events_statements_summary_by_account_by_event_name;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_statements_summary_by_account_by_event_name'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_summary_by_account_by_event_name`
LOCK TABLES performance_schema.events_statements_summary_by_account_by_event_name READ;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_statements_summary_by_account_by_event_name'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_summary_by_account_by_event_name`
UNLOCK TABLES;
LOCK TABLES performance_schema.events_statements_summary_by_account_by_event_name WRITE;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_statements_summary_by_account_by_event_name'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_summary_by_account_by_event_name`
UNLOCK TABLES;
#
# MDEV-25325 column_comment for performance_schema tables
diff --git a/mysql-test/suite/perfschema/r/dml_esms_by_digest.result b/mysql-test/suite/perfschema/r/dml_esms_by_digest.result
index 0d43041b502..8240093de69 100644
--- a/mysql-test/suite/perfschema/r/dml_esms_by_digest.result
+++ b/mysql-test/suite/perfschema/r/dml_esms_by_digest.result
@@ -7,23 +7,23 @@ SCHEMA_NAME DIGEST DIGEST_TEXT COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIME
insert into performance_schema.events_statements_summary_by_digest
set digest='XXYYZZ', count_star=1, sum_timer_wait=2, min_timer_wait=3,
avg_timer_wait=4, max_timer_wait=5;
-ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_statements_summary_by_digest'
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_summary_by_digest`
update performance_schema.events_statements_summary_by_digest
set count_star=12;
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_statements_summary_by_digest'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_summary_by_digest`
update performance_schema.events_statements_summary_by_digest
set count_star=12 where digest like "XXYYZZ";
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_statements_summary_by_digest'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_summary_by_digest`
delete from performance_schema.events_statements_summary_by_digest
where count_star=1;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_statements_summary_by_digest'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_summary_by_digest`
delete from performance_schema.events_statements_summary_by_digest;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_statements_summary_by_digest'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_summary_by_digest`
LOCK TABLES performance_schema.events_statements_summary_by_digest READ;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_statements_summary_by_digest'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_summary_by_digest`
UNLOCK TABLES;
LOCK TABLES performance_schema.events_statements_summary_by_digest WRITE;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_statements_summary_by_digest'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_summary_by_digest`
UNLOCK TABLES;
#
# MDEV-25325 column_comment for performance_schema tables
diff --git a/mysql-test/suite/perfschema/r/dml_esms_by_host_by_event_name.result b/mysql-test/suite/perfschema/r/dml_esms_by_host_by_event_name.result
index 3d38c94ac52..847caf205ec 100644
--- a/mysql-test/suite/perfschema/r/dml_esms_by_host_by_event_name.result
+++ b/mysql-test/suite/perfschema/r/dml_esms_by_host_by_event_name.result
@@ -6,23 +6,23 @@ insert into performance_schema.events_statements_summary_by_host_by_event_name
set event_name='FOO', thread_id=1,
count_star=1, sum_timer_wait=2, min_timer_wait=3,
avg_timer_wait=4, max_timer_wait=5;
-ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_statements_summary_by_host_by_event_name'
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_summary_by_host_by_event_name`
update performance_schema.events_statements_summary_by_host_by_event_name
set count_star=12;
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_statements_summary_by_host_by_event_name'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_summary_by_host_by_event_name`
update performance_schema.events_statements_summary_by_host_by_event_name
set count_star=12 where event_name like "FOO";
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_statements_summary_by_host_by_event_name'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_summary_by_host_by_event_name`
delete from performance_schema.events_statements_summary_by_host_by_event_name
where count_star=1;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_statements_summary_by_host_by_event_name'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_summary_by_host_by_event_name`
delete from performance_schema.events_statements_summary_by_host_by_event_name;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_statements_summary_by_host_by_event_name'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_summary_by_host_by_event_name`
LOCK TABLES performance_schema.events_statements_summary_by_host_by_event_name READ;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_statements_summary_by_host_by_event_name'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_summary_by_host_by_event_name`
UNLOCK TABLES;
LOCK TABLES performance_schema.events_statements_summary_by_host_by_event_name WRITE;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_statements_summary_by_host_by_event_name'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_summary_by_host_by_event_name`
UNLOCK TABLES;
#
# MDEV-25325 column_comment for performance_schema tables
diff --git a/mysql-test/suite/perfschema/r/dml_esms_by_thread_by_event_name.result b/mysql-test/suite/perfschema/r/dml_esms_by_thread_by_event_name.result
index ef464440ebf..d8dfb72f78f 100644
--- a/mysql-test/suite/perfschema/r/dml_esms_by_thread_by_event_name.result
+++ b/mysql-test/suite/perfschema/r/dml_esms_by_thread_by_event_name.result
@@ -6,23 +6,23 @@ insert into performance_schema.events_statements_summary_by_thread_by_event_name
set event_name='FOO', thread_id=1,
count_star=1, sum_timer_wait=2, min_timer_wait=3,
avg_timer_wait=4, max_timer_wait=5;
-ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_statements_summary_by_thread_by_event_name'
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_summary_by_thread_by_event_name`
update performance_schema.events_statements_summary_by_thread_by_event_name
set count_star=12;
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_statements_summary_by_thread_by_event_name'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_summary_by_thread_by_event_name`
update performance_schema.events_statements_summary_by_thread_by_event_name
set count_star=12 where event_name like "FOO";
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_statements_summary_by_thread_by_event_name'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_summary_by_thread_by_event_name`
delete from performance_schema.events_statements_summary_by_thread_by_event_name
where count_star=1;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_statements_summary_by_thread_by_event_name'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_summary_by_thread_by_event_name`
delete from performance_schema.events_statements_summary_by_thread_by_event_name;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_statements_summary_by_thread_by_event_name'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_summary_by_thread_by_event_name`
LOCK TABLES performance_schema.events_statements_summary_by_thread_by_event_name READ;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_statements_summary_by_thread_by_event_name'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_summary_by_thread_by_event_name`
UNLOCK TABLES;
LOCK TABLES performance_schema.events_statements_summary_by_thread_by_event_name WRITE;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_statements_summary_by_thread_by_event_name'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_summary_by_thread_by_event_name`
UNLOCK TABLES;
#
# MDEV-25325 column_comment for performance_schema tables
diff --git a/mysql-test/suite/perfschema/r/dml_esms_by_user_by_event_name.result b/mysql-test/suite/perfschema/r/dml_esms_by_user_by_event_name.result
index e92d87b45ad..12290453a04 100644
--- a/mysql-test/suite/perfschema/r/dml_esms_by_user_by_event_name.result
+++ b/mysql-test/suite/perfschema/r/dml_esms_by_user_by_event_name.result
@@ -6,23 +6,23 @@ insert into performance_schema.events_statements_summary_by_user_by_event_name
set event_name='FOO', user='BAR',
count_star=1, sum_timer_wait=2, min_timer_wait=3,
avg_timer_wait=4, max_timer_wait=5;
-ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_statements_summary_by_user_by_event_name'
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_summary_by_user_by_event_name`
update performance_schema.events_statements_summary_by_user_by_event_name
set count_star=12;
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_statements_summary_by_user_by_event_name'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_summary_by_user_by_event_name`
update performance_schema.events_statements_summary_by_user_by_event_name
set count_star=12 where event_name like "FOO";
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_statements_summary_by_user_by_event_name'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_summary_by_user_by_event_name`
delete from performance_schema.events_statements_summary_by_user_by_event_name
where count_star=1;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_statements_summary_by_user_by_event_name'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_summary_by_user_by_event_name`
delete from performance_schema.events_statements_summary_by_user_by_event_name;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_statements_summary_by_user_by_event_name'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_summary_by_user_by_event_name`
LOCK TABLES performance_schema.events_statements_summary_by_user_by_event_name READ;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_statements_summary_by_user_by_event_name'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_summary_by_user_by_event_name`
UNLOCK TABLES;
LOCK TABLES performance_schema.events_statements_summary_by_user_by_event_name WRITE;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_statements_summary_by_user_by_event_name'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_summary_by_user_by_event_name`
UNLOCK TABLES;
#
# MDEV-25325 column_comment for performance_schema tables
diff --git a/mysql-test/suite/perfschema/r/dml_esms_global_by_event_name.result b/mysql-test/suite/perfschema/r/dml_esms_global_by_event_name.result
index 14c1026fedd..a12b308b24c 100644
--- a/mysql-test/suite/perfschema/r/dml_esms_global_by_event_name.result
+++ b/mysql-test/suite/perfschema/r/dml_esms_global_by_event_name.result
@@ -5,23 +5,23 @@ where event_name='FOO';
insert into performance_schema.events_statements_summary_global_by_event_name
set event_name='FOO', count_star=1, sum_timer_wait=2, min_timer_wait=3,
avg_timer_wait=4, max_timer_wait=5;
-ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_statements_summary_global_by_event_name'
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_summary_global_by_event_name`
update performance_schema.events_statements_summary_global_by_event_name
set count_star=12;
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_statements_summary_global_by_event_name'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_summary_global_by_event_name`
update performance_schema.events_statements_summary_global_by_event_name
set count_star=12 where event_name like "FOO";
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_statements_summary_global_by_event_name'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_summary_global_by_event_name`
delete from performance_schema.events_statements_summary_global_by_event_name
where count_star=1;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_statements_summary_global_by_event_name'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_summary_global_by_event_name`
delete from performance_schema.events_statements_summary_global_by_event_name;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_statements_summary_global_by_event_name'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_summary_global_by_event_name`
LOCK TABLES performance_schema.events_statements_summary_global_by_event_name READ;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_statements_summary_global_by_event_name'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_summary_global_by_event_name`
UNLOCK TABLES;
LOCK TABLES performance_schema.events_statements_summary_global_by_event_name WRITE;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_statements_summary_global_by_event_name'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_summary_global_by_event_name`
UNLOCK TABLES;
#
# MDEV-25325 column_comment for performance_schema tables
diff --git a/mysql-test/suite/perfschema/r/dml_events_stages_current.result b/mysql-test/suite/perfschema/r/dml_events_stages_current.result
index 326f87644ea..3b77c0cb1d0 100644
--- a/mysql-test/suite/perfschema/r/dml_events_stages_current.result
+++ b/mysql-test/suite/perfschema/r/dml_events_stages_current.result
@@ -5,23 +5,23 @@ where event_name='FOO';
insert into performance_schema.events_stages_current
set thread_id='1', event_id=1,
event_name='FOO', timer_start=1, timer_end=2, timer_wait=3;
-ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_stages_current'
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table `performance_schema`.`events_stages_current`
update performance_schema.events_stages_current
set timer_start=12;
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_stages_current'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`events_stages_current`
update performance_schema.events_stages_current
set timer_start=12 where thread_id=0;
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_stages_current'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`events_stages_current`
delete from performance_schema.events_stages_current
where thread_id=1;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_stages_current'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`events_stages_current`
delete from performance_schema.events_stages_current;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_stages_current'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`events_stages_current`
LOCK TABLES performance_schema.events_stages_current READ;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_stages_current'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`events_stages_current`
UNLOCK TABLES;
LOCK TABLES performance_schema.events_stages_current WRITE;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_stages_current'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`events_stages_current`
UNLOCK TABLES;
#
# MDEV-25325 column_comment for performance_schema tables
diff --git a/mysql-test/suite/perfschema/r/dml_events_stages_history.result b/mysql-test/suite/perfschema/r/dml_events_stages_history.result
index b00963e5bd9..8b9d89871c7 100644
--- a/mysql-test/suite/perfschema/r/dml_events_stages_history.result
+++ b/mysql-test/suite/perfschema/r/dml_events_stages_history.result
@@ -9,23 +9,23 @@ where event_name like 'stage/%' order by timer_wait desc limit 1;
insert into performance_schema.events_stages_history
set thread_id='1', event_id=1,
event_name='FOO', timer_start=1, timer_end=2, timer_wait=3;
-ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_stages_history'
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table `performance_schema`.`events_stages_history`
update performance_schema.events_stages_history
set timer_start=12;
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_stages_history'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`events_stages_history`
update performance_schema.events_stages_history
set timer_start=12 where thread_id=0;
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_stages_history'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`events_stages_history`
delete from performance_schema.events_stages_history
where thread_id=1;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_stages_history'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`events_stages_history`
delete from performance_schema.events_stages_history;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_stages_history'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`events_stages_history`
LOCK TABLES performance_schema.events_stages_history READ;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_stages_history'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`events_stages_history`
UNLOCK TABLES;
LOCK TABLES performance_schema.events_stages_history WRITE;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_stages_history'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`events_stages_history`
UNLOCK TABLES;
#
# MDEV-25325 column_comment for performance_schema tables
diff --git a/mysql-test/suite/perfschema/r/dml_events_stages_history_long.result b/mysql-test/suite/perfschema/r/dml_events_stages_history_long.result
index 9c20113b2af..812f7dac2ec 100644
--- a/mysql-test/suite/perfschema/r/dml_events_stages_history_long.result
+++ b/mysql-test/suite/perfschema/r/dml_events_stages_history_long.result
@@ -9,23 +9,23 @@ where event_name like 'stage/%' order by timer_wait desc limit 1;
insert into performance_schema.events_stages_history_long
set thread_id='1', event_id=1,
event_name='FOO', timer_start=1, timer_end=2, timer_wait=3;
-ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_stages_history_long'
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table `performance_schema`.`events_stages_history_long`
update performance_schema.events_stages_history_long
set timer_start=12;
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_stages_history_long'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`events_stages_history_long`
update performance_schema.events_stages_history_long
set timer_start=12 where thread_id=0;
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_stages_history_long'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`events_stages_history_long`
delete from performance_schema.events_stages_history_long
where thread_id=1;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_stages_history_long'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`events_stages_history_long`
delete from performance_schema.events_stages_history_long;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_stages_history_long'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`events_stages_history_long`
LOCK TABLES performance_schema.events_stages_history_long READ;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_stages_history_long'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`events_stages_history_long`
UNLOCK TABLES;
LOCK TABLES performance_schema.events_stages_history_long WRITE;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_stages_history_long'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`events_stages_history_long`
UNLOCK TABLES;
#
# MDEV-25325 column_comment for performance_schema tables
diff --git a/mysql-test/suite/perfschema/r/dml_events_statements_current.result b/mysql-test/suite/perfschema/r/dml_events_statements_current.result
index 5f3b0f221c0..d130ffc4c2c 100644
--- a/mysql-test/suite/perfschema/r/dml_events_statements_current.result
+++ b/mysql-test/suite/perfschema/r/dml_events_statements_current.result
@@ -5,23 +5,23 @@ where event_name='FOO';
insert into performance_schema.events_statements_current
set thread_id='1', event_id=1,
event_name='FOO', timer_start=1, timer_end=2, timer_wait=3;
-ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_statements_current'
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_current`
update performance_schema.events_statements_current
set timer_start=12;
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_statements_current'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_current`
update performance_schema.events_statements_current
set timer_start=12 where thread_id=0;
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_statements_current'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_current`
delete from performance_schema.events_statements_current
where thread_id=1;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_statements_current'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_current`
delete from performance_schema.events_statements_current;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_statements_current'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_current`
LOCK TABLES performance_schema.events_statements_current READ;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_statements_current'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_current`
UNLOCK TABLES;
LOCK TABLES performance_schema.events_statements_current WRITE;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_statements_current'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_current`
UNLOCK TABLES;
#
# MDEV-25325 column_comment for performance_schema tables
diff --git a/mysql-test/suite/perfschema/r/dml_events_statements_history.result b/mysql-test/suite/perfschema/r/dml_events_statements_history.result
index f5f77bfdfb5..cebfa24b461 100644
--- a/mysql-test/suite/perfschema/r/dml_events_statements_history.result
+++ b/mysql-test/suite/perfschema/r/dml_events_statements_history.result
@@ -9,23 +9,23 @@ where event_name like 'statement/%' order by timer_wait desc limit 1;
insert into performance_schema.events_statements_history
set thread_id='1', event_id=1,
event_name='FOO', timer_start=1, timer_end=2, timer_wait=3;
-ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_statements_history'
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_history`
update performance_schema.events_statements_history
set timer_start=12;
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_statements_history'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_history`
update performance_schema.events_statements_history
set timer_start=12 where thread_id=0;
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_statements_history'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_history`
delete from performance_schema.events_statements_history
where thread_id=1;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_statements_history'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_history`
delete from performance_schema.events_statements_history;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_statements_history'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_history`
LOCK TABLES performance_schema.events_statements_history READ;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_statements_history'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_history`
UNLOCK TABLES;
LOCK TABLES performance_schema.events_statements_history WRITE;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_statements_history'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_history`
UNLOCK TABLES;
#
# MDEV-25325 column_comment for performance_schema tables
diff --git a/mysql-test/suite/perfschema/r/dml_events_statements_history_long.result b/mysql-test/suite/perfschema/r/dml_events_statements_history_long.result
index e8b58122b16..092b4e9030c 100644
--- a/mysql-test/suite/perfschema/r/dml_events_statements_history_long.result
+++ b/mysql-test/suite/perfschema/r/dml_events_statements_history_long.result
@@ -9,23 +9,23 @@ where event_name like 'statement/%' order by timer_wait desc limit 1;
insert into performance_schema.events_statements_history_long
set thread_id='1', event_id=1,
event_name='FOO', timer_start=1, timer_end=2, timer_wait=3;
-ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_statements_history_long'
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_history_long`
update performance_schema.events_statements_history_long
set timer_start=12;
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_statements_history_long'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_history_long`
update performance_schema.events_statements_history_long
set timer_start=12 where thread_id=0;
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_statements_history_long'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_history_long`
delete from performance_schema.events_statements_history_long
where thread_id=1;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_statements_history_long'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_history_long`
delete from performance_schema.events_statements_history_long;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_statements_history_long'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_history_long`
LOCK TABLES performance_schema.events_statements_history_long READ;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_statements_history_long'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_history_long`
UNLOCK TABLES;
LOCK TABLES performance_schema.events_statements_history_long WRITE;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_statements_history_long'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_history_long`
UNLOCK TABLES;
#
# MDEV-25325 column_comment for performance_schema tables
diff --git a/mysql-test/suite/perfschema/r/dml_events_waits_current.result b/mysql-test/suite/perfschema/r/dml_events_waits_current.result
index 0d9b343a852..cb84d5e319c 100644
--- a/mysql-test/suite/perfschema/r/dml_events_waits_current.result
+++ b/mysql-test/suite/perfschema/r/dml_events_waits_current.result
@@ -5,23 +5,23 @@ where event_name='FOO';
insert into performance_schema.events_waits_current
set thread_id='1', event_id=1,
event_name='FOO', timer_start=1, timer_end=2, timer_wait=3;
-ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_waits_current'
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_current`
update performance_schema.events_waits_current
set timer_start=12;
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_waits_current'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_current`
update performance_schema.events_waits_current
set timer_start=12 where thread_id=0;
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_waits_current'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_current`
delete from performance_schema.events_waits_current
where thread_id=1;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_waits_current'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_current`
delete from performance_schema.events_waits_current;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_waits_current'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_current`
LOCK TABLES performance_schema.events_waits_current READ;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_waits_current'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_current`
UNLOCK TABLES;
LOCK TABLES performance_schema.events_waits_current WRITE;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_waits_current'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_current`
UNLOCK TABLES;
#
# MDEV-25325 column_comment for performance_schema tables
diff --git a/mysql-test/suite/perfschema/r/dml_events_waits_history.result b/mysql-test/suite/perfschema/r/dml_events_waits_history.result
index 96d2b4b680e..bdc853ef0e2 100644
--- a/mysql-test/suite/perfschema/r/dml_events_waits_history.result
+++ b/mysql-test/suite/perfschema/r/dml_events_waits_history.result
@@ -9,23 +9,23 @@ where event_name like 'Wait/Synch/%' order by timer_wait desc limit 1;
insert into performance_schema.events_waits_history
set thread_id='1', event_id=1,
event_name='FOO', timer_start=1, timer_end=2, timer_wait=3;
-ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_waits_history'
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_history`
update performance_schema.events_waits_history
set timer_start=12;
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_waits_history'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_history`
update performance_schema.events_waits_history
set timer_start=12 where thread_id=0;
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_waits_history'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_history`
delete from performance_schema.events_waits_history
where thread_id=1;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_waits_history'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_history`
delete from performance_schema.events_waits_history;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_waits_history'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_history`
LOCK TABLES performance_schema.events_waits_history READ;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_waits_history'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_history`
UNLOCK TABLES;
LOCK TABLES performance_schema.events_waits_history WRITE;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_waits_history'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_history`
UNLOCK TABLES;
#
# MDEV-25325 column_comment for performance_schema tables
diff --git a/mysql-test/suite/perfschema/r/dml_events_waits_history_long.result b/mysql-test/suite/perfschema/r/dml_events_waits_history_long.result
index 99af65297ef..b7f4e356afd 100644
--- a/mysql-test/suite/perfschema/r/dml_events_waits_history_long.result
+++ b/mysql-test/suite/perfschema/r/dml_events_waits_history_long.result
@@ -9,23 +9,23 @@ where event_name like 'Wait/Synch/%' order by timer_wait desc limit 1;
insert into performance_schema.events_waits_history_long
set thread_id='1', event_id=1,
event_name='FOO', timer_start=1, timer_end=2, timer_wait=3;
-ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_waits_history_long'
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_history_long`
update performance_schema.events_waits_history_long
set timer_start=12;
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_waits_history_long'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_history_long`
update performance_schema.events_waits_history_long
set timer_start=12 where thread_id=0;
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_waits_history_long'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_history_long`
delete from performance_schema.events_waits_history_long
where thread_id=1;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_waits_history_long'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_history_long`
delete from performance_schema.events_waits_history_long;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_waits_history_long'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_history_long`
LOCK TABLES performance_schema.events_waits_history_long READ;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_waits_history_long'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_history_long`
UNLOCK TABLES;
LOCK TABLES performance_schema.events_waits_history_long WRITE;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_waits_history_long'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_history_long`
UNLOCK TABLES;
#
# MDEV-25325 column_comment for performance_schema tables
diff --git a/mysql-test/suite/perfschema/r/dml_ews_by_account_by_event_name.result b/mysql-test/suite/perfschema/r/dml_ews_by_account_by_event_name.result
index bfe9e29446b..c9b89209c3b 100644
--- a/mysql-test/suite/perfschema/r/dml_ews_by_account_by_event_name.result
+++ b/mysql-test/suite/perfschema/r/dml_ews_by_account_by_event_name.result
@@ -9,23 +9,23 @@ insert into performance_schema.events_waits_summary_by_account_by_event_name
set event_name='FOO', user='BAR', host='BAZ',
count_star=1, sum_timer_wait=2, min_timer_wait=3,
avg_timer_wait=4, max_timer_wait=5;
-ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_waits_summary_by_account_by_event_name'
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_summary_by_account_by_event_name`
update performance_schema.events_waits_summary_by_account_by_event_name
set count_star=12;
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_waits_summary_by_account_by_event_name'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_summary_by_account_by_event_name`
update performance_schema.events_waits_summary_by_account_by_event_name
set count_star=12 where event_name like "FOO";
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_waits_summary_by_account_by_event_name'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_summary_by_account_by_event_name`
delete from performance_schema.events_waits_summary_by_account_by_event_name
where count_star=1;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_waits_summary_by_account_by_event_name'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_summary_by_account_by_event_name`
delete from performance_schema.events_waits_summary_by_account_by_event_name;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_waits_summary_by_account_by_event_name'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_summary_by_account_by_event_name`
LOCK TABLES performance_schema.events_waits_summary_by_account_by_event_name READ;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_waits_summary_by_account_by_event_name'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_summary_by_account_by_event_name`
UNLOCK TABLES;
LOCK TABLES performance_schema.events_waits_summary_by_account_by_event_name WRITE;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_waits_summary_by_account_by_event_name'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_summary_by_account_by_event_name`
UNLOCK TABLES;
#
# MDEV-25325 column_comment for performance_schema tables
diff --git a/mysql-test/suite/perfschema/r/dml_ews_by_host_by_event_name.result b/mysql-test/suite/perfschema/r/dml_ews_by_host_by_event_name.result
index dc717e8b7c5..19ea3ae1f7e 100644
--- a/mysql-test/suite/perfschema/r/dml_ews_by_host_by_event_name.result
+++ b/mysql-test/suite/perfschema/r/dml_ews_by_host_by_event_name.result
@@ -9,23 +9,23 @@ insert into performance_schema.events_waits_summary_by_host_by_event_name
set event_name='FOO', thread_id=1,
count_star=1, sum_timer_wait=2, min_timer_wait=3,
avg_timer_wait=4, max_timer_wait=5;
-ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_waits_summary_by_host_by_event_name'
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_summary_by_host_by_event_name`
update performance_schema.events_waits_summary_by_host_by_event_name
set count_star=12;
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_waits_summary_by_host_by_event_name'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_summary_by_host_by_event_name`
update performance_schema.events_waits_summary_by_host_by_event_name
set count_star=12 where event_name like "FOO";
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_waits_summary_by_host_by_event_name'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_summary_by_host_by_event_name`
delete from performance_schema.events_waits_summary_by_host_by_event_name
where count_star=1;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_waits_summary_by_host_by_event_name'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_summary_by_host_by_event_name`
delete from performance_schema.events_waits_summary_by_host_by_event_name;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_waits_summary_by_host_by_event_name'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_summary_by_host_by_event_name`
LOCK TABLES performance_schema.events_waits_summary_by_host_by_event_name READ;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_waits_summary_by_host_by_event_name'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_summary_by_host_by_event_name`
UNLOCK TABLES;
LOCK TABLES performance_schema.events_waits_summary_by_host_by_event_name WRITE;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_waits_summary_by_host_by_event_name'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_summary_by_host_by_event_name`
UNLOCK TABLES;
#
# MDEV-25325 column_comment for performance_schema tables
diff --git a/mysql-test/suite/perfschema/r/dml_ews_by_instance.result b/mysql-test/suite/perfschema/r/dml_ews_by_instance.result
index a9686526a77..f203178eb75 100644
--- a/mysql-test/suite/perfschema/r/dml_ews_by_instance.result
+++ b/mysql-test/suite/perfschema/r/dml_ews_by_instance.result
@@ -14,23 +14,23 @@ insert into performance_schema.events_waits_summary_by_instance
set event_name='FOO', object_instance_begin=0,
count_star=1, sum_timer_wait=2, min_timer_wait=3,
avg_timer_wait=4, max_timer_wait=5;
-ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_waits_summary_by_instance'
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_summary_by_instance`
update performance_schema.events_waits_summary_by_instance
set count_star=12;
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_waits_summary_by_instance'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_summary_by_instance`
update performance_schema.events_waits_summary_by_instance
set count_star=12 where event_name like "FOO";
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_waits_summary_by_instance'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_summary_by_instance`
delete from performance_schema.events_waits_summary_by_instance
where count_star=1;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_waits_summary_by_instance'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_summary_by_instance`
delete from performance_schema.events_waits_summary_by_instance;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_waits_summary_by_instance'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_summary_by_instance`
LOCK TABLES performance_schema.events_waits_summary_by_instance READ;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_waits_summary_by_instance'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_summary_by_instance`
UNLOCK TABLES;
LOCK TABLES performance_schema.events_waits_summary_by_instance WRITE;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_waits_summary_by_instance'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_summary_by_instance`
UNLOCK TABLES;
#
# MDEV-25325 column_comment for performance_schema tables
diff --git a/mysql-test/suite/perfschema/r/dml_ews_by_thread_by_event_name.result b/mysql-test/suite/perfschema/r/dml_ews_by_thread_by_event_name.result
index e974523df7c..5848905248e 100644
--- a/mysql-test/suite/perfschema/r/dml_ews_by_thread_by_event_name.result
+++ b/mysql-test/suite/perfschema/r/dml_ews_by_thread_by_event_name.result
@@ -6,23 +6,23 @@ insert into performance_schema.events_waits_summary_by_thread_by_event_name
set event_name='FOO', thread_id=1,
count_star=1, sum_timer_wait=2, min_timer_wait=3,
avg_timer_wait=4, max_timer_wait=5;
-ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_waits_summary_by_thread_by_event_name'
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_summary_by_thread_by_event_name`
update performance_schema.events_waits_summary_by_thread_by_event_name
set count_star=12;
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_waits_summary_by_thread_by_event_name'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_summary_by_thread_by_event_name`
update performance_schema.events_waits_summary_by_thread_by_event_name
set count_star=12 where event_name like "FOO";
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_waits_summary_by_thread_by_event_name'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_summary_by_thread_by_event_name`
delete from performance_schema.events_waits_summary_by_thread_by_event_name
where count_star=1;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_waits_summary_by_thread_by_event_name'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_summary_by_thread_by_event_name`
delete from performance_schema.events_waits_summary_by_thread_by_event_name;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_waits_summary_by_thread_by_event_name'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_summary_by_thread_by_event_name`
LOCK TABLES performance_schema.events_waits_summary_by_thread_by_event_name READ;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_waits_summary_by_thread_by_event_name'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_summary_by_thread_by_event_name`
UNLOCK TABLES;
LOCK TABLES performance_schema.events_waits_summary_by_thread_by_event_name WRITE;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_waits_summary_by_thread_by_event_name'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_summary_by_thread_by_event_name`
UNLOCK TABLES;
#
# MDEV-25325 column_comment for performance_schema tables
diff --git a/mysql-test/suite/perfschema/r/dml_ews_by_user_by_event_name.result b/mysql-test/suite/perfschema/r/dml_ews_by_user_by_event_name.result
index 6cfc44961b9..e48492b39c6 100644
--- a/mysql-test/suite/perfschema/r/dml_ews_by_user_by_event_name.result
+++ b/mysql-test/suite/perfschema/r/dml_ews_by_user_by_event_name.result
@@ -9,23 +9,23 @@ insert into performance_schema.events_waits_summary_by_user_by_event_name
set event_name='FOO', user='BAR',
count_star=1, sum_timer_wait=2, min_timer_wait=3,
avg_timer_wait=4, max_timer_wait=5;
-ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_waits_summary_by_user_by_event_name'
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_summary_by_user_by_event_name`
update performance_schema.events_waits_summary_by_user_by_event_name
set count_star=12;
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_waits_summary_by_user_by_event_name'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_summary_by_user_by_event_name`
update performance_schema.events_waits_summary_by_user_by_event_name
set count_star=12 where event_name like "FOO";
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_waits_summary_by_user_by_event_name'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_summary_by_user_by_event_name`
delete from performance_schema.events_waits_summary_by_user_by_event_name
where count_star=1;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_waits_summary_by_user_by_event_name'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_summary_by_user_by_event_name`
delete from performance_schema.events_waits_summary_by_user_by_event_name;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_waits_summary_by_user_by_event_name'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_summary_by_user_by_event_name`
LOCK TABLES performance_schema.events_waits_summary_by_user_by_event_name READ;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_waits_summary_by_user_by_event_name'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_summary_by_user_by_event_name`
UNLOCK TABLES;
LOCK TABLES performance_schema.events_waits_summary_by_user_by_event_name WRITE;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_waits_summary_by_user_by_event_name'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_summary_by_user_by_event_name`
UNLOCK TABLES;
#
# MDEV-25325 column_comment for performance_schema tables
diff --git a/mysql-test/suite/perfschema/r/dml_ews_global_by_event_name.result b/mysql-test/suite/perfschema/r/dml_ews_global_by_event_name.result
index 37a5a22795c..eecb441f704 100644
--- a/mysql-test/suite/perfschema/r/dml_ews_global_by_event_name.result
+++ b/mysql-test/suite/perfschema/r/dml_ews_global_by_event_name.result
@@ -5,23 +5,23 @@ where event_name='FOO';
insert into performance_schema.events_waits_summary_global_by_event_name
set event_name='FOO', count_star=1, sum_timer_wait=2, min_timer_wait=3,
avg_timer_wait=4, max_timer_wait=5;
-ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_waits_summary_global_by_event_name'
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_summary_global_by_event_name`
update performance_schema.events_waits_summary_global_by_event_name
set count_star=12;
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_waits_summary_global_by_event_name'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_summary_global_by_event_name`
update performance_schema.events_waits_summary_global_by_event_name
set count_star=12 where event_name like "FOO";
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_waits_summary_global_by_event_name'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_summary_global_by_event_name`
delete from performance_schema.events_waits_summary_global_by_event_name
where count_star=1;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_waits_summary_global_by_event_name'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_summary_global_by_event_name`
delete from performance_schema.events_waits_summary_global_by_event_name;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_waits_summary_global_by_event_name'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_summary_global_by_event_name`
LOCK TABLES performance_schema.events_waits_summary_global_by_event_name READ;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_waits_summary_global_by_event_name'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_summary_global_by_event_name`
UNLOCK TABLES;
LOCK TABLES performance_schema.events_waits_summary_global_by_event_name WRITE;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_waits_summary_global_by_event_name'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_summary_global_by_event_name`
UNLOCK TABLES;
#
# MDEV-25325 column_comment for performance_schema tables
diff --git a/mysql-test/suite/perfschema/r/dml_file_instances.result b/mysql-test/suite/perfschema/r/dml_file_instances.result
index 3ecbc18c0ad..9252feb8bce 100644
--- a/mysql-test/suite/perfschema/r/dml_file_instances.result
+++ b/mysql-test/suite/perfschema/r/dml_file_instances.result
@@ -3,20 +3,20 @@ select * from performance_schema.file_instances
where file_name='FOO';
insert into performance_schema.file_instances
set file_name='FOO', event_name='BAR', open_count=12;
-ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'file_instances'
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table `performance_schema`.`file_instances`
update performance_schema.file_instances
set file_name='FOO';
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'file_instances'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`file_instances`
delete from performance_schema.file_instances
where event_name like "wait/%";
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'file_instances'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`file_instances`
delete from performance_schema.file_instances;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'file_instances'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`file_instances`
LOCK TABLES performance_schema.file_instances READ;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'file_instances'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`file_instances`
UNLOCK TABLES;
LOCK TABLES performance_schema.file_instances WRITE;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'file_instances'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`file_instances`
UNLOCK TABLES;
#
# MDEV-25325 column_comment for performance_schema tables
diff --git a/mysql-test/suite/perfschema/r/dml_fs_by_event_name.result b/mysql-test/suite/perfschema/r/dml_fs_by_event_name.result
index 15dededb288..4ab3e6428bd 100644
--- a/mysql-test/suite/perfschema/r/dml_fs_by_event_name.result
+++ b/mysql-test/suite/perfschema/r/dml_fs_by_event_name.result
@@ -5,23 +5,23 @@ where event_name='FOO';
insert into performance_schema.file_summary_by_event_name
set event_name='FOO', count_read=1, count_write=2,
sum_number_of_bytes_read=4, sum_number_of_bytes_write=5;
-ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'file_summary_by_event_name'
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table `performance_schema`.`file_summary_by_event_name`
update performance_schema.file_summary_by_event_name
set count_read=12;
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'file_summary_by_event_name'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`file_summary_by_event_name`
update performance_schema.file_summary_by_event_name
set count_write=12 where event_name like "FOO";
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'file_summary_by_event_name'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`file_summary_by_event_name`
delete from performance_schema.file_summary_by_event_name
where count_read=1;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'file_summary_by_event_name'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`file_summary_by_event_name`
delete from performance_schema.file_summary_by_event_name;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'file_summary_by_event_name'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`file_summary_by_event_name`
LOCK TABLES performance_schema.file_summary_by_event_name READ;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'file_summary_by_event_name'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`file_summary_by_event_name`
UNLOCK TABLES;
LOCK TABLES performance_schema.file_summary_by_event_name WRITE;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'file_summary_by_event_name'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`file_summary_by_event_name`
UNLOCK TABLES;
#
# MDEV-25325 column_comment for performance_schema tables
diff --git a/mysql-test/suite/perfschema/r/dml_fs_by_instance.result b/mysql-test/suite/perfschema/r/dml_fs_by_instance.result
index 39e871b0e50..0c0d5a6c724 100644
--- a/mysql-test/suite/perfschema/r/dml_fs_by_instance.result
+++ b/mysql-test/suite/perfschema/r/dml_fs_by_instance.result
@@ -5,23 +5,23 @@ where event_name='FOO';
insert into performance_schema.file_summary_by_instance
set event_name='FOO', count_read=1, count_write=2,
sum_number_of_bytes_read=4, sum_number_of_bytes_write=5;
-ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'file_summary_by_instance'
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table `performance_schema`.`file_summary_by_instance`
update performance_schema.file_summary_by_instance
set count_read=12;
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'file_summary_by_instance'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`file_summary_by_instance`
update performance_schema.file_summary_by_instance
set count_write=12 where event_name like "FOO";
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'file_summary_by_instance'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`file_summary_by_instance`
delete from performance_schema.file_summary_by_instance
where count_read=1;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'file_summary_by_instance'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`file_summary_by_instance`
delete from performance_schema.file_summary_by_instance;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'file_summary_by_instance'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`file_summary_by_instance`
LOCK TABLES performance_schema.file_summary_by_instance READ;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'file_summary_by_instance'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`file_summary_by_instance`
UNLOCK TABLES;
LOCK TABLES performance_schema.file_summary_by_instance WRITE;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'file_summary_by_instance'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`file_summary_by_instance`
UNLOCK TABLES;
#
# MDEV-25325 column_comment for performance_schema tables
diff --git a/mysql-test/suite/perfschema/r/dml_host_cache.result b/mysql-test/suite/perfschema/r/dml_host_cache.result
index 1165be23804..f9291e053bb 100644
--- a/mysql-test/suite/perfschema/r/dml_host_cache.result
+++ b/mysql-test/suite/perfschema/r/dml_host_cache.result
@@ -4,26 +4,26 @@ select * from performance_schema.host_cache
where IP='localhost';
insert into performance_schema.host_cache
set IP='FOO', SUM_BLOCKING_ERRORS=1, COUNT_FCRDNS_ERRORS=2;
-ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'host_cache'
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table `performance_schema`.`host_cache`
update performance_schema.host_cache
set COUNT_UNKNOWN_ERRORS=12;
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'host_cache'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`host_cache`
update performance_schema.host_cache
set SUM_BLOCKING_ERRORS=12 where IP='127.0.0.1';
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'host_cache'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`host_cache`
select HOST from performance_schema.host_cache
where IP='::1';
HOST
delete from performance_schema.host_cache
where IP='::1';
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'host_cache'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`host_cache`
delete from performance_schema.host_cache;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'host_cache'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`host_cache`
LOCK TABLES performance_schema.host_cache READ;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'host_cache'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`host_cache`
UNLOCK TABLES;
LOCK TABLES performance_schema.host_cache WRITE;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'host_cache'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`host_cache`
UNLOCK TABLES;
#
# MDEV-25325 column_comment for performance_schema tables
diff --git a/mysql-test/suite/perfschema/r/dml_hosts.result b/mysql-test/suite/perfschema/r/dml_hosts.result
index e282110bf77..af661363f2d 100644
--- a/mysql-test/suite/perfschema/r/dml_hosts.result
+++ b/mysql-test/suite/perfschema/r/dml_hosts.result
@@ -5,23 +5,23 @@ where host='FOO';
insert into performance_schema.hosts
set host='FOO',
current_connections=1, total_connections=2;
-ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'hosts'
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table `performance_schema`.`hosts`
update performance_schema.hosts
set current_connections=12;
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'hosts'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`hosts`
update performance_schema.hosts
set current_connections=12 where host like "FOO";
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'hosts'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`hosts`
delete from performance_schema.hosts
where total_connections=1;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'hosts'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`hosts`
delete from performance_schema.hosts;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'hosts'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`hosts`
LOCK TABLES performance_schema.hosts READ;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'hosts'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`hosts`
UNLOCK TABLES;
LOCK TABLES performance_schema.hosts WRITE;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'hosts'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`hosts`
UNLOCK TABLES;
#
# MDEV-25325 column_comment for performance_schema tables
diff --git a/mysql-test/suite/perfschema/r/dml_mutex_instances.result b/mysql-test/suite/perfschema/r/dml_mutex_instances.result
index 2f222118001..c2de16c87bb 100644
--- a/mysql-test/suite/perfschema/r/dml_mutex_instances.result
+++ b/mysql-test/suite/perfschema/r/dml_mutex_instances.result
@@ -3,20 +3,20 @@ select * from performance_schema.mutex_instances
where name='FOO';
insert into performance_schema.mutex_instances
set name='FOO', object_instance_begin=12;
-ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'mutex_instances'
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table `performance_schema`.`mutex_instances`
update performance_schema.mutex_instances
set name='FOO';
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'mutex_instances'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`mutex_instances`
delete from performance_schema.mutex_instances
where name like "wait/%";
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'mutex_instances'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`mutex_instances`
delete from performance_schema.mutex_instances;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'mutex_instances'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`mutex_instances`
LOCK TABLES performance_schema.mutex_instances READ;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'mutex_instances'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`mutex_instances`
UNLOCK TABLES;
LOCK TABLES performance_schema.mutex_instances WRITE;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'mutex_instances'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`mutex_instances`
UNLOCK TABLES;
#
# MDEV-25325 column_comment for performance_schema tables
diff --git a/mysql-test/suite/perfschema/r/dml_os_global_by_type.result b/mysql-test/suite/perfschema/r/dml_os_global_by_type.result
index 72ba764e7c3..eb8eeda6384 100644
--- a/mysql-test/suite/perfschema/r/dml_os_global_by_type.result
+++ b/mysql-test/suite/perfschema/r/dml_os_global_by_type.result
@@ -25,23 +25,23 @@ insert into performance_schema.objects_summary_global_by_type
set object_type='TABLE', schema_name='FOO', object_name='BAR',
count_star=1, sum_timer_wait=2, min_timer_wait=3,
avg_timer_wait=4, max_timer_wait=5;
-ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'objects_summary_global_by_type'
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table `performance_schema`.`objects_summary_global_by_type`
update performance_schema.objects_summary_global_by_type
set count_star=12;
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'objects_summary_global_by_type'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`objects_summary_global_by_type`
update performance_schema.objects_summary_global_by_type
set count_star=12 where object_name like "FOO";
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'objects_summary_global_by_type'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`objects_summary_global_by_type`
delete from performance_schema.objects_summary_global_by_type
where count_star=1;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'objects_summary_global_by_type'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`objects_summary_global_by_type`
delete from performance_schema.objects_summary_global_by_type;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'objects_summary_global_by_type'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`objects_summary_global_by_type`
LOCK TABLES performance_schema.objects_summary_global_by_type READ;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'objects_summary_global_by_type'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`objects_summary_global_by_type`
UNLOCK TABLES;
LOCK TABLES performance_schema.objects_summary_global_by_type WRITE;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'objects_summary_global_by_type'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`objects_summary_global_by_type`
UNLOCK TABLES;
#
# MDEV-25325 column_comment for performance_schema tables
diff --git a/mysql-test/suite/perfschema/r/dml_performance_timers.result b/mysql-test/suite/perfschema/r/dml_performance_timers.result
index b1d4406137c..c99784742f4 100644
--- a/mysql-test/suite/perfschema/r/dml_performance_timers.result
+++ b/mysql-test/suite/perfschema/r/dml_performance_timers.result
@@ -12,20 +12,20 @@ CYCLE <frequency> <resolution> <overhead>
insert into performance_schema.performance_timers
set timer_name='FOO', timer_frequency=1,
timer_resolution=2, timer_overhead=3;
-ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'performance_timers'
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table `performance_schema`.`performance_timers`
update performance_schema.performance_timers
set timer_frequency=12 where timer_name='CYCLE';
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'performance_timers'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`performance_timers`
delete from performance_schema.performance_timers;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'performance_timers'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`performance_timers`
delete from performance_schema.performance_timers
where timer_name='CYCLE';
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'performance_timers'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`performance_timers`
LOCK TABLES performance_schema.performance_timers READ;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'performance_timers'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`performance_timers`
UNLOCK TABLES;
LOCK TABLES performance_schema.performance_timers WRITE;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'performance_timers'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`performance_timers`
UNLOCK TABLES;
#
# MDEV-25325 column_comment for performance_schema tables
diff --git a/mysql-test/suite/perfschema/r/dml_rwlock_instances.result b/mysql-test/suite/perfschema/r/dml_rwlock_instances.result
index 4ffe125dfd7..0c1c211e5b7 100644
--- a/mysql-test/suite/perfschema/r/dml_rwlock_instances.result
+++ b/mysql-test/suite/perfschema/r/dml_rwlock_instances.result
@@ -3,20 +3,20 @@ select * from performance_schema.rwlock_instances
where name='FOO';
insert into performance_schema.rwlock_instances
set name='FOO', object_instance_begin=12;
-ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'rwlock_instances'
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table `performance_schema`.`rwlock_instances`
update performance_schema.rwlock_instances
set name='FOO';
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'rwlock_instances'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`rwlock_instances`
delete from performance_schema.rwlock_instances
where name like "wait/%";
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'rwlock_instances'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`rwlock_instances`
delete from performance_schema.rwlock_instances;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'rwlock_instances'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`rwlock_instances`
LOCK TABLES performance_schema.rwlock_instances READ;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'rwlock_instances'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`rwlock_instances`
UNLOCK TABLES;
LOCK TABLES performance_schema.rwlock_instances WRITE;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'rwlock_instances'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`rwlock_instances`
UNLOCK TABLES;
#
# MDEV-25325 column_comment for performance_schema tables
diff --git a/mysql-test/suite/perfschema/r/dml_session_account_connect_attrs.result b/mysql-test/suite/perfschema/r/dml_session_account_connect_attrs.result
index e79deb172b3..ca9ad32d9bb 100644
--- a/mysql-test/suite/perfschema/r/dml_session_account_connect_attrs.result
+++ b/mysql-test/suite/perfschema/r/dml_session_account_connect_attrs.result
@@ -5,23 +5,23 @@ where ATTR_NAME='FOO' OR ATTR_VALUE='BAR';
INSERT INTO performance_schema.session_account_connect_attrs
SET ATTR_NAME='FOO', ATTR_VALUE='BAR',
ORDINAL_POSITION=100, PROCESS_ID=102;
-ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'session_account_connect_attrs'
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table `performance_schema`.`session_account_connect_attrs`
UPDATE performance_schema.session_account_connect_attrs
SET ATTR_NAME='FOO';
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'session_account_connect_attrs'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`session_account_connect_attrs`
UPDATE performance_schema.session_account_connect_attrs
SET ATTR_NAME='FOO' WHERE ATTR_VALUE='BAR';
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'session_account_connect_attrs'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`session_account_connect_attrs`
DELETE FROM performance_schema.session_account_connect_attrs
WHERE ATTR_VALUE='BAR';
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'session_account_connect_attrs'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`session_account_connect_attrs`
DELETE FROM performance_schema.session_account_connect_attrs;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'session_account_connect_attrs'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`session_account_connect_attrs`
LOCK TABLES performance_schema.session_account_connect_attrs READ;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'session_account_connect_attrs'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`session_account_connect_attrs`
UNLOCK TABLES;
LOCK TABLES performance_schema.session_account_connect_attrs WRITE;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'session_account_connect_attrs'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`session_account_connect_attrs`
UNLOCK TABLES;
#
# MDEV-25325 column_comment for performance_schema tables
diff --git a/mysql-test/suite/perfschema/r/dml_session_connect_attrs.result b/mysql-test/suite/perfschema/r/dml_session_connect_attrs.result
index c56af4a448d..e6b76c386f4 100644
--- a/mysql-test/suite/perfschema/r/dml_session_connect_attrs.result
+++ b/mysql-test/suite/perfschema/r/dml_session_connect_attrs.result
@@ -5,23 +5,23 @@ where ATTR_NAME='FOO' OR ATTR_VALUE='BAR';
INSERT INTO performance_schema.session_connect_attrs
SET ATTR_NAME='FOO', ATTR_VALUE='BAR',
ORDINAL_POSITION=100, PROCESS_ID=102;
-ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'session_connect_attrs'
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table `performance_schema`.`session_connect_attrs`
UPDATE performance_schema.session_connect_attrs
SET ATTR_NAME='FOO';
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'session_connect_attrs'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`session_connect_attrs`
UPDATE performance_schema.session_connect_attrs
SET ATTR_NAME='FOO' WHERE ATTR_VALUE='BAR';
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'session_connect_attrs'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`session_connect_attrs`
DELETE FROM performance_schema.session_connect_attrs
WHERE ATTR_VALUE='BAR';
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'session_connect_attrs'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`session_connect_attrs`
DELETE FROM performance_schema.session_connect_attrs;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'session_connect_attrs'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`session_connect_attrs`
LOCK TABLES performance_schema.session_connect_attrs READ;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'session_connect_attrs'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`session_connect_attrs`
UNLOCK TABLES;
LOCK TABLES performance_schema.session_connect_attrs WRITE;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'session_connect_attrs'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`session_connect_attrs`
UNLOCK TABLES;
#
# MDEV-25325 column_comment for performance_schema tables
diff --git a/mysql-test/suite/perfschema/r/dml_setup_consumers.result b/mysql-test/suite/perfschema/r/dml_setup_consumers.result
index c8d4515583e..769ab42be8f 100644
--- a/mysql-test/suite/perfschema/r/dml_setup_consumers.result
+++ b/mysql-test/suite/perfschema/r/dml_setup_consumers.result
@@ -36,17 +36,17 @@ where enabled='NO';
NAME ENABLED
insert into performance_schema.setup_consumers
set name='FOO', enabled='YES';
-ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'setup_consumers'
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table `performance_schema`.`setup_consumers`
update performance_schema.setup_consumers
set name='FOO';
ERROR HY000: Invalid performance_schema usage
update performance_schema.setup_consumers
set enabled='YES';
delete from performance_schema.setup_consumers;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'setup_consumers'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`setup_consumers`
delete from performance_schema.setup_consumers
where name='events_waits_current';
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'setup_consumers'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`setup_consumers`
LOCK TABLES performance_schema.setup_consumers READ;
UNLOCK TABLES;
LOCK TABLES performance_schema.setup_consumers WRITE;
diff --git a/mysql-test/suite/perfschema/r/dml_setup_instruments.result b/mysql-test/suite/perfschema/r/dml_setup_instruments.result
index 63e3bc20adb..4418fb30fdc 100644
--- a/mysql-test/suite/perfschema/r/dml_setup_instruments.result
+++ b/mysql-test/suite/perfschema/r/dml_setup_instruments.result
@@ -54,7 +54,7 @@ select * from performance_schema.setup_instruments
where enabled='YES';
insert into performance_schema.setup_instruments
set name='FOO', enabled='YES', timed='YES';
-ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'setup_instruments'
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table `performance_schema`.`setup_instruments`
update performance_schema.setup_instruments
set name='FOO';
ERROR HY000: Invalid performance_schema usage
@@ -66,10 +66,10 @@ select * from performance_schema.setup_instruments;
update performance_schema.setup_instruments
set enabled='YES', timed='YES';
delete from performance_schema.setup_instruments;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'setup_instruments'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`setup_instruments`
delete from performance_schema.setup_instruments
where name like 'Wait/Synch/%';
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'setup_instruments'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`setup_instruments`
LOCK TABLES performance_schema.setup_instruments READ;
UNLOCK TABLES;
LOCK TABLES performance_schema.setup_instruments WRITE;
diff --git a/mysql-test/suite/perfschema/r/dml_setup_timers.result b/mysql-test/suite/perfschema/r/dml_setup_timers.result
index 9dcc7f8e1c6..db54b03d09a 100644
--- a/mysql-test/suite/perfschema/r/dml_setup_timers.result
+++ b/mysql-test/suite/perfschema/r/dml_setup_timers.result
@@ -22,7 +22,7 @@ NAME TIMER_NAME
wait CYCLE
insert into performance_schema.setup_timers
set name='FOO', timer_name='CYCLE';
-ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'setup_timers'
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table `performance_schema`.`setup_timers`
update performance_schema.setup_timers
set name='FOO';
ERROR HY000: Invalid performance_schema usage
@@ -37,10 +37,10 @@ statement MILLISECOND
update performance_schema.setup_timers
set timer_name='CYCLE';
delete from performance_schema.setup_timers;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'setup_timers'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`setup_timers`
delete from performance_schema.setup_timers
where name='Wait';
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'setup_timers'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`setup_timers`
LOCK TABLES performance_schema.setup_timers READ;
UNLOCK TABLES;
LOCK TABLES performance_schema.setup_timers WRITE;
diff --git a/mysql-test/suite/perfschema/r/dml_socket_instances.result b/mysql-test/suite/perfschema/r/dml_socket_instances.result
index d54e956e51b..571d4ad5552 100644
--- a/mysql-test/suite/perfschema/r/dml_socket_instances.result
+++ b/mysql-test/suite/perfschema/r/dml_socket_instances.result
@@ -3,20 +3,20 @@ select * from performance_schema.socket_instances
where ip='FOO';
insert into performance_schema.socket_instances
set ip='FOO', event_name='BAR', port=12;
-ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'socket_instances'
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table `performance_schema`.`socket_instances`
update performance_schema.socket_instances
set ip='FOO';
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'socket_instances'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`socket_instances`
delete from performance_schema.socket_instances
where event_name like "wait/%";
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'socket_instances'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`socket_instances`
delete from performance_schema.socket_instances;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'socket_instances'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`socket_instances`
LOCK TABLES performance_schema.socket_instances READ;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'socket_instances'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`socket_instances`
UNLOCK TABLES;
LOCK TABLES performance_schema.socket_instances WRITE;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'socket_instances'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`socket_instances`
UNLOCK TABLES;
#
# MDEV-25325 column_comment for performance_schema tables
diff --git a/mysql-test/suite/perfschema/r/dml_socket_summary_by_event_name.result b/mysql-test/suite/perfschema/r/dml_socket_summary_by_event_name.result
index 62085b067cc..8701f92dbb1 100644
--- a/mysql-test/suite/perfschema/r/dml_socket_summary_by_event_name.result
+++ b/mysql-test/suite/perfschema/r/dml_socket_summary_by_event_name.result
@@ -6,23 +6,23 @@ insert into performance_schema.socket_summary_by_event_name
set event_name='FOO',
count_star=1, sum_timer_wait=2, min_timer_wait=3,
avg_timer_wait=4, max_timer_wait=5;
-ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'socket_summary_by_event_name'
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table `performance_schema`.`socket_summary_by_event_name`
update performance_schema.socket_summary_by_event_name
set count_star=12;
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'socket_summary_by_event_name'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`socket_summary_by_event_name`
update performance_schema.socket_summary_by_event_name
set count_star=12 where event_name like "FOO";
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'socket_summary_by_event_name'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`socket_summary_by_event_name`
delete from performance_schema.socket_summary_by_event_name
where count_star=1;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'socket_summary_by_event_name'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`socket_summary_by_event_name`
delete from performance_schema.socket_summary_by_event_name;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'socket_summary_by_event_name'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`socket_summary_by_event_name`
LOCK TABLES performance_schema.socket_summary_by_event_name READ;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'socket_summary_by_event_name'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`socket_summary_by_event_name`
UNLOCK TABLES;
LOCK TABLES performance_schema.socket_summary_by_event_name WRITE;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'socket_summary_by_event_name'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`socket_summary_by_event_name`
UNLOCK TABLES;
#
# MDEV-25325 column_comment for performance_schema tables
diff --git a/mysql-test/suite/perfschema/r/dml_socket_summary_by_instance.result b/mysql-test/suite/perfschema/r/dml_socket_summary_by_instance.result
index 77baea763cb..ffbab5c7cdb 100644
--- a/mysql-test/suite/perfschema/r/dml_socket_summary_by_instance.result
+++ b/mysql-test/suite/perfschema/r/dml_socket_summary_by_instance.result
@@ -6,23 +6,23 @@ insert into performance_schema.socket_summary_by_instance
set object_instance_begin=1,
count_star=1, sum_timer_wait=2, min_timer_wait=3,
avg_timer_wait=4, max_timer_wait=5;
-ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'socket_summary_by_instance'
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table `performance_schema`.`socket_summary_by_instance`
update performance_schema.socket_summary_by_instance
set count_star=12;
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'socket_summary_by_instance'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`socket_summary_by_instance`
update performance_schema.socket_summary_by_instance
set count_star=12 where object_instance_begin like "FOO";
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'socket_summary_by_instance'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`socket_summary_by_instance`
delete from performance_schema.socket_summary_by_instance
where count_star=1;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'socket_summary_by_instance'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`socket_summary_by_instance`
delete from performance_schema.socket_summary_by_instance;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'socket_summary_by_instance'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`socket_summary_by_instance`
LOCK TABLES performance_schema.socket_summary_by_instance READ;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'socket_summary_by_instance'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`socket_summary_by_instance`
UNLOCK TABLES;
LOCK TABLES performance_schema.socket_summary_by_instance WRITE;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'socket_summary_by_instance'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`socket_summary_by_instance`
UNLOCK TABLES;
#
# MDEV-25325 column_comment for performance_schema tables
diff --git a/mysql-test/suite/perfschema/r/dml_threads.result b/mysql-test/suite/perfschema/r/dml_threads.result
index a5fcc80f944..77a4a88b1f8 100644
--- a/mysql-test/suite/perfschema/r/dml_threads.result
+++ b/mysql-test/suite/perfschema/r/dml_threads.result
@@ -4,7 +4,7 @@ select * from performance_schema.threads
where name='FOO';
insert into performance_schema.threads
set name='FOO', thread_id=1, processlist_id=2;
-ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'threads'
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table `performance_schema`.`threads`
update performance_schema.threads
set thread_id=12;
ERROR HY000: Invalid performance_schema usage
@@ -25,9 +25,9 @@ instrumented
YES
delete from performance_schema.threads
where id=1;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'threads'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`threads`
delete from performance_schema.threads;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'threads'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`threads`
LOCK TABLES performance_schema.threads READ;
UNLOCK TABLES;
LOCK TABLES performance_schema.threads WRITE;
diff --git a/mysql-test/suite/perfschema/r/dml_tiws_by_index_usage.result b/mysql-test/suite/perfschema/r/dml_tiws_by_index_usage.result
index f7bb29cae4e..81ef27d3c70 100644
--- a/mysql-test/suite/perfschema/r/dml_tiws_by_index_usage.result
+++ b/mysql-test/suite/perfschema/r/dml_tiws_by_index_usage.result
@@ -6,23 +6,23 @@ insert into performance_schema.table_io_waits_summary_by_index_usage
set object_type='TABLE', object_name='FOO', object_schema='BAR',
count_star=1, sum_timer_wait=2, min_timer_wait=3,
avg_timer_wait=4, max_timer_wait=5;
-ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'table_io_waits_summary_by_index_usage'
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table `performance_schema`.`table_io_waits_summary_by_index_usage`
update performance_schema.table_io_waits_summary_by_index_usage
set count_star=12;
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'table_io_waits_summary_by_index_usage'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`table_io_waits_summary_by_index_usage`
update performance_schema.table_io_waits_summary_by_index_usage
set count_star=12 where object_name like "FOO";
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'table_io_waits_summary_by_index_usage'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`table_io_waits_summary_by_index_usage`
delete from performance_schema.table_io_waits_summary_by_index_usage
where count_star=1;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'table_io_waits_summary_by_index_usage'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`table_io_waits_summary_by_index_usage`
delete from performance_schema.table_io_waits_summary_by_index_usage;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'table_io_waits_summary_by_index_usage'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`table_io_waits_summary_by_index_usage`
LOCK TABLES performance_schema.table_io_waits_summary_by_index_usage READ;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'table_io_waits_summary_by_index_usage'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`table_io_waits_summary_by_index_usage`
UNLOCK TABLES;
LOCK TABLES performance_schema.table_io_waits_summary_by_index_usage WRITE;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'table_io_waits_summary_by_index_usage'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`table_io_waits_summary_by_index_usage`
UNLOCK TABLES;
#
# MDEV-25325 column_comment for performance_schema tables
diff --git a/mysql-test/suite/perfschema/r/dml_tiws_by_table.result b/mysql-test/suite/perfschema/r/dml_tiws_by_table.result
index 5a83ddfa87e..46c8604c6c4 100644
--- a/mysql-test/suite/perfschema/r/dml_tiws_by_table.result
+++ b/mysql-test/suite/perfschema/r/dml_tiws_by_table.result
@@ -6,23 +6,23 @@ insert into performance_schema.table_io_waits_summary_by_table
set object_type='TABLE', object_name='FOO', object_schema='BAR',
count_star=1, sum_timer_wait=2, min_timer_wait=3,
avg_timer_wait=4, max_timer_wait=5;
-ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'table_io_waits_summary_by_table'
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table `performance_schema`.`table_io_waits_summary_by_table`
update performance_schema.table_io_waits_summary_by_table
set count_star=12;
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'table_io_waits_summary_by_table'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`table_io_waits_summary_by_table`
update performance_schema.table_io_waits_summary_by_table
set count_star=12 where object_name like "FOO";
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'table_io_waits_summary_by_table'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`table_io_waits_summary_by_table`
delete from performance_schema.table_io_waits_summary_by_table
where count_star=1;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'table_io_waits_summary_by_table'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`table_io_waits_summary_by_table`
delete from performance_schema.table_io_waits_summary_by_table;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'table_io_waits_summary_by_table'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`table_io_waits_summary_by_table`
LOCK TABLES performance_schema.table_io_waits_summary_by_table READ;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'table_io_waits_summary_by_table'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`table_io_waits_summary_by_table`
UNLOCK TABLES;
LOCK TABLES performance_schema.table_io_waits_summary_by_table WRITE;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'table_io_waits_summary_by_table'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`table_io_waits_summary_by_table`
UNLOCK TABLES;
#
# MDEV-25325 column_comment for performance_schema tables
diff --git a/mysql-test/suite/perfschema/r/dml_tlws_by_table.result b/mysql-test/suite/perfschema/r/dml_tlws_by_table.result
index 24f6c79ac61..6d130abff50 100644
--- a/mysql-test/suite/perfschema/r/dml_tlws_by_table.result
+++ b/mysql-test/suite/perfschema/r/dml_tlws_by_table.result
@@ -6,23 +6,23 @@ insert into performance_schema.table_lock_waits_summary_by_table
set object_type='TABLE', object_name='FOO', object_schema='BAR',
count_star=1, sum_timer_wait=2, min_timer_wait=3,
avg_timer_wait=4, max_timer_wait=5;
-ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'table_lock_waits_summary_by_table'
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table `performance_schema`.`table_lock_waits_summary_by_table`
update performance_schema.table_lock_waits_summary_by_table
set count_star=12;
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'table_lock_waits_summary_by_table'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`table_lock_waits_summary_by_table`
update performance_schema.table_lock_waits_summary_by_table
set count_star=12 where object_name like "FOO";
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'table_lock_waits_summary_by_table'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`table_lock_waits_summary_by_table`
delete from performance_schema.table_lock_waits_summary_by_table
where count_star=1;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'table_lock_waits_summary_by_table'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`table_lock_waits_summary_by_table`
delete from performance_schema.table_lock_waits_summary_by_table;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'table_lock_waits_summary_by_table'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`table_lock_waits_summary_by_table`
LOCK TABLES performance_schema.table_lock_waits_summary_by_table READ;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'table_lock_waits_summary_by_table'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`table_lock_waits_summary_by_table`
UNLOCK TABLES;
LOCK TABLES performance_schema.table_lock_waits_summary_by_table WRITE;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'table_lock_waits_summary_by_table'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`table_lock_waits_summary_by_table`
UNLOCK TABLES;
#
# MDEV-25325 column_comment for performance_schema tables
diff --git a/mysql-test/suite/perfschema/r/dml_users.result b/mysql-test/suite/perfschema/r/dml_users.result
index b38cf034bc0..53b220c79a5 100644
--- a/mysql-test/suite/perfschema/r/dml_users.result
+++ b/mysql-test/suite/perfschema/r/dml_users.result
@@ -5,23 +5,23 @@ where user='FOO';
insert into performance_schema.users
set user='FOO',
current_connections=1, total_connections=2;
-ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'users'
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table `performance_schema`.`users`
update performance_schema.users
set current_connections=12;
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'users'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`users`
update performance_schema.users
set current_connections=12 where user like "FOO";
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'users'
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`users`
delete from performance_schema.users
where total_connections=1;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'users'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`users`
delete from performance_schema.users;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'users'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`users`
LOCK TABLES performance_schema.users READ;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'users'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`users`
UNLOCK TABLES;
LOCK TABLES performance_schema.users WRITE;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'users'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`users`
UNLOCK TABLES;
#
# MDEV-25325 column_comment for performance_schema tables
diff --git a/mysql-test/suite/perfschema/r/misc.result b/mysql-test/suite/perfschema/r/misc.result
index 2e4d21d625a..fb1710446e0 100644
--- a/mysql-test/suite/perfschema/r/misc.result
+++ b/mysql-test/suite/perfschema/r/misc.result
@@ -52,7 +52,7 @@ SELECT object_schema, object_name FROM performance_schema.objects_summary_global
WHERE object_schema='test';
object_schema object_name
create table performance_schema.t1(a int);
-ERROR 42000: CREATE command denied to user 'root'@'localhost' for table 't1'
+ERROR 42000: CREATE command denied to user 'root'@'localhost' for table `performance_schema`.`t1`
SELECT object_schema, object_name FROM performance_schema.objects_summary_global_by_type
WHERE object_schema='test';
object_schema object_name
diff --git a/mysql-test/suite/perfschema/r/privilege.result b/mysql-test/suite/perfschema/r/privilege.result
index 0a038000536..57986b269d4 100644
--- a/mysql-test/suite/perfschema/r/privilege.result
+++ b/mysql-test/suite/perfschema/r/privilege.result
@@ -56,9 +56,9 @@ ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_
grant TRIGGER on performance_schema.setup_instruments to 'pfs_user_3'@localhost;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
grant INSERT on performance_schema.setup_instruments to 'pfs_user_3'@localhost;
-ERROR 42000: INSERT, GRANT command denied to user 'root'@'localhost' for table 'setup_instruments'
+ERROR 42000: INSERT, GRANT command denied to user 'root'@'localhost' for table `performance_schema`.`setup_instruments`
grant DELETE on performance_schema.setup_instruments to 'pfs_user_3'@localhost;
-ERROR 42000: DELETE, GRANT command denied to user 'root'@'localhost' for table 'setup_instruments'
+ERROR 42000: DELETE, GRANT command denied to user 'root'@'localhost' for table `performance_schema`.`setup_instruments`
grant SELECT on performance_schema.setup_instruments to 'pfs_user_3'@localhost
with GRANT OPTION;
grant UPDATE on performance_schema.setup_instruments to 'pfs_user_3'@localhost
@@ -81,11 +81,11 @@ ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_
grant TRIGGER on performance_schema.events_waits_current to 'pfs_user_3'@localhost;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
grant INSERT on performance_schema.events_waits_current to 'pfs_user_3'@localhost;
-ERROR 42000: INSERT, GRANT command denied to user 'root'@'localhost' for table 'events_waits_current'
+ERROR 42000: INSERT, GRANT command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_current`
grant UPDATE on performance_schema.events_waits_current to 'pfs_user_3'@localhost;
-ERROR 42000: UPDATE, GRANT command denied to user 'root'@'localhost' for table 'events_waits_current'
+ERROR 42000: UPDATE, GRANT command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_current`
grant DELETE on performance_schema.events_waits_current to 'pfs_user_3'@localhost;
-ERROR 42000: DELETE, GRANT command denied to user 'root'@'localhost' for table 'events_waits_current'
+ERROR 42000: DELETE, GRANT command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_current`
grant SELECT on performance_schema.events_waits_current to 'pfs_user_3'@localhost
with GRANT OPTION;
grant ALL on performance_schema.file_instances to 'pfs_user_3'@localhost
@@ -106,11 +106,11 @@ ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_
grant TRIGGER on performance_schema.file_instances to 'pfs_user_3'@localhost;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
grant INSERT on performance_schema.file_instances to 'pfs_user_3'@localhost;
-ERROR 42000: INSERT, GRANT command denied to user 'root'@'localhost' for table 'file_instances'
+ERROR 42000: INSERT, GRANT command denied to user 'root'@'localhost' for table `performance_schema`.`file_instances`
grant UPDATE on performance_schema.file_instances to 'pfs_user_3'@localhost;
-ERROR 42000: UPDATE, GRANT command denied to user 'root'@'localhost' for table 'file_instances'
+ERROR 42000: UPDATE, GRANT command denied to user 'root'@'localhost' for table `performance_schema`.`file_instances`
grant DELETE on performance_schema.file_instances to 'pfs_user_3'@localhost;
-ERROR 42000: DELETE, GRANT command denied to user 'root'@'localhost' for table 'file_instances'
+ERROR 42000: DELETE, GRANT command denied to user 'root'@'localhost' for table `performance_schema`.`file_instances`
grant SELECT on performance_schema.file_instances to 'pfs_user_3'@localhost
with GRANT OPTION;
grant LOCK TABLES on performance_schema.* to 'pfs_user_3'@localhost
@@ -164,34 +164,34 @@ create table test.t1 like performance_schema.file_instances;
ERROR HY000: Can't create table `test`.`t1` (errno: 131 "Command not supported by the engine")
insert into performance_schema.setup_instruments
set name="foo";
-ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'setup_instruments'
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table `performance_schema`.`setup_instruments`
insert into performance_schema.events_waits_current
set name="foo";
-ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_waits_current'
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_current`
insert into performance_schema.file_instances
set name="foo";
-ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'file_instances'
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table `performance_schema`.`file_instances`
delete from performance_schema.setup_instruments;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'setup_instruments'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`setup_instruments`
delete from performance_schema.events_waits_current;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_waits_current'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_current`
delete from performance_schema.file_instances;
-ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'file_instances'
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`file_instances`
lock table performance_schema.setup_instruments read;
unlock tables;
lock table performance_schema.setup_instruments write;
unlock tables;
lock table performance_schema.events_waits_current read;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_waits_current'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_current`
unlock tables;
lock table performance_schema.events_waits_current write;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_waits_current'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`events_waits_current`
unlock tables;
lock table performance_schema.file_instances read;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'file_instances'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`file_instances`
unlock tables;
lock table performance_schema.file_instances write;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'file_instances'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`file_instances`
unlock tables;
#
# WL#4818, NFS2: Can use grants to give normal user access
@@ -263,34 +263,34 @@ create table test.t1 like performance_schema.file_instances;
ERROR HY000: Can't create table `test`.`t1` (errno: 131 "Command not supported by the engine")
insert into performance_schema.setup_instruments
set name="foo";
-ERROR 42000: INSERT command denied to user 'pfs_user_1'@'localhost' for table 'setup_instruments'
+ERROR 42000: INSERT command denied to user 'pfs_user_1'@'localhost' for table `performance_schema`.`setup_instruments`
insert into performance_schema.events_waits_current
set name="foo";
-ERROR 42000: INSERT command denied to user 'pfs_user_1'@'localhost' for table 'events_waits_current'
+ERROR 42000: INSERT command denied to user 'pfs_user_1'@'localhost' for table `performance_schema`.`events_waits_current`
insert into performance_schema.file_instances
set name="foo";
-ERROR 42000: INSERT command denied to user 'pfs_user_1'@'localhost' for table 'file_instances'
+ERROR 42000: INSERT command denied to user 'pfs_user_1'@'localhost' for table `performance_schema`.`file_instances`
delete from performance_schema.setup_instruments;
-ERROR 42000: DELETE command denied to user 'pfs_user_1'@'localhost' for table 'setup_instruments'
+ERROR 42000: DELETE command denied to user 'pfs_user_1'@'localhost' for table `performance_schema`.`setup_instruments`
delete from performance_schema.events_waits_current;
-ERROR 42000: DELETE command denied to user 'pfs_user_1'@'localhost' for table 'events_waits_current'
+ERROR 42000: DELETE command denied to user 'pfs_user_1'@'localhost' for table `performance_schema`.`events_waits_current`
delete from performance_schema.file_instances;
-ERROR 42000: DELETE command denied to user 'pfs_user_1'@'localhost' for table 'file_instances'
+ERROR 42000: DELETE command denied to user 'pfs_user_1'@'localhost' for table `performance_schema`.`file_instances`
lock table performance_schema.setup_instruments read;
unlock tables;
lock table performance_schema.setup_instruments write;
unlock tables;
lock table performance_schema.events_waits_current read;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'pfs_user_1'@'localhost' for table 'events_waits_current'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'pfs_user_1'@'localhost' for table `performance_schema`.`events_waits_current`
unlock tables;
lock table performance_schema.events_waits_current write;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'pfs_user_1'@'localhost' for table 'events_waits_current'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'pfs_user_1'@'localhost' for table `performance_schema`.`events_waits_current`
unlock tables;
lock table performance_schema.file_instances read;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'pfs_user_1'@'localhost' for table 'file_instances'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'pfs_user_1'@'localhost' for table `performance_schema`.`file_instances`
unlock tables;
lock table performance_schema.file_instances write;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'pfs_user_1'@'localhost' for table 'file_instances'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'pfs_user_1'@'localhost' for table `performance_schema`.`file_instances`
unlock tables;
#
# WL#4818, NFS2: Can use grants to give normal user access
@@ -363,34 +363,34 @@ create table test.t1 like performance_schema.file_instances;
ERROR HY000: Can't create table `test`.`t1` (errno: 131 "Command not supported by the engine")
insert into performance_schema.setup_instruments
set name="foo";
-ERROR 42000: INSERT command denied to user 'pfs_user_2'@'localhost' for table 'setup_instruments'
+ERROR 42000: INSERT command denied to user 'pfs_user_2'@'localhost' for table `performance_schema`.`setup_instruments`
insert into performance_schema.events_waits_current
set name="foo";
-ERROR 42000: INSERT command denied to user 'pfs_user_2'@'localhost' for table 'events_waits_current'
+ERROR 42000: INSERT command denied to user 'pfs_user_2'@'localhost' for table `performance_schema`.`events_waits_current`
insert into performance_schema.file_instances
set name="foo";
-ERROR 42000: INSERT command denied to user 'pfs_user_2'@'localhost' for table 'file_instances'
+ERROR 42000: INSERT command denied to user 'pfs_user_2'@'localhost' for table `performance_schema`.`file_instances`
delete from performance_schema.setup_instruments;
-ERROR 42000: DELETE command denied to user 'pfs_user_2'@'localhost' for table 'setup_instruments'
+ERROR 42000: DELETE command denied to user 'pfs_user_2'@'localhost' for table `performance_schema`.`setup_instruments`
delete from performance_schema.events_waits_current;
-ERROR 42000: DELETE command denied to user 'pfs_user_2'@'localhost' for table 'events_waits_current'
+ERROR 42000: DELETE command denied to user 'pfs_user_2'@'localhost' for table `performance_schema`.`events_waits_current`
delete from performance_schema.file_instances;
-ERROR 42000: DELETE command denied to user 'pfs_user_2'@'localhost' for table 'file_instances'
+ERROR 42000: DELETE command denied to user 'pfs_user_2'@'localhost' for table `performance_schema`.`file_instances`
lock table performance_schema.setup_instruments read;
unlock tables;
lock table performance_schema.setup_instruments write;
unlock tables;
lock table performance_schema.events_waits_current read;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'pfs_user_2'@'localhost' for table 'events_waits_current'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'pfs_user_2'@'localhost' for table `performance_schema`.`events_waits_current`
unlock tables;
lock table performance_schema.events_waits_current write;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'pfs_user_2'@'localhost' for table 'events_waits_current'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'pfs_user_2'@'localhost' for table `performance_schema`.`events_waits_current`
unlock tables;
lock table performance_schema.file_instances read;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'pfs_user_2'@'localhost' for table 'file_instances'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'pfs_user_2'@'localhost' for table `performance_schema`.`file_instances`
unlock tables;
lock table performance_schema.file_instances write;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'pfs_user_2'@'localhost' for table 'file_instances'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'pfs_user_2'@'localhost' for table `performance_schema`.`file_instances`
unlock tables;
#
# WL#4818, NFS2: Can use grants to give normal user access
@@ -463,34 +463,34 @@ create table test.t1 like performance_schema.file_instances;
ERROR HY000: Can't create table `test`.`t1` (errno: 131 "Command not supported by the engine")
insert into performance_schema.setup_instruments
set name="foo";
-ERROR 42000: INSERT command denied to user 'pfs_user_3'@'localhost' for table 'setup_instruments'
+ERROR 42000: INSERT command denied to user 'pfs_user_3'@'localhost' for table `performance_schema`.`setup_instruments`
insert into performance_schema.events_waits_current
set name="foo";
-ERROR 42000: INSERT command denied to user 'pfs_user_3'@'localhost' for table 'events_waits_current'
+ERROR 42000: INSERT command denied to user 'pfs_user_3'@'localhost' for table `performance_schema`.`events_waits_current`
insert into performance_schema.file_instances
set name="foo";
-ERROR 42000: INSERT command denied to user 'pfs_user_3'@'localhost' for table 'file_instances'
+ERROR 42000: INSERT command denied to user 'pfs_user_3'@'localhost' for table `performance_schema`.`file_instances`
delete from performance_schema.setup_instruments;
-ERROR 42000: DELETE command denied to user 'pfs_user_3'@'localhost' for table 'setup_instruments'
+ERROR 42000: DELETE command denied to user 'pfs_user_3'@'localhost' for table `performance_schema`.`setup_instruments`
delete from performance_schema.events_waits_current;
-ERROR 42000: DELETE command denied to user 'pfs_user_3'@'localhost' for table 'events_waits_current'
+ERROR 42000: DELETE command denied to user 'pfs_user_3'@'localhost' for table `performance_schema`.`events_waits_current`
delete from performance_schema.file_instances;
-ERROR 42000: DELETE command denied to user 'pfs_user_3'@'localhost' for table 'file_instances'
+ERROR 42000: DELETE command denied to user 'pfs_user_3'@'localhost' for table `performance_schema`.`file_instances`
lock table performance_schema.setup_instruments read;
unlock tables;
lock table performance_schema.setup_instruments write;
unlock tables;
lock table performance_schema.events_waits_current read;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'pfs_user_3'@'localhost' for table 'events_waits_current'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'pfs_user_3'@'localhost' for table `performance_schema`.`events_waits_current`
unlock tables;
lock table performance_schema.events_waits_current write;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'pfs_user_3'@'localhost' for table 'events_waits_current'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'pfs_user_3'@'localhost' for table `performance_schema`.`events_waits_current`
unlock tables;
lock table performance_schema.file_instances read;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'pfs_user_3'@'localhost' for table 'file_instances'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'pfs_user_3'@'localhost' for table `performance_schema`.`file_instances`
unlock tables;
lock table performance_schema.file_instances write;
-ERROR 42000: SELECT, LOCK TABLES command denied to user 'pfs_user_3'@'localhost' for table 'file_instances'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'pfs_user_3'@'localhost' for table `performance_schema`.`file_instances`
unlock tables;
#
# WL#4818, NFS2: Can use grants to give normal user access
@@ -499,16 +499,16 @@ unlock tables;
# Should work as pfs_user_1 and pfs_user_2, but not as pfs_user_3.
# (Except for events_waits_current, which is granted.)
SELECT "can select" FROM performance_schema.events_waits_history LIMIT 1;
-ERROR 42000: SELECT command denied to user 'pfs_user_3'@'localhost' for table 'events_waits_history'
+ERROR 42000: SELECT command denied to user 'pfs_user_3'@'localhost' for table `performance_schema`.`events_waits_history`
SELECT "can select" FROM performance_schema.events_waits_history_long LIMIT 1;
-ERROR 42000: SELECT command denied to user 'pfs_user_3'@'localhost' for table 'events_waits_history_long'
+ERROR 42000: SELECT command denied to user 'pfs_user_3'@'localhost' for table `performance_schema`.`events_waits_history_long`
SELECT "can select" FROM performance_schema.events_waits_current LIMIT 1;
can select
can select
SELECT "can select" FROM performance_schema.events_waits_summary_by_instance LIMIT 1;
-ERROR 42000: SELECT command denied to user 'pfs_user_3'@'localhost' for table 'events_waits_summary_by_instance'
+ERROR 42000: SELECT command denied to user 'pfs_user_3'@'localhost' for table `performance_schema`.`events_waits_summary_by_instance`
SELECT "can select" FROM performance_schema.file_summary_by_instance LIMIT 1;
-ERROR 42000: SELECT command denied to user 'pfs_user_3'@'localhost' for table 'file_summary_by_instance'
+ERROR 42000: SELECT command denied to user 'pfs_user_3'@'localhost' for table `performance_schema`.`file_summary_by_instance`
disconnect con3;
connection default;
revoke all privileges, grant option from 'pfs_user_1'@localhost;
@@ -529,15 +529,15 @@ connect pfs_user_4, localhost, pfs_user_4, , ;
connection pfs_user_4;
# Select as pfs_user_4 should fail without grant
SELECT event_id FROM performance_schema.events_waits_history;
-ERROR 42000: SELECT command denied to user 'pfs_user_4'@'localhost' for table 'events_waits_history'
+ERROR 42000: SELECT command denied to user 'pfs_user_4'@'localhost' for table `performance_schema`.`events_waits_history`
SELECT event_id FROM performance_schema.events_waits_history_long;
-ERROR 42000: SELECT command denied to user 'pfs_user_4'@'localhost' for table 'events_waits_history_long'
+ERROR 42000: SELECT command denied to user 'pfs_user_4'@'localhost' for table `performance_schema`.`events_waits_history_long`
SELECT event_id FROM performance_schema.events_waits_current;
-ERROR 42000: SELECT command denied to user 'pfs_user_4'@'localhost' for table 'events_waits_current'
+ERROR 42000: SELECT command denied to user 'pfs_user_4'@'localhost' for table `performance_schema`.`events_waits_current`
SELECT event_name FROM performance_schema.events_waits_summary_by_instance;
-ERROR 42000: SELECT command denied to user 'pfs_user_4'@'localhost' for table 'events_waits_summary_by_instance'
+ERROR 42000: SELECT command denied to user 'pfs_user_4'@'localhost' for table `performance_schema`.`events_waits_summary_by_instance`
SELECT event_name FROM performance_schema.file_summary_by_instance;
-ERROR 42000: SELECT command denied to user 'pfs_user_4'@'localhost' for table 'file_summary_by_instance'
+ERROR 42000: SELECT command denied to user 'pfs_user_4'@'localhost' for table `performance_schema`.`file_summary_by_instance`
#
# WL#4818, NFS3: Normal user does not have access to change what is
# instrumented without grants
@@ -546,21 +546,21 @@ connection pfs_user_4;
# User pfs_user_4 should not be allowed to tweak instrumentation without
# explicit grant
UPDATE performance_schema.setup_instruments SET enabled = 'NO', timed = 'YES';
-ERROR 42000: UPDATE command denied to user 'pfs_user_4'@'localhost' for table 'setup_instruments'
+ERROR 42000: UPDATE command denied to user 'pfs_user_4'@'localhost' for table `performance_schema`.`setup_instruments`
UPDATE performance_schema.setup_instruments SET enabled = 'YES'
WHERE name LIKE 'wait/synch/mutex/%'
OR name LIKE 'wait/synch/rwlock/%';
-ERROR 42000: UPDATE command denied to user 'pfs_user_4'@'localhost' for table 'setup_instruments'
+ERROR 42000: UPDATE command denied to user 'pfs_user_4'@'localhost' for table `performance_schema`.`setup_instruments`
UPDATE performance_schema.setup_consumers SET enabled = 'YES';
-ERROR 42000: UPDATE command denied to user 'pfs_user_4'@'localhost' for table 'setup_consumers'
+ERROR 42000: UPDATE command denied to user 'pfs_user_4'@'localhost' for table `performance_schema`.`setup_consumers`
UPDATE performance_schema.setup_timers SET timer_name = 'TICK';
-ERROR 42000: UPDATE command denied to user 'pfs_user_4'@'localhost' for table 'setup_timers'
+ERROR 42000: UPDATE command denied to user 'pfs_user_4'@'localhost' for table `performance_schema`.`setup_timers`
TRUNCATE TABLE performance_schema.events_waits_history_long;
-ERROR 42000: DROP command denied to user 'pfs_user_4'@'localhost' for table 'events_waits_history_long'
+ERROR 42000: DROP command denied to user 'pfs_user_4'@'localhost' for table `performance_schema`.`events_waits_history_long`
TRUNCATE TABLE performance_schema.events_waits_history;
-ERROR 42000: DROP command denied to user 'pfs_user_4'@'localhost' for table 'events_waits_history'
+ERROR 42000: DROP command denied to user 'pfs_user_4'@'localhost' for table `performance_schema`.`events_waits_history`
TRUNCATE TABLE performance_schema.events_waits_current;
-ERROR 42000: DROP command denied to user 'pfs_user_4'@'localhost' for table 'events_waits_current'
+ERROR 42000: DROP command denied to user 'pfs_user_4'@'localhost' for table `performance_schema`.`events_waits_current`
#
# WL#4814, NFS1: Can use grants to give normal user access
# to turn on and off instrumentation
diff --git a/mysql-test/suite/perfschema/r/setup_actors.result b/mysql-test/suite/perfschema/r/setup_actors.result
index 3474b678321..e0a2490e9f2 100644
--- a/mysql-test/suite/perfschema/r/setup_actors.result
+++ b/mysql-test/suite/perfschema/r/setup_actors.result
@@ -115,7 +115,7 @@ from performance_schema.threads
where PROCESSLIST_ID = connection_id();
connect con5, localhost, user5, , ;
select * from performance_schema.threads;
-ERROR 42000: SELECT command denied to user 'user5'@'localhost' for table 'threads'
+ERROR 42000: SELECT command denied to user 'user5'@'localhost' for table `performance_schema`.`threads`
select * from test.v1;
NAME TYPE INSTRUMENTED PROCESSLIST_USER PROCESSLIST_HOST
thread/sql/one_connection FOREGROUND YES user5 localhost
diff --git a/mysql-test/suite/roles/definer.result b/mysql-test/suite/roles/definer.result
index 70dabd50617..14ba1a6cea3 100644
--- a/mysql-test/suite/roles/definer.result
+++ b/mysql-test/suite/roles/definer.result
@@ -50,9 +50,9 @@ a+b c current_role()
select * from test.v3;
ERROR 28000: Access denied for user 'foo'@'localhost' (using password: NO)
create definer=role4 view test.v4 as select a+b,c from t1;
-ERROR 42000: ANY command denied to user 'foo'@'localhost' for table 't1'
+ERROR 42000: ANY command denied to user 'foo'@'localhost' for table `mysqltest1`.`t1`
select * from t1;
-ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table `mysqltest1`.`t1`
set role role4;
select * from t1;
a b c
@@ -113,7 +113,7 @@ tr1 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE
insert t1 values (111, 222, 333) latin1 latin1_swedish_ci latin1_swedish_ci #
set role none;
insert t2 values (11,22,33);
-ERROR 42000: INSERT command denied to user ''@'' for table 't1'
+ERROR 42000: INSERT command denied to user ''@'' for table `mysqltest1`.`t1`
select * from t1;
a b c
1 10 100
@@ -179,7 +179,7 @@ pr1 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE
insert t1 values (111, 222, 333) latin1 latin1_swedish_ci latin1_swedish_ci
set role none;
call pr1();
-ERROR 42000: INSERT command denied to user ''@'' for table 't1'
+ERROR 42000: INSERT command denied to user ''@'' for table `mysqltest1`.`t1`
select * from t1;
a b c
1 10 100
diff --git a/mysql-test/suite/roles/recursive.result b/mysql-test/suite/roles/recursive.result
index 0d45a0e03d0..05f28745f02 100644
--- a/mysql-test/suite/roles/recursive.result
+++ b/mysql-test/suite/roles/recursive.result
@@ -49,7 +49,7 @@ show status like 'debug%';
Variable_name Value
connection foo;
select count(*) from mysql.roles_mapping;
-ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table 'roles_mapping'
+ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table `mysql`.`roles_mapping`
set role role10;
select count(*) from mysql.roles_mapping;
count(*)
@@ -99,7 +99,7 @@ count(*)
set role none;
set role role10;
select count(*) from mysql.roles_mapping;
-ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table 'roles_mapping'
+ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table `mysql`.`roles_mapping`
set role none;
connection default;
grant select on mysql.* to role1;
@@ -107,7 +107,7 @@ show status like 'debug%';
Variable_name Value
connection foo;
select count(*) from mysql.roles_mapping;
-ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table 'roles_mapping'
+ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table `mysql`.`roles_mapping`
set role role10;
select count(*) from mysql.roles_mapping;
count(*)
@@ -142,7 +142,7 @@ show status like 'debug%';
Variable_name Value
connection foo;
select count(*) from mysql.roles_mapping;
-ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table 'roles_mapping'
+ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table `mysql`.`roles_mapping`
set role none;
connection default;
grant select on mysql.roles_mapping to role1;
@@ -150,7 +150,7 @@ show status like 'debug%';
Variable_name Value
connection foo;
select count(*) from mysql.roles_mapping;
-ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table 'roles_mapping'
+ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table `mysql`.`roles_mapping`
set role role10;
select count(*) from mysql.roles_mapping;
count(*)
@@ -185,7 +185,7 @@ show status like 'debug%';
Variable_name Value
connection foo;
select count(*) from mysql.roles_mapping;
-ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table 'roles_mapping'
+ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table `mysql`.`roles_mapping`
set role none;
connection default;
grant select(User) on mysql.roles_mapping to role1;
@@ -193,7 +193,7 @@ show status like 'debug%';
Variable_name Value
connection foo;
select count(*) from mysql.roles_mapping;
-ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table 'roles_mapping'
+ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table `mysql`.`roles_mapping`
set role role10;
select count(concat(User,Host,Role)) from mysql.roles_mapping;
ERROR 42000: SELECT command denied to user 'foo'@'localhost' for column 'Host' in table 'roles_mapping'
@@ -275,7 +275,7 @@ show status like 'debug%';
Variable_name Value
connection foo;
select count(concat(Host)) from mysql.roles_mapping;
-ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table 'roles_mapping'
+ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table `mysql`.`roles_mapping`
set role none;
connection default;
create procedure pr1() select "pr1";
diff --git a/mysql-test/suite/roles/recursive_dbug.result b/mysql-test/suite/roles/recursive_dbug.result
index 6a86df655e7..55bbad51c09 100644
--- a/mysql-test/suite/roles/recursive_dbug.result
+++ b/mysql-test/suite/roles/recursive_dbug.result
@@ -63,7 +63,7 @@ Debug_role_merges_column 0
Debug_role_merges_routine 0
connection foo;
select count(*) from mysql.roles_mapping;
-ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table 'roles_mapping'
+ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table `mysql`.`roles_mapping`
set role role10;
select count(*) from mysql.roles_mapping;
count(*)
@@ -118,7 +118,7 @@ count(*)
set role none;
set role role10;
select count(*) from mysql.roles_mapping;
-ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table 'roles_mapping'
+ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table `mysql`.`roles_mapping`
set role none;
connection default;
grant select on mysql.* to role1;
@@ -131,7 +131,7 @@ Debug_role_merges_column 0
Debug_role_merges_routine 0
connection foo;
select count(*) from mysql.roles_mapping;
-ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table 'roles_mapping'
+ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table `mysql`.`roles_mapping`
set role role10;
select count(*) from mysql.roles_mapping;
count(*)
@@ -171,7 +171,7 @@ Debug_role_merges_column 0
Debug_role_merges_routine 0
connection foo;
select count(*) from mysql.roles_mapping;
-ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table 'roles_mapping'
+ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table `mysql`.`roles_mapping`
set role none;
connection default;
grant select on mysql.roles_mapping to role1;
@@ -184,7 +184,7 @@ Debug_role_merges_column 0
Debug_role_merges_routine 0
connection foo;
select count(*) from mysql.roles_mapping;
-ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table 'roles_mapping'
+ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table `mysql`.`roles_mapping`
set role role10;
select count(*) from mysql.roles_mapping;
count(*)
@@ -224,7 +224,7 @@ Debug_role_merges_column 0
Debug_role_merges_routine 0
connection foo;
select count(*) from mysql.roles_mapping;
-ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table 'roles_mapping'
+ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table `mysql`.`roles_mapping`
set role none;
connection default;
grant select(User) on mysql.roles_mapping to role1;
@@ -237,7 +237,7 @@ Debug_role_merges_column 9
Debug_role_merges_routine 0
connection foo;
select count(*) from mysql.roles_mapping;
-ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table 'roles_mapping'
+ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table `mysql`.`roles_mapping`
set role role10;
select count(concat(User,Host,Role)) from mysql.roles_mapping;
ERROR 42000: SELECT command denied to user 'foo'@'localhost' for column 'Host' in table 'roles_mapping'
@@ -334,7 +334,7 @@ Debug_role_merges_column 30
Debug_role_merges_routine 0
connection foo;
select count(concat(Host)) from mysql.roles_mapping;
-ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table 'roles_mapping'
+ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table `mysql`.`roles_mapping`
set role none;
connection default;
create procedure pr1() select "pr1";
diff --git a/mysql-test/suite/roles/role_case_sensitive-10744.result b/mysql-test/suite/roles/role_case_sensitive-10744.result
index 05ac5c95e31..e0a05e4c45e 100644
--- a/mysql-test/suite/roles/role_case_sensitive-10744.result
+++ b/mysql-test/suite/roles/role_case_sensitive-10744.result
@@ -44,7 +44,7 @@ show tables from secret_db;
Tables_in_secret_db
t1
select * from secret_db.t1;
-ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table `secret_db`.`t1`
insert into secret_db.t1 values ("|-|4><");
set role test_role;
select * from secret_db.t1 order by secret;
@@ -52,7 +52,7 @@ secret
Some Secret P4ssw0rd
|-|4><
insert into secret_db.t1 values ("|_33T|-|4><");
-ERROR 42000: INSERT command denied to user 'test_user'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'test_user'@'localhost' for table `secret_db`.`t1`
connection default;
drop role test_ROLE;
drop role test_role;
diff --git a/mysql-test/suite/roles/role_grant_propagate-29458.result b/mysql-test/suite/roles/role_grant_propagate-29458.result
index 28aa053f38a..88d3c0e38fb 100644
--- a/mysql-test/suite/roles/role_grant_propagate-29458.result
+++ b/mysql-test/suite/roles/role_grant_propagate-29458.result
@@ -81,7 +81,7 @@ grant alter routine on procedure some_db.p1 to r_active_proc;
grant alter routine on function some_db.f1 to r_active_func;
connect con1, localhost, foo,,;
select * from some_db.t1;
-ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table `some_db`.`t1`
#
# Before MDEV-29458 fix, all these commands would return
# ER_TABLEACCESS_DENIED_ERROR
diff --git a/mysql-test/suite/roles/roles_tables_priv-29465.result b/mysql-test/suite/roles/roles_tables_priv-29465.result
index de5f79d98f5..0ae1a8dd963 100644
--- a/mysql-test/suite/roles/roles_tables_priv-29465.result
+++ b/mysql-test/suite/roles/roles_tables_priv-29465.result
@@ -16,7 +16,7 @@ Host Db User Table_name Grantor Timestamp Table_priv Column_priv
some_db r_select_column t1 root@localhost 0000-00-00 00:00:00 Select
connect con1, localhost, foo,,;
insert into some_db.t1(a) values (1);
-ERROR 42000: INSERT command denied to user 'foo'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'foo'@'localhost' for table `some_db`.`t1`
set role r_active_column;
insert into some_db.t1(a) values (1);
disconnect con1;
@@ -24,10 +24,10 @@ connection default;
revoke insert(a) on some_db.t1 from r_active_column;
connect con1, localhost, foo,,;
insert into some_db.t1(a) values (1);
-ERROR 42000: INSERT command denied to user 'foo'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'foo'@'localhost' for table `some_db`.`t1`
set role r_active_column;
insert into some_db.t1(a) values (1);
-ERROR 42000: INSERT command denied to user 'foo'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'foo'@'localhost' for table `some_db`.`t1`
disconnect con1;
connection default;
drop role r_select_column;
diff --git a/mysql-test/suite/roles/set_and_drop.result b/mysql-test/suite/roles/set_and_drop.result
index 87ccad2b447..e52a82bd77b 100644
--- a/mysql-test/suite/roles/set_and_drop.result
+++ b/mysql-test/suite/roles/set_and_drop.result
@@ -18,7 +18,7 @@ connect foo,localhost,foo;
flush tables;
ERROR 42000: Access denied; you need (at least one of) the RELOAD privilege(s) for this operation
select * from mysql.roles_mapping;
-ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table 'roles_mapping'
+ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table `mysql`.`roles_mapping`
show tables from mysqltest1;
ERROR 42000: Access denied for user 'foo'@'localhost' to database 'mysqltest1'
set role role1;
@@ -38,7 +38,7 @@ a b
1 2
3 4
select * from mysqltest1.t2;
-ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table 't2'
+ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table `mysqltest1`.`t2`
select a from mysqltest1.t2;
a
5
@@ -64,11 +64,11 @@ ROLE_NAME
role1
flush tables;
select * from mysql.roles_mapping;
-ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table 'roles_mapping'
+ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table `mysql`.`roles_mapping`
select * from mysqltest1.t1;
-ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table `mysqltest1`.`t1`
select a from mysqltest1.t2;
-ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table 't2'
+ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table `mysqltest1`.`t2`
set role none;
connection default;
grant reload on *.* to role1;
@@ -92,7 +92,7 @@ a b
1 2
3 4
select * from mysqltest1.t2;
-ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table 't2'
+ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table `mysqltest1`.`t2`
select a from mysqltest1.t2;
a
5
@@ -105,11 +105,11 @@ drop role role1;
connection foo;
flush tables;
select * from mysql.roles_mapping;
-ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table 'roles_mapping'
+ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table `mysql`.`roles_mapping`
select * from mysqltest1.t1;
-ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table 't1'
+ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table `mysqltest1`.`t1`
select a from mysqltest1.t2;
-ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table 't2'
+ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table `mysqltest1`.`t2`
show grants;
Grants for foo@localhost
GRANT USAGE ON *.* TO `foo`@`localhost`
diff --git a/mysql-test/suite/roles/set_default_role_clear.result b/mysql-test/suite/roles/set_default_role_clear.result
index fbfb9369cae..ed2144958b2 100644
--- a/mysql-test/suite/roles/set_default_role_clear.result
+++ b/mysql-test/suite/roles/set_default_role_clear.result
@@ -8,7 +8,7 @@ GRANT `test_role` TO `test_user`@`localhost`
GRANT USAGE ON *.* TO `test_user`@`localhost`
set default role test_role;
select user, host, default_role from mysql.user;
-ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table 'user'
+ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table `mysql`.`user`
select user, host, default_role from mysql.user where user='test_user';
user host default_role
test_user localhost test_role
@@ -31,6 +31,6 @@ select user, host, default_role from mysql.user where user='test_user';
user host default_role
test_user localhost
select user, host, default_role from mysql.user;
-ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table 'user'
+ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table `mysql`.`user`
drop role test_role;
drop user test_user@localhost;
diff --git a/mysql-test/suite/roles/set_default_role_for.result b/mysql-test/suite/roles/set_default_role_for.result
index 4c8163b7459..6e376d3c4a5 100644
--- a/mysql-test/suite/roles/set_default_role_for.result
+++ b/mysql-test/suite/roles/set_default_role_for.result
@@ -45,7 +45,7 @@ GRANT USAGE ON *.* TO `user_b`@`localhost`
GRANT INSERT, UPDATE ON *.* TO `role_b`
SET DEFAULT ROLE `role_b` FOR `user_b`@`localhost`
select user, host, default_role from mysql.user where user like 'user_%';
-ERROR 42000: SELECT command denied to user 'user_b'@'localhost' for table 'user'
+ERROR 42000: SELECT command denied to user 'user_b'@'localhost' for table `mysql`.`user`
insert ignore into mysql.user (user, host) values ('someuser', 'somehost');
Warnings:
Warning 1364 Field 'ssl_cipher' doesn't have a default value
@@ -59,7 +59,7 @@ GRANT `role_a` TO `user_a`@`localhost`
GRANT USAGE ON *.* TO `user_a`@`localhost`
GRANT INSERT, UPDATE ON *.* TO `role_b`
select user, host, default_role from mysql.user where user like 'user_%';
-ERROR 42000: SELECT command denied to user 'user_a'@'localhost' for table 'user'
+ERROR 42000: SELECT command denied to user 'user_a'@'localhost' for table `mysql`.`user`
drop role role_a;
drop role role_b;
delete from mysql.user where user = 'someuser' && host = 'somehost';
diff --git a/mysql-test/suite/roles/set_default_role_invalid.result b/mysql-test/suite/roles/set_default_role_invalid.result
index ffe8689e715..7e8b6cd9a64 100644
--- a/mysql-test/suite/roles/set_default_role_invalid.result
+++ b/mysql-test/suite/roles/set_default_role_invalid.result
@@ -8,14 +8,14 @@ Grants for test_user@localhost
GRANT `test_role` TO `test_user`@`localhost`
GRANT USAGE ON *.* TO `test_user`@`localhost`
select user, host, default_role from mysql.user;
-ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table 'user'
+ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table `mysql`.`user`
set default role invalid_role;
ERROR OP000: Invalid role specification `invalid_role`
set default role not_granted_role;
ERROR OP000: Invalid role specification `not_granted_role`
set default role test_role;
select user, host, default_role from mysql.user;
-ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table 'user'
+ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table `mysql`.`user`
select user, host, default_role from mysql.user where user='test_user';
user host default_role
test_user localhost test_role
@@ -35,7 +35,7 @@ user host default_role
test_user localhost test_role
revoke test_role from test_user@localhost;
select user, host, default_role from mysql.user where user='test_user';
-ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table 'user'
+ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table `mysql`.`user`
drop role test_role;
drop role not_granted_role;
drop user test_user@localhost;
diff --git a/mysql-test/suite/roles/set_default_role_new_connection.result b/mysql-test/suite/roles/set_default_role_new_connection.result
index 997ea46624c..3455ebd79cb 100644
--- a/mysql-test/suite/roles/set_default_role_new_connection.result
+++ b/mysql-test/suite/roles/set_default_role_new_connection.result
@@ -8,10 +8,10 @@ Grants for test_user@localhost
GRANT `test_role` TO `test_user`@`localhost`
GRANT USAGE ON *.* TO `test_user`@`localhost`
select user, host, default_role from mysql.user where user = 'test_user';
-ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table 'user'
+ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table `mysql`.`user`
set default role test_role;
select user, host, default_role from mysql.user where user = 'test_user';
-ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table 'user'
+ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table `mysql`.`user`
disconnect c1;
connection default;
select user, host, default_role from mysql.user where user = 'test_user';
@@ -39,7 +39,7 @@ Grants for test_user@localhost
GRANT `test_role` TO `test_user`@`localhost`
GRANT USAGE ON *.* TO `test_user`@`localhost`
select user, host, default_role from mysql.user where user = 'test_user';
-ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table 'user'
+ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table `mysql`.`user`
disconnect c1;
connection default;
select user, host, default_role from mysql.user where user = 'test_user';
diff --git a/mysql-test/suite/roles/set_role-5232.result b/mysql-test/suite/roles/set_role-5232.result
index 31cb4b105ec..6158c95e5c0 100644
--- a/mysql-test/suite/roles/set_role-5232.result
+++ b/mysql-test/suite/roles/set_role-5232.result
@@ -8,7 +8,7 @@ select user(), current_user();
user() current_user()
c@localhost @localhost
select user from mysql.user group by user;
-ERROR 42000: SELECT command denied to user ''@'localhost' for table 'user'
+ERROR 42000: SELECT command denied to user ''@'localhost' for table `mysql`.`user`
set role r1;
ERROR OP000: Invalid role specification `r1`
disconnect c;
diff --git a/mysql-test/suite/roles/set_role-database-recursive.result b/mysql-test/suite/roles/set_role-database-recursive.result
index c919a800220..41be75598b2 100644
--- a/mysql-test/suite/roles/set_role-database-recursive.result
+++ b/mysql-test/suite/roles/set_role-database-recursive.result
@@ -23,7 +23,7 @@ user host
grant select on mysql.* to test_role2;
flush privileges;
select * from mysql.roles_mapping;
-ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table 'roles_mapping'
+ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table `mysql`.`roles_mapping`
select current_user(), current_role();
current_user() current_role()
test_user@localhost NULL
@@ -43,7 +43,7 @@ select current_user(), current_role();
current_user() current_role()
test_user@localhost NULL
select * from mysql.roles_mapping;
-ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table 'roles_mapping'
+ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table `mysql`.`roles_mapping`
set role test_role2;
select current_user(), current_role();
current_user() current_role()
@@ -61,7 +61,7 @@ create role test_role4;
grant test_role4 to test_role3;
set role test_role1;
delete from mysql.user where user='no such user';
-ERROR 42000: DELETE command denied to user 'test_user'@'localhost' for table 'user'
+ERROR 42000: DELETE command denied to user 'test_user'@'localhost' for table `mysql`.`user`
grant delete on mysql.* to test_role4;
set role test_role1;
delete from mysql.user where user='no such user';
diff --git a/mysql-test/suite/roles/set_role-database-simple.result b/mysql-test/suite/roles/set_role-database-simple.result
index e21a55edf2e..3b28a908d3a 100644
--- a/mysql-test/suite/roles/set_role-database-simple.result
+++ b/mysql-test/suite/roles/set_role-database-simple.result
@@ -13,7 +13,7 @@ grant select on mysql.* to test_role1;
grant insert, delete on mysql.roles_mapping to test_role1;
grant reload on *.* to test_role1;
select * from mysql.roles_mapping;
-ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table 'roles_mapping'
+ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table `mysql`.`roles_mapping`
select current_user(), current_role();
current_user() current_role()
test_user@localhost NULL
@@ -26,7 +26,7 @@ Host User Role Admin_option
localhost root test_role1 Y
localhost test_user test_role1 N
insert into mysql.user (user, host) values ('Dummy', 'Dummy');
-ERROR 42000: INSERT command denied to user 'test_user'@'localhost' for table 'user'
+ERROR 42000: INSERT command denied to user 'test_user'@'localhost' for table `mysql`.`user`
insert into mysql.roles_mapping values ('localhost', 'test_user', 'test_role2', 'N');
delete from mysql.roles_mapping where Role='test_role2';
use mysql;
@@ -37,13 +37,13 @@ test_user@localhost NULL
use mysql;
ERROR 42000: Access denied for user 'test_user'@'localhost' to database 'mysql'
select * from mysql.roles_mapping;
-ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table 'roles_mapping'
+ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table `mysql`.`roles_mapping`
insert into mysql.user (user, host) values ('Dummy', 'Dummy');
-ERROR 42000: INSERT command denied to user 'test_user'@'localhost' for table 'user'
+ERROR 42000: INSERT command denied to user 'test_user'@'localhost' for table `mysql`.`user`
insert into mysql.roles_mapping values ('localhost', 'test_user', 'test_role2', 'N');
-ERROR 42000: INSERT command denied to user 'test_user'@'localhost' for table 'roles_mapping'
+ERROR 42000: INSERT command denied to user 'test_user'@'localhost' for table `mysql`.`roles_mapping`
delete from mysql.roles_mapping where Role='test_role2';
-ERROR 42000: DELETE command denied to user 'test_user'@'localhost' for table 'roles_mapping'
+ERROR 42000: DELETE command denied to user 'test_user'@'localhost' for table `mysql`.`roles_mapping`
drop user 'test_user'@'localhost';
revoke select on mysql.* from test_role1;
revoke insert, delete on mysql.roles_mapping from test_role1;
diff --git a/mysql-test/suite/roles/set_role-multiple-role.result b/mysql-test/suite/roles/set_role-multiple-role.result
index 2ddd1e8a510..e4cb3b8542c 100644
--- a/mysql-test/suite/roles/set_role-multiple-role.result
+++ b/mysql-test/suite/roles/set_role-multiple-role.result
@@ -22,7 +22,7 @@ grant r_drp to test_user@localhost;
grant r_rld to test_user@localhost;
flush privileges;
select * from mysql.roles_mapping;
-ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table 'roles_mapping'
+ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table `mysql`.`roles_mapping`
show grants;
Grants for test_user@localhost
GRANT USAGE ON *.* TO `test_user`@`localhost`
@@ -83,7 +83,7 @@ GRANT `r_rld` TO `test_user`@`localhost`
GRANT `r_sel` TO `test_user`@`localhost`
GRANT `r_upd` TO `test_user`@`localhost`
select * from mysql.roles_mapping;
-ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table 'roles_mapping'
+ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table `mysql`.`roles_mapping`
insert into mysql.roles_mapping values ('', 'r_sel', 'r_rld', 'N');
flush privileges;
ERROR 42000: Access denied; you need (at least one of) the RELOAD privilege(s) for this operation
@@ -139,7 +139,7 @@ select current_user(), current_role();
current_user() current_role()
test_user@localhost r_sel
insert into mysql.random_test_table values (1);
-ERROR 42000: INSERT command denied to user 'test_user'@'localhost' for table 'random_test_table'
+ERROR 42000: INSERT command denied to user 'test_user'@'localhost' for table `mysql`.`random_test_table`
drop table mysql.random_test_table;
delete from mysql.user where user like 'r\_%';
delete from mysql.roles_mapping where Role like 'r\_%';
diff --git a/mysql-test/suite/roles/set_role-recursive.result b/mysql-test/suite/roles/set_role-recursive.result
index d1378f327a8..823b7cb534a 100644
--- a/mysql-test/suite/roles/set_role-recursive.result
+++ b/mysql-test/suite/roles/set_role-recursive.result
@@ -22,7 +22,7 @@ select * from mysql.user where user like 'test_role2';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
test_role2 Y N N N N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 N Y 0.000000
select * from mysql.roles_mapping;
-ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table 'roles_mapping'
+ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table `mysql`.`roles_mapping`
show grants;
Grants for test_user@localhost
GRANT USAGE ON *.* TO `test_user`@`localhost`
@@ -60,7 +60,7 @@ Grants for test_user@localhost
GRANT USAGE ON *.* TO `test_user`@`localhost`
GRANT `test_role1` TO `test_user`@`localhost`
select * from mysql.roles_mapping;
-ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table 'roles_mapping'
+ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table `mysql`.`roles_mapping`
show grants;
Grants for test_user@localhost
GRANT USAGE ON *.* TO `test_user`@`localhost`
@@ -75,7 +75,7 @@ Grants for test_user@localhost
GRANT USAGE ON *.* TO `test_user`@`localhost`
GRANT `test_role1` TO `test_user`@`localhost`
select * from mysql.roles_mapping;
-ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table 'roles_mapping'
+ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table `mysql`.`roles_mapping`
show grants;
Grants for test_user@localhost
GRANT USAGE ON *.* TO `test_user`@`localhost`
@@ -110,7 +110,7 @@ Grants for test_user@localhost
GRANT USAGE ON *.* TO `test_user`@`localhost`
GRANT `test_role1` TO `test_user`@`localhost`
select * from mysql.roles_mapping;
-ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table 'roles_mapping'
+ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table `mysql`.`roles_mapping`
delete from mysql.user where user='test_role1';
delete from mysql.user where user='test_role2';
delete from mysql.roles_mapping;
diff --git a/mysql-test/suite/roles/set_role-simple.result b/mysql-test/suite/roles/set_role-simple.result
index af237113bb3..b87d60b9cc4 100644
--- a/mysql-test/suite/roles/set_role-simple.result
+++ b/mysql-test/suite/roles/set_role-simple.result
@@ -14,7 +14,7 @@ select * from mysql.user where user='test_role1';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
test_role1 Y N N N N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 N Y 0.000000
select * from mysql.roles_mapping;
-ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table 'roles_mapping'
+ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table `mysql`.`roles_mapping`
show grants;
Grants for test_user@localhost
GRANT USAGE ON *.* TO `test_user`@`localhost`
@@ -40,7 +40,7 @@ select current_user(), current_role();
current_user() current_role()
test_user@localhost NULL
select * from mysql.roles_mapping;
-ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table 'roles_mapping'
+ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table `mysql`.`roles_mapping`
delete from mysql.user where user='test_role1';
delete from mysql.roles_mapping where Role='test_role1';
flush privileges;
diff --git a/mysql-test/suite/roles/set_role-table-column-priv.result b/mysql-test/suite/roles/set_role-table-column-priv.result
index 738b3313bb2..0ee3fceaef5 100644
--- a/mysql-test/suite/roles/set_role-table-column-priv.result
+++ b/mysql-test/suite/roles/set_role-table-column-priv.result
@@ -16,7 +16,7 @@ localhost root test_role2 Y
localhost test_user test_role1 N
grant select (Role) on mysql.roles_mapping to test_role2;
select * from mysql.roles_mapping;
-ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table 'roles_mapping'
+ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table `mysql`.`roles_mapping`
show grants;
Grants for test_user@localhost
GRANT USAGE ON *.* TO `test_user`@`localhost`
@@ -58,7 +58,7 @@ select current_user(), current_role();
current_user() current_role()
test_user@localhost NULL
select Role from mysql.roles_mapping;
-ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table 'roles_mapping'
+ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table `mysql`.`roles_mapping`
drop user 'test_user'@'localhost';
select * from mysql.tables_priv;
Host Db User Table_name Grantor Timestamp Table_priv Column_priv
diff --git a/mysql-test/suite/roles/set_role-table-simple.result b/mysql-test/suite/roles/set_role-table-simple.result
index dcd0914db8d..24959fa20cc 100644
--- a/mysql-test/suite/roles/set_role-table-simple.result
+++ b/mysql-test/suite/roles/set_role-table-simple.result
@@ -16,7 +16,7 @@ localhost root test_role2 Y
localhost test_user test_role1 N
grant select on mysql.roles_mapping to test_role2;
select * from mysql.roles_mapping;
-ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table 'roles_mapping'
+ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table `mysql`.`roles_mapping`
show grants;
Grants for test_user@localhost
GRANT USAGE ON *.* TO `test_user`@`localhost`
@@ -56,7 +56,7 @@ select current_user(), current_role();
current_user() current_role()
test_user@localhost NULL
select * from mysql.roles_mapping;
-ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table 'roles_mapping'
+ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table `mysql`.`roles_mapping`
drop user 'test_user'@'localhost';
select * from mysql.tables_priv;
Host Db User Table_name Grantor Timestamp Table_priv Column_priv
diff --git a/mysql-test/suite/rpl/r/rpl_row_img_sequence.result b/mysql-test/suite/rpl/r/rpl_row_img_sequence.result
deleted file mode 100644
index aa9fb34ec02..00000000000
--- a/mysql-test/suite/rpl/r/rpl_row_img_sequence.result
+++ /dev/null
@@ -1,2290 +0,0 @@
-include/rpl_init.inc [topology=1->2->3]
-connection server_1;
-connection server_2;
-connection server_3;
-connection server_1;
-#
-# Test Case 1) binlog_row_image=MINIMAL should write only columns
-# 1 and 8 to the binary log
-#
-CON: 'server_1', IMG: 'MINIMAL', RESTART SLAVE: 'N'
-connection server_1;
-SET SESSION binlog_row_image= 'MINIMAL';
-SET GLOBAL binlog_row_image= 'MINIMAL';
-FLUSH TABLES;
-SHOW VARIABLES LIKE 'binlog_row_image';
-Variable_name Value
-binlog_row_image MINIMAL
-CON: 'server_2', IMG: 'MINIMAL', RESTART SLAVE: 'Y'
-connection server_2;
-SET SESSION binlog_row_image= 'MINIMAL';
-SET GLOBAL binlog_row_image= 'MINIMAL';
-include/stop_slave.inc
-include/start_slave.inc
-FLUSH TABLES;
-SHOW VARIABLES LIKE 'binlog_row_image';
-Variable_name Value
-binlog_row_image MINIMAL
-CON: 'server_3', IMG: 'MINIMAL', RESTART SLAVE: 'Y'
-connection server_3;
-SET SESSION binlog_row_image= 'MINIMAL';
-SET GLOBAL binlog_row_image= 'MINIMAL';
-include/stop_slave.inc
-include/start_slave.inc
-FLUSH TABLES;
-SHOW VARIABLES LIKE 'binlog_row_image';
-Variable_name Value
-binlog_row_image MINIMAL
-connection server_1;
-### engines: MyISAM, MyISAM, MyISAM
-# Create sequences with specific engines per server
-connection server_1;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
-include/save_master_gtid.inc
-connection server_2;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
-include/sync_with_master_gtid.inc
-connection server_3;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
-include/sync_with_master_gtid.inc
-# Pt.1 Ensure SETVAL replicates and binlogs correctly
-connection server_1;
-SELECT SETVAL(s1, 10);
-SETVAL(s1, 10)
-10
-include/save_master_gtid.inc
-# Validate SETVAL replicated correctly to other servers
-connection server_3;
-include/sync_with_master_gtid.inc
-include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
-# Validate server_1 binlogged SETVAL with the correct columns
-connection server_1;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_2 binlogged SETVAL with the correct columns
-connection server_2;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_3 binlogged SETVAL with the correct columns
-connection server_3;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
-connection server_1;
-SELECT NEXTVAL(s1);
-NEXTVAL(s1)
-11
-include/save_master_gtid.inc
-# Validate NEXTVAL replicated correctly to other servers
-connection server_3;
-include/sync_with_master_gtid.inc
-include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
-# Validate server_1 binlogged NEXTVAL with the correct columns
-connection server_1;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_2 binlogged NEXTVAL with the correct columns
-connection server_2;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_3 binlogged NEXTVAL with the correct columns
-connection server_3;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Cleanup
-connection server_1;
-DROP TABLE s1;
-include/save_master_gtid.inc
-connection server_3;
-include/sync_with_master_gtid.inc
-### engines: MyISAM, MyISAM, InnoDB
-# Create sequences with specific engines per server
-connection server_1;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
-include/save_master_gtid.inc
-connection server_2;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
-include/sync_with_master_gtid.inc
-connection server_3;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
-include/sync_with_master_gtid.inc
-# Pt.1 Ensure SETVAL replicates and binlogs correctly
-connection server_1;
-SELECT SETVAL(s1, 10);
-SETVAL(s1, 10)
-10
-include/save_master_gtid.inc
-# Validate SETVAL replicated correctly to other servers
-connection server_3;
-include/sync_with_master_gtid.inc
-include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
-# Validate server_1 binlogged SETVAL with the correct columns
-connection server_1;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_2 binlogged SETVAL with the correct columns
-connection server_2;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_3 binlogged SETVAL with the correct columns
-connection server_3;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
-connection server_1;
-SELECT NEXTVAL(s1);
-NEXTVAL(s1)
-11
-include/save_master_gtid.inc
-# Validate NEXTVAL replicated correctly to other servers
-connection server_3;
-include/sync_with_master_gtid.inc
-include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
-# Validate server_1 binlogged NEXTVAL with the correct columns
-connection server_1;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_2 binlogged NEXTVAL with the correct columns
-connection server_2;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_3 binlogged NEXTVAL with the correct columns
-connection server_3;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Cleanup
-connection server_1;
-DROP TABLE s1;
-include/save_master_gtid.inc
-connection server_3;
-include/sync_with_master_gtid.inc
-### engines: MyISAM, InnoDB, MyISAM
-# Create sequences with specific engines per server
-connection server_1;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
-include/save_master_gtid.inc
-connection server_2;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
-include/sync_with_master_gtid.inc
-connection server_3;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
-include/sync_with_master_gtid.inc
-# Pt.1 Ensure SETVAL replicates and binlogs correctly
-connection server_1;
-SELECT SETVAL(s1, 10);
-SETVAL(s1, 10)
-10
-include/save_master_gtid.inc
-# Validate SETVAL replicated correctly to other servers
-connection server_3;
-include/sync_with_master_gtid.inc
-include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
-# Validate server_1 binlogged SETVAL with the correct columns
-connection server_1;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_2 binlogged SETVAL with the correct columns
-connection server_2;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_3 binlogged SETVAL with the correct columns
-connection server_3;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
-connection server_1;
-SELECT NEXTVAL(s1);
-NEXTVAL(s1)
-11
-include/save_master_gtid.inc
-# Validate NEXTVAL replicated correctly to other servers
-connection server_3;
-include/sync_with_master_gtid.inc
-include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
-# Validate server_1 binlogged NEXTVAL with the correct columns
-connection server_1;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_2 binlogged NEXTVAL with the correct columns
-connection server_2;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_3 binlogged NEXTVAL with the correct columns
-connection server_3;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Cleanup
-connection server_1;
-DROP TABLE s1;
-include/save_master_gtid.inc
-connection server_3;
-include/sync_with_master_gtid.inc
-### engines: MyISAM, InnoDB, InnoDB
-# Create sequences with specific engines per server
-connection server_1;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
-include/save_master_gtid.inc
-connection server_2;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
-include/sync_with_master_gtid.inc
-connection server_3;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
-include/sync_with_master_gtid.inc
-# Pt.1 Ensure SETVAL replicates and binlogs correctly
-connection server_1;
-SELECT SETVAL(s1, 10);
-SETVAL(s1, 10)
-10
-include/save_master_gtid.inc
-# Validate SETVAL replicated correctly to other servers
-connection server_3;
-include/sync_with_master_gtid.inc
-include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
-# Validate server_1 binlogged SETVAL with the correct columns
-connection server_1;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_2 binlogged SETVAL with the correct columns
-connection server_2;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_3 binlogged SETVAL with the correct columns
-connection server_3;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
-connection server_1;
-SELECT NEXTVAL(s1);
-NEXTVAL(s1)
-11
-include/save_master_gtid.inc
-# Validate NEXTVAL replicated correctly to other servers
-connection server_3;
-include/sync_with_master_gtid.inc
-include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
-# Validate server_1 binlogged NEXTVAL with the correct columns
-connection server_1;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_2 binlogged NEXTVAL with the correct columns
-connection server_2;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_3 binlogged NEXTVAL with the correct columns
-connection server_3;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Cleanup
-connection server_1;
-DROP TABLE s1;
-include/save_master_gtid.inc
-connection server_3;
-include/sync_with_master_gtid.inc
-### engines: InnoDB, MyISAM, MyISAM
-# Create sequences with specific engines per server
-connection server_1;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
-include/save_master_gtid.inc
-connection server_2;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
-include/sync_with_master_gtid.inc
-connection server_3;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
-include/sync_with_master_gtid.inc
-# Pt.1 Ensure SETVAL replicates and binlogs correctly
-connection server_1;
-SELECT SETVAL(s1, 10);
-SETVAL(s1, 10)
-10
-include/save_master_gtid.inc
-# Validate SETVAL replicated correctly to other servers
-connection server_3;
-include/sync_with_master_gtid.inc
-include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
-# Validate server_1 binlogged SETVAL with the correct columns
-connection server_1;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_2 binlogged SETVAL with the correct columns
-connection server_2;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_3 binlogged SETVAL with the correct columns
-connection server_3;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
-connection server_1;
-SELECT NEXTVAL(s1);
-NEXTVAL(s1)
-11
-include/save_master_gtid.inc
-# Validate NEXTVAL replicated correctly to other servers
-connection server_3;
-include/sync_with_master_gtid.inc
-include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
-# Validate server_1 binlogged NEXTVAL with the correct columns
-connection server_1;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_2 binlogged NEXTVAL with the correct columns
-connection server_2;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_3 binlogged NEXTVAL with the correct columns
-connection server_3;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Cleanup
-connection server_1;
-DROP TABLE s1;
-include/save_master_gtid.inc
-connection server_3;
-include/sync_with_master_gtid.inc
-### engines: InnoDB, MyISAM, InnoDB
-# Create sequences with specific engines per server
-connection server_1;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
-include/save_master_gtid.inc
-connection server_2;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
-include/sync_with_master_gtid.inc
-connection server_3;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
-include/sync_with_master_gtid.inc
-# Pt.1 Ensure SETVAL replicates and binlogs correctly
-connection server_1;
-SELECT SETVAL(s1, 10);
-SETVAL(s1, 10)
-10
-include/save_master_gtid.inc
-# Validate SETVAL replicated correctly to other servers
-connection server_3;
-include/sync_with_master_gtid.inc
-include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
-# Validate server_1 binlogged SETVAL with the correct columns
-connection server_1;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_2 binlogged SETVAL with the correct columns
-connection server_2;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_3 binlogged SETVAL with the correct columns
-connection server_3;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
-connection server_1;
-SELECT NEXTVAL(s1);
-NEXTVAL(s1)
-11
-include/save_master_gtid.inc
-# Validate NEXTVAL replicated correctly to other servers
-connection server_3;
-include/sync_with_master_gtid.inc
-include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
-# Validate server_1 binlogged NEXTVAL with the correct columns
-connection server_1;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_2 binlogged NEXTVAL with the correct columns
-connection server_2;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_3 binlogged NEXTVAL with the correct columns
-connection server_3;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Cleanup
-connection server_1;
-DROP TABLE s1;
-include/save_master_gtid.inc
-connection server_3;
-include/sync_with_master_gtid.inc
-### engines: InnoDB, InnoDB, MyISAM
-# Create sequences with specific engines per server
-connection server_1;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
-include/save_master_gtid.inc
-connection server_2;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
-include/sync_with_master_gtid.inc
-connection server_3;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
-include/sync_with_master_gtid.inc
-# Pt.1 Ensure SETVAL replicates and binlogs correctly
-connection server_1;
-SELECT SETVAL(s1, 10);
-SETVAL(s1, 10)
-10
-include/save_master_gtid.inc
-# Validate SETVAL replicated correctly to other servers
-connection server_3;
-include/sync_with_master_gtid.inc
-include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
-# Validate server_1 binlogged SETVAL with the correct columns
-connection server_1;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_2 binlogged SETVAL with the correct columns
-connection server_2;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_3 binlogged SETVAL with the correct columns
-connection server_3;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
-connection server_1;
-SELECT NEXTVAL(s1);
-NEXTVAL(s1)
-11
-include/save_master_gtid.inc
-# Validate NEXTVAL replicated correctly to other servers
-connection server_3;
-include/sync_with_master_gtid.inc
-include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
-# Validate server_1 binlogged NEXTVAL with the correct columns
-connection server_1;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_2 binlogged NEXTVAL with the correct columns
-connection server_2;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_3 binlogged NEXTVAL with the correct columns
-connection server_3;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Cleanup
-connection server_1;
-DROP TABLE s1;
-include/save_master_gtid.inc
-connection server_3;
-include/sync_with_master_gtid.inc
-### engines: InnoDB, InnoDB, InnoDB
-# Create sequences with specific engines per server
-connection server_1;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
-include/save_master_gtid.inc
-connection server_2;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
-include/sync_with_master_gtid.inc
-connection server_3;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
-include/sync_with_master_gtid.inc
-# Pt.1 Ensure SETVAL replicates and binlogs correctly
-connection server_1;
-SELECT SETVAL(s1, 10);
-SETVAL(s1, 10)
-10
-include/save_master_gtid.inc
-# Validate SETVAL replicated correctly to other servers
-connection server_3;
-include/sync_with_master_gtid.inc
-include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
-# Validate server_1 binlogged SETVAL with the correct columns
-connection server_1;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_2 binlogged SETVAL with the correct columns
-connection server_2;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_3 binlogged SETVAL with the correct columns
-connection server_3;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
-connection server_1;
-SELECT NEXTVAL(s1);
-NEXTVAL(s1)
-11
-include/save_master_gtid.inc
-# Validate NEXTVAL replicated correctly to other servers
-connection server_3;
-include/sync_with_master_gtid.inc
-include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
-# Validate server_1 binlogged NEXTVAL with the correct columns
-connection server_1;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_2 binlogged NEXTVAL with the correct columns
-connection server_2;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_3 binlogged NEXTVAL with the correct columns
-connection server_3;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Cleanup
-connection server_1;
-DROP TABLE s1;
-include/save_master_gtid.inc
-connection server_3;
-include/sync_with_master_gtid.inc
-#
-# Test Case 2) binlog_row_image=NOBLOB should write all columns to the
-# binary log
-#
-CON: 'server_1', IMG: 'NOBLOB', RESTART SLAVE: 'N'
-connection server_1;
-SET SESSION binlog_row_image= 'NOBLOB';
-SET GLOBAL binlog_row_image= 'NOBLOB';
-FLUSH TABLES;
-SHOW VARIABLES LIKE 'binlog_row_image';
-Variable_name Value
-binlog_row_image NOBLOB
-CON: 'server_2', IMG: 'NOBLOB', RESTART SLAVE: 'Y'
-connection server_2;
-SET SESSION binlog_row_image= 'NOBLOB';
-SET GLOBAL binlog_row_image= 'NOBLOB';
-include/stop_slave.inc
-include/start_slave.inc
-FLUSH TABLES;
-SHOW VARIABLES LIKE 'binlog_row_image';
-Variable_name Value
-binlog_row_image NOBLOB
-CON: 'server_3', IMG: 'NOBLOB', RESTART SLAVE: 'Y'
-connection server_3;
-SET SESSION binlog_row_image= 'NOBLOB';
-SET GLOBAL binlog_row_image= 'NOBLOB';
-include/stop_slave.inc
-include/start_slave.inc
-FLUSH TABLES;
-SHOW VARIABLES LIKE 'binlog_row_image';
-Variable_name Value
-binlog_row_image NOBLOB
-connection server_3;
-### engines: MyISAM, MyISAM, MyISAM
-# Create sequences with specific engines per server
-connection server_1;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
-include/save_master_gtid.inc
-connection server_2;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
-include/sync_with_master_gtid.inc
-connection server_3;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
-include/sync_with_master_gtid.inc
-# Pt.1 Ensure SETVAL replicates and binlogs correctly
-connection server_1;
-SELECT SETVAL(s1, 10);
-SETVAL(s1, 10)
-10
-include/save_master_gtid.inc
-# Validate SETVAL replicated correctly to other servers
-connection server_3;
-include/sync_with_master_gtid.inc
-include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
-# Validate server_1 binlogged SETVAL with the correct columns
-connection server_1;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_2 binlogged SETVAL with the correct columns
-connection server_2;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_3 binlogged SETVAL with the correct columns
-connection server_3;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
-connection server_1;
-SELECT NEXTVAL(s1);
-NEXTVAL(s1)
-11
-include/save_master_gtid.inc
-# Validate NEXTVAL replicated correctly to other servers
-connection server_3;
-include/sync_with_master_gtid.inc
-include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
-# Validate server_1 binlogged NEXTVAL with the correct columns
-connection server_1;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_2 binlogged NEXTVAL with the correct columns
-connection server_2;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_3 binlogged NEXTVAL with the correct columns
-connection server_3;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Cleanup
-connection server_1;
-DROP TABLE s1;
-include/save_master_gtid.inc
-connection server_3;
-include/sync_with_master_gtid.inc
-### engines: MyISAM, MyISAM, InnoDB
-# Create sequences with specific engines per server
-connection server_1;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
-include/save_master_gtid.inc
-connection server_2;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
-include/sync_with_master_gtid.inc
-connection server_3;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
-include/sync_with_master_gtid.inc
-# Pt.1 Ensure SETVAL replicates and binlogs correctly
-connection server_1;
-SELECT SETVAL(s1, 10);
-SETVAL(s1, 10)
-10
-include/save_master_gtid.inc
-# Validate SETVAL replicated correctly to other servers
-connection server_3;
-include/sync_with_master_gtid.inc
-include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
-# Validate server_1 binlogged SETVAL with the correct columns
-connection server_1;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_2 binlogged SETVAL with the correct columns
-connection server_2;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_3 binlogged SETVAL with the correct columns
-connection server_3;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
-connection server_1;
-SELECT NEXTVAL(s1);
-NEXTVAL(s1)
-11
-include/save_master_gtid.inc
-# Validate NEXTVAL replicated correctly to other servers
-connection server_3;
-include/sync_with_master_gtid.inc
-include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
-# Validate server_1 binlogged NEXTVAL with the correct columns
-connection server_1;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_2 binlogged NEXTVAL with the correct columns
-connection server_2;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_3 binlogged NEXTVAL with the correct columns
-connection server_3;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Cleanup
-connection server_1;
-DROP TABLE s1;
-include/save_master_gtid.inc
-connection server_3;
-include/sync_with_master_gtid.inc
-### engines: MyISAM, InnoDB, MyISAM
-# Create sequences with specific engines per server
-connection server_1;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
-include/save_master_gtid.inc
-connection server_2;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
-include/sync_with_master_gtid.inc
-connection server_3;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
-include/sync_with_master_gtid.inc
-# Pt.1 Ensure SETVAL replicates and binlogs correctly
-connection server_1;
-SELECT SETVAL(s1, 10);
-SETVAL(s1, 10)
-10
-include/save_master_gtid.inc
-# Validate SETVAL replicated correctly to other servers
-connection server_3;
-include/sync_with_master_gtid.inc
-include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
-# Validate server_1 binlogged SETVAL with the correct columns
-connection server_1;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_2 binlogged SETVAL with the correct columns
-connection server_2;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_3 binlogged SETVAL with the correct columns
-connection server_3;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
-connection server_1;
-SELECT NEXTVAL(s1);
-NEXTVAL(s1)
-11
-include/save_master_gtid.inc
-# Validate NEXTVAL replicated correctly to other servers
-connection server_3;
-include/sync_with_master_gtid.inc
-include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
-# Validate server_1 binlogged NEXTVAL with the correct columns
-connection server_1;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_2 binlogged NEXTVAL with the correct columns
-connection server_2;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_3 binlogged NEXTVAL with the correct columns
-connection server_3;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Cleanup
-connection server_1;
-DROP TABLE s1;
-include/save_master_gtid.inc
-connection server_3;
-include/sync_with_master_gtid.inc
-### engines: MyISAM, InnoDB, InnoDB
-# Create sequences with specific engines per server
-connection server_1;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
-include/save_master_gtid.inc
-connection server_2;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
-include/sync_with_master_gtid.inc
-connection server_3;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
-include/sync_with_master_gtid.inc
-# Pt.1 Ensure SETVAL replicates and binlogs correctly
-connection server_1;
-SELECT SETVAL(s1, 10);
-SETVAL(s1, 10)
-10
-include/save_master_gtid.inc
-# Validate SETVAL replicated correctly to other servers
-connection server_3;
-include/sync_with_master_gtid.inc
-include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
-# Validate server_1 binlogged SETVAL with the correct columns
-connection server_1;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_2 binlogged SETVAL with the correct columns
-connection server_2;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_3 binlogged SETVAL with the correct columns
-connection server_3;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
-connection server_1;
-SELECT NEXTVAL(s1);
-NEXTVAL(s1)
-11
-include/save_master_gtid.inc
-# Validate NEXTVAL replicated correctly to other servers
-connection server_3;
-include/sync_with_master_gtid.inc
-include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
-# Validate server_1 binlogged NEXTVAL with the correct columns
-connection server_1;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_2 binlogged NEXTVAL with the correct columns
-connection server_2;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_3 binlogged NEXTVAL with the correct columns
-connection server_3;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Cleanup
-connection server_1;
-DROP TABLE s1;
-include/save_master_gtid.inc
-connection server_3;
-include/sync_with_master_gtid.inc
-### engines: InnoDB, MyISAM, MyISAM
-# Create sequences with specific engines per server
-connection server_1;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
-include/save_master_gtid.inc
-connection server_2;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
-include/sync_with_master_gtid.inc
-connection server_3;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
-include/sync_with_master_gtid.inc
-# Pt.1 Ensure SETVAL replicates and binlogs correctly
-connection server_1;
-SELECT SETVAL(s1, 10);
-SETVAL(s1, 10)
-10
-include/save_master_gtid.inc
-# Validate SETVAL replicated correctly to other servers
-connection server_3;
-include/sync_with_master_gtid.inc
-include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
-# Validate server_1 binlogged SETVAL with the correct columns
-connection server_1;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_2 binlogged SETVAL with the correct columns
-connection server_2;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_3 binlogged SETVAL with the correct columns
-connection server_3;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
-connection server_1;
-SELECT NEXTVAL(s1);
-NEXTVAL(s1)
-11
-include/save_master_gtid.inc
-# Validate NEXTVAL replicated correctly to other servers
-connection server_3;
-include/sync_with_master_gtid.inc
-include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
-# Validate server_1 binlogged NEXTVAL with the correct columns
-connection server_1;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_2 binlogged NEXTVAL with the correct columns
-connection server_2;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_3 binlogged NEXTVAL with the correct columns
-connection server_3;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Cleanup
-connection server_1;
-DROP TABLE s1;
-include/save_master_gtid.inc
-connection server_3;
-include/sync_with_master_gtid.inc
-### engines: InnoDB, MyISAM, InnoDB
-# Create sequences with specific engines per server
-connection server_1;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
-include/save_master_gtid.inc
-connection server_2;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
-include/sync_with_master_gtid.inc
-connection server_3;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
-include/sync_with_master_gtid.inc
-# Pt.1 Ensure SETVAL replicates and binlogs correctly
-connection server_1;
-SELECT SETVAL(s1, 10);
-SETVAL(s1, 10)
-10
-include/save_master_gtid.inc
-# Validate SETVAL replicated correctly to other servers
-connection server_3;
-include/sync_with_master_gtid.inc
-include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
-# Validate server_1 binlogged SETVAL with the correct columns
-connection server_1;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_2 binlogged SETVAL with the correct columns
-connection server_2;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_3 binlogged SETVAL with the correct columns
-connection server_3;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
-connection server_1;
-SELECT NEXTVAL(s1);
-NEXTVAL(s1)
-11
-include/save_master_gtid.inc
-# Validate NEXTVAL replicated correctly to other servers
-connection server_3;
-include/sync_with_master_gtid.inc
-include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
-# Validate server_1 binlogged NEXTVAL with the correct columns
-connection server_1;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_2 binlogged NEXTVAL with the correct columns
-connection server_2;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_3 binlogged NEXTVAL with the correct columns
-connection server_3;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Cleanup
-connection server_1;
-DROP TABLE s1;
-include/save_master_gtid.inc
-connection server_3;
-include/sync_with_master_gtid.inc
-### engines: InnoDB, InnoDB, MyISAM
-# Create sequences with specific engines per server
-connection server_1;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
-include/save_master_gtid.inc
-connection server_2;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
-include/sync_with_master_gtid.inc
-connection server_3;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
-include/sync_with_master_gtid.inc
-# Pt.1 Ensure SETVAL replicates and binlogs correctly
-connection server_1;
-SELECT SETVAL(s1, 10);
-SETVAL(s1, 10)
-10
-include/save_master_gtid.inc
-# Validate SETVAL replicated correctly to other servers
-connection server_3;
-include/sync_with_master_gtid.inc
-include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
-# Validate server_1 binlogged SETVAL with the correct columns
-connection server_1;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_2 binlogged SETVAL with the correct columns
-connection server_2;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_3 binlogged SETVAL with the correct columns
-connection server_3;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
-connection server_1;
-SELECT NEXTVAL(s1);
-NEXTVAL(s1)
-11
-include/save_master_gtid.inc
-# Validate NEXTVAL replicated correctly to other servers
-connection server_3;
-include/sync_with_master_gtid.inc
-include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
-# Validate server_1 binlogged NEXTVAL with the correct columns
-connection server_1;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_2 binlogged NEXTVAL with the correct columns
-connection server_2;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_3 binlogged NEXTVAL with the correct columns
-connection server_3;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Cleanup
-connection server_1;
-DROP TABLE s1;
-include/save_master_gtid.inc
-connection server_3;
-include/sync_with_master_gtid.inc
-### engines: InnoDB, InnoDB, InnoDB
-# Create sequences with specific engines per server
-connection server_1;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
-include/save_master_gtid.inc
-connection server_2;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
-include/sync_with_master_gtid.inc
-connection server_3;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
-include/sync_with_master_gtid.inc
-# Pt.1 Ensure SETVAL replicates and binlogs correctly
-connection server_1;
-SELECT SETVAL(s1, 10);
-SETVAL(s1, 10)
-10
-include/save_master_gtid.inc
-# Validate SETVAL replicated correctly to other servers
-connection server_3;
-include/sync_with_master_gtid.inc
-include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
-# Validate server_1 binlogged SETVAL with the correct columns
-connection server_1;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_2 binlogged SETVAL with the correct columns
-connection server_2;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_3 binlogged SETVAL with the correct columns
-connection server_3;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
-connection server_1;
-SELECT NEXTVAL(s1);
-NEXTVAL(s1)
-11
-include/save_master_gtid.inc
-# Validate NEXTVAL replicated correctly to other servers
-connection server_3;
-include/sync_with_master_gtid.inc
-include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
-# Validate server_1 binlogged NEXTVAL with the correct columns
-connection server_1;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_2 binlogged NEXTVAL with the correct columns
-connection server_2;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_3 binlogged NEXTVAL with the correct columns
-connection server_3;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Cleanup
-connection server_1;
-DROP TABLE s1;
-include/save_master_gtid.inc
-connection server_3;
-include/sync_with_master_gtid.inc
-#
-# Test Case 3) binlog_row_image=NOBLOB should write all columns to the
-# binary log
-#
-CON: 'server_1', IMG: 'FULL', RESTART SLAVE: 'N'
-connection server_1;
-SET SESSION binlog_row_image= 'FULL';
-SET GLOBAL binlog_row_image= 'FULL';
-FLUSH TABLES;
-SHOW VARIABLES LIKE 'binlog_row_image';
-Variable_name Value
-binlog_row_image FULL
-CON: 'server_2', IMG: 'FULL', RESTART SLAVE: 'Y'
-connection server_2;
-SET SESSION binlog_row_image= 'FULL';
-SET GLOBAL binlog_row_image= 'FULL';
-include/stop_slave.inc
-include/start_slave.inc
-FLUSH TABLES;
-SHOW VARIABLES LIKE 'binlog_row_image';
-Variable_name Value
-binlog_row_image FULL
-CON: 'server_3', IMG: 'FULL', RESTART SLAVE: 'Y'
-connection server_3;
-SET SESSION binlog_row_image= 'FULL';
-SET GLOBAL binlog_row_image= 'FULL';
-include/stop_slave.inc
-include/start_slave.inc
-FLUSH TABLES;
-SHOW VARIABLES LIKE 'binlog_row_image';
-Variable_name Value
-binlog_row_image FULL
-connection server_3;
-### engines: MyISAM, MyISAM, MyISAM
-# Create sequences with specific engines per server
-connection server_1;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
-include/save_master_gtid.inc
-connection server_2;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
-include/sync_with_master_gtid.inc
-connection server_3;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
-include/sync_with_master_gtid.inc
-# Pt.1 Ensure SETVAL replicates and binlogs correctly
-connection server_1;
-SELECT SETVAL(s1, 10);
-SETVAL(s1, 10)
-10
-include/save_master_gtid.inc
-# Validate SETVAL replicated correctly to other servers
-connection server_3;
-include/sync_with_master_gtid.inc
-include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
-# Validate server_1 binlogged SETVAL with the correct columns
-connection server_1;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_2 binlogged SETVAL with the correct columns
-connection server_2;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_3 binlogged SETVAL with the correct columns
-connection server_3;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
-connection server_1;
-SELECT NEXTVAL(s1);
-NEXTVAL(s1)
-11
-include/save_master_gtid.inc
-# Validate NEXTVAL replicated correctly to other servers
-connection server_3;
-include/sync_with_master_gtid.inc
-include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
-# Validate server_1 binlogged NEXTVAL with the correct columns
-connection server_1;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_2 binlogged NEXTVAL with the correct columns
-connection server_2;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_3 binlogged NEXTVAL with the correct columns
-connection server_3;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Cleanup
-connection server_1;
-DROP TABLE s1;
-include/save_master_gtid.inc
-connection server_3;
-include/sync_with_master_gtid.inc
-### engines: MyISAM, MyISAM, InnoDB
-# Create sequences with specific engines per server
-connection server_1;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
-include/save_master_gtid.inc
-connection server_2;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
-include/sync_with_master_gtid.inc
-connection server_3;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
-include/sync_with_master_gtid.inc
-# Pt.1 Ensure SETVAL replicates and binlogs correctly
-connection server_1;
-SELECT SETVAL(s1, 10);
-SETVAL(s1, 10)
-10
-include/save_master_gtid.inc
-# Validate SETVAL replicated correctly to other servers
-connection server_3;
-include/sync_with_master_gtid.inc
-include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
-# Validate server_1 binlogged SETVAL with the correct columns
-connection server_1;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_2 binlogged SETVAL with the correct columns
-connection server_2;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_3 binlogged SETVAL with the correct columns
-connection server_3;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
-connection server_1;
-SELECT NEXTVAL(s1);
-NEXTVAL(s1)
-11
-include/save_master_gtid.inc
-# Validate NEXTVAL replicated correctly to other servers
-connection server_3;
-include/sync_with_master_gtid.inc
-include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
-# Validate server_1 binlogged NEXTVAL with the correct columns
-connection server_1;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_2 binlogged NEXTVAL with the correct columns
-connection server_2;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_3 binlogged NEXTVAL with the correct columns
-connection server_3;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Cleanup
-connection server_1;
-DROP TABLE s1;
-include/save_master_gtid.inc
-connection server_3;
-include/sync_with_master_gtid.inc
-### engines: MyISAM, InnoDB, MyISAM
-# Create sequences with specific engines per server
-connection server_1;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
-include/save_master_gtid.inc
-connection server_2;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
-include/sync_with_master_gtid.inc
-connection server_3;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
-include/sync_with_master_gtid.inc
-# Pt.1 Ensure SETVAL replicates and binlogs correctly
-connection server_1;
-SELECT SETVAL(s1, 10);
-SETVAL(s1, 10)
-10
-include/save_master_gtid.inc
-# Validate SETVAL replicated correctly to other servers
-connection server_3;
-include/sync_with_master_gtid.inc
-include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
-# Validate server_1 binlogged SETVAL with the correct columns
-connection server_1;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_2 binlogged SETVAL with the correct columns
-connection server_2;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_3 binlogged SETVAL with the correct columns
-connection server_3;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
-connection server_1;
-SELECT NEXTVAL(s1);
-NEXTVAL(s1)
-11
-include/save_master_gtid.inc
-# Validate NEXTVAL replicated correctly to other servers
-connection server_3;
-include/sync_with_master_gtid.inc
-include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
-# Validate server_1 binlogged NEXTVAL with the correct columns
-connection server_1;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_2 binlogged NEXTVAL with the correct columns
-connection server_2;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_3 binlogged NEXTVAL with the correct columns
-connection server_3;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Cleanup
-connection server_1;
-DROP TABLE s1;
-include/save_master_gtid.inc
-connection server_3;
-include/sync_with_master_gtid.inc
-### engines: MyISAM, InnoDB, InnoDB
-# Create sequences with specific engines per server
-connection server_1;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
-include/save_master_gtid.inc
-connection server_2;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
-include/sync_with_master_gtid.inc
-connection server_3;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
-include/sync_with_master_gtid.inc
-# Pt.1 Ensure SETVAL replicates and binlogs correctly
-connection server_1;
-SELECT SETVAL(s1, 10);
-SETVAL(s1, 10)
-10
-include/save_master_gtid.inc
-# Validate SETVAL replicated correctly to other servers
-connection server_3;
-include/sync_with_master_gtid.inc
-include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
-# Validate server_1 binlogged SETVAL with the correct columns
-connection server_1;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_2 binlogged SETVAL with the correct columns
-connection server_2;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_3 binlogged SETVAL with the correct columns
-connection server_3;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
-connection server_1;
-SELECT NEXTVAL(s1);
-NEXTVAL(s1)
-11
-include/save_master_gtid.inc
-# Validate NEXTVAL replicated correctly to other servers
-connection server_3;
-include/sync_with_master_gtid.inc
-include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
-# Validate server_1 binlogged NEXTVAL with the correct columns
-connection server_1;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_2 binlogged NEXTVAL with the correct columns
-connection server_2;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_3 binlogged NEXTVAL with the correct columns
-connection server_3;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Cleanup
-connection server_1;
-DROP TABLE s1;
-include/save_master_gtid.inc
-connection server_3;
-include/sync_with_master_gtid.inc
-### engines: InnoDB, MyISAM, MyISAM
-# Create sequences with specific engines per server
-connection server_1;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
-include/save_master_gtid.inc
-connection server_2;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
-include/sync_with_master_gtid.inc
-connection server_3;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
-include/sync_with_master_gtid.inc
-# Pt.1 Ensure SETVAL replicates and binlogs correctly
-connection server_1;
-SELECT SETVAL(s1, 10);
-SETVAL(s1, 10)
-10
-include/save_master_gtid.inc
-# Validate SETVAL replicated correctly to other servers
-connection server_3;
-include/sync_with_master_gtid.inc
-include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
-# Validate server_1 binlogged SETVAL with the correct columns
-connection server_1;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_2 binlogged SETVAL with the correct columns
-connection server_2;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_3 binlogged SETVAL with the correct columns
-connection server_3;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
-connection server_1;
-SELECT NEXTVAL(s1);
-NEXTVAL(s1)
-11
-include/save_master_gtid.inc
-# Validate NEXTVAL replicated correctly to other servers
-connection server_3;
-include/sync_with_master_gtid.inc
-include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
-# Validate server_1 binlogged NEXTVAL with the correct columns
-connection server_1;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_2 binlogged NEXTVAL with the correct columns
-connection server_2;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_3 binlogged NEXTVAL with the correct columns
-connection server_3;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Cleanup
-connection server_1;
-DROP TABLE s1;
-include/save_master_gtid.inc
-connection server_3;
-include/sync_with_master_gtid.inc
-### engines: InnoDB, MyISAM, InnoDB
-# Create sequences with specific engines per server
-connection server_1;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
-include/save_master_gtid.inc
-connection server_2;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
-include/sync_with_master_gtid.inc
-connection server_3;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
-include/sync_with_master_gtid.inc
-# Pt.1 Ensure SETVAL replicates and binlogs correctly
-connection server_1;
-SELECT SETVAL(s1, 10);
-SETVAL(s1, 10)
-10
-include/save_master_gtid.inc
-# Validate SETVAL replicated correctly to other servers
-connection server_3;
-include/sync_with_master_gtid.inc
-include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
-# Validate server_1 binlogged SETVAL with the correct columns
-connection server_1;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_2 binlogged SETVAL with the correct columns
-connection server_2;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_3 binlogged SETVAL with the correct columns
-connection server_3;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
-connection server_1;
-SELECT NEXTVAL(s1);
-NEXTVAL(s1)
-11
-include/save_master_gtid.inc
-# Validate NEXTVAL replicated correctly to other servers
-connection server_3;
-include/sync_with_master_gtid.inc
-include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
-# Validate server_1 binlogged NEXTVAL with the correct columns
-connection server_1;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_2 binlogged NEXTVAL with the correct columns
-connection server_2;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_3 binlogged NEXTVAL with the correct columns
-connection server_3;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Cleanup
-connection server_1;
-DROP TABLE s1;
-include/save_master_gtid.inc
-connection server_3;
-include/sync_with_master_gtid.inc
-### engines: InnoDB, InnoDB, MyISAM
-# Create sequences with specific engines per server
-connection server_1;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
-include/save_master_gtid.inc
-connection server_2;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
-include/sync_with_master_gtid.inc
-connection server_3;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
-include/sync_with_master_gtid.inc
-# Pt.1 Ensure SETVAL replicates and binlogs correctly
-connection server_1;
-SELECT SETVAL(s1, 10);
-SETVAL(s1, 10)
-10
-include/save_master_gtid.inc
-# Validate SETVAL replicated correctly to other servers
-connection server_3;
-include/sync_with_master_gtid.inc
-include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
-# Validate server_1 binlogged SETVAL with the correct columns
-connection server_1;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_2 binlogged SETVAL with the correct columns
-connection server_2;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_3 binlogged SETVAL with the correct columns
-connection server_3;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
-connection server_1;
-SELECT NEXTVAL(s1);
-NEXTVAL(s1)
-11
-include/save_master_gtid.inc
-# Validate NEXTVAL replicated correctly to other servers
-connection server_3;
-include/sync_with_master_gtid.inc
-include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
-# Validate server_1 binlogged NEXTVAL with the correct columns
-connection server_1;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_2 binlogged NEXTVAL with the correct columns
-connection server_2;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_3 binlogged NEXTVAL with the correct columns
-connection server_3;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Cleanup
-connection server_1;
-DROP TABLE s1;
-include/save_master_gtid.inc
-connection server_3;
-include/sync_with_master_gtid.inc
-### engines: InnoDB, InnoDB, InnoDB
-# Create sequences with specific engines per server
-connection server_1;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
-include/save_master_gtid.inc
-connection server_2;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
-include/sync_with_master_gtid.inc
-connection server_3;
-SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
-include/sync_with_master_gtid.inc
-# Pt.1 Ensure SETVAL replicates and binlogs correctly
-connection server_1;
-SELECT SETVAL(s1, 10);
-SETVAL(s1, 10)
-10
-include/save_master_gtid.inc
-# Validate SETVAL replicated correctly to other servers
-connection server_3;
-include/sync_with_master_gtid.inc
-include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
-# Validate server_1 binlogged SETVAL with the correct columns
-connection server_1;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_2 binlogged SETVAL with the correct columns
-connection server_2;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_3 binlogged SETVAL with the correct columns
-connection server_3;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
-connection server_1;
-SELECT NEXTVAL(s1);
-NEXTVAL(s1)
-11
-include/save_master_gtid.inc
-# Validate NEXTVAL replicated correctly to other servers
-connection server_3;
-include/sync_with_master_gtid.inc
-include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
-# Validate server_1 binlogged NEXTVAL with the correct columns
-connection server_1;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_2 binlogged NEXTVAL with the correct columns
-connection server_2;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Validate server_3 binlogged NEXTVAL with the correct columns
-connection server_3;
-FLUSH LOGS;
-include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
-# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
-# Verifying all expected column ids appear in binlog event output..
-# ..success
-# Verifying only expected column ids appear in binlog event output..
-# ..success
-# Cleanup
-connection server_1;
-DROP TABLE s1;
-include/save_master_gtid.inc
-connection server_3;
-include/sync_with_master_gtid.inc
-include/rpl_end.inc
-# End of tests
diff --git a/mysql-test/suite/rpl/r/rpl_row_img_sequence_full.result b/mysql-test/suite/rpl/r/rpl_row_img_sequence_full.result
new file mode 100644
index 00000000000..2303911637f
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_row_img_sequence_full.result
@@ -0,0 +1,767 @@
+include/rpl_init.inc [topology=1->2->3]
+connection server_1;
+connection server_2;
+connection server_3;
+connection server_1;
+#
+# binlog_row_image=FULL should write all columns to the binary log
+#
+CON: 'server_1', IMG: 'FULL', RESTART SLAVE: 'N'
+connection server_1;
+SET SESSION binlog_row_image= 'FULL';
+SET GLOBAL binlog_row_image= 'FULL';
+FLUSH TABLES;
+SHOW VARIABLES LIKE 'binlog_row_image';
+Variable_name Value
+binlog_row_image FULL
+CON: 'server_2', IMG: 'FULL', RESTART SLAVE: 'Y'
+connection server_2;
+SET SESSION binlog_row_image= 'FULL';
+SET GLOBAL binlog_row_image= 'FULL';
+include/stop_slave.inc
+include/start_slave.inc
+FLUSH TABLES;
+SHOW VARIABLES LIKE 'binlog_row_image';
+Variable_name Value
+binlog_row_image FULL
+CON: 'server_3', IMG: 'FULL', RESTART SLAVE: 'Y'
+connection server_3;
+SET SESSION binlog_row_image= 'FULL';
+SET GLOBAL binlog_row_image= 'FULL';
+include/stop_slave.inc
+include/start_slave.inc
+FLUSH TABLES;
+SHOW VARIABLES LIKE 'binlog_row_image';
+Variable_name Value
+binlog_row_image FULL
+connection server_1;
+### engines: MyISAM, MyISAM, MyISAM
+# Create sequences with specific engines per server
+connection server_1;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
+include/save_master_gtid.inc
+connection server_2;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
+include/sync_with_master_gtid.inc
+connection server_3;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
+include/sync_with_master_gtid.inc
+# Pt.1 Ensure SETVAL replicates and binlogs correctly
+connection server_1;
+SELECT SETVAL(s1, 10);
+SETVAL(s1, 10)
+10
+include/save_master_gtid.inc
+# Validate SETVAL replicated correctly to other servers
+connection server_3;
+include/sync_with_master_gtid.inc
+include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
+# Validate server_1 binlogged SETVAL with the correct columns
+connection server_1;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_2 binlogged SETVAL with the correct columns
+connection server_2;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_3 binlogged SETVAL with the correct columns
+connection server_3;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
+connection server_1;
+SELECT NEXTVAL(s1);
+NEXTVAL(s1)
+11
+include/save_master_gtid.inc
+# Validate NEXTVAL replicated correctly to other servers
+connection server_3;
+include/sync_with_master_gtid.inc
+include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
+# Validate server_1 binlogged NEXTVAL with the correct columns
+connection server_1;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_2 binlogged NEXTVAL with the correct columns
+connection server_2;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_3 binlogged NEXTVAL with the correct columns
+connection server_3;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Cleanup
+connection server_1;
+DROP TABLE s1;
+include/save_master_gtid.inc
+connection server_3;
+include/sync_with_master_gtid.inc
+### engines: MyISAM, MyISAM, InnoDB
+# Create sequences with specific engines per server
+connection server_1;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
+include/save_master_gtid.inc
+connection server_2;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
+include/sync_with_master_gtid.inc
+connection server_3;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
+include/sync_with_master_gtid.inc
+# Pt.1 Ensure SETVAL replicates and binlogs correctly
+connection server_1;
+SELECT SETVAL(s1, 10);
+SETVAL(s1, 10)
+10
+include/save_master_gtid.inc
+# Validate SETVAL replicated correctly to other servers
+connection server_3;
+include/sync_with_master_gtid.inc
+include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
+# Validate server_1 binlogged SETVAL with the correct columns
+connection server_1;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_2 binlogged SETVAL with the correct columns
+connection server_2;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_3 binlogged SETVAL with the correct columns
+connection server_3;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
+connection server_1;
+SELECT NEXTVAL(s1);
+NEXTVAL(s1)
+11
+include/save_master_gtid.inc
+# Validate NEXTVAL replicated correctly to other servers
+connection server_3;
+include/sync_with_master_gtid.inc
+include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
+# Validate server_1 binlogged NEXTVAL with the correct columns
+connection server_1;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_2 binlogged NEXTVAL with the correct columns
+connection server_2;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_3 binlogged NEXTVAL with the correct columns
+connection server_3;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Cleanup
+connection server_1;
+DROP TABLE s1;
+include/save_master_gtid.inc
+connection server_3;
+include/sync_with_master_gtid.inc
+### engines: MyISAM, InnoDB, MyISAM
+# Create sequences with specific engines per server
+connection server_1;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
+include/save_master_gtid.inc
+connection server_2;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
+include/sync_with_master_gtid.inc
+connection server_3;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
+include/sync_with_master_gtid.inc
+# Pt.1 Ensure SETVAL replicates and binlogs correctly
+connection server_1;
+SELECT SETVAL(s1, 10);
+SETVAL(s1, 10)
+10
+include/save_master_gtid.inc
+# Validate SETVAL replicated correctly to other servers
+connection server_3;
+include/sync_with_master_gtid.inc
+include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
+# Validate server_1 binlogged SETVAL with the correct columns
+connection server_1;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_2 binlogged SETVAL with the correct columns
+connection server_2;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_3 binlogged SETVAL with the correct columns
+connection server_3;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
+connection server_1;
+SELECT NEXTVAL(s1);
+NEXTVAL(s1)
+11
+include/save_master_gtid.inc
+# Validate NEXTVAL replicated correctly to other servers
+connection server_3;
+include/sync_with_master_gtid.inc
+include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
+# Validate server_1 binlogged NEXTVAL with the correct columns
+connection server_1;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_2 binlogged NEXTVAL with the correct columns
+connection server_2;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_3 binlogged NEXTVAL with the correct columns
+connection server_3;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Cleanup
+connection server_1;
+DROP TABLE s1;
+include/save_master_gtid.inc
+connection server_3;
+include/sync_with_master_gtid.inc
+### engines: MyISAM, InnoDB, InnoDB
+# Create sequences with specific engines per server
+connection server_1;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
+include/save_master_gtid.inc
+connection server_2;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
+include/sync_with_master_gtid.inc
+connection server_3;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
+include/sync_with_master_gtid.inc
+# Pt.1 Ensure SETVAL replicates and binlogs correctly
+connection server_1;
+SELECT SETVAL(s1, 10);
+SETVAL(s1, 10)
+10
+include/save_master_gtid.inc
+# Validate SETVAL replicated correctly to other servers
+connection server_3;
+include/sync_with_master_gtid.inc
+include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
+# Validate server_1 binlogged SETVAL with the correct columns
+connection server_1;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_2 binlogged SETVAL with the correct columns
+connection server_2;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_3 binlogged SETVAL with the correct columns
+connection server_3;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
+connection server_1;
+SELECT NEXTVAL(s1);
+NEXTVAL(s1)
+11
+include/save_master_gtid.inc
+# Validate NEXTVAL replicated correctly to other servers
+connection server_3;
+include/sync_with_master_gtid.inc
+include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
+# Validate server_1 binlogged NEXTVAL with the correct columns
+connection server_1;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_2 binlogged NEXTVAL with the correct columns
+connection server_2;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_3 binlogged NEXTVAL with the correct columns
+connection server_3;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Cleanup
+connection server_1;
+DROP TABLE s1;
+include/save_master_gtid.inc
+connection server_3;
+include/sync_with_master_gtid.inc
+### engines: InnoDB, MyISAM, MyISAM
+# Create sequences with specific engines per server
+connection server_1;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
+include/save_master_gtid.inc
+connection server_2;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
+include/sync_with_master_gtid.inc
+connection server_3;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
+include/sync_with_master_gtid.inc
+# Pt.1 Ensure SETVAL replicates and binlogs correctly
+connection server_1;
+SELECT SETVAL(s1, 10);
+SETVAL(s1, 10)
+10
+include/save_master_gtid.inc
+# Validate SETVAL replicated correctly to other servers
+connection server_3;
+include/sync_with_master_gtid.inc
+include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
+# Validate server_1 binlogged SETVAL with the correct columns
+connection server_1;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_2 binlogged SETVAL with the correct columns
+connection server_2;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_3 binlogged SETVAL with the correct columns
+connection server_3;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
+connection server_1;
+SELECT NEXTVAL(s1);
+NEXTVAL(s1)
+11
+include/save_master_gtid.inc
+# Validate NEXTVAL replicated correctly to other servers
+connection server_3;
+include/sync_with_master_gtid.inc
+include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
+# Validate server_1 binlogged NEXTVAL with the correct columns
+connection server_1;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_2 binlogged NEXTVAL with the correct columns
+connection server_2;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_3 binlogged NEXTVAL with the correct columns
+connection server_3;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Cleanup
+connection server_1;
+DROP TABLE s1;
+include/save_master_gtid.inc
+connection server_3;
+include/sync_with_master_gtid.inc
+### engines: InnoDB, MyISAM, InnoDB
+# Create sequences with specific engines per server
+connection server_1;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
+include/save_master_gtid.inc
+connection server_2;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
+include/sync_with_master_gtid.inc
+connection server_3;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
+include/sync_with_master_gtid.inc
+# Pt.1 Ensure SETVAL replicates and binlogs correctly
+connection server_1;
+SELECT SETVAL(s1, 10);
+SETVAL(s1, 10)
+10
+include/save_master_gtid.inc
+# Validate SETVAL replicated correctly to other servers
+connection server_3;
+include/sync_with_master_gtid.inc
+include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
+# Validate server_1 binlogged SETVAL with the correct columns
+connection server_1;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_2 binlogged SETVAL with the correct columns
+connection server_2;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_3 binlogged SETVAL with the correct columns
+connection server_3;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
+connection server_1;
+SELECT NEXTVAL(s1);
+NEXTVAL(s1)
+11
+include/save_master_gtid.inc
+# Validate NEXTVAL replicated correctly to other servers
+connection server_3;
+include/sync_with_master_gtid.inc
+include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
+# Validate server_1 binlogged NEXTVAL with the correct columns
+connection server_1;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_2 binlogged NEXTVAL with the correct columns
+connection server_2;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_3 binlogged NEXTVAL with the correct columns
+connection server_3;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Cleanup
+connection server_1;
+DROP TABLE s1;
+include/save_master_gtid.inc
+connection server_3;
+include/sync_with_master_gtid.inc
+### engines: InnoDB, InnoDB, MyISAM
+# Create sequences with specific engines per server
+connection server_1;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
+include/save_master_gtid.inc
+connection server_2;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
+include/sync_with_master_gtid.inc
+connection server_3;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
+include/sync_with_master_gtid.inc
+# Pt.1 Ensure SETVAL replicates and binlogs correctly
+connection server_1;
+SELECT SETVAL(s1, 10);
+SETVAL(s1, 10)
+10
+include/save_master_gtid.inc
+# Validate SETVAL replicated correctly to other servers
+connection server_3;
+include/sync_with_master_gtid.inc
+include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
+# Validate server_1 binlogged SETVAL with the correct columns
+connection server_1;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_2 binlogged SETVAL with the correct columns
+connection server_2;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_3 binlogged SETVAL with the correct columns
+connection server_3;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
+connection server_1;
+SELECT NEXTVAL(s1);
+NEXTVAL(s1)
+11
+include/save_master_gtid.inc
+# Validate NEXTVAL replicated correctly to other servers
+connection server_3;
+include/sync_with_master_gtid.inc
+include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
+# Validate server_1 binlogged NEXTVAL with the correct columns
+connection server_1;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_2 binlogged NEXTVAL with the correct columns
+connection server_2;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_3 binlogged NEXTVAL with the correct columns
+connection server_3;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Cleanup
+connection server_1;
+DROP TABLE s1;
+include/save_master_gtid.inc
+connection server_3;
+include/sync_with_master_gtid.inc
+### engines: InnoDB, InnoDB, InnoDB
+# Create sequences with specific engines per server
+connection server_1;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
+include/save_master_gtid.inc
+connection server_2;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
+include/sync_with_master_gtid.inc
+connection server_3;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
+include/sync_with_master_gtid.inc
+# Pt.1 Ensure SETVAL replicates and binlogs correctly
+connection server_1;
+SELECT SETVAL(s1, 10);
+SETVAL(s1, 10)
+10
+include/save_master_gtid.inc
+# Validate SETVAL replicated correctly to other servers
+connection server_3;
+include/sync_with_master_gtid.inc
+include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
+# Validate server_1 binlogged SETVAL with the correct columns
+connection server_1;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_2 binlogged SETVAL with the correct columns
+connection server_2;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_3 binlogged SETVAL with the correct columns
+connection server_3;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
+connection server_1;
+SELECT NEXTVAL(s1);
+NEXTVAL(s1)
+11
+include/save_master_gtid.inc
+# Validate NEXTVAL replicated correctly to other servers
+connection server_3;
+include/sync_with_master_gtid.inc
+include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
+# Validate server_1 binlogged NEXTVAL with the correct columns
+connection server_1;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_2 binlogged NEXTVAL with the correct columns
+connection server_2;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_3 binlogged NEXTVAL with the correct columns
+connection server_3;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Cleanup
+connection server_1;
+DROP TABLE s1;
+include/save_master_gtid.inc
+connection server_3;
+include/sync_with_master_gtid.inc
+include/rpl_end.inc
+# End of tests
diff --git a/mysql-test/suite/rpl/r/rpl_row_img_sequence_min.result b/mysql-test/suite/rpl/r/rpl_row_img_sequence_min.result
new file mode 100644
index 00000000000..eaf770f245c
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_row_img_sequence_min.result
@@ -0,0 +1,797 @@
+include/rpl_init.inc [topology=1->2->3]
+connection server_1;
+connection server_2;
+connection server_3;
+connection server_1;
+#
+# binlog_row_image=MINIMAL should write only columns 1 and 8 to the
+# binary log
+#
+CON: 'server_1', IMG: 'MINIMAL', RESTART SLAVE: 'N'
+connection server_1;
+SET SESSION binlog_row_image= 'MINIMAL';
+SET GLOBAL binlog_row_image= 'MINIMAL';
+FLUSH TABLES;
+SHOW VARIABLES LIKE 'binlog_row_image';
+Variable_name Value
+binlog_row_image MINIMAL
+CON: 'server_2', IMG: 'MINIMAL', RESTART SLAVE: 'Y'
+connection server_2;
+SET SESSION binlog_row_image= 'MINIMAL';
+SET GLOBAL binlog_row_image= 'MINIMAL';
+include/stop_slave.inc
+include/start_slave.inc
+FLUSH TABLES;
+SHOW VARIABLES LIKE 'binlog_row_image';
+Variable_name Value
+binlog_row_image MINIMAL
+CON: 'server_3', IMG: 'MINIMAL', RESTART SLAVE: 'Y'
+connection server_3;
+SET SESSION binlog_row_image= 'MINIMAL';
+SET GLOBAL binlog_row_image= 'MINIMAL';
+include/stop_slave.inc
+include/start_slave.inc
+FLUSH TABLES;
+SHOW VARIABLES LIKE 'binlog_row_image';
+Variable_name Value
+binlog_row_image MINIMAL
+connection server_1;
+### engines: MyISAM, MyISAM, MyISAM
+# Create sequences with specific engines per server
+connection server_1;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
+include/save_master_gtid.inc
+connection server_2;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
+include/sync_with_master_gtid.inc
+connection server_3;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
+include/sync_with_master_gtid.inc
+# Pt.1 Ensure SETVAL replicates and binlogs correctly
+connection server_1;
+SELECT SETVAL(s1, 10);
+SETVAL(s1, 10)
+10
+include/save_master_gtid.inc
+# Validate SETVAL replicated correctly to other servers
+connection server_3;
+include/sync_with_master_gtid.inc
+include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
+# Validate server_1 binlogged SETVAL with the correct columns
+connection server_1;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_2 binlogged SETVAL with the correct columns
+connection server_2;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_3 binlogged SETVAL with the correct columns
+connection server_3;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
+connection server_1;
+SELECT NEXTVAL(s1);
+NEXTVAL(s1)
+11
+include/save_master_gtid.inc
+# Validate NEXTVAL replicated correctly to other servers
+connection server_3;
+include/sync_with_master_gtid.inc
+include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
+# Validate server_1 binlogged NEXTVAL with the correct columns
+connection server_1;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_2 binlogged NEXTVAL with the correct columns
+connection server_2;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_3 binlogged NEXTVAL with the correct columns
+connection server_3;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Cleanup
+connection server_1;
+DROP TABLE s1;
+include/save_master_gtid.inc
+connection server_3;
+include/sync_with_master_gtid.inc
+### engines: MyISAM, MyISAM, InnoDB
+# Create sequences with specific engines per server
+connection server_1;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
+include/save_master_gtid.inc
+connection server_2;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
+include/sync_with_master_gtid.inc
+connection server_3;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
+include/sync_with_master_gtid.inc
+# Pt.1 Ensure SETVAL replicates and binlogs correctly
+connection server_1;
+SELECT SETVAL(s1, 10);
+SETVAL(s1, 10)
+10
+include/save_master_gtid.inc
+# Validate SETVAL replicated correctly to other servers
+connection server_3;
+include/sync_with_master_gtid.inc
+include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
+# Validate server_1 binlogged SETVAL with the correct columns
+connection server_1;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_2 binlogged SETVAL with the correct columns
+connection server_2;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_3 binlogged SETVAL with the correct columns
+connection server_3;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
+connection server_1;
+SELECT NEXTVAL(s1);
+NEXTVAL(s1)
+11
+include/save_master_gtid.inc
+# Validate NEXTVAL replicated correctly to other servers
+connection server_3;
+include/sync_with_master_gtid.inc
+include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
+# Validate server_1 binlogged NEXTVAL with the correct columns
+connection server_1;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_2 binlogged NEXTVAL with the correct columns
+connection server_2;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_3 binlogged NEXTVAL with the correct columns
+connection server_3;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Cleanup
+connection server_1;
+DROP TABLE s1;
+include/save_master_gtid.inc
+connection server_3;
+include/sync_with_master_gtid.inc
+### engines: MyISAM, InnoDB, MyISAM
+# Create sequences with specific engines per server
+connection server_1;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
+include/save_master_gtid.inc
+connection server_2;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
+include/sync_with_master_gtid.inc
+connection server_3;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
+include/sync_with_master_gtid.inc
+# Pt.1 Ensure SETVAL replicates and binlogs correctly
+connection server_1;
+SELECT SETVAL(s1, 10);
+SETVAL(s1, 10)
+10
+include/save_master_gtid.inc
+# Validate SETVAL replicated correctly to other servers
+connection server_3;
+include/sync_with_master_gtid.inc
+include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
+# Validate server_1 binlogged SETVAL with the correct columns
+connection server_1;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_2 binlogged SETVAL with the correct columns
+connection server_2;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_3 binlogged SETVAL with the correct columns
+connection server_3;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
+connection server_1;
+SELECT NEXTVAL(s1);
+NEXTVAL(s1)
+11
+include/save_master_gtid.inc
+# Validate NEXTVAL replicated correctly to other servers
+connection server_3;
+include/sync_with_master_gtid.inc
+include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
+# Validate server_1 binlogged NEXTVAL with the correct columns
+connection server_1;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_2 binlogged NEXTVAL with the correct columns
+connection server_2;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_3 binlogged NEXTVAL with the correct columns
+connection server_3;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Cleanup
+connection server_1;
+DROP TABLE s1;
+include/save_master_gtid.inc
+connection server_3;
+include/sync_with_master_gtid.inc
+### engines: MyISAM, InnoDB, InnoDB
+# Create sequences with specific engines per server
+connection server_1;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
+include/save_master_gtid.inc
+connection server_2;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
+include/sync_with_master_gtid.inc
+connection server_3;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
+include/sync_with_master_gtid.inc
+# Pt.1 Ensure SETVAL replicates and binlogs correctly
+connection server_1;
+SELECT SETVAL(s1, 10);
+SETVAL(s1, 10)
+10
+include/save_master_gtid.inc
+# Validate SETVAL replicated correctly to other servers
+connection server_3;
+include/sync_with_master_gtid.inc
+include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
+# Validate server_1 binlogged SETVAL with the correct columns
+connection server_1;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_2 binlogged SETVAL with the correct columns
+connection server_2;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_3 binlogged SETVAL with the correct columns
+connection server_3;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
+connection server_1;
+SELECT NEXTVAL(s1);
+NEXTVAL(s1)
+11
+include/save_master_gtid.inc
+# Validate NEXTVAL replicated correctly to other servers
+connection server_3;
+include/sync_with_master_gtid.inc
+include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
+# Validate server_1 binlogged NEXTVAL with the correct columns
+connection server_1;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_2 binlogged NEXTVAL with the correct columns
+connection server_2;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_3 binlogged NEXTVAL with the correct columns
+connection server_3;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Cleanup
+connection server_1;
+DROP TABLE s1;
+include/save_master_gtid.inc
+connection server_3;
+include/sync_with_master_gtid.inc
+### engines: InnoDB, MyISAM, MyISAM
+# Create sequences with specific engines per server
+connection server_1;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
+include/save_master_gtid.inc
+connection server_2;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
+include/sync_with_master_gtid.inc
+connection server_3;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
+include/sync_with_master_gtid.inc
+# Pt.1 Ensure SETVAL replicates and binlogs correctly
+connection server_1;
+SELECT SETVAL(s1, 10);
+SETVAL(s1, 10)
+10
+include/save_master_gtid.inc
+# Validate SETVAL replicated correctly to other servers
+connection server_3;
+include/sync_with_master_gtid.inc
+include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
+# Validate server_1 binlogged SETVAL with the correct columns
+connection server_1;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_2 binlogged SETVAL with the correct columns
+connection server_2;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_3 binlogged SETVAL with the correct columns
+connection server_3;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
+connection server_1;
+SELECT NEXTVAL(s1);
+NEXTVAL(s1)
+11
+include/save_master_gtid.inc
+# Validate NEXTVAL replicated correctly to other servers
+connection server_3;
+include/sync_with_master_gtid.inc
+include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
+# Validate server_1 binlogged NEXTVAL with the correct columns
+connection server_1;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_2 binlogged NEXTVAL with the correct columns
+connection server_2;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_3 binlogged NEXTVAL with the correct columns
+connection server_3;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Cleanup
+connection server_1;
+DROP TABLE s1;
+include/save_master_gtid.inc
+connection server_3;
+include/sync_with_master_gtid.inc
+### engines: InnoDB, MyISAM, InnoDB
+# Create sequences with specific engines per server
+connection server_1;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
+include/save_master_gtid.inc
+connection server_2;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
+include/sync_with_master_gtid.inc
+connection server_3;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
+include/sync_with_master_gtid.inc
+# Pt.1 Ensure SETVAL replicates and binlogs correctly
+connection server_1;
+SELECT SETVAL(s1, 10);
+SETVAL(s1, 10)
+10
+include/save_master_gtid.inc
+# Validate SETVAL replicated correctly to other servers
+connection server_3;
+include/sync_with_master_gtid.inc
+include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
+# Validate server_1 binlogged SETVAL with the correct columns
+connection server_1;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_2 binlogged SETVAL with the correct columns
+connection server_2;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_3 binlogged SETVAL with the correct columns
+connection server_3;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
+connection server_1;
+SELECT NEXTVAL(s1);
+NEXTVAL(s1)
+11
+include/save_master_gtid.inc
+# Validate NEXTVAL replicated correctly to other servers
+connection server_3;
+include/sync_with_master_gtid.inc
+include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
+# Validate server_1 binlogged NEXTVAL with the correct columns
+connection server_1;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_2 binlogged NEXTVAL with the correct columns
+connection server_2;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_3 binlogged NEXTVAL with the correct columns
+connection server_3;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Cleanup
+connection server_1;
+DROP TABLE s1;
+include/save_master_gtid.inc
+connection server_3;
+include/sync_with_master_gtid.inc
+### engines: InnoDB, InnoDB, MyISAM
+# Create sequences with specific engines per server
+connection server_1;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
+include/save_master_gtid.inc
+connection server_2;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
+include/sync_with_master_gtid.inc
+connection server_3;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
+include/sync_with_master_gtid.inc
+# Pt.1 Ensure SETVAL replicates and binlogs correctly
+connection server_1;
+SELECT SETVAL(s1, 10);
+SETVAL(s1, 10)
+10
+include/save_master_gtid.inc
+# Validate SETVAL replicated correctly to other servers
+connection server_3;
+include/sync_with_master_gtid.inc
+include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
+# Validate server_1 binlogged SETVAL with the correct columns
+connection server_1;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_2 binlogged SETVAL with the correct columns
+connection server_2;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_3 binlogged SETVAL with the correct columns
+connection server_3;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
+connection server_1;
+SELECT NEXTVAL(s1);
+NEXTVAL(s1)
+11
+include/save_master_gtid.inc
+# Validate NEXTVAL replicated correctly to other servers
+connection server_3;
+include/sync_with_master_gtid.inc
+include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
+# Validate server_1 binlogged NEXTVAL with the correct columns
+connection server_1;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_2 binlogged NEXTVAL with the correct columns
+connection server_2;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_3 binlogged NEXTVAL with the correct columns
+connection server_3;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Cleanup
+connection server_1;
+DROP TABLE s1;
+include/save_master_gtid.inc
+connection server_3;
+include/sync_with_master_gtid.inc
+### engines: InnoDB, InnoDB, InnoDB
+# Create sequences with specific engines per server
+connection server_1;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
+include/save_master_gtid.inc
+connection server_2;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
+include/sync_with_master_gtid.inc
+connection server_3;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
+include/sync_with_master_gtid.inc
+# Pt.1 Ensure SETVAL replicates and binlogs correctly
+connection server_1;
+SELECT SETVAL(s1, 10);
+SETVAL(s1, 10)
+10
+include/save_master_gtid.inc
+# Validate SETVAL replicated correctly to other servers
+connection server_3;
+include/sync_with_master_gtid.inc
+include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
+# Validate server_1 binlogged SETVAL with the correct columns
+connection server_1;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_2 binlogged SETVAL with the correct columns
+connection server_2;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_3 binlogged SETVAL with the correct columns
+connection server_3;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
+connection server_1;
+SELECT NEXTVAL(s1);
+NEXTVAL(s1)
+11
+include/save_master_gtid.inc
+# Validate NEXTVAL replicated correctly to other servers
+connection server_3;
+include/sync_with_master_gtid.inc
+include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
+# Validate server_1 binlogged NEXTVAL with the correct columns
+connection server_1;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_2 binlogged NEXTVAL with the correct columns
+connection server_2;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_3 binlogged NEXTVAL with the correct columns
+connection server_3;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Cleanup
+connection server_1;
+DROP TABLE s1;
+include/save_master_gtid.inc
+connection server_3;
+include/sync_with_master_gtid.inc
+CON: 'server_1', IMG: 'FULL', RESTART SLAVE: 'N'
+connection server_1;
+SET SESSION binlog_row_image= 'FULL';
+SET GLOBAL binlog_row_image= 'FULL';
+FLUSH TABLES;
+SHOW VARIABLES LIKE 'binlog_row_image';
+Variable_name Value
+binlog_row_image FULL
+CON: 'server_2', IMG: 'FULL', RESTART SLAVE: 'Y'
+connection server_2;
+SET SESSION binlog_row_image= 'FULL';
+SET GLOBAL binlog_row_image= 'FULL';
+include/stop_slave.inc
+include/start_slave.inc
+FLUSH TABLES;
+SHOW VARIABLES LIKE 'binlog_row_image';
+Variable_name Value
+binlog_row_image FULL
+CON: 'server_3', IMG: 'FULL', RESTART SLAVE: 'Y'
+connection server_3;
+SET SESSION binlog_row_image= 'FULL';
+SET GLOBAL binlog_row_image= 'FULL';
+include/stop_slave.inc
+include/start_slave.inc
+FLUSH TABLES;
+SHOW VARIABLES LIKE 'binlog_row_image';
+Variable_name Value
+binlog_row_image FULL
+connection server_3;
+include/rpl_end.inc
+# End of tests
diff --git a/mysql-test/suite/rpl/r/rpl_row_img_sequence_noblob.result b/mysql-test/suite/rpl/r/rpl_row_img_sequence_noblob.result
new file mode 100644
index 00000000000..496bd8dc6b8
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_row_img_sequence_noblob.result
@@ -0,0 +1,796 @@
+include/rpl_init.inc [topology=1->2->3]
+connection server_1;
+connection server_2;
+connection server_3;
+connection server_1;
+#
+# binlog_row_image=NOBLOB should write all columns to the binary logs
+#
+CON: 'server_1', IMG: 'NOBLOB', RESTART SLAVE: 'N'
+connection server_1;
+SET SESSION binlog_row_image= 'NOBLOB';
+SET GLOBAL binlog_row_image= 'NOBLOB';
+FLUSH TABLES;
+SHOW VARIABLES LIKE 'binlog_row_image';
+Variable_name Value
+binlog_row_image NOBLOB
+CON: 'server_2', IMG: 'NOBLOB', RESTART SLAVE: 'Y'
+connection server_2;
+SET SESSION binlog_row_image= 'NOBLOB';
+SET GLOBAL binlog_row_image= 'NOBLOB';
+include/stop_slave.inc
+include/start_slave.inc
+FLUSH TABLES;
+SHOW VARIABLES LIKE 'binlog_row_image';
+Variable_name Value
+binlog_row_image NOBLOB
+CON: 'server_3', IMG: 'NOBLOB', RESTART SLAVE: 'Y'
+connection server_3;
+SET SESSION binlog_row_image= 'NOBLOB';
+SET GLOBAL binlog_row_image= 'NOBLOB';
+include/stop_slave.inc
+include/start_slave.inc
+FLUSH TABLES;
+SHOW VARIABLES LIKE 'binlog_row_image';
+Variable_name Value
+binlog_row_image NOBLOB
+connection server_1;
+### engines: MyISAM, MyISAM, MyISAM
+# Create sequences with specific engines per server
+connection server_1;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
+include/save_master_gtid.inc
+connection server_2;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
+include/sync_with_master_gtid.inc
+connection server_3;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
+include/sync_with_master_gtid.inc
+# Pt.1 Ensure SETVAL replicates and binlogs correctly
+connection server_1;
+SELECT SETVAL(s1, 10);
+SETVAL(s1, 10)
+10
+include/save_master_gtid.inc
+# Validate SETVAL replicated correctly to other servers
+connection server_3;
+include/sync_with_master_gtid.inc
+include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
+# Validate server_1 binlogged SETVAL with the correct columns
+connection server_1;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_2 binlogged SETVAL with the correct columns
+connection server_2;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_3 binlogged SETVAL with the correct columns
+connection server_3;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
+connection server_1;
+SELECT NEXTVAL(s1);
+NEXTVAL(s1)
+11
+include/save_master_gtid.inc
+# Validate NEXTVAL replicated correctly to other servers
+connection server_3;
+include/sync_with_master_gtid.inc
+include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
+# Validate server_1 binlogged NEXTVAL with the correct columns
+connection server_1;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_2 binlogged NEXTVAL with the correct columns
+connection server_2;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_3 binlogged NEXTVAL with the correct columns
+connection server_3;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Cleanup
+connection server_1;
+DROP TABLE s1;
+include/save_master_gtid.inc
+connection server_3;
+include/sync_with_master_gtid.inc
+### engines: MyISAM, MyISAM, InnoDB
+# Create sequences with specific engines per server
+connection server_1;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
+include/save_master_gtid.inc
+connection server_2;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
+include/sync_with_master_gtid.inc
+connection server_3;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
+include/sync_with_master_gtid.inc
+# Pt.1 Ensure SETVAL replicates and binlogs correctly
+connection server_1;
+SELECT SETVAL(s1, 10);
+SETVAL(s1, 10)
+10
+include/save_master_gtid.inc
+# Validate SETVAL replicated correctly to other servers
+connection server_3;
+include/sync_with_master_gtid.inc
+include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
+# Validate server_1 binlogged SETVAL with the correct columns
+connection server_1;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_2 binlogged SETVAL with the correct columns
+connection server_2;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_3 binlogged SETVAL with the correct columns
+connection server_3;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
+connection server_1;
+SELECT NEXTVAL(s1);
+NEXTVAL(s1)
+11
+include/save_master_gtid.inc
+# Validate NEXTVAL replicated correctly to other servers
+connection server_3;
+include/sync_with_master_gtid.inc
+include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
+# Validate server_1 binlogged NEXTVAL with the correct columns
+connection server_1;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_2 binlogged NEXTVAL with the correct columns
+connection server_2;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_3 binlogged NEXTVAL with the correct columns
+connection server_3;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Cleanup
+connection server_1;
+DROP TABLE s1;
+include/save_master_gtid.inc
+connection server_3;
+include/sync_with_master_gtid.inc
+### engines: MyISAM, InnoDB, MyISAM
+# Create sequences with specific engines per server
+connection server_1;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
+include/save_master_gtid.inc
+connection server_2;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
+include/sync_with_master_gtid.inc
+connection server_3;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
+include/sync_with_master_gtid.inc
+# Pt.1 Ensure SETVAL replicates and binlogs correctly
+connection server_1;
+SELECT SETVAL(s1, 10);
+SETVAL(s1, 10)
+10
+include/save_master_gtid.inc
+# Validate SETVAL replicated correctly to other servers
+connection server_3;
+include/sync_with_master_gtid.inc
+include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
+# Validate server_1 binlogged SETVAL with the correct columns
+connection server_1;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_2 binlogged SETVAL with the correct columns
+connection server_2;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_3 binlogged SETVAL with the correct columns
+connection server_3;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
+connection server_1;
+SELECT NEXTVAL(s1);
+NEXTVAL(s1)
+11
+include/save_master_gtid.inc
+# Validate NEXTVAL replicated correctly to other servers
+connection server_3;
+include/sync_with_master_gtid.inc
+include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
+# Validate server_1 binlogged NEXTVAL with the correct columns
+connection server_1;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_2 binlogged NEXTVAL with the correct columns
+connection server_2;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_3 binlogged NEXTVAL with the correct columns
+connection server_3;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Cleanup
+connection server_1;
+DROP TABLE s1;
+include/save_master_gtid.inc
+connection server_3;
+include/sync_with_master_gtid.inc
+### engines: MyISAM, InnoDB, InnoDB
+# Create sequences with specific engines per server
+connection server_1;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
+include/save_master_gtid.inc
+connection server_2;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
+include/sync_with_master_gtid.inc
+connection server_3;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
+include/sync_with_master_gtid.inc
+# Pt.1 Ensure SETVAL replicates and binlogs correctly
+connection server_1;
+SELECT SETVAL(s1, 10);
+SETVAL(s1, 10)
+10
+include/save_master_gtid.inc
+# Validate SETVAL replicated correctly to other servers
+connection server_3;
+include/sync_with_master_gtid.inc
+include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
+# Validate server_1 binlogged SETVAL with the correct columns
+connection server_1;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_2 binlogged SETVAL with the correct columns
+connection server_2;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_3 binlogged SETVAL with the correct columns
+connection server_3;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
+connection server_1;
+SELECT NEXTVAL(s1);
+NEXTVAL(s1)
+11
+include/save_master_gtid.inc
+# Validate NEXTVAL replicated correctly to other servers
+connection server_3;
+include/sync_with_master_gtid.inc
+include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
+# Validate server_1 binlogged NEXTVAL with the correct columns
+connection server_1;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_2 binlogged NEXTVAL with the correct columns
+connection server_2;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_3 binlogged NEXTVAL with the correct columns
+connection server_3;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Cleanup
+connection server_1;
+DROP TABLE s1;
+include/save_master_gtid.inc
+connection server_3;
+include/sync_with_master_gtid.inc
+### engines: InnoDB, MyISAM, MyISAM
+# Create sequences with specific engines per server
+connection server_1;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
+include/save_master_gtid.inc
+connection server_2;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
+include/sync_with_master_gtid.inc
+connection server_3;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
+include/sync_with_master_gtid.inc
+# Pt.1 Ensure SETVAL replicates and binlogs correctly
+connection server_1;
+SELECT SETVAL(s1, 10);
+SETVAL(s1, 10)
+10
+include/save_master_gtid.inc
+# Validate SETVAL replicated correctly to other servers
+connection server_3;
+include/sync_with_master_gtid.inc
+include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
+# Validate server_1 binlogged SETVAL with the correct columns
+connection server_1;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_2 binlogged SETVAL with the correct columns
+connection server_2;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_3 binlogged SETVAL with the correct columns
+connection server_3;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
+connection server_1;
+SELECT NEXTVAL(s1);
+NEXTVAL(s1)
+11
+include/save_master_gtid.inc
+# Validate NEXTVAL replicated correctly to other servers
+connection server_3;
+include/sync_with_master_gtid.inc
+include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
+# Validate server_1 binlogged NEXTVAL with the correct columns
+connection server_1;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_2 binlogged NEXTVAL with the correct columns
+connection server_2;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_3 binlogged NEXTVAL with the correct columns
+connection server_3;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Cleanup
+connection server_1;
+DROP TABLE s1;
+include/save_master_gtid.inc
+connection server_3;
+include/sync_with_master_gtid.inc
+### engines: InnoDB, MyISAM, InnoDB
+# Create sequences with specific engines per server
+connection server_1;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
+include/save_master_gtid.inc
+connection server_2;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
+include/sync_with_master_gtid.inc
+connection server_3;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
+include/sync_with_master_gtid.inc
+# Pt.1 Ensure SETVAL replicates and binlogs correctly
+connection server_1;
+SELECT SETVAL(s1, 10);
+SETVAL(s1, 10)
+10
+include/save_master_gtid.inc
+# Validate SETVAL replicated correctly to other servers
+connection server_3;
+include/sync_with_master_gtid.inc
+include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
+# Validate server_1 binlogged SETVAL with the correct columns
+connection server_1;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_2 binlogged SETVAL with the correct columns
+connection server_2;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_3 binlogged SETVAL with the correct columns
+connection server_3;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
+connection server_1;
+SELECT NEXTVAL(s1);
+NEXTVAL(s1)
+11
+include/save_master_gtid.inc
+# Validate NEXTVAL replicated correctly to other servers
+connection server_3;
+include/sync_with_master_gtid.inc
+include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
+# Validate server_1 binlogged NEXTVAL with the correct columns
+connection server_1;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_2 binlogged NEXTVAL with the correct columns
+connection server_2;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_3 binlogged NEXTVAL with the correct columns
+connection server_3;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Cleanup
+connection server_1;
+DROP TABLE s1;
+include/save_master_gtid.inc
+connection server_3;
+include/sync_with_master_gtid.inc
+### engines: InnoDB, InnoDB, MyISAM
+# Create sequences with specific engines per server
+connection server_1;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
+include/save_master_gtid.inc
+connection server_2;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
+include/sync_with_master_gtid.inc
+connection server_3;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
+include/sync_with_master_gtid.inc
+# Pt.1 Ensure SETVAL replicates and binlogs correctly
+connection server_1;
+SELECT SETVAL(s1, 10);
+SETVAL(s1, 10)
+10
+include/save_master_gtid.inc
+# Validate SETVAL replicated correctly to other servers
+connection server_3;
+include/sync_with_master_gtid.inc
+include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
+# Validate server_1 binlogged SETVAL with the correct columns
+connection server_1;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_2 binlogged SETVAL with the correct columns
+connection server_2;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_3 binlogged SETVAL with the correct columns
+connection server_3;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
+connection server_1;
+SELECT NEXTVAL(s1);
+NEXTVAL(s1)
+11
+include/save_master_gtid.inc
+# Validate NEXTVAL replicated correctly to other servers
+connection server_3;
+include/sync_with_master_gtid.inc
+include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
+# Validate server_1 binlogged NEXTVAL with the correct columns
+connection server_1;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_2 binlogged NEXTVAL with the correct columns
+connection server_2;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_3 binlogged NEXTVAL with the correct columns
+connection server_3;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Cleanup
+connection server_1;
+DROP TABLE s1;
+include/save_master_gtid.inc
+connection server_3;
+include/sync_with_master_gtid.inc
+### engines: InnoDB, InnoDB, InnoDB
+# Create sequences with specific engines per server
+connection server_1;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
+include/save_master_gtid.inc
+connection server_2;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
+include/sync_with_master_gtid.inc
+connection server_3;
+SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
+include/sync_with_master_gtid.inc
+# Pt.1 Ensure SETVAL replicates and binlogs correctly
+connection server_1;
+SELECT SETVAL(s1, 10);
+SETVAL(s1, 10)
+10
+include/save_master_gtid.inc
+# Validate SETVAL replicated correctly to other servers
+connection server_3;
+include/sync_with_master_gtid.inc
+include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
+# Validate server_1 binlogged SETVAL with the correct columns
+connection server_1;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_2 binlogged SETVAL with the correct columns
+connection server_2;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_3 binlogged SETVAL with the correct columns
+connection server_3;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
+connection server_1;
+SELECT NEXTVAL(s1);
+NEXTVAL(s1)
+11
+include/save_master_gtid.inc
+# Validate NEXTVAL replicated correctly to other servers
+connection server_3;
+include/sync_with_master_gtid.inc
+include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
+# Validate server_1 binlogged NEXTVAL with the correct columns
+connection server_1;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_2 binlogged NEXTVAL with the correct columns
+connection server_2;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Validate server_3 binlogged NEXTVAL with the correct columns
+connection server_3;
+FLUSH LOGS;
+include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
+# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
+# Verifying all expected column ids appear in binlog event output..
+# ..success
+# Verifying only expected column ids appear in binlog event output..
+# ..success
+# Cleanup
+connection server_1;
+DROP TABLE s1;
+include/save_master_gtid.inc
+connection server_3;
+include/sync_with_master_gtid.inc
+CON: 'server_1', IMG: 'FULL', RESTART SLAVE: 'N'
+connection server_1;
+SET SESSION binlog_row_image= 'FULL';
+SET GLOBAL binlog_row_image= 'FULL';
+FLUSH TABLES;
+SHOW VARIABLES LIKE 'binlog_row_image';
+Variable_name Value
+binlog_row_image FULL
+CON: 'server_2', IMG: 'FULL', RESTART SLAVE: 'Y'
+connection server_2;
+SET SESSION binlog_row_image= 'FULL';
+SET GLOBAL binlog_row_image= 'FULL';
+include/stop_slave.inc
+include/start_slave.inc
+FLUSH TABLES;
+SHOW VARIABLES LIKE 'binlog_row_image';
+Variable_name Value
+binlog_row_image FULL
+CON: 'server_3', IMG: 'FULL', RESTART SLAVE: 'Y'
+connection server_3;
+SET SESSION binlog_row_image= 'FULL';
+SET GLOBAL binlog_row_image= 'FULL';
+include/stop_slave.inc
+include/start_slave.inc
+FLUSH TABLES;
+SHOW VARIABLES LIKE 'binlog_row_image';
+Variable_name Value
+binlog_row_image FULL
+connection server_3;
+include/rpl_end.inc
+# End of tests
diff --git a/mysql-test/suite/rpl/r/rpl_sp.result b/mysql-test/suite/rpl/r/rpl_sp.result
index 5216a3b0a44..a4e8e6e6a38 100644
--- a/mysql-test/suite/rpl/r/rpl_sp.result
+++ b/mysql-test/suite/rpl/r/rpl_sp.result
@@ -305,7 +305,7 @@ a
100
connection con1;
create trigger trg before insert on t1 for each row set new.a= 10;
-ERROR 42000: TRIGGER command denied to user 'zedjzlcsjhd'@'localhost' for table 't1'
+ERROR 42000: TRIGGER command denied to user 'zedjzlcsjhd'@'localhost' for table `mysqltest1`.`t1`
connection master;
delete from t1;
create trigger trg before insert on t1 for each row set new.a= 10;
diff --git a/mysql-test/suite/rpl/t/rpl_gtid_stop_start.test b/mysql-test/suite/rpl/t/rpl_gtid_stop_start.test
index 4202aa82516..75f9b5e479a 100644
--- a/mysql-test/suite/rpl/t/rpl_gtid_stop_start.test
+++ b/mysql-test/suite/rpl/t/rpl_gtid_stop_start.test
@@ -1,6 +1,7 @@
--let $rpl_topology=1->2
--source include/rpl_init.inc
--source include/have_innodb.inc
+--source include/no_valgrind_without_big.inc
--echo *** Test normal shutdown/restart of slave server configured as a GTID slave. ***
diff --git a/mysql-test/suite/rpl/t/rpl_mdev12179.test b/mysql-test/suite/rpl/t/rpl_mdev12179.test
index a0241784c85..f89f87abe28 100644
--- a/mysql-test/suite/rpl/t/rpl_mdev12179.test
+++ b/mysql-test/suite/rpl/t/rpl_mdev12179.test
@@ -1,6 +1,7 @@
--source include/have_innodb.inc
--let $rpl_topology=1->2
--source include/rpl_init.inc
+--source include/no_valgrind_without_big.inc
--connection server_2
call mtr.add_suppression("The automatically created table.*name may not be entirely in lowercase");
diff --git a/mysql-test/suite/rpl/t/rpl_row_img_sequence.cnf b/mysql-test/suite/rpl/t/rpl_row_img_sequence_full.cnf
index 7104b4e4502..7104b4e4502 100644
--- a/mysql-test/suite/rpl/t/rpl_row_img_sequence.cnf
+++ b/mysql-test/suite/rpl/t/rpl_row_img_sequence_full.cnf
diff --git a/mysql-test/suite/rpl/t/rpl_row_img_sequence_full.test b/mysql-test/suite/rpl/t/rpl_row_img_sequence_full.test
new file mode 100644
index 00000000000..a0c6aa4dc7a
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_row_img_sequence_full.test
@@ -0,0 +1,48 @@
+#
+# Purpose:
+# The rpl_row_img_sequence group of tests verify that sequence MDL updates,
+# i.e. NEXTVAL and SETVAL, respect the binlog_row_image variable value when
+# written into the binary log. In particular, it ensures that only changed
+# columns are written with MINIMAL image mode, and all columns are written
+# otherwise. This test focuses on validating the behavior of
+# binlog_row_img=FULL.
+#
+# Methodology
+# After issuing a sequence update, ensure that both 1) it was replicated
+# correctly, and 2) it was binlogged respective to the binlog_row_image value.
+# The sequence table does not use caching to ensure each update is immediately
+# binlogged. Each command is binlogged into its own unique log file, and the
+# entirety of the file is analyzed for correctness of its sequence event.
+# Specifically, mysqlbinlog is used in verbose mode so it outputs the columns
+# which belong to the event, and the columns are analyzed to ensure the correct
+# ones were logged. rpl_row_img_general_loop.inc is used to test with multiple
+# chained replicas, varying engines between InnoDB and MyISAM.
+#
+# References:
+# MDEV-28487: sequences not respect value of binlog_row_image with select
+# nextval(seq_gen)
+#
+
+--let $rpl_topology= 1->2->3
+--source include/rpl_init.inc
+--source include/have_binlog_format_row.inc
+
+--connection server_1
+--source include/have_innodb.inc
+--connection server_2
+--source include/have_innodb.inc
+--connection server_3
+--source include/have_innodb.inc
+--connection server_1
+
+--echo #
+--echo # binlog_row_image=FULL should write all columns to the binary log
+--echo #
+--let $row_img_set=server_1:FULL:N,server_2:FULL:Y,server_3:FULL:Y
+--source include/rpl_row_img_set.inc
+--let $expected_columns=(1,2,3,4,5,6,7,8)
+--let row_img_test_script= include/rpl_row_img_sequence.inc
+--source include/rpl_row_img_general_loop.inc
+
+--source include/rpl_end.inc
+--echo # End of tests
diff --git a/mysql-test/suite/rpl/t/rpl_row_img_sequence_min.cnf b/mysql-test/suite/rpl/t/rpl_row_img_sequence_min.cnf
new file mode 100644
index 00000000000..7104b4e4502
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_row_img_sequence_min.cnf
@@ -0,0 +1,21 @@
+!include include/default_mysqld.cnf
+
+[mysqld.1]
+log-slave-updates
+innodb
+gtid_domain_id=0
+
+[mysqld.2]
+log-slave-updates
+innodb
+gtid_domain_id=1
+
+[mysqld.3]
+log-slave-updates
+innodb
+gtid_domain_id=2
+
+[ENV]
+SERVER_MYPORT_1= @mysqld.1.port
+SERVER_MYPORT_2= @mysqld.2.port
+SERVER_MYPORT_3= @mysqld.3.port
diff --git a/mysql-test/suite/rpl/t/rpl_row_img_sequence.test b/mysql-test/suite/rpl/t/rpl_row_img_sequence_min.test
index 23860fb2de5..0a3b2827ffa 100644
--- a/mysql-test/suite/rpl/t/rpl_row_img_sequence.test
+++ b/mysql-test/suite/rpl/t/rpl_row_img_sequence_min.test
@@ -1,9 +1,11 @@
#
# Purpose:
-# This test verifies that sequence DML updates, i.e. NEXTVAL and SETVAL,
-# respect the binlog_row_image variable value when written into the binary log.
-# In particular, it ensures that only changed columns are written with MINIMAL
-# image mode, and all columns are written otherwise.
+# The rpl_row_img_sequence group of tests verify that sequence MDL updates,
+# i.e. NEXTVAL and SETVAL, respect the binlog_row_image variable value when
+# written into the binary log. In particular, it ensures that only changed
+# columns are written with MINIMAL image mode, and all columns are written
+# otherwise. This test focuses on validating the behavior of
+# binlog_row_img=MINIMAL.
#
# Methodology
# After issuing a sequence update, ensure that both 1) it was replicated
@@ -34,8 +36,8 @@
--connection server_1
--echo #
---echo # Test Case 1) binlog_row_image=MINIMAL should write only columns
---echo # 1 and 8 to the binary log
+--echo # binlog_row_image=MINIMAL should write only columns 1 and 8 to the
+--echo # binary log
--echo #
--let $row_img_set=server_1:MINIMAL:N,server_2:MINIMAL:Y,server_3:MINIMAL:Y
--source include/rpl_row_img_set.inc
@@ -43,23 +45,8 @@
--let row_img_test_script= include/rpl_row_img_sequence.inc
--source include/rpl_row_img_general_loop.inc
---echo #
---echo # Test Case 2) binlog_row_image=NOBLOB should write all columns to the
---echo # binary log
---echo #
---let $row_img_set=server_1:NOBLOB:N,server_2:NOBLOB:Y,server_3:NOBLOB:Y
---source include/rpl_row_img_set.inc
---let $expected_columns=(1,2,3,4,5,6,7,8)
---source include/rpl_row_img_general_loop.inc
-
---echo #
---echo # Test Case 3) binlog_row_image=NOBLOB should write all columns to the
---echo # binary log
---echo #
--let $row_img_set=server_1:FULL:N,server_2:FULL:Y,server_3:FULL:Y
--source include/rpl_row_img_set.inc
---let $expected_columns=(1,2,3,4,5,6,7,8)
---source include/rpl_row_img_general_loop.inc
--source include/rpl_end.inc
--echo # End of tests
diff --git a/mysql-test/suite/rpl/t/rpl_row_img_sequence_noblob.cnf b/mysql-test/suite/rpl/t/rpl_row_img_sequence_noblob.cnf
new file mode 100644
index 00000000000..7104b4e4502
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_row_img_sequence_noblob.cnf
@@ -0,0 +1,21 @@
+!include include/default_mysqld.cnf
+
+[mysqld.1]
+log-slave-updates
+innodb
+gtid_domain_id=0
+
+[mysqld.2]
+log-slave-updates
+innodb
+gtid_domain_id=1
+
+[mysqld.3]
+log-slave-updates
+innodb
+gtid_domain_id=2
+
+[ENV]
+SERVER_MYPORT_1= @mysqld.1.port
+SERVER_MYPORT_2= @mysqld.2.port
+SERVER_MYPORT_3= @mysqld.3.port
diff --git a/mysql-test/suite/rpl/t/rpl_row_img_sequence_noblob.test b/mysql-test/suite/rpl/t/rpl_row_img_sequence_noblob.test
new file mode 100644
index 00000000000..38ff469f22f
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_row_img_sequence_noblob.test
@@ -0,0 +1,51 @@
+#
+# Purpose:
+# The rpl_row_img_sequence group of tests verify that sequence MDL updates,
+# i.e. NEXTVAL and SETVAL, respect the binlog_row_image variable value when
+# written into the binary log. In particular, it ensures that only changed
+# columns are written with MINIMAL image mode, and all columns are written
+# otherwise. This test focuses on validating the behavior of
+# binlog_row_img=NOBLOB.
+#
+# Methodology
+# After issuing a sequence update, ensure that both 1) it was replicated
+# correctly, and 2) it was binlogged respective to the binlog_row_image value.
+# The sequence table does not use caching to ensure each update is immediately
+# binlogged. Each command is binlogged into its own unique log file, and the
+# entirety of the file is analyzed for correctness of its sequence event.
+# Specifically, mysqlbinlog is used in verbose mode so it outputs the columns
+# which belong to the event, and the columns are analyzed to ensure the correct
+# ones were logged. rpl_row_img_general_loop.inc is used to test with multiple
+# chained replicas, varying engines between InnoDB and MyISAM.
+#
+# References:
+# MDEV-28487: sequences not respect value of binlog_row_image with select
+# nextval(seq_gen)
+#
+
+--let $rpl_topology= 1->2->3
+--source include/rpl_init.inc
+--source include/have_binlog_format_row.inc
+
+--connection server_1
+--source include/have_innodb.inc
+--connection server_2
+--source include/have_innodb.inc
+--connection server_3
+--source include/have_innodb.inc
+--connection server_1
+
+--echo #
+--echo # binlog_row_image=NOBLOB should write all columns to the binary logs
+--echo #
+--let $row_img_set=server_1:NOBLOB:N,server_2:NOBLOB:Y,server_3:NOBLOB:Y
+--source include/rpl_row_img_set.inc
+--let $expected_columns=(1,2,3,4,5,6,7,8)
+--let row_img_test_script= include/rpl_row_img_sequence.inc
+--source include/rpl_row_img_general_loop.inc
+
+--let $row_img_set=server_1:FULL:N,server_2:FULL:Y,server_3:FULL:Y
+--source include/rpl_row_img_set.inc
+
+--source include/rpl_end.inc
+--echo # End of tests
diff --git a/mysql-test/suite/sql_sequence/alter_notembedded.result b/mysql-test/suite/sql_sequence/alter_notembedded.result
index 25b33dd742b..f3e1f5f18cd 100644
--- a/mysql-test/suite/sql_sequence/alter_notembedded.result
+++ b/mysql-test/suite/sql_sequence/alter_notembedded.result
@@ -9,12 +9,12 @@ select * from s1;
next_not_cached_value minimum_value maximum_value start_value increment cache_size cycle_option cycle_count
1 1 9223372036854775806 1 1 1000 0 0
select nextval(s1);
-ERROR 42000: INSERT command denied to user 'normal_1'@'localhost' for table 's1'
+ERROR 42000: INSERT command denied to user 'normal_1'@'localhost' for table `s_db`.`s1`
show create sequence s1;
Table Create Table
s1 CREATE SEQUENCE `s1` start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 1 cache 1000 nocycle ENGINE=MyISAM
alter sequence s1 restart 50;
-ERROR 42000: ALTER command denied to user 'normal_1'@'localhost' for table 's1'
+ERROR 42000: ALTER command denied to user 'normal_1'@'localhost' for table `s_db`.`s1`
connection default;
grant insert on s_db.s1 to normal_1@'%';
connection m_normal_1;
@@ -22,7 +22,7 @@ select nextval(s1);
nextval(s1)
1
alter sequence s1 restart 50;
-ERROR 42000: ALTER command denied to user 'normal_1'@'localhost' for table 's1'
+ERROR 42000: ALTER command denied to user 'normal_1'@'localhost' for table `s_db`.`s1`
connection default;
grant alter on s_db.s1 to normal_1@'%';
connection m_normal_1;
@@ -31,7 +31,7 @@ select nextval(s1);
nextval(s1)
50
drop sequence s1;
-ERROR 42000: DROP command denied to user 'normal_1'@'localhost' for table 's1'
+ERROR 42000: DROP command denied to user 'normal_1'@'localhost' for table `s_db`.`s1`
connection default;
disconnect m_normal_1;
drop database s_db;
diff --git a/mysql-test/suite/sql_sequence/grant.result b/mysql-test/suite/sql_sequence/grant.result
index 7085d548588..0a69d69fc74 100644
--- a/mysql-test/suite/sql_sequence/grant.result
+++ b/mysql-test/suite/sql_sequence/grant.result
@@ -22,9 +22,9 @@ next_not_cached_value minimum_value maximum_value start_value increment cache_si
11 1 9223372036854775806 1 1 1000 0 0
connection read_only;
select next value for s1;
-ERROR 42000: INSERT command denied to user 'read_only'@'localhost' for table 's1'
+ERROR 42000: INSERT command denied to user 'read_only'@'localhost' for table `mysqltest_1`.`s1`
alter sequence s1 restart= 11;
-ERROR 42000: ALTER command denied to user 'read_only'@'localhost' for table 's1'
+ERROR 42000: ALTER command denied to user 'read_only'@'localhost' for table `mysqltest_1`.`s1`
select * from s1;
next_not_cached_value minimum_value maximum_value start_value increment cache_size cycle_option cycle_count
11 1 9223372036854775806 1 1 1000 0 0
@@ -33,7 +33,7 @@ select next value for s1;
next value for s1
11
alter sequence s1 restart= 11;
-ERROR 42000: ALTER command denied to user 'read_write'@'localhost' for table 's1'
+ERROR 42000: ALTER command denied to user 'read_write'@'localhost' for table `mysqltest_1`.`s1`
select * from s1;
next_not_cached_value minimum_value maximum_value start_value increment cache_size cycle_option cycle_count
1011 1 9223372036854775806 1 1 1000 0 0
@@ -47,10 +47,10 @@ next_not_cached_value minimum_value maximum_value start_value increment cache_si
11 1 9223372036854775806 1 1 1000 0 0
connection only_alter;
select next value for s1;
-ERROR 42000: INSERT command denied to user 'only_alter'@'localhost' for table 's1'
+ERROR 42000: INSERT command denied to user 'only_alter'@'localhost' for table `mysqltest_1`.`s1`
alter sequence s1 restart= 11;
select * from s1;
-ERROR 42000: SELECT command denied to user 'only_alter'@'localhost' for table 's1'
+ERROR 42000: SELECT command denied to user 'only_alter'@'localhost' for table `mysqltest_1`.`s1`
connection default;
drop database mysqltest_1;
drop user 'normal'@'%';
diff --git a/mysql-test/suite/sql_sequence/gtid.result b/mysql-test/suite/sql_sequence/gtid.result
index 8ca9a397354..df78f743ead 100644
--- a/mysql-test/suite/sql_sequence/gtid.result
+++ b/mysql-test/suite/sql_sequence/gtid.result
@@ -174,9 +174,9 @@ create sequence s_db.s2;
drop sequence s_db.s2;
connection m_normal_2;
select next value for s_db.s1;
-ERROR 42000: INSERT command denied to user 'normal_2'@'localhost' for table 's1'
+ERROR 42000: INSERT command denied to user 'normal_2'@'localhost' for table `s_db`.`s1`
create sequence s_db.s2;
-ERROR 42000: CREATE command denied to user 'normal_2'@'localhost' for table 's2'
+ERROR 42000: CREATE command denied to user 'normal_2'@'localhost' for table `s_db`.`s2`
connection m_normal_1;
drop sequence s_db.s1;
###########################################
@@ -796,11 +796,11 @@ select previous value for s1;
previous value for s1
NULL
insert into t1 values (2);
-ERROR 42000: INSERT command denied to user 'normal_5'@'localhost' for table 't1'
+ERROR 42000: INSERT command denied to user 'normal_5'@'localhost' for table `test`.`t1`
select next value for s1;
-ERROR 42000: INSERT command denied to user 'normal_5'@'localhost' for table 's1'
+ERROR 42000: INSERT command denied to user 'normal_5'@'localhost' for table `test`.`s1`
do setval(s1,1000,0);
-ERROR 42000: INSERT command denied to user 'normal_5'@'localhost' for table 's1'
+ERROR 42000: INSERT command denied to user 'normal_5'@'localhost' for table `test`.`s1`
connection master;
grant insert on test.* to normal_5@'%' identified by 'pass';
disconnect m_normal_3;
diff --git a/mysql-test/suite/sql_sequence/replication.result b/mysql-test/suite/sql_sequence/replication.result
index 7bf0eac8c47..e734844e89f 100644
--- a/mysql-test/suite/sql_sequence/replication.result
+++ b/mysql-test/suite/sql_sequence/replication.result
@@ -285,9 +285,9 @@ create sequence s_db.s2;
drop sequence s_db.s2;
connection m_normal_2;
select NEXT VALUE for s_db.s1;
-ERROR 42000: INSERT command denied to user 'normal_2'@'localhost' for table 's1'
+ERROR 42000: INSERT command denied to user 'normal_2'@'localhost' for table `s_db`.`s1`
create sequence s_db.s2;
-ERROR 42000: CREATE command denied to user 'normal_2'@'localhost' for table 's2'
+ERROR 42000: CREATE command denied to user 'normal_2'@'localhost' for table `s_db`.`s2`
connection m_normal_1;
drop sequence s_db.s1;
###########################################
diff --git a/mysql-test/suite/sys_vars/r/wsrep_on_without_provider.result b/mysql-test/suite/sys_vars/r/wsrep_on_without_provider.result
new file mode 100644
index 00000000000..525619dba29
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/wsrep_on_without_provider.result
@@ -0,0 +1,5 @@
+SET GLOBAL wsrep_on=ON;
+ERROR HY000: WSREP (galera) can't be enabled if the wsrep_provider is unset or set to 'none'
+SELECT @@global.wsrep_on;
+@@global.wsrep_on
+0
diff --git a/mysql-test/suite/sys_vars/t/innodb_buffer_pool_dump_at_shutdown_basic.test b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_dump_at_shutdown_basic.test
index feb7bf05638..072d1cec1a4 100644
--- a/mysql-test/suite/sys_vars/t/innodb_buffer_pool_dump_at_shutdown_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_dump_at_shutdown_basic.test
@@ -5,6 +5,7 @@
-- source include/have_innodb.inc
# include/restart_mysqld.inc does not work in embedded mode
-- source include/not_embedded.inc
+-- source include/no_valgrind_without_big.inc
# Check the default value
SET @orig = @@global.innodb_buffer_pool_dump_at_shutdown;
diff --git a/mysql-test/suite/sys_vars/t/innodb_flush_method_func.test b/mysql-test/suite/sys_vars/t/innodb_flush_method_func.test
index aad91d0f4a3..7293a99db41 100644
--- a/mysql-test/suite/sys_vars/t/innodb_flush_method_func.test
+++ b/mysql-test/suite/sys_vars/t/innodb_flush_method_func.test
@@ -1,6 +1,8 @@
--source include/have_innodb.inc
# Embedded server tests do not support restarting.
--source include/not_embedded.inc
+# InnoDB: Cannot read first page of './ibdata1' I/O error
+--source include/not_valgrind.inc
call mtr.add_suppression("InnoDB: Failed to set .*DIRECT");
--replace_result unbuffered fsync
diff --git a/mysql-test/suite/sys_vars/t/wsrep_on_basic.test b/mysql-test/suite/sys_vars/t/wsrep_on_basic.test
deleted file mode 100644
index 229d771b5e7..00000000000
--- a/mysql-test/suite/sys_vars/t/wsrep_on_basic.test
+++ /dev/null
@@ -1,45 +0,0 @@
---source include/have_wsrep.inc
-
---echo #
---echo # wsrep_on
---echo #
-
---echo # save the initial values
-SET @wsrep_on_global_saved = @@global.wsrep_on;
-SET @wsrep_on_session_saved = @@session.wsrep_on;
-
---echo # default
-SELECT @@global.wsrep_on;
-SELECT @@session.wsrep_on;
-
---echo
---echo # scope and valid values
-SET @@global.wsrep_on=OFF;
-SELECT @@global.wsrep_on;
-SET @@global.wsrep_on=ON;
-SELECT @@global.wsrep_on;
-
-SET @@session.wsrep_on=OFF;
-SELECT @@session.wsrep_on;
-SET @@session.wsrep_on=ON;
-SELECT @@session.wsrep_on;
-SET @@session.wsrep_on=default;
-SELECT @@session.wsrep_on;
-
---echo
---echo # invalid values
---error ER_WRONG_VALUE_FOR_VAR
-SET @@global.wsrep_on=NULL;
---error ER_WRONG_VALUE_FOR_VAR
-SET @@global.wsrep_on='junk';
---error ER_WRONG_VALUE_FOR_VAR
-SET @@session.wsrep_on=NULL;
---error ER_WRONG_VALUE_FOR_VAR
-SET @@session.wsrep_on='junk';
-
---echo
---echo # restore the initial values
-SET @@global.wsrep_on = @wsrep_on_global_saved;
-SET @@session.wsrep_on = @wsrep_on_session_saved;
-
---echo # End of test
diff --git a/mysql-test/suite/sys_vars/t/wsrep_on_without_provider.test b/mysql-test/suite/sys_vars/t/wsrep_on_without_provider.test
new file mode 100644
index 00000000000..5bee3c9a356
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/wsrep_on_without_provider.test
@@ -0,0 +1,9 @@
+--source include/not_embedded.inc
+
+#
+# @@global.wsrep_on is not allowed if there
+# is no wsrep_provider
+#
+--error ER_WRONG_ARGUMENTS
+SET GLOBAL wsrep_on=ON;
+SELECT @@global.wsrep_on; \ No newline at end of file
diff --git a/mysql-test/suite/versioning/r/not_embedded.result b/mysql-test/suite/versioning/r/not_embedded.result
index f17ab18349c..b8972a48370 100644
--- a/mysql-test/suite/versioning/r/not_embedded.result
+++ b/mysql-test/suite/versioning/r/not_embedded.result
@@ -47,7 +47,7 @@ show grants;
Grants for mysqltest_1@localhost
GRANT USAGE ON *.* TO `mysqltest_1`@`localhost`
delete history from mysqltest.t before system_time now();
-ERROR 42000: DELETE HISTORY command denied to user 'mysqltest_1'@'localhost' for table 't'
+ERROR 42000: DELETE HISTORY command denied to user 'mysqltest_1'@'localhost' for table `mysqltest`.`t`
connection root;
grant delete history on mysqltest.* to mysqltest_1@localhost;
grant delete history on mysqltest.t to mysqltest_1@localhost;
diff --git a/plugin/wsrep_info/mysql-test/wsrep_info/suite.pm b/plugin/wsrep_info/mysql-test/wsrep_info/suite.pm
index 9170a337bf4..aed698ed6b4 100644
--- a/plugin/wsrep_info/mysql-test/wsrep_info/suite.pm
+++ b/plugin/wsrep_info/mysql-test/wsrep_info/suite.pm
@@ -28,6 +28,4 @@ push @::global_suppressions,
qr|WSREP: access file\(.*gvwstate.dat\) failed\(No such file or directory\)|,
);
-sub is_default { 1 }
-
bless { };
diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt
index 58964fc0f80..d7ec42d6abb 100644
--- a/sql/CMakeLists.txt
+++ b/sql/CMakeLists.txt
@@ -1,5 +1,5 @@
# Copyright (c) 2006, 2014, Oracle and/or its affiliates.
-# Copyright (c) 2010, 2018, MariaDB Corporation
+# Copyright (c) 2010, 2022, MariaDB Corporation.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -145,7 +145,14 @@ SET (SQL_SOURCE
${CMAKE_CURRENT_BINARY_DIR}/lex_token.h
${MYSYS_LIBWRAP_SOURCE}
)
-
+
+IF(CMAKE_C_COMPILER_ID MATCHES "Clang" AND
+ NOT CMAKE_C_COMPILER_VERSION VERSION_LESS "13.0.0")
+ ADD_COMPILE_FLAGS(${CMAKE_CURRENT_BINARY_DIR}/sql_yacc.cc
+ ${CMAKE_CURRENT_BINARY_DIR}/sql_yacc_ora.cc
+ COMPILE_FLAGS "-Wno-unused-but-set-variable")
+ENDIF()
+
IF (CMAKE_SYSTEM_NAME MATCHES "Linux" OR
CMAKE_SYSTEM_NAME MATCHES "Windows" OR
CMAKE_SYSTEM_NAME MATCHES "SunOS" OR
diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc
index 0a8cf3b9532..1b265d7e05f 100644
--- a/sql/ha_partition.cc
+++ b/sql/ha_partition.cc
@@ -3637,7 +3637,22 @@ int ha_partition::open(const char *name, int mode, uint test_if_locked)
for (i= 0; i < m_tot_parts; i++)
{
if (!bitmap_is_set(&m_is_clone_of->m_opened_partitions, i))
+ {
+ /* Here we should just create the handler instance, not open it. */
+ if (!(m_file[i]= get_new_handler(table->s, m_clone_mem_root,
+ file[i]->ht)))
+ {
+ error= HA_ERR_INITIALIZATION;
+ file= &m_file[i];
+ goto err_handler;
+ }
+ if (m_file[i]->set_ha_share_ref(file[i]->ha_share))
+ {
+ error= HA_ERR_INITIALIZATION;
+ goto err_handler;
+ }
continue;
+ }
if (unlikely((error= create_partition_name(name_buff, sizeof(name_buff),
name, name_buffer_ptr,
diff --git a/sql/item.h b/sql/item.h
index b16456372d4..f28e4fb4bd7 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -1758,7 +1758,6 @@ public:
virtual bool enumerate_field_refs_processor(void *arg) { return 0; }
virtual bool mark_as_eliminated_processor(void *arg) { return 0; }
virtual bool eliminate_subselect_processor(void *arg) { return 0; }
- virtual bool set_fake_select_as_master_processor(void *arg) { return 0; }
virtual bool view_used_tables_processor(void *arg) { return 0; }
virtual bool eval_not_null_tables(void *arg) { return 0; }
virtual bool is_subquery_processor(void *arg) { return 0; }
diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc
index ee36ee2fae9..6472bb86a37 100644
--- a/sql/item_subselect.cc
+++ b/sql/item_subselect.cc
@@ -386,50 +386,6 @@ bool Item_subselect::eliminate_subselect_processor(void *arg)
}
-/**
- Adjust the master select of the subquery to be the fake_select which
- represents the whole UNION right above the subquery, instead of the
- last query of the UNION.
-
- @param arg pointer to the fake select
-
- @return
- FALSE to force the evaluation of the processor for the subsequent items.
-*/
-
-bool Item_subselect::set_fake_select_as_master_processor(void *arg)
-{
- SELECT_LEX *fake_select= (SELECT_LEX*) arg;
- /*
- Move the st_select_lex_unit of a subquery from a global ORDER BY clause to
- become a direct child of the fake_select of a UNION. In this way the
- ORDER BY that is applied to the temporary table that contains the result of
- the whole UNION, and all columns in the subquery are resolved against this
- table. The transformation is applied only for immediate child subqueries of
- a UNION query.
- */
- if (unit->outer_select()->master_unit()->fake_select_lex == fake_select)
- {
- /*
- Set the master of the subquery to be the fake select (i.e. the whole
- UNION), instead of the last query in the UNION.
- */
- fake_select->add_slave(unit);
- DBUG_ASSERT(unit->outer_select() == fake_select);
- /* Adjust the name resolution context hierarchy accordingly. */
- for (SELECT_LEX *sl= unit->first_select(); sl; sl= sl->next_select())
- sl->context.outer_context= &(fake_select->context);
- /*
- Undo Item_subselect::eliminate_subselect_processor because at that phase
- we don't know yet that the ORDER clause will be moved to the fake select.
- */
- unit->item= this;
- eliminated= FALSE;
- }
- return FALSE;
-}
-
-
bool Item_subselect::mark_as_dependent(THD *thd, st_select_lex *select,
Item *item)
{
diff --git a/sql/item_subselect.h b/sql/item_subselect.h
index 16c683b27e0..b95a02d28b2 100644
--- a/sql/item_subselect.h
+++ b/sql/item_subselect.h
@@ -238,7 +238,6 @@ public:
bool walk(Item_processor processor, bool walk_subquery, void *arg);
bool mark_as_eliminated_processor(void *arg);
bool eliminate_subselect_processor(void *arg);
- bool set_fake_select_as_master_processor(void *arg);
bool enumerate_field_refs_processor(void *arg);
bool check_vcol_func_processor(void *arg)
{
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 6e68876537f..8c70a0d3145 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -4303,14 +4303,24 @@ static int init_common_variables()
if (ignore_db_dirs_init())
exit(1);
-#ifdef _WIN32
- get_win_tzname(system_time_zone, sizeof(system_time_zone));
-#elif defined(HAVE_TZNAME)
struct tm tm_tmp;
- localtime_r(&server_start_time,&tm_tmp);
- const char *tz_name= tzname[tm_tmp.tm_isdst != 0 ? 1 : 0];
- strmake_buf(system_time_zone, tz_name);
-#endif /* HAVE_TZNAME */
+ localtime_r(&server_start_time, &tm_tmp);
+
+#ifdef HAVE_TZNAME
+#ifdef _WIN32
+ /*
+ If env.variable TZ is set, derive timezone name from it.
+ Otherwise, use IANA tz name from get_win_tzname.
+ */
+ if (!getenv("TZ"))
+ get_win_tzname(system_time_zone, sizeof(system_time_zone));
+ else
+#endif
+ {
+ const char *tz_name= tzname[tm_tmp.tm_isdst != 0 ? 1 : 0];
+ strmake_buf(system_time_zone, tz_name);
+ }
+#endif
/*
We set SYSTEM time zone as reasonable default and
diff --git a/sql/parse_file.cc b/sql/parse_file.cc
index 59b4027a352..18fffb2445d 100644
--- a/sql/parse_file.cc
+++ b/sql/parse_file.cc
@@ -173,11 +173,12 @@ write_parameter(IO_CACHE *file, const uchar* base, File_option *parameter)
{
/* string have to be allocated already */
LEX_STRING *val_s= (LEX_STRING *)(base + parameter->offset);
- time_t tm= my_time(0);
-
- get_date(val_s->str, GETDATE_DATE_TIME|GETDATE_GMT|GETDATE_FIXEDLENGTH,
- tm);
- val_s->length= PARSE_FILE_TIMESTAMPLENGTH;
+ // number of microseconds since Epoch, timezone-independent
+ my_hrtime_t tm= my_hrtime();
+ // Paded to 19 characters for compatibility
+ val_s->length= snprintf(val_s->str, MICROSECOND_TIMESTAMP_BUFFER_SIZE,
+ "%019lld", tm.val);
+ DBUG_ASSERT(val_s->length == MICROSECOND_TIMESTAMP_BUFFER_SIZE-1);
if (my_b_write(file, (const uchar *)val_s->str,
PARSE_FILE_TIMESTAMPLENGTH))
DBUG_RETURN(TRUE);
@@ -833,16 +834,16 @@ File_parser::parse(uchar* base, MEM_ROOT *mem_root,
{
/* string have to be allocated already */
LEX_STRING *val= (LEX_STRING *)(base + parameter->offset);
- /* yyyy-mm-dd HH:MM:SS = 19(PARSE_FILE_TIMESTAMPLENGTH) characters */
- if (ptr[PARSE_FILE_TIMESTAMPLENGTH] != '\n')
+ /* 19 characters of timestamp */
+ if (ptr[MICROSECOND_TIMESTAMP_BUFFER_SIZE-1] != '\n')
{
my_error(ER_FPARSER_ERROR_IN_PARAMETER, MYF(0),
parameter->name.str, line);
DBUG_RETURN(TRUE);
}
- memcpy(val->str, ptr, PARSE_FILE_TIMESTAMPLENGTH);
- val->str[val->length= PARSE_FILE_TIMESTAMPLENGTH]= '\0';
- ptr+= (PARSE_FILE_TIMESTAMPLENGTH+1);
+ memcpy(val->str, ptr, MICROSECOND_TIMESTAMP_BUFFER_SIZE-1);
+ val->str[val->length= MICROSECOND_TIMESTAMP_BUFFER_SIZE-1]= '\0';
+ ptr+= MICROSECOND_TIMESTAMP_BUFFER_SIZE;
break;
}
case FILE_OPTIONS_STRLIST:
diff --git a/sql/share/errmsg-utf8.txt b/sql/share/errmsg-utf8.txt
index aff9874edc2..ebffa4ba0c4 100644
--- a/sql/share/errmsg-utf8.txt
+++ b/sql/share/errmsg-utf8.txt
@@ -3247,25 +3247,25 @@ ER_NONEXISTING_GRANT 42000
swe "Det finns inget privilegium definierat för användare '%-.48s' på '%-.64s'"
ukr "Повноважень не визначено Ð´Ð»Ñ ÐºÐ¾Ñ€Ð¸Ñтувача '%-.48s' з хоÑту '%-.64s'"
ER_TABLEACCESS_DENIED_ERROR 42000
- cze "%-.100T příkaz nepřístupný pro uživatele: '%s'@'%s' pro tabulku '%-.192s'"
- dan "%-.100T-kommandoen er ikke tilladt for brugeren '%s'@'%s' for tabellen '%-.192s'"
- nla "%-.100T commando geweigerd voor gebruiker: '%s'@'%s' voor tabel '%-.192s'"
- eng "%-.100T command denied to user '%s'@'%s' for table '%-.192s'"
- jps "コマンド %-.100T 㯠ユーザー '%s'@'%s' ,テーブル '%-.192s' ã«å¯¾ã—ã¦è¨±å¯ã•ã‚Œã¦ã„ã¾ã›ã‚“",
- est "%-.100T käsk ei ole lubatud kasutajale '%s'@'%s' tabelis '%-.192s'"
- fre "La commande '%-.100T' est interdite à l'utilisateur: '%s'@'%s' sur la table '%-.192s'"
- ger "%-.100T Befehl nicht erlaubt für Benutzer '%s'@'%s' auf Tabelle '%-.192s'"
- hun "%-.100T parancs a '%s'@'%s' felhasznalo szamara nem engedelyezett a '%-.192s' tablaban"
- ita "Comando %-.100T negato per l'utente: '%s'@'%s' sulla tabella '%-.192s'"
- jpn "コマンド %-.100T 㯠ユーザー '%s'@'%s' ,テーブル '%-.192s' ã«å¯¾ã—ã¦è¨±å¯ã•ã‚Œã¦ã„ã¾ã›ã‚“"
- kor "'%-.100T' ëª…ë ¹ì€ ë‹¤ìŒ ì‚¬ìš©ìžì—게 거부ë˜ì—ˆìŠµë‹ˆë‹¤. : '%s'@'%s' for í…Œì´ë¸” '%-.192s'"
- por "Comando '%-.100T' negado para o usuário '%s'@'%s' na tabela '%-.192s'"
- rum "Comanda %-.100T interzisa utilizatorului: '%s'@'%s' pentru tabela '%-.192s'"
- rus "Команда %-.100T запрещена пользователю '%s'@'%s' Ð´Ð»Ñ Ñ‚Ð°Ð±Ð»Ð¸Ñ†Ñ‹ '%-.192s'"
- serbian "%-.100T komanda zabranjena za korisnika '%s'@'%s' za tabelu '%-.192s'"
- spa "%-.100T comando negado para usuario: '%s'@'%s' para tabla '%-.192s'"
- swe "%-.100T ej tillåtet för '%s'@'%s' för tabell '%-.192s'"
- ukr "%-.100T команда заборонена кориÑтувачу: '%s'@'%s' у таблиці '%-.192s'"
+ cze "%-.100T příkaz nepřístupný pro uživatele: '%s'@'%s' pro tabulku %`s.%`s"
+ dan "%-.100T-kommandoen er ikke tilladt for brugeren '%s'@'%s' for tabellen %`s.%`s"
+ nla "%-.100T commando geweigerd voor gebruiker: '%s'@'%s' voor tabel %`s.%`s"
+ eng "%-.100T command denied to user '%s'@'%s' for table %`s.%`s"
+ jps "コマンド %-.100T 㯠ユーザー '%s'@'%s' ,テーブル %`s.%`s ã«å¯¾ã—ã¦è¨±å¯ã•ã‚Œã¦ã„ã¾ã›ã‚“",
+ est "%-.100T käsk ei ole lubatud kasutajale '%s'@'%s' tabelis %`s.%`s"
+ fre "La commande '%-.100T' est interdite à l'utilisateur: '%s'@'%s' sur la table %`s.%`s"
+ ger "%-.100T Befehl nicht erlaubt für Benutzer '%s'@'%s' auf Tabelle %`s.%`s"
+ hun "%-.100T parancs a '%s'@'%s' felhasznalo szamara nem engedelyezett a %`s.%`s tablaban"
+ ita "Comando %-.100T negato per l'utente: '%s'@'%s' sulla tabella %`s.%`s"
+ jpn "コマンド %-.100T 㯠ユーザー '%s'@'%s' ,テーブル %`s.%`s ã«å¯¾ã—ã¦è¨±å¯ã•ã‚Œã¦ã„ã¾ã›ã‚“"
+ kor "'%-.100T' ëª…ë ¹ì€ ë‹¤ìŒ ì‚¬ìš©ìžì—게 거부ë˜ì—ˆìŠµë‹ˆë‹¤. : '%s'@'%s' for í…Œì´ë¸” %`s.%`s"
+ por "Comando '%-.100T' negado para o usuário '%s'@'%s' na tabela %`s.%`s"
+ rum "Comanda %-.100T interzisa utilizatorului: '%s'@'%s' pentru tabela %`s.%`s"
+ rus "Команда %-.100T запрещена пользователю '%s'@'%s' Ð´Ð»Ñ Ñ‚Ð°Ð±Ð»Ð¸Ñ†Ñ‹ %`s.%`s"
+ serbian "%-.100T komanda zabranjena za korisnika '%s'@'%s' za tabelu %`s.%`s"
+ spa "%-.100T comando negado para usuario: '%s'@'%s' para tabla %`s.%`s"
+ swe "%-.100T ej tillåtet för '%s'@'%s' för tabell %`s.%`s"
+ ukr "%-.100T команда заборонена кориÑтувачу: '%s'@'%s' у таблиці %`s.%`s"
ER_COLUMNACCESS_DENIED_ERROR 42000
cze "%-.32s příkaz nepřístupný pro uživatele: '%s'@'%s' pro sloupec '%-.192s' v tabulce '%-.192s'"
dan "%-.32s-kommandoen er ikke tilladt for brugeren '%s'@'%s' for kolonne '%-.192s' in tabellen '%-.192s'"
diff --git a/sql/sp_head.cc b/sql/sp_head.cc
index cc121c05a01..df4ef8522ba 100644
--- a/sql/sp_head.cc
+++ b/sql/sp_head.cc
@@ -1837,7 +1837,7 @@ sp_head::execute_trigger(THD *thd,
my_error(ER_TABLEACCESS_DENIED_ERROR, MYF(0), priv_desc,
thd->security_ctx->priv_user, thd->security_ctx->host_or_ip,
- table_name->str);
+ db_name->str, table_name->str);
m_security_ctx.restore_security_context(thd, save_ctx);
DBUG_RETURN(TRUE);
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index 0110a1f0c65..5b5150acab1 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -6540,7 +6540,8 @@ int mysql_table_grant(THD *thd, TABLE_LIST *table_list,
table_list->grant.want_privilege);
my_error(ER_TABLEACCESS_DENIED_ERROR, MYF(0),
command, thd->security_ctx->priv_user,
- thd->security_ctx->host_or_ip, table_list->alias.str);
+ thd->security_ctx->host_or_ip, table_list->db.str,
+ table_list->alias.str);
DBUG_RETURN(-1);
}
}
@@ -7600,8 +7601,8 @@ bool grant_reload(THD *thd)
@see check_table_access
@note
- This functions assumes that either number of tables to be inspected
- by it is limited explicitly (i.e. is is not UINT_MAX) or table list
+ This function assumes that either number of tables to be inspected
+ by it is limited explicitly (i.e. is not UINT_MAX) or table list
used and thd->lex->query_tables_own_last value correspond to each
other (the latter should be either 0 or point to next_global member
of one of elements of this table list).
@@ -7810,7 +7811,7 @@ err:
my_error(ER_TABLEACCESS_DENIED_ERROR, MYF(0),
command,
sctx->priv_user,
- sctx->host_or_ip,
+ sctx->host_or_ip, tl ? tl->db.str : "unknown",
tl ? tl->get_table_name() : "unknown");
}
DBUG_RETURN(TRUE);
@@ -7993,7 +7994,7 @@ bool check_grant_all_columns(THD *thd, ulong want_access_arg,
Security_context *sctx= thd->security_ctx;
ulong UNINIT_VAR(want_access);
const char *table_name= NULL;
- const char* db_name;
+ const char* db_name= NULL;
GRANT_INFO *grant;
GRANT_TABLE *UNINIT_VAR(grant_table);
GRANT_TABLE *UNINIT_VAR(grant_table_role);
@@ -8081,7 +8082,7 @@ err:
if (using_column_privileges)
my_error(ER_TABLEACCESS_DENIED_ERROR, MYF(0),
command, sctx->priv_user,
- sctx->host_or_ip, table_name);
+ sctx->host_or_ip, db_name, table_name);
else
my_error(ER_COLUMNACCESS_DENIED_ERROR, MYF(0),
command,
diff --git a/sql/sql_analyse.cc b/sql/sql_analyse.cc
index 65049348869..6b2b9c3de85 100644
--- a/sql/sql_analyse.cc
+++ b/sql/sql_analyse.cc
@@ -412,7 +412,7 @@ void field_real::add()
if ((decs = decimals()) >= FLOATING_POINT_DECIMALS)
{
- length= sprintf(buff, "%g", num);
+ length= snprintf(buff, sizeof(buff), "%g", num);
if (rint(num) != num)
max_notzero_dec_len = 1;
}
@@ -423,7 +423,7 @@ void field_real::add()
snprintf(buff, sizeof(buff)-1, "%-.*f", (int) decs, num);
length = (uint) strlen(buff);
#else
- length= sprintf(buff, "%-.*f", (int) decs, num);
+ length= snprintf(buff, sizeof(buff), "%-.*f", (int) decs, num);
#endif
// We never need to check further than this
@@ -810,32 +810,32 @@ void field_str::get_opt_type(String *answer, ha_rows total_rows)
if (can_be_still_num)
{
if (num_info.is_float)
- sprintf(buff, "DOUBLE"); // number was like 1e+50... TODO:
+ snprintf(buff, sizeof(buff), "DOUBLE"); // number was like 1e+50... TODO:
else if (num_info.decimals) // DOUBLE(%d,%d) sometime
{
if (num_info.dval > -FLT_MAX && num_info.dval < FLT_MAX)
- sprintf(buff, "FLOAT(%d,%d)", (num_info.integers + num_info.decimals), num_info.decimals);
+ snprintf(buff, sizeof(buff), "FLOAT(%d,%d)", (num_info.integers + num_info.decimals), num_info.decimals);
else
- sprintf(buff, "DOUBLE(%d,%d)", (num_info.integers + num_info.decimals), num_info.decimals);
+ snprintf(buff, sizeof(buff), "DOUBLE(%d,%d)", (num_info.integers + num_info.decimals), num_info.decimals);
}
else if (ev_num_info.llval >= -128 &&
ev_num_info.ullval <=
(ulonglong) (ev_num_info.llval >= 0 ? 255 : 127))
- sprintf(buff, "TINYINT(%d)", num_info.integers);
+ snprintf(buff, sizeof(buff), "TINYINT(%d)", num_info.integers);
else if (ev_num_info.llval >= INT_MIN16 &&
ev_num_info.ullval <= (ulonglong) (ev_num_info.llval >= 0 ?
UINT_MAX16 : INT_MAX16))
- sprintf(buff, "SMALLINT(%d)", num_info.integers);
+ snprintf(buff, sizeof(buff), "SMALLINT(%d)", num_info.integers);
else if (ev_num_info.llval >= INT_MIN24 &&
ev_num_info.ullval <= (ulonglong) (ev_num_info.llval >= 0 ?
UINT_MAX24 : INT_MAX24))
- sprintf(buff, "MEDIUMINT(%d)", num_info.integers);
+ snprintf(buff, sizeof(buff), "MEDIUMINT(%d)", num_info.integers);
else if (ev_num_info.llval >= INT_MIN32 &&
ev_num_info.ullval <= (ulonglong) (ev_num_info.llval >= 0 ?
UINT_MAX32 : INT_MAX32))
- sprintf(buff, "INT(%d)", num_info.integers);
+ snprintf(buff, sizeof(buff), "INT(%d)", num_info.integers);
else
- sprintf(buff, "BIGINT(%d)", num_info.integers);
+ snprintf(buff, sizeof(buff), "BIGINT(%d)", num_info.integers);
answer->append(buff, (uint) strlen(buff));
if (ev_num_info.llval >= 0 && ev_num_info.min_dval >= 0)
answer->append(STRING_WITH_LEN(" UNSIGNED"));
@@ -853,12 +853,12 @@ void field_str::get_opt_type(String *answer, ha_rows total_rows)
}
else if ((max_length * (total_rows - nulls)) < (sum + total_rows))
{
- sprintf(buff, "CHAR(%d)", (int) max_length);
+ snprintf(buff, sizeof(buff), "CHAR(%d)", (int) max_length);
answer->append(buff, (uint) strlen(buff));
}
else
{
- sprintf(buff, "VARCHAR(%d)", (int) max_length);
+ snprintf(buff, sizeof(buff), "VARCHAR(%d)", (int) max_length);
answer->append(buff, (uint) strlen(buff));
}
}
@@ -897,18 +897,18 @@ void field_real::get_opt_type(String *answer,
0 : (item->decimals + 1));
if (min_arg >= -128 && max_arg <= (min_arg >= 0 ? 255 : 127))
- sprintf(buff, "TINYINT(%d)", len);
+ snprintf(buff, sizeof(buff), "TINYINT(%d)", len);
else if (min_arg >= INT_MIN16 && max_arg <= (min_arg >= 0 ?
UINT_MAX16 : INT_MAX16))
- sprintf(buff, "SMALLINT(%d)", len);
+ snprintf(buff, sizeof(buff), "SMALLINT(%d)", len);
else if (min_arg >= INT_MIN24 && max_arg <= (min_arg >= 0 ?
UINT_MAX24 : INT_MAX24))
- sprintf(buff, "MEDIUMINT(%d)", len);
+ snprintf(buff, sizeof(buff), "MEDIUMINT(%d)", len);
else if (min_arg >= INT_MIN32 && max_arg <= (min_arg >= 0 ?
UINT_MAX32 : INT_MAX32))
- sprintf(buff, "INT(%d)", len);
+ snprintf(buff, sizeof(buff), "INT(%d)", len);
else
- sprintf(buff, "BIGINT(%d)", len);
+ snprintf(buff, sizeof(buff), "BIGINT(%d)", len);
answer->append(buff, (uint) strlen(buff));
if (min_arg >= 0)
answer->append(STRING_WITH_LEN(" UNSIGNED"));
@@ -923,10 +923,10 @@ void field_real::get_opt_type(String *answer,
else
{
if (min_arg >= -FLT_MAX && max_arg <= FLT_MAX)
- sprintf(buff, "FLOAT(%d,%d)", (int) max_length - (item->decimals + 1) + max_notzero_dec_len,
+ snprintf(buff, sizeof(buff), "FLOAT(%d,%d)", (int) max_length - (item->decimals + 1) + max_notzero_dec_len,
max_notzero_dec_len);
else
- sprintf(buff, "DOUBLE(%d,%d)", (int) max_length - (item->decimals + 1) + max_notzero_dec_len,
+ snprintf(buff, sizeof(buff), "DOUBLE(%d,%d)", (int) max_length - (item->decimals + 1) + max_notzero_dec_len,
max_notzero_dec_len);
answer->append(buff, (uint) strlen(buff));
}
@@ -945,18 +945,18 @@ void field_longlong::get_opt_type(String *answer,
char buff[MAX_FIELD_WIDTH];
if (min_arg >= -128 && max_arg <= (min_arg >= 0 ? 255 : 127))
- sprintf(buff, "TINYINT(%d)", (int) max_length);
+ snprintf(buff, sizeof(buff), "TINYINT(%d)", (int) max_length);
else if (min_arg >= INT_MIN16 && max_arg <= (min_arg >= 0 ?
UINT_MAX16 : INT_MAX16))
- sprintf(buff, "SMALLINT(%d)", (int) max_length);
+ snprintf(buff, sizeof(buff), "SMALLINT(%d)", (int) max_length);
else if (min_arg >= INT_MIN24 && max_arg <= (min_arg >= 0 ?
UINT_MAX24 : INT_MAX24))
- sprintf(buff, "MEDIUMINT(%d)", (int) max_length);
+ snprintf(buff, sizeof(buff), "MEDIUMINT(%d)", (int) max_length);
else if (min_arg >= INT_MIN32 && max_arg <= (min_arg >= 0 ?
UINT_MAX32 : INT_MAX32))
- sprintf(buff, "INT(%d)", (int) max_length);
+ snprintf(buff, sizeof(buff), "INT(%d)", (int) max_length);
else
- sprintf(buff, "BIGINT(%d)", (int) max_length);
+ snprintf(buff, sizeof(buff), "BIGINT(%d)", (int) max_length);
answer->append(buff, (uint) strlen(buff));
if (min_arg >= 0)
answer->append(STRING_WITH_LEN(" UNSIGNED"));
@@ -976,15 +976,15 @@ void field_ulonglong::get_opt_type(String *answer,
char buff[MAX_FIELD_WIDTH];
if (max_arg < 256)
- sprintf(buff, "TINYINT(%d) UNSIGNED", (int) max_length);
+ snprintf(buff, sizeof(buff), "TINYINT(%d) UNSIGNED", (int) max_length);
else if (max_arg <= ((2 * INT_MAX16) + 1))
- sprintf(buff, "SMALLINT(%d) UNSIGNED", (int) max_length);
+ snprintf(buff, sizeof(buff), "SMALLINT(%d) UNSIGNED", (int) max_length);
else if (max_arg <= ((2 * INT_MAX24) + 1))
- sprintf(buff, "MEDIUMINT(%d) UNSIGNED", (int) max_length);
+ snprintf(buff, sizeof(buff), "MEDIUMINT(%d) UNSIGNED", (int) max_length);
else if (max_arg < (((ulonglong) 1) << 32))
- sprintf(buff, "INT(%d) UNSIGNED", (int) max_length);
+ snprintf(buff, sizeof(buff), "INT(%d) UNSIGNED", (int) max_length);
else
- sprintf(buff, "BIGINT(%d) UNSIGNED", (int) max_length);
+ snprintf(buff, sizeof(buff), "BIGINT(%d) UNSIGNED", (int) max_length);
// if item is FIELD_ITEM, it _must_be_ Field_num in this class
answer->append(buff, (uint) strlen(buff));
if (item->type() == Item::FIELD_ITEM &&
@@ -1005,7 +1005,7 @@ void field_decimal::get_opt_type(String *answer,
my_decimal_set_zero(&zero);
my_bool is_unsigned= (my_decimal_cmp(&zero, &min_arg) >= 0);
- length= sprintf(buff, "DECIMAL(%d, %d)",
+ length= snprintf(buff, sizeof(buff), "DECIMAL(%d, %d)",
(int) (max_length - (item->decimals ? 1 : 0)),
item->decimals);
if (is_unsigned)
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 60b0b88bf5f..385040b1e03 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -1906,6 +1906,11 @@ retry_share:
table_list->alias.str);
goto err_lock;
}
+
+ /* Open view */
+ if (mysql_make_view(thd, share, table_list, false))
+ goto err_lock;
+
/*
This table is a view. Validate its metadata version: in particular,
that it was a view when the statement was prepared.
@@ -1913,10 +1918,6 @@ retry_share:
if (check_and_update_table_version(thd, table_list, share))
goto err_lock;
- /* Open view */
- if (mysql_make_view(thd, share, table_list, false))
- goto err_lock;
-
/* TODO: Don't free this */
tdc_release_share(share);
@@ -2721,7 +2722,7 @@ static bool inject_reprepare(THD *thd)
@sa Execute_observer
@sa check_prepared_statement() to see cases when an observer is installed
- @sa TABLE_LIST::is_table_ref_id_equal()
+ @sa TABLE_LIST::is_the_same_definition()
@sa TABLE_SHARE::get_table_ref_id()
@param[in] thd used to report errors
@@ -2738,7 +2739,7 @@ static bool
check_and_update_table_version(THD *thd,
TABLE_LIST *tables, TABLE_SHARE *table_share)
{
- if (! tables->is_table_ref_id_equal(table_share))
+ if (! tables->is_the_same_definition(thd, table_share))
{
if (thd->m_reprepare_observer &&
thd->m_reprepare_observer->report_error(thd))
@@ -2844,7 +2845,9 @@ bool tdc_open_view(THD *thd, TABLE_LIST *table_list, uint flags)
DBUG_ASSERT(share->is_view);
- if (flags & CHECK_METADATA_VERSION)
+ err= mysql_make_view(thd, share, table_list, (flags & OPEN_VIEW_NO_PARSE));
+
+ if (!err && (flags & CHECK_METADATA_VERSION))
{
/*
Check TABLE_SHARE-version of view only if we have been instructed to do
@@ -2859,7 +2862,6 @@ bool tdc_open_view(THD *thd, TABLE_LIST *table_list, uint flags)
goto ret;
}
- err= mysql_make_view(thd, share, table_list, (flags & OPEN_VIEW_NO_PARSE));
ret:
tdc_release_share(share);
@@ -8101,19 +8103,20 @@ insert_fields(THD *thd, Name_resolution_context *context, const char *db_name,
tables->is_natural_join);
DBUG_ASSERT(item->type() == Item::FIELD_ITEM);
Item_field *fld= (Item_field*) item;
+ const char *field_db_name= field_iterator.get_db_name();
const char *field_table_name= field_iterator.get_table_name();
if (!tables->schema_table &&
!(fld->have_privileges=
(get_column_grant(thd, field_iterator.grant(),
- field_iterator.get_db_name(),
+ field_db_name,
field_table_name, fld->field_name.str) &
VIEW_ANY_ACL)))
{
my_error(ER_TABLEACCESS_DENIED_ERROR, MYF(0), "ANY",
thd->security_ctx->priv_user,
thd->security_ctx->host_or_ip,
- field_table_name);
+ field_db_name, field_table_name);
DBUG_RETURN(TRUE);
}
}
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index 733f399a32c..7afefa76d8b 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -3881,6 +3881,7 @@ Statement::Statement(LEX *lex_arg, MEM_ROOT *mem_root_arg,
lex(lex_arg),
db(null_clex_str)
{
+ hr_prepare_time.val= 0,
name= null_clex_str;
}
@@ -3897,6 +3898,7 @@ void Statement::set_statement(Statement *stmt)
column_usage= stmt->column_usage;
lex= stmt->lex;
query_string= stmt->query_string;
+ hr_prepare_time= stmt->hr_prepare_time;
}
diff --git a/sql/sql_class.h b/sql/sql_class.h
index d3e2b72b12d..4d1f5b40db5 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -95,8 +95,8 @@ enum enum_slave_type_conversions { SLAVE_TYPE_CONVERSIONS_ALL_LOSSY,
SLAVE_TYPE_CONVERSIONS_ALL_NON_LOSSY};
/*
- MARK_COLUMNS_READ: A column is goind to be read.
- MARK_COLUMNS_WRITE: A column is going to be written to.
+ COLUMNS_READ: A column is goind to be read.
+ COLUMNS_WRITE: A column is going to be written to.
MARK_COLUMNS_READ: A column is goind to be read.
A bit in read set is set to inform handler that the field
is to be read. If field list contains duplicates, then
@@ -1122,6 +1122,7 @@ public:
LEX_CSTRING name; /* name for named prepared statements */
LEX *lex; // parse tree descriptor
+ my_hrtime_t hr_prepare_time; // time of preparation in microseconds
/*
Points to the query associated with this statement. It's const, but
we need to declare it char * because all table handlers are written
@@ -1855,6 +1856,21 @@ private:
};
+struct Suppress_warnings_error_handler : public Internal_error_handler
+{
+ bool handle_condition(THD *thd,
+ uint sql_errno,
+ const char *sqlstate,
+ Sql_condition::enum_warning_level *level,
+ const char *msg,
+ Sql_condition **cond_hdl)
+ {
+ return *level == Sql_condition::WARN_LEVEL_WARN;
+ }
+};
+
+
+
/**
Tables that were locked with LOCK TABLES statement.
diff --git a/sql/sql_cte.cc b/sql/sql_cte.cc
index 9acdf2278ac..d7e3eec78e8 100644
--- a/sql/sql_cte.cc
+++ b/sql/sql_cte.cc
@@ -400,9 +400,17 @@ bool With_element::check_dependencies_in_spec()
{
for (st_select_lex *sl= spec->first_select(); sl; sl= sl->next_select())
{
- st_unit_ctxt_elem ctxt0= {NULL, owner->owner};
- st_unit_ctxt_elem ctxt1= {&ctxt0, spec};
- check_dependencies_in_select(sl, &ctxt1, false, &sl->with_dep);
+ if (owner->with_recursive)
+ {
+ st_unit_ctxt_elem ctxt0= {NULL, owner->owner};
+ st_unit_ctxt_elem ctxt1= {&ctxt0, spec};
+ check_dependencies_in_select(sl, &ctxt1, false, &sl->with_dep);
+ }
+ else
+ {
+ st_unit_ctxt_elem ctxt= {NULL, spec};
+ check_dependencies_in_select(sl, &ctxt, false, &sl->with_dep);
+ }
base_dep_map|= sl->with_dep;
}
return false;
@@ -470,29 +478,50 @@ With_element *With_clause::find_table_def(TABLE_LIST *table,
With_element *find_table_def_in_with_clauses(TABLE_LIST *tbl,
st_unit_ctxt_elem *ctxt)
{
- With_element *barrier= NULL;
+ With_element *found= 0;
for (st_unit_ctxt_elem *unit_ctxt_elem= ctxt;
unit_ctxt_elem;
unit_ctxt_elem= unit_ctxt_elem->prev)
{
st_select_lex_unit *unit= unit_ctxt_elem->unit;
With_clause *with_clause= unit->with_clause;
- if (with_clause &&
- (tbl->with= with_clause->find_table_def(tbl, barrier)))
- return tbl->with;
- barrier= NULL;
- if (unit->with_element && !unit->with_element->get_owner()->with_recursive)
+ /*
+ First look for the table definition in the with clause attached to 'unit'
+ if there is any such clause.
+ */
+ if (with_clause)
{
- /*
- This unit is the specification if the with element unit->with_element.
- The with element belongs to a with clause without the specifier RECURSIVE.
- So when searching for the matching definition of tbl this with clause must
- be looked up to this with element
- */
- barrier= unit->with_element;
+ found= with_clause->find_table_def(tbl, NULL);
+ if (found)
+ break;
+ }
+ /*
+ If 'unit' is the unit that defines a with element then reset 'unit'
+ to the unit whose attached with clause contains this with element.
+ */
+ With_element *with_elem= unit->with_element;
+ if (with_elem)
+ {
+ if (!(unit_ctxt_elem= unit_ctxt_elem->prev))
+ break;
+ unit= unit_ctxt_elem->unit;
+ }
+ with_clause= unit->with_clause;
+ /*
+ Now look for the table definition in this with clause. If the with clause
+ contains RECURSIVE the search is performed through all CTE definitions in
+ clause, otherwise up to the definition of 'with_elem' unless it is NULL.
+ */
+ if (with_clause)
+ {
+ found= with_clause->find_table_def(tbl,
+ with_clause->with_recursive ?
+ NULL : with_elem);
+ if (found)
+ break;
}
}
- return NULL;
+ return found;
}
@@ -522,22 +551,30 @@ void With_element::check_dependencies_in_select(st_select_lex *sl,
bool in_subq,
table_map *dep_map)
{
- With_clause *with_clause= sl->get_with_clause();
+ bool is_spec_select= sl->get_with_element() == this;
+
for (TABLE_LIST *tbl= sl->table_list.first; tbl; tbl= tbl->next_local)
{
- if (tbl->derived || tbl->nested_join)
+ if (tbl->with || tbl->derived || tbl->nested_join)
continue;
tbl->with_internal_reference_map= 0;
/*
- If there is a with clause attached to the unit containing sl
- look first for the definition of tbl in this with clause.
- If such definition is not found there look in the with
- clauses of the upper levels.
+ Look first for the definition of tbl in the with clause to which
+ this with element belongs. If such definition is not found there
+ look in the with clauses of the upper levels via the context
+ chain of embedding with elements.
If the definition of tbl is found somewhere in with clauses
- then tbl->with is set to point to this definition
+ then tbl->with is set to point to this definition.
*/
- if (with_clause && !tbl->with)
- tbl->with= with_clause->find_table_def(tbl, NULL);
+ if (is_spec_select)
+ {
+ With_clause *with_clause= sl->master_unit()->with_clause;
+ if (with_clause)
+ tbl->with= with_clause->find_table_def(tbl, NULL);
+ if (!tbl->with)
+ tbl->with= owner->find_table_def(tbl,
+ owner->with_recursive ? NULL : this);
+ }
if (!tbl->with)
tbl->with= find_table_def_in_with_clauses(tbl, ctxt);
@@ -564,8 +601,7 @@ void With_element::check_dependencies_in_select(st_select_lex *sl,
st_select_lex_unit *inner_unit= sl->first_inner_unit();
for (; inner_unit; inner_unit= inner_unit->next_unit())
{
- if (!inner_unit->with_element)
- check_dependencies_in_unit(inner_unit, ctxt, in_subq, dep_map);
+ check_dependencies_in_unit(inner_unit, ctxt, in_subq, dep_map);
}
}
@@ -643,10 +679,14 @@ void With_element::check_dependencies_in_unit(st_select_lex_unit *unit,
bool in_subq,
table_map *dep_map)
{
+ st_unit_ctxt_elem unit_ctxt_elem= {ctxt, unit};
if (unit->with_clause)
- check_dependencies_in_with_clause(unit->with_clause, ctxt, in_subq, dep_map);
+ {
+ (void) unit->with_clause->check_dependencies();
+ check_dependencies_in_with_clause(unit->with_clause, &unit_ctxt_elem,
+ in_subq, dep_map);
+ }
in_subq |= unit->item != NULL;
- st_unit_ctxt_elem unit_ctxt_elem= {ctxt, unit};
st_select_lex *sl= unit->first_select();
for (; sl; sl= sl->next_select())
{
diff --git a/sql/sql_cte.h b/sql/sql_cte.h
index 47071dd06fd..b2708186008 100644
--- a/sql/sql_cte.h
+++ b/sql/sql_cte.h
@@ -391,10 +391,24 @@ public:
bool add_with_element(With_element *elem);
/* Add this with clause to the list of with clauses used in the statement */
- void add_to_list(With_clause ** &last_next)
+ void add_to_list(With_clause **ptr, With_clause ** &last_next)
{
- *last_next= this;
- last_next= &this->next_with_clause;
+ if (embedding_with_clause)
+ {
+ /*
+ An embedded with clause is always placed before the embedding one
+ in the list of with clauses used in the query.
+ */
+ while (*ptr != embedding_with_clause)
+ ptr= &(*ptr)->next_with_clause;
+ *ptr= this;
+ next_with_clause= embedding_with_clause;
+ }
+ else
+ {
+ *last_next= this;
+ last_next= &this->next_with_clause;
+ }
}
void set_owner(st_select_lex_unit *unit) { owner= unit; }
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index 3400e31fd5c..c5bdfb596eb 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -2434,23 +2434,9 @@ void st_select_lex_node::include_down(st_select_lex_node *upper)
}
-void st_select_lex_node::add_slave(st_select_lex_node *slave_arg)
+void st_select_lex_node::attach_single(st_select_lex_node *slave_arg)
{
- for (; slave; slave= slave->next)
- if (slave == slave_arg)
- return;
-
- if (slave)
- {
- st_select_lex_node *slave_arg_slave= slave_arg->slave;
- /* Insert in the front of list of slaves if any. */
- slave_arg->include_neighbour(slave);
- /* include_neighbour() sets slave_arg->slave=0, restore it. */
- slave_arg->slave= slave_arg_slave;
- /* Count on include_neighbour() setting the master. */
- DBUG_ASSERT(slave_arg->master == this);
- }
- else
+ DBUG_ASSERT(slave == 0);
{
slave= slave_arg;
slave_arg->master= this;
diff --git a/sql/sql_lex.h b/sql/sql_lex.h
index d720d902bd7..bdc8b5476b2 100644
--- a/sql/sql_lex.h
+++ b/sql/sql_lex.h
@@ -705,7 +705,7 @@ public:
inline st_select_lex_node* get_master() { return master; }
void include_down(st_select_lex_node *upper);
- void add_slave(st_select_lex_node *slave_arg);
+ void attach_single(st_select_lex_node *slave_arg);
void include_neighbour(st_select_lex_node *before);
void include_standalone(st_select_lex_node *sel, st_select_lex_node **ref);
void include_global(st_select_lex_node **plink);
diff --git a/sql/sql_list.h b/sql/sql_list.h
index a47acf57b54..b11239856f5 100644
--- a/sql/sql_list.h
+++ b/sql/sql_list.h
@@ -118,8 +118,8 @@ struct list_node :public Sql_alloc
{
list_node *next;
void *info;
- list_node(void *info_par,list_node *next_par)
- :next(next_par),info(info_par)
+ list_node(const void *info_par, list_node *next_par)
+ :next(next_par), info(const_cast<void *>(info_par))
{}
list_node() /* For end_of_list */
{
@@ -384,7 +384,7 @@ public:
#endif // LIST_EXTRA_DEBUG
protected:
- void after(void *info,list_node *node)
+ void after(const void *info, list_node *node)
{
list_node *new_node=new list_node(info,node->next);
node->next=new_node;
@@ -445,11 +445,11 @@ public:
{
el= &list->first;
}
- inline void *replace(void *element)
+ inline void *replace(const void *element)
{ // Return old element
void *tmp=current->info;
DBUG_ASSERT(current->info != 0);
- current->info=element;
+ current->info= const_cast<void *>(element);
return tmp;
}
void *replace(base_list &new_list)
@@ -472,7 +472,7 @@ public:
el=prev;
current=0; // Safeguard
}
- void after(void *element) // Insert element after current
+ void after(const void *element) // Insert element after current
{
list->after(element,current);
current=current->next;
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 5807be62339..ca82c36d568 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -7158,7 +7158,6 @@ bool check_fk_parent_table_access(THD *thd,
if (key->type == Key::FOREIGN_KEY)
{
TABLE_LIST parent_table;
- bool is_qualified_table_name;
Foreign_key *fk_key= (Foreign_key *)key;
LEX_CSTRING db_name;
LEX_CSTRING table_name= { fk_key->ref_table.str,
@@ -7176,7 +7175,6 @@ bool check_fk_parent_table_access(THD *thd,
if (fk_key->ref_db.str)
{
- is_qualified_table_name= true;
if (!(db_name.str= (char *) thd->memdup(fk_key->ref_db.str,
fk_key->ref_db.length+1)))
return true;
@@ -7198,7 +7196,6 @@ bool check_fk_parent_table_access(THD *thd,
if (!(db_name.str= (char *) thd->memdup(create_db,
db_name.length+1)))
return true;
- is_qualified_table_name= true;
if (check_db_name((LEX_STRING*) &db_name))
{
@@ -7210,8 +7207,6 @@ bool check_fk_parent_table_access(THD *thd,
{
if (thd->lex->copy_db_to(&db_name))
return true;
- else
- is_qualified_table_name= false;
}
}
@@ -7237,22 +7232,11 @@ bool check_fk_parent_table_access(THD *thd,
if (check_some_access(thd, privileges, &parent_table) ||
parent_table.grant.want_privilege)
{
- if (is_qualified_table_name)
- {
- const size_t qualified_table_name_len= NAME_LEN + 1 + NAME_LEN + 1;
- char *qualified_table_name= (char *) thd->alloc(qualified_table_name_len);
-
- my_snprintf(qualified_table_name, qualified_table_name_len, "%s.%s",
- db_name.str, table_name.str);
- table_name.str= qualified_table_name;
- }
-
my_error(ER_TABLEACCESS_DENIED_ERROR, MYF(0),
- "REFERENCES",
- thd->security_ctx->priv_user,
- thd->security_ctx->host_or_ip,
- table_name.str);
-
+ "REFERENCES",
+ thd->security_ctx->priv_user,
+ thd->security_ctx->host_or_ip,
+ db_name.str, table_name.str);
return true;
}
}
diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc
index 71dc85c3100..47024e7c219 100644
--- a/sql/sql_prepare.cc
+++ b/sql/sql_prepare.cc
@@ -4311,6 +4311,8 @@ bool Prepared_statement::prepare(const char *packet, uint packet_len)
if (thd->spcont == NULL)
general_log_write(thd, COM_STMT_PREPARE, query(), query_length());
}
+ // The same format as for triggers to compare
+ hr_prepare_time= my_hrtime();
DBUG_RETURN(error);
}
@@ -4404,8 +4406,8 @@ Prepared_statement::execute_loop(String *expanded_query,
uchar *packet_end)
{
Reprepare_observer reprepare_observer;
- bool error;
int reprepare_attempt= 0;
+ bool error;
iterations= FALSE;
/*
diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc
index 7d1ddc08aaa..c52f0ab1ae9 100644
--- a/sql/sql_repl.cc
+++ b/sql/sql_repl.cc
@@ -4032,7 +4032,7 @@ bool mysql_show_binlog_events(THD* thd)
binlog_size= s.st_size;
if (lex_mi->pos > binlog_size)
{
- sprintf(errmsg_buf, "Invalid pos specified. Requested from pos:%llu is "
+ snprintf(errmsg_buf, sizeof(errmsg_buf), "Invalid pos specified. Requested from pos:%llu is "
"greater than actual file size:%lu\n", lex_mi->pos,
(ulong)s.st_size);
errmsg= errmsg_buf;
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index b2851d7defc..bae712a407d 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -1172,7 +1172,8 @@ public:
my_snprintf(m_view_access_denied_message, MYSQL_ERRMSG_SIZE,
ER_THD(thd, ER_TABLEACCESS_DENIED_ERROR), "SHOW VIEW",
m_sctx->priv_user,
- m_sctx->host_or_ip, m_top_view->get_table_name());
+ m_sctx->host_or_ip,
+ m_top_view->get_db_name(), m_top_view->get_table_name());
}
return m_view_access_denied_message_ptr;
}
@@ -1264,7 +1265,8 @@ mysqld_show_create_get_fields(THD *thd, TABLE_LIST *table_list,
DBUG_PRINT("debug", ("check_table_access failed"));
my_error(ER_TABLEACCESS_DENIED_ERROR, MYF(0),
"SHOW", thd->security_ctx->priv_user,
- thd->security_ctx->host_or_ip, table_list->alias.str);
+ thd->security_ctx->host_or_ip,
+ table_list->db.str, table_list->alias.str);
goto exit;
}
DBUG_PRINT("debug", ("check_table_access succeeded"));
@@ -1293,7 +1295,8 @@ mysqld_show_create_get_fields(THD *thd, TABLE_LIST *table_list,
{
my_error(ER_TABLEACCESS_DENIED_ERROR, MYF(0),
"SHOW", thd->security_ctx->priv_user,
- thd->security_ctx->host_or_ip, table_list->alias.str);
+ thd->security_ctx->host_or_ip,
+ table_list->db.str, table_list->alias.str);
goto exit;
}
}
@@ -7114,13 +7117,15 @@ static bool store_trigger(THD *thd, Trigger *trigger,
table->field[14]->store(STRING_WITH_LEN("OLD"), cs);
table->field[15]->store(STRING_WITH_LEN("NEW"), cs);
- if (trigger->create_time)
+ if (trigger->hr_create_time.val)
{
+ /* timestamp is in microseconds */
table->field[16]->set_notnull();
- thd->variables.time_zone->gmt_sec_to_TIME(&timestamp,
- (my_time_t)(trigger->create_time/100));
- /* timestamp is with 6 digits */
- timestamp.second_part= (trigger->create_time % 100) * 10000;
+ thd->variables.time_zone->
+ gmt_sec_to_TIME(&timestamp,
+ (my_time_t)
+ hrtime_to_time(trigger->hr_create_time));
+ timestamp.second_part= hrtime_sec_part(trigger->hr_create_time);
((Field_temporal_with_date*) table->field[16])->store_time_dec(&timestamp,
2);
}
@@ -10291,12 +10296,14 @@ static bool show_create_trigger_impl(THD *thd, Trigger *trigger)
trigger->db_cl_name.length,
system_charset_info);
- if (trigger->create_time)
+ if (trigger->hr_create_time.val)
{
MYSQL_TIME timestamp;
- thd->variables.time_zone->gmt_sec_to_TIME(&timestamp,
- (my_time_t)(trigger->create_time/100));
- timestamp.second_part= (trigger->create_time % 100) * 10000;
+ thd->variables.time_zone->
+ gmt_sec_to_TIME(&timestamp,
+ (my_time_t)
+ hrtime_to_time(trigger->hr_create_time));
+ timestamp.second_part= hrtime_sec_part(trigger->hr_create_time);
p->store(&timestamp, 2);
}
else
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index cc9cb37ca15..413d78ae814 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -5742,6 +5742,7 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table,
if ((duplicate= unique_table(thd, table, src_table, 0)))
{
update_non_unique_table_error(src_table, "CREATE", duplicate);
+ res= 1;
goto err;
}
}
@@ -7975,6 +7976,20 @@ void append_drop_column(THD *thd, String *str, Field *field)
}
+static inline
+void rename_field_in_list(Create_field *field, List<const char> *field_list)
+{
+ DBUG_ASSERT(field->change.str);
+ List_iterator<const char> it(*field_list);
+ while (const char *name= it++)
+ {
+ if (my_strcasecmp(system_charset_info, name, field->change.str))
+ continue;
+ it.replace(field->field_name.str);
+ }
+}
+
+
/**
Prepare column and key definitions for CREATE TABLE in ALTER TABLE.
@@ -8284,6 +8299,39 @@ mysql_prepare_alter_table(THD *thd, TABLE *table,
new_create_tail.push_back(def, thd->mem_root);
}
}
+
+#ifdef WITH_PARTITION_STORAGE_ENGINE
+ if (alter_info->flags & ALTER_RENAME_COLUMN)
+ {
+ if (thd->work_part_info)
+ {
+ partition_info *part_info= thd->work_part_info;
+ List_iterator<Create_field> def_it(column_rename_param.fields);
+ const bool part_field_list= !part_info->part_field_list.is_empty();
+ const bool subpart_field_list= !part_info->subpart_field_list.is_empty();
+ if (part_info->part_expr)
+ part_info->part_expr->walk(&Item::rename_fields_processor, 1,
+ &column_rename_param);
+ if (part_info->subpart_expr)
+ part_info->subpart_expr->walk(&Item::rename_fields_processor, 1,
+ &column_rename_param);
+ if (part_field_list || subpart_field_list)
+ {
+ while (Create_field *def= def_it++)
+ {
+ if (def->change.str)
+ {
+ if (part_field_list)
+ rename_field_in_list(def, &part_info->part_field_list);
+ if (subpart_field_list)
+ rename_field_in_list(def, &part_info->subpart_field_list);
+ } /* if (def->change.str) */
+ } /* while (def) */
+ } /* if (part_field_list || subpart_field_list) */
+ } /* if (part_info) */
+ }
+#endif
+
dropped_sys_vers_fields &= VERS_SYSTEM_FIELD;
if ((dropped_sys_vers_fields ||
alter_info->flags & ALTER_DROP_PERIOD) &&
diff --git a/sql/sql_trigger.cc b/sql/sql_trigger.cc
index 247055d397c..f01efd84528 100644
--- a/sql/sql_trigger.cc
+++ b/sql/sql_trigger.cc
@@ -37,6 +37,8 @@
#ifdef WITH_WSREP
#include "debug_sync.h"
#endif /* WITH_WSREP */
+#include <my_time.h>
+#include <mysql_time.h>
LEX_CSTRING *make_lex_string(LEX_CSTRING *lex_str,
const char* str, size_t length,
@@ -212,7 +214,7 @@ static File_option triggers_file_parameters[]=
},
{
{ STRING_WITH_LEN("created") },
- my_offsetof(class Table_triggers_list, create_times),
+ my_offsetof(class Table_triggers_list, hr_create_times),
FILE_OPTIONS_ULLLIST
},
{ { 0, 0 }, 0, FILE_OPTIONS_STRING }
@@ -896,6 +898,10 @@ bool Table_triggers_list::create_trigger(THD *thd, TABLE_LIST *tables,
if (!(trigger= new (&table->mem_root) Trigger(this, 0)))
goto err_without_cleanup;
+ /* Time with in microseconds */
+ trigger->hr_create_time= make_hr_time(thd->query_start(),
+ thd->query_start_sec_part());
+
/* Create trigger_name.TRN file to ensure trigger name is unique */
if (sql_create_definition_file(NULL, &trigname_file, &trigname_file_type,
(uchar*)&trigname, trigname_file_parameters))
@@ -904,8 +910,6 @@ bool Table_triggers_list::create_trigger(THD *thd, TABLE_LIST *tables,
/* Populate the trigger object */
trigger->sql_mode= thd->variables.sql_mode;
- /* Time with 2 decimals, like in MySQL 5.7 */
- trigger->create_time= ((ulonglong) thd->query_start())*100 + thd->query_start_sec_part()/10000;
build_trig_stmt_query(thd, tables, stmt_query, &trigger_definition,
&trigger->definer, trg_definer_holder);
@@ -973,7 +977,7 @@ void Table_triggers_list::empty_lists()
client_cs_names.empty();
connection_cl_names.empty();
db_cl_names.empty();
- create_times.empty();
+ hr_create_times.empty();
}
@@ -1009,7 +1013,7 @@ bool Trigger::add_to_file_list(void* param_arg)
base->client_cs_names.push_back(&client_cs_name, mem_root) ||
base->connection_cl_names.push_back(&connection_cl_name, mem_root) ||
base->db_cl_names.push_back(&db_cl_name, mem_root) ||
- base->create_times.push_back(&create_time, mem_root))
+ base->hr_create_times.push_back(&hr_create_time.val, mem_root))
return 1;
return 0;
}
@@ -1391,7 +1395,8 @@ bool Table_triggers_list::check_n_load(THD *thd, const LEX_CSTRING *db,
List_iterator_fast<LEX_CSTRING> it_client_cs_name(trigger_list->client_cs_names);
List_iterator_fast<LEX_CSTRING> it_connection_cl_name(trigger_list->connection_cl_names);
List_iterator_fast<LEX_CSTRING> it_db_cl_name(trigger_list->db_cl_names);
- List_iterator_fast<ulonglong> it_create_times(trigger_list->create_times);
+ List_iterator_fast<ulonglong>
+ it_create_times(trigger_list->hr_create_times);
LEX *old_lex= thd->lex;
LEX lex;
sp_rcontext *save_spcont= thd->spcont;
@@ -1477,7 +1482,13 @@ bool Table_triggers_list::check_n_load(THD *thd, const LEX_CSTRING *db,
trigger->sql_mode= sql_mode;
trigger->definition= *trg_create_str;
- trigger->create_time= trg_create_time ? *trg_create_time : 0;
+ trigger->hr_create_time.val= trg_create_time ? *trg_create_time : 0;
+ /*
+ Fix time if in 100th of second (comparison with max uint * 100
+ (max possible timestamp in the old format))
+ */
+ if (trigger->hr_create_time.val < 429496729400ULL)
+ trigger->hr_create_time.val*= 10000;
trigger->name= sp ? sp->m_name : empty_clex_str;
trigger->on_table_name.str= (char*) lex.raw_trg_on_table_name_begin;
trigger->on_table_name.length= (lex.raw_trg_on_table_name_end -
diff --git a/sql/sql_trigger.h b/sql/sql_trigger.h
index ae3d1738b16..f906fa0d1a8 100644
--- a/sql/sql_trigger.h
+++ b/sql/sql_trigger.h
@@ -115,7 +115,7 @@ public:
GRANT_INFO subject_table_grants;
sql_mode_t sql_mode;
/* Store create time. Can't be mysql_time_t as this holds also sub seconds */
- ulonglong create_time;
+ my_hrtime_t hr_create_time; // Create time timestamp in microseconds
trg_event_type event;
trg_action_time_type action_time;
uint action_order;
@@ -198,7 +198,7 @@ public:
*/
List<ulonglong> definition_modes_list;
/** Create times for triggers */
- List<ulonglong> create_times;
+ List<ulonglong> hr_create_times;
List<LEX_CSTRING> definers_list;
diff --git a/sql/sql_tvc.cc b/sql/sql_tvc.cc
index 13efd973326..43c25db5097 100644
--- a/sql/sql_tvc.cc
+++ b/sql/sql_tvc.cc
@@ -708,7 +708,7 @@ st_select_lex *wrap_tvc(THD *thd, st_select_lex *tvc_sl,
Attach the select used of TVC as the only slave to the unit for
the derived table tvc_x of the transformation
*/
- derived_unit->add_slave(tvc_sl);
+ derived_unit->attach_single(tvc_sl);
tvc_sl->linkage= DERIVED_TABLE_TYPE;
/*
diff --git a/sql/sql_udf.cc b/sql/sql_udf.cc
index d0657cf973e..86423c64f3f 100644
--- a/sql/sql_udf.cc
+++ b/sql/sql_udf.cc
@@ -606,7 +606,7 @@ int mysql_create_function(THD *thd,udf_func *udf)
/* Allow creation of functions even if we can't open func table */
if (unlikely(!table))
- goto err;
+ goto err_open_func_table;
table->use_all_columns();
restore_record(table, s->default_values); // Default values for fields
table->field[0]->store(u_d->name.str, u_d->name.length, system_charset_info);
@@ -620,7 +620,7 @@ int mysql_create_function(THD *thd,udf_func *udf)
{
my_error(ER_ERROR_ON_WRITE, MYF(0), "mysql.func", error);
del_udf(u_d);
- goto err;
+ goto err_open_func_table;
}
done:
@@ -635,6 +635,7 @@ done:
err:
if (new_dl)
dlclose(dl);
+err_open_func_table:
mysql_rwlock_unlock(&THR_LOCK_udf);
DBUG_RETURN(1);
}
diff --git a/sql/sql_union.cc b/sql/sql_union.cc
index 32d307de5e8..e831e2a479c 100644
--- a/sql/sql_union.cc
+++ b/sql/sql_union.cc
@@ -633,15 +633,6 @@ st_select_lex_unit::init_prepare_fake_select_lex(THD *thd_arg,
order= order->next)
order->item= &order->item_ptr;
}
- for (ORDER *order= global_parameters()->order_list.first;
- order;
- order=order->next)
- {
- (*order->item)->walk(&Item::change_context_processor, 0,
- &fake_select_lex->context);
- (*order->item)->walk(&Item::set_fake_select_as_master_processor, 0,
- fake_select_lex);
- }
}
diff --git a/sql/sql_view.cc b/sql/sql_view.cc
index b6787a1cb8b..68a8410f559 100644
--- a/sql/sql_view.cc
+++ b/sql/sql_view.cc
@@ -302,7 +302,8 @@ bool create_view_precheck(THD *thd, TABLE_LIST *tables, TABLE_LIST *view,
{
my_error(ER_TABLEACCESS_DENIED_ERROR, MYF(0),
"ANY", thd->security_ctx->priv_user,
- thd->security_ctx->priv_host, tbl->table_name.str);
+ thd->security_ctx->priv_host,
+ tbl->db.str, tbl->table_name.str);
goto err;
}
/*
@@ -785,7 +786,7 @@ static File_option view_parameters[]=
my_offsetof(TABLE_LIST, with_check),
FILE_OPTIONS_ULONGLONG},
{{ STRING_WITH_LEN("timestamp")},
- my_offsetof(TABLE_LIST, timestamp),
+ my_offsetof(TABLE_LIST, hr_timestamp),
FILE_OPTIONS_TIMESTAMP},
{{ STRING_WITH_LEN("create-version")},
my_offsetof(TABLE_LIST, file_version),
@@ -809,6 +810,15 @@ static File_option view_parameters[]=
FILE_OPTIONS_STRING}
};
+
+static File_option view_timestamp_parameters[]=
+{
+
+ {{ C_STRING_WITH_LEN("timestamp")}, 0, FILE_OPTIONS_TIMESTAMP},
+ {{NullS, 0}, 0, FILE_OPTIONS_STRING}
+};
+
+
static LEX_CSTRING view_file_type[]= {{STRING_WITH_LEN("VIEW") }};
@@ -826,8 +836,8 @@ int mariadb_fix_view(THD *thd, TABLE_LIST *view, bool wrong_checksum,
&path, path_buff, sizeof(path_buff),
&file, view);
/* init timestamp */
- if (!view->timestamp.str)
- view->timestamp.str= view->timestamp_buffer;
+ if (!view->hr_timestamp.str)
+ view->hr_timestamp.str= view->timestamp_buffer;
if (swap_alg && view->algorithm != VIEW_ALGORITHM_UNDEFINED)
{
@@ -842,13 +852,13 @@ int mariadb_fix_view(THD *thd, TABLE_LIST *view, bool wrong_checksum,
swap_alg= 0;
if (wrong_checksum)
{
- if (view->md5.length != 32)
+ if (view->md5.length != VIEW_MD5_LEN)
{
- if ((view->md5.str= (char *)thd->alloc(32 + 1)) == NULL)
+ if ((view->md5.str= (char *)thd->alloc(VIEW_MD5_LEN + 1)) == NULL)
DBUG_RETURN(HA_ADMIN_FAILED);
}
view->calc_md5(const_cast<char*>(view->md5.str));
- view->md5.length= 32;
+ view->md5.length= VIEW_MD5_LEN;
}
view->mariadb_version= MYSQL_VERSION_ID;
@@ -971,13 +981,13 @@ static int mysql_register_view(THD *thd, TABLE_LIST *view,
view->file_version= 2;
view->mariadb_version= MYSQL_VERSION_ID;
view->calc_md5(md5);
- if (!(view->md5.str= (char*) thd->memdup(md5, 32)))
+ if (!(view->md5.str= (char*) thd->memdup(md5, VIEW_MD5_LEN)))
{
my_error(ER_OUT_OF_RESOURCES, MYF(0));
error= -1;
goto err;
}
- view->md5.length= 32;
+ view->md5.length= VIEW_MD5_LEN;
can_be_merged= lex->can_be_merged();
if (lex->create_view->algorithm == VIEW_ALGORITHM_MERGE &&
!lex->can_be_merged())
@@ -1028,8 +1038,8 @@ loop_out:
&path, path_buff, sizeof(path_buff),
&file, view);
/* init timestamp */
- if (!view->timestamp.str)
- view->timestamp.str= view->timestamp_buffer;
+ if (!view->hr_timestamp.str)
+ view->hr_timestamp.str= view->timestamp_buffer;
/* check old .frm */
{
@@ -1154,7 +1164,32 @@ err:
DBUG_RETURN(error);
}
+/**
+ Reads view definition "version"
+ @param[in] share Share object of view
+
+ @return true on error, otherwise false
+*/
+
+bool mariadb_view_version_get(TABLE_SHARE *share)
+{
+ DBUG_ASSERT(share->is_view);
+
+ if (!(share->tabledef_version.str=
+ (uchar*) alloc_root(&share->mem_root,
+ MICROSECOND_TIMESTAMP_BUFFER_SIZE)))
+ return TRUE;
+ share->tabledef_version.length= 0; // safety if the drfinition file is brocken
+
+ DBUG_ASSERT(share->view_def != NULL);
+ if (share->view_def->parse((uchar *) &share->tabledef_version, NULL,
+ view_timestamp_parameters, 1,
+ &file_parser_dummy_hook))
+ return TRUE;
+ DBUG_ASSERT(share->tabledef_version.length == MICROSECOND_TIMESTAMP_BUFFER_SIZE-1);
+ return FALSE;
+}
/**
read VIEW .frm and create structures
@@ -1216,6 +1251,10 @@ bool mysql_make_view(THD *thd, TABLE_SHARE *share, TABLE_LIST *table,
mysql_derived_reinit(thd, NULL, table);
DEBUG_SYNC(thd, "after_cached_view_opened");
+ if (!share->tabledef_version.length)
+ {
+ mariadb_view_version_get(share);
+ }
DBUG_RETURN(0);
}
@@ -1252,8 +1291,8 @@ bool mysql_make_view(THD *thd, TABLE_SHARE *share, TABLE_LIST *table,
arena= thd->activate_stmt_arena_if_needed(&backup);
/* init timestamp */
- if (!table->timestamp.str)
- table->timestamp.str= table->timestamp_buffer;
+ if (!table->hr_timestamp.str)
+ table->hr_timestamp.str= table->timestamp_buffer;
/* prepare default values for old format */
table->view_suid= TRUE;
table->definer.user.str= table->definer.host.str= 0;
@@ -1269,6 +1308,19 @@ bool mysql_make_view(THD *thd, TABLE_SHARE *share, TABLE_LIST *table,
required_view_parameters,
&file_parser_dummy_hook)))
goto end;
+ if (!share->tabledef_version.length)
+ {
+ share->tabledef_version.str= (const uchar *)
+ memdup_root(&share->mem_root,
+ (const void *)
+ table->hr_timestamp.str,
+ (share->tabledef_version.length=
+ table->hr_timestamp.length));
+ }
+ if (!table->tabledef_version.length)
+ {
+ table->set_view_def_version(&table->hr_timestamp);
+ }
/*
check old format view .frm
@@ -2092,10 +2144,10 @@ bool insert_view_fields(THD *thd, List<Item> *list, TABLE_LIST *view)
int view_checksum(THD *thd, TABLE_LIST *view)
{
char md5[MD5_BUFF_LENGTH];
- if (!view->view || view->md5.length != 32)
+ if (!view->view || view->md5.length != VIEW_MD5_LEN)
return HA_ADMIN_NOT_IMPLEMENTED;
view->calc_md5(md5);
- return (strncmp(md5, view->md5.str, 32) ?
+ return (strncmp(md5, view->md5.str, VIEW_MD5_LEN) ?
HA_ADMIN_WRONG_CHECKSUM :
HA_ADMIN_OK);
}
@@ -2199,7 +2251,7 @@ mysql_rename_view(THD *thd,
object for it.
*/
view_def.reset();
- view_def.timestamp.str= view_def.timestamp_buffer;
+ view_def.hr_timestamp.str= view_def.timestamp_buffer;
view_def.view_suid= TRUE;
/* get view definition and source */
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index 577405725ca..73783f26fdd 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -12910,11 +12910,16 @@ order_clause:
*/
DBUG_ASSERT(sel->master_unit()->fake_select_lex);
lex->current_select= sel->master_unit()->fake_select_lex;
+ lex->push_context(&sel->master_unit()->fake_select_lex->context, thd->mem_root);
}
}
order_list
{
-
+ if (Lex->current_select ==
+ Lex->current_select->master_unit()->fake_select_lex)
+ {
+ Lex->pop_context();
+ }
}
;
@@ -15374,7 +15379,8 @@ with_clause:
Lex->derived_tables|= DERIVED_WITH;
Lex->with_cte_resolution= true;
Lex->curr_with_clause= with_clause;
- with_clause->add_to_list(Lex->with_clauses_list_last_next);
+ with_clause->add_to_list(&Lex->with_clauses_list,
+ Lex->with_clauses_list_last_next);
}
with_list
{
diff --git a/sql/sql_yacc_ora.yy b/sql/sql_yacc_ora.yy
index 2a42abe5d20..bcb6c982da3 100644
--- a/sql/sql_yacc_ora.yy
+++ b/sql/sql_yacc_ora.yy
@@ -15352,7 +15352,8 @@ with_clause:
Lex->derived_tables|= DERIVED_WITH;
Lex->with_cte_resolution= true;
Lex->curr_with_clause= with_clause;
- with_clause->add_to_list(Lex->with_clauses_list_last_next);
+ with_clause->add_to_list(&Lex->with_clauses_list,
+ Lex->with_clauses_list_last_next);
}
with_list
{
diff --git a/sql/table.cc b/sql/table.cc
index 506195127b2..1d0edf88fb7 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -8155,12 +8155,28 @@ int TABLE::update_virtual_fields(handler *h, enum_vcol_update_mode update_mode)
DBUG_RETURN(in_use->is_error());
}
-int TABLE::update_virtual_field(Field *vf)
+/*
+ Calculate the virtual field value for a specified field.
+ @param vf A field to calculate
+ @param ignore_warnings Ignore the warnings and also make the
+ calculations permissive. This usually means
+ that a calculation is internal and is not
+ expected to fail.
+*/
+int TABLE::update_virtual_field(Field *vf, bool ignore_warnings)
{
DBUG_ENTER("TABLE::update_virtual_field");
Query_arena backup_arena;
Counting_error_handler count_errors;
+ Suppress_warnings_error_handler warning_handler;
in_use->push_internal_handler(&count_errors);
+ bool abort_on_warning;
+ if (ignore_warnings)
+ {
+ abort_on_warning= in_use->abort_on_warning;
+ in_use->abort_on_warning= false;
+ in_use->push_internal_handler(&warning_handler);
+ }
/*
TODO: this may impose memory leak until table flush.
See comment in
@@ -8172,6 +8188,13 @@ int TABLE::update_virtual_field(Field *vf)
vf->vcol_info->expr->save_in_field(vf, 0);
in_use->restore_active_arena(expr_arena, &backup_arena);
in_use->pop_internal_handler();
+ if (ignore_warnings)
+ {
+ in_use->abort_on_warning= abort_on_warning;
+ in_use->pop_internal_handler();
+ // This is an internal calculation, we expect it to always succeed
+ DBUG_ASSERT(count_errors.errors == 0);
+ }
DBUG_RETURN(count_errors.errors);
}
@@ -8861,6 +8884,73 @@ bool TABLE_LIST::is_with_table()
return derived && derived->with_element;
}
+
+/**
+ Check if the definition are the same.
+
+ If versions do not match it check definitions (with checking and setting
+ trigger definition versions (times)
+
+ @param[in] view TABLE_LIST of the view
+ @param[in] share Share object of view
+
+ @return false on error or different definitions.
+
+ @sa check_and_update_table_version()
+*/
+
+bool TABLE_LIST::is_the_same_definition(THD* thd, TABLE_SHARE *s)
+{
+ enum enum_table_ref_type tp= s->get_table_ref_type();
+ if (m_table_ref_type == tp)
+ {
+ /*
+ Cache have not changed which means that definition was not changed
+ including triggers
+ */
+ if (m_table_ref_version == s->get_table_ref_version())
+ return TRUE;
+
+ /*
+ If cache changed then check content version
+ */
+ if ((tabledef_version.length &&
+ tabledef_version.length == s->tabledef_version.length &&
+ memcmp(tabledef_version.str, s->tabledef_version.str,
+ tabledef_version.length) == 0))
+ {
+ // Definition have not changed, let's check if triggers changed.
+ if (table && table->triggers)
+ {
+
+ my_hrtime_t hr_stmt_prepare= thd->hr_prepare_time;
+ if (hr_stmt_prepare.val)
+ for(uint i= 0; i < TRG_EVENT_MAX; i++)
+ for (uint j= 0; j < TRG_ACTION_MAX; j++)
+ {
+ Trigger *tr=
+ table->triggers->get_trigger((trg_event_type)i,
+ (trg_action_time_type)j);
+ if (tr)
+ if (hr_stmt_prepare.val <= tr->hr_create_time.val)
+ {
+ set_tabledef_version(s);
+ return FALSE;
+ }
+ }
+ }
+ set_table_id(s);
+ return TRUE;
+ }
+ else
+ tabledef_version.length= 0;
+ }
+ else
+ set_tabledef_version(s);
+ return FALSE;
+}
+
+
uint TABLE_SHARE::actual_n_key_parts(THD *thd)
{
return use_ext_keys &&
diff --git a/sql/table.h b/sql/table.h
index 097deca46b2..577c11c37ee 100644
--- a/sql/table.h
+++ b/sql/table.h
@@ -32,6 +32,19 @@
#include "filesort_utils.h"
#include "parse_file.h"
+/*
+ Buffer for unix timestamp in microseconds:
+ 9,223,372,036,854,775,807 (signed int64 maximal value)
+ 1 234 567 890 123 456 789
+
+ Note: we can use unsigned for calculation, but practically they
+ are the same by probability to overflow them (signed int64 in
+ microseconds is enough for almost 3e5 years) and signed allow to
+ avoid increasing the buffer (the old buffer for human readable
+ date was 19+1).
+*/
+#define MICROSECOND_TIMESTAMP_BUFFER_SIZE (19 + 1)
+
/* Structs that defines the TABLE */
class Item; /* Needed by ORDER */
@@ -64,6 +77,8 @@ struct Name_resolution_context;
*/
typedef ulonglong nested_join_map;
+#define VIEW_MD5_LEN 32
+
#define tmp_file_prefix "#sql" /**< Prefix for tmp tables */
#define tmp_file_prefix_length 4
@@ -1023,7 +1038,7 @@ struct TABLE_SHARE
with a base table, a base table is replaced with a temporary
table and so on.
- @sa TABLE_LIST::is_table_ref_id_equal()
+ @sa TABLE_LIST::is_the_same_definition()
*/
ulong get_table_ref_version() const
{
@@ -1595,7 +1610,7 @@ public:
uint actual_n_key_parts(KEY *keyinfo);
ulong actual_key_flags(KEY *keyinfo);
- int update_virtual_field(Field *vf);
+ int update_virtual_field(Field *vf, bool ignore_warnings);
int update_virtual_fields(handler *h, enum_vcol_update_mode update_mode);
int update_default_fields(bool ignore_errors);
void evaluate_update_default_function();
@@ -2364,6 +2379,12 @@ struct TABLE_LIST
to view with SQL SECURITY DEFINER)
*/
Security_context *security_ctx;
+ uchar tabledef_version_buf[MY_UUID_SIZE >
+ MICROSECOND_TIMESTAMP_BUFFER_SIZE-1 ?
+ MY_UUID_SIZE + 1 :
+ MICROSECOND_TIMESTAMP_BUFFER_SIZE];
+ LEX_CUSTRING tabledef_version;
+
/*
This view security context (non-zero only for views with
SQL SECURITY DEFINER)
@@ -2377,7 +2398,7 @@ struct TABLE_LIST
LEX_CSTRING source; /* source of CREATE VIEW */
LEX_CSTRING view_db; /* saved view database */
LEX_CSTRING view_name; /* saved view name */
- LEX_STRING timestamp; /* GMT time stamp of last operation */
+ LEX_STRING hr_timestamp; /* time stamp of last operation */
LEX_USER definer; /* definer of view */
ulonglong file_version; /* version of file's field set */
ulonglong mariadb_version; /* version of server on creation */
@@ -2460,7 +2481,7 @@ struct TABLE_LIST
/* TABLE_TYPE_UNKNOWN if any type is acceptable */
Table_type required_type;
handlerton *db_type; /* table_type for handler */
- char timestamp_buffer[MAX_DATETIME_WIDTH + 1];
+ char timestamp_buffer[MICROSECOND_TIMESTAMP_BUFFER_SIZE];
/*
This TABLE_LIST object is just placeholder for prelocking, it will be
used for implicit LOCK TABLES only and won't be used in real statement.
@@ -2652,19 +2673,7 @@ struct TABLE_LIST
*/
bool process_index_hints(TABLE *table);
- /**
- Compare the version of metadata from the previous execution
- (if any) with values obtained from the current table
- definition cache element.
-
- @sa check_and_update_table_version()
- */
- inline bool is_table_ref_id_equal(TABLE_SHARE *s) const
- {
- return (m_table_ref_type == s->get_table_ref_type() &&
- m_table_ref_version == s->get_table_ref_version());
- }
-
+ bool is_the_same_definition(THD *thd, TABLE_SHARE *s);
/**
Record the value of metadata version of the corresponding
table definition cache element in this parse tree node.
@@ -2681,6 +2690,26 @@ struct TABLE_LIST
m_table_ref_version= table_ref_version_arg;
}
+ void set_table_id(TABLE_SHARE *s)
+ {
+ set_table_ref_id(s);
+ set_tabledef_version(s);
+ }
+
+ void set_tabledef_version(TABLE_SHARE *s)
+ {
+ if (!tabledef_version.length && s->tabledef_version.length)
+ {
+ DBUG_ASSERT(s->tabledef_version.length <
+ sizeof(tabledef_version_buf));
+ tabledef_version.str= tabledef_version_buf;
+ memcpy(tabledef_version_buf, s->tabledef_version.str,
+ (tabledef_version.length= s->tabledef_version.length));
+ // safety
+ tabledef_version_buf[tabledef_version.length]= 0;
+ }
+ }
+
/* Set of functions returning/setting state of a derived table/view. */
inline bool is_non_derived()
{
@@ -2809,6 +2838,12 @@ struct TABLE_LIST
}
}
+ inline void set_view_def_version(LEX_STRING *version)
+ {
+ m_table_ref_type= TABLE_REF_VIEW;
+ tabledef_version.str= (const uchar *) version->str;
+ tabledef_version.length= version->length;
+ }
private:
bool prep_check_option(THD *thd, uint8 check_opt_type);
bool prep_where(THD *thd, Item **conds, bool no_where_clause);
diff --git a/sql/wsrep_var.cc b/sql/wsrep_var.cc
index 413550935cb..ea8db8addab 100644
--- a/sql/wsrep_var.cc
+++ b/sql/wsrep_var.cc
@@ -70,6 +70,12 @@ bool wsrep_on_check(sys_var *self, THD* thd, set_var* var)
" innodb_lock_schedule_algorithm=FCFS and restart.", MYF(0));
return true;
}
+ if (new_wsrep_on && !WSREP_PROVIDER_EXISTS)
+ {
+ my_message(ER_WRONG_ARGUMENTS, "WSREP (galera) can't be enabled "
+ "if the wsrep_provider is unset or set to 'none'", MYF(0));
+ return true;
+ }
return false;
}
diff --git a/storage/connect/bsonudf.cpp b/storage/connect/bsonudf.cpp
index 7d930d1f410..e93f40eb509 100644
--- a/storage/connect/bsonudf.cpp
+++ b/storage/connect/bsonudf.cpp
@@ -1144,7 +1144,7 @@ my_bool BJNX::LocateArray(PGLOBAL g, PBVAL jarp)
for (int i = 0; i < n && !Found; i++) {
Jp->N = m;
- sprintf(s, "[%d]", i + B);
+ snprintf(s, sizeof(s), "[%d]", i + B);
if (Jp->WriteStr(s))
return true;
@@ -1438,7 +1438,7 @@ my_bool BJNX::AddPath(void)
for (int i = 0; i <= I; i++) {
if (Jpnp[i].Type == TYPE_JAR) {
- sprintf(s, "[%d]", Jpnp[i].N + B);
+ snprintf(s, sizeof(s), "[%d]", Jpnp[i].N + B);
if (Jp->WriteStr(s))
return true;
diff --git a/storage/connect/global.h b/storage/connect/global.h
index eb3d4106477..bc1585eba41 100644
--- a/storage/connect/global.h
+++ b/storage/connect/global.h
@@ -14,6 +14,8 @@
#include <time.h> /* time_t type declaration */
#include <setjmp.h> /* Long jump declarations */
+#define ROUNDUP_TO_8(num) (((num + 7) / 8) * 8)
+
#if defined(_WIN32) && !defined(NOEX)
#define DllExport __declspec( dllexport )
#else // !_WIN32
diff --git a/storage/connect/ha_connect.cc b/storage/connect/ha_connect.cc
index 7a40fbd74c7..5af952afcd4 100644
--- a/storage/connect/ha_connect.cc
+++ b/storage/connect/ha_connect.cc
@@ -3073,6 +3073,8 @@ PCFIL ha_connect::CheckCond(PGLOBAL g, PCFIL filp, const Item *cond)
if ((iscol= args[i]->type() == COND::FIELD_ITEM)) {
const char *fnm;
+ char buf[MAX_FIELD_WIDTH];
+ String strColumn(buf, sizeof(buf), system_charset_info);
ha_field_option_struct *fop;
Item_field *pField= (Item_field *)args[i];
@@ -3098,8 +3100,14 @@ PCFIL ha_connect::CheckCond(PGLOBAL g, PCFIL filp, const Item *cond)
return NULL;
} else {
bool h;
-
fnm= filp->Chk(pField->field->field_name.str, &h);
+ if (tty == TYPE_AM_MYSQL && !(x || ismul))
+ {
+ strColumn.length(0);
+ strColumn.qs_append(STRING_WITH_LEN("`"));
+ strColumn.qs_append(fnm);
+ strColumn.append(STRING_WITH_LEN("`"));
+ }
if (h && i && !ishav)
return NULL; // Having should be col VOP arg
@@ -3113,9 +3121,11 @@ PCFIL ha_connect::CheckCond(PGLOBAL g, PCFIL filp, const Item *cond)
htrc("Field name=%s\n", pField->field->field_name.str);
htrc("Field type=%d\n", pField->field->type());
htrc("Field_type=%d\n", args[i]->field_type());
- } // endif trace
-
- strcat((ishav ? havg : body), fnm);
+ } // endif trace
+ if (tty == TYPE_AM_MYSQL && !(x || ismul))
+ strcat((ishav ? havg : body), strColumn.ptr());
+ else
+ strcat((ishav ? havg : body), fnm);
} else if (args[i]->type() == COND::FUNC_ITEM) {
if (tty == TYPE_AM_MYSQL) {
if (!CheckCond(g, filp, args[i]))
diff --git a/storage/connect/ha_connect.h b/storage/connect/ha_connect.h
index 3f1ecc18af7..846f289a40c 100644
--- a/storage/connect/ha_connect.h
+++ b/storage/connect/ha_connect.h
@@ -551,3 +551,27 @@ public:
uint int_table_flags; // Inherited from MyISAM
bool enable_activate_all_index; // Inherited from MyISAM
}; // end of ha_connect class definition
+
+
+/* This is a hack for ASAN
+ * Libraries such as libxml2 and libodbc do not like being unloaded before
+ * exit and will show as a leak in ASAN with no stack trace (as the plugin
+ * has been unloaded from memory).
+ *
+ * The below is designed to trick the compiler into adding a "UNIQUE" symbol
+ * which can be seen using:
+ * readelf -s storage/connect/ha_connect.so | grep UNIQUE
+ *
+ * Having this symbol means that the plugin remains in memory after dlclose()
+ * has been called. Thereby letting the libraries clean up properly.
+ */
+#if defined(__SANITIZE_ADDRESS__)
+__attribute__((__used__))
+inline int dummy(void)
+{
+ static int d;
+ d++;
+ return d;
+}
+#endif
+
diff --git a/storage/connect/jdbconn.cpp b/storage/connect/jdbconn.cpp
index 7af2b7e3a44..09786f28beb 100644
--- a/storage/connect/jdbconn.cpp
+++ b/storage/connect/jdbconn.cpp
@@ -451,8 +451,14 @@ PQRYRES JDBCSrcCols(PGLOBAL g, PCSZ src, PJPARM sjp)
if (strstr(src, "%s")) {
// Place holder for an eventual where clause
- sqry = (char*)PlugSubAlloc(g, NULL, strlen(src) + 2);
- sprintf(sqry, src, "1=1"); // dummy where clause
+ size_t sqry_size = strlen(src) + 2;
+ sqry = (char*)PlugSubAlloc(g, NULL, sqry_size);
+ // Function PlugSubAlloc(...) recalculate string size
+ // while allocate memory - it rounds size up size to multiple of 8
+ // we need to know the real allocated size
+ // to use it in sprintf(...)
+ const int sqry_real_allocated_size = ROUNDUP_TO_8(sqry_size);
+ snprintf(sqry, sqry_real_allocated_size, src, "1=1"); // dummy where clause
} else
sqry = (char*)src;
diff --git a/storage/connect/json.cpp b/storage/connect/json.cpp
index 755480b1608..0786c3139e1 100644
--- a/storage/connect/json.cpp
+++ b/storage/connect/json.cpp
@@ -1023,13 +1023,13 @@ bool JDOC::SerializeValue(PJVAL jvp)
case TYPE_DTM:
return js->Escape(jvp->Strp);
case TYPE_INTG:
- sprintf(buf, "%d", jvp->N);
+ snprintf(buf, sizeof(buf), "%d", jvp->N);
return js->WriteStr(buf);
case TYPE_BINT:
- sprintf(buf, "%lld", jvp->LLn);
+ snprintf(buf, sizeof(buf), "%lld", jvp->LLn);
return js->WriteStr(buf);
case TYPE_DBL: // dfp to limit to the default number of decimals
- sprintf(buf, "%.*f", MY_MIN(jvp->Nd, dfp), jvp->F);
+ snprintf(buf, sizeof(buf), "%.*f", MY_MIN(jvp->Nd, dfp), jvp->F);
return js->WriteStr(buf);
case TYPE_NULL:
return js->WriteStr("null");
diff --git a/storage/connect/jsonudf.cpp b/storage/connect/jsonudf.cpp
index 2a209f67652..1b5ff9ae0c4 100644
--- a/storage/connect/jsonudf.cpp
+++ b/storage/connect/jsonudf.cpp
@@ -908,7 +908,7 @@ my_bool JSNX::LocateArray(PGLOBAL g, PJAR jarp)
for (int i = 0; i < jarp->size() && !Found; i++) {
Jp->N = m;
- sprintf(s, "[%d]", i + B);
+ snprintf(s, sizeof(s), "[%d]", i + B);
if (Jp->WriteStr(s))
return true;
@@ -1189,7 +1189,7 @@ my_bool JSNX::AddPath(void) {
for (int i = 0; i <= I; i++) {
if (Jpnp[i].Type == TYPE_JAR) {
- sprintf(s, "[%d]", Jpnp[i].N + B);
+ snprintf(s, sizeof(s), "[%d]", Jpnp[i].N + B);
if (Jp->WriteStr(s))
return true;
diff --git a/storage/connect/libdoc.cpp b/storage/connect/libdoc.cpp
index aef7b551d65..54715da4ddc 100644
--- a/storage/connect/libdoc.cpp
+++ b/storage/connect/libdoc.cpp
@@ -290,46 +290,8 @@ if (!rc)
/******************************************************************/
/* XML library cleanup function. */
/******************************************************************/
-/*
- This is a copy of xmlCleanupParser() from the libxml2 sources
- with xmlResetLastError() commented.
-
- xmlResetLastError() called from the original xmlCleanupParser() causes
- valgrind to report memory leaks. This happens because
- ha_initialize_handlerton() is called from the main thread in mysqld.cc,
- while ha_finalize_handlerton() is called from a non-main thread.
- libxml2 gets confused because of xmlInitParser() and xmlCleanupParser()
- being called from the different threads.
-
- Perhaps the code in mysqld.cc should eventually be modified
- to shutdown plugins from the main thread.
-*/
-static void
-xmlCleanupParser_replacement(void)
- {
- xmlCleanupCharEncodingHandlers();
-#ifdef LIBXML_CATALOG_ENABLED
- xmlCatalogCleanup();
-#endif
- xmlDictCleanup();
- xmlCleanupInputCallbacks();
-#ifdef LIBXML_OUTPUT_ENABLED
- xmlCleanupOutputCallbacks();
-#endif
-#ifdef LIBXML_SCHEMAS_ENABLED
- xmlSchemaCleanupTypes();
- xmlRelaxNGCleanupTypes();
-#endif
- //xmlResetLastError();
- xmlCleanupGlobals();
- xmlCleanupThreads(); /* must be last if called not from the main thread */
- xmlCleanupMemory();
- }
-
-
void XmlCleanupParserLib(void)
{
- xmlCleanupParser_replacement();
} // end of XmlCleanupParserLib
/******************************************************************/
diff --git a/storage/connect/mysql-test/connect/r/mysql.result b/storage/connect/mysql-test/connect/r/mysql.result
index 83c2bc0abb5..918256ac395 100644
--- a/storage/connect/mysql-test/connect/r/mysql.result
+++ b/storage/connect/mysql-test/connect/r/mysql.result
@@ -304,5 +304,27 @@ INSERT INTO t2 VALUES (10),(20),(30),(40);
DROP TABLE t2;
DROP TABLE t1;
#
+# MDEV-28533 CONNECT engine does not quote columns involved in WHERE clause
+#
+CREATE TABLE t1 (id int, `spaced col` varchar(10),`nospace` varchar(10));
+insert into t1 values (1,1,'x1'),(2,'C-003','x2');
+SELECT * from t1;
+id spaced col nospace
+1 1 x1
+2 C-003 x2
+CREATE TABLE t2 (id int, `spaced col` varchar(10), `nospace` varchar(10)) ENGINE=CONNECT TABLE_TYPE=MYSQL DBNAME='test' TABNAME='t1' OPTION_LIST='host=localhost,user=root,port=PORT';
+SELECT * from t2;
+id spaced col nospace
+1 1 x1
+2 C-003 x2
+SELECT `id` FROM t2 WHERE t2.`nospace` = 'x1';
+id
+1
+SELECT `id` FROM t2 WHERE t2.`spaced col` = 'C-003';
+id
+2
+DROP TABLE t1;
+DROP TABLE t2;
+#
# End of 10.3 tests
#
diff --git a/storage/connect/mysql-test/connect/r/odbc_postgresql.result b/storage/connect/mysql-test/connect/r/odbc_postgresql.result
index dc23dbdb990..fd23197c37f 100644
--- a/storage/connect/mysql-test/connect/r/odbc_postgresql.result
+++ b/storage/connect/mysql-test/connect/r/odbc_postgresql.result
@@ -17,6 +17,7 @@ mtr public t2 TABLE
mtr public v1 VIEW
mtr schema1 t1 TABLE
mtr schema1 t2 TABLE
+mtr schema1 t3 TABLE
mtr schema1 v1 VIEW
DROP TABLE t1;
# All tables in all schemas
@@ -28,6 +29,7 @@ mtr public t2 TABLE
mtr public v1 VIEW
mtr schema1 t1 TABLE
mtr schema1 t2 TABLE
+mtr schema1 t3 TABLE
mtr schema1 v1 VIEW
DROP TABLE t1;
# All tables in all schemas
@@ -39,6 +41,7 @@ mtr public t2 TABLE
mtr public v1 VIEW
mtr schema1 t1 TABLE
mtr schema1 t2 TABLE
+mtr schema1 t3 TABLE
mtr schema1 v1 VIEW
DROP TABLE t1;
# All tables in the default schema ("public")
@@ -101,6 +104,8 @@ mtr public t2 a 4 int4 10 4 0 10 0
mtr public v1 a 4 int4 10 4 0 10 1
mtr schema1 t1 a 1 bpchar 10 40 NULL NULL 0
mtr schema1 t2 a 1 bpchar 10 40 NULL NULL 0
+mtr schema1 t3 a 1 bpchar 10 40 NULL NULL 0
+mtr schema1 t3 b 1 bpchar 10 40 NULL NULL 0
mtr schema1 v1 a 1 bpchar 10 40 NULL NULL 1
DROP TABLE t1;
# All columns in the schemas "public" and "schema1"
@@ -112,6 +117,8 @@ mtr public t2 a 4 int4 10 4 0 10 0
mtr public v1 a 4 int4 10 4 0 10 1
mtr schema1 t1 a 1 bpchar 10 40 NULL NULL 0
mtr schema1 t2 a 1 bpchar 10 40 NULL NULL 0
+mtr schema1 t3 a 1 bpchar 10 40 NULL NULL 0
+mtr schema1 t3 b 1 bpchar 10 40 NULL NULL 0
mtr schema1 v1 a 1 bpchar 10 40 NULL NULL 1
DROP TABLE t1;
# All tables "t1" in all schemas
@@ -195,7 +202,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` char(10) NOT NULL
-) ENGINE=CONNECT DEFAULT CHARSET=utf8 CONNECTION='DSN=ConnectEnginePostgresql;UID=mtr;PWD=mtr' `TABLE_TYPE`='ODBC' `TABNAME`='schema1.t1' `DATA_CHARSET`='utf8'
+) ENGINE=CONNECT DEFAULT CHARSET=utf8mb3 CONNECTION='DSN=ConnectEnginePostgresql;UID=mtr;PWD=mtr' `TABLE_TYPE`='ODBC' `TABNAME`='schema1.t1' `DATA_CHARSET`='utf8'
SELECT * FROM t1;
a
aaa
@@ -206,7 +213,7 @@ CREATE TABLE t2 AS SELECT * FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `a` char(10) CHARACTER SET utf8 NOT NULL
+ `a` char(10) CHARACTER SET utf8mb3 NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT * FROM t2;
a
@@ -230,7 +237,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` char(10) DEFAULT NULL
-) ENGINE=CONNECT DEFAULT CHARSET=utf8 CONNECTION='DSN=ConnectEnginePostgresql;UID=mtr;PWD=mtr' `TABLE_TYPE`='ODBC' `TABNAME`='schema1.v1' `DATA_CHARSET`='utf8'
+) ENGINE=CONNECT DEFAULT CHARSET=utf8mb3 CONNECTION='DSN=ConnectEnginePostgresql;UID=mtr;PWD=mtr' `TABLE_TYPE`='ODBC' `TABNAME`='schema1.v1' `DATA_CHARSET`='utf8'
SELECT * FROM t1;
a
aaa
@@ -241,7 +248,7 @@ CREATE TABLE t2 AS SELECT * FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `a` char(10) CHARACTER SET utf8 DEFAULT NULL
+ `a` char(10) CHARACTER SET utf8mb3 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT * FROM t2;
a
@@ -265,7 +272,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` char(10) NOT NULL
-) ENGINE=CONNECT DEFAULT CHARSET=utf8 CONNECTION='DSN=ConnectEnginePostgresql;UID=mtr;PWD=mtr' `TABLE_TYPE`='ODBC' `TABNAME`='schema1.t2' `DATA_CHARSET`='utf8'
+) ENGINE=CONNECT DEFAULT CHARSET=utf8mb3 CONNECTION='DSN=ConnectEnginePostgresql;UID=mtr;PWD=mtr' `TABLE_TYPE`='ODBC' `TABNAME`='schema1.t2' `DATA_CHARSET`='utf8'
SELECT * FROM t1;
a
xxx
@@ -276,7 +283,7 @@ CREATE TABLE t2 AS SELECT * FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `a` char(10) CHARACTER SET utf8 NOT NULL
+ `a` char(10) CHARACTER SET utf8mb3 NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT * FROM t2;
a
@@ -294,3 +301,8 @@ zzz
ÄÖÜ
DROP VIEW v1;
DROP TABLE t1;
+CREATE TABLE t1 (a VARCHAR(6), b VARCHAR(6), PRIMARY KEY(a, b)) ENGINE=CONNECT TABNAME='schema1.t3' CHARSET=utf8 DATA_CHARSET=utf8 TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEnginePostgresql;UID=mtr;PWD=mtr';
+DELETE FROM t1 WHERE a='20';
+Warnings:
+Note 1105 schema1.t3: 0 affected rows
+DROP TABLE t1;
diff --git a/storage/connect/mysql-test/connect/t/mysql.test b/storage/connect/mysql-test/connect/t/mysql.test
index 451de29c0b0..ce76a4665d5 100644
--- a/storage/connect/mysql-test/connect/t/mysql.test
+++ b/storage/connect/mysql-test/connect/t/mysql.test
@@ -484,5 +484,25 @@ DROP TABLE t2;
DROP TABLE t1;
--echo #
+--echo # MDEV-28533 CONNECT engine does not quote columns involved in WHERE clause
+--echo #
+
+CREATE TABLE t1 (id int, `spaced col` varchar(10),`nospace` varchar(10));
+insert into t1 values (1,1,'x1'),(2,'C-003','x2');
+
+SELECT * from t1;
+
+--replace_result $PORT PORT
+--eval CREATE TABLE t2 (id int, `spaced col` varchar(10), `nospace` varchar(10)) ENGINE=CONNECT TABLE_TYPE=MYSQL DBNAME='test' TABNAME='t1' OPTION_LIST='host=localhost,user=root,port=$PORT'
+
+SELECT * from t2;
+SELECT `id` FROM t2 WHERE t2.`nospace` = 'x1';
+SELECT `id` FROM t2 WHERE t2.`spaced col` = 'C-003';
+
+
+DROP TABLE t1;
+DROP TABLE t2;
+
+--echo #
--echo # End of 10.3 tests
--echo #
diff --git a/storage/connect/mysql-test/connect/t/odbc_postgresql.sql b/storage/connect/mysql-test/connect/t/odbc_postgresql.sql
index 1c302294393..a795817a4d3 100644
--- a/storage/connect/mysql-test/connect/t/odbc_postgresql.sql
+++ b/storage/connect/mysql-test/connect/t/odbc_postgresql.sql
@@ -25,3 +25,6 @@ INSERT INTO schema1.t1 VALUES ('aaa'),('bbb'),('ccc'),('ÑÑÑ');
CREATE VIEW schema1.v1 AS SELECT * FROM schema1.t1;
CREATE TABLE schema1.t2 (a CHAR(10) NOT NULL);
INSERT INTO schema1.t2 VALUES ('xxx'),('yyy'),('zzz'),('ÄÖÜ');
+CREATE TABLE schema1.t3 (a CHAR(10) NOT NULL, b CHAR(10) NOT NULL);
+INSERT INTO schema1.t3 VALUES ('xxx', 'aaa'),('yyy', 'bbb'),('zzz', 'ccc'),('ÄÖÜ', 'ÑÑÑ');
+
diff --git a/storage/connect/mysql-test/connect/t/odbc_postgresql.test b/storage/connect/mysql-test/connect/t/odbc_postgresql.test
index 7fc16130713..86597423d04 100644
--- a/storage/connect/mysql-test/connect/t/odbc_postgresql.test
+++ b/storage/connect/mysql-test/connect/t/odbc_postgresql.test
@@ -205,3 +205,9 @@ CREATE VIEW v1 AS SELECT * FROM t1;
SELECT * FROM v1;
DROP VIEW v1;
DROP TABLE t1;
+
+# MDEV-25767 DELETE with WHERE condition crashes when two columns used for
+# pkey
+CREATE TABLE t1 (a VARCHAR(6), b VARCHAR(6), PRIMARY KEY(a, b)) ENGINE=CONNECT TABNAME='schema1.t3' CHARSET=utf8 DATA_CHARSET=utf8 TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEnginePostgresql;UID=mtr;PWD=mtr';
+DELETE FROM t1 WHERE a='20';
+DROP TABLE t1;
diff --git a/storage/connect/plugutil.cpp b/storage/connect/plugutil.cpp
index 8700bc992c4..be79d10eeb7 100644
--- a/storage/connect/plugutil.cpp
+++ b/storage/connect/plugutil.cpp
@@ -371,13 +371,13 @@ char *PlugReadMessage(PGLOBAL g, int mid, char *m)
PlugSetPath(msgfile, NULL, buff, msg_path);
if (!(mfile = fopen(msgfile, "rt"))) {
- sprintf(stmsg, "Fail to open message file %s", msgfile);
+ snprintf(stmsg, sizeof(stmsg), "Fail to open message file %s", msgfile);
goto err;
} // endif mfile
for (;;)
if (!fgets(buff, 256, mfile)) {
- sprintf(stmsg, "Cannot get message %d %s", mid, SVP(m));
+ snprintf(stmsg, sizeof(stmsg), "Cannot get message %d %s", mid, SVP(m));
goto fin;
} else
if (atoi(buff) == mid)
@@ -386,7 +386,7 @@ char *PlugReadMessage(PGLOBAL g, int mid, char *m)
if (sscanf(buff, " %*d %.31s \"%.255[^\"]", msgid, stmsg) < 2) {
// Old message file
if (!sscanf(buff, " %*d \"%.255[^\"]", stmsg)) {
- sprintf(stmsg, "Bad message file for %d %s", mid, SVP(m));
+ snprintf(stmsg, sizeof(stmsg), "Bad message file for %d %s", mid, SVP(m));
goto fin;
} else
m = NULL;
@@ -425,17 +425,18 @@ char *PlugGetMessage(PGLOBAL g, int mid)
if (n == 0) {
DWORD rc = GetLastError();
- msg = (char*)PlugSubAlloc(g, NULL, 512); // Extend buf allocation
- n = sprintf(msg, "Message %d, rc=%d: ", mid, rc);
+ const int BUF_SIZE= 512;
+ msg = (char*)PlugSubAlloc(g, NULL, BUF_SIZE); // Extend buf allocation
+ n = snprintf(msg, BUF_SIZE, "Message %d, rc=%d: ", mid, rc);
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM |
FORMAT_MESSAGE_IGNORE_INSERTS, NULL, rc, 0,
- (LPTSTR)(msg + n), 512 - n, NULL);
+ (LPTSTR)(msg + n), BUF_SIZE - n, NULL);
return msg;
} // endif n
#else // ALL
if (!GetRcString(mid, stmsg, 200))
- sprintf(stmsg, "Message %d not found", mid);
+ snprintf(stmsg, sizeof(stmsg) "Message %d not found", mid);
#endif // ALL
if (g) {
@@ -564,7 +565,7 @@ void *PlugSubAlloc(PGLOBAL g, void *memp, size_t size)
/*******************************************************************/
memp = g->Sarea;
- size = ((size + 7) / 8) * 8; /* Round up size to multiple of 8 */
+ size = ROUNDUP_TO_8(size); /* Round up size to multiple of 8 */
pph = (PPOOLHEADER)memp;
if (trace(16))
diff --git a/storage/connect/tabbson.cpp b/storage/connect/tabbson.cpp
index 95360487ac1..22d8648d7c0 100644
--- a/storage/connect/tabbson.cpp
+++ b/storage/connect/tabbson.cpp
@@ -477,7 +477,7 @@ bool BSONDISC::Find(PGLOBAL g, PBVAL jvp, PCSZ key, int j)
n = sizeof(fmt) - (strlen(fmt) + 1);
if (!tdp->Xcol || stricmp(tdp->Xcol, key)) {
- sprintf(buf, "%d", k);
+ snprintf(buf, sizeof(buf), "%d", k);
if (tdp->Uri) {
strncat(strncat(fmt, sep, n), buf, n - strlen(sep));
@@ -798,7 +798,7 @@ void BCUTIL::SetJsonValue(PGLOBAL g, PVAL vp, PBVAL jvp)
break;
default:
- sprintf(G->Message, "Unsupported column type %d", vp->GetType());
+ snprintf(G->Message, sizeof(G->Message), "Unsupported column type %d", vp->GetType());
throw 888;
} // endswitch Type
diff --git a/storage/connect/tabodbc.cpp b/storage/connect/tabodbc.cpp
index 2a4ee89b235..140367bd954 100644
--- a/storage/connect/tabodbc.cpp
+++ b/storage/connect/tabodbc.cpp
@@ -557,15 +557,17 @@ bool TDBODBC::OpenDB(PGLOBAL g)
if (Memory < 3) {
// Method will depend on cursor type
- if ((Rbuf = Ocp->Rewind(Query->GetStr(), (PODBCCOL)Columns)) < 0)
- if (Mode != MODE_READX) {
- Ocp->Close();
- return true;
- } else
- Rbuf = 0;
-
- } else
+ if (Query && (Rbuf = Ocp->Rewind(Query->GetStr(), (PODBCCOL)Columns)) < 0) {
+ if (Mode != MODE_READX) {
+ Ocp->Close();
+ return true;
+ } else {
+ Rbuf = 0;
+ }
+ }
+ } else {
Rbuf = Qrp->Nblin;
+ }
CurNum = 0;
Fpos = 0;
diff --git a/storage/connect/tabwmi.cpp b/storage/connect/tabwmi.cpp
index f90ff98ca35..935d21c59c9 100644
--- a/storage/connect/tabwmi.cpp
+++ b/storage/connect/tabwmi.cpp
@@ -810,7 +810,7 @@ void WMICOL::ReadColumn(PGLOBAL g)
char buf[24];
int rc = VariantTimeToSystemTime(Prop.date, &stm);
- sprintf(buf, "%02d/%02d/%d %02d:%02d:%02d",
+ snprintf(buf, sizeof(buf), "%02d/%02d/%d %02d:%02d:%02d",
stm.wDay, stm.wMonth, stm.wYear,
stm.wHour, stm.wMinute, stm.wSecond);
Value->SetValue_psz(buf);
diff --git a/storage/connect/valblk.cpp b/storage/connect/valblk.cpp
index 95327b5d30f..c3e42945d70 100644
--- a/storage/connect/valblk.cpp
+++ b/storage/connect/valblk.cpp
@@ -604,7 +604,7 @@ int TYPBLK<TYPE>::GetMaxLength(void)
int i, n, m;
for (i = n = 0; i < Nval; i++) {
- m = sprintf(buf, Fmt, UnalignedRead(i));
+ m = snprintf(buf, sizeof(buf), Fmt, UnalignedRead(i));
n = MY_MAX(n, m);
} // endfor i
diff --git a/storage/federatedx/ha_federatedx.cc b/storage/federatedx/ha_federatedx.cc
index ddd6d932724..21c37907ee0 100644
--- a/storage/federatedx/ha_federatedx.cc
+++ b/storage/federatedx/ha_federatedx.cc
@@ -2626,7 +2626,7 @@ int ha_federatedx::index_read_idx_with_result_set(uchar *buf, uint index,
if (io->query(sql_query.ptr(), sql_query.length()))
{
- sprintf(error_buffer, "error: %d '%s'",
+ snprintf(error_buffer, sizeof(error_buffer), "error: %d '%s'",
io->error_code(), io->error_str());
retval= ER_QUERY_ON_FOREIGN_DATA_SOURCE;
goto error;
@@ -3352,7 +3352,7 @@ static int test_connection(MYSQL_THD thd, federatedx_io *io,
if ((retval= io->query(str.ptr(), str.length())))
{
- sprintf(buffer, "database: '%s' username: '%s' hostname: '%s'",
+ snprintf(buffer, sizeof(buffer), "database: '%s' username: '%s' hostname: '%s'",
share->database, share->username, share->hostname);
DBUG_PRINT("info", ("error-code: %d", io->error_code()));
my_error(ER_CANT_CREATE_FEDERATED_TABLE, MYF(0), buffer);
diff --git a/storage/innobase/CMakeLists.txt b/storage/innobase/CMakeLists.txt
index bb6da42c51b..81b1acf8b9e 100644
--- a/storage/innobase/CMakeLists.txt
+++ b/storage/innobase/CMakeLists.txt
@@ -371,6 +371,11 @@ IF(MSVC)
# on generated file.
TARGET_COMPILE_OPTIONS(innobase PRIVATE "/wd4065")
ENDIF()
+IF(CMAKE_C_COMPILER_ID MATCHES "Clang" AND
+ NOT CMAKE_C_COMPILER_VERSION VERSION_LESS "13.0.0")
+ ADD_COMPILE_FLAGS(pars/pars0grm.cc fts/fts0pars.cc
+ COMPILE_FLAGS "-Wno-unused-but-set-variable")
+ENDIF()
IF(NOT (PLUGIN_INNOBASE STREQUAL DYNAMIC))
ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/extra/mariabackup ${CMAKE_BINARY_DIR}/extra/mariabackup)
diff --git a/storage/innobase/btr/btr0btr.cc b/storage/innobase/btr/btr0btr.cc
index 2bba68f0f37..f041e35e501 100644
--- a/storage/innobase/btr/btr0btr.cc
+++ b/storage/innobase/btr/btr0btr.cc
@@ -876,7 +876,7 @@ btr_page_get_father_node_ptr_func(
err = btr_cur_search_to_nth_level(
index, level + 1, tuple,
- PAGE_CUR_LE, latch_mode, cursor, 0,
+ PAGE_CUR_LE, latch_mode, cursor,
file, line, mtr);
if (err != DB_SUCCESS) {
@@ -2380,7 +2380,7 @@ btr_insert_on_non_leaf_level_func(
dberr_t err = btr_cur_search_to_nth_level(
index, level, tuple, PAGE_CUR_LE,
BTR_CONT_MODIFY_TREE,
- &cursor, 0, file, line, mtr);
+ &cursor, file, line, mtr);
if (err != DB_SUCCESS) {
ib::warn() << " Error code: " << err
@@ -2401,7 +2401,7 @@ btr_insert_on_non_leaf_level_func(
btr_cur_search_to_nth_level(index, level, tuple,
PAGE_CUR_RTREE_INSERT,
BTR_CONT_MODIFY_TREE,
- &cursor, 0, file, line, mtr);
+ &cursor, file, line, mtr);
}
ut_ad(cursor.flag == BTR_CUR_BINARY);
diff --git a/storage/innobase/btr/btr0bulk.cc b/storage/innobase/btr/btr0bulk.cc
index fdeba1e375b..0b53438feb7 100644
--- a/storage/innobase/btr/btr0bulk.cc
+++ b/storage/innobase/btr/btr0bulk.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 2014, 2019, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, 2021, MariaDB Corporation.
+Copyright (c) 2017, 2022, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -597,6 +597,11 @@ bool
PageBulk::isSpaceAvailable(
ulint rec_size)
{
+ if (m_rec_no >= 8190) {
+ ut_ad(srv_page_size == 65536);
+ return false;
+ }
+
ulint slot_size;
ulint required_space;
diff --git a/storage/innobase/btr/btr0cur.cc b/storage/innobase/btr/btr0cur.cc
index 95ac5db4e70..8788094ec0a 100644
--- a/storage/innobase/btr/btr0cur.cc
+++ b/storage/innobase/btr/btr0cur.cc
@@ -1102,38 +1102,36 @@ If mode is PAGE_CUR_GE, then up_match will a have a sensible value.
If mode is PAGE_CUR_LE , cursor is left at the place where an insert of the
search tuple should be performed in the B-tree. InnoDB does an insert
immediately after the cursor. Thus, the cursor may end up on a user record,
-or on a page infimum record. */
-dberr_t
-btr_cur_search_to_nth_level_func(
- dict_index_t* index, /*!< in: index */
- ulint level, /*!< in: the tree level of search */
- const dtuple_t* tuple, /*!< in: data tuple; NOTE: n_fields_cmp in
- tuple must be set so that it cannot get
- compared to the node ptr page number field! */
- page_cur_mode_t mode, /*!< in: PAGE_CUR_L, ...;
- Inserts should always be made using
- PAGE_CUR_LE to search the position! */
- ulint latch_mode, /*!< in: BTR_SEARCH_LEAF, ..., ORed with
- at most one of BTR_INSERT, BTR_DELETE_MARK,
- BTR_DELETE, or BTR_ESTIMATE;
- cursor->left_block is used to store a pointer
- to the left neighbor page, in the cases
- BTR_SEARCH_PREV and BTR_MODIFY_PREV;
- NOTE that if ahi_latch, we might not have a
- cursor page latch, we assume that ahi_latch
- protects the record! */
- btr_cur_t* cursor, /*!< in/out: tree cursor; the cursor page is
- s- or x-latched, but see also above! */
-#ifdef BTR_CUR_HASH_ADAPT
- rw_lock_t* ahi_latch,
- /*!< in: currently held btr_search_latch
- (in RW_S_LATCH mode), or NULL */
-#endif /* BTR_CUR_HASH_ADAPT */
- const char* file, /*!< in: file name */
- unsigned line, /*!< in: line where called */
- mtr_t* mtr, /*!< in: mtr */
- ib_uint64_t autoinc)/*!< in: PAGE_ROOT_AUTO_INC to be written
- (0 if none) */
+or on a page infimum record.
+@param index index
+@param level the tree level of search
+@param tuple data tuple; NOTE: n_fields_cmp in tuple must be set so that
+ it cannot get compared to the node ptr page number field!
+@param mode PAGE_CUR_L, NOTE that if the search is made using a unique
+ prefix of a record, mode should be PAGE_CUR_LE, not
+ PAGE_CUR_GE, as the latter may end up on the previous page of
+ the record! Inserts should always be made using PAGE_CUR_LE
+ to search the position!
+@param latch_mode BTR_SEARCH_LEAF, ..., ORed with at most one of BTR_INSERT,
+ BTR_DELETE_MARK, BTR_DELETE, or BTR_ESTIMATE;
+ cursor->left_block is used to store a pointer to the left
+ neighbor page, in the cases BTR_SEARCH_PREV and
+ BTR_MODIFY_PREV; NOTE that if ahi_latch, we might not have a
+ cursor page latch, we assume that ahi_latch protects the
+ record!
+@param cursor tree cursor; the cursor page is s- or x-latched, but see also
+ above!
+@param file file name
+@param line line where called
+@param mtr mini-transaction
+@param autoinc PAGE_ROOT_AUTO_INC to be written (0 if none)
+@return DB_SUCCESS on success or error code otherwise */
+dberr_t btr_cur_search_to_nth_level(dict_index_t *index, ulint level,
+ const dtuple_t *tuple,
+ page_cur_mode_t mode, ulint latch_mode,
+ btr_cur_t *cursor, const char *file,
+ unsigned line, mtr_t *mtr,
+ ib_uint64_t autoinc)
{
page_t* page = NULL; /* remove warning */
buf_block_t* block;
@@ -1301,15 +1299,14 @@ btr_cur_search_to_nth_level_func(
&& mode != PAGE_CUR_LE_OR_EXTENDS
# endif /* PAGE_CUR_LE_OR_EXTENDS */
&& !dict_index_is_spatial(index)
- /* If !ahi_latch, we do a dirty read of
+ /* We do a dirty read of
btr_search_enabled below, and btr_search_guess_on_hash()
will have to check it again. */
&& btr_search_enabled
&& !modify_external
&& !(tuple->info_bits & REC_INFO_MIN_REC_FLAG)
&& btr_search_guess_on_hash(index, info, tuple, mode,
- latch_mode, cursor,
- ahi_latch, mtr)) {
+ latch_mode, cursor, mtr)) {
/* Search using the hash index succeeded */
@@ -1330,13 +1327,6 @@ btr_cur_search_to_nth_level_func(
/* If the hash search did not succeed, do binary search down the
tree */
-#ifdef BTR_CUR_HASH_ADAPT
- if (ahi_latch) {
- /* Release possible search latch to obey latching order */
- rw_lock_s_unlock(ahi_latch);
- }
-#endif /* BTR_CUR_HASH_ADAPT */
-
/* Store the position of the tree latch we push to mtr so that we
know how to release it when we have latched leaf node(s) */
@@ -2397,12 +2387,6 @@ func_exit:
cursor->rtr_info->mbr_adj = true;
}
-#ifdef BTR_CUR_HASH_ADAPT
- if (ahi_latch) {
- rw_lock_s_lock(ahi_latch);
- }
-#endif /* BTR_CUR_HASH_ADAPT */
-
DBUG_RETURN(err);
}
@@ -6232,8 +6216,7 @@ btr_estimate_n_rows_in_range_low(
btr_cur_search_to_nth_level(index, 0, tuple1, mode1,
BTR_SEARCH_LEAF | BTR_ESTIMATE,
- &cursor, 0,
- __FILE__, __LINE__, &mtr);
+ &cursor, __FILE__, __LINE__, &mtr);
ut_ad(!page_rec_is_infimum(btr_cur_get_rec(&cursor)));
@@ -6286,8 +6269,7 @@ btr_estimate_n_rows_in_range_low(
btr_cur_search_to_nth_level(index, 0, tuple2, mode2,
BTR_SEARCH_LEAF | BTR_ESTIMATE,
- &cursor, 0,
- __FILE__, __LINE__, &mtr);
+ &cursor, __FILE__, __LINE__, &mtr);
const rec_t* rec = btr_cur_get_rec(&cursor);
diff --git a/storage/innobase/btr/btr0pcur.cc b/storage/innobase/btr/btr0pcur.cc
index 53963caa023..ac6cd298097 100644
--- a/storage/innobase/btr/btr0pcur.cc
+++ b/storage/innobase/btr/btr0pcur.cc
@@ -424,11 +424,7 @@ btr_pcur_t::restore_position(ulint restore_latch_mode, const char *file,
}
btr_pcur_open_with_no_init_func(index, tuple, mode, restore_latch_mode,
- this,
-#ifdef BTR_CUR_HASH_ADAPT
- NULL,
-#endif /* BTR_CUR_HASH_ADAPT */
- file, line, mtr);
+ this, file, line, mtr);
/* Restore the old search mode */
search_mode = old_mode;
diff --git a/storage/innobase/btr/btr0sea.cc b/storage/innobase/btr/btr0sea.cc
index 4b4bba9a941..ff5a0e1e737 100644
--- a/storage/innobase/btr/btr0sea.cc
+++ b/storage/innobase/btr/btr0sea.cc
@@ -895,8 +895,6 @@ both have sensible values.
we assume the caller uses his search latch
to protect the record!
@param[out] cursor tree cursor
-@param[in] ahi_latch the adaptive hash index latch being held,
- or NULL
@param[in] mtr mini transaction
@return whether the search succeeded */
bool
@@ -907,7 +905,6 @@ btr_search_guess_on_hash(
ulint mode,
ulint latch_mode,
btr_cur_t* cursor,
- rw_lock_t* ahi_latch,
mtr_t* mtr)
{
ulint fold;
@@ -916,8 +913,6 @@ btr_search_guess_on_hash(
btr_cur_t cursor2;
btr_pcur_t pcur;
#endif
- ut_ad(!ahi_latch || rw_lock_own_flagged(
- ahi_latch, RW_LOCK_FLAG_X | RW_LOCK_FLAG_S));
if (!btr_search_enabled) {
return false;
@@ -925,7 +920,6 @@ btr_search_guess_on_hash(
ut_ad(index && info && tuple && cursor && mtr);
ut_ad(!dict_index_is_ibuf(index));
- ut_ad(!ahi_latch || ahi_latch == btr_get_search_latch(index));
ut_ad((latch_mode == BTR_SEARCH_LEAF)
|| (latch_mode == BTR_MODIFY_LEAF));
@@ -956,28 +950,21 @@ btr_search_guess_on_hash(
cursor->fold = fold;
cursor->flag = BTR_CUR_HASH;
- rw_lock_t* use_latch = ahi_latch ? NULL : btr_get_search_latch(index);
+ rw_lock_t* ahi_latch = btr_get_search_latch(index);
const rec_t* rec;
- if (use_latch) {
- rw_lock_s_lock(use_latch);
+ rw_lock_s_lock(ahi_latch);
- if (!btr_search_enabled) {
- goto fail;
- }
- } else {
- ut_ad(btr_search_enabled);
- ut_ad(rw_lock_own(ahi_latch, RW_LOCK_S));
+ if (!btr_search_enabled) {
+ goto fail;
}
rec = static_cast<const rec_t*>(
ha_search_and_get_data(btr_get_search_table(index), fold));
if (!rec) {
- if (use_latch) {
fail:
- rw_lock_s_unlock(use_latch);
- }
+ rw_lock_s_unlock(ahi_latch);
btr_search_failure(info, cursor);
return false;
@@ -985,25 +972,19 @@ fail:
buf_block_t* block = buf_block_from_ahi(rec);
- if (use_latch) {
- if (!buf_page_get_known_nowait(
- latch_mode, block, BUF_MAKE_YOUNG,
- __FILE__, __LINE__, mtr)) {
- goto fail;
- }
+ if (!buf_page_get_known_nowait(latch_mode, block, BUF_MAKE_YOUNG,
+ __FILE__, __LINE__, mtr)) {
+ goto fail;
+ }
- const bool fail = index != block->index
- && index_id == block->index->id;
- ut_a(!fail || block->index->freed());
- rw_lock_s_unlock(use_latch);
+ const bool fail = index != block->index
+ && index_id == block->index->id;
+ ut_a(!fail || block->index->freed());
+ ut_ad(fail || !block->page.file_page_was_freed);
+ rw_lock_s_unlock(ahi_latch);
- buf_block_dbg_add_level(block, SYNC_TREE_NODE_FROM_HASH);
- if (UNIV_UNLIKELY(fail)) {
- goto fail_and_release_page;
- }
- } else if (UNIV_UNLIKELY(index != block->index
- && index_id == block->index->id)) {
- ut_a(block->index->freed());
+ buf_block_dbg_add_level(block, SYNC_TREE_NODE_FROM_HASH);
+ if (UNIV_UNLIKELY(fail)) {
goto fail_and_release_page;
}
@@ -1012,9 +993,7 @@ fail:
ut_ad(buf_block_get_state(block) == BUF_BLOCK_REMOVE_HASH);
fail_and_release_page:
- if (!ahi_latch) {
- btr_leaf_page_release(block, latch_mode, mtr);
- }
+ btr_leaf_page_release(block, latch_mode, mtr);
btr_search_failure(info, cursor);
return false;
@@ -1032,7 +1011,7 @@ fail_and_release_page:
record to determine if our guess for the cursor position is
right. */
if (index_id != btr_page_get_index_id(block->frame)
- || !btr_search_check_guess(cursor, !!ahi_latch, tuple, mode)) {
+ || !btr_search_check_guess(cursor, 0, tuple, mode)) {
goto fail_and_release_page;
}
@@ -1081,7 +1060,7 @@ fail_and_release_page:
#ifdef UNIV_SEARCH_PERF_STAT
btr_search_n_succ++;
#endif
- if (!ahi_latch && buf_page_peek_if_too_old(&block->page)) {
+ if (buf_page_peek_if_too_old(&block->page)) {
buf_page_make_young(&block->page);
}
diff --git a/storage/innobase/buf/buf0buf.cc b/storage/innobase/buf/buf0buf.cc
index c50c645342a..01111157920 100644
--- a/storage/innobase/buf/buf0buf.cc
+++ b/storage/innobase/buf/buf0buf.cc
@@ -4815,6 +4815,10 @@ buf_page_get_known_nowait(
ut_a(buf_block_get_state(block) == BUF_BLOCK_FILE_PAGE);
+ /* The check for the page was not freed would already have been
+ performed when the block descriptor was acquired by the thread for the
+ first time.*/
+
buf_block_buf_fix_inc(block, file, line);
buf_page_set_accessed(&block->page);
@@ -4861,24 +4865,6 @@ buf_page_get_known_nowait(
ut_a(buf_block_get_state(block) == BUF_BLOCK_FILE_PAGE);
#endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */
-#ifdef UNIV_DEBUG
- if (mode != BUF_KEEP_OLD) {
- /* If mode == BUF_KEEP_OLD, we are executing an I/O
- completion routine. Avoid a bogus assertion failure
- when ibuf_merge_or_delete_for_page() is processing a
- page that was just freed due to DROP INDEX, or
- deleting a record from SYS_INDEXES. This check will be
- skipped in recv_recover_page() as well. */
-
-# ifdef BTR_CUR_HASH_ADAPT
- ut_ad(!block->page.file_page_was_freed
- || btr_search_check_marked_free_index(block));
-# else /* BTR_CUR_HASH_ADAPT */
- ut_ad(!block->page.file_page_was_freed);
-# endif /* BTR_CUR_HASH_ADAPT */
- }
-#endif /* UNIV_DEBUG */
-
buf_pool->stat.n_page_gets++;
return(TRUE);
diff --git a/storage/innobase/dict/dict0dict.cc b/storage/innobase/dict/dict0dict.cc
index eb0f10d55f4..d843115082e 100644
--- a/storage/innobase/dict/dict0dict.cc
+++ b/storage/innobase/dict/dict0dict.cc
@@ -5435,7 +5435,7 @@ dict_set_corrupted(
btr_cur_search_to_nth_level(sys_index, 0, tuple, PAGE_CUR_LE,
BTR_MODIFY_LEAF,
- &cursor, 0, __FILE__, __LINE__, &mtr);
+ &cursor, __FILE__, __LINE__, &mtr);
if (cursor.low_match == dtuple_get_n_fields(tuple)) {
/* UPDATE SYS_INDEXES SET TYPE=index->type
@@ -5538,7 +5538,7 @@ dict_index_set_merge_threshold(
btr_cur_search_to_nth_level(sys_index, 0, tuple, PAGE_CUR_GE,
BTR_MODIFY_LEAF,
- &cursor, 0, __FILE__, __LINE__, &mtr);
+ &cursor, __FILE__, __LINE__, &mtr);
if (cursor.up_match == dtuple_get_n_fields(tuple)
&& rec_get_n_fields_old(btr_cur_get_rec(&cursor))
diff --git a/storage/innobase/fts/fts0fts.cc b/storage/innobase/fts/fts0fts.cc
index b16bb6611b0..dc8d529d79c 100644
--- a/storage/innobase/fts/fts0fts.cc
+++ b/storage/innobase/fts/fts0fts.cc
@@ -3437,7 +3437,7 @@ fts_add_doc_by_id(
btr_pcur_open_with_no_init(
fts_id_index, tuple, PAGE_CUR_LE, BTR_SEARCH_LEAF,
- &pcur, 0, &mtr);
+ &pcur, &mtr);
/* If we have a match, add the data to doc structure */
if (btr_pcur_get_low_match(&pcur) == 1) {
@@ -3475,7 +3475,7 @@ fts_add_doc_by_id(
btr_pcur_open_with_no_init(
clust_index, clust_ref, PAGE_CUR_LE,
- BTR_SEARCH_LEAF, &clust_pcur, 0, &mtr);
+ BTR_SEARCH_LEAF, &clust_pcur, &mtr);
doc_pcur = &clust_pcur;
clust_rec = btr_pcur_get_rec(&clust_pcur);
diff --git a/storage/innobase/gis/gis0sea.cc b/storage/innobase/gis/gis0sea.cc
index e5ba43faa0b..5e52b7a70c4 100644
--- a/storage/innobase/gis/gis0sea.cc
+++ b/storage/innobase/gis/gis0sea.cc
@@ -588,7 +588,7 @@ rtr_pcur_open_low(
}
btr_cur_search_to_nth_level(index, level, tuple, mode, latch_mode,
- btr_cursor, 0, file, line, mtr);
+ btr_cursor, file, line, mtr);
cursor->pos_state = BTR_PCUR_IS_POSITIONED;
cursor->trx_if_known = NULL;
@@ -756,8 +756,7 @@ static void rtr_get_father_node(
/* root split, and search the new root */
btr_cur_search_to_nth_level(
index, level, tuple, PAGE_CUR_RTREE_LOCATE,
- BTR_CONT_MODIFY_TREE, btr_cur, 0,
- __FILE__, __LINE__, mtr);
+ BTR_CONT_MODIFY_TREE, btr_cur, __FILE__, __LINE__, mtr);
} else {
/* btr_validate */
@@ -766,8 +765,7 @@ static void rtr_get_father_node(
btr_cur_search_to_nth_level(
index, level, tuple, PAGE_CUR_RTREE_LOCATE,
- BTR_CONT_MODIFY_TREE, btr_cur, 0,
- __FILE__, __LINE__, mtr);
+ BTR_CONT_MODIFY_TREE, btr_cur, __FILE__, __LINE__, mtr);
rec = btr_cur_get_rec(btr_cur);
n_fields = dtuple_get_n_fields_cmp(tuple);
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index 9ce1915b2cd..0fe60ccabe6 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -21138,7 +21138,8 @@ innobase_get_computed_value(
TABLE* mysql_table,
byte* mysql_rec,
const dict_table_t* old_table,
- const upd_t* update)
+ const upd_t* update,
+ bool ignore_warnings)
{
byte rec_buf2[REC_VERSION_56_MAX_INDEX_COL_LEN];
byte* buf;
@@ -21236,7 +21237,9 @@ innobase_get_computed_value(
MY_BITMAP *old_write_set = dbug_tmp_use_all_columns(mysql_table, &mysql_table->write_set);
MY_BITMAP *old_read_set = dbug_tmp_use_all_columns(mysql_table, &mysql_table->read_set);
- ret = mysql_table->update_virtual_field(mysql_table->field[col->m_col.ind]);
+ ret = mysql_table->update_virtual_field(
+ mysql_table->field[col->m_col.ind],
+ ignore_warnings);
dbug_tmp_restore_column_map(&mysql_table->read_set, old_read_set);
dbug_tmp_restore_column_map(&mysql_table->write_set, old_write_set);
diff --git a/storage/innobase/include/btr0cur.h b/storage/innobase/include/btr0cur.h
index db903df925c..5755c7c5bcf 100644
--- a/storage/innobase/include/btr0cur.h
+++ b/storage/innobase/include/btr0cur.h
@@ -170,56 +170,41 @@ btr_cur_optimistic_latch_leaves(
unsigned line,
mtr_t* mtr);
-/********************************************************************//**
-Searches an index tree and positions a tree cursor on a given level.
+/** Searches an index tree and positions a tree cursor on a given level.
NOTE: n_fields_cmp in tuple must be set so that it cannot be compared
to node pointer page number fields on the upper levels of the tree!
Note that if mode is PAGE_CUR_LE, which is used in inserts, then
cursor->up_match and cursor->low_match both will have sensible values.
-If mode is PAGE_CUR_GE, then up_match will a have a sensible value. */
-dberr_t
-btr_cur_search_to_nth_level_func(
- dict_index_t* index, /*!< in: index */
- ulint level, /*!< in: the tree level of search */
- const dtuple_t* tuple, /*!< in: data tuple; NOTE: n_fields_cmp in
- tuple must be set so that it cannot get
- compared to the node ptr page number field! */
- page_cur_mode_t mode, /*!< in: PAGE_CUR_L, ...;
- NOTE that if the search is made using a unique
- prefix of a record, mode should be PAGE_CUR_LE,
- not PAGE_CUR_GE, as the latter may end up on
- the previous page of the record! Inserts
- should always be made using PAGE_CUR_LE to
- search the position! */
- ulint latch_mode, /*!< in: BTR_SEARCH_LEAF, ..., ORed with
- at most one of BTR_INSERT, BTR_DELETE_MARK,
- BTR_DELETE, or BTR_ESTIMATE;
- cursor->left_block is used to store a pointer
- to the left neighbor page, in the cases
- BTR_SEARCH_PREV and BTR_MODIFY_PREV;
- NOTE that if ahi_latch, we might not have a
- cursor page latch, we assume that ahi_latch
- protects the record! */
- btr_cur_t* cursor, /*!< in/out: tree cursor; the cursor page is
- s- or x-latched, but see also above! */
-#ifdef BTR_CUR_HASH_ADAPT
- rw_lock_t* ahi_latch,
- /*!< in: currently held btr_search_latch
- (in RW_S_LATCH mode), or NULL */
-#endif /* BTR_CUR_HASH_ADAPT */
- const char* file, /*!< in: file name */
- unsigned line, /*!< in: line where called */
- mtr_t* mtr, /*!< in/out: mini-transaction */
- ib_uint64_t autoinc = 0);
- /*!< in: PAGE_ROOT_AUTO_INC to be written
- (0 if none) */
-#ifdef BTR_CUR_HASH_ADAPT
-# define btr_cur_search_to_nth_level(i,l,t,m,lm,c,a,fi,li,mtr) \
- btr_cur_search_to_nth_level_func(i,l,t,m,lm,c,a,fi,li,mtr)
-#else /* BTR_CUR_HASH_ADAPT */
-# define btr_cur_search_to_nth_level(i,l,t,m,lm,c,a,fi,li,mtr) \
- btr_cur_search_to_nth_level_func(i,l,t,m,lm,c,fi,li,mtr)
-#endif /* BTR_CUR_HASH_ADAPT */
+If mode is PAGE_CUR_GE, then up_match will a have a sensible value.
+@param index index
+@param level the tree level of search
+@param tuple data tuple; NOTE: n_fields_cmp in tuple must be set so that
+ it cannot get compared to the node ptr page number field!
+@param mode PAGE_CUR_L, NOTE that if the search is made using a unique
+ prefix of a record, mode should be PAGE_CUR_LE, not
+ PAGE_CUR_GE, as the latter may end up on the previous page of
+ the record! Inserts should always be made using PAGE_CUR_LE
+ to search the position!
+@param latch_mode BTR_SEARCH_LEAF, ..., ORed with at most one of BTR_INSERT,
+ BTR_DELETE_MARK, BTR_DELETE, or BTR_ESTIMATE;
+ cursor->left_block is used to store a pointer to the left
+ neighbor page, in the cases BTR_SEARCH_PREV and
+ BTR_MODIFY_PREV; NOTE that if ahi_latch, we might not have a
+ cursor page latch, we assume that ahi_latch protects the
+ record!
+@param cursor tree cursor; the cursor page is s- or x-latched, but see also
+ above!
+@param file file name
+@param line line where called
+@param mtr mini-transaction
+@param autoinc PAGE_ROOT_AUTO_INC to be written (0 if none)
+@return DB_SUCCESS on success or error code otherwise */
+dberr_t btr_cur_search_to_nth_level(dict_index_t *index, ulint level,
+ const dtuple_t *tuple,
+ page_cur_mode_t mode, ulint latch_mode,
+ btr_cur_t *cursor, const char *file,
+ unsigned line, mtr_t *mtr,
+ ib_uint64_t autoinc= 0);
/*****************************************************************//**
Opens a cursor at either end of an index.
diff --git a/storage/innobase/include/btr0pcur.h b/storage/innobase/include/btr0pcur.h
index bbb9831ae93..ca17dd95aa7 100644
--- a/storage/innobase/include/btr0pcur.h
+++ b/storage/innobase/include/btr0pcur.h
@@ -116,41 +116,30 @@ btr_pcur_open_low(
mtr_t* mtr); /*!< in: mtr */
#define btr_pcur_open(i,t,md,l,c,m) \
btr_pcur_open_low(i,0,t,md,l,c,__FILE__,__LINE__,0,m)
-/**************************************************************//**
-Opens an persistent cursor to an index tree without initializing the
-cursor. */
+/** Opens an persistent cursor to an index tree without initializing the
+cursor.
+@param index index
+@param tuple tuple on which search done
+@param mode PAGE_CUR_L, ...; NOTE that if the search is made using a
+ unique prefix of a record, mode should be PAGE_CUR_LE, not
+ PAGE_CUR_GE, as the latter may end up on the previous page of
+ the record!
+@param latch_mode BTR_SEARCH_LEAF, ...; NOTE that if ahi_latch then we might
+ not acquire a cursor page latch, but assume that the
+ ahi_latch protects the record!
+@param cursor memory buffer for persistent cursor
+@param file file name
+@param line line where called
+@param mtr mtr
+@return DB_SUCCESS on success or error code otherwise. */
UNIV_INLINE
-dberr_t
-btr_pcur_open_with_no_init_func(
-/*============================*/
- dict_index_t* index, /*!< in: index */
- const dtuple_t* tuple, /*!< in: tuple on which search done */
- page_cur_mode_t mode, /*!< in: PAGE_CUR_L, ...;
- NOTE that if the search is made using a unique
- prefix of a record, mode should be
- PAGE_CUR_LE, not PAGE_CUR_GE, as the latter
- may end up on the previous page of the
- record! */
- ulint latch_mode,/*!< in: BTR_SEARCH_LEAF, ...;
- NOTE that if ahi_latch then we might not
- acquire a cursor page latch, but assume
- that the ahi_latch protects the record! */
- btr_pcur_t* cursor, /*!< in: memory buffer for persistent cursor */
-#ifdef BTR_CUR_HASH_ADAPT
- rw_lock_t* ahi_latch,
- /*!< in: adaptive hash index latch held
- by the caller, or NULL if none */
-#endif /* BTR_CUR_HASH_ADAPT */
- const char* file, /*!< in: file name */
- unsigned line, /*!< in: line where called */
- mtr_t* mtr); /*!< in: mtr */
-#ifdef BTR_CUR_HASH_ADAPT
-# define btr_pcur_open_with_no_init(ix,t,md,l,cur,ahi,m) \
- btr_pcur_open_with_no_init_func(ix,t,md,l,cur,ahi,__FILE__,__LINE__,m)
-#else /* BTR_CUR_HASH_ADAPT */
-# define btr_pcur_open_with_no_init(ix,t,md,l,cur,ahi,m) \
+dberr_t btr_pcur_open_with_no_init_func(dict_index_t *index,
+ const dtuple_t *tuple,
+ page_cur_mode_t mode, ulint latch_mode,
+ btr_pcur_t *cursor, const char *file,
+ unsigned line, mtr_t *mtr);
+# define btr_pcur_open_with_no_init(ix,t,md,l,cur,m) \
btr_pcur_open_with_no_init_func(ix,t,md,l,cur,__FILE__,__LINE__,m)
-#endif /* BTR_CUR_HASH_ADAPT */
/*****************************************************************//**
Opens a persistent cursor at either end of an index. */
diff --git a/storage/innobase/include/btr0pcur.inl b/storage/innobase/include/btr0pcur.inl
index d93da475a1f..05f61b903ff 100644
--- a/storage/innobase/include/btr0pcur.inl
+++ b/storage/innobase/include/btr0pcur.inl
@@ -438,11 +438,8 @@ btr_pcur_open_low(
ut_ad(!dict_index_is_spatial(index));
- err = btr_cur_search_to_nth_level_func(
+ err = btr_cur_search_to_nth_level(
index, level, tuple, mode, latch_mode, btr_cursor,
-#ifdef BTR_CUR_HASH_ADAPT
- NULL,
-#endif /* BTR_CUR_HASH_ADAPT */
file, line, mtr, autoinc);
if (UNIV_UNLIKELY(err != DB_SUCCESS)) {
@@ -462,34 +459,28 @@ btr_pcur_open_low(
return(err);
}
-/**************************************************************//**
-Opens an persistent cursor to an index tree without initializing the
-cursor. */
+/** Opens an persistent cursor to an index tree without initializing the
+cursor.
+@param index index
+@param tuple tuple on which search done
+@param mode PAGE_CUR_L, ...; NOTE that if the search is made using a
+ unique prefix of a record, mode should be PAGE_CUR_LE, not
+ PAGE_CUR_GE, as the latter may end up on the previous page of
+ the record!
+@param latch_mode BTR_SEARCH_LEAF, ...; NOTE that if ahi_latch then we might
+ not acquire a cursor page latch, but assume that the
+ ahi_latch protects the record!
+@param cursor memory buffer for persistent cursor
+@param file file name
+@param line line where called
+@param mtr mtr
+@return DB_SUCCESS on success or error code otherwise. */
UNIV_INLINE
-dberr_t
-btr_pcur_open_with_no_init_func(
-/*============================*/
- dict_index_t* index, /*!< in: index */
- const dtuple_t* tuple, /*!< in: tuple on which search done */
- page_cur_mode_t mode, /*!< in: PAGE_CUR_L, ...;
- NOTE that if the search is made using a unique
- prefix of a record, mode should be
- PAGE_CUR_LE, not PAGE_CUR_GE, as the latter
- may end up on the previous page of the
- record! */
- ulint latch_mode,/*!< in: BTR_SEARCH_LEAF, ...;
- NOTE that if ahi_latch then we might not
- acquire a cursor page latch, but assume
- that the ahi_latch protects the record! */
- btr_pcur_t* cursor, /*!< in: memory buffer for persistent cursor */
-#ifdef BTR_CUR_HASH_ADAPT
- rw_lock_t* ahi_latch,
- /*!< in: adaptive hash index latch held
- by the caller, or NULL if none */
-#endif /* BTR_CUR_HASH_ADAPT */
- const char* file, /*!< in: file name */
- unsigned line, /*!< in: line where called */
- mtr_t* mtr) /*!< in: mtr */
+dberr_t btr_pcur_open_with_no_init_func(dict_index_t *index,
+ const dtuple_t *tuple,
+ page_cur_mode_t mode, ulint latch_mode,
+ btr_pcur_t *cursor, const char *file,
+ unsigned line, mtr_t *mtr)
{
btr_cur_t* btr_cursor;
dberr_t err = DB_SUCCESS;
@@ -501,11 +492,8 @@ btr_pcur_open_with_no_init_func(
btr_cursor = btr_pcur_get_btr_cur(cursor);
- err = btr_cur_search_to_nth_level_func(
+ err = btr_cur_search_to_nth_level(
index, 0, tuple, mode, latch_mode, btr_cursor,
-#ifdef BTR_CUR_HASH_ADAPT
- ahi_latch,
-#endif /* BTR_CUR_HASH_ADAPT */
file, line, mtr);
cursor->pos_state = BTR_PCUR_IS_POSITIONED;
diff --git a/storage/innobase/include/btr0sea.h b/storage/innobase/include/btr0sea.h
index 8277be8ac14..f217f8213f8 100644
--- a/storage/innobase/include/btr0sea.h
+++ b/storage/innobase/include/btr0sea.h
@@ -80,7 +80,6 @@ btr_search_guess_on_hash(
ulint mode,
ulint latch_mode,
btr_cur_t* cursor,
- rw_lock_t* ahi_latch,
mtr_t* mtr);
/** Move or delete hash entries for moved records, usually in a page split.
diff --git a/storage/innobase/include/row0mysql.h b/storage/innobase/include/row0mysql.h
index 3e5a7a77333..07f0f56093c 100644
--- a/storage/innobase/include/row0mysql.h
+++ b/storage/innobase/include/row0mysql.h
@@ -916,7 +916,9 @@ void innobase_report_computed_value_failed(dtuple_t *row);
@param[in] old_table during ALTER TABLE, this is the old table
or NULL.
@param[in] update update vector for the parent row
-@param[in] foreign foreign key information
+@param[in] ignore_warnings ignore warnings during calculation. Usually
+ means that a calculation is internal and
+ should have no side effects.
@return the field filled with computed value */
dfield_t*
innobase_get_computed_value(
@@ -929,8 +931,9 @@ innobase_get_computed_value(
THD* thd,
TABLE* mysql_table,
byte* mysql_rec,
- const dict_table_t* old_table,
- const upd_t* update);
+ const dict_table_t* old_table=NULL,
+ const upd_t* update=NULL,
+ bool ignore_warnings=false);
/** Get the computed value by supplying the base column values.
@param[in,out] table the table whose virtual column
diff --git a/storage/innobase/include/row0upd.h b/storage/innobase/include/row0upd.h
index c0139ee7911..9721e975a0a 100644
--- a/storage/innobase/include/row0upd.h
+++ b/storage/innobase/include/row0upd.h
@@ -215,6 +215,8 @@ the equal ordering fields. NOTE: we compare the fields as binary strings!
@param[in] offsets rec_get_offsets(rec,index), or NULL
@param[in] no_sys skip the system columns
DB_TRX_ID and DB_ROLL_PTR
+@param[in] ignore_warnings ignore warnings during vcol calculation, which
+ means that this calculation is internal only
@param[in] trx transaction (for diagnostics),
or NULL
@param[in] heap memory heap from which allocated
@@ -230,11 +232,12 @@ row_upd_build_difference_binary(
const rec_t* rec,
const rec_offs* offsets,
bool no_sys,
+ bool ignore_warnings,
trx_t* trx,
mem_heap_t* heap,
TABLE* mysql_table,
dberr_t* error)
- MY_ATTRIBUTE((nonnull(1,2,3,7,9), warn_unused_result));
+ MY_ATTRIBUTE((nonnull(1,2,3,8,10), warn_unused_result));
/** Apply an update vector to an index entry.
@param[in,out] entry index entry to be updated; the clustered index record
must be covered by a lock or a page latch to prevent
diff --git a/storage/innobase/include/trx0rec.h b/storage/innobase/include/trx0rec.h
index fa084ff274c..992e7645bc7 100644
--- a/storage/innobase/include/trx0rec.h
+++ b/storage/innobase/include/trx0rec.h
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, 2019, MariaDB Corporation.
+Copyright (c) 2017, 2022, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -136,30 +136,6 @@ trx_undo_update_rec_get_update(
mem_heap_t* heap, /*!< in: memory heap from which the memory
needed is allocated */
upd_t** upd); /*!< out, own: update vector */
-/*******************************************************************//**
-Builds a partial row from an update undo log record, for purge.
-It contains the columns which occur as ordering in any index of the table.
-Any missing columns are indicated by col->mtype == DATA_MISSING.
-@return pointer to remaining part of undo record */
-byte*
-trx_undo_rec_get_partial_row(
-/*=========================*/
- const byte* ptr, /*!< in: remaining part in update undo log
- record of a suitable type, at the start of
- the stored index columns;
- NOTE that this copy of the undo log record must
- be preserved as long as the partial row is
- used, as we do NOT copy the data in the
- record! */
- dict_index_t* index, /*!< in: clustered index */
- const upd_t* update, /*!< in: updated columns */
- dtuple_t** row, /*!< out, own: partial row */
- ibool ignore_prefix, /*!< in: flag to indicate if we
- expect blob prefixes in undo. Used
- only in the assertion. */
- mem_heap_t* heap) /*!< in: memory heap from which the memory
- needed is allocated */
- MY_ATTRIBUTE((nonnull, warn_unused_result));
/** Report a RENAME TABLE operation.
@param[in,out] trx transaction
@param[in] table table that is being renamed
diff --git a/storage/innobase/row/row0ins.cc b/storage/innobase/row/row0ins.cc
index 82ecc02f2ec..8330e3ef0c8 100644
--- a/storage/innobase/row/row0ins.cc
+++ b/storage/innobase/row/row0ins.cc
@@ -307,7 +307,7 @@ row_ins_clust_index_entry_by_modify(
}
update = row_upd_build_difference_binary(
- cursor->index, entry, rec, NULL, true,
+ cursor->index, entry, rec, NULL, true, true,
thr_get_trx(thr), heap, mysql_table, &err);
if (err != DB_SUCCESS) {
return(err);
@@ -1137,7 +1137,7 @@ row_ins_foreign_check_on_constraint(
tmp_heap);
btr_pcur_open_with_no_init(clust_index, ref,
PAGE_CUR_LE, BTR_SEARCH_LEAF,
- cascade->pcur, 0, mtr);
+ cascade->pcur, mtr);
clust_rec = btr_pcur_get_rec(cascade->pcur);
clust_block = btr_pcur_get_block(cascade->pcur);
@@ -2958,7 +2958,7 @@ row_ins_sec_index_entry_low(
err = btr_cur_search_to_nth_level(
index, 0, entry, PAGE_CUR_RTREE_INSERT,
search_mode,
- &cursor, 0, __FILE__, __LINE__, &mtr);
+ &cursor, __FILE__, __LINE__, &mtr);
if (mode == BTR_MODIFY_LEAF && rtr_info.mbr_adj) {
mtr_commit(&mtr);
@@ -2977,7 +2977,7 @@ row_ins_sec_index_entry_low(
err = btr_cur_search_to_nth_level(
index, 0, entry, PAGE_CUR_RTREE_INSERT,
search_mode,
- &cursor, 0, __FILE__, __LINE__, &mtr);
+ &cursor, __FILE__, __LINE__, &mtr);
mode = BTR_MODIFY_TREE;
}
@@ -2989,7 +2989,7 @@ row_ins_sec_index_entry_low(
err = btr_cur_search_to_nth_level(
index, 0, entry, PAGE_CUR_LE,
search_mode,
- &cursor, 0, __FILE__, __LINE__, &mtr);
+ &cursor, __FILE__, __LINE__, &mtr);
}
if (err != DB_SUCCESS) {
@@ -3083,7 +3083,7 @@ row_ins_sec_index_entry_low(
index, 0, entry, PAGE_CUR_LE,
(search_mode
& ~(BTR_INSERT | BTR_IGNORE_SEC_UNIQUE)),
- &cursor, 0, __FILE__, __LINE__, &mtr);
+ &cursor, __FILE__, __LINE__, &mtr);
}
if (row_ins_must_modify_rec(&cursor)) {
diff --git a/storage/innobase/row/row0log.cc b/storage/innobase/row/row0log.cc
index 6095d72bb86..aa001a84deb 100644
--- a/storage/innobase/row/row0log.cc
+++ b/storage/innobase/row/row0log.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 2011, 2018, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, 2021, MariaDB Corporation.
+Copyright (c) 2017, 2022, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -2169,6 +2169,7 @@ func_exit:
}
func_exit_committed:
ut_ad(mtr.has_committed());
+ ut_free(pcur.old_rec_buf);
if (error != DB_SUCCESS) {
/* Report the erroneous row using the new
@@ -2247,7 +2248,7 @@ func_exit_committed:
row, NULL, index, heap, ROW_BUILD_NORMAL);
upd_t* update = row_upd_build_difference_binary(
index, entry, btr_pcur_get_rec(&pcur), cur_offsets,
- false, NULL, heap, dup->table, &error);
+ false, false, NULL, heap, dup->table, &error);
if (error != DB_SUCCESS) {
goto func_exit;
}
@@ -2356,7 +2357,8 @@ func_exit_committed:
entry = row_build_index_entry(old_row, old_ext, index, heap);
if (!entry) {
ut_ad(0);
- return(DB_CORRUPTION);
+ error = DB_CORRUPTION;
+ goto func_exit_committed;
}
mtr_start(&mtr);
@@ -3352,7 +3354,7 @@ row_log_apply_op_low(
has_index_lock
? BTR_MODIFY_TREE
: BTR_MODIFY_LEAF,
- &cursor, 0, __FILE__, __LINE__,
+ &cursor, __FILE__, __LINE__,
&mtr);
ut_ad(dict_index_get_n_unique(index) > 0);
@@ -3401,7 +3403,7 @@ row_log_apply_op_low(
index->set_modified(mtr);
btr_cur_search_to_nth_level(
index, 0, entry, PAGE_CUR_LE,
- BTR_MODIFY_TREE, &cursor, 0,
+ BTR_MODIFY_TREE, &cursor,
__FILE__, __LINE__, &mtr);
/* No other thread than the current one
@@ -3504,7 +3506,7 @@ insert_the_rec:
index->set_modified(mtr);
btr_cur_search_to_nth_level(
index, 0, entry, PAGE_CUR_LE,
- BTR_MODIFY_TREE, &cursor, 0,
+ BTR_MODIFY_TREE, &cursor,
__FILE__, __LINE__, &mtr);
}
diff --git a/storage/innobase/row/row0merge.cc b/storage/innobase/row/row0merge.cc
index 3fee9d0e6da..3d729b54f7c 100644
--- a/storage/innobase/row/row0merge.cc
+++ b/storage/innobase/row/row0merge.cc
@@ -163,7 +163,7 @@ public:
btr_cur_search_to_nth_level(m_index, 0, dtuple,
PAGE_CUR_RTREE_INSERT,
BTR_MODIFY_LEAF, &ins_cur,
- 0, __FILE__, __LINE__,
+ __FILE__, __LINE__,
&mtr);
/* It need to update MBR in parent entry,
@@ -179,7 +179,7 @@ public:
btr_cur_search_to_nth_level(
m_index, 0, dtuple,
PAGE_CUR_RTREE_INSERT,
- BTR_MODIFY_TREE, &ins_cur, 0,
+ BTR_MODIFY_TREE, &ins_cur,
__FILE__, __LINE__, &mtr);
}
@@ -202,8 +202,7 @@ public:
m_index, 0, dtuple,
PAGE_CUR_RTREE_INSERT,
BTR_MODIFY_TREE,
- &ins_cur, 0,
- __FILE__, __LINE__, &mtr);
+ &ins_cur, __FILE__, __LINE__, &mtr);
error = btr_cur_pessimistic_insert(
flag, &ins_cur, &ins_offsets,
diff --git a/storage/innobase/row/row0purge.cc b/storage/innobase/row/row0purge.cc
index e46d515e8c2..77e772786d5 100644
--- a/storage/innobase/row/row0purge.cc
+++ b/storage/innobase/row/row0purge.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1997, 2017, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, 2021, MariaDB Corporation.
+Copyright (c) 2017, 2022, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -1004,6 +1004,134 @@ skip_secondaries:
row_purge_upd_exist_or_extern_func(node,undo_rec)
#endif /* UNIV_DEBUG */
+/** Build a partial row from an update undo log record for purge.
+Any columns which occur as ordering in any index of the table are present.
+Any missing columns are indicated by col->mtype == DATA_MISSING.
+
+@param ptr remaining part of the undo log record
+@param index clustered index
+@param node purge node
+@return pointer to remaining part of undo record */
+static byte *row_purge_get_partial(const byte *ptr, const dict_index_t &index,
+ purge_node_t *node)
+{
+ bool first_v_col= true;
+ bool is_undo_log= true;
+
+ ut_ad(index.is_primary());
+ ut_ad(index.n_uniq == node->ref->n_fields);
+
+ node->row= dtuple_create_with_vcol(node->heap, index.table->n_cols,
+ index.table->n_v_cols);
+
+ /* Mark all columns in the row uninitialized, so that
+ we can distinguish missing fields from fields that are SQL NULL. */
+ for (ulint i= 0; i < index.table->n_cols; i++)
+ node->row->fields[i].type.mtype= DATA_MISSING;
+
+ dtuple_init_v_fld(node->row);
+
+ for (const upd_field_t *uf= node->update->fields, *const ue=
+ node->update->fields + node->update->n_fields; uf != ue; uf++)
+ if (!uf->old_v_val)
+ node->row->fields[dict_index_get_nth_col(&index, uf->field_no)->ind]=
+ uf->new_val;
+
+ const byte *end_ptr= ptr + mach_read_from_2(ptr);
+ ptr+= 2;
+
+ while (ptr != end_ptr)
+ {
+ dfield_t *dfield;
+ const byte *field;
+ const dict_col_t *col;
+ ulint len;
+ ulint orig_len;
+
+ ulint field_no= mach_read_next_compressed(&ptr);
+
+ if (field_no >= REC_MAX_N_FIELDS)
+ {
+ ptr= trx_undo_read_v_idx(index.table, ptr, first_v_col, &is_undo_log,
+ &field_no);
+ first_v_col= false;
+
+ ptr= trx_undo_rec_get_col_val(ptr, &field, &len, &orig_len);
+
+ if (field_no == ULINT_UNDEFINED)
+ continue; /* there no longer is an index on the virtual column */
+
+ dict_v_col_t *vcol= dict_table_get_nth_v_col(index.table, field_no);
+ col =&vcol->m_col;
+ dfield= dtuple_get_nth_v_field(node->row, vcol->v_pos);
+ dict_col_copy_type(&vcol->m_col, &dfield->type);
+ }
+ else
+ {
+ ptr= trx_undo_rec_get_col_val(ptr, &field, &len, &orig_len);
+ col= dict_index_get_nth_col(&index, field_no);
+ dfield= dtuple_get_nth_field(node->row, col->ind);
+ ut_ad(dfield->type.mtype == DATA_MISSING ||
+ dict_col_type_assert_equal(col, &dfield->type));
+ ut_ad(dfield->type.mtype == DATA_MISSING ||
+ dfield->len == len ||
+ (len != UNIV_SQL_NULL && len >= UNIV_EXTERN_STORAGE_FIELD));
+ dict_col_copy_type(dict_table_get_nth_col(index.table, col->ind),
+ &dfield->type);
+ }
+
+ dfield_set_data(dfield, field, len);
+
+ if (len == UNIV_SQL_NULL || len < UNIV_EXTERN_STORAGE_FIELD)
+ continue;
+
+ spatial_status_t spatial_status= static_cast<spatial_status_t>
+ ((len & SPATIAL_STATUS_MASK) >> SPATIAL_STATUS_SHIFT);
+ len&= ~SPATIAL_STATUS_MASK;
+
+ /* Keep compatible with 5.7.9 format. */
+ if (spatial_status == SPATIAL_UNKNOWN)
+ spatial_status= dict_col_get_spatial_status(col);
+
+ switch (UNIV_EXPECT(spatial_status, SPATIAL_NONE)) {
+ case SPATIAL_ONLY:
+ ut_ad(len - UNIV_EXTERN_STORAGE_FIELD == DATA_MBR_LEN);
+ dfield_set_len(dfield, len - UNIV_EXTERN_STORAGE_FIELD);
+ break;
+
+ case SPATIAL_MIXED:
+ dfield_set_len(dfield, len - UNIV_EXTERN_STORAGE_FIELD - DATA_MBR_LEN);
+ break;
+
+ default:
+ dfield_set_len(dfield, len - UNIV_EXTERN_STORAGE_FIELD);
+ break;
+ }
+
+ dfield_set_ext(dfield);
+ dfield_set_spatial_status(dfield, spatial_status);
+
+ if (!col->ord_part || spatial_status == SPATIAL_ONLY ||
+ node->rec_type == TRX_UNDO_UPD_DEL_REC)
+ continue;
+ /* If the prefix of this BLOB column is indexed, ensure that enough
+ prefix is stored in the undo log record. */
+ ut_a(dfield_get_len(dfield) >= BTR_EXTERN_FIELD_REF_SIZE);
+ ut_a(dict_table_has_atomic_blobs(index.table) ||
+ dfield_get_len(dfield) >=
+ REC_ANTELOPE_MAX_INDEX_COL_LEN + BTR_EXTERN_FIELD_REF_SIZE);
+ }
+
+ for (ulint i= 0; i < index.n_uniq; i++)
+ {
+ dfield_t &field= node->row->fields[index.fields[i].col->ind];
+ if (field.type.mtype == DATA_MISSING)
+ field= node->ref->fields[i];
+ }
+
+ return const_cast<byte*>(ptr);
+}
+
/***********************************************************//**
Parses the row reference and other info in a modify undo log record.
@return true if purge operation required */
@@ -1153,10 +1281,7 @@ err_exit:
if (!(node->cmpl_info & UPD_NODE_NO_ORD_CHANGE)) {
ut_ad(!(node->update->info_bits & REC_INFO_MIN_REC_FLAG));
- ptr = trx_undo_rec_get_partial_row(
- ptr, clust_index, node->update, &node->row,
- type == TRX_UNDO_UPD_DEL_REC,
- node->heap);
+ ptr = row_purge_get_partial(ptr, *clust_index, node);
} else if (node->update->info_bits & REC_INFO_MIN_REC_FLAG) {
node->ref = &trx_undo_metadata;
}
diff --git a/storage/innobase/row/row0sel.cc b/storage/innobase/row/row0sel.cc
index c718a53db61..ff0f9d47892 100644
--- a/storage/innobase/row/row0sel.cc
+++ b/storage/innobase/row/row0sel.cc
@@ -329,7 +329,8 @@ row_sel_sec_rec_is_for_clust_rec(
&heap, NULL, NULL,
thr_get_trx(thr)->mysql_thd,
thr->prebuilt->m_mysql_table,
- record, NULL, NULL);
+ record, NULL, NULL,
+ true);
if (vfield == NULL) {
innobase_report_computed_value_failed(row);
@@ -985,8 +986,7 @@ row_sel_get_clust_rec(
index = dict_table_get_first_index(plan->table);
btr_pcur_open_with_no_init(index, plan->clust_ref, PAGE_CUR_LE,
- BTR_SEARCH_LEAF, &plan->clust_pcur,
- 0, mtr);
+ BTR_SEARCH_LEAF, &plan->clust_pcur, mtr);
clust_rec = btr_pcur_get_rec(&(plan->clust_pcur));
@@ -1394,8 +1394,7 @@ row_sel_open_pcur(
/* Open pcur to the index */
btr_pcur_open_with_no_init(index, plan->tuple, plan->mode,
- BTR_SEARCH_LEAF, &plan->pcur,
- NULL, mtr);
+ BTR_SEARCH_LEAF, &plan->pcur, mtr);
} else {
/* Open the cursor to the start or the end of the index
(FALSE: no init) */
@@ -3369,7 +3368,7 @@ Row_sel_get_clust_rec_for_mysql::operator()(
btr_pcur_open_with_no_init(clust_index, prebuilt->clust_ref,
PAGE_CUR_LE, BTR_SEARCH_LEAF,
- prebuilt->clust_pcur, 0, mtr);
+ prebuilt->clust_pcur, mtr);
clust_rec = btr_pcur_get_rec(prebuilt->clust_pcur);
@@ -3952,15 +3951,12 @@ row_sel_try_search_shortcut_for_mysql(
ut_ad(dict_index_is_clust(index));
ut_ad(!prebuilt->templ_contains_blob);
- rw_lock_t* ahi_latch = btr_get_search_latch(index);
- rw_lock_s_lock(ahi_latch);
btr_pcur_open_with_no_init(index, search_tuple, PAGE_CUR_GE,
- BTR_SEARCH_LEAF, pcur, ahi_latch, mtr);
+ BTR_SEARCH_LEAF, pcur, mtr);
rec = btr_pcur_get_rec(pcur);
if (!page_rec_is_user_rec(rec) || rec_is_metadata(rec, index)) {
retry:
- rw_lock_s_unlock(ahi_latch);
return(SEL_RETRY);
}
@@ -3970,7 +3966,6 @@ retry:
if (btr_pcur_get_up_match(pcur) < dtuple_get_n_fields(search_tuple)) {
exhausted:
- rw_lock_s_unlock(ahi_latch);
return(SEL_EXHAUSTED);
}
@@ -3994,7 +3989,6 @@ exhausted:
*out_rec = rec;
- rw_lock_s_unlock(ahi_latch);
return(SEL_FOUND);
}
#endif /* BTR_CUR_HASH_ADAPT */
@@ -4728,8 +4722,7 @@ wait_table_again:
}
err = btr_pcur_open_with_no_init(index, search_tuple, mode,
- BTR_SEARCH_LEAF,
- pcur, 0, &mtr);
+ BTR_SEARCH_LEAF, pcur, &mtr);
if (err != DB_SUCCESS) {
rec = NULL;
diff --git a/storage/innobase/row/row0upd.cc b/storage/innobase/row/row0upd.cc
index cadfc181916..599aece23f5 100644
--- a/storage/innobase/row/row0upd.cc
+++ b/storage/innobase/row/row0upd.cc
@@ -1044,6 +1044,7 @@ row_upd_build_difference_binary(
const rec_t* rec,
const rec_offs* offsets,
bool no_sys,
+ bool ignore_warnings,
trx_t* trx,
mem_heap_t* heap,
TABLE* mysql_table,
@@ -1153,7 +1154,7 @@ row_upd_build_difference_binary(
dfield_t* vfield = innobase_get_computed_value(
update->old_vrow, col, index,
&vc.heap, heap, NULL, thd, mysql_table, record,
- NULL, NULL);
+ NULL, NULL, ignore_warnings);
if (vfield == NULL) {
*error = DB_COMPUTE_VALUE_FAILED;
return(NULL);
diff --git a/storage/innobase/trx/trx0rec.cc b/storage/innobase/trx/trx0rec.cc
index d7ec2a38f19..e25ebc3e22a 100644
--- a/storage/innobase/trx/trx0rec.cc
+++ b/storage/innobase/trx/trx0rec.cc
@@ -1655,182 +1655,6 @@ trx_undo_update_rec_get_update(
return(const_cast<byte*>(ptr));
}
-/*******************************************************************//**
-Builds a partial row from an update undo log record, for purge.
-It contains the columns which occur as ordering in any index of the table.
-Any missing columns are indicated by col->mtype == DATA_MISSING.
-@return pointer to remaining part of undo record */
-byte*
-trx_undo_rec_get_partial_row(
-/*=========================*/
- const byte* ptr, /*!< in: remaining part in update undo log
- record of a suitable type, at the start of
- the stored index columns;
- NOTE that this copy of the undo log record must
- be preserved as long as the partial row is
- used, as we do NOT copy the data in the
- record! */
- dict_index_t* index, /*!< in: clustered index */
- const upd_t* update, /*!< in: updated columns */
- dtuple_t** row, /*!< out, own: partial row */
- ibool ignore_prefix, /*!< in: flag to indicate if we
- expect blob prefixes in undo. Used
- only in the assertion. */
- mem_heap_t* heap) /*!< in: memory heap from which the memory
- needed is allocated */
-{
- const byte* end_ptr;
- bool first_v_col = true;
- bool is_undo_log = true;
-
- ut_ad(index->is_primary());
-
- *row = dtuple_create_with_vcol(
- heap, dict_table_get_n_cols(index->table),
- dict_table_get_n_v_cols(index->table));
-
- /* Mark all columns in the row uninitialized, so that
- we can distinguish missing fields from fields that are SQL NULL. */
- for (ulint i = 0; i < dict_table_get_n_cols(index->table); i++) {
- dfield_get_type(dtuple_get_nth_field(*row, i))
- ->mtype = DATA_MISSING;
- }
-
- dtuple_init_v_fld(*row);
-
- for (const upd_field_t* uf = update->fields, * const ue
- = update->fields + update->n_fields;
- uf != ue; uf++) {
- if (uf->old_v_val) {
- continue;
- }
- ulint c = dict_index_get_nth_col(index, uf->field_no)->ind;
- *dtuple_get_nth_field(*row, c) = uf->new_val;
- }
-
- end_ptr = ptr + mach_read_from_2(ptr);
- ptr += 2;
-
- while (ptr != end_ptr) {
- dfield_t* dfield;
- const byte* field;
- ulint field_no;
- const dict_col_t* col;
- ulint col_no;
- ulint len;
- ulint orig_len;
- bool is_virtual;
-
- field_no = mach_read_next_compressed(&ptr);
-
- is_virtual = (field_no >= REC_MAX_N_FIELDS);
-
- if (is_virtual) {
- ptr = trx_undo_read_v_idx(
- index->table, ptr, first_v_col, &is_undo_log,
- &field_no);
- first_v_col = false;
- }
-
- ptr = trx_undo_rec_get_col_val(ptr, &field, &len, &orig_len);
-
- /* This column could be dropped or no longer indexed */
- if (field_no == ULINT_UNDEFINED) {
- ut_ad(is_virtual);
- continue;
- }
-
- if (is_virtual) {
- dict_v_col_t* vcol = dict_table_get_nth_v_col(
- index->table, field_no);
- col = &vcol->m_col;
- col_no = dict_col_get_no(col);
- dfield = dtuple_get_nth_v_field(*row, vcol->v_pos);
- dict_col_copy_type(
- &vcol->m_col,
- dfield_get_type(dfield));
- } else {
- col = dict_index_get_nth_col(index, field_no);
- col_no = dict_col_get_no(col);
- dfield = dtuple_get_nth_field(*row, col_no);
- ut_ad(dfield->type.mtype == DATA_MISSING
- || dict_col_type_assert_equal(col,
- &dfield->type));
- ut_ad(dfield->type.mtype == DATA_MISSING
- || dfield->len == len
- || (len != UNIV_SQL_NULL
- && len >= UNIV_EXTERN_STORAGE_FIELD));
- dict_col_copy_type(
- dict_table_get_nth_col(index->table, col_no),
- dfield_get_type(dfield));
- }
-
- dfield_set_data(dfield, field, len);
-
- if (len != UNIV_SQL_NULL
- && len >= UNIV_EXTERN_STORAGE_FIELD) {
- spatial_status_t spatial_status;
-
- /* Decode spatial status. */
- spatial_status = static_cast<spatial_status_t>(
- (len & SPATIAL_STATUS_MASK)
- >> SPATIAL_STATUS_SHIFT);
- len &= ~SPATIAL_STATUS_MASK;
-
- /* Keep compatible with 5.7.9 format. */
- if (spatial_status == SPATIAL_UNKNOWN) {
- spatial_status =
- dict_col_get_spatial_status(col);
- }
-
- switch (spatial_status) {
- case SPATIAL_ONLY:
- ut_ad(len - UNIV_EXTERN_STORAGE_FIELD
- == DATA_MBR_LEN);
- dfield_set_len(
- dfield,
- len - UNIV_EXTERN_STORAGE_FIELD);
- break;
-
- case SPATIAL_MIXED:
- dfield_set_len(
- dfield,
- len - UNIV_EXTERN_STORAGE_FIELD
- - DATA_MBR_LEN);
- break;
-
- case SPATIAL_NONE:
- dfield_set_len(
- dfield,
- len - UNIV_EXTERN_STORAGE_FIELD);
- break;
-
- case SPATIAL_UNKNOWN:
- ut_ad(0);
- break;
- }
-
- dfield_set_ext(dfield);
- dfield_set_spatial_status(dfield, spatial_status);
-
- /* If the prefix of this column is indexed,
- ensure that enough prefix is stored in the
- undo log record. */
- if (!ignore_prefix && col->ord_part
- && spatial_status != SPATIAL_ONLY) {
- ut_a(dfield_get_len(dfield)
- >= BTR_EXTERN_FIELD_REF_SIZE);
- ut_a(dict_table_has_atomic_blobs(index->table)
- || dfield_get_len(dfield)
- >= REC_ANTELOPE_MAX_INDEX_COL_LEN
- + BTR_EXTERN_FIELD_REF_SIZE);
- }
- }
- }
-
- return(const_cast<byte*>(ptr));
-}
-
/** Erase the unused undo log page end.
@param[in,out] undo_page undo log page
@return whether the page contained something */
diff --git a/storage/innobase/trx/trx0trx.cc b/storage/innobase/trx/trx0trx.cc
index b2cfbd9b4e3..7658af76709 100644
--- a/storage/innobase/trx/trx0trx.cc
+++ b/storage/innobase/trx/trx0trx.cc
@@ -564,8 +564,10 @@ void trx_disconnect_prepared(trx_t *trx)
ut_ad(trx_state_eq(trx, TRX_STATE_PREPARED));
ut_ad(trx->mysql_thd);
trx->read_view.close();
+ mutex_enter(&trx_sys.mutex);
trx->is_recovered= true;
trx->mysql_thd= NULL;
+ mutex_exit(&trx_sys.mutex);
/* todo/fixme: suggest to do it at innodb prepare */
trx->will_lock= false;
}
diff --git a/storage/mroonga/mrn_mysql_compat.h b/storage/mroonga/mrn_mysql_compat.h
index bdb15637e31..ae1feffb6b8 100644
--- a/storage/mroonga/mrn_mysql_compat.h
+++ b/storage/mroonga/mrn_mysql_compat.h
@@ -481,7 +481,7 @@
#ifdef MRN_MARIADB_P
# if (MYSQL_VERSION_ID >= 100203)
# define MRN_GENERATED_COLUMNS_UPDATE_VIRTUAL_FIELD(table, field) \
- (table->update_virtual_field(field))
+ (table->update_virtual_field(field,false))
# else
# define MRN_GENERATED_COLUMNS_UPDATE_VIRTUAL_FIELD(table, field) \
(field->vcol_info->expr_item->save_in_field(field, 0))
diff --git a/storage/myisam/ha_myisam.cc b/storage/myisam/ha_myisam.cc
index d43ba828957..dfb2cc86ec1 100644
--- a/storage/myisam/ha_myisam.cc
+++ b/storage/myisam/ha_myisam.cc
@@ -681,7 +681,7 @@ static int compute_vcols(MI_INFO *info, uchar *record, int keynum)
{
Field *f= table->field[kp->fieldnr - 1];
if (f->vcol_info)
- table->update_virtual_field(f);
+ table->update_virtual_field(f, false);
}
return 0;
}
diff --git a/storage/rocksdb/CMakeLists.txt b/storage/rocksdb/CMakeLists.txt
index 0eca862aaa8..e0c1003b461 100644
--- a/storage/rocksdb/CMakeLists.txt
+++ b/storage/rocksdb/CMakeLists.txt
@@ -4,6 +4,8 @@ SET(CPACK_RPM_rocksdb-engine_PACKAGE_SUMMARY "RocksDB storage engine for MariaDB
SET(CPACK_RPM_rocksdb-engine_PACKAGE_DESCRIPTION "The RocksDB storage engine is a high performance storage engine, aimed
at maximising storage efficiency while maintaining InnoDB-like performance." PARENT_SCOPE)
+MY_CHECK_AND_SET_COMPILER_FLAG(-Wno-range-loop-construct)
+
MACRO(SKIP_ROCKSDB_PLUGIN msg)
MESSAGE_ONCE(SKIP_ROCKSDB_PLUGIN "Can't build rocksdb engine - ${msg}")
ADD_FEATURE_INFO(ROCKSDB "OFF" "Storage Engine")
diff --git a/storage/spider/ha_spider.cc b/storage/spider/ha_spider.cc
index 6559e28c970..7f283560af5 100644
--- a/storage/spider/ha_spider.cc
+++ b/storage/spider/ha_spider.cc
@@ -348,7 +348,7 @@ int ha_spider::open(
may_be_clone = FALSE;
ha_spider **pt_handler_share_handlers;
#ifdef SPIDER_HAS_HASH_VALUE_TYPE
- my_hash_value_type hash_value;
+ my_hash_value_type hash_value = 0;
#endif
#endif
DBUG_ENTER("ha_spider::open");
@@ -425,7 +425,9 @@ int ha_spider::open(
partition_handler_share->between_flg = FALSE;
partition_handler_share->idx_bitmap_is_set = FALSE;
partition_handler_share->rnd_bitmap_is_set = FALSE;
+#ifdef SPIDER_HAS_HASH_VALUE_TYPE
partition_handler_share->table_hash_value = hash_value;
+#endif
partition_handler_share->creator = this;
partition_handler_share->parallel_search_query_id = 0;
pt_handler_share_creator = this;
diff --git a/storage/spider/mysql-test/spider/bugfix/include/restart_spider.inc b/storage/spider/mysql-test/spider/bugfix/include/restart_spider.inc
new file mode 100644
index 00000000000..a5446a6188d
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/include/restart_spider.inc
@@ -0,0 +1,8 @@
+--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.1.1.expect
+
+--exec echo "wait" > $_expect_file_name
+--shutdown_server
+--source include/wait_until_disconnected.inc
+--exec echo "restart" > $_expect_file_name
+--enable_reconnect
+--source include/wait_until_connected_again.inc
diff --git a/storage/spider/mysql-test/spider/bugfix/r/mdev_29352.result b/storage/spider/mysql-test/spider/bugfix/r/mdev_29352.result
new file mode 100644
index 00000000000..5715edf2bd6
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/r/mdev_29352.result
@@ -0,0 +1,12 @@
+CREATE TABLE t (c INT);
+SHOW CREATE TABLE t;
+Table Create Table
+t CREATE TABLE `t` (
+ `c` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+FLUSH TABLES WITH READ LOCK;
+CREATE FUNCTION spider_bg_direct_sql RETURNS INT SONAME 'ha_spider.so';
+ERROR HY000: Can't execute the query because you have a conflicting read lock
+SELECT * FROM t;
+c
+DROP TABLE t;
diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_29352.test b/storage/spider/mysql-test/spider/bugfix/t/mdev_29352.test
new file mode 100644
index 00000000000..00d8ee73ebc
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_29352.test
@@ -0,0 +1,11 @@
+CREATE TABLE t (c INT);
+SHOW CREATE TABLE t;
+FLUSH TABLES WITH READ LOCK;
+
+--error ER_CANT_UPDATE_WITH_READLOCK
+CREATE FUNCTION spider_bg_direct_sql RETURNS INT SONAME 'ha_spider.so';
+SELECT * FROM t;
+
+--source include/restart_spider.inc
+
+DROP TABLE t;
diff --git a/storage/spider/spd_group_by_handler.cc b/storage/spider/spd_group_by_handler.cc
index de041897239..635bff3d415 100644
--- a/storage/spider/spd_group_by_handler.cc
+++ b/storage/spider/spd_group_by_handler.cc
@@ -1857,6 +1857,8 @@ group_by_handler *spider_create_group_by_handler(
{
for (order = query->order_by; order; order = order->next)
{
+ if ((*order->item)->type() == Item::SUM_FUNC_ITEM)
+ continue;
if (spider_db_print_item_type((*order->item), NULL, spider, NULL, NULL, 0,
roop_count, TRUE, fields_arg))
{
diff --git a/storage/spider/spd_ping_table.cc b/storage/spider/spd_ping_table.cc
index 431d46063c3..83fe4593584 100644
--- a/storage/spider/spd_ping_table.cc
+++ b/storage/spider/spd_ping_table.cc
@@ -950,12 +950,13 @@ int spider_ping_table_cache_compare(
char *db_name, *table_name, *link_id;
DBUG_ENTER("spider_ping_table_cache_compare");
- if (
- !(db_name = get_field(mem_root, table->field[0])) ||
- !(table_name = get_field(mem_root, table->field[1])) ||
- !(link_id = get_field(mem_root, table->field[2]))
- )
+ if (!(db_name = get_field(mem_root, table->field[0])))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ if (!(table_name = get_field(mem_root, table->field[1])))
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ if (!(link_id = get_field(mem_root, table->field[2])))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+
DBUG_PRINT("info", ("spider db_name=%s", db_name));
DBUG_PRINT("info", ("spider table_name=%s", table_name));
DBUG_PRINT("info", ("spider link_id=%s", link_id));
diff --git a/storage/tokudb/mysql-test/tokudb_parts/r/partition_exch_qa_5_tokudb.result b/storage/tokudb/mysql-test/tokudb_parts/r/partition_exch_qa_5_tokudb.result
index 2e31fc57dd4..aa35364b811 100644
--- a/storage/tokudb/mysql-test/tokudb_parts/r/partition_exch_qa_5_tokudb.result
+++ b/storage/tokudb/mysql-test/tokudb_parts/r/partition_exch_qa_5_tokudb.result
@@ -13,7 +13,7 @@ Grants for test1@localhost
GRANT USAGE ON *.* TO `test1`@`localhost`
GRANT SELECT, INSERT, CREATE, DROP ON `test`.* TO `test1`@`localhost`
ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t_10;
-ERROR 42000: ALTER command denied to user 'test1'@'localhost' for table 'tp'
+ERROR 42000: ALTER command denied to user 'test1'@'localhost' for table `test`.`tp`
disconnect test1;
connect test2,localhost,test2,,test,$MASTER_MYPORT,$MASTER_MYSOCK;
USE test;
@@ -83,7 +83,7 @@ Grants for test2@localhost
GRANT USAGE ON *.* TO `test2`@`localhost`
GRANT SELECT, INSERT, UPDATE, CREATE, DROP ON `test`.* TO `test2`@`localhost`
ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t_10;
-ERROR 42000: ALTER command denied to user 'test2'@'localhost' for table 'tp'
+ERROR 42000: ALTER command denied to user 'test2'@'localhost' for table `test`.`tp`
SELECT * FROM tp WHERE a BETWEEN 0 AND 10;
a b
2 Two
@@ -91,11 +91,11 @@ a b
6 Six
8 Eight
ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t_10;
-ERROR 42000: ALTER command denied to user 'test2'@'localhost' for table 'tp'
+ERROR 42000: ALTER command denied to user 'test2'@'localhost' for table `test`.`tp`
ALTER TABLE tsp EXCHANGE PARTITION sp00 WITH TABLE tsp_00;
-ERROR 42000: ALTER command denied to user 'test2'@'localhost' for table 'tsp'
+ERROR 42000: ALTER command denied to user 'test2'@'localhost' for table `test`.`tsp`
ALTER TABLE tsp EXCHANGE PARTITION sp00 WITH TABLE tsp_00;
-ERROR 42000: ALTER command denied to user 'test2'@'localhost' for table 'tsp'
+ERROR 42000: ALTER command denied to user 'test2'@'localhost' for table `test`.`tsp`
connection default;
disconnect test2;
DROP TABLE IF EXISTS t_10;
diff --git a/storage/tokudb/mysql-test/tokudb_parts/r/partition_exch_qa_8_tokudb.result b/storage/tokudb/mysql-test/tokudb_parts/r/partition_exch_qa_8_tokudb.result
index 2fd45be9261..842c93ac403 100644
--- a/storage/tokudb/mysql-test/tokudb_parts/r/partition_exch_qa_8_tokudb.result
+++ b/storage/tokudb/mysql-test/tokudb_parts/r/partition_exch_qa_8_tokudb.result
@@ -62,9 +62,9 @@ connection default;
REVOKE INSERT ON testdb.* FROM test2@localhost;
connect test2,localhost,test2,,test,$MASTER_MYPORT,$MASTER_MYSOCK;
ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE testdb.t_10;
-ERROR 42000: INSERT command denied to user 'test2'@'localhost' for table 't_10'
+ERROR 42000: INSERT command denied to user 'test2'@'localhost' for table `testdb`.`t_10`
ALTER TABLE testdb.tp EXCHANGE PARTITION p0 WITH TABLE t_10;
-ERROR 42000: INSERT command denied to user 'test2'@'localhost' for table 'tp'
+ERROR 42000: INSERT command denied to user 'test2'@'localhost' for table `testdb`.`tp`
disconnect test2;
connection default;
DROP TABLE IF EXISTS t_10;
diff --git a/support-files/wsrep_notify.sh b/support-files/wsrep_notify.sh
index bdbe3d12a39..dde1ded0963 100644..100755
--- a/support-files/wsrep_notify.sh
+++ b/support-files/wsrep_notify.sh
@@ -4,19 +4,40 @@
# It will create 'wsrep' schema and two tables in it: 'membeship' and 'status'
# and fill them on every membership or node status change.
#
-# Edit parameters below to specify the address and login to server.
-
+# Edit parameters below to specify the address and login to server:
+#
USER=root
PSWD=rootpass
+#
+# If these parameters are not set, then the values
+# passed by the server are taken:
+#
HOST=127.0.0.1
PORT=3306
+#
+# Edit parameters below to specify SSL parameters:
+#
+ssl_key=
+ssl_cert=
+ssl_ca=
+ssl_capath=
+ssl_cipher=
+ssl_crl=
+ssl_crlpath=
+ssl_verify_server_cert=0
+#
+# Client executable path:
+#
+CLIENT="mysql"
SCHEMA="wsrep"
MEMB_TABLE="$SCHEMA.membership"
STATUS_TABLE="$SCHEMA.status"
-BEGIN="
-SET wsrep_on=0;
+WSREP_ON='SET wsrep_on=ON'
+WSREP_OFF='SET wsrep_on=OFF'
+
+BEGIN="$WSREP_OFF;
DROP SCHEMA IF EXISTS $SCHEMA; CREATE SCHEMA $SCHEMA;
CREATE TABLE $MEMB_TABLE (
idx INT UNIQUE PRIMARY KEY,
@@ -31,11 +52,8 @@ CREATE TABLE $STATUS_TABLE (
uuid CHAR(40), /* cluster UUID */
prim BOOLEAN /* if component is primary */
) ENGINE=MEMORY;
-BEGIN;
-DELETE FROM $MEMB_TABLE;
-DELETE FROM $STATUS_TABLE;
-"
-END="COMMIT;"
+BEGIN"
+END="COMMIT; $WSREP_ON"
configuration_change()
{
@@ -43,7 +61,7 @@ configuration_change()
local idx=0
- for NODE in $(echo $MEMBERS | sed s/,/\ /g)
+ for NODE in $(echo "$MEMBERS" | sed s/,/\ /g)
do
echo "INSERT INTO $MEMB_TABLE VALUES ( $idx, "
# Don't forget to properly quote string values
@@ -54,25 +72,52 @@ configuration_change()
echo "INSERT INTO $STATUS_TABLE VALUES($idx, $INDEX, '$STATUS', '$CLUSTER_UUID', $PRIMARY);"
- echo "$END"
+ echo "$END;"
}
status_update()
{
- echo "SET wsrep_on=0; BEGIN; UPDATE $STATUS_TABLE SET status='$STATUS'; COMMIT;"
+ echo "$WSREP_OFF; BEGIN; UPDATE $STATUS_TABLE SET status='$STATUS'; $END;"
+}
+
+trim_string()
+{
+ if [ -n "${BASH_VERSION:-}" ]; then
+ local pattern="[![:space:]${2:-}]"
+ local x="${1#*$pattern}"
+ local z=${#1}
+ x=${#x}
+ if [ $x -ne $z ]; then
+ local y="${1%$pattern*}"
+ y=${#y}
+ x=$(( z-x-1 ))
+ y=$(( y-x+1 ))
+ printf '%s' "${1:$x:$y}"
+ else
+ printf ''
+ fi
+ else
+ local pattern="[[:space:]${2:-}]"
+ echo "$1" | sed -E "s/^$pattern+|$pattern+\$//g"
+ fi
}
COM=status_update # not a configuration change by default
-while [ $# -gt 0 ]
-do
+STATUS=""
+CLUSTER_UUID=""
+PRIMARY="0"
+INDEX=""
+MEMBERS=""
+
+while [ $# -gt 0 ]; do
case $1 in
--status)
- STATUS=$2
+ STATUS=$(trim_string "$2")
shift
;;
--uuid)
- CLUSTER_UUID=$2
+ CLUSTER_UUID=$(trim_string "$2")
shift
;;
--primary)
@@ -81,22 +126,71 @@ do
shift
;;
--index)
- INDEX=$2
+ INDEX=$(trim_string "$2")
shift
;;
--members)
- MEMBERS=$2
+ MEMBERS=$(trim_string "$2")
shift
;;
esac
shift
done
-# Undefined means node is shutting down
-if [ "$STATUS" != "Undefined" ]
+USER=$(trim_string "$USER")
+PSWD=$(trim_string "$PSWD")
+
+HOST=$(trim_string "$HOST")
+PORT=$(trim_string "$PORT")
+
+case "$HOST" in
+\[*)
+ HOST="${HOST##\[}"
+ HOST=$(trim_string "${HOST%%\]}")
+ ;;
+esac
+
+if [ -z "$HOST" ]; then
+ HOST="${NOTIFY_HOST:-}"
+fi
+if [ -z "$PORT" ]; then
+ PORT="${NOTIFY_PORT:-}"
+fi
+
+ssl_key=$(trim_string "$ssl_key");
+ssl_cert=$(trim_string "$ssl_cert");
+ssl_ca=$(trim_string "$ssl_ca");
+ssl_capath=$(trim_string "$ssl_capath");
+ssl_cipher=$(trim_string "$ssl_cipher");
+ssl_crl=$(trim_string "$ssl_crl");
+ssl_crlpath=$(trim_string "$ssl_crlpath");
+ssl_verify_server_cert=$(trim_string "$ssl_verify_server_cert");
+
+SSL_PARAM=""
+
+if [ -n "$ssl_key" -o -n "$ssl_cert" -o \
+ -n "$ssl_ca" -o -n "$ssl_capath" -o \
+ -n "$ssl_cipher" ]
then
- $COM | mysql -B -u$USER -p$PSWD -h$HOST -P$PORT
+ SSL_PARAM=' --ssl'
+ [ -n "$ssl_key" ] && SSL_PARAM="$SSL_PARAM --ssl-key='$ssl_key'"
+ [ -n "$ssl_cert" ] && SSL_PARAM="$SSL_PARAM --ssl-cert='$ssl_cert'"
+ [ -n "$ssl_ca" ] && SSL_PARAM="$SSL_PARAM --ssl-ca='$ssl_ca'"
+ [ -n "$ssl_capath" ] && SSL_PARAM="$SSL_PARAM --ssl-capath='$ssl_capath'"
+ [ -n "$ssl_cipher" ] && SSL_PARAM="$SSL_PARAM --ssl-cipher='$ssl_cipher'"
+ [ -n "$ssl_crl" ] && SSL_PARAM="$SSL_PARAM --ssl-crl='$ssl_crl'"
+ [ -n "$ssl_crlpath" ] && SSL_PARAM="$SSL_PARAM --ssl-crlpath='$ssl_crlpath'"
+ if [ -n "$ssl_verify_server_cert" ]; then
+ if [ $ssl_verify_server_cert -ne 0 ]; then
+ SSL_PARAM+=' --ssl-verify-server-cert'
+ fi
+ fi
+fi
+
+# Undefined means node is shutting down
+if [ "$STATUS" != 'Undefined' ]; then
+ "$COM" | eval "$CLIENT" -B "-u'$USER'"${PSWD:+" -p'$PSWD'"}\
+ "-h'$HOST'" "-P$PORT"$SSL_PARAM
fi
exit 0
-#