MDEV-17658 change the structure of mysql.user table

Implement User_table_json.
Fix scripts to use mysql.global_priv.
Fix tests.
This commit is contained in:
Sergei Golubchik 2018-11-24 14:13:41 +01:00
parent d68d7e50f9
commit 4abb8216a0
180 changed files with 1843 additions and 3198 deletions

View file

@ -878,10 +878,14 @@ static int run_mysqlcheck_fixnames(void)
static const char *expected_errors[]= static const char *expected_errors[]=
{ {
"ERROR 1051", /* Unknown table */
"ERROR 1060", /* Duplicate column name */ "ERROR 1060", /* Duplicate column name */
"ERROR 1061", /* Duplicate key name */ "ERROR 1061", /* Duplicate key name */
"ERROR 1054", /* Unknown column */ "ERROR 1054", /* Unknown column */
"ERROR 1146", /* Table does not exist */
"ERROR 1290", /* RR_OPTION_PREVENTS_STATEMENT */ "ERROR 1290", /* RR_OPTION_PREVENTS_STATEMENT */
"ERROR 1347", /* 'mysql.user' is not of type 'BASE TABLE' */
"ERROR 1348", /* Column 'Show_db_priv' is not updatable */
0 0
}; };

View file

@ -60,7 +60,7 @@ function upgrade_system_tables_if_necessary() {
# errors as the script is designed to be idempotent. # errors as the script is designed to be idempotent.
LC_ALL=C $MYUPGRADE \ LC_ALL=C $MYUPGRADE \
2>&1 \ 2>&1 \
| egrep -v '^(1|@had|ERROR (1054|1060|1061))' \ | egrep -v '^(1|@had|ERROR (1051|1054|1060|1061|1146|1347|1348))' \
| logger -p daemon.warn -i -t$0 | logger -p daemon.warn -i -t$0
} }

View file

@ -23,6 +23,8 @@ invoke() {
MYSQL_BOOTSTRAP="/usr/sbin/mysqld --bootstrap --user=mysql --disable-log-bin --skip-grant-tables --default-storage-engine=myisam" MYSQL_BOOTSTRAP="/usr/sbin/mysqld --bootstrap --user=mysql --disable-log-bin --skip-grant-tables --default-storage-engine=myisam"
have_global_priv_table=
set_mysql_rootpw() { set_mysql_rootpw() {
# forget we ever saw the password. don't use reset to keep the seen status # forget we ever saw the password. don't use reset to keep the seen status
db_set mysql-server/root_password "" db_set mysql-server/root_password ""
@ -33,13 +35,23 @@ set_mysql_rootpw() {
return 1 return 1
fi fi
# this avoids us having to call "test" or "[" on $rootpw
cat << EOF > $tfile cat << EOF > $tfile
USE mysql; USE mysql;
SET sql_log_bin=0; SET sql_log_bin=0;
EOF
if test -n "$have_global_priv_table"; then
cat << EOF >> $tfile
UPDATE global_priv SET priv=json_set(priv, '$.plugin', 'mysql_native_password', '$.authentication_string', PASSWORD("$rootpw")) WHERE user='root';
EOF
else
cat << EOF >> $tfile
UPDATE user SET password=PASSWORD("$rootpw") WHERE user='root'; UPDATE user SET password=PASSWORD("$rootpw") WHERE user='root';
EOF
fi
cat << EOF >> $tfile
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
EOF EOF
# this avoids us having to call "test" or "[" on $rootpw
if grep -q 'PASSWORD("")' $tfile; then if grep -q 'PASSWORD("")' $tfile; then
retval=0 retval=0
else else
@ -146,6 +158,9 @@ EOF
$ERR_LOGGER $ERR_LOGGER
set -e set -e
if test -f $mysql_datadir/mysql/global_priv.frm; then
have_global_priv_table=yes
fi
## On every reconfiguration the maintenance user is recreated. ## On every reconfiguration the maintenance user is recreated.
# #
@ -191,20 +206,29 @@ EOF
chown 0:0 $dc chown 0:0 $dc
chmod 0600 $dc chmod 0600 $dc
replace_query=`/bin/echo -e \ if test -n "$have_global_priv_table"; then
replace_query=`/bin/echo -e \
"USE mysql;\n" \ "USE mysql;\n" \
"SET sql_mode='';\n" \ "SELECT json_object('access',cast(-1 as unsigned), " \
"REPLACE INTO user SET " \ "'plugin', 'mysql_native_password', " \
" host='localhost', user='debian-sys-maint', password=password('$pass'), " \ "'authentication_string', password('$pass')) INTO @all_privileges;\n"\
" Select_priv='Y', Insert_priv='Y', Update_priv='Y', Delete_priv='Y', " \ "REPLACE global_priv VALUES ('localhost', 'debian-sys-maint', @all_privileges);"`
" Create_priv='Y', Drop_priv='Y', Reload_priv='Y', Shutdown_priv='Y', " \ else
" Process_priv='Y', File_priv='Y', Grant_priv='Y', References_priv='Y', " \ replace_query=`/bin/echo -e \
" Index_priv='Y', Alter_priv='Y', Super_priv='Y', Show_db_priv='Y', "\ "USE mysql;\n" \
" Create_tmp_table_priv='Y', Lock_tables_priv='Y', Execute_priv='Y', "\ "SET sql_mode='';\n" \
" Repl_slave_priv='Y', Repl_client_priv='Y', Create_view_priv='Y', "\ "REPLACE INTO user SET " \
" Show_view_priv='Y', Create_routine_priv='Y', Alter_routine_priv='Y', "\ " host='localhost', user='debian-sys-maint', password=password('$pass'), " \
" Create_user_priv='Y', Event_priv='Y', Trigger_priv='Y',"\ " Select_priv='Y', Insert_priv='Y', Update_priv='Y', Delete_priv='Y', " \
" ssl_cipher='', x509_issuer='', x509_subject='';"`; " Create_priv='Y', Drop_priv='Y', Reload_priv='Y', Shutdown_priv='Y', " \
" Process_priv='Y', File_priv='Y', Grant_priv='Y', References_priv='Y', " \
" Index_priv='Y', Alter_priv='Y', Super_priv='Y', Show_db_priv='Y', "\
" Create_tmp_table_priv='Y', Lock_tables_priv='Y', Execute_priv='Y', "\
" Repl_slave_priv='Y', Repl_client_priv='Y', Create_view_priv='Y', "\
" Show_view_priv='Y', Create_routine_priv='Y', Alter_routine_priv='Y', "\
" Create_user_priv='Y', Event_priv='Y', Trigger_priv='Y',"\
" ssl_cipher='', x509_issuer='', x509_subject='';"`;
fi
db_get mysql-server/root_password && rootpw="$RET" db_get mysql-server/root_password && rootpw="$RET"
if ! set_mysql_rootpw; then if ! set_mysql_rootpw; then

View file

@ -1,7 +1,7 @@
# Allow anonymous users to connect # Allow anonymous users to connect
disable_warnings; disable_warnings;
disable_query_log; disable_query_log;
INSERT IGNORE INTO mysql.user (host, user) VALUES ('localhost',''); INSERT IGNORE INTO mysql.global_priv (host, user) VALUES ('localhost','');
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
enable_query_log; enable_query_log;
enable_warnings; enable_warnings;

View file

@ -95,7 +95,7 @@ BEGIN
mysql.time_zone_name, mysql.time_zone_name,
mysql.time_zone_transition, mysql.time_zone_transition,
mysql.time_zone_transition_type, mysql.time_zone_transition_type,
mysql.user; mysql.global_priv;
-- verify that no plugin changed its disabled/enabled state -- verify that no plugin changed its disabled/enabled state
SELECT * FROM INFORMATION_SCHEMA.PLUGINS; SELECT * FROM INFORMATION_SCHEMA.PLUGINS;

View file

@ -0,0 +1,6 @@
disable_query_log;
drop table mysql.user;
rename table mysql.user_bak to mysql.user;
rename table mysql.global_priv_bak to mysql.global_priv;
flush privileges;
enable_query_log;

View file

@ -0,0 +1,56 @@
disable_query_log;
rename table mysql.user to mysql.user_bak;
CREATE TABLE mysql.user (
Host char(60) binary DEFAULT '' NOT NULL,
User char(80) binary DEFAULT '' NOT NULL,
Password char(41) character set latin1 collate latin1_bin DEFAULT '' NOT NULL,
Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Reload_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Shutdown_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Process_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
File_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Show_db_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Super_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Repl_slave_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Repl_client_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Create_user_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Event_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Trigger_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Create_tablespace_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Delete_history_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
ssl_type enum('','ANY','X509','SPECIFIED') COLLATE utf8_general_ci DEFAULT '' NOT NULL,
ssl_cipher BLOB NOT NULL,
x509_issuer BLOB NOT NULL,
x509_subject BLOB NOT NULL,
max_questions int(11) unsigned DEFAULT 0 NOT NULL,
max_updates int(11) unsigned DEFAULT 0 NOT NULL,
max_connections int(11) unsigned DEFAULT 0 NOT NULL,
max_user_connections int(11) DEFAULT 0 NOT NULL,
plugin char(64) CHARACTER SET latin1 DEFAULT '' NOT NULL,
authentication_string TEXT NOT NULL,
password_expired ENUM('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
is_role enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
default_role char(80) binary DEFAULT '' NOT NULL,
max_statement_time decimal(12,6) DEFAULT 0 NOT NULL,
PRIMARY KEY Host (Host,User)
) engine=Aria transactional=1 CHARACTER SET utf8 COLLATE utf8_bin comment='Users and global privileges';
insert mysql.user select * from mysql.user_bak;
rename table mysql.global_priv to mysql.global_priv_bak;
flush privileges;
enable_query_log;

View file

@ -7,6 +7,7 @@ show tables;
show create table db; show create table db;
show create table user; show create table user;
show create table func; show create table func;
show create table global_priv;
show create table tables_priv; show create table tables_priv;
show create table columns_priv; show create table columns_priv;
show create table procs_priv; show create table procs_priv;

View file

@ -13,6 +13,7 @@ db
event event
func func
general_log general_log
global_priv
gtid_slave_pos gtid_slave_pos
help_category help_category
help_keyword help_keyword

View file

@ -1,3 +1,4 @@
select priv into @root_priv from mysql.global_priv where user='root' and host='localhost';
select * from mysql.user where user = 'root' and host = 'localhost'; select * from mysql.user where user = 'root' and host = 'localhost';
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 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
localhost root Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y 0 0 0 0 N N 0.000000 localhost root Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y 0 0 0 0 N N 0.000000
@ -51,15 +52,15 @@ Note 1396 Operation ALTER USER failed for 'boo'
alter user foo identified by 'something'; alter user foo identified by 'something';
select * from mysql.user where user = 'foo'; select * from mysql.user where user = 'foo';
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 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
% foo N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N 0 0 0 0 mysql_native_password *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N 0.000000 % foo *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N 0 0 0 0 mysql_native_password *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N 0.000000
alter user foo identified by 'something2'; alter user foo identified by 'something2';
select * from mysql.user where user = 'foo'; select * from mysql.user where user = 'foo';
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 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
% foo N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N 0 0 0 0 mysql_native_password *9CD58369E930E28C8996A89DB18B63294E6DC10C N N 0.000000 % foo *9CD58369E930E28C8996A89DB18B63294E6DC10C N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N 0 0 0 0 mysql_native_password *9CD58369E930E28C8996A89DB18B63294E6DC10C N N 0.000000
alter user foo identified by password '*88C89BE093D4ECF72D039F62EBB7477EA1FD4D63'; alter user foo identified by password '*88C89BE093D4ECF72D039F62EBB7477EA1FD4D63';
select * from mysql.user where user = 'foo'; select * from mysql.user where user = 'foo';
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 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
% foo N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N 0 0 0 0 mysql_native_password *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N 0.000000 % foo *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N 0 0 0 0 mysql_native_password *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N 0.000000
alter user foo identified with 'somecoolplugin'; alter user foo identified with 'somecoolplugin';
ERROR HY000: Operation ALTER USER failed for 'foo'@'%' ERROR HY000: Operation ALTER USER failed for 'foo'@'%'
show warnings; show warnings;
@ -73,21 +74,21 @@ Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv D
alter user foo identified with 'mysql_old_password' using '0123456789ABCDEF'; alter user foo identified with 'mysql_old_password' using '0123456789ABCDEF';
select * from mysql.user where user = 'foo'; select * from mysql.user where user = 'foo';
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 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
% foo N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N 0 0 0 0 mysql_old_password 0123456789ABCDEF N N 0.000000 % foo 0123456789ABCDEF N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N 0 0 0 0 mysql_old_password 0123456789ABCDEF N N 0.000000
# Test ssl related altering. # Test ssl related altering.
alter user foo identified by 'something' require SSL; alter user foo identified by 'something' require SSL;
select * from mysql.user where user = 'foo'; select * from mysql.user where user = 'foo';
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 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
% foo N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N ANY 0 0 0 0 mysql_native_password *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N 0.000000 % foo *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N ANY 0 0 0 0 mysql_native_password *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N 0.000000
alter user foo identified by 'something' require X509; alter user foo identified by 'something' require X509;
select * from mysql.user where user = 'foo'; select * from mysql.user where user = 'foo';
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 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
% foo N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N X509 0 0 0 0 mysql_native_password *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N 0.000000 % foo *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N X509 0 0 0 0 mysql_native_password *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N 0.000000
alter user foo identified by 'something' alter user foo identified by 'something'
require cipher 'text' issuer 'foo_issuer' subject 'foo_subject'; require cipher 'text' issuer 'foo_issuer' subject 'foo_subject';
select * from mysql.user where user = 'foo'; select * from mysql.user where user = 'foo';
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 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
% foo N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N SPECIFIED text foo_issuer foo_subject 0 0 0 0 mysql_native_password *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N 0.000000 % foo *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N SPECIFIED text foo_issuer foo_subject 0 0 0 0 mysql_native_password *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N 0.000000
# Test resource limits altering. # Test resource limits altering.
alter user foo with MAX_QUERIES_PER_HOUR 10 alter user foo with MAX_QUERIES_PER_HOUR 10
MAX_UPDATES_PER_HOUR 20 MAX_UPDATES_PER_HOUR 20
@ -95,6 +96,6 @@ MAX_CONNECTIONS_PER_HOUR 30
MAX_USER_CONNECTIONS 40; MAX_USER_CONNECTIONS 40;
select * from mysql.user where user = 'foo'; select * from mysql.user where user = 'foo';
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 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
% foo N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N SPECIFIED text foo_issuer foo_subject 10 20 30 40 mysql_native_password *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N 0.000000 % foo *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N SPECIFIED text foo_issuer foo_subject 10 20 30 40 mysql_native_password *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N 0.000000
drop user foo; drop user foo;
update mysql.user set plugin=''; update mysql.global_priv set priv=@root_priv where user='root' and host='localhost';

View file

@ -1,5 +1,7 @@
--source include/not_embedded.inc --source include/not_embedded.inc
select priv into @root_priv from mysql.global_priv where user='root' and host='localhost';
select * from mysql.user where user = 'root' and host = 'localhost'; select * from mysql.user where user = 'root' and host = 'localhost';
--echo # Test syntax --echo # Test syntax
--echo # --echo #
@ -82,4 +84,4 @@ alter user foo with MAX_QUERIES_PER_HOUR 10
select * from mysql.user where user = 'foo'; select * from mysql.user where user = 'foo';
drop user foo; drop user foo;
update mysql.user set plugin=''; update mysql.global_priv set priv=@root_priv where user='root' and host='localhost';

View file

@ -15,7 +15,7 @@ connection master;
connection slave; connection slave;
# Slave in-sync with master now. # Slave in-sync with master now.
SELECT user, plugin, authentication_string FROM mysql.user WHERE user LIKE 'plug_user'; SELECT user, plugin, authentication_string FROM mysql.user WHERE user LIKE 'plug_user';
user plugin authentication_string User plugin authentication_string
plug_user test_plugin_server plug_user plug_user test_plugin_server plug_user
# Cleanup (on slave). # Cleanup (on slave).
include/stop_slave.inc include/stop_slave.inc

View file

@ -1,5 +1,4 @@
SET global secure_auth=0; SET global secure_auth=0;
drop table if exists t1,t2;
connect con1,localhost,root,,mysql; connect con1,localhost,root,,mysql;
show tables; show tables;
Tables_in_mysql Tables_in_mysql
@ -9,6 +8,7 @@ db
event event
func func
general_log general_log
global_priv
gtid_slave_pos gtid_slave_pos
help_category help_category
help_keyword help_keyword
@ -56,6 +56,7 @@ db
event event
func func
general_log general_log
global_priv
gtid_slave_pos gtid_slave_pos
help_category help_category
help_keyword help_keyword
@ -114,6 +115,7 @@ db
event event
func func
general_log general_log
global_priv_bak
gtid_slave_pos gtid_slave_pos
help_category help_category
help_keyword help_keyword
@ -138,6 +140,7 @@ time_zone_transition
time_zone_transition_type time_zone_transition_type
transaction_registry transaction_registry
user user
user_bak
connect con6,localhost,test,gambling3,test; connect con6,localhost,test,gambling3,test;
show tables; show tables;
Tables_in_test Tables_in_test
@ -158,7 +161,6 @@ connect(localhost,test,zorro,test,MASTER_PORT,MASTER_SOCKET);
connect fail_con,localhost,test,zorro,; connect fail_con,localhost,test,zorro,;
ERROR 28000: Access denied for user 'test'@'localhost' (using password: YES) ERROR 28000: Access denied for user 'test'@'localhost' (using password: YES)
delete from mysql.user where user=_binary"test"; delete from mysql.user where user=_binary"test";
flush privileges;
connect con7,localhost,root,,test; connect con7,localhost,root,,test;
create table t1 (id integer not null auto_increment primary key); create table t1 (id integer not null auto_increment primary key);
create temporary table t2(id integer not null auto_increment primary key); create temporary table t2(id integer not null auto_increment primary key);
@ -358,8 +360,8 @@ update mysql.user set plugin='mysql_old_password' where user = 'mysqltest_up2';
select user, password, plugin, authentication_string from mysql.user select user, password, plugin, authentication_string from mysql.user
where user like 'mysqltest_up_'; where user like 'mysqltest_up_';
user password plugin authentication_string user password plugin authentication_string
mysqltest_up1 mysql_native_password *E8D46CE25265E545D225A8A6F1BAF642FEBEE5CB mysqltest_up1 *E8D46CE25265E545D225A8A6F1BAF642FEBEE5CB mysql_native_password *E8D46CE25265E545D225A8A6F1BAF642FEBEE5CB
mysqltest_up2 mysql_old_password 09301740536db389 mysqltest_up2 09301740536db389 mysql_old_password 09301740536db389
flush privileges; flush privileges;
connect pcon6,localhost,mysqltest_up1,bar,,$MASTER_MYPORT,; connect pcon6,localhost,mysqltest_up1,bar,,$MASTER_MYPORT,;
select user(), current_user(); select user(), current_user();
@ -383,7 +385,6 @@ drop table t1;
create table t1 (col1 int); create table t1 (col1 int);
alter table t1 add via int not null; alter table t1 add via int not null;
drop table t1; drop table t1;
drop procedure if exists p1;
create procedure p1(x int) create procedure p1(x int)
foo: loop foo: loop
if x = 0 then if x = 0 then

View file

@ -14,10 +14,6 @@
SET global secure_auth=0; SET global secure_auth=0;
--disable_warnings
drop table if exists t1,t2;
--enable_warnings
#connect (con1,localhost,root,,""); #connect (con1,localhost,root,,"");
#show tables; #show tables;
connect (con1,localhost,root,,mysql); connect (con1,localhost,root,,mysql);
@ -66,6 +62,7 @@ connect (fail_con,localhost,test,zorro,test2);
connect (fail_con,localhost,test,zorro,); connect (fail_con,localhost,test,zorro,);
# check if old password version also works # check if old password version also works
source include/switch_to_mysql_user.inc;
update mysql.user set plugin="", authentication_string="", password=old_password("gambling2") where user=_binary"test"; update mysql.user set plugin="", authentication_string="", password=old_password("gambling2") where user=_binary"test";
flush privileges; flush privileges;
@ -97,11 +94,10 @@ connect (fail_con,localhost,test,zorro,test2);
--error ER_ACCESS_DENIED_ERROR --error ER_ACCESS_DENIED_ERROR
connect (fail_con,localhost,test,zorro,); connect (fail_con,localhost,test,zorro,);
source include/switch_to_mysql_global_priv.inc;
# remove user 'test' so that other tests which may use 'test' # remove user 'test' so that other tests which may use 'test'
# do not depend on this test. # do not depend on this test.
delete from mysql.user where user=_binary"test"; delete from mysql.user where user=_binary"test";
flush privileges;
# #
# Bug#12517 Clear user variables and replication events before # Bug#12517 Clear user variables and replication events before
@ -403,6 +399,7 @@ connection default;
# #
# cannot connect when password is set and plugin=mysql_native_password # cannot connect when password is set and plugin=mysql_native_password
# #
source include/switch_to_mysql_user.inc;
update mysql.user set plugin='mysql_native_password' where user = 'mysqltest_up1'; update mysql.user set plugin='mysql_native_password' where user = 'mysqltest_up1';
update mysql.user set plugin='mysql_old_password' where user = 'mysqltest_up2'; update mysql.user set plugin='mysql_old_password' where user = 'mysqltest_up2';
select user, password, plugin, authentication_string from mysql.user select user, password, plugin, authentication_string from mysql.user
@ -418,13 +415,14 @@ select user(), current_user();
disconnect pcon7; disconnect pcon7;
connection default; connection default;
source include/switch_to_mysql_global_priv.inc;
DROP USER mysqltest_up1@'%'; DROP USER mysqltest_up1@'%';
DROP USER mysqltest_up2@'%'; DROP USER mysqltest_up2@'%';
# Wait till all disconnects are completed # Wait till all disconnects are completed
--source include/wait_until_count_sessions.inc --source include/wait_until_count_sessions.inc
--echo # --echo #
--echo # BUG#1010351: New "via" keyword in 5.2+ can't be used as identifier anymore --echo # BUG#1010351: New "via" keyword in 5.2+ can't be used as identifier anymore
--echo # --echo #
@ -436,10 +434,6 @@ create table t1 (col1 int);
alter table t1 add via int not null; alter table t1 add via int not null;
drop table t1; drop table t1;
--disable_warnings
drop procedure if exists p1;
--enable_warnings
delimiter |; delimiter |;
create procedure p1(x int) create procedure p1(x int)
foo: loop foo: loop
@ -454,6 +448,4 @@ delimiter ;|
call p1(2); call p1(2);
drop procedure p1; drop procedure p1;
SET global secure_auth=default; SET global secure_auth=default;

View file

@ -6,45 +6,45 @@ drop user foo;
create user foo identified by 'password'; create user foo identified by 'password';
select * from mysql.user where user = 'foo'; select * from mysql.user where user = 'foo';
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 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
% foo 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 N 0 0 0 0 mysql_native_password *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N 0.000000 % foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 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 N 0 0 0 0 mysql_native_password *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N 0.000000
drop user foo; drop user foo;
create user foo identified by 'password' require SSL; create user foo identified by 'password' require SSL;
select * from mysql.user where user = 'foo'; select * from mysql.user where user = 'foo';
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 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
% foo 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 N ANY 0 0 0 0 mysql_native_password *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N 0.000000 % foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 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 N ANY 0 0 0 0 mysql_native_password *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N 0.000000
drop user foo; drop user foo;
create user foo identified by 'password' require X509; create user foo identified by 'password' require X509;
select * from mysql.user where user = 'foo'; select * from mysql.user where user = 'foo';
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 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
% foo 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 N X509 0 0 0 0 mysql_native_password *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N 0.000000 % foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 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 N X509 0 0 0 0 mysql_native_password *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N 0.000000
drop user foo; drop user foo;
create user foo identified by 'password' require CIPHER 'cipher'; create user foo identified by 'password' require CIPHER 'cipher';
select * from mysql.user where user = 'foo'; select * from mysql.user where user = 'foo';
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 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
% foo 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 N SPECIFIED cipher 0 0 0 0 mysql_native_password *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N 0.000000 % foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 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 N SPECIFIED cipher 0 0 0 0 mysql_native_password *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N 0.000000
drop user foo; drop user foo;
create user foo identified by 'password' require ISSUER 'issuer'; create user foo identified by 'password' require ISSUER 'issuer';
select * from mysql.user where user = 'foo'; select * from mysql.user where user = 'foo';
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 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
% foo 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 N SPECIFIED issuer 0 0 0 0 mysql_native_password *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N 0.000000 % foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 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 N SPECIFIED issuer 0 0 0 0 mysql_native_password *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N 0.000000
drop user foo; drop user foo;
create user foo identified by 'password' require SUBJECT 'subject'; create user foo identified by 'password' require SUBJECT 'subject';
select * from mysql.user where user = 'foo'; select * from mysql.user where user = 'foo';
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 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
% foo 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 N SPECIFIED subject 0 0 0 0 mysql_native_password *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N 0.000000 % foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 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 N SPECIFIED subject 0 0 0 0 mysql_native_password *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N 0.000000
drop user foo; drop user foo;
create user foo identified by 'password' require CIPHER 'cipher' create user foo identified by 'password' require CIPHER 'cipher'
SUBJECT 'subject'; SUBJECT 'subject';
select * from mysql.user where user = 'foo'; select * from mysql.user where user = 'foo';
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 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
% foo 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 N SPECIFIED cipher subject 0 0 0 0 mysql_native_password *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N 0.000000 % foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 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 N SPECIFIED cipher subject 0 0 0 0 mysql_native_password *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N 0.000000
drop user foo; drop user foo;
create user foo identified by 'password' require CIPHER 'cipher' create user foo identified by 'password' require CIPHER 'cipher'
AND SUBJECT 'subject' AND SUBJECT 'subject'
AND ISSUER 'issuer'; AND ISSUER 'issuer';
select * from mysql.user where user = 'foo'; select * from mysql.user where user = 'foo';
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 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
% foo 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 N SPECIFIED cipher issuer subject 0 0 0 0 mysql_native_password *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N 0.000000 % foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 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 N SPECIFIED cipher issuer subject 0 0 0 0 mysql_native_password *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N 0.000000
drop user foo; drop user foo;
create user foo, foo2 identified by 'password' require CIPHER 'cipher' create user foo, foo2 identified by 'password' require CIPHER 'cipher'
AND SUBJECT 'subject' AND SUBJECT 'subject'

View file

@ -235,6 +235,7 @@ mysql.columns_priv OK
mysql.db OK mysql.db OK
mysql.event OK mysql.event OK
mysql.func OK mysql.func OK
mysql.global_priv OK
mysql.gtid_slave_pos OK mysql.gtid_slave_pos OK
mysql.help_category OK mysql.help_category OK
mysql.help_keyword OK mysql.help_keyword OK
@ -257,9 +258,9 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK mysql.time_zone_transition OK
mysql.time_zone_transition_type OK mysql.time_zone_transition_type OK
mysql.transaction_registry OK mysql.transaction_registry OK
mysql.user OK
Phase 2/7: Installing used storage engines... Skipped Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views Phase 3/7: Fixing views
mysql.user OK
Phase 4/7: Running 'mysql_fix_privilege_tables' Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names Phase 5/7: Fixing table and database names
Phase 6/7: Checking and upgrading tables Phase 6/7: Checking and upgrading tables
@ -293,6 +294,7 @@ mysql.columns_priv OK
mysql.db OK mysql.db OK
mysql.event OK mysql.event OK
mysql.func OK mysql.func OK
mysql.global_priv OK
mysql.gtid_slave_pos OK mysql.gtid_slave_pos OK
mysql.help_category OK mysql.help_category OK
mysql.help_keyword OK mysql.help_keyword OK
@ -315,9 +317,9 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK mysql.time_zone_transition OK
mysql.time_zone_transition_type OK mysql.time_zone_transition_type OK
mysql.transaction_registry OK mysql.transaction_registry OK
mysql.user OK
Phase 2/7: Installing used storage engines... Skipped Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views Phase 3/7: Fixing views
mysql.user OK
Phase 4/7: Running 'mysql_fix_privilege_tables' Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names Phase 5/7: Fixing table and database names
Phase 6/7: Checking and upgrading tables Phase 6/7: Checking and upgrading tables

View file

@ -1,9 +1,14 @@
create table t1 as select * from mysql.user; create table t1 as select * from mysql.global_priv;
truncate table mysql.global_priv;
flush privileges;
connect(localhost,u1,,test,MASTER_PORT,MASTER_SOCKET);
connect fail,localhost,u1;
Got one of the listed errors
insert mysql.global_priv select * from t1;
drop table t1;
flush privileges;
truncate table mysql.user; truncate table mysql.user;
flush privileges; flush privileges;
connect(localhost,u1,,test,MASTER_PORT,MASTER_SOCKET); connect(localhost,u1,,test,MASTER_PORT,MASTER_SOCKET);
connect fail,localhost,u1; connect fail,localhost,u1;
Got one of the listed errors Got one of the listed errors
insert mysql.user select * from t1;
drop table t1;
flush privileges;

View file

@ -4,8 +4,8 @@
source include/not_embedded.inc; source include/not_embedded.inc;
create table t1 as select * from mysql.user; create table t1 as select * from mysql.global_priv;
truncate table mysql.user; truncate table mysql.global_priv;
flush privileges; flush privileges;
# connecting via unix socket gives ER_ACCESS_DENIED_ERROR # connecting via unix socket gives ER_ACCESS_DENIED_ERROR
@ -14,7 +14,23 @@ flush privileges;
--error ER_ACCESS_DENIED_ERROR,ER_HOST_NOT_PRIVILEGED --error ER_ACCESS_DENIED_ERROR,ER_HOST_NOT_PRIVILEGED
connect (fail,localhost,u1); connect (fail,localhost,u1);
insert mysql.user select * from t1; insert mysql.global_priv select * from t1;
drop table t1; drop table t1;
flush privileges; flush privileges;
#
# same with mysql.user
#
source include/switch_to_mysql_user.inc;
truncate table mysql.user;
flush privileges;
# connecting via unix socket gives ER_ACCESS_DENIED_ERROR
# connecting via tcp/ip gives ER_HOST_NOT_PRIVILEGED
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
--error ER_ACCESS_DENIED_ERROR,ER_HOST_NOT_PRIVILEGED
connect (fail,localhost,u1);
source include/switch_to_mysql_global_priv.inc;

View file

@ -229,7 +229,7 @@ INSERT INTO t1 VALUES (1),(2);
EXPLAIN UPDATE v1, mysql.user SET v1.a = v1.a + 1; EXPLAIN UPDATE v1, mysql.user SET v1.a = v1.a + 1;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 1 SIMPLE t1 ALL NULL NULL NULL NULL 2
1 SIMPLE user index NULL PRIMARY 420 NULL 4 Using index 1 SIMPLE global_priv index NULL PRIMARY 420 NULL 4 Using index
DROP TABLE t1; DROP TABLE t1;
DROP VIEW v1; DROP VIEW v1;
# #

View file

@ -1,13 +1,6 @@
optimize table mysql.user; create user foo identified via mysql_old_password;
Table Op Msg_type Msg_text create user bar identified via mysql_old_password;
mysql.user optimize status OK create user baz identified via mysql_old_password;
insert ignore mysql.user (user,plugin) values ('foo','mysql_old_password'),('bar','mysql_old_password'),('baz','mysql_old_password');
Warnings:
Warning 1364 Field 'ssl_cipher' doesn't have a default value
Warning 1364 Field 'x509_issuer' doesn't have a default value
Warning 1364 Field 'x509_subject' doesn't have a default value
Warning 1364 Field 'authentication_string' doesn't have a default value
flush privileges;
connect(localhost,u1,,test,MASTER_PORT,MASTER_SOCKET); connect(localhost,u1,,test,MASTER_PORT,MASTER_SOCKET);
connect fail,localhost,u1; connect fail,localhost,u1;
ERROR 28000: Access denied for user 'u1'@'localhost' (using password: NO) ERROR 28000: Access denied for user 'u1'@'localhost' (using password: NO)

View file

@ -6,9 +6,9 @@ source include/not_embedded.inc;
# verify that for some failed login attemps (with wrong user names) # verify that for some failed login attemps (with wrong user names)
# the server requests a plugin # the server requests a plugin
# #
optimize table mysql.user; create user foo identified via mysql_old_password;
insert ignore mysql.user (user,plugin) values ('foo','mysql_old_password'),('bar','mysql_old_password'),('baz','mysql_old_password'); create user bar identified via mysql_old_password;
flush privileges; create user baz identified via mysql_old_password;
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT --replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
--error ER_ACCESS_DENIED_ERROR --error ER_ACCESS_DENIED_ERROR

View file

@ -1,4 +1,4 @@
update mysql.user set plugin='unix_socket'; update mysql.global_priv set priv=json_insert(priv, '$.plugin', 'unix_socket');
flush privileges; flush privileges;
Warnings: Warnings:
Warning 1524 Plugin 'unix_socket' is not loaded Warning 1524 Plugin 'unix_socket' is not loaded
@ -13,6 +13,6 @@ flush privileges;
connect(localhost,USER,,test,MASTER_PORT,MASTER_SOCKET); connect(localhost,USER,,test,MASTER_PORT,MASTER_SOCKET);
ERROR 28000: Access denied for user 'USER'@'localhost' ERROR 28000: Access denied for user 'USER'@'localhost'
ERROR 28000: Access denied for user 'USER'@'localhost' ERROR 28000: Access denied for user 'USER'@'localhost'
update mysql.user set plugin=''; update mysql.global_priv set priv=json_remove(priv, '$.plugin');
flush privileges; flush privileges;
uninstall plugin unix_socket; uninstall plugin unix_socket;

View file

@ -4,7 +4,7 @@
# MDEV-3909 remote user enumeration # MDEV-3909 remote user enumeration
# unix_socket tests # unix_socket tests
# #
update mysql.user set plugin='unix_socket'; update mysql.global_priv set priv=json_insert(priv, '$.plugin', 'unix_socket');
flush privileges; flush privileges;
# Make sure that the replace works, even if $USER is 'user' or something else # Make sure that the replace works, even if $USER is 'user' or something else
@ -36,7 +36,7 @@ connect (fail,localhost,$USER);
--error ER_ACCESS_DENIED_NO_PASSWORD_ERROR --error ER_ACCESS_DENIED_NO_PASSWORD_ERROR
change_user $USER; change_user $USER;
update mysql.user set plugin=''; update mysql.global_priv set priv=json_remove(priv, '$.plugin');
flush privileges; flush privileges;
uninstall plugin unix_socket; uninstall plugin unix_socket;

View file

@ -2,6 +2,7 @@ set GLOBAL sql_mode="";
set LOCAL sql_mode=""; set LOCAL sql_mode="";
SET @old_log_bin_trust_function_creators= @@global.log_bin_trust_function_creators; SET @old_log_bin_trust_function_creators= @@global.log_bin_trust_function_creators;
SET GLOBAL log_bin_trust_function_creators = 1; SET GLOBAL log_bin_trust_function_creators = 1;
select priv into @root_priv from mysql.global_priv where user='root' and host='localhost';
drop table if exists t1; drop table if exists t1;
drop database if exists mysqltest; drop database if exists mysqltest;
connect master,localhost,root,,; connect master,localhost,root,,;
@ -298,12 +299,7 @@ ERROR HY000: Incorrect usage of DB GRANT and GLOBAL PRIVILEGES
select 1; select 1;
1 1
1 1
insert into mysql.user (host, user) values ('localhost', 'test11'); insert into mysql.global_priv (host, user) values ('localhost', 'test11');
Warnings:
Warning 1364 Field 'ssl_cipher' doesn't have a default value
Warning 1364 Field 'x509_issuer' doesn't have a default value
Warning 1364 Field 'x509_subject' doesn't have a default value
Warning 1364 Field 'authentication_string' doesn't have a default value
insert into mysql.db (host, db, user, select_priv) values insert into mysql.db (host, db, user, select_priv) values
('localhost', 'a%', 'test11', 'Y'), ('localhost', 'ab%', 'test11', 'Y'); ('localhost', 'a%', 'test11', 'Y'), ('localhost', 'ab%', 'test11', 'Y');
alter table mysql.db order by db asc; alter table mysql.db order by db asc;
@ -842,9 +838,6 @@ drop database db27515;
End of 4.1 tests End of 4.1 tests
use test; use test;
create table t1 (a int); create table t1 (a int);
create table t2 as select * from mysql.user where user='';
delete from mysql.user where user='';
flush privileges;
create user mysqltest_8@''; create user mysqltest_8@'';
create user mysqltest_8@host8; create user mysqltest_8@host8;
create user mysqltest_8@''; create user mysqltest_8@'';
@ -854,7 +847,7 @@ ERROR HY000: Operation CREATE USER failed for 'mysqltest_8'@'%'
create user mysqltest_8@host8; create user mysqltest_8@host8;
ERROR HY000: Operation CREATE USER failed for 'mysqltest_8'@'host8' ERROR HY000: Operation CREATE USER failed for 'mysqltest_8'@'host8'
select user, QUOTE(host) from mysql.user where user="mysqltest_8"; select user, QUOTE(host) from mysql.user where user="mysqltest_8";
user QUOTE(host) User QUOTE(host)
mysqltest_8 '%' mysqltest_8 '%'
mysqltest_8 'host8' mysqltest_8 'host8'
Schema privileges Schema privileges
@ -1044,9 +1037,6 @@ ERROR 42000: There is no such grant defined for user 'mysqltest_8' on host '%'
drop user mysqltest_8@host8; drop user mysqltest_8@host8;
show grants for mysqltest_8@host8; show grants for mysqltest_8@host8;
ERROR 42000: There is no such grant defined for user 'mysqltest_8' on host 'host8' ERROR 42000: There is no such grant defined for user 'mysqltest_8' on host 'host8'
insert into mysql.user select * from t2;
flush privileges;
drop table t2;
drop table t1; drop table t1;
connection master; connection master;
CREATE DATABASE mysqltest3; CREATE DATABASE mysqltest3;
@ -1453,7 +1443,6 @@ CURRENT_USER()
root@localhost root@localhost
SET PASSWORD FOR CURRENT_USER() = PASSWORD("admin"); SET PASSWORD FOR CURRENT_USER() = PASSWORD("admin");
SET PASSWORD FOR CURRENT_USER() = PASSWORD(""); SET PASSWORD FOR CURRENT_USER() = PASSWORD("");
update mysql.user set plugin='';
# Bug#57952 # Bug#57952
@ -1925,7 +1914,7 @@ DROP DATABASE db2;
grant usage on Foo.* to myuser@Localhost identified by 'foo'; grant usage on Foo.* to myuser@Localhost identified by 'foo';
grant select on Foo.* to myuser@localhost; grant select on Foo.* to myuser@localhost;
select host,user from mysql.user where User='myuser'; select host,user from mysql.user where User='myuser';
host user Host User
localhost myuser localhost myuser
revoke select on Foo.* from myuser@localhost; revoke select on Foo.* from myuser@localhost;
delete from mysql.user where User='myuser'; delete from mysql.user where User='myuser';
@ -2733,7 +2722,7 @@ DROP USER untrusted@localhost;
DROP DATABASE secret; DROP DATABASE secret;
set GLOBAL sql_mode=default; set GLOBAL sql_mode=default;
# #
# Start of 10.2 tests # End of 10.1 tests
# #
# #
# MDEV-10134 Add full support for DEFAULT # MDEV-10134 Add full support for DEFAULT
@ -2779,3 +2768,7 @@ RENAME USER '' TO 'name';
GRANT UPDATE ON test.* TO foo; GRANT UPDATE ON test.* TO foo;
RENAME USER 'name' to ''; RENAME USER 'name' to '';
DROP USER foo; DROP USER foo;
#
# End of 10.4 tests
#
update mysql.global_priv set priv=@root_priv where user='root' and host='localhost';

View file

@ -10,6 +10,7 @@ set GLOBAL sql_mode="";
set LOCAL sql_mode=""; set LOCAL sql_mode="";
SET @old_log_bin_trust_function_creators= @@global.log_bin_trust_function_creators; SET @old_log_bin_trust_function_creators= @@global.log_bin_trust_function_creators;
SET GLOBAL log_bin_trust_function_creators = 1; SET GLOBAL log_bin_trust_function_creators = 1;
select priv into @root_priv from mysql.global_priv where user='root' and host='localhost';
# Cleanup # Cleanup
--disable_warnings --disable_warnings
@ -131,7 +132,7 @@ select 1; # To test that the previous command didn't cause problems
# #
# Bug#4898 User privileges depending on ORDER BY Settings of table db # Bug#4898 User privileges depending on ORDER BY Settings of table db
# #
insert into mysql.user (host, user) values ('localhost', 'test11'); insert into mysql.global_priv (host, user) values ('localhost', 'test11');
insert into mysql.db (host, db, user, select_priv) values insert into mysql.db (host, db, user, select_priv) values
('localhost', 'a%', 'test11', 'Y'), ('localhost', 'ab%', 'test11', 'Y'); ('localhost', 'a%', 'test11', 'Y'), ('localhost', 'ab%', 'test11', 'Y');
alter table mysql.db order by db asc; alter table mysql.db order by db asc;
@ -581,12 +582,6 @@ drop database db27515;
use test; use test;
create table t1 (a int); create table t1 (a int);
# Backup anonymous users and remove them. (They get in the way of
# the one we test with here otherwise.)
create table t2 as select * from mysql.user where user='';
delete from mysql.user where user='';
flush privileges;
# Create some users with different hostnames # Create some users with different hostnames
create user mysqltest_8@''; create user mysqltest_8@'';
create user mysqltest_8@host8; create user mysqltest_8@host8;
@ -700,10 +695,6 @@ drop user mysqltest_8@host8;
--error ER_NONEXISTING_GRANT --error ER_NONEXISTING_GRANT
show grants for mysqltest_8@host8; show grants for mysqltest_8@host8;
# Restore the anonymous users.
insert into mysql.user select * from t2;
flush privileges;
drop table t2;
drop table t1; drop table t1;
# #
@ -1265,9 +1256,6 @@ SELECT CURRENT_USER();
SET PASSWORD FOR CURRENT_USER() = PASSWORD("admin"); SET PASSWORD FOR CURRENT_USER() = PASSWORD("admin");
SET PASSWORD FOR CURRENT_USER() = PASSWORD(""); SET PASSWORD FOR CURRENT_USER() = PASSWORD("");
#cleanup after MDEV-16238
update mysql.user set plugin='';
# #
# Bug#57952: privilege change is not taken into account by EXECUTE. # Bug#57952: privilege change is not taken into account by EXECUTE.
# #
@ -2233,7 +2221,7 @@ set GLOBAL sql_mode=default;
--source include/wait_until_count_sessions.inc --source include/wait_until_count_sessions.inc
--echo # --echo #
--echo # Start of 10.2 tests --echo # End of 10.1 tests
--echo # --echo #
--echo # --echo #
@ -2278,3 +2266,8 @@ GRANT UPDATE ON test.* TO foo;
RENAME USER 'name' to ''; RENAME USER 'name' to '';
DROP USER foo; DROP USER foo;
--echo #
--echo # End of 10.4 tests
--echo #
update mysql.global_priv set priv=@root_priv where user='root' and host='localhost';

View file

@ -1,3 +1,4 @@
select priv into @root_priv from mysql.global_priv where user='root' and host='localhost';
set GLOBAL sql_mode=""; set GLOBAL sql_mode="";
set LOCAL sql_mode=""; set LOCAL sql_mode="";
SET NAMES binary; SET NAMES binary;
@ -182,10 +183,10 @@ grant insert on test.* to 'mysqltest_2';
grant update on test.t1 to 'mysqltest_2'; grant update on test.t1 to 'mysqltest_2';
grant update (c2) on test.t2 to 'mysqltest_2'; grant update (c2) on test.t2 to 'mysqltest_2';
select host,user,password,plugin,authentication_string from mysql.user where user like 'mysqltest_%'; select host,user,password,plugin,authentication_string from mysql.user where user like 'mysqltest_%';
host user password plugin authentication_string Host User Password plugin authentication_string
% mysqltest_1 mysql_native_password % mysqltest_1 mysql_native_password
% mysqltest_2 mysql_native_password *BD447CBA355AF58578D3AE33BA2E2CD388BA08D1 % mysqltest_2 *BD447CBA355AF58578D3AE33BA2E2CD388BA08D1 mysql_native_password *BD447CBA355AF58578D3AE33BA2E2CD388BA08D1
% mysqltest_3 mysql_native_password fffffffffffffffffffffffffffffffffffffffff % mysqltest_3 fffffffffffffffffffffffffffffffffffffffff mysql_native_password fffffffffffffffffffffffffffffffffffffffff
select host,db,user from mysql.db where user like 'mysqltest_%'; select host,db,user from mysql.db where user like 'mysqltest_%';
host db user host db user
% test mysqltest_2 % test mysqltest_2
@ -207,9 +208,9 @@ GRANT UPDATE (c2) ON "test"."t2" TO 'mysqltest_2'@'%'
GRANT UPDATE ON "test"."t1" TO 'mysqltest_2'@'%' GRANT UPDATE ON "test"."t1" TO 'mysqltest_2'@'%'
drop user 'mysqltest_1'; drop user 'mysqltest_1';
select host,user,password,plugin,authentication_string from mysql.user where user like 'mysqltest_%'; select host,user,password,plugin,authentication_string from mysql.user where user like 'mysqltest_%';
host user password plugin authentication_string Host User Password plugin authentication_string
% mysqltest_2 mysql_native_password *BD447CBA355AF58578D3AE33BA2E2CD388BA08D1 % mysqltest_2 *BD447CBA355AF58578D3AE33BA2E2CD388BA08D1 mysql_native_password *BD447CBA355AF58578D3AE33BA2E2CD388BA08D1
% mysqltest_3 mysql_native_password fffffffffffffffffffffffffffffffffffffffff % mysqltest_3 fffffffffffffffffffffffffffffffffffffffff mysql_native_password fffffffffffffffffffffffffffffffffffffffff
select host,db,user from mysql.db where user like 'mysqltest_%'; select host,db,user from mysql.db where user like 'mysqltest_%';
host db user host db user
% test mysqltest_2 % test mysqltest_2
@ -224,9 +225,9 @@ show grants for 'mysqltest_1';
ERROR 42000: There is no such grant defined for user 'mysqltest_1' on host '%' ERROR 42000: There is no such grant defined for user 'mysqltest_1' on host '%'
rename user 'mysqltest_2' to 'mysqltest_1'; rename user 'mysqltest_2' to 'mysqltest_1';
select host,user,password,plugin,authentication_string from mysql.user where user like 'mysqltest_%' ; select host,user,password,plugin,authentication_string from mysql.user where user like 'mysqltest_%' ;
host user password plugin authentication_string Host User Password plugin authentication_string
% mysqltest_1 mysql_native_password *BD447CBA355AF58578D3AE33BA2E2CD388BA08D1 % mysqltest_1 *BD447CBA355AF58578D3AE33BA2E2CD388BA08D1 mysql_native_password *BD447CBA355AF58578D3AE33BA2E2CD388BA08D1
% mysqltest_3 mysql_native_password fffffffffffffffffffffffffffffffffffffffff % mysqltest_3 fffffffffffffffffffffffffffffffffffffffff mysql_native_password fffffffffffffffffffffffffffffffffffffffff
select host,db,user from mysql.db where user like 'mysqltest_%' ; select host,db,user from mysql.db where user like 'mysqltest_%' ;
host db user host db user
% test mysqltest_1 % test mysqltest_1
@ -328,12 +329,7 @@ GRANT USAGE ON *.* TO 'mysqltest_3'@'localhost'
GRANT INSERT, UPDATE, DELETE ON `mysql`.* TO 'mysqltest_3'@'localhost' GRANT INSERT, UPDATE, DELETE ON `mysql`.* TO 'mysqltest_3'@'localhost'
select host,user,password,plugin,authentication_string from mysql.user where user like 'mysqltest_%' ; select host,user,password,plugin,authentication_string from mysql.user where user like 'mysqltest_%' ;
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 'user'
insert into mysql.user set host='%', user='mysqltest_B'; insert into mysql.global_priv set host='%', user='mysqltest_B';
Warnings:
Warning 1364 Field 'ssl_cipher' doesn't have a default value
Warning 1364 Field 'x509_issuer' doesn't have a default value
Warning 1364 Field 'x509_subject' doesn't have a default value
Warning 1364 Field 'authentication_string' doesn't have a default value
create user mysqltest_A@'%'; create user mysqltest_A@'%';
rename user mysqltest_B@'%' to mysqltest_C@'%'; rename user mysqltest_B@'%' to mysqltest_C@'%';
drop user mysqltest_C@'%'; drop user mysqltest_C@'%';
@ -373,7 +369,7 @@ set password = password('changed');
disconnect b12302; disconnect b12302;
connection default; connection default;
select host, length(authentication_string) from mysql.user where user like 'mysqltest\_1'; select host, length(authentication_string) from mysql.user where user like 'mysqltest\_1';
host length(authentication_string) Host length(authentication_string)
127.0.0.1 41 127.0.0.1 41
revoke all on mysqltest_1.* from mysqltest_1@'127.0.0.1'; revoke all on mysqltest_1.* from mysqltest_1@'127.0.0.1';
delete from mysql.user where user like 'mysqltest\_1'; delete from mysql.user where user like 'mysqltest\_1';
@ -388,7 +384,7 @@ set password = password('changed');
disconnect b12302_2; disconnect b12302_2;
connection default; connection default;
select host, length(authentication_string) from mysql.user where user like 'mysqltest\_1'; select host, length(authentication_string) from mysql.user where user like 'mysqltest\_1';
host length(authentication_string) Host length(authentication_string)
127.0.0.0/255.0.0.0 41 127.0.0.0/255.0.0.0 41
revoke all on mysqltest_1.* from mysqltest_1@'127.0.0.0/255.0.0.0'; revoke all on mysqltest_1.* from mysqltest_1@'127.0.0.0/255.0.0.0';
delete from mysql.user where user like 'mysqltest\_1'; delete from mysql.user where user like 'mysqltest\_1';
@ -428,15 +424,10 @@ disconnect con2root;
disconnect con3root; disconnect con3root;
create database TESTDB; create database TESTDB;
create table t2(a int); create table t2(a int);
create temporary table t1 as select * from mysql.user; create temporary table t1 as select * from mysql.global_priv;
delete from mysql.user where host='localhost'; delete from mysql.global_priv where host='localhost';
INSERT INTO mysql.user (host, user, password) VALUES INSERT INTO mysql.global_priv (host, user, priv) VALUES
('%','mysqltest_1',password('password')); ('%','mysqltest_1',json_object('authentication_string', password('password')));
Warnings:
Warning 1364 Field 'ssl_cipher' doesn't have a default value
Warning 1364 Field 'x509_issuer' doesn't have a default value
Warning 1364 Field 'x509_subject' doesn't have a default value
Warning 1364 Field 'authentication_string' doesn't have a default value
INSERT INTO mysql.db (host, db, user, select_priv) VALUES INSERT INTO mysql.db (host, db, user, select_priv) VALUES
('%','TESTDB','mysqltest_1','Y'); ('%','TESTDB','mysqltest_1','Y');
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
@ -445,9 +436,9 @@ create database TEStdb;
Got one of the listed errors Got one of the listed errors
connection default; connection default;
disconnect con1; disconnect con1;
delete from mysql.user; delete from mysql.global_priv;
delete from mysql.db where host='%' and user='mysqltest_1' and db='TESTDB'; delete from mysql.db where host='%' and user='mysqltest_1' and db='TESTDB';
insert into mysql.user select * from t1; insert into mysql.global_priv select * from t1;
drop table t1, t2; drop table t1, t2;
drop database TESTDB; drop database TESTDB;
flush privileges; flush privileges;
@ -556,25 +547,17 @@ USE mysql;
SELECT LEFT(CURRENT_USER(),INSTR(CURRENT_USER(),'@')-1) INTO @u; SELECT LEFT(CURRENT_USER(),INSTR(CURRENT_USER(),'@')-1) INTO @u;
SELECT MID(CURRENT_USER(),INSTR(CURRENT_USER(),'@')+1) INTO @h; SELECT MID(CURRENT_USER(),INSTR(CURRENT_USER(),'@')+1) INTO @h;
SELECT user,host,password,plugin,authentication_string,insert_priv FROM user WHERE user=@u AND host=@h; SELECT user,host,password,plugin,authentication_string,insert_priv FROM user WHERE user=@u AND host=@h;
user host password plugin authentication_string insert_priv User Host Password plugin authentication_string Insert_priv
root localhost Y root localhost Y
UPDATE user SET insert_priv='N' WHERE user=@u AND host=@h;
SELECT user,host,password,plugin,authentication_string,insert_priv FROM user WHERE user=@u AND host=@h;
user host password plugin authentication_string insert_priv
root localhost N
GRANT INSERT ON *.* TO CURRENT_USER(); GRANT INSERT ON *.* TO CURRENT_USER();
SELECT user,host,password,plugin,authentication_string,insert_priv FROM user WHERE user=@u AND host=@h; SELECT user,host,password,plugin,authentication_string,insert_priv FROM user WHERE user=@u AND host=@h;
user host password plugin authentication_string insert_priv User Host Password plugin authentication_string Insert_priv
root localhost mysql_native_password Y root localhost mysql_native_password Y
UPDATE user SET insert_priv='N' WHERE user=@u AND host=@h;
GRANT INSERT ON *.* TO CURRENT_USER() IDENTIFIED BY 'keksdose'; GRANT INSERT ON *.* TO CURRENT_USER() IDENTIFIED BY 'keksdose';
SELECT user,host,password,plugin,authentication_string,insert_priv FROM user WHERE user=@u AND host=@h; SELECT user,host,password,plugin,authentication_string,insert_priv FROM user WHERE user=@u AND host=@h;
user host password plugin authentication_string insert_priv User Host Password plugin authentication_string Insert_priv
root localhost mysql_native_password *0BB7188CF0DE9B403BA66E9DD810D82652D002EB Y root localhost *0BB7188CF0DE9B403BA66E9DD810D82652D002EB mysql_native_password *0BB7188CF0DE9B403BA66E9DD810D82652D002EB Y
UPDATE user SET plugin='', authentication_string='' WHERE user=@u AND host=@h; UPDATE global_priv SET priv=@root_priv;
SELECT user,host,password,plugin,authentication_string,insert_priv FROM user WHERE user=@u AND host=@h;
user host password plugin authentication_string insert_priv
root localhost Y
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
USE test; USE test;
End of 5.1 tests End of 5.1 tests

View file

@ -4,7 +4,7 @@
# Save the initial number of concurrent sessions # Save the initial number of concurrent sessions
--source include/count_sessions.inc --source include/count_sessions.inc
select priv into @root_priv from mysql.global_priv where user='root' and host='localhost';
set GLOBAL sql_mode=""; set GLOBAL sql_mode="";
set LOCAL sql_mode=""; set LOCAL sql_mode="";
SET NAMES binary; SET NAMES binary;
@ -361,7 +361,7 @@ connection user4;
show grants; show grants;
--error ER_TABLEACCESS_DENIED_ERROR --error ER_TABLEACCESS_DENIED_ERROR
select host,user,password,plugin,authentication_string from mysql.user where user like 'mysqltest_%' ; select host,user,password,plugin,authentication_string from mysql.user where user like 'mysqltest_%' ;
insert into mysql.user set host='%', user='mysqltest_B'; insert into mysql.global_priv set host='%', user='mysqltest_B';
create user mysqltest_A@'%'; create user mysqltest_A@'%';
rename user mysqltest_B@'%' to mysqltest_C@'%'; rename user mysqltest_B@'%' to mysqltest_C@'%';
drop user mysqltest_C@'%'; drop user mysqltest_C@'%';
@ -481,10 +481,10 @@ disconnect con3root;
create database TESTDB; create database TESTDB;
create table t2(a int); create table t2(a int);
create temporary table t1 as select * from mysql.user; create temporary table t1 as select * from mysql.global_priv;
delete from mysql.user where host='localhost'; delete from mysql.global_priv where host='localhost';
INSERT INTO mysql.user (host, user, password) VALUES INSERT INTO mysql.global_priv (host, user, priv) VALUES
('%','mysqltest_1',password('password')); ('%','mysqltest_1',json_object('authentication_string', password('password')));
INSERT INTO mysql.db (host, db, user, select_priv) VALUES INSERT INTO mysql.db (host, db, user, select_priv) VALUES
('%','TESTDB','mysqltest_1','Y'); ('%','TESTDB','mysqltest_1','Y');
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
@ -500,9 +500,9 @@ create database TEStdb;
# Clean-up # Clean-up
connection default; connection default;
disconnect con1; disconnect con1;
delete from mysql.user; delete from mysql.global_priv;
delete from mysql.db where host='%' and user='mysqltest_1' and db='TESTDB'; delete from mysql.db where host='%' and user='mysqltest_1' and db='TESTDB';
insert into mysql.user select * from t1; insert into mysql.global_priv select * from t1;
drop table t1, t2; drop table t1, t2;
drop database TESTDB; drop database TESTDB;
flush privileges; flush privileges;
@ -661,22 +661,15 @@ SELECT MID(CURRENT_USER(),INSTR(CURRENT_USER(),'@')+1) INTO @h;
# show current privs. # show current privs.
SELECT user,host,password,plugin,authentication_string,insert_priv FROM user WHERE user=@u AND host=@h; SELECT user,host,password,plugin,authentication_string,insert_priv FROM user WHERE user=@u AND host=@h;
# toggle INSERT
UPDATE user SET insert_priv='N' WHERE user=@u AND host=@h;
SELECT user,host,password,plugin,authentication_string,insert_priv FROM user WHERE user=@u AND host=@h;
# show that GRANT ... TO CURRENT_USER() no longer crashes # show that GRANT ... TO CURRENT_USER() no longer crashes
GRANT INSERT ON *.* TO CURRENT_USER(); GRANT INSERT ON *.* TO CURRENT_USER();
SELECT user,host,password,plugin,authentication_string,insert_priv FROM user WHERE user=@u AND host=@h; SELECT user,host,password,plugin,authentication_string,insert_priv FROM user WHERE user=@u AND host=@h;
UPDATE user SET insert_priv='N' WHERE user=@u AND host=@h;
# show that GRANT ... TO CURRENT_USER() IDENTIFIED BY ... works now # show that GRANT ... TO CURRENT_USER() IDENTIFIED BY ... works now
GRANT INSERT ON *.* TO CURRENT_USER() IDENTIFIED BY 'keksdose'; GRANT INSERT ON *.* TO CURRENT_USER() IDENTIFIED BY 'keksdose';
SELECT user,host,password,plugin,authentication_string,insert_priv FROM user WHERE user=@u AND host=@h; SELECT user,host,password,plugin,authentication_string,insert_priv FROM user WHERE user=@u AND host=@h;
UPDATE user SET plugin='', authentication_string='' WHERE user=@u AND host=@h; UPDATE global_priv SET priv=@root_priv;
SELECT user,host,password,plugin,authentication_string,insert_priv FROM user WHERE user=@u AND host=@h;
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
USE test; USE test;

View file

@ -29,7 +29,7 @@ grant select on test.* to CUser@localhost;
grant select on test.* to CUser@LOCALHOST; grant select on test.* to CUser@LOCALHOST;
flush privileges; flush privileges;
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2; SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
user host User Host
CUser localhost CUser localhost
SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser' order by 1,2; SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser' order by 1,2;
user host db select_priv user host db select_priv
@ -37,14 +37,14 @@ CUser localhost test Y
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'LOCALHOST'; REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'LOCALHOST';
flush privileges; flush privileges;
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2; SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
user host User Host
CUser localhost CUser localhost
SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser' order by 1,2; SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser' order by 1,2;
user host db select_priv user host db select_priv
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'localhost'; REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'localhost';
flush privileges; flush privileges;
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2; SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
user host User Host
CUser localhost CUser localhost
SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser' order by 1,2; SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser' order by 1,2;
user host db select_priv user host db select_priv
@ -56,7 +56,7 @@ grant select on test.t1 to CUser@localhost;
grant select on test.t1 to CUser@LOCALHOST; grant select on test.t1 to CUser@LOCALHOST;
flush privileges; flush privileges;
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2; SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
user host User Host
CUser localhost CUser localhost
SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2; SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
user host db Table_name Table_priv Column_priv user host db Table_name Table_priv Column_priv
@ -64,14 +64,14 @@ CUser localhost test t1 Select
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'LOCALHOST'; REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'LOCALHOST';
flush privileges; flush privileges;
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2; SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
user host User Host
CUser localhost CUser localhost
SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2; SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
user host db Table_name Table_priv Column_priv user host db Table_name Table_priv Column_priv
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'localhost'; REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'localhost';
flush privileges; flush privileges;
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2; SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
user host User Host
CUser localhost CUser localhost
SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2; SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
user host db Table_name Table_priv Column_priv user host db Table_name Table_priv Column_priv
@ -82,7 +82,7 @@ grant select(a) on test.t1 to CUser@localhost;
grant select(a) on test.t1 to CUser@LOCALHOST; grant select(a) on test.t1 to CUser@LOCALHOST;
flush privileges; flush privileges;
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2; SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
user host User Host
CUser localhost CUser localhost
SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2; SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
user host db Table_name Table_priv Column_priv user host db Table_name Table_priv Column_priv
@ -90,14 +90,14 @@ CUser localhost test t1 Select
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'LOCALHOST'; REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'LOCALHOST';
flush privileges; flush privileges;
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2; SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
user host User Host
CUser localhost CUser localhost
SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2; SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
user host db Table_name Table_priv Column_priv user host db Table_name Table_priv Column_priv
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'localhost'; REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'localhost';
flush privileges; flush privileges;
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2; SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
user host User Host
CUser localhost CUser localhost
SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2; SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
user host db Table_name Table_priv Column_priv user host db Table_name Table_priv Column_priv
@ -109,7 +109,7 @@ grant select on test.* to CUser2@localhost;
grant select on test.* to CUser2@LOCALHOST; grant select on test.* to CUser2@LOCALHOST;
flush privileges; flush privileges;
SELECT user, host FROM mysql.user where user = 'CUser2' order by 1,2; SELECT user, host FROM mysql.user where user = 'CUser2' order by 1,2;
user host User Host
CUser2 localhost CUser2 localhost
SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser2' order by 1,2; SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser2' order by 1,2;
user host db select_priv user host db select_priv
@ -117,7 +117,7 @@ CUser2 localhost test Y
REVOKE SELECT ON test.* FROM 'CUser2'@'LOCALHOST'; REVOKE SELECT ON test.* FROM 'CUser2'@'LOCALHOST';
flush privileges; flush privileges;
SELECT user, host FROM mysql.user where user = 'CUser2' order by 1,2; SELECT user, host FROM mysql.user where user = 'CUser2' order by 1,2;
user host User Host
CUser2 localhost CUser2 localhost
SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser2' order by 1,2; SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser2' order by 1,2;
user host db select_priv user host db select_priv
@ -125,7 +125,7 @@ REVOKE SELECT ON test.* FROM 'CUser2'@'localhost';
ERROR 42000: There is no such grant defined for user 'CUser2' on host 'localhost' ERROR 42000: There is no such grant defined for user 'CUser2' on host 'localhost'
flush privileges; flush privileges;
SELECT user, host FROM mysql.user where user = 'CUser2' order by 1,2; SELECT user, host FROM mysql.user where user = 'CUser2' order by 1,2;
user host User Host
CUser2 localhost CUser2 localhost
SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser2' order by 1,2; SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser2' order by 1,2;
user host db select_priv user host db select_priv

View file

@ -198,15 +198,15 @@ grant select on test.* to foo6 identified by password '2222222222222222';
grant select on test.* to foo7 identified via mysql_native_password using '11111111111111111111111111111111111111111'; grant select on test.* to foo7 identified via mysql_native_password using '11111111111111111111111111111111111111111';
grant select on test.* to foo8 identified via mysql_old_password using '2222222222222222'; grant select on test.* to foo8 identified via mysql_old_password using '2222222222222222';
select user,password,plugin,authentication_string from mysql.user where user like 'foo%'; select user,password,plugin,authentication_string from mysql.user where user like 'foo%';
user password plugin authentication_string User Password plugin authentication_string
foo1 mysql_native_password 11111111111111111111111111111111111111111 foo1 11111111111111111111111111111111111111111 mysql_native_password 11111111111111111111111111111111111111111
foo2 mysql_old_password 2222222222222222 foo2 2222222222222222 mysql_old_password 2222222222222222
foo3 mysql_native_password 11111111111111111111111111111111111111111 foo3 11111111111111111111111111111111111111111 mysql_native_password 11111111111111111111111111111111111111111
foo4 mysql_old_password 2222222222222222 foo4 2222222222222222 mysql_old_password 2222222222222222
foo5 mysql_native_password 11111111111111111111111111111111111111111 foo5 11111111111111111111111111111111111111111 mysql_native_password 11111111111111111111111111111111111111111
foo6 mysql_old_password 2222222222222222 foo6 2222222222222222 mysql_old_password 2222222222222222
foo7 mysql_native_password 11111111111111111111111111111111111111111 foo7 11111111111111111111111111111111111111111 mysql_native_password 11111111111111111111111111111111111111111
foo8 mysql_old_password 2222222222222222 foo8 2222222222222222 mysql_old_password 2222222222222222
drop user foo1; drop user foo1;
drop user foo2; drop user foo2;
drop user foo3; drop user foo3;

View file

@ -38,19 +38,19 @@ ERROR HY000: Password hash should be a 41-digit hexadecimal number
set password for u7@h = old_password('pwd'); set password for u7@h = old_password('pwd');
create user u8@h identified with 'mysql_old_password'; create user u8@h identified with 'mysql_old_password';
set password for u8@h = '78a302dd267f6044'; set password for u8@h = '78a302dd267f6044';
select user,host,password,plugin,authentication_string from mysql.user where host='h'; select user,host,plugin,authentication_string from mysql.user where host='h';
user host password plugin authentication_string User Host plugin authentication_string
u1 h mysql_native_password *975B2CD4FF9AE554FE8AD33168FBFC326D2021DD u1 h mysql_native_password *975B2CD4FF9AE554FE8AD33168FBFC326D2021DD
u2 h mysql_native_password *975B2CD4FF9AE554FE8AD33168FBFC326D2021DD u2 h mysql_native_password *975B2CD4FF9AE554FE8AD33168FBFC326D2021DD
u3 h mysql_native_password *975B2CD4FF9AE554FE8AD33168FBFC326D2021DD u3 h mysql_native_password *975B2CD4FF9AE554FE8AD33168FBFC326D2021DD
u4 h mysql_native_password *975B2CD4FF9AE554FE8AD33168FBFC326D2021DD u4 h mysql_native_password *975B2CD4FF9AE554FE8AD33168FBFC326D2021DD
u5 h mysql_old_password 78a302dd267f6044 u5 h mysql_old_password 78a302dd267f6044
u6 h mysql_old_password 78a302dd267f6044 u6 h mysql_old_password 78a302dd267f6044
u7 h mysql_old_password 78a302dd267f6044 u7 h mysql_old_password 78a302dd267f6044
u8 h mysql_old_password 78a302dd267f6044 u8 h mysql_old_password 78a302dd267f6044
update mysql.user set authentication_string='bad' where user='u1'; update mysql.global_priv set priv=json_set(priv, '$.authentication_string', 'bad') where user='u1';
update mysql.user set authentication_string='bad' where user='u5'; update mysql.global_priv set priv=json_set(priv, '$.authentication_string', 'bad') where user='u5';
update mysql.user set plugin='nonexistent' where user='u8'; update mysql.global_priv set priv=json_set(priv, '$.plugin', 'nonexistent') where user='u8';
flush privileges; flush privileges;
Warnings: Warnings:
Error 1372 Password hash should be a 41-digit hexadecimal number Error 1372 Password hash should be a 41-digit hexadecimal number
@ -89,7 +89,7 @@ grant select on *.* to u7@h;
grant select on *.* to u8@h; grant select on *.* to u8@h;
ERROR 28000: Can't find any matching row in the user table ERROR 28000: Can't find any matching row in the user table
select user,select_priv,plugin,authentication_string from mysql.user where user like 'u_'; select user,select_priv,plugin,authentication_string from mysql.user where user like 'u_';
user select_priv plugin authentication_string User Select_priv plugin authentication_string
u1 N mysql_native_password bad u1 N mysql_native_password bad
u2 Y mysql_native_password *975B2CD4FF9AE554FE8AD33168FBFC326D2021DD u2 Y mysql_native_password *975B2CD4FF9AE554FE8AD33168FBFC326D2021DD
u3 Y mysql_native_password *975B2CD4FF9AE554FE8AD33168FBFC326D2021DD u3 Y mysql_native_password *975B2CD4FF9AE554FE8AD33168FBFC326D2021DD

View file

@ -49,11 +49,11 @@ set password for u7@h = old_password('pwd');
create user u8@h identified with 'mysql_old_password'; create user u8@h identified with 'mysql_old_password';
eval set password for u8@h = '$p'; eval set password for u8@h = '$p';
sorted_result; sorted_result;
select user,host,password,plugin,authentication_string from mysql.user where host='h'; select user,host,plugin,authentication_string from mysql.user where host='h';
# test with invalid entries # test with invalid entries
update mysql.user set authentication_string='bad' where user='u1'; update mysql.global_priv set priv=json_set(priv, '$.authentication_string', 'bad') where user='u1';
update mysql.user set authentication_string='bad' where user='u5'; update mysql.global_priv set priv=json_set(priv, '$.authentication_string', 'bad') where user='u5';
update mysql.user set plugin='nonexistent' where user='u8'; update mysql.global_priv set priv=json_set(priv, '$.plugin', 'nonexistent') where user='u8';
flush privileges; flush privileges;
# invalid entries are skipped, users don't exist # invalid entries are skipped, users don't exist
error ER_PASSWORD_NO_MATCH; error ER_PASSWORD_NO_MATCH;

View file

@ -1,5 +1,5 @@
set GLOBAL sql_mode=""; set global sql_mode="";
set LOCAL sql_mode=""; set local sql_mode="";
alter table mysql.user modify User char(16) binary not null default ''; alter table mysql.user modify User char(16) binary not null default '';
alter table mysql.db modify User char(16) binary not null default ''; alter table mysql.db modify User char(16) binary not null default '';
alter table mysql.tables_priv modify User char(16) binary not null default ''; alter table mysql.tables_priv modify User char(16) binary not null default '';
@ -32,4 +32,4 @@ Catalog Database Table Table_alias Column Column_alias Type Length Max length Is
def user() 253 141 14 N 1 39 8 def user() 253 141 14 N 1 39 8
user() user()
root@localhost root@localhost
set GLOBAL sql_mode=default; set global sql_mode=default;

View file

@ -6,8 +6,9 @@
# #
--source include/not_embedded.inc --source include/not_embedded.inc
set GLOBAL sql_mode=""; --source include/switch_to_mysql_user.inc
set LOCAL sql_mode=""; set global sql_mode="";
set local sql_mode="";
alter table mysql.user modify User char(16) binary not null default ''; alter table mysql.user modify User char(16) binary not null default '';
alter table mysql.db modify User char(16) binary not null default ''; alter table mysql.db modify User char(16) binary not null default '';
@ -42,4 +43,5 @@ flush privileges;
select user(); select user();
--disable_metadata --disable_metadata
set GLOBAL sql_mode=default; set global sql_mode=default;
--source include/switch_to_mysql_global_priv.inc

View file

@ -96,6 +96,7 @@ db
event event
func func
general_log general_log
global_priv
gtid_slave_pos gtid_slave_pos
help_category help_category
help_keyword help_keyword
@ -563,6 +564,7 @@ create view v2 (c) as select a from t1 WITH LOCAL CHECK OPTION;
create view v3 (c) as select a from t1 WITH CASCADED CHECK OPTION; create view v3 (c) as select a from t1 WITH CASCADED CHECK OPTION;
select * from information_schema.views; select * from information_schema.views;
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION ALGORITHM TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION ALGORITHM
def mysql user select `mysql`.`global_priv`.`Host` AS `Host`,`mysql`.`global_priv`.`User` AS `User`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.plugin') in ('mysql_native_password','mysql_old_password'),ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.authentication_string'),''),'') AS `Password`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 1,'Y','N') AS `Select_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 2,'Y','N') AS `Insert_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 4,'Y','N') AS `Update_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 8,'Y','N') AS `Delete_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 16,'Y','N') AS `Create_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 32,'Y','N') AS `Drop_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 64,'Y','N') AS `Reload_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 128,'Y','N') AS `Shutdown_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 256,'Y','N') AS `Process_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 512,'Y','N') AS `File_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 1024,'Y','N') AS `Grant_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 2048,'Y','N') AS `References_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 4096,'Y','N') AS `Index_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 8192,'Y','N') AS `Alter_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 16384,'Y','N') AS `Show_db_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 32768,'Y','N') AS `Super_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 65536,'Y','N') AS `Create_tmp_table_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 131072,'Y','N') AS `Lock_tables_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 262144,'Y','N') AS `Execute_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 524288,'Y','N') AS `Repl_slave_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 1048576,'Y','N') AS `Repl_client_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 2097152,'Y','N') AS `Create_view_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 4194304,'Y','N') AS `Show_view_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 8388608,'Y','N') AS `Create_routine_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 16777216,'Y','N') AS `Alter_routine_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 33554432,'Y','N') AS `Create_user_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 67108864,'Y','N') AS `Event_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 134217728,'Y','N') AS `Trigger_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 268435456,'Y','N') AS `Create_tablespace_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 536870912,'Y','N') AS `Delete_history_priv`,elt(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.ssl_type'),0) + 1,'','ANY','X509','SPECIFIED') AS `ssl_type`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.ssl_cipher'),'') AS `ssl_cipher`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.x509_issuer'),'') AS `x509_issuer`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.x509_subject'),'') AS `x509_subject`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.max_questions'),0) as unsigned) AS `max_questions`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.max_updates'),0) as unsigned) AS `max_updates`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.max_connections'),0) as unsigned) AS `max_connections`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.max_user_connections'),0) as signed) AS `max_user_connections`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.plugin'),'') AS `plugin`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.authentication_string'),'') AS `authentication_string`,'N' AS `password_expired`,elt(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.is_role'),0) + 1,'N','Y') AS `is_role`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.default_role'),'') AS `default_role`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.max_statement_time'),0.0) as decimal(12,6)) AS `max_statement_time` from `mysql`.`global_priv` NONE YES root@localhost DEFINER latin1 latin1_swedish_ci UNDEFINED
def test v1 select `test`.`t1`.`a` AS `c` from `test`.`t1` CASCADED YES root@localhost DEFINER latin1 latin1_swedish_ci UNDEFINED def test v1 select `test`.`t1`.`a` AS `c` from `test`.`t1` CASCADED YES root@localhost DEFINER latin1 latin1_swedish_ci UNDEFINED
def test v2 select `test`.`t1`.`a` AS `c` from `test`.`t1` LOCAL YES root@localhost DEFINER latin1 latin1_swedish_ci UNDEFINED def test v2 select `test`.`t1`.`a` AS `c` from `test`.`t1` LOCAL YES root@localhost DEFINER latin1 latin1_swedish_ci UNDEFINED
def test v3 select `test`.`t1`.`a` AS `c` from `test`.`t1` CASCADED YES root@localhost DEFINER latin1 latin1_swedish_ci UNDEFINED def test v3 select `test`.`t1`.`a` AS `c` from `test`.`t1` CASCADED YES root@localhost DEFINER latin1 latin1_swedish_ci UNDEFINED
@ -593,6 +595,7 @@ information_schema.tables;
s1 s1
10 10
11 11
NULL
drop table t1; drop table t1;
SHOW CREATE TABLE INFORMATION_SCHEMA.character_sets; SHOW CREATE TABLE INFORMATION_SCHEMA.character_sets;
Table Create Table Table Create Table
@ -824,7 +827,7 @@ NULL
select table_type from information_schema.tables select table_type from information_schema.tables
where table_schema="mysql" and table_name="user"; where table_schema="mysql" and table_name="user";
table_type table_type
BASE TABLE VIEW
show open tables where `table` like "user"; show open tables where `table` like "user";
Database Table In_use Name_locked Database Table In_use Name_locked
mysql user 0 0 mysql user 0 0
@ -874,6 +877,14 @@ information_schema SYSTEM_VARIABLES ENUM_VALUE_LIST
information_schema TRIGGERS ACTION_CONDITION information_schema TRIGGERS ACTION_CONDITION
information_schema TRIGGERS ACTION_STATEMENT information_schema TRIGGERS ACTION_STATEMENT
information_schema VIEWS VIEW_DEFINITION information_schema VIEWS VIEW_DEFINITION
mysql global_priv Priv
mysql user Password
mysql user ssl_cipher
mysql user x509_issuer
mysql user x509_subject
mysql user plugin
mysql user authentication_string
mysql user default_role
select table_name, column_name, data_type from information_schema.columns select table_name, column_name, data_type from information_schema.columns
where data_type = 'datetime' and table_name not like 'innodb_%' where data_type = 'datetime' and table_name not like 'innodb_%'
order by binary table_name, ordinal_position; order by binary table_name, ordinal_position;
@ -1253,7 +1264,7 @@ CREATE VIEW v1 AS SELECT 1 FROM t1
WHERE f3 = (SELECT func2 ()); WHERE f3 = (SELECT func2 ());
SELECT func1(); SELECT func1();
func1() func1()
1 2
DROP TABLE t1; DROP TABLE t1;
DROP VIEW v1; DROP VIEW v1;
DROP FUNCTION func1; DROP FUNCTION func1;
@ -1404,6 +1415,7 @@ create table t2 (f1 int, f2 int);
create view v2 as select f1+1 as a, f2 as b from t2; create view v2 as select f1+1 as a, f2 as b from t2;
select table_name, is_updatable from information_schema.views order by table_name; select table_name, is_updatable from information_schema.views order by table_name;
table_name is_updatable table_name is_updatable
user YES
v1 NO v1 NO
v2 YES v2 YES
delete from v1; delete from v1;
@ -1959,7 +1971,7 @@ connection con1;
flush tables; flush tables;
flush tables t1; flush tables t1;
connection default; connection default;
select * from information_schema.views; select * from information_schema.views where table_schema='test';
TABLE_CATALOG def TABLE_CATALOG def
TABLE_SCHEMA test TABLE_SCHEMA test
TABLE_NAME v1 TABLE_NAME v1

View file

@ -1631,7 +1631,7 @@ let $wait_condition=
info = "flush tables t1"; info = "flush tables t1";
--source include/wait_condition.inc --source include/wait_condition.inc
--vertical_results --vertical_results
select * from information_schema.views; select * from information_schema.views where table_schema='test';
--horizontal_results --horizontal_results
unlock tables; unlock tables;

View file

@ -460,4 +460,4 @@ Wildcard: inf_rmation_schema
SELECT table_schema, count(*) FROM information_schema.TABLES WHERE table_schema IN ('mysql', 'INFORMATION_SCHEMA', 'test', 'mysqltest') GROUP BY TABLE_SCHEMA; SELECT table_schema, count(*) FROM information_schema.TABLES WHERE table_schema IN ('mysql', 'INFORMATION_SCHEMA', 'test', 'mysqltest') GROUP BY TABLE_SCHEMA;
table_schema count(*) table_schema count(*)
information_schema 65 information_schema 65
mysql 30 mysql 31

View file

@ -1,8 +1,8 @@
create user foo@localhost; create user foo@localhost;
select user,host,password from mysql.user where user='foo'; select user,host,password from mysql.user where user='foo';
user host password User Host Password
foo localhost foo localhost
select user,host,password,plugin,authentication_string from mysql.user where user='foo'; select user,host,password,plugin,authentication_string from mysql.user where user='foo';
user host password plugin authentication_string User Host Password plugin authentication_string
foo localhost mysql_native_password *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29 foo localhost *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29 mysql_native_password *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29
drop user foo@localhost; drop user foo@localhost;

View file

@ -755,10 +755,10 @@ ERROR 42S22: Unknown column 't1.b' in 'on clause'
select select
statistics.TABLE_NAME, statistics.COLUMN_NAME, statistics.TABLE_CATALOG, statistics.TABLE_SCHEMA, statistics.NON_UNIQUE, statistics.INDEX_SCHEMA, statistics.INDEX_NAME, statistics.SEQ_IN_INDEX, statistics.COLLATION, statistics.SUB_PART, statistics.PACKED, statistics.NULLABLE, statistics.INDEX_TYPE, statistics.COMMENT, statistics.TABLE_NAME, statistics.COLUMN_NAME, statistics.TABLE_CATALOG, statistics.TABLE_SCHEMA, statistics.NON_UNIQUE, statistics.INDEX_SCHEMA, statistics.INDEX_NAME, statistics.SEQ_IN_INDEX, statistics.COLLATION, statistics.SUB_PART, statistics.PACKED, statistics.NULLABLE, statistics.INDEX_TYPE, statistics.COMMENT,
columns.TABLE_CATALOG, columns.TABLE_SCHEMA, columns.COLUMN_DEFAULT, columns.IS_NULLABLE, columns.DATA_TYPE, columns.CHARACTER_MAXIMUM_LENGTH, columns.CHARACTER_OCTET_LENGTH, columns.NUMERIC_PRECISION, columns.NUMERIC_SCALE, columns.CHARACTER_SET_NAME, columns.COLLATION_NAME, columns.COLUMN_TYPE, columns.COLUMN_KEY, columns.EXTRA, columns.COLUMN_COMMENT columns.TABLE_CATALOG, columns.TABLE_SCHEMA, columns.COLUMN_DEFAULT, columns.IS_NULLABLE, columns.DATA_TYPE, columns.CHARACTER_MAXIMUM_LENGTH, columns.CHARACTER_OCTET_LENGTH, columns.NUMERIC_PRECISION, columns.NUMERIC_SCALE, columns.CHARACTER_SET_NAME, columns.COLLATION_NAME, columns.COLUMN_TYPE, columns.COLUMN_KEY, columns.EXTRA, columns.COLUMN_COMMENT
from information_schema.statistics join information_schema.columns using(table_name,column_name) where table_name='user'; from information_schema.statistics join information_schema.columns using(table_name,column_name) where table_name='global_priv';
TABLE_NAME COLUMN_NAME TABLE_CATALOG TABLE_SCHEMA NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLLATION SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT TABLE_CATALOG TABLE_SCHEMA COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA COLUMN_COMMENT TABLE_NAME COLUMN_NAME TABLE_CATALOG TABLE_SCHEMA NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLLATION SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT TABLE_CATALOG TABLE_SCHEMA COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA COLUMN_COMMENT
user Host def mysql 0 mysql PRIMARY 1 A NULL NULL BTREE def mysql '' NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI global_priv Host def mysql 0 mysql PRIMARY 1 A NULL NULL BTREE def mysql '' NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI
user User def mysql 0 mysql PRIMARY 2 A NULL NULL BTREE def mysql '' NO char 80 240 NULL NULL utf8 utf8_bin char(80) PRI global_priv User def mysql 0 mysql PRIMARY 2 A NULL NULL BTREE def mysql '' NO char 80 240 NULL NULL utf8 utf8_bin char(80) PRI
Warnings: Warnings:
Warning 1286 Unknown storage engine 'InnoDB' Warning 1286 Unknown storage engine 'InnoDB'
Warning 1286 Unknown storage engine 'InnoDB' Warning 1286 Unknown storage engine 'InnoDB'

View file

@ -555,7 +555,7 @@ select * from v1a join v1b on t1.b = t2.b;
select select
statistics.TABLE_NAME, statistics.COLUMN_NAME, statistics.TABLE_CATALOG, statistics.TABLE_SCHEMA, statistics.NON_UNIQUE, statistics.INDEX_SCHEMA, statistics.INDEX_NAME, statistics.SEQ_IN_INDEX, statistics.COLLATION, statistics.SUB_PART, statistics.PACKED, statistics.NULLABLE, statistics.INDEX_TYPE, statistics.COMMENT, statistics.TABLE_NAME, statistics.COLUMN_NAME, statistics.TABLE_CATALOG, statistics.TABLE_SCHEMA, statistics.NON_UNIQUE, statistics.INDEX_SCHEMA, statistics.INDEX_NAME, statistics.SEQ_IN_INDEX, statistics.COLLATION, statistics.SUB_PART, statistics.PACKED, statistics.NULLABLE, statistics.INDEX_TYPE, statistics.COMMENT,
columns.TABLE_CATALOG, columns.TABLE_SCHEMA, columns.COLUMN_DEFAULT, columns.IS_NULLABLE, columns.DATA_TYPE, columns.CHARACTER_MAXIMUM_LENGTH, columns.CHARACTER_OCTET_LENGTH, columns.NUMERIC_PRECISION, columns.NUMERIC_SCALE, columns.CHARACTER_SET_NAME, columns.COLLATION_NAME, columns.COLUMN_TYPE, columns.COLUMN_KEY, columns.EXTRA, columns.COLUMN_COMMENT columns.TABLE_CATALOG, columns.TABLE_SCHEMA, columns.COLUMN_DEFAULT, columns.IS_NULLABLE, columns.DATA_TYPE, columns.CHARACTER_MAXIMUM_LENGTH, columns.CHARACTER_OCTET_LENGTH, columns.NUMERIC_PRECISION, columns.NUMERIC_SCALE, columns.CHARACTER_SET_NAME, columns.COLLATION_NAME, columns.COLUMN_TYPE, columns.COLUMN_KEY, columns.EXTRA, columns.COLUMN_COMMENT
from information_schema.statistics join information_schema.columns using(table_name,column_name) where table_name='user'; from information_schema.statistics join information_schema.columns using(table_name,column_name) where table_name='global_priv';
drop table t1; drop table t1;
drop table t2; drop table t2;

View file

@ -6033,12 +6033,12 @@ drop table t1;
SET join_cache_level = 3; SET join_cache_level = 3;
# The following should have # The following should have
# - table order PROFILING,user, # - table order PROFILING,user,
# - table user accessed with hash_ALL: # - table db accessed with hash_ALL:
explain explain
SELECT * FROM INFORMATION_SCHEMA.PROFILING, mysql.user WHERE password_expired = PAGE_FAULTS_MINOR; SELECT * FROM INFORMATION_SCHEMA.PROFILING, mysql.db WHERE Select_priv = PAGE_FAULTS_MINOR;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE PROFILING ALL NULL NULL NULL NULL NULL Using where 1 SIMPLE PROFILING ALL NULL NULL NULL NULL NULL Using where
1 SIMPLE user hash_ALL NULL #hash#$hj 1 information_schema.PROFILING.PAGE_FAULTS_MINOR 4 Using where; Using join buffer (flat, BNLH join) 1 SIMPLE db hash_ALL NULL #hash#$hj 1 information_schema.PROFILING.PAGE_FAULTS_MINOR 2 Using where; Using join buffer (flat, BNLH join)
set join_cache_level=default; set join_cache_level=default;
create table t1 (c1 date not null, key (c1)) engine=innodb; create table t1 (c1 date not null, key (c1)) engine=innodb;
insert t1 values ('2017-12-27'); insert t1 values ('2017-12-27');

View file

@ -3970,9 +3970,9 @@ drop table t1;
SET join_cache_level = 3; SET join_cache_level = 3;
--echo # The following should have --echo # The following should have
--echo # - table order PROFILING,user, --echo # - table order PROFILING,user,
--echo # - table user accessed with hash_ALL: --echo # - table db accessed with hash_ALL:
explain explain
SELECT * FROM INFORMATION_SCHEMA.PROFILING, mysql.user WHERE password_expired = PAGE_FAULTS_MINOR; SELECT * FROM INFORMATION_SCHEMA.PROFILING, mysql.db WHERE Select_priv = PAGE_FAULTS_MINOR;
set join_cache_level=default; set join_cache_level=default;

View file

@ -118,17 +118,17 @@ LOCK TABLES columns_priv WRITE, db WRITE, user WRITE;
FLUSH TABLES; FLUSH TABLES;
connection reader; connection reader;
USE mysql; USE mysql;
SELECT user.Select_priv FROM user, db WHERE user.user = db.user LIMIT 1; SELECT global_priv.host FROM global_priv, db WHERE global_priv.user = db.user LIMIT 1;
connection locker; connection locker;
OPTIMIZE TABLES columns_priv, db, user; OPTIMIZE TABLES columns_priv, db, global_priv;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
mysql.columns_priv optimize status OK mysql.columns_priv optimize status OK
mysql.db optimize status OK mysql.db optimize status OK
mysql.user optimize status OK mysql.global_priv optimize status OK
UNLOCK TABLES; UNLOCK TABLES;
connection reader; connection reader;
Select_priv host
N localhost
USE test; USE test;
connection locker; connection locker;
use test; use test;

View file

@ -191,18 +191,18 @@ connection reader;
USE mysql; USE mysql;
# Note: This must be a multi-table select, otherwise the deadlock will not occur # Note: This must be a multi-table select, otherwise the deadlock will not occur
send send
SELECT user.Select_priv FROM user, db WHERE user.user = db.user LIMIT 1; SELECT global_priv.host FROM global_priv, db WHERE global_priv.user = db.user LIMIT 1;
# #
connection locker; connection locker;
# Sleep a bit till the select of connection reader is in work and hangs # Sleep a bit till the select of connection reader is in work and hangs
let $wait_condition= let $wait_condition=
SELECT COUNT(*) = 1 FROM information_schema.processlist SELECT COUNT(*) = 1 FROM information_schema.processlist
WHERE state = "Waiting for table metadata lock" AND info = WHERE state = "Waiting for table metadata lock" AND info =
"SELECT user.Select_priv FROM user, db WHERE user.user = db.user LIMIT 1"; "SELECT global_priv.host FROM global_priv, db WHERE global_priv.user = db.user LIMIT 1";
--source include/wait_condition.inc --source include/wait_condition.inc
# Make test case independent from earlier grants. # Make test case independent from earlier grants.
--replace_result "Table is already up to date" "OK" --replace_result "Table is already up to date" "OK"
OPTIMIZE TABLES columns_priv, db, user; OPTIMIZE TABLES columns_priv, db, global_priv;
UNLOCK TABLES; UNLOCK TABLES;
# #
connection reader; connection reader;

View file

@ -19,6 +19,7 @@ mysql.columns_priv OK
mysql.db OK mysql.db OK
mysql.event OK mysql.event OK
mysql.func OK mysql.func OK
mysql.global_priv OK
mysql.gtid_slave_pos OK mysql.gtid_slave_pos OK
mysql.help_category OK mysql.help_category OK
mysql.help_keyword OK mysql.help_keyword OK
@ -42,9 +43,9 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK mysql.time_zone_transition OK
mysql.time_zone_transition_type OK mysql.time_zone_transition_type OK
mysql.transaction_registry OK mysql.transaction_registry OK
mysql.user OK
Phase 2/7: Installing used storage engines... Skipped Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views Phase 3/7: Fixing views
mysql.user OK
Phase 4/7: Running 'mysql_fix_privilege_tables' Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names Phase 5/7: Fixing table and database names
Phase 6/7: Checking and upgrading tables Phase 6/7: Checking and upgrading tables

View file

@ -94,6 +94,7 @@ mysql.columns_priv OK
mysql.db OK mysql.db OK
mysql.event OK mysql.event OK
mysql.func OK mysql.func OK
mysql.global_priv OK
mysql.gtid_slave_pos OK mysql.gtid_slave_pos OK
mysql.help_category OK mysql.help_category OK
mysql.help_keyword OK mysql.help_keyword OK
@ -122,7 +123,6 @@ mysql.time_zone_transition_type OK
mysql.transaction_registry mysql.transaction_registry
Error : Unknown storage engine 'InnoDB' Error : Unknown storage engine 'InnoDB'
error : Corrupt error : Corrupt
mysql.user OK
Repairing tables Repairing tables
mysql.innodb_index_stats mysql.innodb_index_stats
@ -136,6 +136,7 @@ Error : Unknown storage engine 'InnoDB'
error : Corrupt error : Corrupt
Phase 2/7: Installing used storage engines... Skipped Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views Phase 3/7: Fixing views
mysql.user OK
Phase 4/7: Running 'mysql_fix_privilege_tables' Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names Phase 5/7: Fixing table and database names
Phase 6/7: Checking and upgrading tables Phase 6/7: Checking and upgrading tables

View file

@ -45,6 +45,7 @@ MDL_BACKUP_DDL Backup lock
MDL_SHARED_NO_READ_WRITE Table metadata lock mysql user MDL_SHARED_NO_READ_WRITE Table metadata lock mysql user
MDL_SHARED_NO_READ_WRITE Table metadata lock test t1 MDL_SHARED_NO_READ_WRITE Table metadata lock test t1
MDL_INTENTION_EXCLUSIVE Schema metadata lock mysql MDL_INTENTION_EXCLUSIVE Schema metadata lock mysql
MDL_SHARED_NO_READ_WRITE Table metadata lock mysql global_priv
MDL_INTENTION_EXCLUSIVE Schema metadata lock test MDL_INTENTION_EXCLUSIVE Schema metadata lock test
UNLOCK TABLES; UNLOCK TABLES;
LOCK TABLES mysql.general_log WRITE; LOCK TABLES mysql.general_log WRITE;

View file

@ -1,4 +1,4 @@
update mysql.user set password=password("foo") where user='root'; update mysql.global_priv set priv=json_set(priv, '$.plugin', 'mysql_native_password', '$.authentication_string', password('foo'));
Phase 1/7: Checking and upgrading mysql database Phase 1/7: Checking and upgrading mysql database
Processing databases Processing databases
mysql mysql
@ -7,6 +7,7 @@ mysql.columns_priv OK
mysql.db OK mysql.db OK
mysql.event OK mysql.event OK
mysql.func OK mysql.func OK
mysql.global_priv OK
mysql.gtid_slave_pos OK mysql.gtid_slave_pos OK
mysql.help_category OK mysql.help_category OK
mysql.help_keyword OK mysql.help_keyword OK
@ -35,7 +36,6 @@ mysql.time_zone_transition_type OK
mysql.transaction_registry mysql.transaction_registry
Error : Unknown storage engine 'InnoDB' Error : Unknown storage engine 'InnoDB'
error : Corrupt error : Corrupt
mysql.user OK
Repairing tables Repairing tables
mysql.innodb_index_stats mysql.innodb_index_stats
@ -49,6 +49,7 @@ Error : Unknown storage engine 'InnoDB'
error : Corrupt error : Corrupt
Phase 2/7: Installing used storage engines... Skipped Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views Phase 3/7: Fixing views
mysql.user OK
Phase 4/7: Running 'mysql_fix_privilege_tables' Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names Phase 5/7: Fixing table and database names
Phase 6/7: Checking and upgrading tables Phase 6/7: Checking and upgrading tables
@ -62,6 +63,6 @@ test
Phase 7/7: Running 'FLUSH PRIVILEGES' Phase 7/7: Running 'FLUSH PRIVILEGES'
OK OK
connect con1,localhost,root,foo,,,; connect con1,localhost,root,foo,,,;
update mysql.user set password='' where user='root'; update mysql.global_priv set priv=json_remove(priv, '$.plugin', '$.authentication_string');
flush privileges; flush privileges;
set global event_scheduler=OFF; set global event_scheduler=OFF;

View file

@ -11,13 +11,13 @@
# In this setup MYSQL_UPGRADE cannot continue after issuing FLUSH PRIVILEGES # In this setup MYSQL_UPGRADE cannot continue after issuing FLUSH PRIVILEGES
# #
update mysql.user set password=password("foo") where user='root'; update mysql.global_priv set priv=json_set(priv, '$.plugin', 'mysql_native_password', '$.authentication_string', password('foo'));
--exec $MYSQL_UPGRADE --exec $MYSQL_UPGRADE
connect(con1,localhost,root,foo,,,); connect(con1,localhost,root,foo,,,);
update mysql.user set password='' where user='root'; update mysql.global_priv set priv=json_remove(priv, '$.plugin', '$.authentication_string');
flush privileges; flush privileges;
# Load event table # Load event table
set global event_scheduler=OFF; set global event_scheduler=OFF;

View file

@ -8,6 +8,7 @@ mysql.columns_priv OK
mysql.db OK mysql.db OK
mysql.event OK mysql.event OK
mysql.func OK mysql.func OK
mysql.global_priv OK
mysql.gtid_slave_pos OK mysql.gtid_slave_pos OK
mysql.help_category OK mysql.help_category OK
mysql.help_keyword OK mysql.help_keyword OK
@ -30,9 +31,9 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK mysql.time_zone_transition OK
mysql.time_zone_transition_type OK mysql.time_zone_transition_type OK
mysql.transaction_registry OK mysql.transaction_registry OK
mysql.user OK
Phase 2/7: Installing used storage engines... Skipped Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views Phase 3/7: Fixing views
mysql.user OK
Phase 4/7: Running 'mysql_fix_privilege_tables' Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names Phase 5/7: Fixing table and database names
Phase 6/7: Checking and upgrading tables Phase 6/7: Checking and upgrading tables
@ -56,6 +57,7 @@ mysql.columns_priv OK
mysql.db OK mysql.db OK
mysql.event OK mysql.event OK
mysql.func OK mysql.func OK
mysql.global_priv OK
mysql.gtid_slave_pos OK mysql.gtid_slave_pos OK
mysql.help_category OK mysql.help_category OK
mysql.help_keyword OK mysql.help_keyword OK
@ -78,9 +80,9 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK mysql.time_zone_transition OK
mysql.time_zone_transition_type OK mysql.time_zone_transition_type OK
mysql.transaction_registry OK mysql.transaction_registry OK
mysql.user OK
Phase 2/7: Installing used storage engines... Skipped Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views Phase 3/7: Fixing views
mysql.user OK
Phase 4/7: Running 'mysql_fix_privilege_tables' Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names Phase 5/7: Fixing table and database names
Phase 6/7: Checking and upgrading tables Phase 6/7: Checking and upgrading tables
@ -104,6 +106,7 @@ mysql.columns_priv OK
mysql.db OK mysql.db OK
mysql.event OK mysql.event OK
mysql.func OK mysql.func OK
mysql.global_priv OK
mysql.gtid_slave_pos OK mysql.gtid_slave_pos OK
mysql.help_category OK mysql.help_category OK
mysql.help_keyword OK mysql.help_keyword OK
@ -126,9 +129,9 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK mysql.time_zone_transition OK
mysql.time_zone_transition_type OK mysql.time_zone_transition_type OK
mysql.transaction_registry OK mysql.transaction_registry OK
mysql.user OK
Phase 2/7: Installing used storage engines... Skipped Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views Phase 3/7: Fixing views
mysql.user OK
Phase 4/7: Running 'mysql_fix_privilege_tables' Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names Phase 5/7: Fixing table and database names
Phase 6/7: Checking and upgrading tables Phase 6/7: Checking and upgrading tables
@ -157,6 +160,7 @@ mysql.columns_priv OK
mysql.db OK mysql.db OK
mysql.event OK mysql.event OK
mysql.func OK mysql.func OK
mysql.global_priv OK
mysql.gtid_slave_pos OK mysql.gtid_slave_pos OK
mysql.help_category OK mysql.help_category OK
mysql.help_keyword OK mysql.help_keyword OK
@ -179,9 +183,9 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK mysql.time_zone_transition OK
mysql.time_zone_transition_type OK mysql.time_zone_transition_type OK
mysql.transaction_registry OK mysql.transaction_registry OK
mysql.user OK
Phase 2/7: Installing used storage engines... Skipped Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views Phase 3/7: Fixing views
mysql.user OK
Phase 4/7: Running 'mysql_fix_privilege_tables' Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names Phase 5/7: Fixing table and database names
Phase 6/7: Checking and upgrading tables Phase 6/7: Checking and upgrading tables
@ -211,6 +215,7 @@ mysql.columns_priv OK
mysql.db OK mysql.db OK
mysql.event OK mysql.event OK
mysql.func OK mysql.func OK
mysql.global_priv OK
mysql.gtid_slave_pos OK mysql.gtid_slave_pos OK
mysql.help_category OK mysql.help_category OK
mysql.help_keyword OK mysql.help_keyword OK
@ -233,9 +238,9 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK mysql.time_zone_transition OK
mysql.time_zone_transition_type OK mysql.time_zone_transition_type OK
mysql.transaction_registry OK mysql.transaction_registry OK
mysql.user OK
Phase 2/7: Installing used storage engines... Skipped Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views Phase 3/7: Fixing views
mysql.user OK
Phase 4/7: Running 'mysql_fix_privilege_tables' Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names Phase 5/7: Fixing table and database names
Phase 6/7: Checking and upgrading tables Phase 6/7: Checking and upgrading tables
@ -268,6 +273,7 @@ mysql.columns_priv OK
mysql.db OK mysql.db OK
mysql.event OK mysql.event OK
mysql.func OK mysql.func OK
mysql.global_priv OK
mysql.gtid_slave_pos OK mysql.gtid_slave_pos OK
mysql.help_category OK mysql.help_category OK
mysql.help_keyword OK mysql.help_keyword OK
@ -290,9 +296,9 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK mysql.time_zone_transition OK
mysql.time_zone_transition_type OK mysql.time_zone_transition_type OK
mysql.transaction_registry OK mysql.transaction_registry OK
mysql.user OK
Phase 2/7: Installing used storage engines... Skipped Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views Phase 3/7: Fixing views
mysql.user OK
Phase 4/7: Running 'mysql_fix_privilege_tables' Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names Phase 5/7: Fixing table and database names
Phase 6/7: Checking and upgrading tables Phase 6/7: Checking and upgrading tables
@ -320,6 +326,7 @@ mysql.columns_priv OK
mysql.db OK mysql.db OK
mysql.event OK mysql.event OK
mysql.func OK mysql.func OK
mysql.global_priv OK
mysql.gtid_slave_pos OK mysql.gtid_slave_pos OK
mysql.help_category OK mysql.help_category OK
mysql.help_keyword OK mysql.help_keyword OK
@ -342,7 +349,6 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK mysql.time_zone_transition OK
mysql.time_zone_transition_type OK mysql.time_zone_transition_type OK
mysql.transaction_registry OK mysql.transaction_registry OK
mysql.user OK
Phase 2/7: Installing used storage engines... Skipped Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views... Skipped Phase 3/7: Fixing views... Skipped
Phase 4/7: Running 'mysql_fix_privilege_tables' Phase 4/7: Running 'mysql_fix_privilege_tables'
@ -364,6 +370,7 @@ mysql.columns_priv OK
mysql.db OK mysql.db OK
mysql.event OK mysql.event OK
mysql.func OK mysql.func OK
mysql.global_priv OK
mysql.gtid_slave_pos OK mysql.gtid_slave_pos OK
mysql.help_category OK mysql.help_category OK
mysql.help_keyword OK mysql.help_keyword OK
@ -386,9 +393,9 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK mysql.time_zone_transition OK
mysql.time_zone_transition_type OK mysql.time_zone_transition_type OK
mysql.transaction_registry OK mysql.transaction_registry OK
mysql.user OK
Phase 2/7: Installing used storage engines... Skipped Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views Phase 3/7: Fixing views
mysql.user OK
Phase 4/7: Running 'mysql_fix_privilege_tables' Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names Phase 5/7: Fixing table and database names
Phase 6/7: Checking and upgrading tables Phase 6/7: Checking and upgrading tables
@ -429,6 +436,7 @@ mysql.columns_priv OK
mysql.db OK mysql.db OK
mysql.event OK mysql.event OK
mysql.func OK mysql.func OK
mysql.global_priv OK
mysql.gtid_slave_pos OK mysql.gtid_slave_pos OK
mysql.help_category OK mysql.help_category OK
mysql.help_keyword OK mysql.help_keyword OK
@ -451,9 +459,9 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK mysql.time_zone_transition OK
mysql.time_zone_transition_type OK mysql.time_zone_transition_type OK
mysql.transaction_registry OK mysql.transaction_registry OK
mysql.user OK
Phase 2/7: Installing used storage engines... Skipped Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views Phase 3/7: Fixing views
mysql.user OK
Phase 4/7: Running 'mysql_fix_privilege_tables' Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names Phase 5/7: Fixing table and database names
Phase 6/7: Checking and upgrading tables Phase 6/7: Checking and upgrading tables
@ -511,6 +519,7 @@ mysql.columns_priv OK
mysql.db OK mysql.db OK
mysql.event OK mysql.event OK
mysql.func OK mysql.func OK
mysql.global_priv OK
mysql.gtid_slave_pos OK mysql.gtid_slave_pos OK
mysql.help_category OK mysql.help_category OK
mysql.help_keyword OK mysql.help_keyword OK
@ -533,9 +542,9 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK mysql.time_zone_transition OK
mysql.time_zone_transition_type OK mysql.time_zone_transition_type OK
mysql.transaction_registry OK mysql.transaction_registry OK
mysql.user OK
Phase 2/7: Installing used storage engines... Skipped Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views Phase 3/7: Fixing views
mysql.user OK
Phase 4/7: Running 'mysql_fix_privilege_tables' Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names Phase 5/7: Fixing table and database names
Phase 6/7: Checking and upgrading tables Phase 6/7: Checking and upgrading tables
@ -566,7 +575,7 @@ Start of 10.3 tests
# Ensure that mysql_upgrade correctly sets truncate_versioning_priv # Ensure that mysql_upgrade correctly sets truncate_versioning_priv
# on upgrade from 10.2 # on upgrade from 10.2
# #
flush privileges; drop view mysql.user_bak;
CREATE USER 'user3'@'%'; CREATE USER 'user3'@'%';
GRANT USAGE ON *.* TO 'user3'@'%'; GRANT USAGE ON *.* TO 'user3'@'%';
GRANT ALL PRIVILEGES ON `roelt`.`test2` TO 'user3'@'%'; GRANT ALL PRIVILEGES ON `roelt`.`test2` TO 'user3'@'%';
@ -580,3 +589,5 @@ GRANT USAGE ON *.* TO 'user3'@'%'
GRANT ALL PRIVILEGES ON `roelt`.`test2` TO 'user3'@'%' GRANT ALL PRIVILEGES ON `roelt`.`test2` TO 'user3'@'%'
DROP USER 'user3'@'%'; DROP USER 'user3'@'%';
update mysql.db set Delete_history_priv='Y' where db like 'test%'; update mysql.db set Delete_history_priv='Y' where db like 'test%';
drop table mysql.global_priv;
rename table mysql.global_priv_bak to mysql.global_priv;

View file

@ -227,7 +227,8 @@ SET GLOBAL enforce_storage_engine=NULL;
--echo # on upgrade from 10.2 --echo # on upgrade from 10.2
--echo # --echo #
flush privileges; --source include/switch_to_mysql_user.inc
drop view mysql.user_bak;
CREATE USER 'user3'@'%'; CREATE USER 'user3'@'%';
GRANT USAGE ON *.* TO 'user3'@'%'; GRANT USAGE ON *.* TO 'user3'@'%';
GRANT ALL PRIVILEGES ON `roelt`.`test2` TO 'user3'@'%'; GRANT ALL PRIVILEGES ON `roelt`.`test2` TO 'user3'@'%';
@ -241,3 +242,5 @@ flush privileges;
SHOW GRANTS FOR 'user3'@'%'; SHOW GRANTS FOR 'user3'@'%';
DROP USER 'user3'@'%'; DROP USER 'user3'@'%';
update mysql.db set Delete_history_priv='Y' where db like 'test%'; update mysql.db set Delete_history_priv='Y' where db like 'test%';
drop table mysql.global_priv;
rename table mysql.global_priv_bak to mysql.global_priv;

View file

@ -7,6 +7,7 @@ mysql.columns_priv OK
mysql.db OK mysql.db OK
mysql.event OK mysql.event OK
mysql.func OK mysql.func OK
mysql.global_priv OK
mysql.gtid_slave_pos OK mysql.gtid_slave_pos OK
mysql.help_category OK mysql.help_category OK
mysql.help_keyword OK mysql.help_keyword OK
@ -35,7 +36,6 @@ mysql.time_zone_transition_type OK
mysql.transaction_registry mysql.transaction_registry
Error : Unknown storage engine 'InnoDB' Error : Unknown storage engine 'InnoDB'
error : Corrupt error : Corrupt
mysql.user OK
Repairing tables Repairing tables
mysql.innodb_index_stats mysql.innodb_index_stats

View file

@ -1,3 +1,4 @@
drop view mysql.user_bak;
install soname 'ha_blackhole'; install soname 'ha_blackhole';
install soname 'ha_archive'; install soname 'ha_archive';
create table t1 (a int) engine=blackhole; create table t1 (a int) engine=blackhole;
@ -61,6 +62,7 @@ mysql.columns_priv OK
mysql.db OK mysql.db OK
mysql.event OK mysql.event OK
mysql.func OK mysql.func OK
mysql.global_priv_bak OK
mysql.gtid_slave_pos OK mysql.gtid_slave_pos OK
mysql.help_category OK mysql.help_category OK
mysql.help_keyword OK mysql.help_keyword OK
@ -140,6 +142,9 @@ Warnings:
Level Warning Level Warning
Code 1286 Code 1286
Message Unknown storage engine 'ARCHIVE' Message Unknown storage engine 'ARCHIVE'
drop table mysql.global_priv;
rename table mysql.global_priv_bak to mysql.global_priv;
drop view mysql.user_bak;
alter table mysql.user drop column default_role, drop column max_statement_time; alter table mysql.user drop column default_role, drop column max_statement_time;
Phase 1/7: Checking and upgrading mysql database Phase 1/7: Checking and upgrading mysql database
Processing databases Processing databases
@ -149,6 +154,7 @@ mysql.columns_priv OK
mysql.db OK mysql.db OK
mysql.event OK mysql.event OK
mysql.func OK mysql.func OK
mysql.global_priv_bak OK
mysql.gtid_slave_pos OK mysql.gtid_slave_pos OK
mysql.help_category OK mysql.help_category OK
mysql.help_keyword OK mysql.help_keyword OK
@ -228,6 +234,9 @@ Warnings:
Level Warning Level Warning
Code 1286 Code 1286
Message Unknown storage engine 'ARCHIVE' Message Unknown storage engine 'ARCHIVE'
drop table mysql.global_priv;
rename table mysql.global_priv_bak to mysql.global_priv;
drop view mysql.user_bak;
alter table mysql.user drop column default_role, drop column max_statement_time; alter table mysql.user drop column default_role, drop column max_statement_time;
Phase 1/7: Checking and upgrading mysql database Phase 1/7: Checking and upgrading mysql database
Processing databases Processing databases
@ -237,6 +246,7 @@ mysql.columns_priv OK
mysql.db OK mysql.db OK
mysql.event OK mysql.event OK
mysql.func OK mysql.func OK
mysql.global_priv_bak OK
mysql.gtid_slave_pos OK mysql.gtid_slave_pos OK
mysql.help_category OK mysql.help_category OK
mysql.help_keyword OK mysql.help_keyword OK
@ -303,3 +313,5 @@ table_comment
drop table t1, t2; drop table t1, t2;
uninstall plugin blackhole; uninstall plugin blackhole;
uninstall plugin archive; uninstall plugin archive;
drop table mysql.global_priv;
rename table mysql.global_priv_bak to mysql.global_priv;

View file

@ -3,6 +3,8 @@
# #
source include/have_innodb.inc; source include/have_innodb.inc;
source include/not_embedded.inc; source include/not_embedded.inc;
source include/switch_to_mysql_user.inc;
drop view mysql.user_bak;
if (!$HA_BLACKHOLE_SO) { if (!$HA_BLACKHOLE_SO) {
skip Need blackhole plugin; skip Need blackhole plugin;
@ -33,6 +35,11 @@ exec $MYSQL_UPGRADE 2>&1;
select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t1'; select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t1';
select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t2'; select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t2';
drop table mysql.global_priv;
rename table mysql.global_priv_bak to mysql.global_priv;
source include/switch_to_mysql_user.inc;
drop view mysql.user_bak;
# pretend it's an upgrade from 10.0 # pretend it's an upgrade from 10.0
alter table mysql.user drop column default_role, drop column max_statement_time; alter table mysql.user drop column default_role, drop column max_statement_time;
@ -47,6 +54,11 @@ exec $MYSQL_UPGRADE 2>&1;
select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t1'; select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t1';
select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t2'; select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t2';
drop table mysql.global_priv;
rename table mysql.global_priv_bak to mysql.global_priv;
source include/switch_to_mysql_user.inc;
drop view mysql.user_bak;
alter table mysql.user drop column default_role, drop column max_statement_time; alter table mysql.user drop column default_role, drop column max_statement_time;
remove_file $datadir/mysql_upgrade_info; remove_file $datadir/mysql_upgrade_info;
@ -60,3 +72,6 @@ drop table t1, t2;
remove_file $datadir/mysql_upgrade_info; remove_file $datadir/mysql_upgrade_info;
uninstall plugin blackhole; uninstall plugin blackhole;
uninstall plugin archive; uninstall plugin archive;
drop table mysql.global_priv;
rename table mysql.global_priv_bak to mysql.global_priv;

View file

@ -9,6 +9,7 @@ mysql.columns_priv OK
mysql.db OK mysql.db OK
mysql.event OK mysql.event OK
mysql.func OK mysql.func OK
mysql.global_priv OK
mysql.gtid_slave_pos OK mysql.gtid_slave_pos OK
mysql.help_category OK mysql.help_category OK
mysql.help_keyword OK mysql.help_keyword OK
@ -31,9 +32,9 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK mysql.time_zone_transition OK
mysql.time_zone_transition_type OK mysql.time_zone_transition_type OK
mysql.transaction_registry OK mysql.transaction_registry OK
mysql.user OK
Phase 2/7: Installing used storage engines... Skipped Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views Phase 3/7: Fixing views
mysql.user OK
Phase 4/7: Running 'mysql_fix_privilege_tables' Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names Phase 5/7: Fixing table and database names
Phase 6/7: Checking and upgrading tables Phase 6/7: Checking and upgrading tables

View file

@ -71,6 +71,7 @@ mysql.columns_priv OK
mysql.db OK mysql.db OK
mysql.event OK mysql.event OK
mysql.func OK mysql.func OK
mysql.global_priv OK
mysql.gtid_slave_pos OK mysql.gtid_slave_pos OK
mysql.help_category OK mysql.help_category OK
mysql.help_keyword OK mysql.help_keyword OK
@ -99,7 +100,6 @@ mysql.time_zone_transition_type OK
mysql.transaction_registry mysql.transaction_registry
Error : Unknown storage engine 'InnoDB' Error : Unknown storage engine 'InnoDB'
error : Corrupt error : Corrupt
mysql.user OK
Repairing tables Repairing tables
mysql.innodb_index_stats mysql.innodb_index_stats
@ -113,6 +113,7 @@ Error : Unknown storage engine 'InnoDB'
error : Corrupt error : Corrupt
Phase 2/7: Installing used storage engines... Skipped Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views Phase 3/7: Fixing views
mysql.user OK
test.v1 OK test.v1 OK
test.v1badcheck OK test.v1badcheck OK
test.v2 OK test.v2 OK
@ -220,6 +221,7 @@ mysql.db OK
mysql.ev_bk OK mysql.ev_bk OK
mysql.event OK mysql.event OK
mysql.func OK mysql.func OK
mysql.global_priv OK
mysql.gtid_slave_pos OK mysql.gtid_slave_pos OK
mysql.help_category OK mysql.help_category OK
mysql.help_keyword OK mysql.help_keyword OK
@ -248,7 +250,6 @@ mysql.time_zone_transition_type OK
mysql.transaction_registry mysql.transaction_registry
Error : Unknown storage engine 'InnoDB' Error : Unknown storage engine 'InnoDB'
error : Corrupt error : Corrupt
mysql.user OK
Repairing tables Repairing tables
mysql.innodb_index_stats mysql.innodb_index_stats
@ -262,6 +263,7 @@ Error : Unknown storage engine 'InnoDB'
error : Corrupt error : Corrupt
Phase 2/7: Installing used storage engines... Skipped Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views from mysql Phase 3/7: Fixing views from mysql
mysql.user OK
test.v1 OK test.v1 OK
test.v2 OK test.v2 OK
test.v3 OK test.v3 OK
@ -344,6 +346,7 @@ mysql.db OK
mysql.ev_bk OK mysql.ev_bk OK
mysql.event OK mysql.event OK
mysql.func OK mysql.func OK
mysql.global_priv OK
mysql.gtid_slave_pos OK mysql.gtid_slave_pos OK
mysql.help_category OK mysql.help_category OK
mysql.help_keyword OK mysql.help_keyword OK
@ -372,7 +375,6 @@ mysql.time_zone_transition_type OK
mysql.transaction_registry mysql.transaction_registry
Error : Unknown storage engine 'InnoDB' Error : Unknown storage engine 'InnoDB'
error : Corrupt error : Corrupt
mysql.user OK
Repairing tables Repairing tables
mysql.innodb_index_stats mysql.innodb_index_stats
@ -386,6 +388,7 @@ Error : Unknown storage engine 'InnoDB'
error : Corrupt error : Corrupt
Phase 2/7: Installing used storage engines... Skipped Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views from mysql Phase 3/7: Fixing views from mysql
mysql.user OK
test.v1 OK test.v1 OK
test.v2 OK test.v2 OK
test.v3 OK test.v3 OK

View file

@ -61,7 +61,7 @@ BEGIN
#Q> INSERT INTO t1 VALUES (10, 1, 2, 3, 4, 5, 6, 7, "") #Q> INSERT INTO t1 VALUES (10, 1, 2, 3, 4, 5, 6, 7, "")
#<date> server id 1 end_log_pos 899 CRC32 XXX Table_map: `test`.`t1` mapped to number num #<date> server id 1 end_log_pos 899 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 899 # at 899
#<date> server id 1 end_log_pos 967 CRC32 XXX Write_compressed_rows: table id 30 flags: STMT_END_F #<date> server id 1 end_log_pos 967 CRC32 XXX Write_compressed_rows: table id 31 flags: STMT_END_F
### INSERT INTO `test`.`t1` ### INSERT INTO `test`.`t1`
### SET ### SET
### @1=10 /* INT meta=0 nullable=0 is_null=0 */ ### @1=10 /* INT meta=0 nullable=0 is_null=0 */
@ -90,7 +90,7 @@ BEGIN
#Q> INSERT INTO t1 VALUES (11, 1, 2, 3, 4, 5, 6, 7, NULL) #Q> INSERT INTO t1 VALUES (11, 1, 2, 3, 4, 5, 6, 7, NULL)
#<date> server id 1 end_log_pos 1214 CRC32 XXX Table_map: `test`.`t1` mapped to number num #<date> server id 1 end_log_pos 1214 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 1214 # at 1214
#<date> server id 1 end_log_pos 1281 CRC32 XXX Write_compressed_rows: table id 30 flags: STMT_END_F #<date> server id 1 end_log_pos 1281 CRC32 XXX Write_compressed_rows: table id 31 flags: STMT_END_F
### INSERT INTO `test`.`t1` ### INSERT INTO `test`.`t1`
### SET ### SET
### @1=11 /* INT meta=0 nullable=0 is_null=0 */ ### @1=11 /* INT meta=0 nullable=0 is_null=0 */
@ -119,7 +119,7 @@ BEGIN
#Q> INSERT INTO t1 VALUES (12, 1, 2, 3, NULL, 5, 6, 7, "A") #Q> INSERT INTO t1 VALUES (12, 1, 2, 3, NULL, 5, 6, 7, "A")
#<date> server id 1 end_log_pos 1530 CRC32 XXX Table_map: `test`.`t1` mapped to number num #<date> server id 1 end_log_pos 1530 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 1530 # at 1530
#<date> server id 1 end_log_pos 1596 CRC32 XXX Write_compressed_rows: table id 30 flags: STMT_END_F #<date> server id 1 end_log_pos 1596 CRC32 XXX Write_compressed_rows: table id 31 flags: STMT_END_F
### INSERT INTO `test`.`t1` ### INSERT INTO `test`.`t1`
### SET ### SET
### @1=12 /* INT meta=0 nullable=0 is_null=0 */ ### @1=12 /* INT meta=0 nullable=0 is_null=0 */
@ -148,7 +148,7 @@ BEGIN
#Q> INSERT INTO t1 VALUES (13, 1, 2, 3, 0, 5, 6, 7, "A") #Q> INSERT INTO t1 VALUES (13, 1, 2, 3, 0, 5, 6, 7, "A")
#<date> server id 1 end_log_pos 1842 CRC32 XXX Table_map: `test`.`t1` mapped to number num #<date> server id 1 end_log_pos 1842 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 1842 # at 1842
#<date> server id 1 end_log_pos 1909 CRC32 XXX Write_compressed_rows: table id 30 flags: STMT_END_F #<date> server id 1 end_log_pos 1909 CRC32 XXX Write_compressed_rows: table id 31 flags: STMT_END_F
### INSERT INTO `test`.`t1` ### INSERT INTO `test`.`t1`
### SET ### SET
### @1=13 /* INT meta=0 nullable=0 is_null=0 */ ### @1=13 /* INT meta=0 nullable=0 is_null=0 */
@ -177,7 +177,7 @@ BEGIN
#Q> INSERT INTO t2 SELECT * FROM t1 #Q> INSERT INTO t2 SELECT * FROM t1
#<date> server id 1 end_log_pos 2134 CRC32 XXX Table_map: `test`.`t2` mapped to number num #<date> server id 1 end_log_pos 2134 CRC32 XXX Table_map: `test`.`t2` mapped to number num
# at 2134 # at 2134
#<date> server id 1 end_log_pos 2225 CRC32 XXX Write_compressed_rows: table id 31 flags: STMT_END_F #<date> server id 1 end_log_pos 2225 CRC32 XXX Write_compressed_rows: table id 32 flags: STMT_END_F
### INSERT INTO `test`.`t2` ### INSERT INTO `test`.`t2`
### SET ### SET
### @1=10 /* INT meta=0 nullable=0 is_null=0 */ ### @1=10 /* INT meta=0 nullable=0 is_null=0 */
@ -239,7 +239,7 @@ BEGIN
#Q> UPDATE t2 SET f4=5 WHERE f4>0 or f4 is NULL #Q> UPDATE t2 SET f4=5 WHERE f4>0 or f4 is NULL
#<date> server id 1 end_log_pos 2462 CRC32 XXX Table_map: `test`.`t2` mapped to number num #<date> server id 1 end_log_pos 2462 CRC32 XXX Table_map: `test`.`t2` mapped to number num
# at 2462 # at 2462
#<date> server id 1 end_log_pos 2561 CRC32 XXX Update_compressed_rows: table id 31 flags: STMT_END_F #<date> server id 1 end_log_pos 2561 CRC32 XXX Update_compressed_rows: table id 32 flags: STMT_END_F
### UPDATE `test`.`t2` ### UPDATE `test`.`t2`
### WHERE ### WHERE
### @1=10 /* INT meta=0 nullable=0 is_null=0 */ ### @1=10 /* INT meta=0 nullable=0 is_null=0 */
@ -320,7 +320,7 @@ BEGIN
#Q> DELETE FROM t1 #Q> DELETE FROM t1
#<date> server id 1 end_log_pos 2769 CRC32 XXX Table_map: `test`.`t1` mapped to number num #<date> server id 1 end_log_pos 2769 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 2769 # at 2769
#<date> server id 1 end_log_pos 2861 CRC32 XXX Delete_compressed_rows: table id 30 flags: STMT_END_F #<date> server id 1 end_log_pos 2861 CRC32 XXX Delete_compressed_rows: table id 31 flags: STMT_END_F
### DELETE FROM `test`.`t1` ### DELETE FROM `test`.`t1`
### WHERE ### WHERE
### @1=10 /* INT meta=0 nullable=0 is_null=0 */ ### @1=10 /* INT meta=0 nullable=0 is_null=0 */
@ -382,7 +382,7 @@ BEGIN
#Q> DELETE FROM t2 #Q> DELETE FROM t2
#<date> server id 1 end_log_pos 3069 CRC32 XXX Table_map: `test`.`t2` mapped to number num #<date> server id 1 end_log_pos 3069 CRC32 XXX Table_map: `test`.`t2` mapped to number num
# at 3069 # at 3069
#<date> server id 1 end_log_pos 3154 CRC32 XXX Delete_compressed_rows: table id 31 flags: STMT_END_F #<date> server id 1 end_log_pos 3154 CRC32 XXX Delete_compressed_rows: table id 32 flags: STMT_END_F
### DELETE FROM `test`.`t2` ### DELETE FROM `test`.`t2`
### WHERE ### WHERE
### @1=10 /* INT meta=0 nullable=0 is_null=0 */ ### @1=10 /* INT meta=0 nullable=0 is_null=0 */

View file

@ -59,7 +59,7 @@ BEGIN
#Q> INSERT INTO t1 VALUES (10, 1, 2, 3, 4, 5, 6, 7, "") #Q> INSERT INTO t1 VALUES (10, 1, 2, 3, 4, 5, 6, 7, "")
#<date> server id 1 end_log_pos 946 CRC32 XXX Table_map: `test`.`t1` mapped to number num #<date> server id 1 end_log_pos 946 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 946 # at 946
#<date> server id 1 end_log_pos 1015 CRC32 XXX Write_rows: table id 30 flags: STMT_END_F #<date> server id 1 end_log_pos 1015 CRC32 XXX Write_rows: table id 31 flags: STMT_END_F
### INSERT INTO `test`.`t1` ### INSERT INTO `test`.`t1`
### SET ### SET
### @1=10 /* INT meta=0 nullable=0 is_null=0 */ ### @1=10 /* INT meta=0 nullable=0 is_null=0 */
@ -88,7 +88,7 @@ BEGIN
#Q> INSERT INTO t1 VALUES (11, 1, 2, 3, 4, 5, 6, 7, NULL) #Q> INSERT INTO t1 VALUES (11, 1, 2, 3, 4, 5, 6, 7, NULL)
#<date> server id 1 end_log_pos 1262 CRC32 XXX Table_map: `test`.`t1` mapped to number num #<date> server id 1 end_log_pos 1262 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 1262 # at 1262
#<date> server id 1 end_log_pos 1330 CRC32 XXX Write_rows: table id 30 flags: STMT_END_F #<date> server id 1 end_log_pos 1330 CRC32 XXX Write_rows: table id 31 flags: STMT_END_F
### INSERT INTO `test`.`t1` ### INSERT INTO `test`.`t1`
### SET ### SET
### @1=11 /* INT meta=0 nullable=0 is_null=0 */ ### @1=11 /* INT meta=0 nullable=0 is_null=0 */
@ -117,7 +117,7 @@ BEGIN
#Q> INSERT INTO t1 VALUES (12, 1, 2, 3, NULL, 5, 6, 7, "A") #Q> INSERT INTO t1 VALUES (12, 1, 2, 3, NULL, 5, 6, 7, "A")
#<date> server id 1 end_log_pos 1579 CRC32 XXX Table_map: `test`.`t1` mapped to number num #<date> server id 1 end_log_pos 1579 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 1579 # at 1579
#<date> server id 1 end_log_pos 1646 CRC32 XXX Write_rows: table id 30 flags: STMT_END_F #<date> server id 1 end_log_pos 1646 CRC32 XXX Write_rows: table id 31 flags: STMT_END_F
### INSERT INTO `test`.`t1` ### INSERT INTO `test`.`t1`
### SET ### SET
### @1=12 /* INT meta=0 nullable=0 is_null=0 */ ### @1=12 /* INT meta=0 nullable=0 is_null=0 */
@ -146,7 +146,7 @@ BEGIN
#Q> INSERT INTO t1 VALUES (13, 1, 2, 3, 0, 5, 6, 7, "A") #Q> INSERT INTO t1 VALUES (13, 1, 2, 3, 0, 5, 6, 7, "A")
#<date> server id 1 end_log_pos 1892 CRC32 XXX Table_map: `test`.`t1` mapped to number num #<date> server id 1 end_log_pos 1892 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 1892 # at 1892
#<date> server id 1 end_log_pos 1962 CRC32 XXX Write_rows: table id 30 flags: STMT_END_F #<date> server id 1 end_log_pos 1962 CRC32 XXX Write_rows: table id 31 flags: STMT_END_F
### INSERT INTO `test`.`t1` ### INSERT INTO `test`.`t1`
### SET ### SET
### @1=13 /* INT meta=0 nullable=0 is_null=0 */ ### @1=13 /* INT meta=0 nullable=0 is_null=0 */
@ -175,7 +175,7 @@ BEGIN
#Q> INSERT INTO t2 SELECT * FROM t1 #Q> INSERT INTO t2 SELECT * FROM t1
#<date> server id 1 end_log_pos 2187 CRC32 XXX Table_map: `test`.`t2` mapped to number num #<date> server id 1 end_log_pos 2187 CRC32 XXX Table_map: `test`.`t2` mapped to number num
# at 2187 # at 2187
#<date> server id 1 end_log_pos 2354 CRC32 XXX Write_rows: table id 31 flags: STMT_END_F #<date> server id 1 end_log_pos 2354 CRC32 XXX Write_rows: table id 32 flags: STMT_END_F
### INSERT INTO `test`.`t2` ### INSERT INTO `test`.`t2`
### SET ### SET
### @1=10 /* INT meta=0 nullable=0 is_null=0 */ ### @1=10 /* INT meta=0 nullable=0 is_null=0 */
@ -237,7 +237,7 @@ BEGIN
#Q> UPDATE t2 SET f4=5 WHERE f4>0 or f4 is NULL #Q> UPDATE t2 SET f4=5 WHERE f4>0 or f4 is NULL
#<date> server id 1 end_log_pos 2591 CRC32 XXX Table_map: `test`.`t2` mapped to number num #<date> server id 1 end_log_pos 2591 CRC32 XXX Table_map: `test`.`t2` mapped to number num
# at 2591 # at 2591
#<date> server id 1 end_log_pos 2665 CRC32 XXX Update_rows: table id 31 flags: STMT_END_F #<date> server id 1 end_log_pos 2665 CRC32 XXX Update_rows: table id 32 flags: STMT_END_F
### UPDATE `test`.`t2` ### UPDATE `test`.`t2`
### WHERE ### WHERE
### @1=10 /* INT meta=0 nullable=0 is_null=0 */ ### @1=10 /* INT meta=0 nullable=0 is_null=0 */
@ -273,7 +273,7 @@ BEGIN
#Q> DELETE FROM t1 #Q> DELETE FROM t1
#<date> server id 1 end_log_pos 2873 CRC32 XXX Table_map: `test`.`t1` mapped to number num #<date> server id 1 end_log_pos 2873 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 2873 # at 2873
#<date> server id 1 end_log_pos 2927 CRC32 XXX Delete_rows: table id 30 flags: STMT_END_F #<date> server id 1 end_log_pos 2927 CRC32 XXX Delete_rows: table id 31 flags: STMT_END_F
### DELETE FROM `test`.`t1` ### DELETE FROM `test`.`t1`
### WHERE ### WHERE
### @1=10 /* INT meta=0 nullable=0 is_null=0 */ ### @1=10 /* INT meta=0 nullable=0 is_null=0 */
@ -303,7 +303,7 @@ BEGIN
#Q> DELETE FROM t2 #Q> DELETE FROM t2
#<date> server id 1 end_log_pos 3135 CRC32 XXX Table_map: `test`.`t2` mapped to number num #<date> server id 1 end_log_pos 3135 CRC32 XXX Table_map: `test`.`t2` mapped to number num
# at 3135 # at 3135
#<date> server id 1 end_log_pos 3189 CRC32 XXX Delete_rows: table id 31 flags: STMT_END_F #<date> server id 1 end_log_pos 3189 CRC32 XXX Delete_rows: table id 32 flags: STMT_END_F
### DELETE FROM `test`.`t2` ### DELETE FROM `test`.`t2`
### WHERE ### WHERE
### @1=10 /* INT meta=0 nullable=0 is_null=0 */ ### @1=10 /* INT meta=0 nullable=0 is_null=0 */

View file

@ -9,6 +9,7 @@ mysql.columns_priv OK
mysql.db OK mysql.db OK
mysql.event OK mysql.event OK
mysql.func OK mysql.func OK
mysql.global_priv OK
mysql.gtid_slave_pos OK mysql.gtid_slave_pos OK
mysql.help_category OK mysql.help_category OK
mysql.help_keyword OK mysql.help_keyword OK
@ -31,7 +32,6 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK mysql.time_zone_transition OK
mysql.time_zone_transition_type OK mysql.time_zone_transition_type OK
mysql.transaction_registry OK mysql.transaction_registry OK
mysql.user OK
mtr.global_suppressions Table is already up to date mtr.global_suppressions Table is already up to date
mtr.test_suppressions Table is already up to date mtr.test_suppressions Table is already up to date
mysql.column_stats OK mysql.column_stats OK
@ -39,6 +39,7 @@ mysql.columns_priv OK
mysql.db OK mysql.db OK
mysql.event OK mysql.event OK
mysql.func OK mysql.func OK
mysql.global_priv OK
mysql.gtid_slave_pos OK mysql.gtid_slave_pos OK
mysql.help_category OK mysql.help_category OK
mysql.help_keyword OK mysql.help_keyword OK
@ -67,12 +68,12 @@ mysql.time_zone_transition_type OK
mysql.transaction_registry mysql.transaction_registry
note : Table does not support optimize, doing recreate + analyze instead note : Table does not support optimize, doing recreate + analyze instead
status : OK status : OK
mysql.user OK
mysql.column_stats OK mysql.column_stats OK
mysql.columns_priv OK mysql.columns_priv OK
mysql.db OK mysql.db OK
mysql.event OK mysql.event OK
mysql.func OK mysql.func OK
mysql.global_priv OK
mysql.gtid_slave_pos OK mysql.gtid_slave_pos OK
mysql.help_category OK mysql.help_category OK
mysql.help_keyword OK mysql.help_keyword OK
@ -95,12 +96,12 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK mysql.time_zone_transition OK
mysql.time_zone_transition_type OK mysql.time_zone_transition_type OK
mysql.transaction_registry OK mysql.transaction_registry OK
mysql.user OK
mysql.column_stats Table is already up to date mysql.column_stats Table is already up to date
mysql.columns_priv Table is already up to date mysql.columns_priv Table is already up to date
mysql.db Table is already up to date mysql.db Table is already up to date
mysql.event Table is already up to date mysql.event Table is already up to date
mysql.func Table is already up to date mysql.func Table is already up to date
mysql.global_priv Table is already up to date
mysql.gtid_slave_pos Table is already up to date mysql.gtid_slave_pos Table is already up to date
mysql.help_category Table is already up to date mysql.help_category Table is already up to date
mysql.help_keyword Table is already up to date mysql.help_keyword Table is already up to date
@ -129,7 +130,6 @@ mysql.time_zone_transition_type Table is already up to date
mysql.transaction_registry mysql.transaction_registry
note : Table does not support optimize, doing recreate + analyze instead note : Table does not support optimize, doing recreate + analyze instead
status : OK status : OK
mysql.user Table is already up to date
create table t1 (a int) engine=myisam; create table t1 (a int) engine=myisam;
create view v1 as select * from t1; create view v1 as select * from t1;
test.t1 OK test.t1 OK
@ -429,6 +429,7 @@ mysql.columns_priv Table is already up to date
mysql.db Table is already up to date mysql.db Table is already up to date
mysql.event Table is already up to date mysql.event Table is already up to date
mysql.func Table is already up to date mysql.func Table is already up to date
mysql.global_priv Table is already up to date
mysql.gtid_slave_pos Table is already up to date mysql.gtid_slave_pos Table is already up to date
mysql.help_category Table is already up to date mysql.help_category Table is already up to date
mysql.help_keyword Table is already up to date mysql.help_keyword Table is already up to date
@ -451,7 +452,6 @@ mysql.time_zone_name Table is already up to date
mysql.time_zone_transition Table is already up to date mysql.time_zone_transition Table is already up to date
mysql.time_zone_transition_type Table is already up to date mysql.time_zone_transition_type Table is already up to date
mysql.transaction_registry OK mysql.transaction_registry OK
mysql.user Table is already up to date
mysqltest1.t1 mysqltest1.t1
warning : Table is marked as crashed warning : Table is marked as crashed
warning : Size of datafile is: 4 Should be: 0 warning : Size of datafile is: 4 Should be: 0

View file

@ -362,6 +362,7 @@ uplain@localhost uplain@localhost
connection default; connection default;
disconnect cleartext_con; disconnect cleartext_con;
DROP USER uplain@localhost; DROP USER uplain@localhost;
drop view mysql.user_bak;
# #
# Bug #59038 : mysql.user.authentication_string column # Bug #59038 : mysql.user.authentication_string column
# causes configuration wizard to fail # causes configuration wizard to fail
@ -443,6 +444,8 @@ ORDER BY COLUMN_NAME;
IS_NULLABLE COLUMN_NAME IS_NULLABLE COLUMN_NAME
NO authentication_string NO authentication_string
NO plugin NO plugin
drop table mysql.global_priv;
rename table mysql.global_priv_bak to mysql.global_priv;
# #
# Bug # 11766641: 59792: BIN/MYSQL -UUNKNOWN -PUNKNOWN # Bug # 11766641: 59792: BIN/MYSQL -UUNKNOWN -PUNKNOWN
# .-> USING PASSWORD: NO # .-> USING PASSWORD: NO

View file

@ -445,6 +445,10 @@ connection default;
disconnect cleartext_con; disconnect cleartext_con;
DROP USER uplain@localhost; DROP USER uplain@localhost;
# prepare for two tests that use mysql.user table
source include/switch_to_mysql_user.inc;
drop view mysql.user_bak;
--echo # --echo #
--echo # Bug #59038 : mysql.user.authentication_string column --echo # Bug #59038 : mysql.user.authentication_string column
--echo # causes configuration wizard to fail --echo # causes configuration wizard to fail
@ -502,7 +506,6 @@ SELECT IS_NULLABLE, COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE
TABLE_SCHEMA='mysql' TABLE_SCHEMA='mysql'
ORDER BY COLUMN_NAME; ORDER BY COLUMN_NAME;
--echo # --echo #
--echo # Bug #11936829: diff. between mysql.user (authentication_string) --echo # Bug #11936829: diff. between mysql.user (authentication_string)
--echo # in fresh and upgraded 5.5.11 --echo # in fresh and upgraded 5.5.11
@ -524,7 +527,8 @@ SELECT IS_NULLABLE, COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS
ORDER BY COLUMN_NAME; ORDER BY COLUMN_NAME;
let $datadir= `select @@datadir`; let $datadir= `select @@datadir`;
remove_file $datadir/mysql_upgrade_info; remove_file $datadir/mysql_upgrade_info;
drop table mysql.global_priv;
rename table mysql.global_priv_bak to mysql.global_priv;
--echo # --echo #
--echo # Bug # 11766641: 59792: BIN/MYSQL -UUNKNOWN -PUNKNOWN --echo # Bug # 11766641: 59792: BIN/MYSQL -UUNKNOWN -PUNKNOWN

View file

@ -1,38 +1,38 @@
set sql_mode=""; set sql_mode="";
CREATE DATABASE test_user_db; CREATE DATABASE test_user_db;
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string User plugin authentication_string
========== test 1.1 ====================================================== ========== test 1.1 ======================================================
CREATE USER plug IDENTIFIED WITH test_plugin_server; CREATE USER plug IDENTIFIED WITH test_plugin_server;
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string User plugin authentication_string
plug test_plugin_server plug test_plugin_server
DROP USER plug; DROP USER plug;
GRANT ALL PRIVILEGES ON test_user_db.* TO plug IDENTIFIED WITH test_plugin_server; GRANT ALL PRIVILEGES ON test_user_db.* TO plug IDENTIFIED WITH test_plugin_server;
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string User plugin authentication_string
plug test_plugin_server plug test_plugin_server
REVOKE ALL PRIVILEGES ON test_user_db.* FROM plug; REVOKE ALL PRIVILEGES ON test_user_db.* FROM plug;
DROP USER plug; DROP USER plug;
CREATE USER plug IDENTIFIED WITH 'test_plugin_server'; CREATE USER plug IDENTIFIED WITH 'test_plugin_server';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string User plugin authentication_string
plug test_plugin_server plug test_plugin_server
DROP USER plug; DROP USER plug;
GRANT ALL PRIVILEGES ON test_user_db.* TO plug IDENTIFIED WITH 'test_plugin_server'; GRANT ALL PRIVILEGES ON test_user_db.* TO plug IDENTIFIED WITH 'test_plugin_server';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string User plugin authentication_string
plug test_plugin_server plug test_plugin_server
REVOKE ALL PRIVILEGES ON test_user_db.* FROM plug; REVOKE ALL PRIVILEGES ON test_user_db.* FROM plug;
DROP USER plug; DROP USER plug;
CREATE USER plug IDENTIFIED WITH test_plugin_server AS ''; CREATE USER plug IDENTIFIED WITH test_plugin_server AS '';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string User plugin authentication_string
plug test_plugin_server plug test_plugin_server
DROP USER plug; DROP USER plug;
GRANT ALL PRIVILEGES ON test_user_db.* TO plug IDENTIFIED WITH test_plugin_server AS ''; GRANT ALL PRIVILEGES ON test_user_db.* TO plug IDENTIFIED WITH test_plugin_server AS '';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string User plugin authentication_string
plug test_plugin_server plug test_plugin_server
REVOKE ALL PRIVILEGES ON test_user_db.* FROM plug; REVOKE ALL PRIVILEGES ON test_user_db.* FROM plug;
DROP USER plug; DROP USER plug;
@ -100,62 +100,62 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest'; CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest';
========== test 1.1.1.6/1.1.2.5 ============================ ========== test 1.1.1.6/1.1.2.5 ============================
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string User plugin authentication_string
plug test_plugin_server plug_dest plug test_plugin_server plug_dest
CREATE USER plug_dest IDENTIFIED BY 'plug_dest_passwd'; CREATE USER plug_dest IDENTIFIED BY 'plug_dest_passwd';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string User plugin authentication_string
plug test_plugin_server plug_dest plug test_plugin_server plug_dest
plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
DROP USER plug, plug_dest; DROP USER plug, plug_dest;
CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest'; CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string User plugin authentication_string
plug test_plugin_server plug_dest plug test_plugin_server plug_dest
DROP USER plug; DROP USER plug;
CREATE USER plug_dest IDENTIFIED BY 'plug_dest_passwd'; CREATE USER plug_dest IDENTIFIED BY 'plug_dest_passwd';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string User plugin authentication_string
plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
DROP USER plug_dest; DROP USER plug_dest;
GRANT ALL PRIVILEGES ON test_user_db.* TO plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest'; GRANT ALL PRIVILEGES ON test_user_db.* TO plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string User plugin authentication_string
plug test_plugin_server plug_dest plug test_plugin_server plug_dest
CREATE USER plug_dest IDENTIFIED BY 'plug_dest_passwd'; CREATE USER plug_dest IDENTIFIED BY 'plug_dest_passwd';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string User plugin authentication_string
plug test_plugin_server plug_dest plug test_plugin_server plug_dest
plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
DROP USER plug, plug_dest; DROP USER plug, plug_dest;
GRANT ALL PRIVILEGES ON test_user_db.* TO plug IDENTIFIED WITH test_plugin_server AS 'plug_dest'; GRANT ALL PRIVILEGES ON test_user_db.* TO plug IDENTIFIED WITH test_plugin_server AS 'plug_dest';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string User plugin authentication_string
plug test_plugin_server plug_dest plug test_plugin_server plug_dest
DROP USER plug; DROP USER plug;
CREATE USER plug_dest IDENTIFIED BY 'plug_dest_passwd'; CREATE USER plug_dest IDENTIFIED BY 'plug_dest_passwd';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string User plugin authentication_string
plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
DROP USER plug_dest; DROP USER plug_dest;
CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest'; CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string User plugin authentication_string
plug test_plugin_server plug_dest plug test_plugin_server plug_dest
GRANT ALL PRIVILEGES ON test_user_db.* TO plug_dest IDENTIFIED BY 'plug_dest_passwd'; GRANT ALL PRIVILEGES ON test_user_db.* TO plug_dest IDENTIFIED BY 'plug_dest_passwd';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string User plugin authentication_string
plug test_plugin_server plug_dest plug test_plugin_server plug_dest
plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
DROP USER plug, plug_dest; DROP USER plug, plug_dest;
CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest'; CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string User plugin authentication_string
plug test_plugin_server plug_dest plug test_plugin_server plug_dest
DROP USER plug; DROP USER plug;
GRANT ALL PRIVILEGES ON test_user_db.* TO plug_dest IDENTIFIED BY 'plug_dest_passwd'; GRANT ALL PRIVILEGES ON test_user_db.* TO plug_dest IDENTIFIED BY 'plug_dest_passwd';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string User plugin authentication_string
plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
DROP USER plug_dest; DROP USER plug_dest;
CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest'; CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest';
@ -170,12 +170,12 @@ ERROR HY000: Operation CREATE USER failed for 'plug'@'%'
DROP USER plug; DROP USER plug;
CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest'; CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest';
SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root';
user plugin authentication_string password User plugin authentication_string Password
plug test_plugin_server plug_dest plug test_plugin_server plug_dest
GRANT ALL PRIVILEGES ON test_user_db.* TO plug IDENTIFIED BY 'plug_dest_passwd'; GRANT ALL PRIVILEGES ON test_user_db.* TO plug IDENTIFIED BY 'plug_dest_passwd';
SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root';
user plugin authentication_string password User plugin authentication_string Password
plug mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 plug mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 *939AEE68989794C0F408277411C26055CDF41119
DROP USER plug; DROP USER plug;
GRANT ALL PRIVILEGES ON test_user_db.* TO plug IDENTIFIED WITH test_plugin_server AS 'plug_dest'; GRANT ALL PRIVILEGES ON test_user_db.* TO plug IDENTIFIED WITH test_plugin_server AS 'plug_dest';
CREATE USER plug IDENTIFIED BY 'plug_dest_passwd'; CREATE USER plug IDENTIFIED BY 'plug_dest_passwd';
@ -184,18 +184,18 @@ DROP USER plug;
CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest'; CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest';
CREATE USER plug_dest IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest'; CREATE USER plug_dest IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest';
SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root';
user plugin authentication_string password User plugin authentication_string Password
plug test_plugin_server plug_dest plug test_plugin_server plug_dest
plug_dest test_plugin_server plug_dest plug_dest test_plugin_server plug_dest
DROP USER plug,plug_dest; DROP USER plug,plug_dest;
CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest'; CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest';
SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root';
user plugin authentication_string password User plugin authentication_string Password
plug test_plugin_server plug_dest plug test_plugin_server plug_dest
GRANT ALL PRIVILEGES ON test_user_db.* TO plug_dest GRANT ALL PRIVILEGES ON test_user_db.* TO plug_dest
IDENTIFIED WITH test_plugin_server AS 'plug_dest'; IDENTIFIED WITH test_plugin_server AS 'plug_dest';
SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root';
user plugin authentication_string password User plugin authentication_string Password
plug test_plugin_server plug_dest plug test_plugin_server plug_dest
plug_dest test_plugin_server plug_dest plug_dest test_plugin_server plug_dest
DROP USER plug,plug_dest; DROP USER plug,plug_dest;
@ -203,23 +203,23 @@ DROP USER plug,plug_dest;
SET NAMES utf8; SET NAMES utf8;
CREATE USER plüg IDENTIFIED WITH 'test_plugin_server' AS 'plüg_dest'; CREATE USER plüg IDENTIFIED WITH 'test_plugin_server' AS 'plüg_dest';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string User plugin authentication_string
plüg test_plugin_server plüg_dest plüg test_plugin_server plüg_dest
DROP USER plüg; DROP USER plüg;
CREATE USER plüg_dest IDENTIFIED BY 'plug_dest_passwd'; CREATE USER plüg_dest IDENTIFIED BY 'plug_dest_passwd';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string User plugin authentication_string
plüg_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 plüg_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
DROP USER plüg_dest; DROP USER plüg_dest;
SET NAMES ascii; SET NAMES ascii;
CREATE USER 'plüg' IDENTIFIED WITH 'test_plugin_server' AS 'plüg_dest'; CREATE USER 'plüg' IDENTIFIED WITH 'test_plugin_server' AS 'plüg_dest';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string User plugin authentication_string
pl??g test_plugin_server pl??g_dest pl??g test_plugin_server pl??g_dest
DROP USER 'plüg'; DROP USER 'plüg';
CREATE USER 'plüg_dest' IDENTIFIED BY 'plug_dest_passwd'; CREATE USER 'plüg_dest' IDENTIFIED BY 'plug_dest_passwd';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string User plugin authentication_string
pl??g_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 pl??g_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
DROP USER 'plüg_dest'; DROP USER 'plüg_dest';
SET NAMES latin1; SET NAMES latin1;
@ -228,12 +228,12 @@ CREATE USER 'plüg' IDENTIFIED WITH 'test_plügin_server' AS 'plüg_dest';
ERROR HY000: Plugin 'test_plügin_server' is not loaded ERROR HY000: Plugin 'test_plügin_server' is not loaded
CREATE USER 'plug' IDENTIFIED WITH 'test_plugin_server' AS 'plüg_dest'; CREATE USER 'plug' IDENTIFIED WITH 'test_plugin_server' AS 'plüg_dest';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string User plugin authentication_string
plug test_plugin_server plüg_dest plug test_plugin_server plüg_dest
DROP USER 'plug'; DROP USER 'plug';
CREATE USER 'plüg_dest' IDENTIFIED BY 'plug_dest_passwd'; CREATE USER 'plüg_dest' IDENTIFIED BY 'plug_dest_passwd';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string User plugin authentication_string
plüg_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 plüg_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
DROP USER 'plüg_dest'; DROP USER 'plüg_dest';
SET NAMES utf8; SET NAMES utf8;
@ -241,22 +241,22 @@ CREATE USER plüg IDENTIFIED WITH 'test_plügin_server' AS 'plüg_dest';
ERROR HY000: Plugin 'test_plügin_server' is not loaded ERROR HY000: Plugin 'test_plügin_server' is not loaded
CREATE USER 'plüg' IDENTIFIED WITH 'test_plugin_server' AS 'plüg_dest'; CREATE USER 'plüg' IDENTIFIED WITH 'test_plugin_server' AS 'plüg_dest';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string User plugin authentication_string
plüg test_plugin_server plüg_dest plüg test_plugin_server plüg_dest
DROP USER 'plüg'; DROP USER 'plüg';
CREATE USER 'plüg_dest' IDENTIFIED BY 'plug_dest_passwd'; CREATE USER 'plüg_dest' IDENTIFIED BY 'plug_dest_passwd';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string User plugin authentication_string
plüg_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 plüg_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
DROP USER 'plüg_dest'; DROP USER 'plüg_dest';
CREATE USER plüg IDENTIFIED WITH test_plugin_server AS 'plüg_dest'; CREATE USER plüg IDENTIFIED WITH test_plugin_server AS 'plüg_dest';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string User plugin authentication_string
plüg test_plugin_server plüg_dest plüg test_plugin_server plüg_dest
DROP USER plüg; DROP USER plüg;
CREATE USER plüg_dest IDENTIFIED BY 'plug_dest_passwd'; CREATE USER plüg_dest IDENTIFIED BY 'plug_dest_passwd';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string User plugin authentication_string
plüg_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 plüg_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
DROP USER plüg_dest; DROP USER plüg_dest;
========== test 1.1.1.2/1.1.2.2============================= ========== test 1.1.1.2/1.1.2.2=============================
@ -271,12 +271,12 @@ CREATE USER plug IDENTIFIED WITH 'hh''s_test_plugin_server' AS 'plug_dest';
ERROR HY000: Plugin 'hh's_test_plugin_server' is not loaded ERROR HY000: Plugin 'hh's_test_plugin_server' is not loaded
CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'hh''s_plug_dest'; CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'hh''s_plug_dest';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string User plugin authentication_string
plug test_plugin_server hh's_plug_dest plug test_plugin_server hh's_plug_dest
DROP USER plug; DROP USER plug;
CREATE USER 'hh''s_plug_dest' IDENTIFIED BY 'plug_dest_passwd'; CREATE USER 'hh''s_plug_dest' IDENTIFIED BY 'plug_dest_passwd';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string User plugin authentication_string
hh's_plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 hh's_plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
DROP USER 'hh''s_plug_dest'; DROP USER 'hh''s_plug_dest';
========== test 1.1.1.4 ==================================== ========== test 1.1.1.4 ====================================
@ -285,13 +285,13 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
========== test 1.1.3.1 ==================================== ========== test 1.1.3.1 ====================================
GRANT INSERT ON test_user_db.* TO grant_user IDENTIFIED WITH test_plugin_server AS 'plug_dest'; GRANT INSERT ON test_user_db.* TO grant_user IDENTIFIED WITH test_plugin_server AS 'plug_dest';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string User plugin authentication_string
grant_user test_plugin_server plug_dest grant_user test_plugin_server plug_dest
CREATE USER plug_dest; CREATE USER plug_dest;
DROP USER plug_dest; DROP USER plug_dest;
GRANT ALL PRIVILEGES ON test_user_db.* TO plug_dest; GRANT ALL PRIVILEGES ON test_user_db.* TO plug_dest;
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string User plugin authentication_string
grant_user test_plugin_server plug_dest grant_user test_plugin_server plug_dest
plug_dest mysql_native_password plug_dest mysql_native_password
DROP USER grant_user,plug_dest; DROP USER grant_user,plug_dest;
@ -299,7 +299,7 @@ set @save_sql_mode= @@sql_mode;
SET @@sql_mode=no_auto_create_user; SET @@sql_mode=no_auto_create_user;
GRANT INSERT ON test_user_db.* TO grant_user IDENTIFIED WITH test_plugin_server AS 'plug_dest'; GRANT INSERT ON test_user_db.* TO grant_user IDENTIFIED WITH test_plugin_server AS 'plug_dest';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string User plugin authentication_string
grant_user test_plugin_server plug_dest grant_user test_plugin_server plug_dest
CREATE USER plug_dest; CREATE USER plug_dest;
DROP USER plug_dest; DROP USER plug_dest;
@ -308,19 +308,19 @@ ERROR 28000: Can't find any matching row in the user table
DROP USER grant_user; DROP USER grant_user;
GRANT INSERT ON test_user_db.* TO grant_user IDENTIFIED WITH test_plugin_server AS 'plug_dest'; GRANT INSERT ON test_user_db.* TO grant_user IDENTIFIED WITH test_plugin_server AS 'plug_dest';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string User plugin authentication_string
grant_user test_plugin_server plug_dest grant_user test_plugin_server plug_dest
CREATE USER plug_dest IDENTIFIED BY 'plug_dest_passwd'; CREATE USER plug_dest IDENTIFIED BY 'plug_dest_passwd';
SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root';
user plugin authentication_string password User plugin authentication_string Password
grant_user test_plugin_server plug_dest grant_user test_plugin_server plug_dest
plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 *939AEE68989794C0F408277411C26055CDF41119
DROP USER plug_dest; DROP USER plug_dest;
GRANT ALL PRIVILEGES ON test_user_db.* TO plug_dest IDENTIFIED BY 'plug_user_passwd'; GRANT ALL PRIVILEGES ON test_user_db.* TO plug_dest IDENTIFIED BY 'plug_user_passwd';
SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root';
user plugin authentication_string password User plugin authentication_string Password
grant_user test_plugin_server plug_dest grant_user test_plugin_server plug_dest
plug_dest mysql_native_password *560881EB651416CEF77314D07D55EDCD5FC1BD6D plug_dest mysql_native_password *560881EB651416CEF77314D07D55EDCD5FC1BD6D *560881EB651416CEF77314D07D55EDCD5FC1BD6D
DROP USER grant_user,plug_dest; DROP USER grant_user,plug_dest;
set @@sql_mode= @save_sql_mode; set @@sql_mode= @save_sql_mode;
DROP DATABASE test_user_db; DROP DATABASE test_user_db;

View file

@ -1,6 +1,6 @@
CREATE DATABASE test_user_db; CREATE DATABASE test_user_db;
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string User plugin authentication_string
========== test 1.1.3.2 ==================================== ========== test 1.1.3.2 ====================================
CREATE USER plug_user IDENTIFIED WITH test_plugin_server AS 'plug_dest'; CREATE USER plug_user IDENTIFIED WITH test_plugin_server AS 'plug_dest';
CREATE USER plug_dest IDENTIFIED BY 'plug_dest_passwd'; CREATE USER plug_dest IDENTIFIED BY 'plug_dest_passwd';
@ -19,7 +19,7 @@ IDENTIFIED WITH test_plugin_server AS 'plug_dest';
GRANT ALL PRIVILEGES ON test_user_db.* TO plug_dest IDENTIFIED BY 'plug_dest_passwd'; GRANT ALL PRIVILEGES ON test_user_db.* TO plug_dest IDENTIFIED BY 'plug_dest_passwd';
GRANT PROXY ON plug_dest TO plug_user; GRANT PROXY ON plug_dest TO plug_user;
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string User plugin authentication_string
plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
plug_user test_plugin_server plug_dest plug_user test_plugin_server plug_dest
1) 1)
@ -70,7 +70,7 @@ ERROR 1045 (28000): Access denied for user 'plug_user'@'localhost' (using passwo
GRANT PROXY ON new_dest TO plug_user; GRANT PROXY ON new_dest TO plug_user;
ERROR 1045 (28000): Access denied for user 'plug_user'@'localhost' (using password: YES) ERROR 1045 (28000): Access denied for user 'plug_user'@'localhost' (using password: YES)
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string User plugin authentication_string
new_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 new_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
plug_user test_plugin_server plug_dest plug_user test_plugin_server plug_dest
DROP USER plug_user,new_dest; DROP USER plug_user,new_dest;
@ -88,7 +88,7 @@ ERROR 1045 (28000): Access denied for user 'plug_user'@'localhost' (using passwo
GRANT PROXY ON new_dest TO plug_user; GRANT PROXY ON new_dest TO plug_user;
ERROR 1045 (28000): Access denied for user 'plug_user'@'localhost' (using password: YES) ERROR 1045 (28000): Access denied for user 'plug_user'@'localhost' (using password: YES)
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string User plugin authentication_string
new_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 new_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
plug_user test_plugin_server plug_dest plug_user test_plugin_server plug_dest
DROP USER plug_user,new_dest; DROP USER plug_user,new_dest;
@ -109,14 +109,14 @@ USER() CURRENT_USER()
new_user@localhost plug_dest@% new_user@localhost plug_dest@%
connection default; connection default;
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string User plugin authentication_string
new_user test_plugin_server plug_dest new_user test_plugin_server plug_dest
plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
disconnect plug_user; disconnect plug_user;
UPDATE mysql.user SET user='plug_user' WHERE user='new_user'; UPDATE mysql.global_priv SET user='plug_user' WHERE user='new_user';
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string User plugin authentication_string
plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
plug_user test_plugin_server plug_dest plug_user test_plugin_server plug_dest
DROP USER plug_dest,plug_user; DROP USER plug_dest,plug_user;
@ -132,36 +132,36 @@ plug_user@localhost plug_dest@%
connection default; connection default;
disconnect plug_user; disconnect plug_user;
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string User plugin authentication_string
plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
plug_user test_plugin_server plug_dest plug_user test_plugin_server plug_dest
UPDATE mysql.user SET user='new_user' WHERE user='plug_user'; UPDATE mysql.global_priv SET user='new_user' WHERE user='plug_user';
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string User plugin authentication_string
new_user test_plugin_server plug_dest new_user test_plugin_server plug_dest
plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
UPDATE mysql.user SET authentication_string='new_dest' WHERE user='new_user'; UPDATE mysql.global_priv SET priv=JSON_SET(priv, '$.authentication_string', 'new_dest') WHERE user='new_user';
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string User plugin authentication_string
new_user test_plugin_server new_dest new_user test_plugin_server new_dest
plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
UPDATE mysql.user SET plugin='new_plugin_server' WHERE user='new_user'; UPDATE mysql.global_priv SET priv=JSON_SET(priv, '$.plugin', 'new_plugin_server') WHERE user='new_user';
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
Warnings: Warnings:
Warning 1524 Plugin 'new_plugin_server' is not loaded Warning 1524 Plugin 'new_plugin_server' is not loaded
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string User plugin authentication_string
new_user new_plugin_server new_dest new_user new_plugin_server new_dest
plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
ERROR 28000: Access denied for user 'new_user'@'localhost' (using password: YES) ERROR 28000: Access denied for user 'new_user'@'localhost' (using password: YES)
UPDATE mysql.user SET plugin='test_plugin_server' WHERE user='new_user'; UPDATE mysql.global_priv SET priv=JSON_SET(priv, '$.plugin', 'test_plugin_server') WHERE user='new_user';
UPDATE mysql.user SET USER='new_dest' WHERE user='plug_dest'; UPDATE mysql.global_priv SET user='new_dest' WHERE user='plug_dest';
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
GRANT PROXY ON new_dest TO new_user; GRANT PROXY ON new_dest TO new_user;
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string User plugin authentication_string
new_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 new_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
new_user test_plugin_server new_dest new_user test_plugin_server new_dest
connect plug_user,localhost,new_user,new_dest; connect plug_user,localhost,new_user,new_dest;
@ -170,11 +170,11 @@ USER() CURRENT_USER()
new_user@localhost new_dest@% new_user@localhost new_dest@%
connection default; connection default;
disconnect plug_user; disconnect plug_user;
UPDATE mysql.user SET USER='plug_dest' WHERE user='new_dest'; UPDATE mysql.global_priv SET user='plug_dest' WHERE user='new_dest';
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
CREATE USER new_dest IDENTIFIED BY 'new_dest_passwd'; CREATE USER new_dest IDENTIFIED BY 'new_dest_passwd';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string User plugin authentication_string
new_dest mysql_native_password *01422E86A6FFF84618914AF149F9AEF64B84170A new_dest mysql_native_password *01422E86A6FFF84618914AF149F9AEF64B84170A
new_user test_plugin_server new_dest new_user test_plugin_server new_dest
plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
@ -190,7 +190,7 @@ DROP USER new_user,new_dest,plug_dest;
CREATE USER ''@'%%' IDENTIFIED WITH test_plugin_server AS 'proxied_user'; CREATE USER ''@'%%' IDENTIFIED WITH test_plugin_server AS 'proxied_user';
CREATE USER proxied_user IDENTIFIED BY 'proxied_user_passwd'; CREATE USER proxied_user IDENTIFIED BY 'proxied_user_passwd';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string User plugin authentication_string
test_plugin_server proxied_user test_plugin_server proxied_user
proxied_user mysql_native_password *D7A51428CD38DB3C5293B9321DA1228BFB1611DD proxied_user mysql_native_password *D7A51428CD38DB3C5293B9321DA1228BFB1611DD
connect proxy_con,localhost,proxied_user,proxied_user_passwd; connect proxy_con,localhost,proxied_user,proxied_user_passwd;
@ -226,7 +226,7 @@ GRANT ALL PRIVILEGES ON test_user_db.* TO ''@'%%'
IDENTIFIED WITH test_plugin_server AS 'proxied_user'; IDENTIFIED WITH test_plugin_server AS 'proxied_user';
CREATE USER proxied_user IDENTIFIED BY 'proxied_user_passwd'; CREATE USER proxied_user IDENTIFIED BY 'proxied_user_passwd';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string User plugin authentication_string
test_plugin_server proxied_user test_plugin_server proxied_user
proxied_user mysql_native_password *D7A51428CD38DB3C5293B9321DA1228BFB1611DD proxied_user mysql_native_password *D7A51428CD38DB3C5293B9321DA1228BFB1611DD
connect proxy_con,localhost,proxied_user,proxied_user_passwd; connect proxy_con,localhost,proxied_user,proxied_user_passwd;
@ -268,7 +268,7 @@ GRANT PROXY ON proxied_user_3 TO ''@'%%';
GRANT PROXY ON proxied_user_4 TO ''@'%%'; GRANT PROXY ON proxied_user_4 TO ''@'%%';
GRANT PROXY ON proxied_user_5 TO ''@'%%'; GRANT PROXY ON proxied_user_5 TO ''@'%%';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string User plugin authentication_string
test_plugin_server proxied_user test_plugin_server proxied_user
proxied_user_1 mysql_native_password *551D5A5177FCC3340F7D2FB0F4D8D1EEA7F7EF71 proxied_user_1 mysql_native_password *551D5A5177FCC3340F7D2FB0F4D8D1EEA7F7EF71
proxied_user_2 mysql_native_password *3D948F77C6A988AFDCA9755AB2A6724362557220 proxied_user_2 mysql_native_password *3D948F77C6A988AFDCA9755AB2A6724362557220

View file

@ -110,7 +110,7 @@ connection default;
--sorted_result --sorted_result
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
disconnect plug_user; disconnect plug_user;
UPDATE mysql.user SET user='plug_user' WHERE user='new_user'; UPDATE mysql.global_priv SET user='plug_user' WHERE user='new_user';
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
--sorted_result --sorted_result
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
@ -128,15 +128,15 @@ connection default;
disconnect plug_user; disconnect plug_user;
--sorted_result --sorted_result
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
UPDATE mysql.user SET user='new_user' WHERE user='plug_user'; UPDATE mysql.global_priv SET user='new_user' WHERE user='plug_user';
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
--sorted_result --sorted_result
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
UPDATE mysql.user SET authentication_string='new_dest' WHERE user='new_user'; UPDATE mysql.global_priv SET priv=JSON_SET(priv, '$.authentication_string', 'new_dest') WHERE user='new_user';
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
--sorted_result --sorted_result
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
UPDATE mysql.user SET plugin='new_plugin_server' WHERE user='new_user'; UPDATE mysql.global_priv SET priv=JSON_SET(priv, '$.plugin', 'new_plugin_server') WHERE user='new_user';
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
--sorted_result --sorted_result
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
@ -144,8 +144,8 @@ SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
--error ER_ACCESS_DENIED_ERROR --error ER_ACCESS_DENIED_ERROR
connect(plug_user,localhost,new_user,new_dest); connect(plug_user,localhost,new_user,new_dest);
--enable_query_log --enable_query_log
UPDATE mysql.user SET plugin='test_plugin_server' WHERE user='new_user'; UPDATE mysql.global_priv SET priv=JSON_SET(priv, '$.plugin', 'test_plugin_server') WHERE user='new_user';
UPDATE mysql.user SET USER='new_dest' WHERE user='plug_dest'; UPDATE mysql.global_priv SET user='new_dest' WHERE user='plug_dest';
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
GRANT PROXY ON new_dest TO new_user; GRANT PROXY ON new_dest TO new_user;
--sorted_result --sorted_result
@ -154,7 +154,7 @@ connect(plug_user,localhost,new_user,new_dest);
select USER(),CURRENT_USER(); select USER(),CURRENT_USER();
connection default; connection default;
disconnect plug_user; disconnect plug_user;
UPDATE mysql.user SET USER='plug_dest' WHERE user='new_dest'; UPDATE mysql.global_priv SET user='plug_dest' WHERE user='new_dest';
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
CREATE USER new_dest IDENTIFIED BY 'new_dest_passwd'; CREATE USER new_dest IDENTIFIED BY 'new_dest_passwd';
--sorted_result --sorted_result

View file

@ -6,7 +6,7 @@ CREATE USER qa_test_1_dest IDENTIFIED BY 'dest_passwd';
GRANT ALL PRIVILEGES ON test_user_db.* TO qa_test_1_dest identified by 'dest_passwd'; GRANT ALL PRIVILEGES ON test_user_db.* TO qa_test_1_dest identified by 'dest_passwd';
GRANT PROXY ON qa_test_1_dest TO qa_test_1_user; GRANT PROXY ON qa_test_1_dest TO qa_test_1_user;
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string User plugin authentication_string
qa_test_1_dest mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22 qa_test_1_dest mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22
qa_test_1_user qa_auth_interface qa_test_1_dest qa_test_1_user qa_auth_interface qa_test_1_dest
SELECT @@proxy_user; SELECT @@proxy_user;
@ -19,7 +19,7 @@ exec MYSQL -h localhost -P MASTER_MYPORT -u qa_test_1_user --password=qa_test_1_
current_user() user() @@local.proxy_user @@local.external_user current_user() user() @@local.proxy_user @@local.external_user
qa_test_1_user@% qa_test_1_user@localhost NULL NULL qa_test_1_user@% qa_test_1_user@localhost NULL NULL
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string User plugin authentication_string
qa_test_1_dest mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22 qa_test_1_dest mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22
qa_test_1_user qa_auth_interface qa_test_1_dest qa_test_1_user qa_auth_interface qa_test_1_dest
DROP USER qa_test_1_user; DROP USER qa_test_1_user;
@ -32,7 +32,7 @@ GRANT ALL PRIVILEGES ON test_user_db.* TO qa_test_2_dest identified by 'dest_pas
GRANT PROXY ON qa_test_2_dest TO qa_test_2_user; GRANT PROXY ON qa_test_2_dest TO qa_test_2_user;
GRANT PROXY ON authenticated_as TO qa_test_2_user; GRANT PROXY ON authenticated_as TO qa_test_2_user;
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string User plugin authentication_string
authenticated_as mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22 authenticated_as mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22
qa_test_2_dest mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22 qa_test_2_dest mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22
qa_test_2_user qa_auth_interface qa_test_2_dest qa_test_2_user qa_auth_interface qa_test_2_dest
@ -46,7 +46,7 @@ exec MYSQL -h localhost -P MASTER_MYPORT -u qa_test_2_user --password=qa_test_2_
current_user() user() @@local.proxy_user @@local.external_user current_user() user() @@local.proxy_user @@local.external_user
authenticated_as@% user_name@localhost 'qa_test_2_user'@'%' externaluser authenticated_as@% user_name@localhost 'qa_test_2_user'@'%' externaluser
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string User plugin authentication_string
authenticated_as mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22 authenticated_as mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22
qa_test_2_dest mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22 qa_test_2_dest mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22
qa_test_2_user qa_auth_interface qa_test_2_dest qa_test_2_user qa_auth_interface qa_test_2_dest
@ -82,9 +82,9 @@ GRANT ALL PRIVILEGES ON test_user_db.* TO ''@'localhost' identified by 'dest_pas
GRANT PROXY ON qa_test_5_dest TO qa_test_5_user; GRANT PROXY ON qa_test_5_dest TO qa_test_5_user;
GRANT PROXY ON qa_test_5_dest TO ''@'localhost'; GRANT PROXY ON qa_test_5_dest TO ''@'localhost';
SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root';
user plugin authentication_string password User plugin authentication_string Password
mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22 mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22 *DFCACE76914AD7BD801FC1A1ECF6562272621A22
qa_test_5_dest mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22 qa_test_5_dest mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22 *DFCACE76914AD7BD801FC1A1ECF6562272621A22
qa_test_5_user qa_auth_interface qa_test_5_dest qa_test_5_user qa_auth_interface qa_test_5_dest
exec MYSQL -h localhost -P MASTER_MYPORT --user=qa_test_5_user --password=qa_test_5_dest test_user_db -e "SELECT current_user(),user(),@@local.proxy_user,@@local.external_user;" 2>&1 exec MYSQL -h localhost -P MASTER_MYPORT --user=qa_test_5_user --password=qa_test_5_dest test_user_db -e "SELECT current_user(),user(),@@local.proxy_user,@@local.external_user;" 2>&1
ERROR 1045 (28000): Access denied for user 'qa_test_5_user'@'localhost' (using password: YES) ERROR 1045 (28000): Access denied for user 'qa_test_5_user'@'localhost' (using password: YES)
@ -97,21 +97,21 @@ CREATE USER qa_test_6_dest IDENTIFIED BY 'dest_passwd';
GRANT ALL PRIVILEGES ON test_user_db.* TO qa_test_6_dest identified by 'dest_passwd'; GRANT ALL PRIVILEGES ON test_user_db.* TO qa_test_6_dest identified by 'dest_passwd';
GRANT PROXY ON qa_test_6_dest TO qa_test_6_user; GRANT PROXY ON qa_test_6_dest TO qa_test_6_user;
SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root';
user plugin authentication_string password User plugin authentication_string Password
qa_test_6_dest mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22 qa_test_6_dest mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22 *DFCACE76914AD7BD801FC1A1ECF6562272621A22
qa_test_6_user qa_auth_interface qa_test_6_dest qa_test_6_user qa_auth_interface qa_test_6_dest
exec MYSQL -h localhost -P MASTER_MYPORT --user=qa_test_6_user --password=qa_test_6_dest test_user_db -e "SELECT current_user(),user(),@@local.proxy_user,@@local.external_user;" 2>&1 exec MYSQL -h localhost -P MASTER_MYPORT --user=qa_test_6_user --password=qa_test_6_dest test_user_db -e "SELECT current_user(),user(),@@local.proxy_user,@@local.external_user;" 2>&1
ERROR 1045 (28000): Access denied for user 'qa_test_6_user'@'localhost' (using password: YES) ERROR 1045 (28000): Access denied for user 'qa_test_6_user'@'localhost' (using password: YES)
GRANT PROXY ON qa_test_6_dest TO root IDENTIFIED WITH qa_auth_interface AS 'qa_test_6_dest'; GRANT PROXY ON qa_test_6_dest TO root IDENTIFIED WITH qa_auth_interface AS 'qa_test_6_dest';
SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root';
user plugin authentication_string password User plugin authentication_string Password
qa_test_6_dest mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22 qa_test_6_dest mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22 *DFCACE76914AD7BD801FC1A1ECF6562272621A22
qa_test_6_user qa_auth_interface qa_test_6_dest qa_test_6_user qa_auth_interface qa_test_6_dest
exec MYSQL -h localhost -P MASTER_MYPORT --user=root --password=qa_test_6_dest test_user_db -e "SELECT current_user(),user(),@@local.proxy_user,@@local.external_user;" 2>&1 exec MYSQL -h localhost -P MASTER_MYPORT --user=root --password=qa_test_6_dest test_user_db -e "SELECT current_user(),user(),@@local.proxy_user,@@local.external_user;" 2>&1
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
REVOKE PROXY ON qa_test_6_dest FROM root; REVOKE PROXY ON qa_test_6_dest FROM root;
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string User plugin authentication_string
qa_test_6_dest mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22 qa_test_6_dest mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22
qa_test_6_user qa_auth_interface qa_test_6_dest qa_test_6_user qa_auth_interface qa_test_6_dest
exec MYSQL -h localhost -P MASTER_MYPORT --user=root --password=qa_test_6_dest test_user_db -e "SELECT current_user(),user(),@@local.proxy_user,@@local.external_user;" 2>&1 exec MYSQL -h localhost -P MASTER_MYPORT --user=root --password=qa_test_6_dest test_user_db -e "SELECT current_user(),user(),@@local.proxy_user,@@local.external_user;" 2>&1
@ -120,7 +120,7 @@ DROP USER qa_test_6_user;
DROP USER qa_test_6_dest; DROP USER qa_test_6_dest;
DELETE FROM mysql.user WHERE user='root' AND plugin='qa_auth_interface'; DELETE FROM mysql.user WHERE user='root' AND plugin='qa_auth_interface';
SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root'; SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root';
user plugin authentication_string password User plugin authentication_string Password
=== Test of the --default_auth option for clients ==== === Test of the --default_auth option for clients ====
CREATE USER qa_test_11_user IDENTIFIED WITH qa_auth_interface AS 'qa_test_11_dest'; CREATE USER qa_test_11_user IDENTIFIED WITH qa_auth_interface AS 'qa_test_11_dest';
CREATE USER qa_test_11_dest IDENTIFIED BY 'dest_passwd'; CREATE USER qa_test_11_dest IDENTIFIED BY 'dest_passwd';

View file

@ -2149,6 +2149,7 @@ show open tables from mysql;
Database Table In_use Name_locked Database Table In_use Name_locked
mysql column_stats 0 0 mysql column_stats 0 0
mysql general_log 0 0 mysql general_log 0 0
mysql global_priv 0 0
mysql index_stats 0 0 mysql index_stats 0 0
mysql table_stats 0 0 mysql table_stats 0 0
mysql user 0 0 mysql user 0 0
@ -2162,6 +2163,7 @@ show open tables from mysql;
Database Table In_use Name_locked Database Table In_use Name_locked
mysql column_stats 0 0 mysql column_stats 0 0
mysql general_log 0 0 mysql general_log 0 0
mysql global_priv 0 0
mysql index_stats 0 0 mysql index_stats 0 0
mysql table_stats 0 0 mysql table_stats 0 0
mysql user 0 0 mysql user 0 0
@ -2175,6 +2177,7 @@ show open tables from mysql;
Database Table In_use Name_locked Database Table In_use Name_locked
mysql column_stats 0 0 mysql column_stats 0 0
mysql general_log 0 0 mysql general_log 0 0
mysql global_priv 0 0
mysql index_stats 0 0 mysql index_stats 0 0
mysql table_stats 0 0 mysql table_stats 0 0
mysql user 0 0 mysql user 0 0
@ -2188,6 +2191,7 @@ show open tables from mysql;
Database Table In_use Name_locked Database Table In_use Name_locked
mysql column_stats 0 0 mysql column_stats 0 0
mysql general_log 0 0 mysql general_log 0 0
mysql global_priv 0 0
mysql index_stats 0 0 mysql index_stats 0 0
mysql table_stats 0 0 mysql table_stats 0 0
mysql user 0 0 mysql user 0 0
@ -2206,6 +2210,7 @@ show open tables from mysql;
Database Table In_use Name_locked Database Table In_use Name_locked
mysql column_stats 0 0 mysql column_stats 0 0
mysql general_log 0 0 mysql general_log 0 0
mysql global_priv 0 0
mysql index_stats 0 0 mysql index_stats 0 0
mysql table_stats 0 0 mysql table_stats 0 0
mysql user 0 0 mysql user 0 0
@ -2220,6 +2225,7 @@ show open tables from mysql;
Database Table In_use Name_locked Database Table In_use Name_locked
mysql column_stats 0 0 mysql column_stats 0 0
mysql general_log 0 0 mysql general_log 0 0
mysql global_priv 0 0
mysql index_stats 0 0 mysql index_stats 0 0
mysql table_stats 0 0 mysql table_stats 0 0
mysql user 0 0 mysql user 0 0
@ -2233,6 +2239,7 @@ show open tables from mysql;
Database Table In_use Name_locked Database Table In_use Name_locked
mysql column_stats 0 0 mysql column_stats 0 0
mysql general_log 0 0 mysql general_log 0 0
mysql global_priv 0 0
mysql index_stats 0 0 mysql index_stats 0 0
mysql table_stats 0 0 mysql table_stats 0 0
mysql user 0 0 mysql user 0 0
@ -2246,6 +2253,7 @@ show open tables from mysql;
Database Table In_use Name_locked Database Table In_use Name_locked
mysql column_stats 0 0 mysql column_stats 0 0
mysql general_log 0 0 mysql general_log 0 0
mysql global_priv 0 0
mysql index_stats 0 0 mysql index_stats 0 0
mysql table_stats 0 0 mysql table_stats 0 0
mysql user 0 0 mysql user 0 0

View file

@ -769,11 +769,12 @@ deallocate prepare stmt;
# #
# Test 3: View referencing an Information schema table # Test 3: View referencing an Information schema table
# #
create view t1 as select table_name from information_schema.views; create view t1 as select table_name from information_schema.views order by table_name;
prepare stmt from "select * from t1"; prepare stmt from "select * from t1";
execute stmt; execute stmt;
table_name table_name
t1 t1
user
call p_verify_reprepare_count(0); call p_verify_reprepare_count(0);
SUCCESS SUCCESS
@ -781,6 +782,7 @@ create temporary table t1 (a int);
execute stmt; execute stmt;
table_name table_name
t1 t1
user
call p_verify_reprepare_count(0); call p_verify_reprepare_count(0);
SUCCESS SUCCESS

View file

@ -699,7 +699,7 @@ deallocate prepare stmt;
--echo # --echo #
--echo # Test 3: View referencing an Information schema table --echo # Test 3: View referencing an Information schema table
--echo # --echo #
create view t1 as select table_name from information_schema.views; create view t1 as select table_name from information_schema.views order by table_name;
prepare stmt from "select * from t1"; prepare stmt from "select * from t1";
execute stmt; execute stmt;

View file

@ -483,7 +483,7 @@ select * from t1,t2 where (a,b) = (c,d);
a b c d a b c d
abc 1 abc 1 abc 1 abc 1
select host,user from mysql.user where (host,user) = ('localhost','test'); select host,user from mysql.user where (host,user) = ('localhost','test');
host user Host User
drop table t1,t2; drop table t1,t2;
# #
# Bug#52124 memory leaks like a sieve in datetime, timestamp, time, date fields + warnings # Bug#52124 memory leaks like a sieve in datetime, timestamp, time, date fields + warnings

View file

@ -8,13 +8,13 @@ create user oldpass@localhost identified by password '378b243e220ca493';
create user oldpassold@localhost identified with 'mysql_old_password'; create user oldpassold@localhost identified with 'mysql_old_password';
set password for oldpassold@localhost = '378b243e220ca493'; set password for oldpassold@localhost = '378b243e220ca493';
select user, host, password, plugin, authentication_string from mysql.user where user != 'root'; select user, host, password, plugin, authentication_string from mysql.user where user != 'root';
user host password plugin authentication_string User Host Password plugin authentication_string
natauth localhost mysql_native_password *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29 natauth localhost *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29 mysql_native_password *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29
newpass localhost mysql_native_password *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29 newpass localhost *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29 mysql_native_password *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29
newpassnat localhost mysql_native_password *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29 newpassnat localhost *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29 mysql_native_password *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29
oldauth localhost mysql_old_password 378b243e220ca493 oldauth localhost 378b243e220ca493 mysql_old_password 378b243e220ca493
oldpass localhost mysql_old_password 378b243e220ca493 oldpass localhost 378b243e220ca493 mysql_old_password 378b243e220ca493
oldpassold localhost mysql_old_password 378b243e220ca493 oldpassold localhost 378b243e220ca493 mysql_old_password 378b243e220ca493
connect con,localhost,natauth,test,; connect con,localhost,natauth,test,;
select current_user(); select current_user();
current_user() current_user()
@ -85,13 +85,13 @@ set password for oldauth@localhost = PASSWORD('test2');
set password for oldpass@localhost = PASSWORD('test2'); set password for oldpass@localhost = PASSWORD('test2');
set password for oldpassold@localhost = PASSWORD('test2'); set password for oldpassold@localhost = PASSWORD('test2');
select user, host, password, plugin, authentication_string from mysql.user where user != 'root'; select user, host, password, plugin, authentication_string from mysql.user where user != 'root';
user host password plugin authentication_string User Host Password plugin authentication_string
natauth localhost mysql_native_password *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E natauth localhost *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E mysql_native_password *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E
newpass localhost mysql_native_password *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E newpass localhost *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E mysql_native_password *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E
newpassnat localhost mysql_native_password *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E newpassnat localhost *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E mysql_native_password *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E
oldauth localhost mysql_native_password *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E oldauth localhost *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E mysql_native_password *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E
oldpass localhost mysql_native_password *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E oldpass localhost *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E mysql_native_password *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E
oldpassold localhost mysql_native_password *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E oldpassold localhost *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E mysql_native_password *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E
connect con,localhost,natauth,test2,; connect con,localhost,natauth,test2,;
select current_user(); select current_user();
current_user() current_user()

View file

@ -132,6 +132,7 @@ set global secure_auth=default;
# #
# MDEV-16238 root/localhost authn prioritizes authentication_string over Password # MDEV-16238 root/localhost authn prioritizes authentication_string over Password
# #
--source include/switch_to_mysql_user.inc
create user foo@localhost identified with mysql_native_password; create user foo@localhost identified with mysql_native_password;
update mysql.user set authentication_string=password('foo'), plugin='mysql_native_password' where user='foo' and host='localhost'; update mysql.user set authentication_string=password('foo'), plugin='mysql_native_password' where user='foo' and host='localhost';
set password for 'foo'@'localhost' = password('bar'); set password for 'foo'@'localhost' = password('bar');
@ -145,3 +146,4 @@ select user,host,password,plugin,authentication_string from mysql.user where use
set password for 'foo'@'localhost' = ''; set password for 'foo'@'localhost' = '';
select user,host,password,plugin,authentication_string from mysql.user where user='foo'; select user,host,password,plugin,authentication_string from mysql.user where user='foo';
drop user foo@localhost; drop user foo@localhost;
--source include/switch_to_mysql_global_priv.inc

View file

@ -1,197 +0,0 @@
call mtr.add_suppression("password and an authentication plugin");
#
# Create a user with mysql_native_password plugin.
# The user has no password or auth_string set.
#
create user u1;
GRANT SELECT ON mysql.* to u1 IDENTIFIED VIA mysql_native_password;
select user, host, password, plugin, authentication_string from mysql.user where user = 'u1';
user host password plugin authentication_string
u1 % mysql_native_password
#
# The user's grants should show no password at all.
#
show grants for u1;
Grants for u1@%
GRANT USAGE ON *.* TO 'u1'@'%'
GRANT SELECT ON `mysql`.* TO 'u1'@'%'
#
# Test to see if connecting with no password is succesful.
#
connect con1, localhost, u1,,;
show grants;
Grants for u1@%
GRANT USAGE ON *.* TO 'u1'@'%'
GRANT SELECT ON `mysql`.* TO 'u1'@'%'
disconnect con1;
connection default;
#
# Test after flushing privileges.
#
flush privileges;
connect con1, localhost, u1,,;
show grants;
Grants for u1@%
GRANT USAGE ON *.* TO 'u1'@'%'
GRANT SELECT ON `mysql`.* TO 'u1'@'%'
disconnect con1;
connection default;
#
# Now add a mysql_native password string in authentication_string.
#
GRANT SELECT ON mysql.* to u1 IDENTIFIED VIA mysql_native_password
USING '*7AFEFD08B6B720E781FB000CAA418F54FA662626';
select user, host, password, plugin, authentication_string from mysql.user where user = 'u1';
user host password plugin authentication_string
u1 % mysql_native_password *7AFEFD08B6B720E781FB000CAA418F54FA662626
#
# Test to see if connecting with password is succesful.
#
connect con1, localhost, u1,'SOMETHING',;
show grants;
Grants for u1@%
GRANT USAGE ON *.* TO 'u1'@'%' IDENTIFIED BY PASSWORD '*7AFEFD08B6B720E781FB000CAA418F54FA662626'
GRANT SELECT ON `mysql`.* TO 'u1'@'%'
disconnect con1;
connection default;
#
# Test after flushing privileges.
#
flush privileges;
connect con1, localhost, u1,'SOMETHING',;
show grants;
Grants for u1@%
GRANT USAGE ON *.* TO 'u1'@'%' IDENTIFIED BY PASSWORD '*7AFEFD08B6B720E781FB000CAA418F54FA662626'
GRANT SELECT ON `mysql`.* TO 'u1'@'%'
disconnect con1;
connection default;
#
# Now we also set a password for the user.
#
set password for u1 = PASSWORD('SOMETHINGELSE');
select user, host, password, plugin, authentication_string from mysql.user where user = 'u1';
user host password plugin authentication_string
u1 % mysql_native_password *054B7BBD2B9A553DA560520DCD3F76DA2D81B7C6
#
# Here we should use the password field, as that primes over
# the authentication_string field.
#
show grants for u1;
Grants for u1@%
GRANT USAGE ON *.* TO 'u1'@'%' IDENTIFIED BY PASSWORD '*054B7BBD2B9A553DA560520DCD3F76DA2D81B7C6'
GRANT SELECT ON `mysql`.* TO 'u1'@'%'
#
# Logging in with the user's password should work.
#
connect con1, localhost, u1,'SOMETHINGELSE',;
show grants;
Grants for u1@%
GRANT USAGE ON *.* TO 'u1'@'%' IDENTIFIED BY PASSWORD '*054B7BBD2B9A553DA560520DCD3F76DA2D81B7C6'
GRANT SELECT ON `mysql`.* TO 'u1'@'%'
disconnect con1;
connection default;
#
# Reload privileges and test logging in again.
#
flush privileges;
show grants for u1;
Grants for u1@%
GRANT USAGE ON *.* TO 'u1'@'%' IDENTIFIED BY PASSWORD '*054B7BBD2B9A553DA560520DCD3F76DA2D81B7C6'
GRANT SELECT ON `mysql`.* TO 'u1'@'%'
#
# Here we connect via the user's password again.
#
connect con1, localhost, u1,'SOMETHINGELSE',;
show grants;
Grants for u1@%
GRANT USAGE ON *.* TO 'u1'@'%' IDENTIFIED BY PASSWORD '*054B7BBD2B9A553DA560520DCD3F76DA2D81B7C6'
GRANT SELECT ON `mysql`.* TO 'u1'@'%'
disconnect con1;
connection default;
#
# Now we remove the authentication plugin password, flush privileges and
# try again.
#
update mysql.user set password=authentication_string, plugin='', authentication_string='' where user='u1';
select user, host, password, plugin, authentication_string from mysql.user where user = 'u1';
user host password plugin authentication_string
u1 % *054B7BBD2B9A553DA560520DCD3F76DA2D81B7C6
flush privileges;
show grants for u1;
Grants for u1@%
GRANT USAGE ON *.* TO 'u1'@'%' IDENTIFIED BY PASSWORD '*054B7BBD2B9A553DA560520DCD3F76DA2D81B7C6'
GRANT SELECT ON `mysql`.* TO 'u1'@'%'
#
# Here we connect via the user's password.
#
connect con1, localhost, u1,'SOMETHINGELSE',;
select user, host, password, plugin, authentication_string from mysql.user where user = 'u1';
user host password plugin authentication_string
u1 % *054B7BBD2B9A553DA560520DCD3F76DA2D81B7C6
disconnect con1;
connection default;
#
# Try and set a wrong auth_string password, with mysql_native_password.
# Make sure it fails.
#
GRANT USAGE ON *.* TO u1 IDENTIFIED VIA mysql_native_password USING 'asd';
ERROR HY000: Password hash should be a 41-digit hexadecimal number
#
# Now set a correct password.
#
GRANT SELECT ON mysql.* to u1 IDENTIFIED VIA mysql_native_password
USING '*7AFEFD08B6B720E781FB000CAA418F54FA662626';
show grants for u1;
Grants for u1@%
GRANT USAGE ON *.* TO 'u1'@'%' IDENTIFIED BY PASSWORD '*7AFEFD08B6B720E781FB000CAA418F54FA662626'
GRANT SELECT ON `mysql`.* TO 'u1'@'%'
#
# Test if the user can now use that password instead.
#
connect con1, localhost, u1,'SOMETHING',;
show grants;
Grants for u1@%
GRANT USAGE ON *.* TO 'u1'@'%' IDENTIFIED BY PASSWORD '*7AFEFD08B6B720E781FB000CAA418F54FA662626'
GRANT SELECT ON `mysql`.* TO 'u1'@'%'
disconnect con1;
#
# Test if the user can now use that password instead, after flushing privileges;
#
connection default;
flush privileges;
connect con1, localhost, u1,'SOMETHING',;
show grants;
Grants for u1@%
GRANT USAGE ON *.* TO 'u1'@'%' IDENTIFIED BY PASSWORD '*7AFEFD08B6B720E781FB000CAA418F54FA662626'
GRANT SELECT ON `mysql`.* TO 'u1'@'%'
disconnect con1;
connection default;
#
# Clear all passwords from the user.
#
set password for u1 = '';
select user, host, password, plugin, authentication_string from mysql.user where user = 'u1';
user host password plugin authentication_string
u1 % mysql_native_password
#
# Test no password connect.
#
connect con1, localhost, u1,,;
show grants;
Grants for u1@%
GRANT USAGE ON *.* TO 'u1'@'%'
GRANT SELECT ON `mysql`.* TO 'u1'@'%'
disconnect con1;
connection default;
#
# Test no password connect, after flushing privileges.
#
flush privileges;
connect con1, localhost, u1,,;
show grants;
Grants for u1@%
GRANT USAGE ON *.* TO 'u1'@'%'
GRANT SELECT ON `mysql`.* TO 'u1'@'%'
disconnect con1;
connection default;
drop user u1;

View file

@ -1,160 +0,0 @@
--source include/not_embedded.inc
call mtr.add_suppression("password and an authentication plugin");
--echo #
--echo # Create a user with mysql_native_password plugin.
--echo # The user has no password or auth_string set.
--echo #
create user u1;
GRANT SELECT ON mysql.* to u1 IDENTIFIED VIA mysql_native_password;
select user, host, password, plugin, authentication_string from mysql.user where user = 'u1';
--echo #
--echo # The user's grants should show no password at all.
--echo #
show grants for u1;
--echo #
--echo # Test to see if connecting with no password is succesful.
--echo #
--connect (con1, localhost, u1,,)
show grants;
--disconnect con1
--connection default
--echo #
--echo # Test after flushing privileges.
--echo #
flush privileges;
--connect (con1, localhost, u1,,)
show grants;
--disconnect con1
--connection default
--echo #
--echo # Now add a mysql_native password string in authentication_string.
--echo #
# Password string is SOMETHING
GRANT SELECT ON mysql.* to u1 IDENTIFIED VIA mysql_native_password
USING '*7AFEFD08B6B720E781FB000CAA418F54FA662626';
select user, host, password, plugin, authentication_string from mysql.user where user = 'u1';
--echo #
--echo # Test to see if connecting with password is succesful.
--echo #
--connect (con1, localhost, u1,'SOMETHING',)
show grants;
--disconnect con1
--connection default
--echo #
--echo # Test after flushing privileges.
--echo #
flush privileges;
--connect (con1, localhost, u1,'SOMETHING',)
show grants;
--disconnect con1
--connection default
--echo #
--echo # Now we also set a password for the user.
--echo #
set password for u1 = PASSWORD('SOMETHINGELSE');
select user, host, password, plugin, authentication_string from mysql.user where user = 'u1';
--echo #
--echo # Here we should use the password field, as that primes over
--echo # the authentication_string field.
--echo #
show grants for u1;
--echo #
--echo # Logging in with the user's password should work.
--echo #
--connect (con1, localhost, u1,'SOMETHINGELSE',)
show grants;
--disconnect con1
--connection default
--echo #
--echo # Reload privileges and test logging in again.
--echo #
flush privileges;
show grants for u1;
--echo #
--echo # Here we connect via the user's password again.
--echo #
--connect (con1, localhost, u1,'SOMETHINGELSE',)
show grants;
--disconnect con1
--connection default
--echo #
--echo # Now we remove the authentication plugin password, flush privileges and
--echo # try again.
--echo #
update mysql.user set password=authentication_string, plugin='', authentication_string='' where user='u1';
select user, host, password, plugin, authentication_string from mysql.user where user = 'u1';
flush privileges;
show grants for u1;
--echo #
--echo # Here we connect via the user's password.
--echo #
--connect (con1, localhost, u1,'SOMETHINGELSE',)
select user, host, password, plugin, authentication_string from mysql.user where user = 'u1';
--disconnect con1
--connection default
--echo #
--echo # Try and set a wrong auth_string password, with mysql_native_password.
--echo # Make sure it fails.
--echo #
--error ER_PASSWD_LENGTH
GRANT USAGE ON *.* TO u1 IDENTIFIED VIA mysql_native_password USING 'asd';
--echo #
--echo # Now set a correct password.
--echo #
GRANT SELECT ON mysql.* to u1 IDENTIFIED VIA mysql_native_password
USING '*7AFEFD08B6B720E781FB000CAA418F54FA662626';
show grants for u1;
--echo #
--echo # Test if the user can now use that password instead.
--echo #
--connect (con1, localhost, u1,'SOMETHING',)
show grants;
--disconnect con1
--echo #
--echo # Test if the user can now use that password instead, after flushing privileges;
--echo #
--connection default
flush privileges;
--connect (con1, localhost, u1,'SOMETHING',)
show grants;
--disconnect con1
--connection default
--echo #
--echo # Clear all passwords from the user.
--echo #
set password for u1 = '';
select user, host, password, plugin, authentication_string from mysql.user where user = 'u1';
--echo #
--echo # Test no password connect.
--echo #
--connect (con1, localhost, u1,,)
show grants;
--disconnect con1
--connection default
--echo #
--echo # Test no password connect, after flushing privileges.
--echo #
flush privileges;
--connect (con1, localhost, u1,,)
show grants;
--disconnect con1
--connection default
drop user u1;

View file

@ -507,7 +507,7 @@ GRANT USAGE ON *.* TO user19857@localhost IDENTIFIED BY 'meow';
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE ROUTINE, ALTER ROUTINE ON test.* TO GRANT SELECT, INSERT, UPDATE, DELETE, CREATE ROUTINE, ALTER ROUTINE ON test.* TO
user19857@localhost; user19857@localhost;
SELECT Host,User,Plugin,Authentication_string FROM mysql.user WHERE User='user19857'; SELECT Host,User,Plugin,Authentication_string FROM mysql.user WHERE User='user19857';
Host User Plugin Authentication_string Host User plugin authentication_string
localhost user19857 mysql_native_password *82DC221D557298F6CE9961037DB1C90604792F5C localhost user19857 mysql_native_password *82DC221D557298F6CE9961037DB1C90604792F5C
connect mysqltest_2_con,localhost,user19857,meow,test; connect mysqltest_2_con,localhost,user19857,meow,test;
connection mysqltest_2_con; connection mysqltest_2_con;
@ -534,7 +534,7 @@ DROP PROCEDURE IF EXISTS test.sp19857;
connection con1root; connection con1root;
disconnect mysqltest_2_con; disconnect mysqltest_2_con;
SELECT Host,User,Plugin,Authentication_string FROM mysql.user WHERE User='user19857'; SELECT Host,User,Plugin,Authentication_string FROM mysql.user WHERE User='user19857';
Host User Plugin Authentication_string Host User plugin authentication_string
localhost user19857 mysql_native_password *82DC221D557298F6CE9961037DB1C90604792F5C localhost user19857 mysql_native_password *82DC221D557298F6CE9961037DB1C90604792F5C
DROP USER user19857@localhost; DROP USER user19857@localhost;
disconnect con1root; disconnect con1root;
@ -765,21 +765,23 @@ connection default;
disconnect conn1; disconnect conn1;
drop user bug12602983_user@localhost; drop user bug12602983_user@localhost;
drop database mysqltest_db; drop database mysqltest_db;
create user u1@localhost;
grant all privileges on *.* to u1@localhost with grant option;
connect u1, localhost, u1;
set password=password('foobar'); set password=password('foobar');
create procedure sp1() select 1; create procedure sp1() select 1;
show grants; show grants;
Grants for root@localhost Grants for u1@localhost
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY PASSWORD '*9B500343BC52E2911172EB52AE5CF4847604C6E5' WITH GRANT OPTION GRANT ALL PRIVILEGES ON *.* TO 'u1'@'localhost' IDENTIFIED BY PASSWORD '*9B500343BC52E2911172EB52AE5CF4847604C6E5' WITH GRANT OPTION
GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION
grant execute on procedure sp1 to current_user() identified by 'barfoo'; grant execute on procedure sp1 to current_user() identified by 'barfoo';
show grants; show grants;
Grants for root@localhost Grants for u1@localhost
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY PASSWORD '*343915A8181B5728EADBDC73E1F7E6B0C3998483' WITH GRANT OPTION GRANT ALL PRIVILEGES ON *.* TO 'u1'@'localhost' IDENTIFIED BY PASSWORD '*343915A8181B5728EADBDC73E1F7E6B0C3998483' WITH GRANT OPTION
GRANT EXECUTE ON PROCEDURE `test`.`sp1` TO 'root'@'localhost' GRANT EXECUTE ON PROCEDURE `test`.`sp1` TO 'u1'@'localhost'
GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION
drop procedure sp1; drop procedure sp1;
set password=''; disconnect u1;
update mysql.user set plugin=''; connection default;
drop user u1@localhost;
# #
# MDEV-13396 Unexpected "alter routine comand defined" during CREATE OR REPLACE PROCEDURE # MDEV-13396 Unexpected "alter routine comand defined" during CREATE OR REPLACE PROCEDURE
# #

View file

@ -1035,15 +1035,18 @@ drop database mysqltest_db;
# Wait till all disconnects are completed # Wait till all disconnects are completed
--source include/wait_until_count_sessions.inc --source include/wait_until_count_sessions.inc
create user u1@localhost;
grant all privileges on *.* to u1@localhost with grant option;
connect u1, localhost, u1;
set password=password('foobar'); set password=password('foobar');
create procedure sp1() select 1; create procedure sp1() select 1;
show grants; show grants;
grant execute on procedure sp1 to current_user() identified by 'barfoo'; grant execute on procedure sp1 to current_user() identified by 'barfoo';
show grants; show grants;
drop procedure sp1; drop procedure sp1;
set password=''; disconnect u1;
#cleanup after MDEV-16238 connection default;
update mysql.user set plugin=''; drop user u1@localhost;
--echo # --echo #
--echo # MDEV-13396 Unexpected "alter routine comand defined" during CREATE OR REPLACE PROCEDURE --echo # MDEV-13396 Unexpected "alter routine comand defined" during CREATE OR REPLACE PROCEDURE

View file

@ -231,8 +231,6 @@ CREATE PROCEDURE p1(i INT) BEGIN END;
disconnect con1; disconnect con1;
connection default; connection default;
DROP PROCEDURE p1; DROP PROCEDURE p1;
DELETE FROM mysql.user WHERE User='mysqltest_1';
FLUSH PRIVILEGES;
# #
# Bug#44521 Prepared Statement: CALL p() - crashes: `! thd->main_da.is_sent' failed et.al. # Bug#44521 Prepared Statement: CALL p() - crashes: `! thd->main_da.is_sent' failed et.al.
# #

View file

@ -305,6 +305,7 @@ set session low_priority_updates=default;
# #
# Bug#44798 MySQL engine crashes when creating stored procedures with execute_priv=N # Bug#44798 MySQL engine crashes when creating stored procedures with execute_priv=N
# #
--source include/switch_to_mysql_user.inc
INSERT IGNORE INTO mysql.user (Host, User, Password, Select_priv, Insert_priv, Update_priv, INSERT IGNORE INTO mysql.user (Host, User, Password, Select_priv, Insert_priv, Update_priv,
Delete_priv, Create_priv, Drop_priv, Reload_priv, Shutdown_priv, Process_priv, File_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, Grant_priv, References_priv, Index_priv, Alter_priv, Show_db_priv, Super_priv,
@ -323,10 +324,7 @@ CREATE PROCEDURE p1(i INT) BEGIN END;
disconnect con1; disconnect con1;
connection default; connection default;
DROP PROCEDURE p1; DROP PROCEDURE p1;
--source include/switch_to_mysql_global_priv.inc
DELETE FROM mysql.user WHERE User='mysqltest_1';
FLUSH PRIVILEGES;
--echo # --echo #
--echo # Bug#44521 Prepared Statement: CALL p() - crashes: `! thd->main_da.is_sent' failed et.al. --echo # Bug#44521 Prepared Statement: CALL p() - crashes: `! thd->main_da.is_sent' failed et.al.
@ -464,6 +462,7 @@ DROP EVENT teste_bug11763507;
# A case of SHOW GRANTS # A case of SHOW GRANTS
# (creating a new procedure changes the password) # (creating a new procedure changes the password)
# #
--source include/switch_to_mysql_user.inc
grant create routine on test.* to foo1@localhost identified by 'foo'; grant create routine on test.* to foo1@localhost identified by 'foo';
update mysql.user set authentication_string = replace(authentication_string, '*', '-') where user='foo1'; update mysql.user set authentication_string = replace(authentication_string, '*', '-') where user='foo1';
--connect (foo,localhost,foo1,foo) --connect (foo,localhost,foo1,foo)
@ -479,6 +478,7 @@ show grants;
--disconnect foo --disconnect foo
drop procedure spfoo; drop procedure spfoo;
drop user foo1@localhost; drop user foo1@localhost;
--source include/switch_to_mysql_global_priv.inc
# #
# Restore global concurrent_insert value. Keep in the end of the test file. # Restore global concurrent_insert value. Keep in the end of the test file.

View file

@ -587,7 +587,7 @@ explain
SELECT * FROM INFORMATION_SCHEMA.PROFILING, mysql.user; SELECT * FROM INFORMATION_SCHEMA.PROFILING, mysql.user;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE PROFILING ALL NULL NULL NULL NULL NULL 1 SIMPLE PROFILING ALL NULL NULL NULL NULL NULL
1 SIMPLE user ALL NULL NULL NULL NULL 4 Using join buffer (flat, BNL join) 1 SIMPLE global_priv ALL NULL NULL NULL NULL 4 Using join buffer (flat, BNL join)
set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
set use_stat_tables=@save_use_stat_tables; set use_stat_tables=@save_use_stat_tables;
# #

View file

@ -614,7 +614,7 @@ explain
SELECT * FROM INFORMATION_SCHEMA.PROFILING, mysql.user; SELECT * FROM INFORMATION_SCHEMA.PROFILING, mysql.user;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE PROFILING ALL NULL NULL NULL NULL NULL 1 SIMPLE PROFILING ALL NULL NULL NULL NULL NULL
1 SIMPLE user ALL NULL NULL NULL NULL 4 Using join buffer (flat, BNL join) 1 SIMPLE global_priv ALL NULL NULL NULL NULL 4 Using join buffer (flat, BNL join)
set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
set use_stat_tables=@save_use_stat_tables; set use_stat_tables=@save_use_stat_tables;
# #

View file

@ -6,6 +6,7 @@ db
event event
func func
general_log general_log
global_priv
gtid_slave_pos gtid_slave_pos
help_category help_category
help_keyword help_keyword
@ -60,57 +61,8 @@ db CREATE TABLE `db` (
KEY `User` (`User`) KEY `User` (`User`)
) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Database privileges' ) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Database privileges'
show create table user; show create table user;
Table Create Table View Create View character_set_client collation_connection
user CREATE TABLE `user` ( user CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `user` AS select `global_priv`.`Host` AS `Host`,`global_priv`.`User` AS `User`,if(json_value(`global_priv`.`Priv`,'$.plugin') in ('mysql_native_password','mysql_old_password'),ifnull(json_value(`global_priv`.`Priv`,'$.authentication_string'),''),'') AS `Password`,if(json_value(`global_priv`.`Priv`,'$.access') & 1,'Y','N') AS `Select_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 2,'Y','N') AS `Insert_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 4,'Y','N') AS `Update_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 8,'Y','N') AS `Delete_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 16,'Y','N') AS `Create_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 32,'Y','N') AS `Drop_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 64,'Y','N') AS `Reload_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 128,'Y','N') AS `Shutdown_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 256,'Y','N') AS `Process_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 512,'Y','N') AS `File_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 1024,'Y','N') AS `Grant_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 2048,'Y','N') AS `References_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 4096,'Y','N') AS `Index_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 8192,'Y','N') AS `Alter_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 16384,'Y','N') AS `Show_db_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 32768,'Y','N') AS `Super_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 65536,'Y','N') AS `Create_tmp_table_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 131072,'Y','N') AS `Lock_tables_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 262144,'Y','N') AS `Execute_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 524288,'Y','N') AS `Repl_slave_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 1048576,'Y','N') AS `Repl_client_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 2097152,'Y','N') AS `Create_view_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 4194304,'Y','N') AS `Show_view_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 8388608,'Y','N') AS `Create_routine_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 16777216,'Y','N') AS `Alter_routine_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 33554432,'Y','N') AS `Create_user_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 67108864,'Y','N') AS `Event_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 134217728,'Y','N') AS `Trigger_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 268435456,'Y','N') AS `Create_tablespace_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 536870912,'Y','N') AS `Delete_history_priv`,elt(ifnull(json_value(`global_priv`.`Priv`,'$.ssl_type'),0) + 1,'','ANY','X509','SPECIFIED') AS `ssl_type`,ifnull(json_value(`global_priv`.`Priv`,'$.ssl_cipher'),'') AS `ssl_cipher`,ifnull(json_value(`global_priv`.`Priv`,'$.x509_issuer'),'') AS `x509_issuer`,ifnull(json_value(`global_priv`.`Priv`,'$.x509_subject'),'') AS `x509_subject`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_questions'),0) as unsigned) AS `max_questions`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_updates'),0) as unsigned) AS `max_updates`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_connections'),0) as unsigned) AS `max_connections`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_user_connections'),0) as signed) AS `max_user_connections`,ifnull(json_value(`global_priv`.`Priv`,'$.plugin'),'') AS `plugin`,ifnull(json_value(`global_priv`.`Priv`,'$.authentication_string'),'') AS `authentication_string`,'N' AS `password_expired`,elt(ifnull(json_value(`global_priv`.`Priv`,'$.is_role'),0) + 1,'N','Y') AS `is_role`,ifnull(json_value(`global_priv`.`Priv`,'$.default_role'),'') AS `default_role`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_statement_time'),0.0) as decimal(12,6)) AS `max_statement_time` from `global_priv` latin1 latin1_swedish_ci
`Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
`User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
`Password` char(41) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '',
`Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Reload_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Shutdown_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Process_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`File_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Show_db_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Super_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Repl_slave_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Repl_client_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_user_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_tablespace_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Delete_history_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`ssl_type` enum('','ANY','X509','SPECIFIED') CHARACTER SET utf8 NOT NULL DEFAULT '',
`ssl_cipher` blob NOT NULL,
`x509_issuer` blob NOT NULL,
`x509_subject` blob NOT NULL,
`max_questions` int(11) unsigned NOT NULL DEFAULT 0,
`max_updates` int(11) unsigned NOT NULL DEFAULT 0,
`max_connections` int(11) unsigned NOT NULL DEFAULT 0,
`max_user_connections` int(11) NOT NULL DEFAULT 0,
`plugin` char(64) CHARACTER SET latin1 NOT NULL DEFAULT '',
`authentication_string` text COLLATE utf8_bin NOT NULL,
`password_expired` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`is_role` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`default_role` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
`max_statement_time` decimal(12,6) NOT NULL DEFAULT 0.000000,
PRIMARY KEY (`Host`,`User`)
) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Users and global privileges'
show create table func; show create table func;
Table Create Table Table Create Table
func CREATE TABLE `func` ( func CREATE TABLE `func` (
@ -120,6 +72,14 @@ func CREATE TABLE `func` (
`type` enum('function','aggregate') CHARACTER SET utf8 NOT NULL, `type` enum('function','aggregate') CHARACTER SET utf8 NOT NULL,
PRIMARY KEY (`name`) PRIMARY KEY (`name`)
) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='User defined functions' ) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='User defined functions'
show create table global_priv;
Table Create Table
global_priv CREATE TABLE `global_priv` (
`Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
`User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
`Priv` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '{}' CHECK (json_valid(`Priv`)),
PRIMARY KEY (`Host`,`User`)
) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Users and global privileges'
show create table tables_priv; show create table tables_priv;
Table Create Table Table Create Table
tables_priv CREATE TABLE `tables_priv` ( tables_priv CREATE TABLE `tables_priv` (

View file

@ -3,8 +3,6 @@
# Fatal error: mysql.user table is damaged or in # Fatal error: mysql.user table is damaged or in
# unsupported 3.20 format # unsupported 3.20 format
# #
create table backup_user like mysql.user;
insert into backup_user select * from mysql.user;
# #
# Original mysql.user table # Original mysql.user table
# #
@ -169,6 +167,3 @@ ioo % Y mysql_old_password 7a8f886d28473e85
# #
# Reset to final original state. # Reset to final original state.
# #
drop table mysql.user;
rename table backup_user to mysql.user;
flush privileges;

View file

@ -5,9 +5,7 @@
--echo # unsupported 3.20 format --echo # unsupported 3.20 format
--echo # --echo #
--source include/switch_to_mysql_user.inc
create table backup_user like mysql.user;
insert into backup_user select * from mysql.user;
--echo # --echo #
--echo # Original mysql.user table --echo # Original mysql.user table
@ -90,11 +88,7 @@ select user, host, select_priv, plugin, authentication_string from mysql.user
where user like "%oo" where user like "%oo"
order by user; order by user;
--echo # --echo #
--echo # Reset to final original state. --echo # Reset to final original state.
--echo # --echo #
drop table mysql.user; --source include/switch_to_mysql_global_priv.inc
rename table backup_user to mysql.user;
flush privileges;

View file

@ -6,6 +6,7 @@ db
event event
func func
general_log general_log
global_priv
gtid_slave_pos gtid_slave_pos
help_category help_category
help_keyword help_keyword
@ -121,6 +122,14 @@ func CREATE TABLE `func` (
`type` enum('function','aggregate') CHARACTER SET utf8 NOT NULL, `type` enum('function','aggregate') CHARACTER SET utf8 NOT NULL,
PRIMARY KEY (`name`) PRIMARY KEY (`name`)
) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='User defined functions' ) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='User defined functions'
show create table global_priv;
Table Create Table
global_priv CREATE TABLE `global_priv` (
`Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
`User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
`Priv` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '{}' CHECK (json_valid(`Priv`)),
PRIMARY KEY (`Host`,`User`)
) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Users and global privileges'
show create table tables_priv; show create table tables_priv;
Table Create Table Table Create Table
tables_priv CREATE TABLE `tables_priv` ( tables_priv CREATE TABLE `tables_priv` (

View file

@ -72,7 +72,7 @@ CREATE TABLE time_zone_leap_second ( Transition_time bigint signed NOT NULL,
-- disable_query_log -- disable_query_log
# Drop all tables created by this test # Drop all tables created by this test
DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv, procs_priv, servers, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, proxies_priv, innodb_index_stats, innodb_table_stats, transaction_registry, table_stats, column_stats, index_stats, roles_mapping, gtid_slave_pos; DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv, procs_priv, servers, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, proxies_priv, innodb_index_stats, innodb_table_stats, transaction_registry, table_stats, column_stats, index_stats, roles_mapping, gtid_slave_pos, global_priv;
-- enable_query_log -- enable_query_log

View file

@ -6,6 +6,7 @@ db
event event
func func
general_log general_log
global_priv
gtid_slave_pos gtid_slave_pos
help_category help_category
help_keyword help_keyword
@ -121,6 +122,14 @@ func CREATE TABLE `func` (
`type` enum('function','aggregate') CHARACTER SET utf8 NOT NULL, `type` enum('function','aggregate') CHARACTER SET utf8 NOT NULL,
PRIMARY KEY (`name`) PRIMARY KEY (`name`)
) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='User defined functions' ) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='User defined functions'
show create table global_priv;
Table Create Table
global_priv CREATE TABLE `global_priv` (
`Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
`User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
`Priv` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '{}' CHECK (json_valid(`Priv`)),
PRIMARY KEY (`Host`,`User`)
) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Users and global privileges'
show create table tables_priv; show create table tables_priv;
Table Create Table Table Create Table
tables_priv CREATE TABLE `tables_priv` ( tables_priv CREATE TABLE `tables_priv` (

View file

@ -79,7 +79,7 @@ INSERT INTO servers VALUES ('test','localhost','test','root','', 0,'','mysql','r
-- disable_query_log -- disable_query_log
# Drop all tables created by this test # Drop all tables created by this test
DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv, procs_priv, servers, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, proxies_priv, innodb_index_stats, innodb_table_stats, transaction_registry, table_stats, column_stats, index_stats, roles_mapping, gtid_slave_pos; DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv, procs_priv, servers, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, proxies_priv, innodb_index_stats, innodb_table_stats, transaction_registry, table_stats, column_stats, index_stats, roles_mapping, gtid_slave_pos, global_priv;
-- enable_query_log -- enable_query_log

View file

@ -6,6 +6,7 @@ db
event event
func func
general_log general_log
global_priv
gtid_slave_pos gtid_slave_pos
help_category help_category
help_keyword help_keyword
@ -121,6 +122,14 @@ func CREATE TABLE `func` (
`type` enum('function','aggregate') CHARACTER SET utf8 NOT NULL, `type` enum('function','aggregate') CHARACTER SET utf8 NOT NULL,
PRIMARY KEY (`name`) PRIMARY KEY (`name`)
) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='User defined functions' ) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='User defined functions'
show create table global_priv;
Table Create Table
global_priv CREATE TABLE `global_priv` (
`Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
`User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
`Priv` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '{}' CHECK (json_valid(`Priv`)),
PRIMARY KEY (`Host`,`User`)
) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Users and global privileges'
show create table tables_priv; show create table tables_priv;
Table Create Table Table Create Table
tables_priv CREATE TABLE `tables_priv` ( tables_priv CREATE TABLE `tables_priv` (

View file

@ -96,7 +96,7 @@ CREATE TABLE IF NOT EXISTS event ( db char(64) CHARACTER SET utf8 COLLATE utf8_b
-- disable_query_log -- disable_query_log
# Drop all tables created by this test # Drop all tables created by this test
DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv, procs_priv, servers, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, proxies_priv, innodb_index_stats, innodb_table_stats, transaction_registry, table_stats, column_stats, index_stats, roles_mapping, gtid_slave_pos; DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv, procs_priv, servers, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, proxies_priv, innodb_index_stats, innodb_table_stats, transaction_registry, table_stats, column_stats, index_stats, roles_mapping, gtid_slave_pos, global_priv;
-- enable_query_log -- enable_query_log

View file

@ -615,6 +615,7 @@ select is_updatable from information_schema.views;
is_updatable is_updatable
YES YES
YES YES
YES
select * from t1; select * from t1;
col1 col2 col1 col2
5 Hello, view world 5 Hello, view world

View file

@ -562,11 +562,6 @@ use test;
REVOKE ALL PRIVILEGES, GRANT OPTION FROM mysqltest_1@localhost; REVOKE ALL PRIVILEGES, GRANT OPTION FROM mysqltest_1@localhost;
drop user mysqltest_1@localhost; drop user mysqltest_1@localhost;
drop database mysqltest; drop database mysqltest;
drop view if exists v1;
drop table if exists t1;
create table t1 as select * from mysql.user where user='';
delete from mysql.user where user='';
flush privileges;
create user 'test14256'@'%'; create user 'test14256'@'%';
grant all on test.* to 'test14256'@'%'; grant all on test.* to 'test14256'@'%';
connect test14256,localhost,test14256,,test; connect test14256,localhost,test14256,,test;
@ -592,9 +587,6 @@ test14256@% test14256@% 1
connection root; connection root;
disconnect test14256; disconnect test14256;
drop user test14256; drop user test14256;
insert into mysql.user select * from t1;
flush privileges;
drop table t1;
connection root; connection root;
create database mysqltest; create database mysqltest;
use mysqltest; use mysqltest;

View file

@ -669,16 +669,6 @@ drop database mysqltest;
# #
# Bug#14256 definer in view definition is not fully qualified # Bug#14256 definer in view definition is not fully qualified
# #
--disable_warnings
drop view if exists v1;
drop table if exists t1;
--enable_warnings
# Backup anonymous users and remove them. (They get in the way of
# the one we test with here otherwise.)
create table t1 as select * from mysql.user where user='';
delete from mysql.user where user='';
flush privileges;
# Create the test user # Create the test user
create user 'test14256'@'%'; create user 'test14256'@'%';
@ -708,12 +698,6 @@ connection root;
disconnect test14256; disconnect test14256;
drop user test14256; drop user test14256;
# Restore the anonymous users.
insert into mysql.user select * from t1;
flush privileges;
drop table t1;
# #
# Bug#14726 freeing stack variable in case of an error of opening a view when # Bug#14726 freeing stack variable in case of an error of opening a view when
# we have locked tables with LOCK TABLES statement. # we have locked tables with LOCK TABLES statement.

View file

@ -3263,7 +3263,7 @@ sub mysql_install_db {
# Remove anonymous users # Remove anonymous users
mtr_tofile($bootstrap_sql_file, mtr_tofile($bootstrap_sql_file,
"DELETE FROM mysql.user where user= '';\n"); "DELETE FROM mysql.global_priv where user= '';\n");
# Create mtr database # Create mtr database
mtr_tofile($bootstrap_sql_file, mtr_tofile($bootstrap_sql_file,

View file

@ -269,12 +269,10 @@ create table if not exists t3 like tt1;
# the mysql database is replicated even when the current database is # the mysql database is replicated even when the current database is
# 'mysql'. # 'mysql'.
--disable_warnings
USE mysql; USE mysql;
INSERT IGNORE INTO user SET host='localhost', user='@#@', password=password('Just a test'); INSERT db SET host='localhost', user='@#@', db='Just a test';
UPDATE user SET password=password('Another password') WHERE host='localhost' AND user='@#@'; UPDATE db SET db='Another db' WHERE host='localhost' AND user='@#@';
DELETE FROM user WHERE host='localhost' AND user='@#@'; DELETE FROM db WHERE host='localhost' AND user='@#@';
--enable_warnings
use test; use test;
source include/show_binlog_events.inc; source include/show_binlog_events.inc;

View file

@ -843,9 +843,9 @@ create table if not exists t2 select * from t1;
create temporary table tt1 (a int); create temporary table tt1 (a int);
create table if not exists t3 like tt1; create table if not exists t3 like tt1;
USE mysql; USE mysql;
INSERT IGNORE INTO user SET host='localhost', user='@#@', password=password('Just a test'); INSERT db SET host='localhost', user='@#@', db='Just a test';
UPDATE user SET password=password('Another password') WHERE host='localhost' AND user='@#@'; UPDATE db SET db='Another db' WHERE host='localhost' AND user='@#@';
DELETE FROM user WHERE host='localhost' AND user='@#@'; DELETE FROM db WHERE host='localhost' AND user='@#@';
use test; use test;
include/show_binlog_events.inc include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
@ -894,18 +894,18 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t3` (
`a` int(11) DEFAULT NULL `a` int(11) DEFAULT NULL
) ENGINE=MyISAM ) ENGINE=MyISAM
master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Annotate_rows # # INSERT IGNORE INTO user SET host='localhost', user='@#@', password=password('Just a test') master-bin.000001 # Annotate_rows # # INSERT db SET host='localhost', user='@#@', db='Just a test'
master-bin.000001 # Table_map # # table_id: # (mysql.user) master-bin.000001 # Table_map # # table_id: # (mysql.db)
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # COMMIT
master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Annotate_rows # # UPDATE user SET password=password('Another password') WHERE host='localhost' AND user='@#@' master-bin.000001 # Annotate_rows # # UPDATE db SET db='Another db' WHERE host='localhost' AND user='@#@'
master-bin.000001 # Table_map # # table_id: # (mysql.user) master-bin.000001 # Table_map # # table_id: # (mysql.db)
master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # COMMIT
master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Annotate_rows # # DELETE FROM user WHERE host='localhost' AND user='@#@' master-bin.000001 # Annotate_rows # # DELETE FROM db WHERE host='localhost' AND user='@#@'
master-bin.000001 # Table_map # # table_id: # (mysql.user) master-bin.000001 # Table_map # # table_id: # (mysql.db)
master-bin.000001 # Delete_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Delete_rows_v1 # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # COMMIT
drop table t1,t2,t3,tt1; drop table t1,t2,t3,tt1;

View file

@ -1,4 +1,3 @@
drop table if exists t1;
create table t1 (a int, b int) engine=innodb; create table t1 (a int, b int) engine=innodb;
begin; begin;
insert into t1 values (1,2); insert into t1 values (1,2);
@ -6,8 +5,6 @@ commit;
include/show_binlog_events.inc include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by server */
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; create table t1 (a int, b int) engine=innodb master-bin.000001 # Query # # use `test`; create table t1 (a int, b int) engine=innodb
master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test`; insert into t1 values (1,2) master-bin.000001 # Query # # use `test`; insert into t1 values (1,2)
@ -451,9 +448,9 @@ create table if not exists t2 select * from t1;
create temporary table tt1 (a int); create temporary table tt1 (a int);
create table if not exists t3 like tt1; create table if not exists t3 like tt1;
USE mysql; USE mysql;
INSERT IGNORE INTO user SET host='localhost', user='@#@', password=password('Just a test'); INSERT db SET host='localhost', user='@#@', db='Just a test';
UPDATE user SET password=password('Another password') WHERE host='localhost' AND user='@#@'; UPDATE db SET db='Another db' WHERE host='localhost' AND user='@#@';
DELETE FROM user WHERE host='localhost' AND user='@#@'; DELETE FROM db WHERE host='localhost' AND user='@#@';
use test; use test;
include/show_binlog_events.inc include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
@ -501,15 +498,14 @@ master-bin.000001 # Query # # use `test`; create temporary table tt1 (a int)
master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; create table if not exists t3 like tt1 master-bin.000001 # Query # # use `test`; create table if not exists t3 like tt1
master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `mysql`; INSERT IGNORE INTO user SET host='localhost', user='@#@', password=password('Just a test') master-bin.000001 # Query # # use `mysql`; INSERT db SET host='localhost', user='@#@', db='Just a test'
master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # COMMIT
master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `mysql`; UPDATE user SET password=password('Another password') WHERE host='localhost' AND user='@#@' master-bin.000001 # Query # # use `mysql`; UPDATE db SET db='Another db' WHERE host='localhost' AND user='@#@'
master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # COMMIT
master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `mysql`; DELETE FROM user WHERE host='localhost' AND user='@#@' master-bin.000001 # Query # # use `mysql`; DELETE FROM db WHERE host='localhost' AND user='@#@'
master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # COMMIT
master-bin.000001 # Rotate # # master-bin.000002;pos=POS
drop table t1,t2,t3,tt1; drop table t1,t2,t3,tt1;
reset master; reset master;
create table t1 (a int not null auto_increment, primary key (a)) engine=myisam; create table t1 (a int not null auto_increment, primary key (a)) engine=myisam;

View file

@ -3,10 +3,6 @@
let collation=utf8_unicode_ci; let collation=utf8_unicode_ci;
--source include/have_collation.inc --source include/have_collation.inc
--disable_warnings
drop table if exists t1;
--enable_warnings
# REQUIREMENT # REQUIREMENT
# replace_regex should replace output of SHOW BINLOG EVENTS # replace_regex should replace output of SHOW BINLOG EVENTS

View file

@ -9,6 +9,11 @@ t int, check (t>32) # table constraint
) ENGINE=myisam; ) ENGINE=myisam;
SELECT * from information_schema.check_constraints order by check_clause; SELECT * from information_schema.check_constraints order by check_clause;
CONSTRAINT_CATALOG def CONSTRAINT_CATALOG def
CONSTRAINT_SCHEMA mysql
CONSTRAINT_NAME Priv
TABLE_NAME global_priv
CHECK_CLAUSE json_valid(`Priv`)
CONSTRAINT_CATALOG def
CONSTRAINT_SCHEMA test CONSTRAINT_SCHEMA test
CONSTRAINT_NAME CONSTRAINT_1 CONSTRAINT_NAME CONSTRAINT_1
TABLE_NAME t0 TABLE_NAME t0
@ -17,6 +22,11 @@ ALTER TABLE t0
ADD CONSTRAINT CHK_t0_t CHECK(t<100); ADD CONSTRAINT CHK_t0_t CHECK(t<100);
SELECT * from information_schema.check_constraints order by check_clause; SELECT * from information_schema.check_constraints order by check_clause;
CONSTRAINT_CATALOG def CONSTRAINT_CATALOG def
CONSTRAINT_SCHEMA mysql
CONSTRAINT_NAME Priv
TABLE_NAME global_priv
CHECK_CLAUSE json_valid(`Priv`)
CONSTRAINT_CATALOG def
CONSTRAINT_SCHEMA test CONSTRAINT_SCHEMA test
CONSTRAINT_NAME CHK_t0_t CONSTRAINT_NAME CHK_t0_t
TABLE_NAME t0 TABLE_NAME t0
@ -30,6 +40,11 @@ ALTER TABLE t0
DROP CONSTRAINT CHK_t0_t; DROP CONSTRAINT CHK_t0_t;
SELECT * from information_schema.check_constraints order by check_clause; SELECT * from information_schema.check_constraints order by check_clause;
CONSTRAINT_CATALOG def CONSTRAINT_CATALOG def
CONSTRAINT_SCHEMA mysql
CONSTRAINT_NAME Priv
TABLE_NAME global_priv
CHECK_CLAUSE json_valid(`Priv`)
CONSTRAINT_CATALOG def
CONSTRAINT_SCHEMA test CONSTRAINT_SCHEMA test
CONSTRAINT_NAME CONSTRAINT_1 CONSTRAINT_NAME CONSTRAINT_1
TABLE_NAME t0 TABLE_NAME t0
@ -40,6 +55,11 @@ tt int, CONSTRAINT CHK_tt CHECK(tt<100) # table constraint
) ENGINE=InnoDB; ) ENGINE=InnoDB;
SELECT * from information_schema.check_constraints order by check_clause; SELECT * from information_schema.check_constraints order by check_clause;
CONSTRAINT_CATALOG def CONSTRAINT_CATALOG def
CONSTRAINT_SCHEMA mysql
CONSTRAINT_NAME Priv
TABLE_NAME global_priv
CHECK_CLAUSE json_valid(`Priv`)
CONSTRAINT_CATALOG def
CONSTRAINT_SCHEMA test CONSTRAINT_SCHEMA test
CONSTRAINT_NAME CHK_tt CONSTRAINT_NAME CHK_tt
TABLE_NAME t1 TABLE_NAME t1
@ -58,6 +78,11 @@ ALTER TABLE t1
DROP CONSTRAINT CHK_tt; DROP CONSTRAINT CHK_tt;
SELECT * from information_schema.check_constraints order by check_clause; SELECT * from information_schema.check_constraints order by check_clause;
CONSTRAINT_CATALOG def CONSTRAINT_CATALOG def
CONSTRAINT_SCHEMA mysql
CONSTRAINT_NAME Priv
TABLE_NAME global_priv
CHECK_CLAUSE json_valid(`Priv`)
CONSTRAINT_CATALOG def
CONSTRAINT_SCHEMA test CONSTRAINT_SCHEMA test
CONSTRAINT_NAME t CONSTRAINT_NAME t
TABLE_NAME t1 TABLE_NAME t1
@ -81,6 +106,11 @@ CONSTRAINT_NAME name
TABLE_NAME t2 TABLE_NAME t2
CHECK_CLAUSE char_length(`name`) > 2 CHECK_CLAUSE char_length(`name`) > 2
CONSTRAINT_CATALOG def CONSTRAINT_CATALOG def
CONSTRAINT_SCHEMA mysql
CONSTRAINT_NAME Priv
TABLE_NAME global_priv
CHECK_CLAUSE json_valid(`Priv`)
CONSTRAINT_CATALOG def
CONSTRAINT_SCHEMA test CONSTRAINT_SCHEMA test
CONSTRAINT_NAME CHK_dates CONSTRAINT_NAME CHK_dates
TABLE_NAME t2 TABLE_NAME t2
@ -104,6 +134,11 @@ CONSTRAINT_NAME name
TABLE_NAME t2 TABLE_NAME t2
CHECK_CLAUSE char_length(`name`) > 2 CHECK_CLAUSE char_length(`name`) > 2
CONSTRAINT_CATALOG def CONSTRAINT_CATALOG def
CONSTRAINT_SCHEMA mysql
CONSTRAINT_NAME Priv
TABLE_NAME global_priv
CHECK_CLAUSE json_valid(`Priv`)
CONSTRAINT_CATALOG def
CONSTRAINT_SCHEMA test CONSTRAINT_SCHEMA test
CONSTRAINT_NAME CHK_dates CONSTRAINT_NAME CHK_dates
TABLE_NAME t2 TABLE_NAME t2
@ -132,6 +167,7 @@ CONSTRAINT b check (b>10) # table constraint
select * from information_schema.check_constraints order by check_clause; select * from information_schema.check_constraints order by check_clause;
CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_NAME CHECK_CLAUSE CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_NAME CHECK_CLAUSE
def test name t2 char_length(`name`) > 2 def test name t2 char_length(`name`) > 2
def mysql Priv global_priv json_valid(`Priv`)
def test b t3 `b` > 0 def test b t3 `b` > 0
def test b t3 `b` > 10 def test b t3 `b` > 10
def test CHK_dates t2 `start_date` is null def test CHK_dates t2 `start_date` is null

View file

@ -75,6 +75,9 @@ def mysql general_log event_time 1 current_timestamp(6) NO timestamp NULL NULL N
def mysql general_log server_id 4 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned select,insert,update,references NEVER NULL def mysql general_log server_id 4 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned select,insert,update,references NEVER NULL
def mysql general_log thread_id 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select,insert,update,references NEVER NULL def mysql general_log thread_id 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select,insert,update,references NEVER NULL
def mysql general_log user_host 2 NULL NO mediumtext 16777215 16777215 NULL NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references NEVER NULL def mysql general_log user_host 2 NULL NO mediumtext 16777215 16777215 NULL NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references NEVER NULL
def mysql global_priv Host 1 '' NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references NEVER NULL
def mysql global_priv Priv 3 '{}' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext select,insert,update,references NEVER NULL
def mysql global_priv User 2 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) PRI select,insert,update,references NEVER NULL
def mysql gtid_slave_pos domain_id 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI select,insert,update,references NEVER NULL def mysql gtid_slave_pos domain_id 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI select,insert,update,references NEVER NULL
def mysql gtid_slave_pos seq_no 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL def mysql gtid_slave_pos seq_no 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
def mysql gtid_slave_pos server_id 3 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned select,insert,update,references NEVER NULL def mysql gtid_slave_pos server_id 3 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned select,insert,update,references NEVER NULL
@ -206,53 +209,53 @@ def mysql transaction_registry commit_id 2 NULL NO bigint NULL NULL 20 0 NULL NU
def mysql transaction_registry commit_timestamp 4 '0000-00-00 00:00:00.000000' NO timestamp NULL NULL NULL NULL 6 NULL NULL timestamp(6) MUL select,insert,update,references NEVER NULL def mysql transaction_registry commit_timestamp 4 '0000-00-00 00:00:00.000000' NO timestamp NULL NULL NULL NULL 6 NULL NULL timestamp(6) MUL select,insert,update,references NEVER NULL
def mysql transaction_registry isolation_level 5 NULL NO enum 16 48 NULL NULL NULL utf8 utf8_bin enum('READ-UNCOMMITTED','READ-COMMITTED','REPEATABLE-READ','SERIALIZABLE') select,insert,update,references NEVER NULL def mysql transaction_registry isolation_level 5 NULL NO enum 16 48 NULL NULL NULL utf8 utf8_bin enum('READ-UNCOMMITTED','READ-COMMITTED','REPEATABLE-READ','SERIALIZABLE') select,insert,update,references NEVER NULL
def mysql transaction_registry transaction_id 1 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned PRI select,insert,update,references NEVER NULL def mysql transaction_registry transaction_id 1 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned PRI select,insert,update,references NEVER NULL
def mysql user Alter_priv 17 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL def mysql user Alter_priv 17 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
def mysql user Alter_routine_priv 28 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL def mysql user Alter_routine_priv 28 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
def mysql user authentication_string 43 NULL NO text 65535 65535 NULL NULL NULL utf8 utf8_bin text select,insert,update,references NEVER NULL def mysql user authentication_string 43 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext select,insert,update,references NEVER NULL
def mysql user Create_priv 8 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL def mysql user Create_priv 8 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
def mysql user Create_routine_priv 27 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL def mysql user Create_routine_priv 27 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
def mysql user Create_tablespace_priv 32 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL def mysql user Create_tablespace_priv 32 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
def mysql user Create_tmp_table_priv 20 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL def mysql user Create_tmp_table_priv 20 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
def mysql user Create_user_priv 29 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL def mysql user Create_user_priv 29 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
def mysql user Create_view_priv 25 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL def mysql user Create_view_priv 25 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
def mysql user default_role 46 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) select,insert,update,references NEVER NULL def mysql user default_role 46 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext select,insert,update,references NEVER NULL
def mysql user Delete_history_priv 33 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL def mysql user Delete_history_priv 33 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
def mysql user Delete_priv 7 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL def mysql user Delete_priv 7 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
def mysql user Drop_priv 9 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL def mysql user Drop_priv 9 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
def mysql user Event_priv 30 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL def mysql user Event_priv 30 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
def mysql user Execute_priv 22 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL def mysql user Execute_priv 22 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
def mysql user File_priv 13 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL def mysql user File_priv 13 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
def mysql user Grant_priv 14 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL def mysql user Grant_priv 14 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
def mysql user Host 1 '' NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references NEVER NULL def mysql user Host 1 '' NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) select,insert,update,references NEVER NULL
def mysql user Index_priv 16 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL def mysql user Index_priv 16 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
def mysql user Insert_priv 5 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL def mysql user Insert_priv 5 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
def mysql user is_role 45 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL def mysql user is_role 45 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
def mysql user Lock_tables_priv 21 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL def mysql user Lock_tables_priv 21 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
def mysql user max_connections 40 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) unsigned select,insert,update,references NEVER NULL def mysql user max_connections 40 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
def mysql user max_questions 38 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) unsigned select,insert,update,references NEVER NULL def mysql user max_questions 38 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
def mysql user max_statement_time 47 0.000000 NO decimal NULL NULL 12 6 NULL NULL NULL decimal(12,6) select,insert,update,references NEVER NULL def mysql user max_statement_time 47 0.000000 NO decimal NULL NULL 12 6 NULL NULL NULL decimal(12,6) select,insert,update,references NEVER NULL
def mysql user max_updates 39 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) unsigned select,insert,update,references NEVER NULL def mysql user max_updates 39 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
def mysql user max_user_connections 41 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL def mysql user max_user_connections 41 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select,insert,update,references NEVER NULL
def mysql user Password 3 '' NO char 41 41 NULL NULL NULL latin1 latin1_bin char(41) select,insert,update,references NEVER NULL def mysql user Password 3 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext select,insert,update,references NEVER NULL
def mysql user password_expired 44 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL def mysql user password_expired 44 '' NO varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
def mysql user plugin 42 '' NO char 64 64 NULL NULL NULL latin1 latin1_swedish_ci char(64) select,insert,update,references NEVER NULL def mysql user plugin 42 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext select,insert,update,references NEVER NULL
def mysql user Process_priv 12 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL def mysql user Process_priv 12 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
def mysql user References_priv 15 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL def mysql user References_priv 15 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
def mysql user Reload_priv 10 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL def mysql user Reload_priv 10 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
def mysql user Repl_client_priv 24 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL def mysql user Repl_client_priv 24 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
def mysql user Repl_slave_priv 23 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL def mysql user Repl_slave_priv 23 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
def mysql user Select_priv 4 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL def mysql user Select_priv 4 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
def mysql user Show_db_priv 18 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL def mysql user Show_db_priv 18 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
def mysql user Show_view_priv 26 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL def mysql user Show_view_priv 26 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
def mysql user Shutdown_priv 11 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL def mysql user Shutdown_priv 11 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
def mysql user ssl_cipher 35 NULL NO blob 65535 65535 NULL NULL NULL NULL NULL blob select,insert,update,references NEVER NULL def mysql user ssl_cipher 35 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext select,insert,update,references NEVER NULL
def mysql user ssl_type 34 '' NO enum 9 27 NULL NULL NULL utf8 utf8_general_ci enum('','ANY','X509','SPECIFIED') select,insert,update,references NEVER NULL def mysql user ssl_type 34 NULL YES varchar 9 9 NULL NULL NULL latin1 latin1_swedish_ci varchar(9) select,insert,update,references NEVER NULL
def mysql user Super_priv 19 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL def mysql user Super_priv 19 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
def mysql user Trigger_priv 31 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL def mysql user Trigger_priv 31 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
def mysql user Update_priv 6 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL def mysql user Update_priv 6 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
def mysql user User 2 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) PRI select,insert,update,references NEVER NULL def mysql user User 2 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) select,insert,update,references NEVER NULL
def mysql user x509_issuer 36 NULL NO blob 65535 65535 NULL NULL NULL NULL NULL blob select,insert,update,references NEVER NULL def mysql user x509_issuer 36 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext select,insert,update,references NEVER NULL
def mysql user x509_subject 37 NULL NO blob 65535 65535 NULL NULL NULL NULL NULL blob select,insert,update,references NEVER NULL def mysql user x509_subject 37 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext select,insert,update,references NEVER NULL
########################################################################## ##########################################################################
# Show the quotient of CHARACTER_OCTET_LENGTH and CHARACTER_MAXIMUM_LENGTH # Show the quotient of CHARACTER_OCTET_LENGTH and CHARACTER_MAXIMUM_LENGTH
########################################################################## ##########################################################################
@ -269,11 +272,12 @@ COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME
1.0000 blob NULL NULL 1.0000 blob NULL NULL
1.0000 longblob NULL NULL 1.0000 longblob NULL NULL
1.0000 varbinary NULL NULL 1.0000 varbinary NULL NULL
1.0000 char latin1 latin1_bin
1.0000 char latin1 latin1_swedish_ci 1.0000 char latin1 latin1_swedish_ci
1.0000 varchar latin1 latin1_swedish_ci
1.0000 text utf8 utf8_bin 1.0000 text utf8 utf8_bin
1.0000 mediumtext utf8 utf8_general_ci 1.0000 mediumtext utf8 utf8_general_ci
1.0000 text utf8 utf8_general_ci 1.0000 text utf8 utf8_general_ci
1.0000 longtext utf8mb4 utf8mb4_bin
SELECT DISTINCT SELECT DISTINCT
CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
DATA_TYPE, DATA_TYPE,
@ -398,6 +402,9 @@ NULL mysql general_log thread_id bigint NULL NULL NULL NULL bigint(21) unsigned
NULL mysql general_log server_id int NULL NULL NULL NULL int(10) unsigned NULL mysql general_log server_id int NULL NULL NULL NULL int(10) unsigned
3.0000 mysql general_log command_type varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 mysql general_log command_type varchar 64 192 utf8 utf8_general_ci varchar(64)
1.0000 mysql general_log argument mediumtext 16777215 16777215 utf8 utf8_general_ci mediumtext 1.0000 mysql general_log argument mediumtext 16777215 16777215 utf8 utf8_general_ci mediumtext
3.0000 mysql global_priv Host char 60 180 utf8 utf8_bin char(60)
3.0000 mysql global_priv User char 80 240 utf8 utf8_bin char(80)
1.0000 mysql global_priv Priv longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
NULL mysql gtid_slave_pos domain_id int NULL NULL NULL NULL int(10) unsigned NULL mysql gtid_slave_pos domain_id int NULL NULL NULL NULL int(10) unsigned
NULL mysql gtid_slave_pos sub_id bigint NULL NULL NULL NULL bigint(20) unsigned NULL mysql gtid_slave_pos sub_id bigint NULL NULL NULL NULL bigint(20) unsigned
NULL mysql gtid_slave_pos server_id int NULL NULL NULL NULL int(10) unsigned NULL mysql gtid_slave_pos server_id int NULL NULL NULL NULL int(10) unsigned
@ -531,48 +538,48 @@ NULL mysql transaction_registry commit_timestamp timestamp NULL NULL NULL NULL t
3.0000 mysql transaction_registry isolation_level enum 16 48 utf8 utf8_bin enum('READ-UNCOMMITTED','READ-COMMITTED','REPEATABLE-READ','SERIALIZABLE') 3.0000 mysql transaction_registry isolation_level enum 16 48 utf8 utf8_bin enum('READ-UNCOMMITTED','READ-COMMITTED','REPEATABLE-READ','SERIALIZABLE')
3.0000 mysql user Host char 60 180 utf8 utf8_bin char(60) 3.0000 mysql user Host char 60 180 utf8 utf8_bin char(60)
3.0000 mysql user User char 80 240 utf8 utf8_bin char(80) 3.0000 mysql user User char 80 240 utf8 utf8_bin char(80)
1.0000 mysql user Password char 41 41 latin1 latin1_bin char(41) 1.0000 mysql user Password longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
3.0000 mysql user Select_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user Select_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user Insert_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user Insert_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user Update_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user Update_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user Delete_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user Delete_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user Create_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user Create_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user Drop_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user Drop_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user Reload_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user Reload_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user Shutdown_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user Shutdown_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user Process_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user Process_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user File_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user File_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user Grant_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user Grant_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user References_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user References_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user Index_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user Index_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user Alter_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user Alter_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user Show_db_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user Show_db_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user Super_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user Super_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user Create_tmp_table_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user Create_tmp_table_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user Lock_tables_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user Lock_tables_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user Execute_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user Execute_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user Repl_slave_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user Repl_slave_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user Repl_client_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user Repl_client_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user Create_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user Create_view_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user Show_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user Show_view_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user Create_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user Create_routine_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user Alter_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user Alter_routine_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user Create_user_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user Create_user_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user Event_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user Event_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user Trigger_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user Trigger_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user Create_tablespace_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user Create_tablespace_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user Delete_history_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user Delete_history_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user ssl_type enum 9 27 utf8 utf8_general_ci enum('','ANY','X509','SPECIFIED') 1.0000 mysql user ssl_type varchar 9 9 latin1 latin1_swedish_ci varchar(9)
1.0000 mysql user ssl_cipher blob 65535 65535 NULL NULL blob 1.0000 mysql user ssl_cipher longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
1.0000 mysql user x509_issuer blob 65535 65535 NULL NULL blob 1.0000 mysql user x509_issuer longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
1.0000 mysql user x509_subject blob 65535 65535 NULL NULL blob 1.0000 mysql user x509_subject longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
NULL mysql user max_questions int NULL NULL NULL NULL int(11) unsigned NULL mysql user max_questions bigint NULL NULL NULL NULL bigint(20) unsigned
NULL mysql user max_updates int NULL NULL NULL NULL int(11) unsigned NULL mysql user max_updates bigint NULL NULL NULL NULL bigint(20) unsigned
NULL mysql user max_connections int NULL NULL NULL NULL int(11) unsigned NULL mysql user max_connections bigint NULL NULL NULL NULL bigint(20) unsigned
NULL mysql user max_user_connections int NULL NULL NULL NULL int(11) NULL mysql user max_user_connections bigint NULL NULL NULL NULL bigint(21)
1.0000 mysql user plugin char 64 64 latin1 latin1_swedish_ci char(64) 1.0000 mysql user plugin longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
1.0000 mysql user authentication_string text 65535 65535 utf8 utf8_bin text 1.0000 mysql user authentication_string longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
3.0000 mysql user password_expired enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user password_expired varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user is_role enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user is_role varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user default_role char 80 240 utf8 utf8_bin char(80) 1.0000 mysql user default_role longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
NULL mysql user max_statement_time decimal NULL NULL NULL NULL decimal(12,6) NULL mysql user max_statement_time decimal NULL NULL NULL NULL decimal(12,6)

View file

@ -75,6 +75,9 @@ def mysql general_log event_time 1 current_timestamp(6) NO timestamp NULL NULL N
def mysql general_log server_id 4 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned NEVER NULL def mysql general_log server_id 4 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned NEVER NULL
def mysql general_log thread_id 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL def mysql general_log thread_id 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
def mysql general_log user_host 2 NULL NO mediumtext 16777215 16777215 NULL NULL NULL utf8 utf8_general_ci mediumtext NEVER NULL def mysql general_log user_host 2 NULL NO mediumtext 16777215 16777215 NULL NULL NULL utf8 utf8_general_ci mediumtext NEVER NULL
def mysql global_priv Host 1 '' NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) PRI NEVER NULL
def mysql global_priv Priv 3 '{}' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext NEVER NULL
def mysql global_priv User 2 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) PRI NEVER NULL
def mysql gtid_slave_pos domain_id 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI NEVER NULL def mysql gtid_slave_pos domain_id 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI NEVER NULL
def mysql gtid_slave_pos seq_no 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned NEVER NULL def mysql gtid_slave_pos seq_no 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned NEVER NULL
def mysql gtid_slave_pos server_id 3 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned NEVER NULL def mysql gtid_slave_pos server_id 3 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned NEVER NULL
@ -187,53 +190,53 @@ def mysql time_zone_transition_type Is_DST 4 0 NO tinyint NULL NULL 3 0 NULL NUL
def mysql time_zone_transition_type Offset 3 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) NEVER NULL def mysql time_zone_transition_type Offset 3 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) NEVER NULL
def mysql time_zone_transition_type Time_zone_id 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI NEVER NULL def mysql time_zone_transition_type Time_zone_id 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI NEVER NULL
def mysql time_zone_transition_type Transition_type_id 2 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI NEVER NULL def mysql time_zone_transition_type Transition_type_id 2 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI NEVER NULL
def mysql user Alter_priv 17 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL def mysql user Alter_priv 17 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
def mysql user Alter_routine_priv 28 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL def mysql user Alter_routine_priv 28 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
def mysql user authentication_string 43 NULL NO text 65535 65535 NULL NULL NULL utf8 utf8_bin text NEVER NULL def mysql user authentication_string 43 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext NEVER NULL
def mysql user Create_priv 8 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL def mysql user Create_priv 8 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
def mysql user Create_routine_priv 27 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL def mysql user Create_routine_priv 27 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
def mysql user Create_tablespace_priv 32 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL def mysql user Create_tablespace_priv 32 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
def mysql user Create_tmp_table_priv 20 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL def mysql user Create_tmp_table_priv 20 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
def mysql user Create_user_priv 29 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL def mysql user Create_user_priv 29 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
def mysql user Create_view_priv 25 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL def mysql user Create_view_priv 25 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
def mysql user default_role 46 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) NEVER NULL def mysql user default_role 46 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext NEVER NULL
def mysql user Delete_history_priv 33 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL def mysql user Delete_history_priv 33 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
def mysql user Delete_priv 7 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL def mysql user Delete_priv 7 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
def mysql user Drop_priv 9 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL def mysql user Drop_priv 9 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
def mysql user Event_priv 30 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL def mysql user Event_priv 30 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
def mysql user Execute_priv 22 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL def mysql user Execute_priv 22 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
def mysql user File_priv 13 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL def mysql user File_priv 13 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
def mysql user Grant_priv 14 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL def mysql user Grant_priv 14 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
def mysql user Host 1 '' NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) PRI NEVER NULL def mysql user Host 1 '' NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) NEVER NULL
def mysql user Index_priv 16 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL def mysql user Index_priv 16 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
def mysql user Insert_priv 5 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL def mysql user Insert_priv 5 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
def mysql user is_role 45 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL def mysql user is_role 45 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
def mysql user Lock_tables_priv 21 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL def mysql user Lock_tables_priv 21 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
def mysql user max_connections 40 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) unsigned NEVER NULL def mysql user max_connections 40 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned NEVER NULL
def mysql user max_questions 38 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) unsigned NEVER NULL def mysql user max_questions 38 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned NEVER NULL
def mysql user max_statement_time 47 0.000000 NO decimal NULL NULL 12 6 NULL NULL NULL decimal(12,6) NEVER NULL def mysql user max_statement_time 47 0.000000 NO decimal NULL NULL 12 6 NULL NULL NULL decimal(12,6) NEVER NULL
def mysql user max_updates 39 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) unsigned NEVER NULL def mysql user max_updates 39 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned NEVER NULL
def mysql user max_user_connections 41 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) NEVER NULL def mysql user max_user_connections 41 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL
def mysql user Password 3 '' NO char 41 41 NULL NULL NULL latin1 latin1_bin char(41) NEVER NULL def mysql user Password 3 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext NEVER NULL
def mysql user password_expired 44 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL def mysql user password_expired 44 '' NO varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
def mysql user plugin 42 '' NO char 64 64 NULL NULL NULL latin1 latin1_swedish_ci char(64) NEVER NULL def mysql user plugin 42 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext NEVER NULL
def mysql user Process_priv 12 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL def mysql user Process_priv 12 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
def mysql user References_priv 15 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL def mysql user References_priv 15 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
def mysql user Reload_priv 10 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL def mysql user Reload_priv 10 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
def mysql user Repl_client_priv 24 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL def mysql user Repl_client_priv 24 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
def mysql user Repl_slave_priv 23 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL def mysql user Repl_slave_priv 23 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
def mysql user Select_priv 4 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL def mysql user Select_priv 4 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
def mysql user Show_db_priv 18 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL def mysql user Show_db_priv 18 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
def mysql user Show_view_priv 26 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL def mysql user Show_view_priv 26 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
def mysql user Shutdown_priv 11 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL def mysql user Shutdown_priv 11 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
def mysql user ssl_cipher 35 NULL NO blob 65535 65535 NULL NULL NULL NULL NULL blob NEVER NULL def mysql user ssl_cipher 35 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext NEVER NULL
def mysql user ssl_type 34 '' NO enum 9 27 NULL NULL NULL utf8 utf8_general_ci enum('','ANY','X509','SPECIFIED') NEVER NULL def mysql user ssl_type 34 NULL YES varchar 9 9 NULL NULL NULL latin1 latin1_swedish_ci varchar(9) NEVER NULL
def mysql user Super_priv 19 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL def mysql user Super_priv 19 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
def mysql user Trigger_priv 31 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL def mysql user Trigger_priv 31 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
def mysql user Update_priv 6 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL def mysql user Update_priv 6 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
def mysql user User 2 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) PRI NEVER NULL def mysql user User 2 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) NEVER NULL
def mysql user x509_issuer 36 NULL NO blob 65535 65535 NULL NULL NULL NULL NULL blob NEVER NULL def mysql user x509_issuer 36 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext NEVER NULL
def mysql user x509_subject 37 NULL NO blob 65535 65535 NULL NULL NULL NULL NULL blob NEVER NULL def mysql user x509_subject 37 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext NEVER NULL
Warnings: Warnings:
Warning 1286 Unknown storage engine 'InnoDB' Warning 1286 Unknown storage engine 'InnoDB'
Warning 1286 Unknown storage engine 'InnoDB' Warning 1286 Unknown storage engine 'InnoDB'
@ -254,11 +257,12 @@ COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME
1.0000 blob NULL NULL 1.0000 blob NULL NULL
1.0000 longblob NULL NULL 1.0000 longblob NULL NULL
1.0000 varbinary NULL NULL 1.0000 varbinary NULL NULL
1.0000 char latin1 latin1_bin
1.0000 char latin1 latin1_swedish_ci 1.0000 char latin1 latin1_swedish_ci
1.0000 varchar latin1 latin1_swedish_ci
1.0000 text utf8 utf8_bin 1.0000 text utf8 utf8_bin
1.0000 mediumtext utf8 utf8_general_ci 1.0000 mediumtext utf8 utf8_general_ci
1.0000 text utf8 utf8_general_ci 1.0000 text utf8 utf8_general_ci
1.0000 longtext utf8mb4 utf8mb4_bin
Warnings: Warnings:
Warning 1286 Unknown storage engine 'InnoDB' Warning 1286 Unknown storage engine 'InnoDB'
Warning 1286 Unknown storage engine 'InnoDB' Warning 1286 Unknown storage engine 'InnoDB'
@ -395,6 +399,9 @@ NULL mysql general_log thread_id bigint NULL NULL NULL NULL bigint(21) unsigned
NULL mysql general_log server_id int NULL NULL NULL NULL int(10) unsigned NULL mysql general_log server_id int NULL NULL NULL NULL int(10) unsigned
3.0000 mysql general_log command_type varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 mysql general_log command_type varchar 64 192 utf8 utf8_general_ci varchar(64)
1.0000 mysql general_log argument mediumtext 16777215 16777215 utf8 utf8_general_ci mediumtext 1.0000 mysql general_log argument mediumtext 16777215 16777215 utf8 utf8_general_ci mediumtext
3.0000 mysql global_priv Host char 60 180 utf8 utf8_bin char(60)
3.0000 mysql global_priv User char 80 240 utf8 utf8_bin char(80)
1.0000 mysql global_priv Priv longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
NULL mysql gtid_slave_pos domain_id int NULL NULL NULL NULL int(10) unsigned NULL mysql gtid_slave_pos domain_id int NULL NULL NULL NULL int(10) unsigned
NULL mysql gtid_slave_pos sub_id bigint NULL NULL NULL NULL bigint(20) unsigned NULL mysql gtid_slave_pos sub_id bigint NULL NULL NULL NULL bigint(20) unsigned
NULL mysql gtid_slave_pos server_id int NULL NULL NULL NULL int(10) unsigned NULL mysql gtid_slave_pos server_id int NULL NULL NULL NULL int(10) unsigned
@ -509,50 +516,50 @@ NULL mysql time_zone_transition_type Is_DST tinyint NULL NULL NULL NULL tinyint(
3.0000 mysql time_zone_transition_type Abbreviation char 8 24 utf8 utf8_general_ci char(8) 3.0000 mysql time_zone_transition_type Abbreviation char 8 24 utf8 utf8_general_ci char(8)
3.0000 mysql user Host char 60 180 utf8 utf8_bin char(60) 3.0000 mysql user Host char 60 180 utf8 utf8_bin char(60)
3.0000 mysql user User char 80 240 utf8 utf8_bin char(80) 3.0000 mysql user User char 80 240 utf8 utf8_bin char(80)
1.0000 mysql user Password char 41 41 latin1 latin1_bin char(41) 1.0000 mysql user Password longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
3.0000 mysql user Select_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user Select_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user Insert_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user Insert_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user Update_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user Update_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user Delete_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user Delete_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user Create_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user Create_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user Drop_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user Drop_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user Reload_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user Reload_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user Shutdown_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user Shutdown_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user Process_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user Process_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user File_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user File_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user Grant_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user Grant_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user References_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user References_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user Index_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user Index_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user Alter_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user Alter_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user Show_db_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user Show_db_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user Super_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user Super_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user Create_tmp_table_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user Create_tmp_table_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user Lock_tables_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user Lock_tables_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user Execute_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user Execute_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user Repl_slave_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user Repl_slave_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user Repl_client_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user Repl_client_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user Create_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user Create_view_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user Show_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user Show_view_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user Create_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user Create_routine_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user Alter_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user Alter_routine_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user Create_user_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user Create_user_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user Event_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user Event_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user Trigger_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user Trigger_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user Create_tablespace_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user Create_tablespace_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user Delete_history_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user Delete_history_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user ssl_type enum 9 27 utf8 utf8_general_ci enum('','ANY','X509','SPECIFIED') 1.0000 mysql user ssl_type varchar 9 9 latin1 latin1_swedish_ci varchar(9)
1.0000 mysql user ssl_cipher blob 65535 65535 NULL NULL blob 1.0000 mysql user ssl_cipher longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
1.0000 mysql user x509_issuer blob 65535 65535 NULL NULL blob 1.0000 mysql user x509_issuer longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
1.0000 mysql user x509_subject blob 65535 65535 NULL NULL blob 1.0000 mysql user x509_subject longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
NULL mysql user max_questions int NULL NULL NULL NULL int(11) unsigned NULL mysql user max_questions bigint NULL NULL NULL NULL bigint(20) unsigned
NULL mysql user max_updates int NULL NULL NULL NULL int(11) unsigned NULL mysql user max_updates bigint NULL NULL NULL NULL bigint(20) unsigned
NULL mysql user max_connections int NULL NULL NULL NULL int(11) unsigned NULL mysql user max_connections bigint NULL NULL NULL NULL bigint(20) unsigned
NULL mysql user max_user_connections int NULL NULL NULL NULL int(11) NULL mysql user max_user_connections bigint NULL NULL NULL NULL bigint(21)
1.0000 mysql user plugin char 64 64 latin1 latin1_swedish_ci char(64) 1.0000 mysql user plugin longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
1.0000 mysql user authentication_string text 65535 65535 utf8 utf8_bin text 1.0000 mysql user authentication_string longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
3.0000 mysql user password_expired enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user password_expired varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user is_role enum 1 3 utf8 utf8_general_ci enum('N','Y') 1.0000 mysql user is_role varchar 1 1 latin1 latin1_swedish_ci varchar(1)
3.0000 mysql user default_role char 80 240 utf8 utf8_bin char(80) 1.0000 mysql user default_role longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
NULL mysql user max_statement_time decimal NULL NULL NULL NULL decimal(12,6) NULL mysql user max_statement_time decimal NULL NULL NULL NULL decimal(12,6)
Warnings: Warnings:
Warning 1286 Unknown storage engine 'InnoDB' Warning 1286 Unknown storage engine 'InnoDB'

View file

@ -90,6 +90,8 @@ def mysql PRIMARY def mysql db User
def mysql PRIMARY def mysql event db def mysql PRIMARY def mysql event db
def mysql PRIMARY def mysql event name def mysql PRIMARY def mysql event name
def mysql PRIMARY def mysql func name def mysql PRIMARY def mysql func name
def mysql PRIMARY def mysql global_priv Host
def mysql PRIMARY def mysql global_priv User
def mysql PRIMARY def mysql gtid_slave_pos domain_id def mysql PRIMARY def mysql gtid_slave_pos domain_id
def mysql PRIMARY def mysql gtid_slave_pos sub_id def mysql PRIMARY def mysql gtid_slave_pos sub_id
def mysql PRIMARY def mysql help_category help_category_id def mysql PRIMARY def mysql help_category help_category_id
@ -142,8 +144,6 @@ def mysql PRIMARY def mysql time_zone_transition_type Time_zone_id
def mysql PRIMARY def mysql time_zone_transition_type Transition_type_id def mysql PRIMARY def mysql time_zone_transition_type Transition_type_id
def mysql commit_id def mysql transaction_registry commit_id def mysql commit_id def mysql transaction_registry commit_id
def mysql PRIMARY def mysql transaction_registry transaction_id def mysql PRIMARY def mysql transaction_registry transaction_id
def mysql PRIMARY def mysql user Host
def mysql PRIMARY def mysql user User
######################################################################################## ########################################################################################
# Testcase 3.2.7.2 + 3.2.7.3: INFORMATION_SCHEMA.KEY_COLUMN_USAGE accessible information # Testcase 3.2.7.2 + 3.2.7.3: INFORMATION_SCHEMA.KEY_COLUMN_USAGE accessible information
######################################################################################## ########################################################################################

View file

@ -90,6 +90,8 @@ def mysql PRIMARY def mysql db User
def mysql PRIMARY def mysql event db def mysql PRIMARY def mysql event db
def mysql PRIMARY def mysql event name def mysql PRIMARY def mysql event name
def mysql PRIMARY def mysql func name def mysql PRIMARY def mysql func name
def mysql PRIMARY def mysql global_priv Host
def mysql PRIMARY def mysql global_priv User
def mysql PRIMARY def mysql gtid_slave_pos domain_id def mysql PRIMARY def mysql gtid_slave_pos domain_id
def mysql PRIMARY def mysql gtid_slave_pos sub_id def mysql PRIMARY def mysql gtid_slave_pos sub_id
def mysql PRIMARY def mysql help_category help_category_id def mysql PRIMARY def mysql help_category help_category_id
@ -142,8 +144,6 @@ def mysql PRIMARY def mysql time_zone_transition_type Time_zone_id
def mysql PRIMARY def mysql time_zone_transition_type Transition_type_id def mysql PRIMARY def mysql time_zone_transition_type Transition_type_id
def mysql commit_id def mysql transaction_registry commit_id def mysql commit_id def mysql transaction_registry commit_id
def mysql PRIMARY def mysql transaction_registry transaction_id def mysql PRIMARY def mysql transaction_registry transaction_id
def mysql PRIMARY def mysql user Host
def mysql PRIMARY def mysql user User
######################################################################################## ########################################################################################
# Testcase 3.2.7.2 + 3.2.7.3: INFORMATION_SCHEMA.KEY_COLUMN_USAGE accessible information # Testcase 3.2.7.2 + 3.2.7.3: INFORMATION_SCHEMA.KEY_COLUMN_USAGE accessible information
######################################################################################## ########################################################################################

Some files were not shown because too many files have changed in this diff Show more