Commit 35a1a224 authored by Georgi Kodinov's avatar Georgi Kodinov

merge mysql-5.5->mysql-5.5-security

parents 892e6fb0 5a5dcb0f
This source diff could not be displayed because it is too large. You can view the blob instead.
MYSQL_VERSION_MAJOR=5 MYSQL_VERSION_MAJOR=5
MYSQL_VERSION_MINOR=5 MYSQL_VERSION_MINOR=5
MYSQL_VERSION_PATCH=11 MYSQL_VERSION_PATCH=12
MYSQL_VERSION_EXTRA= MYSQL_VERSION_EXTRA=
...@@ -29,14 +29,14 @@ typedef struct st_decimal_t { ...@@ -29,14 +29,14 @@ typedef struct st_decimal_t {
int internal_str2dec(const char *from, decimal_t *to, char **end, int internal_str2dec(const char *from, decimal_t *to, char **end,
my_bool fixed); my_bool fixed);
int decimal2string(decimal_t *from, char *to, int *to_len, int decimal2string(const decimal_t *from, char *to, int *to_len,
int fixed_precision, int fixed_decimals, int fixed_precision, int fixed_decimals,
char filler); char filler);
int decimal2ulonglong(decimal_t *from, ulonglong *to); int decimal2ulonglong(decimal_t *from, ulonglong *to);
int ulonglong2decimal(ulonglong from, decimal_t *to); int ulonglong2decimal(ulonglong from, decimal_t *to);
int decimal2longlong(decimal_t *from, longlong *to); int decimal2longlong(decimal_t *from, longlong *to);
int longlong2decimal(longlong from, decimal_t *to); int longlong2decimal(longlong from, decimal_t *to);
int decimal2double(decimal_t *from, double *to); int decimal2double(const decimal_t *from, double *to);
int double2decimal(double from, decimal_t *to); int double2decimal(double from, decimal_t *to);
int decimal_actual_fraction(decimal_t *from); int decimal_actual_fraction(decimal_t *from);
int decimal2bin(decimal_t *from, uchar *to, int precision, int scale); int decimal2bin(decimal_t *from, uchar *to, int precision, int scale);
...@@ -47,17 +47,17 @@ int decimal_bin_size(int precision, int scale); ...@@ -47,17 +47,17 @@ int decimal_bin_size(int precision, int scale);
int decimal_result_size(decimal_t *from1, decimal_t *from2, char op, int decimal_result_size(decimal_t *from1, decimal_t *from2, char op,
int param); int param);
int decimal_intg(decimal_t *from); int decimal_intg(const decimal_t *from);
int decimal_add(decimal_t *from1, decimal_t *from2, decimal_t *to); int decimal_add(const decimal_t *from1, const decimal_t *from2, decimal_t *to);
int decimal_sub(decimal_t *from1, decimal_t *from2, decimal_t *to); int decimal_sub(const decimal_t *from1, const decimal_t *from2, decimal_t *to);
int decimal_cmp(decimal_t *from1, decimal_t *from2); int decimal_cmp(const decimal_t *from1, const decimal_t *from2);
int decimal_mul(decimal_t *from1, decimal_t *from2, decimal_t *to); int decimal_mul(const decimal_t *from1, const decimal_t *from2, decimal_t *to);
int decimal_div(decimal_t *from1, decimal_t *from2, decimal_t *to, int decimal_div(const decimal_t *from1, const decimal_t *from2, decimal_t *to,
int scale_incr); int scale_incr);
int decimal_mod(decimal_t *from1, decimal_t *from2, decimal_t *to); int decimal_mod(const decimal_t *from1, const decimal_t *from2, decimal_t *to);
int decimal_round(decimal_t *from, decimal_t *to, int new_scale, int decimal_round(const decimal_t *from, decimal_t *to, int new_scale,
decimal_round_mode mode); decimal_round_mode mode);
int decimal_is_zero(decimal_t *from); int decimal_is_zero(const decimal_t *from);
void max_decimal(int precision, int frac, decimal_t *to); void max_decimal(int precision, int frac, decimal_t *to);
#define string2decimal(A,B,C) internal_str2dec((A), (B), (C), 0) #define string2decimal(A,B,C) internal_str2dec((A), (B), (C), 0)
......
...@@ -23,8 +23,8 @@ insert into tm set a=null; # to simulate killed status on the slave ...@@ -23,8 +23,8 @@ insert into tm set a=null; # to simulate killed status on the slave
commit; commit;
connection slave; connection slave;
call mtr.add_suppression("Slave SQL.*slave SQL thread is being stopped in the middle of applying of a group having updated a non-transaction table"); call mtr.add_suppression("Slave SQL.*Request to stop slave SQL Thread received while applying a group that has non-transactional changes; waiting for completion of the group");
call mtr.add_suppression("Slave SQL.*The slave SQL is stopped, leaving the current group of events unfinished with a non-transaction table changed."); call mtr.add_suppression("Slave SQL.*Slave SQL Thread stopped with incomplete event group having non-transactional changes");
# slave will catch the killed status but won't shut down immediately # slave will catch the killed status but won't shut down immediately
# only after the whole group has done (commit) # only after the whole group has done (commit)
......
...@@ -2,3 +2,4 @@ disable_query_log; ...@@ -2,3 +2,4 @@ disable_query_log;
--require r/true.require --require r/true.require
select (PLUGIN_LIBRARY LIKE 'auth_test_plugin%') as `TRUE` FROM INFORMATION_SCHEMA.PLUGINS select (PLUGIN_LIBRARY LIKE 'auth_test_plugin%') as `TRUE` FROM INFORMATION_SCHEMA.PLUGINS
WHERE PLUGIN_NAME='test_plugin_server'; WHERE PLUGIN_NAME='test_plugin_server';
enable_query_log;
...@@ -656,3 +656,11 @@ Warning 1366 Incorrect decimal value: '' for column '' at row -1 ...@@ -656,3 +656,11 @@ Warning 1366 Incorrect decimal value: '' for column '' at row -1
SELECT 1 div null; SELECT 1 div null;
1 div null 1 div null
NULL NULL
#
# Bug #11792200 - DIVIDING LARGE NUMBERS CAUSES STACK CORRUPTIONS
#
select (1.175494351E-37 div 1.7976931348623157E+308);
(1.175494351E-37 div 1.7976931348623157E+308)
0
Warnings:
Warning 1292 Truncated incorrect DECIMAL value: ''
...@@ -54,7 +54,7 @@ max_updates 0 ...@@ -54,7 +54,7 @@ max_updates 0
max_connections 0 max_connections 0
max_user_connections 0 max_user_connections 0
plugin plugin
authentication_string authentication_string NULL
show grants for mysqltest_1@localhost; show grants for mysqltest_1@localhost;
Grants for mysqltest_1@localhost Grants for mysqltest_1@localhost
GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' REQUIRE CIPHER 'EDH-RSA-DES-CBC3-SHA' GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' REQUIRE CIPHER 'EDH-RSA-DES-CBC3-SHA'
...@@ -125,7 +125,7 @@ max_updates 0 ...@@ -125,7 +125,7 @@ max_updates 0
max_connections 0 max_connections 0
max_user_connections 0 max_user_connections 0
plugin plugin
authentication_string authentication_string NULL
show grants for mysqltest_1@localhost; show grants for mysqltest_1@localhost;
Grants for mysqltest_1@localhost Grants for mysqltest_1@localhost
GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' WITH MAX_QUERIES_PER_HOUR 10 GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' WITH MAX_QUERIES_PER_HOUR 10
...@@ -172,7 +172,7 @@ max_updates 20 ...@@ -172,7 +172,7 @@ max_updates 20
max_connections 30 max_connections 30
max_user_connections 0 max_user_connections 0
plugin plugin
authentication_string authentication_string NULL
show grants for mysqltest_1@localhost; show grants for mysqltest_1@localhost;
Grants for mysqltest_1@localhost Grants for mysqltest_1@localhost
GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' WITH MAX_QUERIES_PER_HOUR 10 MAX_UPDATES_PER_HOUR 20 MAX_CONNECTIONS_PER_HOUR 30 GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' WITH MAX_QUERIES_PER_HOUR 10 MAX_UPDATES_PER_HOUR 20 MAX_CONNECTIONS_PER_HOUR 30
...@@ -284,7 +284,6 @@ Warnings: ...@@ -284,7 +284,6 @@ Warnings:
Warning 1364 Field 'ssl_cipher' doesn't have a default value 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_issuer' doesn't have a default value
Warning 1364 Field 'x509_subject' 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;
......
...@@ -287,7 +287,6 @@ Warnings: ...@@ -287,7 +287,6 @@ Warnings:
Warning 1364 Field 'ssl_cipher' doesn't have a default value 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_issuer' doesn't have a default value
Warning 1364 Field 'x509_subject' 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@'%';
...@@ -355,7 +354,6 @@ Warnings: ...@@ -355,7 +354,6 @@ Warnings:
Warning 1364 Field 'ssl_cipher' doesn't have a default value 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_issuer' doesn't have a default value
Warning 1364 Field 'x509_subject' 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;
......
...@@ -10,3 +10,10 @@ mysqld is alive ...@@ -10,3 +10,10 @@ mysqld is alive
# Displaying the output : # Displaying the output :
mysqld is alive mysqld is alive
mysqld is alive mysqld is alive
#
# BUG#11766184 - 59234: cmdline clients crash --defaults-extra-file
# with no .cnf or .ini extension.
#
# Creating an empty file 'cnf_file'
# Using --defaults-extra-file option with 'cnf_file'.
mysqld is alive
...@@ -342,4 +342,62 @@ select USER(),CURRENT_USER(); ...@@ -342,4 +342,62 @@ select USER(),CURRENT_USER();
USER() CURRENT_USER() USER() CURRENT_USER()
uplain@localhost uplain@localhost uplain@localhost uplain@localhost
DROP USER uplain@localhost; DROP USER uplain@localhost;
#
# Bug #59038 : mysql.user.authentication_string column
# causes configuration wizard to fail
INSERT 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,
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,
/*!50001
Create_view_priv,
Show_view_priv,
Create_routine_priv,
Alter_routine_priv,
Create_user_priv,
*/
ssl_type,
ssl_cipher,
x509_issuer,
x509_subject,
max_questions,
max_updates,
max_connections)
VALUES (
'localhost',
'inserttest', '',
'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y',
'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y',
/*!50001 'Y', 'Y', 'Y', 'Y', 'Y', */'', '', '', '', '0', '0', '0');
FLUSH PRIVILEGES;
DROP USER inserttest@localhost;
SELECT IS_NULLABLE, COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE
COLUMN_NAME IN ('authentication_string', 'plugin') AND
TABLE_NAME='user' AND
TABLE_SCHEMA='mysql'
ORDER BY COLUMN_NAME;
IS_NULLABLE COLUMN_NAME
YES authentication_string
YES plugin
End of 5.5 tests End of 5.5 tests
...@@ -105,7 +105,7 @@ CREATE USER plug_dest IDENTIFIED BY 'plug_dest_passwd'; ...@@ -105,7 +105,7 @@ 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 plug_dest NULL
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';
...@@ -115,7 +115,7 @@ DROP USER plug; ...@@ -115,7 +115,7 @@ 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 plug_dest NULL
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';
...@@ -125,7 +125,7 @@ CREATE USER plug_dest IDENTIFIED BY 'plug_dest_passwd'; ...@@ -125,7 +125,7 @@ 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 plug_dest NULL
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';
...@@ -135,7 +135,7 @@ DROP USER plug; ...@@ -135,7 +135,7 @@ 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 plug_dest NULL
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';
...@@ -145,7 +145,7 @@ GRANT ALL PRIVILEGES ON test_user_db.* TO plug_dest IDENTIFIED BY 'plug_dest_pas ...@@ -145,7 +145,7 @@ GRANT ALL PRIVILEGES ON test_user_db.* TO plug_dest IDENTIFIED BY 'plug_dest_pas
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 plug_dest NULL
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';
...@@ -155,7 +155,7 @@ DROP USER plug; ...@@ -155,7 +155,7 @@ 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 plug_dest NULL
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';
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';
...@@ -210,7 +210,7 @@ DROP USER plüg; ...@@ -210,7 +210,7 @@ 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 plüg_dest NULL
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';
...@@ -221,7 +221,7 @@ DROP USER 'plüg'; ...@@ -221,7 +221,7 @@ 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 pl??g_dest NULL
DROP USER 'plüg_dest'; DROP USER 'plüg_dest';
SET NAMES latin1; SET NAMES latin1;
========== test 1.1.1.5 ==================================== ========== test 1.1.1.5 ====================================
...@@ -235,7 +235,7 @@ DROP USER 'plug'; ...@@ -235,7 +235,7 @@ 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 plüg_dest NULL
DROP USER 'plüg_dest'; DROP USER 'plüg_dest';
SET NAMES utf8; SET NAMES utf8;
CREATE USER plüg IDENTIFIED WITH 'test_plügin_server' AS 'plüg_dest'; CREATE USER plüg IDENTIFIED WITH 'test_plügin_server' AS 'plüg_dest';
...@@ -248,7 +248,7 @@ DROP USER 'plüg'; ...@@ -248,7 +248,7 @@ 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 plüg_dest NULL
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';
...@@ -258,7 +258,7 @@ DROP USER plüg; ...@@ -258,7 +258,7 @@ 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 plüg_dest NULL
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=============================
SET @auth_name= 'test_plugin_server'; SET @auth_name= 'test_plugin_server';
...@@ -278,7 +278,7 @@ DROP USER plug; ...@@ -278,7 +278,7 @@ 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 hh's_plug_dest NULL
DROP USER 'hh''s_plug_dest'; DROP USER 'hh''s_plug_dest';
========== test 1.1.1.4 ==================================== ========== test 1.1.1.4 ====================================
CREATE USER plug IDENTIFIED WITH hh''s_test_plugin_server AS 'plug_dest'; CREATE USER plug IDENTIFIED WITH hh''s_test_plugin_server AS 'plug_dest';
...@@ -294,7 +294,7 @@ GRANT ALL PRIVILEGES ON test_user_db.* TO plug_dest; ...@@ -294,7 +294,7 @@ 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 plug_dest NULL
DROP USER grant_user,plug_dest; DROP USER grant_user,plug_dest;
set @save_sql_mode= @@sql_mode; set @save_sql_mode= @@sql_mode;
SET @@sql_mode=no_auto_create_user; SET @@sql_mode=no_auto_create_user;
...@@ -315,13 +315,13 @@ CREATE USER plug_dest IDENTIFIED BY 'plug_dest_passwd'; ...@@ -315,13 +315,13 @@ 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 *939AEE68989794C0F408277411C26055CDF41119 plug_dest NULL *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 *560881EB651416CEF77314D07D55EDCD5FC1BD6D plug_dest NULL *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;
...@@ -20,7 +20,7 @@ GRANT ALL PRIVILEGES ON test_user_db.* TO plug_dest IDENTIFIED BY 'plug_dest_pas ...@@ -20,7 +20,7 @@ GRANT ALL PRIVILEGES ON test_user_db.* TO plug_dest IDENTIFIED BY 'plug_dest_pas
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 plug_dest NULL
plug_user test_plugin_server plug_dest plug_user test_plugin_server plug_dest
1) 1)
current_user() current_user()
...@@ -73,7 +73,7 @@ GRANT PROXY ON new_dest TO plug_user; ...@@ -73,7 +73,7 @@ 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 new_dest NULL
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;
CREATE USER plug_user CREATE USER plug_user
...@@ -91,7 +91,7 @@ GRANT PROXY ON new_dest TO plug_user; ...@@ -91,7 +91,7 @@ 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 new_dest NULL
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;
CREATE USER plug_user CREATE USER plug_user
...@@ -113,13 +113,13 @@ connection default; ...@@ -113,13 +113,13 @@ 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 plug_dest NULL
disconnect plug_user; disconnect plug_user;
UPDATE mysql.user SET user='plug_user' WHERE user='new_user'; UPDATE mysql.user 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 plug_dest NULL
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;
========== test 1.3 ======================================== ========== test 1.3 ========================================
...@@ -135,26 +135,26 @@ connection default; ...@@ -135,26 +135,26 @@ 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 plug_dest NULL
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.user 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 plug_dest NULL
UPDATE mysql.user SET authentication_string='new_dest' WHERE user='new_user'; UPDATE mysql.user SET 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 plug_dest NULL
UPDATE mysql.user SET plugin='new_plugin_server' WHERE user='new_user'; UPDATE mysql.user SET plugin='new_plugin_server' 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 new_plugin_server new_dest new_user new_plugin_server new_dest
plug_dest plug_dest NULL
connect(plug_user,localhost,new_user,new_dest); connect(plug_user,localhost,new_user,new_dest);
ERROR HY000: Plugin 'new_plugin_server' is not loaded ERROR HY000: Plugin 'new_plugin_server' is not loaded
UPDATE mysql.user SET plugin='test_plugin_server' WHERE user='new_user'; UPDATE mysql.user SET plugin='test_plugin_server' WHERE user='new_user';
...@@ -163,7 +163,7 @@ FLUSH PRIVILEGES; ...@@ -163,7 +163,7 @@ 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 new_dest NULL
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);
select USER(),CURRENT_USER(); select USER(),CURRENT_USER();
...@@ -176,9 +176,9 @@ FLUSH PRIVILEGES; ...@@ -176,9 +176,9 @@ 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 new_dest NULL
new_user test_plugin_server new_dest new_user test_plugin_server new_dest
plug_dest plug_dest NULL
GRANT ALL PRIVILEGES ON test.* TO new_user; GRANT ALL PRIVILEGES ON test.* TO new_user;
connect(plug_user,localhost,new_dest,new_dest_passwd); connect(plug_user,localhost,new_dest,new_dest_passwd);
select USER(),CURRENT_USER(); select USER(),CURRENT_USER();
...@@ -193,7 +193,7 @@ CREATE USER proxied_user IDENTIFIED BY 'proxied_user_passwd'; ...@@ -193,7 +193,7 @@ 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 proxied_user NULL
connect(proxy_con,localhost,proxied_user,proxied_user_passwd); connect(proxy_con,localhost,proxied_user,proxied_user_passwd);
SELECT USER(),CURRENT_USER(); SELECT USER(),CURRENT_USER();
USER() CURRENT_USER() USER() CURRENT_USER()
...@@ -230,7 +230,7 @@ CREATE USER proxied_user IDENTIFIED BY 'proxied_user_passwd'; ...@@ -230,7 +230,7 @@ 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 proxied_user NULL
connect(proxy_con,localhost,proxied_user,proxied_user_passwd); connect(proxy_con,localhost,proxied_user,proxied_user_passwd);
SELECT USER(),CURRENT_USER(); SELECT USER(),CURRENT_USER();
USER() CURRENT_USER() USER() CURRENT_USER()
...@@ -273,11 +273,11 @@ GRANT PROXY ON proxied_user_5 TO ''@''; ...@@ -273,11 +273,11 @@ 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 proxied_user_1 NULL
proxied_user_2 proxied_user_2 NULL
proxied_user_3 proxied_user_3 NULL
proxied_user_4 proxied_user_4 NULL
proxied_user_5 proxied_user_5 NULL
connect(proxy_con_1,localhost,proxied_user_1,'proxied_user_1_pwd'); connect(proxy_con_1,localhost,proxied_user_1,'proxied_user_1_pwd');
connect(proxy_con_2,localhost,proxied_user_2,proxied_user_2_pwd); connect(proxy_con_2,localhost,proxied_user_2,proxied_user_2_pwd);
connect(proxy_con_3,localhost,proxied_user_3,proxied_user_3_pwd); connect(proxy_con_3,localhost,proxied_user_3,proxied_user_3_pwd);
......
...@@ -7,7 +7,7 @@ GRANT ALL PRIVILEGES ON test_user_db.* TO qa_test_1_dest identified by 'dest_pas ...@@ -7,7 +7,7 @@ GRANT ALL PRIVILEGES ON test_user_db.* TO qa_test_1_dest identified by 'dest_pas
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 qa_test_1_dest NULL
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;
@@proxy_user @@proxy_user
...@@ -20,7 +20,7 @@ current_user() user() @@local.proxy_user @@local.external_user ...@@ -20,7 +20,7 @@ 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 qa_test_1_dest NULL
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;
DROP USER qa_test_1_dest; DROP USER qa_test_1_dest;
...@@ -33,8 +33,8 @@ GRANT PROXY ON qa_test_2_dest TO qa_test_2_user; ...@@ -33,8 +33,8 @@ 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 authenticated_as NULL
qa_test_2_dest qa_test_2_dest NULL
qa_test_2_user qa_auth_interface qa_test_2_dest qa_test_2_user qa_auth_interface qa_test_2_dest
SELECT @@proxy_user; SELECT @@proxy_user;
@@proxy_user @@proxy_user
...@@ -47,8 +47,8 @@ current_user() user() @@local.proxy_user @@local.external_user ...@@ -47,8 +47,8 @@ current_user() user() @@local.proxy_user @@local.external_user
authenticated_as@% user_name@localhost 'qa_test_2_user'@'%' 'qa_test_2_user'@'%' authenticated_as@% user_name@localhost 'qa_test_2_user'@'%' '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 authenticated_as NULL
qa_test_2_dest qa_test_2_dest NULL
qa_test_2_user qa_auth_interface qa_test_2_dest qa_test_2_user qa_auth_interface qa_test_2_dest
DROP USER qa_test_2_user; DROP USER qa_test_2_user;
DROP USER qa_test_2_dest; DROP USER qa_test_2_dest;
...@@ -83,8 +83,8 @@ GRANT PROXY ON qa_test_5_dest TO qa_test_5_user; ...@@ -83,8 +83,8 @@ 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
*DFCACE76914AD7BD801FC1A1ECF6562272621A22 NULL *DFCACE76914AD7BD801FC1A1ECF6562272621A22
qa_test_5_dest *DFCACE76914AD7BD801FC1A1ECF6562272621A22 qa_test_5_dest NULL *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 PLUGIN_AUTH_OPT -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 PLUGIN_AUTH_OPT -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)
...@@ -98,7 +98,7 @@ GRANT ALL PRIVILEGES ON test_user_db.* TO qa_test_6_dest identified by 'dest_pas ...@@ -98,7 +98,7 @@ GRANT ALL PRIVILEGES ON test_user_db.* TO qa_test_6_dest identified by 'dest_pas
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; SELECT user,plugin,authentication_string,password FROM mysql.user;
user plugin authentication_string password user plugin authentication_string password
qa_test_6_dest *DFCACE76914AD7BD801FC1A1ECF6562272621A22 qa_test_6_dest NULL *DFCACE76914AD7BD801FC1A1ECF6562272621A22
qa_test_6_user qa_auth_interface qa_test_6_dest qa_test_6_user qa_auth_interface qa_test_6_dest
root root
root root
...@@ -109,7 +109,7 @@ ERROR 1045 (28000): Access denied for user 'qa_test_6_user'@'localhost' (using p ...@@ -109,7 +109,7 @@ ERROR 1045 (28000): Access denied for user 'qa_test_6_user'@'localhost' (using p
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; SELECT user,plugin,authentication_string,password FROM mysql.user;
user plugin authentication_string password user plugin authentication_string password
qa_test_6_dest *DFCACE76914AD7BD801FC1A1ECF6562272621A22 qa_test_6_dest NULL *DFCACE76914AD7BD801FC1A1ECF6562272621A22
qa_test_6_user qa_auth_interface qa_test_6_dest qa_test_6_user qa_auth_interface qa_test_6_dest
root root
root root
...@@ -121,7 +121,7 @@ ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: Y ...@@ -121,7 +121,7 @@ ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: Y
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; SELECT user,plugin,authentication_string FROM mysql.user;
user plugin authentication_string user plugin authentication_string
qa_test_6_dest qa_test_6_dest NULL
qa_test_6_user qa_auth_interface qa_test_6_dest qa_test_6_user qa_auth_interface qa_test_6_dest
root root
root root
......
...@@ -249,8 +249,6 @@ max_updates, max_connections, max_user_connections) ...@@ -249,8 +249,6 @@ max_updates, max_connections, max_user_connections)
VALUES('%', 'mysqltest_1', password(''), 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'N', 'N', 'N', VALUES('%', 'mysqltest_1', password(''), 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'N', 'N', 'N',
'N', 'N', 'N', 'Y', 'Y', 'N', 'N', 'Y', 'Y', 'N', 'N', 'N', 'N', 'N', 'Y', 'Y', 'N', '', 'N', 'N', 'N', 'Y', 'Y', 'N', 'N', 'Y', 'Y', 'N', 'N', 'N', 'N', 'N', 'Y', 'Y', 'N', '',
'', '', '', '0', '0', '0', '0'); '', '', '', '0', '0', '0', '0');
Warnings:
Warning 1364 Field 'authentication_string' doesn't have a default value
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
CREATE PROCEDURE p1(i INT) BEGIN END; CREATE PROCEDURE p1(i INT) BEGIN END;
DROP PROCEDURE p1; DROP PROCEDURE p1;
......
...@@ -120,8 +120,8 @@ user CREATE TABLE `user` ( ...@@ -120,8 +120,8 @@ user CREATE TABLE `user` (
`max_updates` 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_connections` int(11) unsigned NOT NULL DEFAULT '0',
`max_user_connections` int(11) unsigned NOT NULL DEFAULT '0', `max_user_connections` int(11) unsigned NOT NULL DEFAULT '0',
`plugin` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', `plugin` char(64) COLLATE utf8_bin DEFAULT '',
`authentication_string` text COLLATE utf8_bin NOT NULL, `authentication_string` text COLLATE utf8_bin,
PRIMARY KEY (`Host`,`User`) PRIMARY KEY (`Host`,`User`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges' ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges'
show create table func; show create table func;
......
...@@ -479,9 +479,9 @@ def test tb1 f27 27 NULL YES int NULL NULL 10 0 NULL NULL int(10) unsigned zerof ...@@ -479,9 +479,9 @@ def test tb1 f27 27 NULL YES int NULL NULL 10 0 NULL NULL int(10) unsigned zerof
def test tb1 f28 28 NULL YES int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill def test tb1 f28 28 NULL YES int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill
def test tb1 f29 29 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) def test tb1 f29 29 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20)
def test tb1 f3 3 NULL YES char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) def test tb1 f3 3 NULL YES char 1 1 NULL NULL latin1 latin1_swedish_ci char(1)
def test tb1 f30 30 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned def test tb1 f30 30 NULL YES bigint NULL NULL 20 0 NULL NULL bigint(20) unsigned
def test tb1 f31 31 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill def test tb1 f31 31 NULL YES bigint NULL NULL 20 0 NULL NULL bigint(20) unsigned zerofill
def test tb1 f32 32 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill def test tb1 f32 32 NULL YES bigint NULL NULL 20 0 NULL NULL bigint(20) unsigned zerofill
def test tb1 f33 33 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) def test tb1 f33 33 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0)
def test tb1 f34 34 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned def test tb1 f34 34 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned
def test tb1 f35 35 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill def test tb1 f35 35 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill
...@@ -602,9 +602,9 @@ def test tb3 f143 26 99999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned ...@@ -602,9 +602,9 @@ def test tb3 f143 26 99999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned
def test tb3 f144 27 0000099999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill def test tb3 f144 27 0000099999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill
def test tb3 f145 28 0000099999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill def test tb3 f145 28 0000099999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill
def test tb3 f146 29 999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) def test tb3 f146 29 999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20)
def test tb3 f147 30 999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned def test tb3 f147 30 999999 NO bigint NULL NULL 20 0 NULL NULL bigint(20) unsigned
def test tb3 f148 31 00000000000000999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill def test tb3 f148 31 00000000000000999999 NO bigint NULL NULL 20 0 NULL NULL bigint(20) unsigned zerofill
def test tb3 f149 32 00000000000000999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill def test tb3 f149 32 00000000000000999999 NO bigint NULL NULL 20 0 NULL NULL bigint(20) unsigned zerofill
def test tb3 f150 33 1000 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) def test tb3 f150 33 1000 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0)
def test tb3 f151 34 999 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned def test tb3 f151 34 999 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned
def test tb3 f152 35 0000001000 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill def test tb3 f152 35 0000001000 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill
......
...@@ -185,7 +185,7 @@ def mysql time_zone_transition_type Time_zone_id 1 NULL NO int NULL NULL 10 0 NU ...@@ -185,7 +185,7 @@ def mysql time_zone_transition_type Time_zone_id 1 NULL NO int NULL NULL 10 0 NU
def mysql time_zone_transition_type Transition_type_id 2 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references def mysql time_zone_transition_type Transition_type_id 2 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references
def mysql user Alter_priv 17 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references def mysql user Alter_priv 17 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
def mysql user Alter_routine_priv 28 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references def mysql user Alter_routine_priv 28 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
def mysql user authentication_string 42 NULL NO text 65535 65535 NULL NULL utf8 utf8_bin text select,insert,update,references def mysql user authentication_string 42 NULL YES text 65535 65535 NULL NULL utf8 utf8_bin text select,insert,update,references
def mysql user Create_priv 8 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references def mysql user Create_priv 8 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
def mysql user Create_routine_priv 27 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references def mysql user Create_routine_priv 27 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
def mysql user Create_tablespace_priv 32 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references def mysql user Create_tablespace_priv 32 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
...@@ -207,7 +207,7 @@ def mysql user max_questions 37 0 NO int NULL NULL 10 0 NULL NULL int(11) unsign ...@@ -207,7 +207,7 @@ def mysql user max_questions 37 0 NO int NULL NULL 10 0 NULL NULL int(11) unsign
def mysql user max_updates 38 0 NO int NULL NULL 10 0 NULL NULL int(11) unsigned select,insert,update,references def mysql user max_updates 38 0 NO int NULL NULL 10 0 NULL NULL int(11) unsigned select,insert,update,references
def mysql user max_user_connections 40 0 NO int NULL NULL 10 0 NULL NULL int(11) unsigned select,insert,update,references def mysql user max_user_connections 40 0 NO int NULL NULL 10 0 NULL NULL int(11) unsigned select,insert,update,references
def mysql user Password 3 NO char 41 41 NULL NULL latin1 latin1_bin char(41) select,insert,update,references def mysql user Password 3 NO char 41 41 NULL NULL latin1 latin1_bin char(41) select,insert,update,references
def mysql user plugin 41 NO char 64 192 NULL NULL utf8 utf8_bin char(64) select,insert,update,references def mysql user plugin 41 YES char 64 192 NULL NULL utf8 utf8_bin char(64) select,insert,update,references
def mysql user Process_priv 12 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references def mysql user Process_priv 12 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
def mysql user References_priv 15 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references def mysql user References_priv 15 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
def mysql user Reload_priv 10 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references def mysql user Reload_priv 10 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
......
...@@ -97,13 +97,13 @@ def mysql host Select_priv 3 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum(' ...@@ -97,13 +97,13 @@ def mysql host Select_priv 3 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('
def mysql host Show_view_priv 16 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') def mysql host Show_view_priv 16 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y')
def mysql host Trigger_priv 20 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') def mysql host Trigger_priv 20 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y')
def mysql host Update_priv 5 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') def mysql host Update_priv 5 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y')
def mysql ndb_binlog_index deletes 6 NULL NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned def mysql ndb_binlog_index deletes 6 NULL NO bigint NULL NULL 20 0 NULL NULL bigint(20) unsigned
def mysql ndb_binlog_index epoch 3 NULL NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned PRI def mysql ndb_binlog_index epoch 3 NULL NO bigint NULL NULL 20 0 NULL NULL bigint(20) unsigned PRI
def mysql ndb_binlog_index File 2 NULL NO varchar 255 255 NULL NULL latin1 latin1_swedish_ci varchar(255) def mysql ndb_binlog_index File 2 NULL NO varchar 255 255 NULL NULL latin1 latin1_swedish_ci varchar(255)
def mysql ndb_binlog_index inserts 4 NULL NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned def mysql ndb_binlog_index inserts 4 NULL NO bigint NULL NULL 20 0 NULL NULL bigint(20) unsigned
def mysql ndb_binlog_index Position 1 NULL NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned def mysql ndb_binlog_index Position 1 NULL NO bigint NULL NULL 20 0 NULL NULL bigint(20) unsigned
def mysql ndb_binlog_index schemaops 7 NULL NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned def mysql ndb_binlog_index schemaops 7 NULL NO bigint NULL NULL 20 0 NULL NULL bigint(20) unsigned
def mysql ndb_binlog_index updates 5 NULL NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned def mysql ndb_binlog_index updates 5 NULL NO bigint NULL NULL 20 0 NULL NULL bigint(20) unsigned
def mysql plugin dl 2 NO varchar 128 384 NULL NULL utf8 utf8_general_ci varchar(128) def mysql plugin dl 2 NO varchar 128 384 NULL NULL utf8 utf8_general_ci varchar(128)
def mysql plugin name 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) PRI def mysql plugin name 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) PRI
def mysql proc body 11 NULL NO longblob 4294967295 4294967295 NULL NULL NULL NULL longblob def mysql proc body 11 NULL NO longblob 4294967295 4294967295 NULL NULL NULL NULL longblob
...@@ -134,6 +134,13 @@ def mysql procs_priv Routine_name 4 NO char 64 192 NULL NULL utf8 utf8_general_ ...@@ -134,6 +134,13 @@ def mysql procs_priv Routine_name 4 NO char 64 192 NULL NULL utf8 utf8_general_
def mysql procs_priv Routine_type 5 NULL NO enum 9 27 NULL NULL utf8 utf8_bin enum('FUNCTION','PROCEDURE') PRI def mysql procs_priv Routine_type 5 NULL NO enum 9 27 NULL NULL utf8 utf8_bin enum('FUNCTION','PROCEDURE') PRI
def mysql procs_priv Timestamp 8 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP def mysql procs_priv Timestamp 8 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP
def mysql procs_priv User 3 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI def mysql procs_priv User 3 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI
def mysql proxies_priv Grantor 6 NO char 77 231 NULL NULL utf8 utf8_bin char(77) MUL
def mysql proxies_priv Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI
def mysql proxies_priv Proxied_host 3 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI
def mysql proxies_priv Proxied_user 4 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI
def mysql proxies_priv Timestamp 7 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP
def mysql proxies_priv User 2 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI
def mysql proxies_priv With_grant 5 0 NO tinyint NULL NULL 3 0 NULL NULL tinyint(1)
def mysql servers Db 3 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) def mysql servers Db 3 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64)
def mysql servers Host 2 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) def mysql servers Host 2 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64)
def mysql servers Owner 9 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) def mysql servers Owner 9 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64)
...@@ -178,6 +185,7 @@ def mysql time_zone_transition_type Time_zone_id 1 NULL NO int NULL NULL 10 0 NU ...@@ -178,6 +185,7 @@ def mysql time_zone_transition_type Time_zone_id 1 NULL NO int NULL NULL 10 0 NU
def mysql time_zone_transition_type Transition_type_id 2 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI def mysql time_zone_transition_type Transition_type_id 2 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI
def mysql user Alter_priv 17 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') def mysql user Alter_priv 17 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y')
def mysql user Alter_routine_priv 28 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') def mysql user Alter_routine_priv 28 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y')
def mysql user authentication_string 42 NULL NO text 65535 65535 NULL NULL utf8 utf8_bin text
def mysql user Create_priv 8 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') def mysql user Create_priv 8 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y')
def mysql user Create_routine_priv 27 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') def mysql user Create_routine_priv 27 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y')
def mysql user Create_tablespace_priv 32 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') def mysql user Create_tablespace_priv 32 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y')
...@@ -199,6 +207,7 @@ def mysql user max_questions 37 0 NO int NULL NULL 10 0 NULL NULL int(11) unsign ...@@ -199,6 +207,7 @@ def mysql user max_questions 37 0 NO int NULL NULL 10 0 NULL NULL int(11) unsign
def mysql user max_updates 38 0 NO int NULL NULL 10 0 NULL NULL int(11) unsigned def mysql user max_updates 38 0 NO int NULL NULL 10 0 NULL NULL int(11) unsigned
def mysql user max_user_connections 40 0 NO int NULL NULL 10 0 NULL NULL int(11) unsigned def mysql user max_user_connections 40 0 NO int NULL NULL 10 0 NULL NULL int(11) unsigned
def mysql user Password 3 NO char 41 41 NULL NULL latin1 latin1_bin char(41) def mysql user Password 3 NO char 41 41 NULL NULL latin1 latin1_bin char(41)
def mysql user plugin 41 NO char 64 192 NULL NULL utf8 utf8_bin char(64)
def mysql user Process_priv 12 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') def mysql user Process_priv 12 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y')
def mysql user References_priv 15 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') def mysql user References_priv 15 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y')
def mysql user Reload_priv 10 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') def mysql user Reload_priv 10 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y')
...@@ -418,6 +427,13 @@ NULL mysql proc modified timestamp NULL NULL NULL NULL timestamp ...@@ -418,6 +427,13 @@ NULL mysql proc modified timestamp NULL NULL NULL NULL timestamp
3.0000 mysql procs_priv Grantor char 77 231 utf8 utf8_bin char(77) 3.0000 mysql procs_priv Grantor char 77 231 utf8 utf8_bin char(77)
3.0000 mysql procs_priv Proc_priv set 27 81 utf8 utf8_general_ci set('Execute','Alter Routine','Grant') 3.0000 mysql procs_priv Proc_priv set 27 81 utf8 utf8_general_ci set('Execute','Alter Routine','Grant')
NULL mysql procs_priv Timestamp timestamp NULL NULL NULL NULL timestamp NULL mysql procs_priv Timestamp timestamp NULL NULL NULL NULL timestamp
3.0000 mysql proxies_priv Host char 60 180 utf8 utf8_bin char(60)
3.0000 mysql proxies_priv User char 16 48 utf8 utf8_bin char(16)
3.0000 mysql proxies_priv Proxied_host char 60 180 utf8 utf8_bin char(60)
3.0000 mysql proxies_priv Proxied_user char 16 48 utf8 utf8_bin char(16)
NULL mysql proxies_priv With_grant tinyint NULL NULL NULL NULL tinyint(1)
3.0000 mysql proxies_priv Grantor char 77 231 utf8 utf8_bin char(77)
NULL mysql proxies_priv Timestamp timestamp NULL NULL NULL NULL timestamp
3.0000 mysql servers Server_name char 64 192 utf8 utf8_general_ci char(64) 3.0000 mysql servers Server_name char 64 192 utf8 utf8_general_ci char(64)
3.0000 mysql servers Host char 64 192 utf8 utf8_general_ci char(64) 3.0000 mysql servers Host char 64 192 utf8 utf8_general_ci char(64)
3.0000 mysql servers Db char 64 192 utf8 utf8_general_ci char(64) 3.0000 mysql servers Db char 64 192 utf8 utf8_general_ci char(64)
...@@ -500,3 +516,5 @@ NULL mysql user max_questions int NULL NULL NULL NULL int(11) unsigned ...@@ -500,3 +516,5 @@ NULL mysql user max_questions int NULL NULL NULL NULL int(11) unsigned
NULL mysql user max_updates int NULL NULL NULL NULL int(11) unsigned NULL mysql user max_updates int NULL NULL NULL NULL int(11) unsigned
NULL mysql user max_connections int NULL NULL NULL NULL int(11) unsigned NULL mysql user max_connections int NULL NULL NULL NULL int(11) unsigned
NULL mysql user max_user_connections int NULL NULL NULL NULL int(11) unsigned NULL mysql user max_user_connections int NULL NULL NULL NULL int(11) unsigned
3.0000 mysql user plugin char 64 192 utf8 utf8_bin char(64)
1.0000 mysql user authentication_string text 65535 65535 utf8 utf8_bin text
...@@ -6,7 +6,7 @@ GRANT SELECT ON db_datadict.* TO testuser1@localhost; ...@@ -6,7 +6,7 @@ GRANT SELECT ON db_datadict.* TO testuser1@localhost;
SELECT * FROM information_schema.statistics SELECT * FROM information_schema.statistics
WHERE table_schema = 'mysql' WHERE table_schema = 'mysql'
ORDER BY table_schema, table_name, index_name, seq_in_index, column_name; ORDER BY table_schema, table_name, index_name, seq_in_index, column_name;
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT INDEX_COMMENT
def mysql columns_priv 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE def mysql columns_priv 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE
def mysql columns_priv 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE def mysql columns_priv 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE
def mysql columns_priv 0 mysql PRIMARY 3 User A #CARD# NULL NULL BTREE def mysql columns_priv 0 mysql PRIMARY 3 User A #CARD# NULL NULL BTREE
...@@ -40,6 +40,11 @@ def mysql procs_priv 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE ...@@ -40,6 +40,11 @@ def mysql procs_priv 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE
def mysql procs_priv 0 mysql PRIMARY 3 User A #CARD# NULL NULL BTREE def mysql procs_priv 0 mysql PRIMARY 3 User A #CARD# NULL NULL BTREE
def mysql procs_priv 0 mysql PRIMARY 4 Routine_name A #CARD# NULL NULL BTREE def mysql procs_priv 0 mysql PRIMARY 4 Routine_name A #CARD# NULL NULL BTREE
def mysql procs_priv 0 mysql PRIMARY 5 Routine_type A #CARD# NULL NULL BTREE def mysql procs_priv 0 mysql PRIMARY 5 Routine_type A #CARD# NULL NULL BTREE
def mysql proxies_priv 1 mysql Grantor 1 Grantor A #CARD# NULL NULL BTREE
def mysql proxies_priv 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE
def mysql proxies_priv 0 mysql PRIMARY 2 User A #CARD# NULL NULL BTREE
def mysql proxies_priv 0 mysql PRIMARY 3 Proxied_host A #CARD# NULL NULL BTREE
def mysql proxies_priv 0 mysql PRIMARY 4 Proxied_user A #CARD# NULL NULL BTREE
def mysql servers 0 mysql PRIMARY 1 Server_name A #CARD# NULL NULL BTREE def mysql servers 0 mysql PRIMARY 1 Server_name A #CARD# NULL NULL BTREE
def mysql tables_priv 1 mysql Grantor 1 Grantor A #CARD# NULL NULL BTREE def mysql tables_priv 1 mysql Grantor 1 Grantor A #CARD# NULL NULL BTREE
def mysql tables_priv 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE def mysql tables_priv 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE
...@@ -59,7 +64,7 @@ def mysql user 0 mysql PRIMARY 2 User A #CARD# NULL NULL BTREE ...@@ -59,7 +64,7 @@ def mysql user 0 mysql PRIMARY 2 User A #CARD# NULL NULL BTREE
SELECT * FROM information_schema.statistics SELECT * FROM information_schema.statistics
WHERE table_schema = 'mysql' WHERE table_schema = 'mysql'
ORDER BY table_schema, table_name, index_name, seq_in_index, column_name; ORDER BY table_schema, table_name, index_name, seq_in_index, column_name;
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT INDEX_COMMENT
def mysql columns_priv 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE def mysql columns_priv 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE
def mysql columns_priv 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE def mysql columns_priv 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE
def mysql columns_priv 0 mysql PRIMARY 3 User A #CARD# NULL NULL BTREE def mysql columns_priv 0 mysql PRIMARY 3 User A #CARD# NULL NULL BTREE
...@@ -93,6 +98,11 @@ def mysql procs_priv 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE ...@@ -93,6 +98,11 @@ def mysql procs_priv 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE
def mysql procs_priv 0 mysql PRIMARY 3 User A #CARD# NULL NULL BTREE def mysql procs_priv 0 mysql PRIMARY 3 User A #CARD# NULL NULL BTREE
def mysql procs_priv 0 mysql PRIMARY 4 Routine_name A #CARD# NULL NULL BTREE def mysql procs_priv 0 mysql PRIMARY 4 Routine_name A #CARD# NULL NULL BTREE
def mysql procs_priv 0 mysql PRIMARY 5 Routine_type A #CARD# NULL NULL BTREE def mysql procs_priv 0 mysql PRIMARY 5 Routine_type A #CARD# NULL NULL BTREE
def mysql proxies_priv 1 mysql Grantor 1 Grantor A #CARD# NULL NULL BTREE
def mysql proxies_priv 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE
def mysql proxies_priv 0 mysql PRIMARY 2 User A #CARD# NULL NULL BTREE
def mysql proxies_priv 0 mysql PRIMARY 3 Proxied_host A #CARD# NULL NULL BTREE
def mysql proxies_priv 0 mysql PRIMARY 4 Proxied_user A #CARD# NULL NULL BTREE
def mysql servers 0 mysql PRIMARY 1 Server_name A #CARD# NULL NULL BTREE def mysql servers 0 mysql PRIMARY 1 Server_name A #CARD# NULL NULL BTREE
def mysql tables_priv 1 mysql Grantor 1 Grantor A #CARD# NULL NULL BTREE def mysql tables_priv 1 mysql Grantor 1 Grantor A #CARD# NULL NULL BTREE
def mysql tables_priv 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE def mysql tables_priv 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE
......
...@@ -23,6 +23,7 @@ def mysql PRIMARY mysql ndb_binlog_index PRIMARY KEY ...@@ -23,6 +23,7 @@ def mysql PRIMARY mysql ndb_binlog_index PRIMARY KEY
def mysql PRIMARY mysql plugin PRIMARY KEY def mysql PRIMARY mysql plugin PRIMARY KEY
def mysql PRIMARY mysql proc PRIMARY KEY def mysql PRIMARY mysql proc PRIMARY KEY
def mysql PRIMARY mysql procs_priv PRIMARY KEY def mysql PRIMARY mysql procs_priv PRIMARY KEY
def mysql PRIMARY mysql proxies_priv PRIMARY KEY
def mysql PRIMARY mysql servers PRIMARY KEY def mysql PRIMARY mysql servers PRIMARY KEY
def mysql PRIMARY mysql tables_priv PRIMARY KEY def mysql PRIMARY mysql tables_priv PRIMARY KEY
def mysql PRIMARY mysql time_zone PRIMARY KEY def mysql PRIMARY mysql time_zone PRIMARY KEY
...@@ -52,6 +53,7 @@ def mysql PRIMARY mysql ndb_binlog_index PRIMARY KEY ...@@ -52,6 +53,7 @@ def mysql PRIMARY mysql ndb_binlog_index PRIMARY KEY
def mysql PRIMARY mysql plugin PRIMARY KEY def mysql PRIMARY mysql plugin PRIMARY KEY
def mysql PRIMARY mysql proc PRIMARY KEY def mysql PRIMARY mysql proc PRIMARY KEY
def mysql PRIMARY mysql procs_priv PRIMARY KEY def mysql PRIMARY mysql procs_priv PRIMARY KEY
def mysql PRIMARY mysql proxies_priv PRIMARY KEY
def mysql PRIMARY mysql servers PRIMARY KEY def mysql PRIMARY mysql servers PRIMARY KEY
def mysql PRIMARY mysql tables_priv PRIMARY KEY def mysql PRIMARY mysql tables_priv PRIMARY KEY
def mysql PRIMARY mysql time_zone PRIMARY KEY def mysql PRIMARY mysql time_zone PRIMARY KEY
......
...@@ -336,6 +336,29 @@ user_comment Procedure privileges ...@@ -336,6 +336,29 @@ user_comment Procedure privileges
Separator ----------------------------------------------------- Separator -----------------------------------------------------
TABLE_CATALOG def TABLE_CATALOG def
TABLE_SCHEMA mysql TABLE_SCHEMA mysql
TABLE_NAME proxies_priv
TABLE_TYPE BASE TABLE
ENGINE MyISAM
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
MAX_DATA_LENGTH #MDL#
INDEX_LENGTH #IL#
DATA_FREE #DF#
AUTO_INCREMENT NULL
CREATE_TIME #CRT#
UPDATE_TIME #UT#
CHECK_TIME #CT#
TABLE_COLLATION utf8_bin
CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
user_comment User proxy privileges
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA mysql
TABLE_NAME servers TABLE_NAME servers
TABLE_TYPE BASE TABLE TABLE_TYPE BASE TABLE
ENGINE MyISAM ENGINE MyISAM
...@@ -881,6 +904,29 @@ user_comment Procedure privileges ...@@ -881,6 +904,29 @@ user_comment Procedure privileges
Separator ----------------------------------------------------- Separator -----------------------------------------------------
TABLE_CATALOG def TABLE_CATALOG def
TABLE_SCHEMA mysql TABLE_SCHEMA mysql
TABLE_NAME proxies_priv
TABLE_TYPE BASE TABLE
ENGINE MyISAM
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
MAX_DATA_LENGTH #MDL#
INDEX_LENGTH #IL#
DATA_FREE #DF#
AUTO_INCREMENT NULL
CREATE_TIME #CRT#
UPDATE_TIME #UT#
CHECK_TIME #CT#
TABLE_COLLATION utf8_bin
CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
user_comment User proxy privileges
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA mysql
TABLE_NAME servers TABLE_NAME servers
TABLE_TYPE BASE TABLE TABLE_TYPE BASE TABLE
ENGINE MyISAM ENGINE MyISAM
......
...@@ -128,7 +128,7 @@ max_updates 0 ...@@ -128,7 +128,7 @@ max_updates 0
max_connections 0 max_connections 0
max_user_connections 0 max_user_connections 0
plugin plugin
authentication_string authentication_string NULL
Host localhost Host localhost
User testuser2 User testuser2
Password Password
...@@ -170,7 +170,7 @@ max_updates 0 ...@@ -170,7 +170,7 @@ max_updates 0
max_connections 0 max_connections 0
max_user_connections 0 max_user_connections 0
plugin plugin
authentication_string authentication_string NULL
Host localhost Host localhost
User testuser3 User testuser3
Password Password
...@@ -212,7 +212,7 @@ max_updates 0 ...@@ -212,7 +212,7 @@ max_updates 0
max_connections 0 max_connections 0
max_user_connections 0 max_user_connections 0
plugin plugin
authentication_string authentication_string NULL
# #
# Add GRANT OPTION db_datadict.* to testuser1; # Add GRANT OPTION db_datadict.* to testuser1;
GRANT UPDATE ON db_datadict.* TO 'testuser1'@'localhost' WITH GRANT OPTION; GRANT UPDATE ON db_datadict.* TO 'testuser1'@'localhost' WITH GRANT OPTION;
...@@ -278,7 +278,7 @@ max_updates 0 ...@@ -278,7 +278,7 @@ max_updates 0
max_connections 0 max_connections 0
max_user_connections 0 max_user_connections 0
plugin plugin
authentication_string authentication_string NULL
Host localhost Host localhost
User testuser2 User testuser2
Password Password
...@@ -320,7 +320,7 @@ max_updates 0 ...@@ -320,7 +320,7 @@ max_updates 0
max_connections 0 max_connections 0
max_user_connections 0 max_user_connections 0
plugin plugin
authentication_string authentication_string NULL
Host localhost Host localhost
User testuser3 User testuser3
Password Password
...@@ -362,7 +362,7 @@ max_updates 0 ...@@ -362,7 +362,7 @@ max_updates 0
max_connections 0 max_connections 0
max_user_connections 0 max_user_connections 0
plugin plugin
authentication_string authentication_string NULL
# Establish connection testuser1 (user=testuser1) # Establish connection testuser1 (user=testuser1)
SELECT * FROM information_schema.user_privileges SELECT * FROM information_schema.user_privileges
WHERE grantee LIKE '''testuser%''' WHERE grantee LIKE '''testuser%'''
...@@ -414,7 +414,7 @@ max_updates 0 ...@@ -414,7 +414,7 @@ max_updates 0
max_connections 0 max_connections 0
max_user_connections 0 max_user_connections 0
plugin plugin
authentication_string authentication_string NULL
Host localhost Host localhost
User testuser2 User testuser2
Password Password
...@@ -456,7 +456,7 @@ max_updates 0 ...@@ -456,7 +456,7 @@ max_updates 0
max_connections 0 max_connections 0
max_user_connections 0 max_user_connections 0
plugin plugin
authentication_string authentication_string NULL
Host localhost Host localhost
User testuser3 User testuser3
Password Password
...@@ -498,7 +498,7 @@ max_updates 0 ...@@ -498,7 +498,7 @@ max_updates 0
max_connections 0 max_connections 0
max_user_connections 0 max_user_connections 0
plugin plugin
authentication_string authentication_string NULL
SHOW GRANTS; SHOW GRANTS;
Grants for testuser1@localhost Grants for testuser1@localhost
GRANT USAGE ON *.* TO 'testuser1'@'localhost' GRANT USAGE ON *.* TO 'testuser1'@'localhost'
...@@ -572,7 +572,7 @@ max_updates 0 ...@@ -572,7 +572,7 @@ max_updates 0
max_connections 0 max_connections 0
max_user_connections 0 max_user_connections 0
plugin plugin
authentication_string authentication_string NULL
Host localhost Host localhost
User testuser2 User testuser2
Password Password
...@@ -614,7 +614,7 @@ max_updates 0 ...@@ -614,7 +614,7 @@ max_updates 0
max_connections 0 max_connections 0
max_user_connections 0 max_user_connections 0
plugin plugin
authentication_string authentication_string NULL
Host localhost Host localhost
User testuser3 User testuser3
Password Password
...@@ -656,7 +656,7 @@ max_updates 0 ...@@ -656,7 +656,7 @@ max_updates 0
max_connections 0 max_connections 0
max_user_connections 0 max_user_connections 0
plugin plugin
authentication_string authentication_string NULL
GRANT SELECT ON *.* TO 'testuser1'@'localhost' WITH GRANT OPTION; GRANT SELECT ON *.* TO 'testuser1'@'localhost' WITH GRANT OPTION;
# #
# Here <SELECT YES> is shown correctly for testuser1; # Here <SELECT YES> is shown correctly for testuser1;
...@@ -722,7 +722,7 @@ max_updates 0 ...@@ -722,7 +722,7 @@ max_updates 0
max_connections 0 max_connections 0
max_user_connections 0 max_user_connections 0
plugin plugin
authentication_string authentication_string NULL
Host localhost Host localhost
User testuser2 User testuser2
Password Password
...@@ -764,7 +764,7 @@ max_updates 0 ...@@ -764,7 +764,7 @@ max_updates 0
max_connections 0 max_connections 0
max_user_connections 0 max_user_connections 0
plugin plugin
authentication_string authentication_string NULL
Host localhost Host localhost
User testuser3 User testuser3
Password Password
...@@ -806,7 +806,7 @@ max_updates 0 ...@@ -806,7 +806,7 @@ max_updates 0
max_connections 0 max_connections 0
max_user_connections 0 max_user_connections 0
plugin plugin
authentication_string authentication_string NULL
# Switch to connection testuser1 # Switch to connection testuser1
SELECT * FROM information_schema.user_privileges SELECT * FROM information_schema.user_privileges
WHERE grantee LIKE '''testuser%''' WHERE grantee LIKE '''testuser%'''
...@@ -858,7 +858,7 @@ max_updates 0 ...@@ -858,7 +858,7 @@ max_updates 0
max_connections 0 max_connections 0
max_user_connections 0 max_user_connections 0
plugin plugin
authentication_string authentication_string NULL
Host localhost Host localhost
User testuser2 User testuser2
Password Password
...@@ -900,7 +900,7 @@ max_updates 0 ...@@ -900,7 +900,7 @@ max_updates 0
max_connections 0 max_connections 0
max_user_connections 0 max_user_connections 0
plugin plugin
authentication_string authentication_string NULL
Host localhost Host localhost
User testuser3 User testuser3
Password Password
...@@ -942,7 +942,7 @@ max_updates 0 ...@@ -942,7 +942,7 @@ max_updates 0
max_connections 0 max_connections 0
max_user_connections 0 max_user_connections 0
plugin plugin
authentication_string authentication_string NULL
SHOW GRANTS; SHOW GRANTS;
Grants for testuser1@localhost Grants for testuser1@localhost
GRANT SELECT ON *.* TO 'testuser1'@'localhost' WITH GRANT OPTION GRANT SELECT ON *.* TO 'testuser1'@'localhost' WITH GRANT OPTION
...@@ -1046,7 +1046,7 @@ max_updates 0 ...@@ -1046,7 +1046,7 @@ max_updates 0
max_connections 0 max_connections 0
max_user_connections 0 max_user_connections 0
plugin plugin
authentication_string authentication_string NULL
Host localhost Host localhost
User testuser2 User testuser2
Password Password
...@@ -1088,7 +1088,7 @@ max_updates 0 ...@@ -1088,7 +1088,7 @@ max_updates 0
max_connections 0 max_connections 0
max_user_connections 0 max_user_connections 0
plugin plugin
authentication_string authentication_string NULL
Host localhost Host localhost
User testuser3 User testuser3
Password Password
...@@ -1130,7 +1130,7 @@ max_updates 0 ...@@ -1130,7 +1130,7 @@ max_updates 0
max_connections 0 max_connections 0
max_user_connections 0 max_user_connections 0
plugin plugin
authentication_string authentication_string NULL
# Switch to connection testuser1 # Switch to connection testuser1
SELECT * FROM information_schema.user_privileges SELECT * FROM information_schema.user_privileges
WHERE grantee LIKE '''testuser%''' WHERE grantee LIKE '''testuser%'''
...@@ -1229,7 +1229,7 @@ max_updates 0 ...@@ -1229,7 +1229,7 @@ max_updates 0
max_connections 0 max_connections 0
max_user_connections 0 max_user_connections 0
plugin plugin
authentication_string authentication_string NULL
Host localhost Host localhost
User testuser2 User testuser2
Password Password
...@@ -1271,7 +1271,7 @@ max_updates 0 ...@@ -1271,7 +1271,7 @@ max_updates 0
max_connections 0 max_connections 0
max_user_connections 0 max_user_connections 0
plugin plugin
authentication_string authentication_string NULL
Host localhost Host localhost
User testuser3 User testuser3
Password Password
...@@ -1313,7 +1313,7 @@ max_updates 0 ...@@ -1313,7 +1313,7 @@ max_updates 0
max_connections 0 max_connections 0
max_user_connections 0 max_user_connections 0
plugin plugin
authentication_string authentication_string NULL
# Switch to connection testuser1 # Switch to connection testuser1
SELECT * FROM information_schema.user_privileges SELECT * FROM information_schema.user_privileges
WHERE grantee LIKE '''testuser%''' WHERE grantee LIKE '''testuser%'''
...@@ -1365,7 +1365,7 @@ max_updates 0 ...@@ -1365,7 +1365,7 @@ max_updates 0
max_connections 0 max_connections 0
max_user_connections 0 max_user_connections 0
plugin plugin
authentication_string authentication_string NULL
Host localhost Host localhost
User testuser2 User testuser2
Password Password
...@@ -1407,7 +1407,7 @@ max_updates 0 ...@@ -1407,7 +1407,7 @@ max_updates 0
max_connections 0 max_connections 0
max_user_connections 0 max_user_connections 0
plugin plugin
authentication_string authentication_string NULL
Host localhost Host localhost
User testuser3 User testuser3
Password Password
...@@ -1449,7 +1449,7 @@ max_updates 0 ...@@ -1449,7 +1449,7 @@ max_updates 0
max_connections 0 max_connections 0
max_user_connections 0 max_user_connections 0
plugin plugin
authentication_string authentication_string NULL
SHOW GRANTS; SHOW GRANTS;
Grants for testuser1@localhost Grants for testuser1@localhost
GRANT USAGE ON *.* TO 'testuser1'@'localhost' GRANT USAGE ON *.* TO 'testuser1'@'localhost'
...@@ -1508,7 +1508,7 @@ max_updates 0 ...@@ -1508,7 +1508,7 @@ max_updates 0
max_connections 0 max_connections 0
max_user_connections 0 max_user_connections 0
plugin plugin
authentication_string authentication_string NULL
Host localhost Host localhost
User testuser2 User testuser2
Password Password
...@@ -1550,7 +1550,7 @@ max_updates 0 ...@@ -1550,7 +1550,7 @@ max_updates 0
max_connections 0 max_connections 0
max_user_connections 0 max_user_connections 0
plugin plugin
authentication_string authentication_string NULL
Host localhost Host localhost
User testuser3 User testuser3
Password Password
...@@ -1592,7 +1592,7 @@ max_updates 0 ...@@ -1592,7 +1592,7 @@ max_updates 0
max_connections 0 max_connections 0
max_user_connections 0 max_user_connections 0
plugin plugin
authentication_string authentication_string NULL
SHOW GRANTS; SHOW GRANTS;
Grants for testuser1@localhost Grants for testuser1@localhost
GRANT USAGE ON *.* TO 'testuser1'@'localhost' GRANT USAGE ON *.* TO 'testuser1'@'localhost'
...@@ -1666,7 +1666,7 @@ max_updates 0 ...@@ -1666,7 +1666,7 @@ max_updates 0
max_connections 0 max_connections 0
max_user_connections 0 max_user_connections 0
plugin plugin
authentication_string authentication_string NULL
Host localhost Host localhost
User testuser2 User testuser2
Password Password
...@@ -1708,7 +1708,7 @@ max_updates 0 ...@@ -1708,7 +1708,7 @@ max_updates 0
max_connections 0 max_connections 0
max_user_connections 0 max_user_connections 0
plugin plugin
authentication_string authentication_string NULL
Host localhost Host localhost
User testuser3 User testuser3
Password Password
...@@ -1750,7 +1750,7 @@ max_updates 0 ...@@ -1750,7 +1750,7 @@ max_updates 0
max_connections 0 max_connections 0
max_user_connections 0 max_user_connections 0
plugin plugin
authentication_string authentication_string NULL
# Switch to connection testuser1 # Switch to connection testuser1
SELECT * FROM information_schema.user_privileges SELECT * FROM information_schema.user_privileges
WHERE grantee LIKE '''testuser%''' WHERE grantee LIKE '''testuser%'''
......
stop slave; include/master-slave.inc
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; [connection master]
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
set @save_general_log = @@global.general_log; set @save_general_log = @@global.general_log;
set @save_log_output = @@global.log_output; set @save_log_output = @@global.log_output;
set @save_slave_net_timeout = @@global.slave_net_timeout; set @save_slave_net_timeout = @@global.slave_net_timeout;
set @@global.general_log = ON; set @@global.general_log = ON;
set @@global.log_output = 'table,file'; set @@global.log_output = 'table,file';
include/stop_slave.inc include/stop_slave.inc
set @@global.slave_net_timeout = @@global.net_read_timeout * 2;
change master to master_host = '127.0.0.1',master_port = MASTER_PORT, change master to master_host = '127.0.0.1',master_port = MASTER_PORT,
master_user = 'root', master_heartbeat_period = 0; master_user = 'root', master_heartbeat_period = 0;
set @@global.slave_net_timeout = @@global.net_read_timeout * 2;
include/start_slave.inc include/start_slave.inc
include/stop_slave.inc include/stop_slave.inc
select event_time from (select event_time from mysql.general_log as t_1 where command_type like 'Connect' order by event_time desc limit 2) as t_2 order by event_time desc limit 1 into @ts_last; select event_time from (select event_time from mysql.general_log as t_1 where command_type like 'Connect' order by event_time desc limit 2) as t_2 order by event_time desc limit 1 into @ts_last;
select event_time from (select event_time from mysql.general_log as t_1 where command_type like 'Connect' order by event_time desc limit 2) as t_2 order by event_time asc limit 1 into @ts_prev; select event_time from (select event_time from mysql.general_log as t_1 where command_type like 'Connect' order by event_time desc limit 2) as t_2 order by event_time asc limit 1 into @ts_prev;
select @result as 'Must be 1'; include/assert.inc [time between last reconnection and the reconnection before that should be >= slave_net_timeout]
Must be 1
1
set @@global.general_log = @save_general_log; set @@global.general_log = @save_general_log;
set @@global.log_output = @save_log_output; set @@global.log_output = @save_log_output;
set @@global.slave_net_timeout = @save_slave_net_timeout; set @@global.slave_net_timeout = @save_slave_net_timeout;
include/rpl_end.inc
...@@ -21,11 +21,6 @@ set @@global.log_output = 'table,file'; ...@@ -21,11 +21,6 @@ set @@global.log_output = 'table,file';
connection slave; connection slave;
--source include/stop_slave.inc --source include/stop_slave.inc
--disable_warnings
set @@global.slave_net_timeout = @@global.net_read_timeout * 2;
--enable_warnings
let $idle_time=`select @@global.slave_net_timeout * 2`;
# #
# if heartbeat is disabled then reconnecting to the idle master # if heartbeat is disabled then reconnecting to the idle master
# should happen with `slave_net_timeout' period. # should happen with `slave_net_timeout' period.
...@@ -42,6 +37,9 @@ let $idle_time=`select @@global.slave_net_timeout * 2`; ...@@ -42,6 +37,9 @@ let $idle_time=`select @@global.slave_net_timeout * 2`;
eval change master to master_host = '127.0.0.1',master_port = $MASTER_MYPORT, eval change master to master_host = '127.0.0.1',master_port = $MASTER_MYPORT,
master_user = 'root', master_heartbeat_period = 0; master_user = 'root', master_heartbeat_period = 0;
set @@global.slave_net_timeout = @@global.net_read_timeout * 2;
let $idle_time=`select @@global.slave_net_timeout * 2`;
let $slave_net_timeout = `select @@global.slave_net_timeout`; let $slave_net_timeout = `select @@global.slave_net_timeout`;
--source include/start_slave.inc --source include/start_slave.inc
...@@ -64,11 +62,9 @@ connection master; ...@@ -64,11 +62,9 @@ connection master;
select event_time from (select event_time from mysql.general_log as t_1 where command_type like 'Connect' order by event_time desc limit 2) as t_2 order by event_time desc limit 1 into @ts_last; select event_time from (select event_time from mysql.general_log as t_1 where command_type like 'Connect' order by event_time desc limit 2) as t_2 order by event_time desc limit 1 into @ts_last;
select event_time from (select event_time from mysql.general_log as t_1 where command_type like 'Connect' order by event_time desc limit 2) as t_2 order by event_time asc limit 1 into @ts_prev; select event_time from (select event_time from mysql.general_log as t_1 where command_type like 'Connect' order by event_time desc limit 2) as t_2 order by event_time asc limit 1 into @ts_prev;
--disable_query_log --let $assert_cond= time_to_sec(@ts_last) - time_to_sec(@ts_prev) >= $slave_net_timeout
eval select time_to_sec(@ts_last) - $slave_net_timeout >= time_to_sec(@ts_prev) into @result; --let $assert_text= time between last reconnection and the reconnection before that should be >= slave_net_timeout
--enable_query_log --source include/assert.inc
select @result as 'Must be 1';
# cleanup # cleanup
...@@ -79,4 +75,5 @@ set @@global.log_output = @save_log_output; ...@@ -79,4 +75,5 @@ set @@global.log_output = @save_log_output;
connection slave; connection slave;
set @@global.slave_net_timeout = @save_slave_net_timeout; set @@global.slave_net_timeout = @save_slave_net_timeout;
--let $rpl_only_running_threads= 1
--source include/rpl_end.inc --source include/rpl_end.inc
...@@ -5,7 +5,7 @@ include/rpl_init.inc [topology=1->2->3->4->1] ...@@ -5,7 +5,7 @@ include/rpl_init.inc [topology=1->2->3->4->1]
CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT, b VARCHAR(100), c INT NOT NULL, PRIMARY KEY(a)) ENGINE=MyISAM; CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT, b VARCHAR(100), c INT NOT NULL, PRIMARY KEY(a)) ENGINE=MyISAM;
CREATE TABLE t2 (a INT NOT NULL AUTO_INCREMENT, b VARCHAR(100), c INT NOT NULL, PRIMARY KEY(a)) ENGINE=InnoDB; CREATE TABLE t2 (a INT NOT NULL AUTO_INCREMENT, b VARCHAR(100), c INT NOT NULL, PRIMARY KEY(a)) ENGINE=InnoDB;
include/rpl_sync.inc include/rpl_sync.inc
call mtr.add_suppression("Slave SQL.*slave SQL thread is being stopped in the middle of applying of a group having updated a non-transaction table"); call mtr.add_suppression("Slave SQL.*Request to stop slave SQL Thread received while applying a group that has non-transactional changes; waiting for completion of the group");
*** Testing schema A->B->C->D->A *** *** Testing schema A->B->C->D->A ***
......
...@@ -207,7 +207,7 @@ CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(10), c LONGTEXT); ...@@ -207,7 +207,7 @@ CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(10), c LONGTEXT);
INSERT INTO t1 VALUES (1, 'on slave', NULL); INSERT INTO t1 VALUES (1, 'on slave', NULL);
INSERT INTO t1 VALUES (1, 'on master', NULL); INSERT INTO t1 VALUES (1, 'on master', NULL);
call mtr.add_suppression("Slave SQL.*Duplicate entry .1. for key .PRIMARY.. on query.* Error_code: 1062"); call mtr.add_suppression("Slave SQL.*Duplicate entry .1. for key .PRIMARY.. on query.* Error_code: 1062");
call mtr.add_suppression("Slave SQL.*slave SQL thread is being stopped in the middle of applying of a group having updated a non-transaction table"); call mtr.add_suppression("Slave SQL.*Request to stop slave SQL Thread received while applying a group that has non-transactional changes; waiting for completion of the group");
Heartbeat events are received while sql thread stopped (1 means 'yes'): 1 Heartbeat events are received while sql thread stopped (1 means 'yes'): 1
include/stop_slave.inc include/stop_slave.inc
DROP TABLE t1; DROP TABLE t1;
......
...@@ -30,7 +30,6 @@ Warnings: ...@@ -30,7 +30,6 @@ Warnings:
Warning 1364 Field 'ssl_cipher' doesn't have a default value 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_issuer' doesn't have a default value
Warning 1364 Field 'x509_subject' 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
GRANT SELECT ON *.* TO mysqltest6@localhost; GRANT SELECT ON *.* TO mysqltest6@localhost;
GRANT INSERT ON *.* TO mysqltest6@localhost; GRANT INSERT ON *.* TO mysqltest6@localhost;
GRANT INSERT ON test.* TO mysqltest6@localhost; GRANT INSERT ON test.* TO mysqltest6@localhost;
......
include/master-slave.inc include/master-slave.inc
[connection master] [connection master]
CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
call mtr.add_suppression("Slave SQL: slave SQL thread is being stopped in the middle of applying of a group having updated a non-transaction table; waiting for the group completion"); call mtr.add_suppression("Slave SQL.*Request to stop slave SQL Thread received while applying a group that has non-transactional changes; waiting for completion of the group");
include/stop_slave.inc include/stop_slave.inc
SET @old_log_output= @@log_output; SET @old_log_output= @@log_output;
SET GLOBAL log_output= 'TABLE'; SET GLOBAL log_output= 'TABLE';
......
...@@ -62,7 +62,6 @@ Warnings: ...@@ -62,7 +62,6 @@ Warnings:
Warning 1364 Field 'ssl_cipher' doesn't have a default value 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_issuer' doesn't have a default value
Warning 1364 Field 'x509_subject' 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
select select_priv,user from mysql.user where user = _binary'blafasel2'; select select_priv,user from mysql.user where user = _binary'blafasel2';
select_priv user select_priv user
N blafasel2 N blafasel2
......
...@@ -70,6 +70,6 @@ include/start_slave.inc ...@@ -70,6 +70,6 @@ include/start_slave.inc
# Clean up # Clean up
DROP TABLE t1; DROP TABLE t1;
SET @@global.innodb_flush_log_at_trx_commit= @old_innodb_flush_log_at_trx_commit; SET @@global.innodb_flush_log_at_trx_commit= @old_innodb_flush_log_at_trx_commit;
call mtr.add_suppression("Slave SQL.*slave SQL thread is being stopped in the middle of applying of a group having updated a non-transaction table"); call mtr.add_suppression("Slave SQL.*Request to stop slave SQL Thread received while applying a group that has non-transactional changes; waiting for completion of the group");
SET @@global.innodb_flush_log_at_trx_commit= @old_innodb_flush_log_at_trx_commit; SET @@global.innodb_flush_log_at_trx_commit= @old_innodb_flush_log_at_trx_commit;
include/rpl_end.inc include/rpl_end.inc
...@@ -11,8 +11,8 @@ insert into tm set a=null; ...@@ -11,8 +11,8 @@ insert into tm set a=null;
Warnings: Warnings:
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
commit; commit;
call mtr.add_suppression("Slave SQL.*slave SQL thread is being stopped in the middle of applying of a group having updated a non-transaction table"); call mtr.add_suppression("Slave SQL.*Request to stop slave SQL Thread received while applying a group that has non-transactional changes; waiting for completion of the group");
call mtr.add_suppression("Slave SQL.*The slave SQL is stopped, leaving the current group of events unfinished with a non-transaction table changed."); call mtr.add_suppression("Slave SQL.*Slave SQL Thread stopped with incomplete event group having non-transactional changes");
include/wait_for_slave_sql_to_stop.inc include/wait_for_slave_sql_to_stop.inc
SELECT "NO" AS Last_SQL_Error, @check as `true`; SELECT "NO" AS Last_SQL_Error, @check as `true`;
Last_SQL_Error true Last_SQL_Error true
...@@ -36,9 +36,9 @@ Warnings: ...@@ -36,9 +36,9 @@ Warnings:
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
commit; commit;
include/wait_for_slave_sql_to_stop.inc include/wait_for_slave_sql_to_stop.inc
SELECT "Fatal error: ... The slave SQL is stopped, leaving the current group of events unfinished with a non-transaction table changed. If the group consists solely of Row-based events, you can try restarting the slave with --slave-exec-mode=IDEMPOTENT, which ignores duplicate key, key not found, and similar errors (see documentation for details)." AS Last_SQL_Error, @check as `true`; SELECT "Fatal error: ... Slave SQL Thread stopped with incomplete event group having non-transactional changes. If the group consists solely of row-based events, you can try to restart the slave with --slave-exec-mode=IDEMPOTENT, which ignores duplicate key, key not found, and similar errors (see documentation for details)." AS Last_SQL_Error, @check as `true`;
Last_SQL_Error true Last_SQL_Error true
Fatal error: ... The slave SQL is stopped, leaving the current group of events unfinished with a non-transaction table changed. If the group consists solely of Row-based events, you can try restarting the slave with --slave-exec-mode=IDEMPOTENT, which ignores duplicate key, key not found, and similar errors (see documentation for details). 1 Fatal error: ... Slave SQL Thread stopped with incomplete event group having non-transactional changes. If the group consists solely of row-based events, you can try to restart the slave with --slave-exec-mode=IDEMPOTENT, which ignores duplicate key, key not found, and similar errors (see documentation for details). 1
select count(*) as one from tm; select count(*) as one from tm;
one one
1 1
...@@ -53,9 +53,9 @@ set @@global.debug="+d,stop_slave_middle_group"; ...@@ -53,9 +53,9 @@ set @@global.debug="+d,stop_slave_middle_group";
set @@global.debug="+d,incomplete_group_in_relay_log"; set @@global.debug="+d,incomplete_group_in_relay_log";
update tm as t1, ti as t2 set t1.a=t1.a * 2, t2.a=t2.a * 2; update tm as t1, ti as t2 set t1.a=t1.a * 2, t2.a=t2.a * 2;
include/wait_for_slave_sql_to_stop.inc include/wait_for_slave_sql_to_stop.inc
SELECT "Fatal error: ... The slave SQL is stopped, leaving the current group of events unfinished with a non-transaction table changed. If the group consists solely of Row-based events, you can try restarting the slave with --slave-exec-mode=IDEMPOTENT, which ignores duplicate key, key not found, and similar errors (see documentation for details)." AS Last_SQL_Error, @check as `true`; SELECT "Fatal error: ... Slave SQL Thread stopped with incomplete event group having non-transactional changes. If the group consists solely of row-based events, you can try to restart the slave with --slave-exec-mode=IDEMPOTENT, which ignores duplicate key, key not found, and similar errors (see documentation for details)." AS Last_SQL_Error, @check as `true`;
Last_SQL_Error true Last_SQL_Error true
Fatal error: ... The slave SQL is stopped, leaving the current group of events unfinished with a non-transaction table changed. If the group consists solely of Row-based events, you can try restarting the slave with --slave-exec-mode=IDEMPOTENT, which ignores duplicate key, key not found, and similar errors (see documentation for details). 1 Fatal error: ... Slave SQL Thread stopped with incomplete event group having non-transactional changes. If the group consists solely of row-based events, you can try to restart the slave with --slave-exec-mode=IDEMPOTENT, which ignores duplicate key, key not found, and similar errors (see documentation for details). 1
select max(a) as two from tm; select max(a) as two from tm;
two two
2 2
......
...@@ -75,7 +75,7 @@ include/wait_for_slave_sql_to_start.inc ...@@ -75,7 +75,7 @@ include/wait_for_slave_sql_to_start.inc
# Test end # Test end
SET GLOBAL debug= '$debug_save'; SET GLOBAL debug= '$debug_save';
include/restart_slave.inc include/restart_slave.inc
call mtr.add_suppression("Slave SQL.*slave SQL thread is being stopped in the middle of applying of a group having updated a non-transaction table"); call mtr.add_suppression("Slave SQL.*Request to stop slave SQL Thread received while applying a group that has non-transactional changes; waiting for completion of the group");
[connection master] [connection master]
DROP TABLE t1, t2; DROP TABLE t1, t2;
......
...@@ -30,7 +30,7 @@ CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT, b VARCHAR(100), c INT NOT NULL, ...@@ -30,7 +30,7 @@ CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT, b VARCHAR(100), c INT NOT NULL,
CREATE TABLE t2 (a INT NOT NULL AUTO_INCREMENT, b VARCHAR(100), c INT NOT NULL, PRIMARY KEY(a)) ENGINE=InnoDB; CREATE TABLE t2 (a INT NOT NULL AUTO_INCREMENT, b VARCHAR(100), c INT NOT NULL, PRIMARY KEY(a)) ENGINE=InnoDB;
--source include/rpl_sync.inc --source include/rpl_sync.inc
--connection server_4 --connection server_4
call mtr.add_suppression("Slave SQL.*slave SQL thread is being stopped in the middle of applying of a group having updated a non-transaction table"); call mtr.add_suppression("Slave SQL.*Request to stop slave SQL Thread received while applying a group that has non-transactional changes; waiting for completion of the group");
--echo --echo
# #
......
...@@ -320,7 +320,7 @@ INSERT INTO t1 VALUES (1, 'on slave', NULL); ...@@ -320,7 +320,7 @@ INSERT INTO t1 VALUES (1, 'on slave', NULL);
INSERT INTO t1 VALUES (1, 'on master', NULL); INSERT INTO t1 VALUES (1, 'on master', NULL);
--connection slave --connection slave
call mtr.add_suppression("Slave SQL.*Duplicate entry .1. for key .PRIMARY.. on query.* Error_code: 1062"); call mtr.add_suppression("Slave SQL.*Duplicate entry .1. for key .PRIMARY.. on query.* Error_code: 1062");
call mtr.add_suppression("Slave SQL.*slave SQL thread is being stopped in the middle of applying of a group having updated a non-transaction table"); call mtr.add_suppression("Slave SQL.*Request to stop slave SQL Thread received while applying a group that has non-transactional changes; waiting for completion of the group");
let $slave_errno= ER_DUP_ENTRY let $slave_errno= ER_DUP_ENTRY
--source include/wait_for_slave_sql_error.inc --source include/wait_for_slave_sql_error.inc
let $rcvd_heartbeats_before= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1); let $rcvd_heartbeats_before= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1);
......
...@@ -15,6 +15,7 @@ call mtr.add_suppression("Unsafe statement written to the binary log using state ...@@ -15,6 +15,7 @@ call mtr.add_suppression("Unsafe statement written to the binary log using state
connection slave; connection slave;
call mtr.add_suppression("Master server does not support semi-sync"); call mtr.add_suppression("Master server does not support semi-sync");
call mtr.add_suppression("Semi-sync slave .* reply"); call mtr.add_suppression("Semi-sync slave .* reply");
call mtr.add_suppression("Slave SQL.*Request to stop slave SQL Thread received while applying a group that has non-transactional changes; waiting for completion of the group");
enable_query_log; enable_query_log;
connection master; connection master;
......
...@@ -29,8 +29,7 @@ source include/master-slave.inc; ...@@ -29,8 +29,7 @@ source include/master-slave.inc;
source include/have_binlog_format_statement.inc; source include/have_binlog_format_statement.inc;
CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
call mtr.add_suppression("Slave SQL: slave SQL thread is being stopped in the middle of applying of a group having updated a non-transaction table; waiting for the group completion"); call mtr.add_suppression("Slave SQL.*Request to stop slave SQL Thread received while applying a group that has non-transactional changes; waiting for completion of the group");
# Prepare slave for different long_query_time we need to stop the slave # Prepare slave for different long_query_time we need to stop the slave
# and restart it as long_query_time variable is dynamic and, after # and restart it as long_query_time variable is dynamic and, after
......
...@@ -19,7 +19,7 @@ SET @@session.binlog_direct_non_transactional_updates= FALSE; ...@@ -19,7 +19,7 @@ SET @@session.binlog_direct_non_transactional_updates= FALSE;
# clean up # clean up
--connection slave --connection slave
SET @@global.innodb_flush_log_at_trx_commit= @old_innodb_flush_log_at_trx_commit; SET @@global.innodb_flush_log_at_trx_commit= @old_innodb_flush_log_at_trx_commit;
call mtr.add_suppression("Slave SQL.*slave SQL thread is being stopped in the middle of applying of a group having updated a non-transaction table"); call mtr.add_suppression("Slave SQL.*Request to stop slave SQL Thread received while applying a group that has non-transactional changes; waiting for completion of the group");
--connection master --connection master
SET @@global.innodb_flush_log_at_trx_commit= @old_innodb_flush_log_at_trx_commit; SET @@global.innodb_flush_log_at_trx_commit= @old_innodb_flush_log_at_trx_commit;
......
...@@ -48,7 +48,7 @@ SET GLOBAL debug= '$debug_save'; ...@@ -48,7 +48,7 @@ SET GLOBAL debug= '$debug_save';
source include/restart_slave_sql.inc; source include/restart_slave_sql.inc;
connection slave; connection slave;
call mtr.add_suppression("Slave SQL.*slave SQL thread is being stopped in the middle of applying of a group having updated a non-transaction table"); call mtr.add_suppression("Slave SQL.*Request to stop slave SQL Thread received while applying a group that has non-transactional changes; waiting for completion of the group");
connection master; connection master;
--source include/rpl_connection_master.inc --source include/rpl_connection_master.inc
......
...@@ -500,3 +500,8 @@ SELECT ((@a:=@b:=1.0) div (@b:=@a:=get_format(datetime, 'usa'))); ...@@ -500,3 +500,8 @@ SELECT ((@a:=@b:=1.0) div (@b:=@a:=get_format(datetime, 'usa')));
--echo # Bug #59498 div function broken in mysql-trunk --echo # Bug #59498 div function broken in mysql-trunk
--echo # --echo #
SELECT 1 div null; SELECT 1 div null;
--echo #
--echo # Bug #11792200 - DIVIDING LARGE NUMBERS CAUSES STACK CORRUPTIONS
--echo #
select (1.175494351E-37 div 1.7976931348623157E+308);
--log=$MYSQLTEST_VARDIR/log/master.log --log-output=FILE,TABLE --log=$MYSQLTEST_VARDIR/log/master.log
--log-output=FILE,TABLE
$PLUGIN_AUTH_OPT
$PLUGIN_AUTH_LOAD
# This test should work in embedded server after we fix mysqltest # This test should work in embedded server after we fix mysqltest
-- source include/not_embedded.inc -- source include/not_embedded.inc
# need to have the dynamic loading turned on for the client plugin tests
--source include/have_plugin_auth.inc
SET @old_general_log= @@global.general_log; SET @old_general_log= @@global.general_log;
SET @old_slow_query_log= @@global.slow_query_log; SET @old_slow_query_log= @@global.slow_query_log;
...@@ -12,7 +14,7 @@ SET @old_slow_query_log= @@global.slow_query_log; ...@@ -12,7 +14,7 @@ SET @old_slow_query_log= @@global.slow_query_log;
# var/log/mysql_client_test.trace # var/log/mysql_client_test.trace
--exec echo "$MYSQL_CLIENT_TEST" > $MYSQLTEST_VARDIR/log/mysql_client_test.out.log 2>&1 --exec echo "$MYSQL_CLIENT_TEST" > $MYSQLTEST_VARDIR/log/mysql_client_test.out.log 2>&1
--exec $MYSQL_CLIENT_TEST --getopt-ll-test=25600M >> $MYSQLTEST_VARDIR/log/mysql_client_test.out.log 2>&1 --exec $MYSQL_CLIENT_TEST --getopt-ll-test=25600M $PLUGIN_AUTH_CLIENT_OPT >> $MYSQLTEST_VARDIR/log/mysql_client_test.out.log 2>&1
# End of 4.1 tests # End of 4.1 tests
echo ok; echo ok;
......
...@@ -45,3 +45,17 @@ remove_file $MYSQLTEST_VARDIR/tmp/bug10608.cnf; ...@@ -45,3 +45,17 @@ remove_file $MYSQLTEST_VARDIR/tmp/bug10608.cnf;
--cat_file $MYSQLTEST_VARDIR/tmp/mysqladmin.tmp --cat_file $MYSQLTEST_VARDIR/tmp/mysqladmin.tmp
--remove_file $MYSQLTEST_VARDIR/tmp/mysqladmin.tmp --remove_file $MYSQLTEST_VARDIR/tmp/mysqladmin.tmp
--echo #
--echo # BUG#11766184 - 59234: cmdline clients crash --defaults-extra-file
--echo # with no .cnf or .ini extension.
--echo #
--echo # Creating an empty file 'cnf_file'
--write_file $MYSQLTEST_VARDIR/tmp/cnf_file
EOF
--echo # Using --defaults-extra-file option with 'cnf_file'.
--exec $MYSQLADMIN --defaults-extra-file=$MYSQLTEST_VARDIR/tmp/cnf_file -uroot -S $MASTER_MYSOCK -P $MASTER_MYPORT ping 2>&1
--remove_file $MYSQLTEST_VARDIR/tmp/cnf_file
...@@ -2198,6 +2198,7 @@ ALTER DATABASE `test-database` CHARACTER SET utf8 COLLATE utf8_unicode_ci ; ...@@ -2198,6 +2198,7 @@ ALTER DATABASE `test-database` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
--exec $MYSQL_DUMP --quote-names --compact test-database --exec $MYSQL_DUMP --quote-names --compact test-database
DROP DATABASE `test-database`; DROP DATABASE `test-database`;
# Switching back to test database.
USE test; USE test;
--echo # --echo #
......
...@@ -433,4 +433,61 @@ connection default; ...@@ -433,4 +433,61 @@ connection default;
disconnect cleartext_con; disconnect cleartext_con;
DROP USER uplain@localhost; DROP USER uplain@localhost;
--echo #
--echo # Bug #59038 : mysql.user.authentication_string column
--echo # causes configuration wizard to fail
INSERT 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,
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,
/*!50001
Create_view_priv,
Show_view_priv,
Create_routine_priv,
Alter_routine_priv,
Create_user_priv,
*/
ssl_type,
ssl_cipher,
x509_issuer,
x509_subject,
max_questions,
max_updates,
max_connections)
VALUES (
'localhost',
'inserttest', '',
'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y',
'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y',
/*!50001 'Y', 'Y', 'Y', 'Y', 'Y', */'', '', '', '', '0', '0', '0');
FLUSH PRIVILEGES;
DROP USER inserttest@localhost;
SELECT IS_NULLABLE, COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE
COLUMN_NAME IN ('authentication_string', 'plugin') AND
TABLE_NAME='user' AND
TABLE_SCHEMA='mysql'
ORDER BY COLUMN_NAME;
--echo End of 5.5 tests --echo End of 5.5 tests
...@@ -28,7 +28,7 @@ set @had_db_table= @@warning_count != 0; ...@@ -28,7 +28,7 @@ set @had_db_table= @@warning_count != 0;
CREATE TABLE IF NOT EXISTS host ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary 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, 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, 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, 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, Execute_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, PRIMARY KEY Host (Host,Db) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Host privileges; Merged with database privileges'; CREATE TABLE IF NOT EXISTS host ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary 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, 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, 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, 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, Execute_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, PRIMARY KEY Host (Host,Db) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Host privileges; Merged with database privileges';
CREATE TABLE IF NOT EXISTS user ( Host char(60) binary DEFAULT '' NOT NULL, User char(16) 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, 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) unsigned DEFAULT 0 NOT NULL, plugin char(64) DEFAULT '' NOT NULL, authentication_string TEXT NOT NULL, PRIMARY KEY Host (Host,User) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Users and global privileges'; CREATE TABLE IF NOT EXISTS user ( Host char(60) binary DEFAULT '' NOT NULL, User char(16) 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, 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) unsigned DEFAULT 0 NOT NULL, plugin char(64) DEFAULT '', authentication_string TEXT, PRIMARY KEY Host (Host,User) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Users and global privileges';
-- Remember for later if user table already existed -- Remember for later if user table already existed
set @had_user_table= @@warning_count != 0; set @had_user_table= @@warning_count != 0;
......
...@@ -640,8 +640,8 @@ DROP PREPARE stmt; ...@@ -640,8 +640,8 @@ DROP PREPARE stmt;
drop procedure mysql.die; drop procedure mysql.die;
ALTER TABLE user ADD plugin char(64) DEFAULT '' NOT NULL, ADD authentication_string TEXT NOT NULL; ALTER TABLE user ADD plugin char(64) DEFAULT '', ADD authentication_string TEXT;
ALTER TABLE user MODIFY plugin char(64) DEFAULT '' NOT NULL; ALTER TABLE user MODIFY plugin char(64) DEFAULT '';
-- Need to pre-fill mysql.proxies_priv with access for root even when upgrading from -- Need to pre-fill mysql.proxies_priv with access for root even when upgrading from
-- older versions -- older versions
......
...@@ -163,6 +163,7 @@ add_plugin(MYSQL *mysql, struct st_mysql_client_plugin *plugin, void *dlhandle, ...@@ -163,6 +163,7 @@ add_plugin(MYSQL *mysql, struct st_mysql_client_plugin *plugin, void *dlhandle,
p->next= plugin_list[plugin->type]; p->next= plugin_list[plugin->type];
plugin_list[plugin->type]= p; plugin_list[plugin->type]= p;
net_clear_error(&mysql->net);
return plugin; return plugin;
......
...@@ -4448,6 +4448,7 @@ int ha_partition::index_read_idx_map(uchar *buf, uint index, ...@@ -4448,6 +4448,7 @@ int ha_partition::index_read_idx_map(uchar *buf, uint index,
break; break;
} }
} }
if (part <= m_part_spec.end_part)
m_last_part= part; m_last_part= part;
} }
else else
...@@ -6391,7 +6392,14 @@ void ha_partition::print_error(int error, myf errflag) ...@@ -6391,7 +6392,14 @@ void ha_partition::print_error(int error, myf errflag)
{ {
/* In case m_file has not been initialized, like in bug#42438 */ /* In case m_file has not been initialized, like in bug#42438 */
if (m_file) if (m_file)
{
if (m_last_part >= m_tot_parts)
{
DBUG_ASSERT(0);
m_last_part= 0;
}
m_file[m_last_part]->print_error(error, errflag); m_file[m_last_part]->print_error(error, errflag);
}
else else
handler::print_error(error, errflag); handler::print_error(error, errflag);
} }
......
...@@ -178,7 +178,7 @@ void max_my_decimal(my_decimal *to, int precision, int frac) ...@@ -178,7 +178,7 @@ void max_my_decimal(my_decimal *to, int precision, int frac)
{ {
DBUG_ASSERT((precision <= DECIMAL_MAX_PRECISION)&& DBUG_ASSERT((precision <= DECIMAL_MAX_PRECISION)&&
(frac <= DECIMAL_MAX_SCALE)); (frac <= DECIMAL_MAX_SCALE));
max_decimal(precision, frac, (decimal_t*) to); max_decimal(precision, frac, to);
} }
inline void max_internal_decimal(my_decimal *to) inline void max_internal_decimal(my_decimal *to)
...@@ -277,14 +277,19 @@ inline ...@@ -277,14 +277,19 @@ inline
int binary2my_decimal(uint mask, const uchar *bin, my_decimal *d, int prec, int binary2my_decimal(uint mask, const uchar *bin, my_decimal *d, int prec,
int scale) int scale)
{ {
return check_result(mask, bin2decimal(bin, (decimal_t*) d, prec, scale)); return check_result(mask, bin2decimal(bin, d, prec, scale));
} }
inline inline
int my_decimal_set_zero(my_decimal *d) int my_decimal_set_zero(my_decimal *d)
{ {
decimal_make_zero(((decimal_t*) d)); /*
We need the up-cast here, since my_decimal has sign() member functions,
which conflicts with decimal_t::size
(and decimal_make_zero is a macro, rather than a funcion).
*/
decimal_make_zero(static_cast<decimal_t*>(d));
return 0; return 0;
} }
...@@ -292,7 +297,7 @@ int my_decimal_set_zero(my_decimal *d) ...@@ -292,7 +297,7 @@ int my_decimal_set_zero(my_decimal *d)
inline inline
bool my_decimal_is_zero(const my_decimal *decimal_value) bool my_decimal_is_zero(const my_decimal *decimal_value)
{ {
return decimal_is_zero((decimal_t*) decimal_value); return decimal_is_zero(decimal_value);
} }
...@@ -300,7 +305,7 @@ inline ...@@ -300,7 +305,7 @@ inline
int my_decimal_round(uint mask, const my_decimal *from, int scale, int my_decimal_round(uint mask, const my_decimal *from, int scale,
bool truncate, my_decimal *to) bool truncate, my_decimal *to)
{ {
return check_result(mask, decimal_round((decimal_t*) from, to, scale, return check_result(mask, decimal_round(from, to, scale,
(truncate ? TRUNCATE : HALF_UP))); (truncate ? TRUNCATE : HALF_UP)));
} }
...@@ -308,14 +313,14 @@ int my_decimal_round(uint mask, const my_decimal *from, int scale, ...@@ -308,14 +313,14 @@ int my_decimal_round(uint mask, const my_decimal *from, int scale,
inline inline
int my_decimal_floor(uint mask, const my_decimal *from, my_decimal *to) int my_decimal_floor(uint mask, const my_decimal *from, my_decimal *to)
{ {
return check_result(mask, decimal_round((decimal_t*) from, to, 0, FLOOR)); return check_result(mask, decimal_round(from, to, 0, FLOOR));
} }
inline inline
int my_decimal_ceiling(uint mask, const my_decimal *from, my_decimal *to) int my_decimal_ceiling(uint mask, const my_decimal *from, my_decimal *to)
{ {
return check_result(mask, decimal_round((decimal_t*) from, to, 0, CEILING)); return check_result(mask, decimal_round(from, to, 0, CEILING));
} }
...@@ -337,7 +342,7 @@ int my_decimal2int(uint mask, const my_decimal *d, my_bool unsigned_flag, ...@@ -337,7 +342,7 @@ int my_decimal2int(uint mask, const my_decimal *d, my_bool unsigned_flag,
{ {
my_decimal rounded; my_decimal rounded;
/* decimal_round can return only E_DEC_TRUNCATED */ /* decimal_round can return only E_DEC_TRUNCATED */
decimal_round((decimal_t*)d, &rounded, 0, HALF_UP); decimal_round(d, &rounded, 0, HALF_UP);
return check_result(mask, (unsigned_flag ? return check_result(mask, (unsigned_flag ?
decimal2ulonglong(&rounded, (ulonglong *)l) : decimal2ulonglong(&rounded, (ulonglong *)l) :
decimal2longlong(&rounded, l))); decimal2longlong(&rounded, l)));
...@@ -348,15 +353,14 @@ inline ...@@ -348,15 +353,14 @@ inline
int my_decimal2double(uint, const my_decimal *d, double *result) int my_decimal2double(uint, const my_decimal *d, double *result)
{ {
/* No need to call check_result as this will always succeed */ /* No need to call check_result as this will always succeed */
return decimal2double((decimal_t*) d, result); return decimal2double(d, result);
} }
inline inline
int str2my_decimal(uint mask, const char *str, my_decimal *d, char **end) int str2my_decimal(uint mask, const char *str, my_decimal *d, char **end)
{ {
return check_result_and_overflow(mask, string2decimal(str,(decimal_t*)d,end), return check_result_and_overflow(mask, string2decimal(str, d, end), d);
d);
} }
...@@ -379,7 +383,7 @@ my_decimal *date2my_decimal(MYSQL_TIME *ltime, my_decimal *dec); ...@@ -379,7 +383,7 @@ my_decimal *date2my_decimal(MYSQL_TIME *ltime, my_decimal *dec);
inline inline
int double2my_decimal(uint mask, double val, my_decimal *d) int double2my_decimal(uint mask, double val, my_decimal *d)
{ {
return check_result_and_overflow(mask, double2decimal(val, (decimal_t*)d), d); return check_result_and_overflow(mask, double2decimal(val, d), d);
} }
...@@ -409,7 +413,7 @@ int my_decimal_add(uint mask, my_decimal *res, const my_decimal *a, ...@@ -409,7 +413,7 @@ int my_decimal_add(uint mask, my_decimal *res, const my_decimal *a,
const my_decimal *b) const my_decimal *b)
{ {
return check_result_and_overflow(mask, return check_result_and_overflow(mask,
decimal_add((decimal_t*)a,(decimal_t*)b,res), decimal_add(a, b, res),
res); res);
} }
...@@ -419,7 +423,7 @@ int my_decimal_sub(uint mask, my_decimal *res, const my_decimal *a, ...@@ -419,7 +423,7 @@ int my_decimal_sub(uint mask, my_decimal *res, const my_decimal *a,
const my_decimal *b) const my_decimal *b)
{ {
return check_result_and_overflow(mask, return check_result_and_overflow(mask,
decimal_sub((decimal_t*)a,(decimal_t*)b,res), decimal_sub(a, b, res),
res); res);
} }
...@@ -429,7 +433,7 @@ int my_decimal_mul(uint mask, my_decimal *res, const my_decimal *a, ...@@ -429,7 +433,7 @@ int my_decimal_mul(uint mask, my_decimal *res, const my_decimal *a,
const my_decimal *b) const my_decimal *b)
{ {
return check_result_and_overflow(mask, return check_result_and_overflow(mask,
decimal_mul((decimal_t*)a,(decimal_t*)b,res), decimal_mul(a, b, res),
res); res);
} }
...@@ -439,8 +443,7 @@ int my_decimal_div(uint mask, my_decimal *res, const my_decimal *a, ...@@ -439,8 +443,7 @@ int my_decimal_div(uint mask, my_decimal *res, const my_decimal *a,
const my_decimal *b, int div_scale_inc) const my_decimal *b, int div_scale_inc)
{ {
return check_result_and_overflow(mask, return check_result_and_overflow(mask,
decimal_div((decimal_t*)a,(decimal_t*)b,res, decimal_div(a, b, res, div_scale_inc),
div_scale_inc),
res); res);
} }
...@@ -450,7 +453,7 @@ int my_decimal_mod(uint mask, my_decimal *res, const my_decimal *a, ...@@ -450,7 +453,7 @@ int my_decimal_mod(uint mask, my_decimal *res, const my_decimal *a,
const my_decimal *b) const my_decimal *b)
{ {
return check_result_and_overflow(mask, return check_result_and_overflow(mask,
decimal_mod((decimal_t*)a,(decimal_t*)b,res), decimal_mod(a, b, res),
res); res);
} }
...@@ -462,14 +465,14 @@ int my_decimal_mod(uint mask, my_decimal *res, const my_decimal *a, ...@@ -462,14 +465,14 @@ int my_decimal_mod(uint mask, my_decimal *res, const my_decimal *a,
inline inline
int my_decimal_cmp(const my_decimal *a, const my_decimal *b) int my_decimal_cmp(const my_decimal *a, const my_decimal *b)
{ {
return decimal_cmp((decimal_t*) a, (decimal_t*) b); return decimal_cmp(a, b);
} }
inline inline
int my_decimal_intg(const my_decimal *a) int my_decimal_intg(const my_decimal *a)
{ {
return decimal_intg((decimal_t*) a); return decimal_intg(a);
} }
......
...@@ -903,18 +903,18 @@ static bool sql_slave_killed(THD* thd, Relay_log_info* rli) ...@@ -903,18 +903,18 @@ static bool sql_slave_killed(THD* thd, Relay_log_info* rli)
&& rli->is_in_group()) && rli->is_in_group())
{ {
char msg_stopped[]= char msg_stopped[]=
"... The slave SQL is stopped, leaving the current group " "... Slave SQL Thread stopped with incomplete event group "
"of events unfinished with a non-transaction table changed. " "having non-transactional changes. "
"If the group consists solely of Row-based events, you can try " "If the group consists solely of row-based events, you can try "
"restarting the slave with --slave-exec-mode=IDEMPOTENT, which " "to restart the slave with --slave-exec-mode=IDEMPOTENT, which "
"ignores duplicate key, key not found, and similar errors (see " "ignores duplicate key, key not found, and similar errors (see "
"documentation for details)."; "documentation for details).";
if (rli->abort_slave) if (rli->abort_slave)
{ {
DBUG_PRINT("info", ("Slave SQL thread is being stopped in the middle of" DBUG_PRINT("info", ("Request to stop slave SQL Thread received while "
" a group having updated a non-trans table, giving" "applying a group that has non-transactional "
" it some grace period")); "changes; waiting for completion of the group ... "));
/* /*
Slave sql thread shutdown in face of unfinished group modified Slave sql thread shutdown in face of unfinished group modified
...@@ -938,9 +938,9 @@ static bool sql_slave_killed(THD* thd, Relay_log_info* rli) ...@@ -938,9 +938,9 @@ static bool sql_slave_killed(THD* thd, Relay_log_info* rli)
if (ret == 0) if (ret == 0)
{ {
rli->report(WARNING_LEVEL, 0, rli->report(WARNING_LEVEL, 0,
"slave SQL thread is being stopped in the middle " "Request to stop slave SQL Thread received while "
"of applying of a group having updated a non-transaction " "applying a group that has non-transactional "
"table; waiting for the group completion ... "); "changes; waiting for completion of the group ... ");
} }
else else
{ {
......
...@@ -2402,8 +2402,10 @@ static int replace_user_table(THD *thd, TABLE *table, const LEX_USER &combo, ...@@ -2402,8 +2402,10 @@ static int replace_user_table(THD *thd, TABLE *table, const LEX_USER &combo,
{ {
table->field[next_field]->store(combo.plugin.str, combo.plugin.length, table->field[next_field]->store(combo.plugin.str, combo.plugin.length,
system_charset_info); system_charset_info);
table->field[next_field]->set_notnull();
table->field[next_field + 1]->store(combo.auth.str, combo.auth.length, table->field[next_field + 1]->store(combo.auth.str, combo.auth.length,
system_charset_info); system_charset_info);
table->field[next_field + 1]->set_notnull();
} }
else else
{ {
......
...@@ -248,7 +248,7 @@ void max_decimal(int precision, int frac, decimal_t *to) ...@@ -248,7 +248,7 @@ void max_decimal(int precision, int frac, decimal_t *to)
} }
static dec1 *remove_leading_zeroes(decimal_t *from, int *intg_result) static dec1 *remove_leading_zeroes(const decimal_t *from, int *intg_result)
{ {
int intg= from->intg, i; int intg= from->intg, i;
dec1 *buf0= from->buf; dec1 *buf0= from->buf;
...@@ -326,7 +326,7 @@ int decimal_actual_fraction(decimal_t *from) ...@@ -326,7 +326,7 @@ int decimal_actual_fraction(decimal_t *from)
E_DEC_OK/E_DEC_TRUNCATED/E_DEC_OVERFLOW E_DEC_OK/E_DEC_TRUNCATED/E_DEC_OVERFLOW
*/ */
int decimal2string(decimal_t *from, char *to, int *to_len, int decimal2string(const decimal_t *from, char *to, int *to_len,
int fixed_precision, int fixed_decimals, int fixed_precision, int fixed_decimals,
char filler) char filler)
{ {
...@@ -942,7 +942,7 @@ fatal_error: ...@@ -942,7 +942,7 @@ fatal_error:
E_DEC_OK/E_DEC_OVERFLOW/E_DEC_TRUNCATED E_DEC_OK/E_DEC_OVERFLOW/E_DEC_TRUNCATED
*/ */
int decimal2double(decimal_t *from, double *to) int decimal2double(const decimal_t *from, double *to)
{ {
char strbuf[FLOATING_POINT_BUFFER], *end; char strbuf[FLOATING_POINT_BUFFER], *end;
int len= sizeof(strbuf); int len= sizeof(strbuf);
...@@ -1461,7 +1461,7 @@ int decimal_bin_size(int precision, int scale) ...@@ -1461,7 +1461,7 @@ int decimal_bin_size(int precision, int scale)
*/ */
int int
decimal_round(decimal_t *from, decimal_t *to, int scale, decimal_round(const decimal_t *from, decimal_t *to, int scale,
decimal_round_mode mode) decimal_round_mode mode)
{ {
int frac0=scale>0 ? ROUND_UP(scale) : scale/DIG_PER_DEC1, int frac0=scale>0 ? ROUND_UP(scale) : scale/DIG_PER_DEC1,
...@@ -1695,7 +1695,7 @@ int decimal_result_size(decimal_t *from1, decimal_t *from2, char op, int param) ...@@ -1695,7 +1695,7 @@ int decimal_result_size(decimal_t *from1, decimal_t *from2, char op, int param)
return -1; /* shut up the warning */ return -1; /* shut up the warning */
} }
static int do_add(decimal_t *from1, decimal_t *from2, decimal_t *to) static int do_add(const decimal_t *from1, const decimal_t *from2, decimal_t *to)
{ {
int intg1=ROUND_UP(from1->intg), intg2=ROUND_UP(from2->intg), int intg1=ROUND_UP(from1->intg), intg2=ROUND_UP(from2->intg),
frac1=ROUND_UP(from1->frac), frac2=ROUND_UP(from2->frac), frac1=ROUND_UP(from1->frac), frac2=ROUND_UP(from2->frac),
...@@ -1777,7 +1777,7 @@ static int do_add(decimal_t *from1, decimal_t *from2, decimal_t *to) ...@@ -1777,7 +1777,7 @@ static int do_add(decimal_t *from1, decimal_t *from2, decimal_t *to)
/* to=from1-from2. /* to=from1-from2.
if to==0, return -1/0/+1 - the result of the comparison */ if to==0, return -1/0/+1 - the result of the comparison */
static int do_sub(decimal_t *from1, decimal_t *from2, decimal_t *to) static int do_sub(const decimal_t *from1, const decimal_t *from2, decimal_t *to)
{ {
int intg1=ROUND_UP(from1->intg), intg2=ROUND_UP(from2->intg), int intg1=ROUND_UP(from1->intg), intg2=ROUND_UP(from2->intg),
frac1=ROUND_UP(from1->frac), frac2=ROUND_UP(from2->frac); frac1=ROUND_UP(from1->frac), frac2=ROUND_UP(from2->frac);
...@@ -1846,7 +1846,7 @@ static int do_sub(decimal_t *from1, decimal_t *from2, decimal_t *to) ...@@ -1846,7 +1846,7 @@ static int do_sub(decimal_t *from1, decimal_t *from2, decimal_t *to)
/* ensure that always from1 > from2 (and intg1 >= intg2) */ /* ensure that always from1 > from2 (and intg1 >= intg2) */
if (carry) if (carry)
{ {
swap_variables(decimal_t *,from1,from1); swap_variables(const decimal_t *, from1, from2);
swap_variables(dec1 *,start1, start2); swap_variables(dec1 *,start1, start2);
swap_variables(int,intg1,intg2); swap_variables(int,intg1,intg2);
swap_variables(int,frac1,frac2); swap_variables(int,frac1,frac2);
...@@ -1912,35 +1912,35 @@ static int do_sub(decimal_t *from1, decimal_t *from2, decimal_t *to) ...@@ -1912,35 +1912,35 @@ static int do_sub(decimal_t *from1, decimal_t *from2, decimal_t *to)
return error; return error;
} }
int decimal_intg(decimal_t *from) int decimal_intg(const decimal_t *from)
{ {
int res; int res;
remove_leading_zeroes(from, &res); remove_leading_zeroes(from, &res);
return res; return res;
} }
int decimal_add(decimal_t *from1, decimal_t *from2, decimal_t *to) int decimal_add(const decimal_t *from1, const decimal_t *from2, decimal_t *to)
{ {
if (likely(from1->sign == from2->sign)) if (likely(from1->sign == from2->sign))
return do_add(from1, from2, to); return do_add(from1, from2, to);
return do_sub(from1, from2, to); return do_sub(from1, from2, to);
} }
int decimal_sub(decimal_t *from1, decimal_t *from2, decimal_t *to) int decimal_sub(const decimal_t *from1, const decimal_t *from2, decimal_t *to)
{ {
if (likely(from1->sign == from2->sign)) if (likely(from1->sign == from2->sign))
return do_sub(from1, from2, to); return do_sub(from1, from2, to);
return do_add(from1, from2, to); return do_add(from1, from2, to);
} }
int decimal_cmp(decimal_t *from1, decimal_t *from2) int decimal_cmp(const decimal_t *from1, const decimal_t *from2)
{ {
if (likely(from1->sign == from2->sign)) if (likely(from1->sign == from2->sign))
return do_sub(from1, from2, 0); return do_sub(from1, from2, 0);
return from1->sign > from2->sign ? -1 : 1; return from1->sign > from2->sign ? -1 : 1;
} }
int decimal_is_zero(decimal_t *from) int decimal_is_zero(const decimal_t *from)
{ {
dec1 *buf1=from->buf, dec1 *buf1=from->buf,
*end=buf1+ROUND_UP(from->intg)+ROUND_UP(from->frac); *end=buf1+ROUND_UP(from->intg)+ROUND_UP(from->frac);
...@@ -1971,7 +1971,7 @@ int decimal_is_zero(decimal_t *from) ...@@ -1971,7 +1971,7 @@ int decimal_is_zero(decimal_t *from)
XXX if this library is to be used with huge numbers of thousands of XXX if this library is to be used with huge numbers of thousands of
digits, fast multiplication must be implemented. digits, fast multiplication must be implemented.
*/ */
int decimal_mul(decimal_t *from1, decimal_t *from2, decimal_t *to) int decimal_mul(const decimal_t *from1, const decimal_t *from2, decimal_t *to)
{ {
int intg1=ROUND_UP(from1->intg), intg2=ROUND_UP(from2->intg), int intg1=ROUND_UP(from1->intg), intg2=ROUND_UP(from2->intg),
frac1=ROUND_UP(from1->frac), frac2=ROUND_UP(from2->frac), frac1=ROUND_UP(from1->frac), frac2=ROUND_UP(from2->frac),
...@@ -2095,7 +2095,7 @@ int decimal_mul(decimal_t *from1, decimal_t *from2, decimal_t *to) ...@@ -2095,7 +2095,7 @@ int decimal_mul(decimal_t *from1, decimal_t *from2, decimal_t *to)
changed to malloc (or at least fallback to malloc if alloca() fails) changed to malloc (or at least fallback to malloc if alloca() fails)
but then, decimal_mul() should be rewritten too :( but then, decimal_mul() should be rewritten too :(
*/ */
static int do_div_mod(decimal_t *from1, decimal_t *from2, static int do_div_mod(const decimal_t *from1, const decimal_t *from2,
decimal_t *to, decimal_t *mod, int scale_incr) decimal_t *to, decimal_t *mod, int scale_incr)
{ {
int frac1=ROUND_UP(from1->frac)*DIG_PER_DEC1, prec1=from1->intg+frac1, int frac1=ROUND_UP(from1->frac)*DIG_PER_DEC1, prec1=from1->intg+frac1,
...@@ -2181,9 +2181,12 @@ static int do_div_mod(decimal_t *from1, decimal_t *from2, ...@@ -2181,9 +2181,12 @@ static int do_div_mod(decimal_t *from1, decimal_t *from2,
} }
buf0=to->buf; buf0=to->buf;
stop0=buf0+intg0+frac0; stop0=buf0+intg0+frac0;
DBUG_ASSERT(stop0 <= &to->buf[to->len]);
if (likely(div_mod)) if (likely(div_mod))
while (dintg++ < 0) while (dintg++ < 0 && buf0 < &to->buf[to->len])
{
*buf0++=0; *buf0++=0;
}
len1=(i=ROUND_UP(prec1))+ROUND_UP(2*frac2+scale_incr+1) + 1; len1=(i=ROUND_UP(prec1))+ROUND_UP(2*frac2+scale_incr+1) + 1;
set_if_bigger(len1, 3); set_if_bigger(len1, 3);
...@@ -2355,7 +2358,8 @@ done: ...@@ -2355,7 +2358,8 @@ done:
*/ */
int int
decimal_div(decimal_t *from1, decimal_t *from2, decimal_t *to, int scale_incr) decimal_div(const decimal_t *from1, const decimal_t *from2, decimal_t *to,
int scale_incr)
{ {
return do_div_mod(from1, from2, to, 0, scale_incr); return do_div_mod(from1, from2, to, 0, scale_incr);
} }
...@@ -2387,7 +2391,7 @@ decimal_div(decimal_t *from1, decimal_t *from2, decimal_t *to, int scale_incr) ...@@ -2387,7 +2391,7 @@ decimal_div(decimal_t *from1, decimal_t *from2, decimal_t *to, int scale_incr)
thus, there's no requirement for M or N to be integers thus, there's no requirement for M or N to be integers
*/ */
int decimal_mod(decimal_t *from1, decimal_t *from2, decimal_t *to) int decimal_mod(const decimal_t *from1, const decimal_t *from2, decimal_t *to)
{ {
return do_div_mod(from1, from2, 0, to, 0); return do_div_mod(from1, from2, 0, to, 0);
} }
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include <m_string.h> #include <m_string.h>
#include <mysqld_error.h> #include <mysqld_error.h>
#include <sql_common.h> #include <sql_common.h>
#include <mysql/client_plugin.h>
#define VER "2.1" #define VER "2.1"
#define MAX_TEST_QUERY_LENGTH 300 /* MAX QUERY BUFFER LENGTH */ #define MAX_TEST_QUERY_LENGTH 300 /* MAX QUERY BUFFER LENGTH */
...@@ -59,6 +60,7 @@ static unsigned int test_count= 0; ...@@ -59,6 +60,7 @@ static unsigned int test_count= 0;
static unsigned int opt_count= 0; static unsigned int opt_count= 0;
static unsigned int iter_count= 0; static unsigned int iter_count= 0;
static my_bool have_innodb= FALSE; static my_bool have_innodb= FALSE;
static char *opt_plugin_dir= 0, *opt_default_auth= 0;
static const char *opt_basedir= "./"; static const char *opt_basedir= "./";
static const char *opt_vardir= "mysql-test/var"; static const char *opt_vardir= "mysql-test/var";
...@@ -245,6 +247,11 @@ static MYSQL *mysql_client_init(MYSQL* con) ...@@ -245,6 +247,11 @@ static MYSQL *mysql_client_init(MYSQL* con)
if (res && shared_memory_base_name) if (res && shared_memory_base_name)
mysql_options(res, MYSQL_SHARED_MEMORY_BASE_NAME, shared_memory_base_name); mysql_options(res, MYSQL_SHARED_MEMORY_BASE_NAME, shared_memory_base_name);
#endif #endif
if (opt_plugin_dir && *opt_plugin_dir)
mysql_options(res, MYSQL_PLUGIN_DIR, opt_plugin_dir);
if (opt_default_auth && *opt_default_auth)
mysql_options(res, MYSQL_DEFAULT_AUTH, opt_default_auth);
return res; return res;
} }
...@@ -326,6 +333,11 @@ static MYSQL* client_connect(ulong flag, uint protocol, my_bool auto_reconnect) ...@@ -326,6 +333,11 @@ static MYSQL* client_connect(ulong flag, uint protocol, my_bool auto_reconnect)
/* enable local infile, in non-binary builds often disabled by default */ /* enable local infile, in non-binary builds often disabled by default */
mysql_options(mysql, MYSQL_OPT_LOCAL_INFILE, 0); mysql_options(mysql, MYSQL_OPT_LOCAL_INFILE, 0);
mysql_options(mysql, MYSQL_OPT_PROTOCOL, &protocol); mysql_options(mysql, MYSQL_OPT_PROTOCOL, &protocol);
if (opt_plugin_dir && *opt_plugin_dir)
mysql_options(mysql, MYSQL_PLUGIN_DIR, opt_plugin_dir);
if (opt_default_auth && *opt_default_auth)
mysql_options(mysql, MYSQL_DEFAULT_AUTH, opt_default_auth);
if (!(mysql_real_connect(mysql, opt_host, opt_user, if (!(mysql_real_connect(mysql, opt_host, opt_user,
opt_password, opt_db ? opt_db:"test", opt_port, opt_password, opt_db ? opt_db:"test", opt_port,
...@@ -19552,6 +19564,28 @@ static void test_bug57058() ...@@ -19552,6 +19564,28 @@ static void test_bug57058()
} }
/**
Bug#11766854: 60075: MYSQL_LOAD_CLIENT_PLUGIN DOESN'T CLEAR ERROR
*/
static void test_bug11766854()
{
struct st_mysql_client_plugin *plugin;
DBUG_ENTER("test_bug11766854");
myheader("test_bug11766854");
plugin= mysql_load_plugin(mysql, "foo", -1, 0);
DIE_UNLESS(plugin == 0);
plugin= mysql_load_plugin(mysql, "qa_auth_client", -1, 0);
DIE_UNLESS(plugin != 0);
DIE_IF(mysql_errno(mysql));
DBUG_VOID_RETURN;
}
/* /*
Read and parse arguments and MySQL options from my.cnf Read and parse arguments and MySQL options from my.cnf
*/ */
...@@ -19609,6 +19643,12 @@ static struct my_option client_test_long_options[] = ...@@ -19609,6 +19643,12 @@ static struct my_option client_test_long_options[] =
{"getopt-ll-test", 'g', "Option for testing bug in getopt library", {"getopt-ll-test", 'g', "Option for testing bug in getopt library",
&opt_getopt_ll_test, &opt_getopt_ll_test, 0, &opt_getopt_ll_test, &opt_getopt_ll_test, 0,
GET_LL, REQUIRED_ARG, 0, 0, LONGLONG_MAX, 0, 0, 0}, GET_LL, REQUIRED_ARG, 0, 0, LONGLONG_MAX, 0, 0, 0},
{"plugin_dir", 0, "Directory for client-side plugins.",
(uchar**) &opt_plugin_dir, (uchar**) &opt_plugin_dir, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"default_auth", 0, "Default authentication client-side plugin to use.",
(uchar**) &opt_default_auth, (uchar**) &opt_default_auth, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0} { 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
}; };
...@@ -19889,6 +19929,7 @@ static struct my_tests_st my_tests[]= { ...@@ -19889,6 +19929,7 @@ static struct my_tests_st my_tests[]= {
{ "test_bug58036", test_bug58036 }, { "test_bug58036", test_bug58036 },
{ "test_bug57058", test_bug57058 }, { "test_bug57058", test_bug57058 },
{ "test_bug56976", test_bug56976 }, { "test_bug56976", test_bug56976 },
{ "test_bug11766854", test_bug11766854 },
{ 0, 0 } { 0, 0 }
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment