diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2020-11-18 16:04:57 +0100 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2021-04-20 16:36:56 +0200 |
commit | a3099a3b4a394da360b5c1e7ae6dc985ae2f7f2f (patch) | |
tree | 6df02d372d1ad80d3358122a9cff7961aa362775 | |
parent | 8751aa7397b2e698fa0b46ec3e60abb9e2fd7e1b (diff) | |
download | mariadb-git-a3099a3b4a394da360b5c1e7ae6dc985ae2f7f2f.tar.gz |
MDEV-24312 master_host has 60 character limit, increase to 255 bytesbb-10.6-MDEV-24312
Also increase user name up to 128.
The work was started by Rucha Deodhar <rucha.deodhar@mariadb.com>,
contains audit plugin fixes by Alexey Botchkov <holyfoot@askmonty.org>.
80 files changed, 929 insertions, 524 deletions
diff --git a/include/mysql_com.h b/include/mysql_com.h index 06c1e739a05..0f525488b53 100644 --- a/include/mysql_com.h +++ b/include/mysql_com.h @@ -23,7 +23,7 @@ #include "my_decimal_limits.h" -#define HOSTNAME_LENGTH 60 +#define HOSTNAME_LENGTH 255 #define HOSTNAME_LENGTH_STR STRINGIFY_ARG(HOSTNAME_LENGTH) #define SYSTEM_CHARSET_MBMAXLEN 3 #define NAME_CHAR_LEN 64 /* Field/table name length */ diff --git a/mysql-test/main/connect.result b/mysql-test/main/connect.result index 229c2d9dafe..74387168d98 100644 --- a/mysql-test/main/connect.result +++ b/mysql-test/main/connect.result @@ -324,12 +324,12 @@ Connection on extra port 2 ok # -- Bug#49752: 2469.126.2 unintentionally breaks authentication # against MySQL 5.1 server # -GRANT ALL ON test.* TO 'O1234567890123456789012345678901234567890123456789012345678901234567890123456789'@'localhost' IDENTIFIED BY 'test123'; +GRANT ALL ON test.* TO 'O1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567'@'localhost' IDENTIFIED BY 'test123'; FLUSH PRIVILEGES; -connect con1,localhost,O1234567890123456789012345678901234567890123456789012345678901234567890123456789x,test123,test; +connect con1,localhost, O1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567x,test123,test; disconnect con1; connection default; -DROP USER 'O1234567890123456789012345678901234567890123456789012345678901234567890123456789'@'localhost'; +DROP USER 'O1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567'@'localhost'; FLUSH PRIVILEGES; # # -- End of Bug#49752 diff --git a/mysql-test/main/connect.test b/mysql-test/main/connect.test index b115e0620ec..c9969633a2a 100644 --- a/mysql-test/main/connect.test +++ b/mysql-test/main/connect.test @@ -339,16 +339,16 @@ if ($error) --echo # against MySQL 5.1 server --echo # -GRANT ALL ON test.* TO 'O1234567890123456789012345678901234567890123456789012345678901234567890123456789'@'localhost' IDENTIFIED BY 'test123'; +GRANT ALL ON test.* TO 'O1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567'@'localhost' IDENTIFIED BY 'test123'; FLUSH PRIVILEGES; -connect (con1,localhost,O1234567890123456789012345678901234567890123456789012345678901234567890123456789x,test123,test); +connect (con1,localhost, O1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567x,test123,test); disconnect con1; connection default; -DROP USER 'O1234567890123456789012345678901234567890123456789012345678901234567890123456789'@'localhost'; +DROP USER 'O1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567'@'localhost'; FLUSH PRIVILEGES; diff --git a/mysql-test/main/explain_non_select.result b/mysql-test/main/explain_non_select.result index 111b4c8ae50..d1e7af6afde 100644 --- a/mysql-test/main/explain_non_select.result +++ b/mysql-test/main/explain_non_select.result @@ -229,7 +229,7 @@ INSERT INTO t1 VALUES (1),(2); EXPLAIN UPDATE v1, mysql.user SET v1.a = v1.a + 1; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 2 -1 SIMPLE global_priv index NULL PRIMARY 420 NULL 5 Using index +1 SIMPLE global_priv index NULL PRIMARY 1149 NULL 5 Using index DROP TABLE t1; DROP VIEW v1; # diff --git a/mysql-test/main/func_system.result b/mysql-test/main/func_system.result index 06fb7e44cf0..3720cac0b2e 100644 --- a/mysql-test/main/func_system.result +++ b/mysql-test/main/func_system.result @@ -47,7 +47,7 @@ show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `database()` varchar(34) CHARACTER SET utf8 DEFAULT NULL, - `user()` varchar(141) CHARACTER SET utf8 DEFAULT NULL, + `user()` varchar(384) CHARACTER SET utf8 DEFAULT NULL, `version` char(60) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; diff --git a/mysql-test/main/grant.result b/mysql-test/main/grant.result index 92073388b69..17a1a114575 100644 --- a/mysql-test/main/grant.result +++ b/mysql-test/main/grant.result @@ -689,11 +689,11 @@ mysqltest dummytable ALTER, CREATE, CREATE VIEW, DELETE, DELETE HISTORY, DROP, I mysqltest dummyview ALTER, CREATE, CREATE VIEW, DELETE, DELETE HISTORY, DROP, INDEX, INSERT, REFERENCES, SELECT, SHOW VIEW, TRIGGER, UPDATE SHOW FIELDS FROM mysql.tables_priv; Field Type Null Key Default Extra -Host char(60) NO PRI +Host char(255) NO PRI Db char(64) NO PRI -User char(80) NO PRI +User char(128) NO PRI Table_name char(64) NO PRI -Grantor char(141) NO MUL +Grantor varchar(384) NO MUL Timestamp timestamp NO current_timestamp() on update current_timestamp() Table_priv set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger','Delete versioning rows') NO Column_priv set('Select','Insert','Update','References') NO @@ -1134,7 +1134,7 @@ USE test; connection default; disconnect master; create user longer_than_80_456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789; -ERROR HY000: String 'longer_than_80_4567890123456789012345678901234567890123456789012345...' is too long for user name (should be no longer than 80) +ERROR HY000: String 'longer_than_80_4567890123456789012345678901234567890123456789012345...' is too long for user name (should be no longer than 128) CREATE DATABASE mysqltest1; CREATE TABLE mysqltest1.t1 ( int_field INTEGER UNSIGNED NOT NULL, @@ -1220,29 +1220,29 @@ DROP USER mysqltest_1@localhost; DROP DATABASE mysqltest1; USE test; GRANT CREATE ON mysqltest.* TO longer_than_80_456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789@localhost; -ERROR HY000: String 'longer_than_80_4567890123456789012345678901234567890123456789012345...' is too long for user name (should be no longer than 80) -GRANT CREATE ON mysqltest.* TO some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY; -ERROR HY000: String '1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY' is too long for host name (should be no longer than 60) +ERROR HY000: String 'longer_than_80_4567890123456789012345678901234567890123456789012345...' is too long for user name (should be no longer than 128) +GRANT CREATE ON mysqltest.* TO some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYabcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYabcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYabcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYabcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYabcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYabcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYabcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYabcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY; +ERROR HY000: String '1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYa...' is too long for host name (should be no longer than 255) REVOKE CREATE ON mysqltest.* FROM longer_than_80_456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789@localhost; -ERROR HY000: String 'longer_than_80_4567890123456789012345678901234567890123456789012345...' is too long for user name (should be no longer than 80) -REVOKE CREATE ON mysqltest.* FROM some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY; -ERROR HY000: String '1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY' is too long for host name (should be no longer than 60) +ERROR HY000: String 'longer_than_80_4567890123456789012345678901234567890123456789012345...' is too long for user name (should be no longer than 128) +REVOKE CREATE ON mysqltest.* FROM some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYabcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYabcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYabcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYabcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYabcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYabcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYabcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYabcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY; +ERROR HY000: String '1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYa...' is too long for host name (should be no longer than 255) GRANT CREATE ON t1 TO longer_than_80_456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789@localhost; -ERROR HY000: String 'longer_than_80_4567890123456789012345678901234567890123456789012345...' is too long for user name (should be no longer than 80) -GRANT CREATE ON t1 TO some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY; -ERROR HY000: String '1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY' is too long for host name (should be no longer than 60) +ERROR HY000: String 'longer_than_80_4567890123456789012345678901234567890123456789012345...' is too long for user name (should be no longer than 128) +GRANT CREATE ON t1 TO some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY; +ERROR HY000: String '1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1...' is too long for host name (should be no longer than 255) REVOKE CREATE ON t1 FROM longer_than_80_456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789@localhost; -ERROR HY000: String 'longer_than_80_4567890123456789012345678901234567890123456789012345...' is too long for user name (should be no longer than 80) -REVOKE CREATE ON t1 FROM some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY; -ERROR HY000: String '1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY' is too long for host name (should be no longer than 60) +ERROR HY000: String 'longer_than_80_4567890123456789012345678901234567890123456789012345...' is too long for user name (should be no longer than 128) +REVOKE CREATE ON t1 FROM some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY; +ERROR HY000: String '1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1...' is too long for host name (should be no longer than 255) GRANT EXECUTE ON PROCEDURE p1 TO longer_than_80_456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789@localhost; -ERROR HY000: String 'longer_than_80_4567890123456789012345678901234567890123456789012345...' is too long for user name (should be no longer than 80) -GRANT EXECUTE ON PROCEDURE p1 TO some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY; -ERROR HY000: String '1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY' is too long for host name (should be no longer than 60) +ERROR HY000: String 'longer_than_80_4567890123456789012345678901234567890123456789012345...' is too long for user name (should be no longer than 128) +GRANT EXECUTE ON PROCEDURE p1 TO some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY; +ERROR HY000: String '1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1...' is too long for host name (should be no longer than 255) REVOKE EXECUTE ON PROCEDURE p1 FROM longer_than_80_456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789@localhost; -ERROR HY000: String 'longer_than_80_4567890123456789012345678901234567890123456789012345...' is too long for user name (should be no longer than 80) -REVOKE EXECUTE ON PROCEDURE t1 FROM some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY; -ERROR HY000: String '1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY' is too long for host name (should be no longer than 60) +ERROR HY000: String 'longer_than_80_4567890123456789012345678901234567890123456789012345...' is too long for user name (should be no longer than 128) +REVOKE EXECUTE ON PROCEDURE t1 FROM some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY; +ERROR HY000: String '1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1...' is too long for host name (should be no longer than 255) CREATE USER bug23556@localhost; CREATE DATABASE bug23556; GRANT SELECT ON bug23556.* TO bug23556@localhost; @@ -1715,7 +1715,7 @@ drop database mysqltest1; End of 5.0 tests set names utf8; grant select on test.* to очень_длинный_юзер890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890@localhost; -ERROR HY000: String 'очень_длинный_юзер890123456789012345678901234567890...' is too long for user name (should be no longer than 80) +ERROR HY000: String 'очень_длинный_юзер890123456789012345678901234567890...' is too long for user name (should be no longer than 128) set names default; create database mysqltest; use mysqltest; diff --git a/mysql-test/main/grant.test b/mysql-test/main/grant.test index a81e77567b5..82b68b3b6e6 100644 --- a/mysql-test/main/grant.test +++ b/mysql-test/main/grant.test @@ -905,13 +905,13 @@ USE test; GRANT CREATE ON mysqltest.* TO longer_than_80_456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789@localhost; --error ER_WRONG_STRING_LENGTH -GRANT CREATE ON mysqltest.* TO some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY; +GRANT CREATE ON mysqltest.* TO some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYabcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYabcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYabcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYabcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYabcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYabcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYabcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYabcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY; --error ER_WRONG_STRING_LENGTH REVOKE CREATE ON mysqltest.* FROM longer_than_80_456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789@localhost; --error ER_WRONG_STRING_LENGTH -REVOKE CREATE ON mysqltest.* FROM some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY; +REVOKE CREATE ON mysqltest.* FROM some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYabcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYabcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYabcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYabcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYabcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYabcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYabcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYabcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY; # Working with table-level privileges. @@ -919,13 +919,13 @@ REVOKE CREATE ON mysqltest.* FROM some_user_name@1234567890abcdefghij1234567890a GRANT CREATE ON t1 TO longer_than_80_456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789@localhost; --error ER_WRONG_STRING_LENGTH -GRANT CREATE ON t1 TO some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY; +GRANT CREATE ON t1 TO some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY; --error ER_WRONG_STRING_LENGTH REVOKE CREATE ON t1 FROM longer_than_80_456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789@localhost; --error ER_WRONG_STRING_LENGTH -REVOKE CREATE ON t1 FROM some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY; +REVOKE CREATE ON t1 FROM some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY; # Working with routine-level privileges. @@ -933,13 +933,13 @@ REVOKE CREATE ON t1 FROM some_user_name@1234567890abcdefghij1234567890abcdefghij GRANT EXECUTE ON PROCEDURE p1 TO longer_than_80_456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789@localhost; --error ER_WRONG_STRING_LENGTH -GRANT EXECUTE ON PROCEDURE p1 TO some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY; +GRANT EXECUTE ON PROCEDURE p1 TO some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY; --error ER_WRONG_STRING_LENGTH REVOKE EXECUTE ON PROCEDURE p1 FROM longer_than_80_456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789@localhost; --error ER_WRONG_STRING_LENGTH -REVOKE EXECUTE ON PROCEDURE t1 FROM some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY; +REVOKE EXECUTE ON PROCEDURE t1 FROM some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY; # diff --git a/mysql-test/main/grant_4332.result b/mysql-test/main/grant_4332.result index 7fc29795b6f..6a8e3d3f279 100644 --- a/mysql-test/main/grant_4332.result +++ b/mysql-test/main/grant_4332.result @@ -11,7 +11,7 @@ alter table mysql.event modify definer char(77) collate utf8_bin not null defaul flush privileges; select user(); Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def user() 253 77 14 N 1 39 8 +def user() 253 272 14 N 1 39 8 user() root@localhost create user a17aaaaaaaaaaaaa0@localhost; @@ -20,17 +20,17 @@ grant usage on *.* to a17aaaaaaaaaaaaa0@lodalhost; ERROR HY000: String 'a17aaaaaaaaaaaaa0' is too long for user name (should be no longer than 16) drop user a17aaaaaaaaaaaaa0@lodalhost; ERROR HY000: String 'a17aaaaaaaaaaaaa0' is too long for user name (should be no longer than 16) -alter table mysql.user modify User char(80) binary not null default ''; -alter table mysql.db modify User char(80) binary not null default ''; -alter table mysql.tables_priv modify User char(80) binary not null default ''; -alter table mysql.columns_priv modify User char(80) binary not null default ''; -alter table mysql.procs_priv modify User char(80) binary not null default ''; -alter table mysql.proc modify definer char(141) collate utf8_bin not null default ''; -alter table mysql.event modify definer char(141) collate utf8_bin not null default ''; +alter table mysql.user modify User char(128) binary not null default ''; +alter table mysql.db modify User char(128) binary not null default ''; +alter table mysql.tables_priv modify User char(128) binary not null default ''; +alter table mysql.columns_priv modify User char(128) binary not null default ''; +alter table mysql.procs_priv modify User char(128) binary not null default ''; +alter table mysql.proc modify definer varchar(384) collate utf8_bin not null default ''; +alter table mysql.event modify definer varchar(384) collate utf8_bin not null default ''; flush privileges; select user(); Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def user() 253 141 14 N 1 39 8 +def user() 253 384 14 N 1 39 8 user() root@localhost set global sql_mode=default; diff --git a/mysql-test/main/grant_4332.test b/mysql-test/main/grant_4332.test index f723e4afe44..2e46e90d817 100644 --- a/mysql-test/main/grant_4332.test +++ b/mysql-test/main/grant_4332.test @@ -30,13 +30,13 @@ grant usage on *.* to a17aaaaaaaaaaaaa0@lodalhost; --error ER_WRONG_STRING_LENGTH drop user a17aaaaaaaaaaaaa0@lodalhost; -alter table mysql.user modify User char(80) binary not null default ''; -alter table mysql.db modify User char(80) binary not null default ''; -alter table mysql.tables_priv modify User char(80) binary not null default ''; -alter table mysql.columns_priv modify User char(80) binary not null default ''; -alter table mysql.procs_priv modify User char(80) binary not null default ''; -alter table mysql.proc modify definer char(141) collate utf8_bin not null default ''; -alter table mysql.event modify definer char(141) collate utf8_bin not null default ''; +alter table mysql.user modify User char(128) binary not null default ''; +alter table mysql.db modify User char(128) binary not null default ''; +alter table mysql.tables_priv modify User char(128) binary not null default ''; +alter table mysql.columns_priv modify User char(128) binary not null default ''; +alter table mysql.procs_priv modify User char(128) binary not null default ''; +alter table mysql.proc modify definer varchar(384) collate utf8_bin not null default ''; +alter table mysql.event modify definer varchar(384) collate utf8_bin not null default ''; flush privileges; --enable_metadata diff --git a/mysql-test/main/grant_lowercase.result b/mysql-test/main/grant_lowercase.result index 0686977f55f..6bea15b11e2 100644 --- a/mysql-test/main/grant_lowercase.result +++ b/mysql-test/main/grant_lowercase.result @@ -15,5 +15,5 @@ Warnings: Warning 1265 Data truncated for column 'Db' at row 1 flush privileges; delete from mysql.db where db like '=>%'; -alter table mysql.db modify Db char(64) default "", modify User char(80) default ""; +alter table mysql.db modify Db char(64) default "", modify User char(128) default ""; flush privileges; diff --git a/mysql-test/main/grant_lowercase.test b/mysql-test/main/grant_lowercase.test index ffd1d4682a0..ee85bb592d3 100644 --- a/mysql-test/main/grant_lowercase.test +++ b/mysql-test/main/grant_lowercase.test @@ -22,5 +22,5 @@ alter table mysql.db modify User char(16) default "", modify Db varchar(200) def insert mysql.db set db=concat('=>', repeat(_utf8 'й', 200)); flush privileges; # shouldn't crash here delete from mysql.db where db like '=>%'; -alter table mysql.db modify Db char(64) default "", modify User char(80) default ""; +alter table mysql.db modify Db char(64) default "", modify User char(128) default ""; flush privileges; diff --git a/mysql-test/main/information_schema.result b/mysql-test/main/information_schema.result index c849612a53e..28cb26e0a49 100644 --- a/mysql-test/main/information_schema.result +++ b/mysql-test/main/information_schema.result @@ -671,7 +671,7 @@ proc security_type enum('INVOKER','DEFINER') proc param_list blob proc returns longblob proc body longblob -proc definer char(141) +proc definer varchar(384) proc created timestamp proc modified timestamp proc sql_mode set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT','TIME_ROUND_FRACTIONAL') diff --git a/mysql-test/main/information_schema_routines.result b/mysql-test/main/information_schema_routines.result index eaa69adf740..6b67a0bcdcf 100644 --- a/mysql-test/main/information_schema_routines.result +++ b/mysql-test/main/information_schema_routines.result @@ -32,7 +32,7 @@ ROUTINES CREATE TEMPORARY TABLE `ROUTINES` ( `LAST_ALTERED` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `SQL_MODE` varchar(8192) NOT NULL DEFAULT '', `ROUTINE_COMMENT` longtext NOT NULL DEFAULT '', - `DEFINER` varchar(189) NOT NULL DEFAULT '', + `DEFINER` varchar(384) NOT NULL DEFAULT '', `CHARACTER_SET_CLIENT` varchar(32) NOT NULL DEFAULT '', `COLLATION_CONNECTION` varchar(32) NOT NULL DEFAULT '', `DATABASE_COLLATION` varchar(32) NOT NULL DEFAULT '' @@ -643,14 +643,14 @@ ORDINAL_POSITION 28 COLUMN_DEFAULT '' IS_NULLABLE NO DATA_TYPE varchar -CHARACTER_MAXIMUM_LENGTH 189 -CHARACTER_OCTET_LENGTH 567 +CHARACTER_MAXIMUM_LENGTH 384 +CHARACTER_OCTET_LENGTH 1152 NUMERIC_PRECISION NULL NUMERIC_SCALE NULL DATETIME_PRECISION NULL CHARACTER_SET_NAME utf8 COLLATION_NAME utf8_general_ci -COLUMN_TYPE varchar(189) +COLUMN_TYPE varchar(384) COLUMN_KEY EXTRA PRIVILEGES # @@ -752,7 +752,7 @@ CREATED datetime NO 0000-00-00 00:00:00 LAST_ALTERED datetime NO 0000-00-00 00:00:00 SQL_MODE varchar(8192) NO ROUTINE_COMMENT longtext NO -DEFINER varchar(189) NO +DEFINER varchar(384) NO CHARACTER_SET_CLIENT varchar(32) NO COLLATION_CONNECTION varchar(32) NO DATABASE_COLLATION varchar(32) NO diff --git a/mysql-test/main/join.result b/mysql-test/main/join.result index 04b541d2040..8e0212c00b7 100644 --- a/mysql-test/main/join.result +++ b/mysql-test/main/join.result @@ -757,8 +757,8 @@ statistics.TABLE_NAME, statistics.COLUMN_NAME, statistics.TABLE_CATALOG, statist columns.TABLE_CATALOG, columns.TABLE_SCHEMA, columns.COLUMN_DEFAULT, columns.IS_NULLABLE, columns.DATA_TYPE, columns.CHARACTER_MAXIMUM_LENGTH, columns.CHARACTER_OCTET_LENGTH, columns.NUMERIC_PRECISION, columns.NUMERIC_SCALE, columns.CHARACTER_SET_NAME, columns.COLLATION_NAME, columns.COLUMN_TYPE, columns.COLUMN_KEY, columns.EXTRA, columns.COLUMN_COMMENT from information_schema.statistics join information_schema.columns using(table_name,column_name) where table_name='global_priv'; TABLE_NAME COLUMN_NAME TABLE_CATALOG TABLE_SCHEMA NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLLATION SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT TABLE_CATALOG TABLE_SCHEMA COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA COLUMN_COMMENT -global_priv Host def mysql 0 mysql PRIMARY 1 A NULL NULL BTREE def mysql '' NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI -global_priv User def mysql 0 mysql PRIMARY 2 A NULL NULL BTREE def mysql '' NO char 80 240 NULL NULL utf8 utf8_bin char(80) PRI +global_priv Host def mysql 0 mysql PRIMARY 1 A NULL NULL BTREE def mysql '' NO char 255 765 NULL NULL utf8 utf8_bin char(255) PRI +global_priv User def mysql 0 mysql PRIMARY 2 A NULL NULL BTREE def mysql '' NO char 128 384 NULL NULL utf8 utf8_bin char(128) PRI Warnings: Warning 1286 Unknown storage engine 'InnoDB' Warning 1286 Unknown storage engine 'InnoDB' diff --git a/mysql-test/main/long_host.result b/mysql-test/main/long_host.result new file mode 100644 index 00000000000..4c479e36fa9 --- /dev/null +++ b/mysql-test/main/long_host.result @@ -0,0 +1,159 @@ +# check user +create user user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678; +create user user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_3456789; +ERROR HY000: String 'user5678901_345678902_345678903_345678904_345678905_345678906_34567...' is too long for user name (should be no longer than 128) +SELECT host, user FROM mysql.user where user like "user56789%"; +Host User +% user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678 +drop user user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678; +create user user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678@host5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678913_345678914_345678915_345678916_345678917_345678918_345678919_345678920_345678921_345678922_345678923_345678924_345678925_345; +create user user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678@host5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678913_345678914_345678915_345678916_345678917_345678918_345678919_345678920_345678921_345678922_345678923_345678924_345678925_3456; +ERROR HY000: String 'host5678901_345678902_345678903_345678904_345678905_345678906_34567...' is too long for host name (should be no longer than 255) +SELECT host, user FROM mysql.user where user like "user56789%"; +Host User +host5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678913_345678914_345678915_345678916_345678917_345678918_345678919_345678920_345678921_345678922_345678923_345678924_345678925_345 user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678 +create database mariadbtestdb; +create database mariadbtestdb2; +create table mariadbtestdb.t1 (a int, b int); +create table mariadbtestdb2.t2 (a int); +create table mariadbtestdb.t3 (a int); +SET @saved_dbug = @@GLOBAL.debug_dbug; +set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_long_host,getaddrinfo_fake_good_ipv4"; +# check connect +connect con1,"127.0.0.1","user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678",,test,$MASTER_MYPORT,; +connection con1; +select current_user(); +current_user() +user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678@host5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678913_345678914_345678915_345678916_345678917_345678918_345678919_345678920_345678921_345678922_345678923_345678924_345678925_345 +# check global privileges +select * from mariadbtestdb.t1; +ERROR 42000: SELECT command denied to user 'user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678'@'host5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678913_345678914_345678915_345678916_345678917_345678918_345678919_345678920_345678921_345678922_345678923_345678924_345678925_345' for table 't1' +select * from mariadbtestdb2.t2; +ERROR 42000: SELECT command denied to user 'user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678'@'host5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678913_345678914_345678915_345678916_345678917_345678918_345678919_345678920_345678921_345678922_345678923_345678924_345678925_345' for table 't2' +connection default; +grant SELECT ON *.* TO user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678@host5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678913_345678914_345678915_345678916_345678917_345678918_345678919_345678920_345678921_345678922_345678923_345678924_345678925_345; +disconnect con1; +connect con1,"127.0.0.1","user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678",,test,$MASTER_MYPORT,; +connection con1; +select * from mariadbtestdb.t1; +a b +select * from mariadbtestdb2.t2; +a +# check revoke +connection default; +REVOKE ALL PRIVILEGES, GRANT OPTION FROM user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678@host5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678913_345678914_345678915_345678916_345678917_345678918_345678919_345678920_345678921_345678922_345678923_345678924_345678925_345; +disconnect con1; +connect con1,"127.0.0.1","user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678",,test,$MASTER_MYPORT,; +connection con1; +select * from mariadbtestdb.t1; +ERROR 42000: SELECT command denied to user 'user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678'@'host5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678913_345678914_345678915_345678916_345678917_345678918_345678919_345678920_345678921_345678922_345678923_345678924_345678925_345' for table 't1' +select * from mariadbtestdb2.t2; +ERROR 42000: SELECT command denied to user 'user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678'@'host5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678913_345678914_345678915_345678916_345678917_345678918_345678919_345678920_345678921_345678922_345678923_345678924_345678925_345' for table 't2' +# check data base privileges +connection default; +grant SELECT ON mariadbtestdb.* TO user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678@host5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678913_345678914_345678915_345678916_345678917_345678918_345678919_345678920_345678921_345678922_345678923_345678924_345678925_345; +disconnect con1; +connect con1,"127.0.0.1","user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678",,test,$MASTER_MYPORT,; +connection con1; +select * from mariadbtestdb.t1; +a b +select * from mariadbtestdb2.t2; +ERROR 42000: SELECT command denied to user 'user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678'@'host5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678913_345678914_345678915_345678916_345678917_345678918_345678919_345678920_345678921_345678922_345678923_345678924_345678925_345' for table 't2' +select * from mariadbtestdb.t3; +a +# check table privileges +connection default; +REVOKE ALL PRIVILEGES, GRANT OPTION FROM user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678@host5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678913_345678914_345678915_345678916_345678917_345678918_345678919_345678920_345678921_345678922_345678923_345678924_345678925_345; +grant SELECT ON mariadbtestdb.t1 TO user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678@host5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678913_345678914_345678915_345678916_345678917_345678918_345678919_345678920_345678921_345678922_345678923_345678924_345678925_345; +disconnect con1; +connect con1,"127.0.0.1","user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678",,test,$MASTER_MYPORT,; +connection con1; +select * from mariadbtestdb.t1; +a b +select * from mariadbtestdb2.t2; +ERROR 42000: SELECT command denied to user 'user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678'@'host5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678913_345678914_345678915_345678916_345678917_345678918_345678919_345678920_345678921_345678922_345678923_345678924_345678925_345' for table 't2' +select * from mariadbtestdb.t3; +ERROR 42000: SELECT command denied to user 'user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678'@'host5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678913_345678914_345678915_345678916_345678917_345678918_345678919_345678920_345678921_345678922_345678923_345678924_345678925_345' for table 't3' +# check column privileges +connection default; +REVOKE ALL PRIVILEGES, GRANT OPTION FROM user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678@host5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678913_345678914_345678915_345678916_345678917_345678918_345678919_345678920_345678921_345678922_345678923_345678924_345678925_345; +grant SELECT (a) ON mariadbtestdb.t1 TO user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678@host5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678913_345678914_345678915_345678916_345678917_345678918_345678919_345678920_345678921_345678922_345678923_345678924_345678925_345; +disconnect con1; +connect con1,"127.0.0.1","user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678",,test,$MASTER_MYPORT,; +connection con1; +select * from mariadbtestdb.t1; +ERROR 42000: SELECT command denied to user 'user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678'@'host5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678913_345678914_345678915_345678916_345678917_345678918_345678919_345678920_345678921_345678922_345678923_345678924_345678925_345' for table 't1' +select * from mariadbtestdb2.t2; +ERROR 42000: SELECT command denied to user 'user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678'@'host5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678913_345678914_345678915_345678916_345678917_345678918_345678919_345678920_345678921_345678922_345678923_345678924_345678925_345' for table 't2' +select * from mariadbtestdb.t3; +ERROR 42000: SELECT command denied to user 'user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678'@'host5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678913_345678914_345678915_345678916_345678917_345678918_345678919_345678920_345678921_345678922_345678923_345678924_345678925_345' for table 't3' +select a from mariadbtestdb.t1; +a +# check role +connection default; +CREATE ROLE role5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678; +CREATE ROLE role5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_3456789; +ERROR HY000: String 'role5678901_345678902_345678903_345678904_345678905_345678906_34567...' is too long for user name (should be no longer than 128) +grant SELECT (a) ON mariadbtestdb.t1 TO role5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678; +REVOKE ALL PRIVILEGES, GRANT OPTION FROM user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678@host5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678913_345678914_345678915_345678916_345678917_345678918_345678919_345678920_345678921_345678922_345678923_345678924_345678925_345; +grant role5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678 to user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678@host5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678913_345678914_345678915_345678916_345678917_345678918_345678919_345678920_345678921_345678922_345678923_345678924_345678925_345; +disconnect con1; +connect con1,"127.0.0.1","user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678",,test,$MASTER_MYPORT,; +connection con1; +select * from mariadbtestdb.t1; +ERROR 42000: SELECT command denied to user 'user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678'@'host5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678913_345678914_345678915_345678916_345678917_345678918_345678919_345678920_345678921_345678922_345678923_345678924_345678925_345' for table 't1' +select * from mariadbtestdb2.t2; +ERROR 42000: SELECT command denied to user 'user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678'@'host5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678913_345678914_345678915_345678916_345678917_345678918_345678919_345678920_345678921_345678922_345678923_345678924_345678925_345' for table 't2' +select * from mariadbtestdb.t3; +ERROR 42000: SELECT command denied to user 'user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678'@'host5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678913_345678914_345678915_345678916_345678917_345678918_345678919_345678920_345678921_345678922_345678923_345678924_345678925_345' for table 't3' +select a from mariadbtestdb.t1; +ERROR 42000: SELECT command denied to user 'user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678'@'host5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678913_345678914_345678915_345678916_345678917_345678918_345678919_345678920_345678921_345678922_345678923_345678924_345678925_345' for table 't1' +SELECT CURRENT_ROLE; +CURRENT_ROLE +NULL +SET ROLE role5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678; +SELECT CURRENT_ROLE; +CURRENT_ROLE +role5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678 +select * from mariadbtestdb.t1; +ERROR 42000: SELECT command denied to user 'user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678'@'host5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678913_345678914_345678915_345678916_345678917_345678918_345678919_345678920_345678921_345678922_345678923_345678924_345678925_345' for table 't1' +select * from mariadbtestdb2.t2; +ERROR 42000: SELECT command denied to user 'user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678'@'host5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678913_345678914_345678915_345678916_345678917_345678918_345678919_345678920_345678921_345678922_345678923_345678924_345678925_345' for table 't2' +select * from mariadbtestdb.t3; +ERROR 42000: SELECT command denied to user 'user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678'@'host5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678913_345678914_345678915_345678916_345678917_345678918_345678919_345678920_345678921_345678922_345678923_345678924_345678925_345' for table 't3' +select a from mariadbtestdb.t1; +a +# check procedure +create procedure foo() +select a from mariadbtestdb.t1; +show create procedure foo; +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation +foo STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678`@`host5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678913_345678914_345678915_345678916_345678917_345678918_345678919_345678920_345678921_345678922_345678923_345678924_345678925_345` PROCEDURE `foo`() +select a from mariadbtestdb.t1 latin1 latin1_swedish_ci latin1_swedish_ci +connection default; +select Host,Db,User,Routine_name,Routine_type,Grantor,Proc_priv from mysql.procs_priv where Routine_name="foo"; +Host Db User Routine_name Routine_type Grantor Proc_priv +host5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678913_345678914_345678915_345678916_345678917_345678918_345678919_345678920_345678921_345678922_345678923_345678924_345678925_345 test user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678 foo PROCEDURE user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678@host5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678913_345678914_345678915_345678916_345678917_345678918_345678919_345678920_345678921_345678922_345678923_345678924_345678925_345 Execute,Alter Routine +connection default; +disconnect con1; +drop procedure foo; +SET @@GLOBAL.debug_dbug = @saved_dbug; +drop user user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678@host5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678913_345678914_345678915_345678916_345678917_345678918_345678919_345678920_345678921_345678922_345678923_345678924_345678925_345; +DROP ROLE role5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678; +drop database mariadbtestdb; +drop database mariadbtestdb2; +# +# MDEV-24968: Assertion `magic < 1<<26' failed in get_magic_sort +# +create user u1@'host5678901_345678902_345678903_345678904_345678905_345678906_345678907%'; +drop user u1@'host5678901_345678902_345678903_345678904_345678905_345678906_345678907%'; +create user 'user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678'@'host5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678913_345678914_345678915_345678916_345678917_345678918_345678919_345678920_345678921_345678922_345678923_345678924_345678925_34%'; +drop user 'user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678'@'host5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678913_345678914_345678915_345678916_345678917_345678918_345678919_345678920_345678921_345678922_345678923_345678924_345678925_34%'; +create user '5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678'@'%'; +drop user '5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678'@'%'; +create user 'user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678'@'h%s%5%7%9%1%3%5%7%9%2%3%5%7%9%3%3%5%7%9%4%3%5%7%9%5%3%5%7%9%6%3%5%7%9%7%3%5%7%9%8%3%5%7%9%9%3%5%7%9%0%3%5%7%'; +drop user 'user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678'@'h%s%5%7%9%1%3%5%7%9%2%3%5%7%9%3%3%5%7%9%4%3%5%7%9%5%3%5%7%9%6%3%5%7%9%7%3%5%7%9%8%3%5%7%9%9%3%5%7%9%0%3%5%7%'; +create user 'user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678'@'?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%'; +drop user 'user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678'@'?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%'; +create user 'user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678'@'???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????'; +drop user 'user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678'@'???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????'; diff --git a/mysql-test/main/long_host.test b/mysql-test/main/long_host.test new file mode 100644 index 00000000000..f176279749a --- /dev/null +++ b/mysql-test/main/long_host.test @@ -0,0 +1,196 @@ + +--source include/have_debug_sync.inc +--source include/not_embedded.inc + +--echo # check user + +# User 128 characters +create user user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678; +# User 129 characters +--error ER_WRONG_STRING_LENGTH +create user user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_3456789; + +SELECT host, user FROM mysql.user where user like "user56789%"; +drop user user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678; + +# Host 255 characters +create user user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678@host5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678913_345678914_345678915_345678916_345678917_345678918_345678919_345678920_345678921_345678922_345678923_345678924_345678925_345; + +# Host 256 characters +--error ER_WRONG_STRING_LENGTH +create user user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678@host5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678913_345678914_345678915_345678916_345678917_345678918_345678919_345678920_345678921_345678922_345678923_345678924_345678925_3456; + +SELECT host, user FROM mysql.user where user like "user56789%"; + +create database mariadbtestdb; +create database mariadbtestdb2; +create table mariadbtestdb.t1 (a int, b int); +create table mariadbtestdb2.t2 (a int); +create table mariadbtestdb.t3 (a int); + + +SET @saved_dbug = @@GLOBAL.debug_dbug; +set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_long_host,getaddrinfo_fake_good_ipv4"; + +--echo # check connect + +connect (con1,"127.0.0.1","user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678",,test,$MASTER_MYPORT,); +connection con1; +select current_user(); + +--echo # check global privileges + +--error ER_TABLEACCESS_DENIED_ERROR +select * from mariadbtestdb.t1; +--error ER_TABLEACCESS_DENIED_ERROR +select * from mariadbtestdb2.t2; + +connection default; +grant SELECT ON *.* TO user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678@host5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678913_345678914_345678915_345678916_345678917_345678918_345678919_345678920_345678921_345678922_345678923_345678924_345678925_345; +disconnect con1; +connect (con1,"127.0.0.1","user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678",,test,$MASTER_MYPORT,); +connection con1; +select * from mariadbtestdb.t1; +select * from mariadbtestdb2.t2; + + +--echo # check revoke + +connection default; +REVOKE ALL PRIVILEGES, GRANT OPTION FROM user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678@host5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678913_345678914_345678915_345678916_345678917_345678918_345678919_345678920_345678921_345678922_345678923_345678924_345678925_345; +disconnect con1; +connect (con1,"127.0.0.1","user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678",,test,$MASTER_MYPORT,); +connection con1; +--error ER_TABLEACCESS_DENIED_ERROR +select * from mariadbtestdb.t1; +--error ER_TABLEACCESS_DENIED_ERROR +select * from mariadbtestdb2.t2; + + +--echo # check data base privileges + +connection default; +grant SELECT ON mariadbtestdb.* TO user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678@host5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678913_345678914_345678915_345678916_345678917_345678918_345678919_345678920_345678921_345678922_345678923_345678924_345678925_345; +disconnect con1; +connect (con1,"127.0.0.1","user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678",,test,$MASTER_MYPORT,); +connection con1; +select * from mariadbtestdb.t1; +--error ER_TABLEACCESS_DENIED_ERROR +select * from mariadbtestdb2.t2; +select * from mariadbtestdb.t3; + +--echo # check table privileges + +connection default; +REVOKE ALL PRIVILEGES, GRANT OPTION FROM user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678@host5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678913_345678914_345678915_345678916_345678917_345678918_345678919_345678920_345678921_345678922_345678923_345678924_345678925_345; +grant SELECT ON mariadbtestdb.t1 TO user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678@host5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678913_345678914_345678915_345678916_345678917_345678918_345678919_345678920_345678921_345678922_345678923_345678924_345678925_345; +disconnect con1; +connect (con1,"127.0.0.1","user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678",,test,$MASTER_MYPORT,); +connection con1; +select * from mariadbtestdb.t1; +--error ER_TABLEACCESS_DENIED_ERROR +select * from mariadbtestdb2.t2; +--error ER_TABLEACCESS_DENIED_ERROR +select * from mariadbtestdb.t3; + +--echo # check column privileges + +connection default; +REVOKE ALL PRIVILEGES, GRANT OPTION FROM user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678@host5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678913_345678914_345678915_345678916_345678917_345678918_345678919_345678920_345678921_345678922_345678923_345678924_345678925_345; +grant SELECT (a) ON mariadbtestdb.t1 TO user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678@host5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678913_345678914_345678915_345678916_345678917_345678918_345678919_345678920_345678921_345678922_345678923_345678924_345678925_345; +disconnect con1; +connect (con1,"127.0.0.1","user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678",,test,$MASTER_MYPORT,); +connection con1; +--error ER_TABLEACCESS_DENIED_ERROR +select * from mariadbtestdb.t1; +--error ER_TABLEACCESS_DENIED_ERROR +select * from mariadbtestdb2.t2; +--error ER_TABLEACCESS_DENIED_ERROR +select * from mariadbtestdb.t3; +select a from mariadbtestdb.t1; + +--echo # check role + +connection default; + +# Role 128 characters +CREATE ROLE role5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678; + +# Role 129 characters +--error ER_WRONG_STRING_LENGTH +CREATE ROLE role5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_3456789; + +grant SELECT (a) ON mariadbtestdb.t1 TO role5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678; + +REVOKE ALL PRIVILEGES, GRANT OPTION FROM user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678@host5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678913_345678914_345678915_345678916_345678917_345678918_345678919_345678920_345678921_345678922_345678923_345678924_345678925_345; + +grant role5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678 to user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678@host5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678913_345678914_345678915_345678916_345678917_345678918_345678919_345678920_345678921_345678922_345678923_345678924_345678925_345; + +disconnect con1; +connect (con1,"127.0.0.1","user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678",,test,$MASTER_MYPORT,); +connection con1; + +--error ER_TABLEACCESS_DENIED_ERROR +select * from mariadbtestdb.t1; +--error ER_TABLEACCESS_DENIED_ERROR +select * from mariadbtestdb2.t2; +--error ER_TABLEACCESS_DENIED_ERROR +select * from mariadbtestdb.t3; +--error ER_TABLEACCESS_DENIED_ERROR +select a from mariadbtestdb.t1; + +SELECT CURRENT_ROLE; +SET ROLE role5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678; +SELECT CURRENT_ROLE; + +--error ER_TABLEACCESS_DENIED_ERROR +select * from mariadbtestdb.t1; +--error ER_TABLEACCESS_DENIED_ERROR +select * from mariadbtestdb2.t2; +--error ER_TABLEACCESS_DENIED_ERROR +select * from mariadbtestdb.t3; +select a from mariadbtestdb.t1; + + +--echo # check procedure + +create procedure foo() + select a from mariadbtestdb.t1; +show create procedure foo; + +connection default; +select Host,Db,User,Routine_name,Routine_type,Grantor,Proc_priv from mysql.procs_priv where Routine_name="foo"; + + +connection default; +disconnect con1; +drop procedure foo; + +SET @@GLOBAL.debug_dbug = @saved_dbug; + +drop user user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678@host5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678913_345678914_345678915_345678916_345678917_345678918_345678919_345678920_345678921_345678922_345678923_345678924_345678925_345; +DROP ROLE role5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678; +drop database mariadbtestdb; +drop database mariadbtestdb2; + +--echo # +--echo # MDEV-24968: Assertion `magic < 1<<26' failed in get_magic_sort +--echo # + +create user u1@'host5678901_345678902_345678903_345678904_345678905_345678906_345678907%'; +drop user u1@'host5678901_345678902_345678903_345678904_345678905_345678906_345678907%'; + +create user 'user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678'@'host5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678913_345678914_345678915_345678916_345678917_345678918_345678919_345678920_345678921_345678922_345678923_345678924_345678925_34%'; + +drop user 'user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678'@'host5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678913_345678914_345678915_345678916_345678917_345678918_345678919_345678920_345678921_345678922_345678923_345678924_345678925_34%'; + +create user '5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678'@'%'; +drop user '5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678'@'%'; + +create user 'user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678'@'h%s%5%7%9%1%3%5%7%9%2%3%5%7%9%3%3%5%7%9%4%3%5%7%9%5%3%5%7%9%6%3%5%7%9%7%3%5%7%9%8%3%5%7%9%9%3%5%7%9%0%3%5%7%'; +drop user 'user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678'@'h%s%5%7%9%1%3%5%7%9%2%3%5%7%9%3%3%5%7%9%4%3%5%7%9%5%3%5%7%9%6%3%5%7%9%7%3%5%7%9%8%3%5%7%9%9%3%5%7%9%0%3%5%7%'; +create user 'user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678'@'?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%'; +drop user 'user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678'@'?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%?%'; + +create user 'user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678'@'???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????'; +drop user 'user5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678'@'???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????'; diff --git a/mysql-test/main/long_unique_bugs.result b/mysql-test/main/long_unique_bugs.result index d4bb64581de..043361f77f8 100644 --- a/mysql-test/main/long_unique_bugs.result +++ b/mysql-test/main/long_unique_bugs.result @@ -269,7 +269,7 @@ disconnect con1; connection default; DROP TABLE t1, t2; CREATE TABLE t1 (a TEXT, UNIQUE(a)) ENGINE=Aria; -ERROR 42000: Specified key was too long; max key length is 2000 bytes +ERROR 42000: Specified key was too long; max key length is 2300 bytes create table t1(a int, unique(a) using hash); #BULK insert > 100 rows (MI_MIN_ROWS_TO_DISABLE_INDEXES) drop table t1; diff --git a/mysql-test/main/mysqldump-system.result b/mysql-test/main/mysqldump-system.result index 2fa010b3e4e..3beaced5793 100644 --- a/mysql-test/main/mysqldump-system.result +++ b/mysql-test/main/mysqldump-system.result @@ -438,10 +438,10 @@ localhost root {"access":18446744073709551615} CHECKSUM TABLE mysql.roles_mapping, mysql.time_zone_transition, mysql.plugin, mysql.servers, mysql.func, mysql.innodb_table_stats, mysql.table_stats; Table Checksum -mysql.roles_mapping 3150178430 +mysql.roles_mapping 4108206491 mysql.time_zone_transition 3895294076 mysql.plugin 0 -mysql.servers 2783974349 +mysql.servers 2079085450 mysql.func 3241572444 mysql.innodb_table_stats 347867921 mysql.table_stats 664320059 @@ -473,10 +473,10 @@ localhost root {"access":549755813887,"version_id":VERSION,"plugin":"mysql_nativ CHECKSUM TABLE mysql.roles_mapping, mysql.time_zone_transition, mysql.plugin, mysql.servers, mysql.func, mysql.innodb_table_stats, mysql.table_stats; Table Checksum -mysql.roles_mapping 3150178430 +mysql.roles_mapping 4108206491 mysql.time_zone_transition 3895294076 mysql.plugin 0 -mysql.servers 2783974349 +mysql.servers 2079085450 mysql.func 3241572444 mysql.innodb_table_stats 347867921 mysql.table_stats 664320059 diff --git a/mysql-test/main/plugin_auth.result b/mysql-test/main/plugin_auth.result index 73c384734bd..5c8f55e38ec 100644 --- a/mysql-test/main/plugin_auth.result +++ b/mysql-test/main/plugin_auth.result @@ -23,12 +23,12 @@ test mysql.proxies_priv; SHOW CREATE TABLE mysql.proxies_priv; Table Create Table proxies_priv CREATE TABLE `proxies_priv` ( - `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', - `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', - `Proxied_host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', - `Proxied_user` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', + `Host` char(255) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(128) COLLATE utf8_bin NOT NULL DEFAULT '', + `Proxied_host` char(255) COLLATE utf8_bin NOT NULL DEFAULT '', + `Proxied_user` char(128) COLLATE utf8_bin NOT NULL DEFAULT '', `With_grant` tinyint(1) NOT NULL DEFAULT 0, - `Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '', + `Grantor` varchar(384) COLLATE utf8_bin NOT NULL DEFAULT '', `Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), PRIMARY KEY (`Host`,`User`,`Proxied_host`,`Proxied_user`), KEY `Grantor` (`Grantor`) diff --git a/mysql-test/main/show_check.result b/mysql-test/main/show_check.result index 4cc58a74c4a..92f55045dc4 100644 --- a/mysql-test/main/show_check.result +++ b/mysql-test/main/show_check.result @@ -1023,7 +1023,7 @@ def information_schema TRIGGERS TRIGGERS ACTION_STATEMENT Statement 252 589815 1 def information_schema TRIGGERS TRIGGERS ACTION_TIMING Timing 253 18 6 N 1 0 33 def information_schema TRIGGERS TRIGGERS CREATED Created 12 22 22 Y 128 2 63 def information_schema TRIGGERS TRIGGERS SQL_MODE sql_mode 253 24576 89 N 1 0 33 -def information_schema TRIGGERS TRIGGERS DEFINER Definer 253 567 14 N 1 0 33 +def information_schema TRIGGERS TRIGGERS DEFINER Definer 253 1152 14 N 1 0 33 def information_schema TRIGGERS TRIGGERS CHARACTER_SET_CLIENT character_set_client 253 96 6 N 1 0 33 def information_schema TRIGGERS TRIGGERS COLLATION_CONNECTION collation_connection 253 96 6 N 1 0 33 def information_schema TRIGGERS TRIGGERS DATABASE_COLLATION Database Collation 253 96 17 N 1 0 33 @@ -1067,7 +1067,7 @@ def information_schema TRIGGERS TRIGGERS ACTION_REFERENCE_NEW_TABLE ACTION_REFER def information_schema TRIGGERS TRIGGERS ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_OLD_ROW 253 9 3 N 1 0 33 def information_schema TRIGGERS TRIGGERS ACTION_REFERENCE_NEW_ROW ACTION_REFERENCE_NEW_ROW 253 9 3 N 1 0 33 def information_schema TRIGGERS TRIGGERS SQL_MODE SQL_MODE 253 24576 89 N 1 0 33 -def information_schema TRIGGERS TRIGGERS DEFINER DEFINER 253 567 14 N 1 0 33 +def information_schema TRIGGERS TRIGGERS DEFINER DEFINER 253 1152 14 N 1 0 33 TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW SQL_MODE DEFINER def test t1_bi INSERT def test t1 NULL SET @a = 1 ROW BEFORE NULL NULL OLD NEW STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost SELECT CREATED FROM INFORMATION_SCHEMA.TRIGGERS WHERE trigger_name='t1_bi'; @@ -1095,7 +1095,7 @@ def information_schema VIEWS VIEWS TABLE_NAME TABLE_NAME 253 192 2 N 1 0 33 def information_schema VIEWS VIEWS VIEW_DEFINITION VIEW_DEFINITION 252 589815 15 N 17 0 33 def information_schema VIEWS VIEWS CHECK_OPTION CHECK_OPTION 253 24 4 N 1 0 33 def information_schema VIEWS VIEWS IS_UPDATABLE IS_UPDATABLE 253 9 2 N 1 0 33 -def information_schema VIEWS VIEWS DEFINER DEFINER 253 567 14 N 1 0 33 +def information_schema VIEWS VIEWS DEFINER DEFINER 253 1152 14 N 1 0 33 def information_schema VIEWS VIEWS SECURITY_TYPE SECURITY_TYPE 253 21 7 N 1 0 33 def information_schema VIEWS VIEWS CHARACTER_SET_CLIENT CHARACTER_SET_CLIENT 253 96 6 N 1 0 33 def information_schema VIEWS VIEWS COLLATION_CONNECTION COLLATION_CONNECTION 253 96 6 N 1 0 33 @@ -1154,7 +1154,7 @@ def information_schema ROUTINES ROUTINES SQL_PATH SQL_PATH 253 192 0 Y 0 0 33 def information_schema ROUTINES ROUTINES SECURITY_TYPE SECURITY_TYPE 253 21 7 N 1 0 33 def information_schema ROUTINES ROUTINES SQL_MODE SQL_MODE 253 24576 89 N 1 0 33 def information_schema ROUTINES ROUTINES ROUTINE_COMMENT ROUTINE_COMMENT 252 589815 0 N 17 0 33 -def information_schema ROUTINES ROUTINES DEFINER DEFINER 253 567 14 N 1 0 33 +def information_schema ROUTINES ROUTINES DEFINER DEFINER 253 1152 14 N 1 0 33 SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE SQL_MODE ROUTINE_COMMENT DEFINER p1 def test p1 PROCEDURE NULL SQL SELECT 1 NULL NULL SQL NO CONTAINS SQL NULL DEFINER STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost ---------------------------------------------------------------- @@ -1209,7 +1209,7 @@ def information_schema ROUTINES ROUTINES SQL_PATH SQL_PATH 253 192 0 Y 0 0 33 def information_schema ROUTINES ROUTINES SECURITY_TYPE SECURITY_TYPE 253 21 7 N 1 0 33 def information_schema ROUTINES ROUTINES SQL_MODE SQL_MODE 253 24576 89 N 1 0 33 def information_schema ROUTINES ROUTINES ROUTINE_COMMENT ROUTINE_COMMENT 252 589815 0 N 17 0 33 -def information_schema ROUTINES ROUTINES DEFINER DEFINER 253 567 14 N 1 0 33 +def information_schema ROUTINES ROUTINES DEFINER DEFINER 253 1152 14 N 1 0 33 SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE SQL_MODE ROUTINE_COMMENT DEFINER f1 def test f1 FUNCTION int(11) SQL RETURN 1 NULL NULL SQL NO CONTAINS SQL NULL DEFINER STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost ---------------------------------------------------------------- diff --git a/mysql-test/main/sp.result b/mysql-test/main/sp.result index 3aff3f7e96f..14e809c4bda 100644 --- a/mysql-test/main/sp.result +++ b/mysql-test/main/sp.result @@ -5277,13 +5277,13 @@ CREATE DEFINER=longer_than_80_45678901234567890123456789012345678901234567890123 BEGIN SET @a = 1; END| -ERROR HY000: String 'longer_than_80_4567890123456789012345678901234567890123456789012345...' is too long for user name (should be no longer than 80) -CREATE DEFINER=some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY +ERROR HY000: String 'longer_than_80_4567890123456789012345678901234567890123456789012345...' is too long for user name (should be no longer than 128) +CREATE DEFINER=some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY FUNCTION bug16899_f1() RETURNS INT BEGIN RETURN 1; END| -ERROR HY000: String '1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY' is too long for host name (should be no longer than 60) +ERROR HY000: String '1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1...' is too long for host name (should be no longer than 255) drop procedure if exists bug21416| create procedure bug21416() show create procedure bug21416| call bug21416()| diff --git a/mysql-test/main/sp.test b/mysql-test/main/sp.test index a909d11bd81..7a7378e4e34 100644 --- a/mysql-test/main/sp.test +++ b/mysql-test/main/sp.test @@ -6265,7 +6265,7 @@ BEGIN END| --error ER_WRONG_STRING_LENGTH -CREATE DEFINER=some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY +CREATE DEFINER=some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY FUNCTION bug16899_f1() RETURNS INT BEGIN RETURN 1; diff --git a/mysql-test/main/system_mysql_db.result b/mysql-test/main/system_mysql_db.result index 37ade694489..e04a4101ff3 100644 --- a/mysql-test/main/system_mysql_db.result +++ b/mysql-test/main/system_mysql_db.result @@ -34,9 +34,9 @@ user show create table db; Table Create Table db CREATE TABLE `db` ( - `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Host` char(255) COLLATE utf8_bin NOT NULL DEFAULT '', `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(128) COLLATE utf8_bin NOT NULL DEFAULT '', `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', @@ -75,19 +75,19 @@ func CREATE TABLE `func` ( show create table global_priv; Table Create Table global_priv CREATE TABLE `global_priv` ( - `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', - `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', + `Host` char(255) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(128) COLLATE utf8_bin NOT NULL DEFAULT '', `Priv` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '{}' CHECK (json_valid(`Priv`)), PRIMARY KEY (`Host`,`User`) ) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Users and global privileges' show create table tables_priv; Table Create Table tables_priv CREATE TABLE `tables_priv` ( - `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Host` char(255) COLLATE utf8_bin NOT NULL DEFAULT '', `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(128) COLLATE utf8_bin NOT NULL DEFAULT '', `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '', + `Grantor` varchar(384) COLLATE utf8_bin NOT NULL DEFAULT '', `Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger','Delete versioning rows') CHARACTER SET utf8 NOT NULL DEFAULT '', `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '', @@ -97,9 +97,9 @@ tables_priv CREATE TABLE `tables_priv` ( show create table columns_priv; Table Create Table columns_priv CREATE TABLE `columns_priv` ( - `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Host` char(255) COLLATE utf8_bin NOT NULL DEFAULT '', `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(128) COLLATE utf8_bin NOT NULL DEFAULT '', `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', `Column_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', `Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), @@ -109,12 +109,12 @@ columns_priv CREATE TABLE `columns_priv` ( show create table procs_priv; Table Create Table procs_priv CREATE TABLE `procs_priv` ( - `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Host` char(255) COLLATE utf8_bin NOT NULL DEFAULT '', `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(128) COLLATE utf8_bin NOT NULL DEFAULT '', `Routine_name` char(64) CHARACTER SET utf8 NOT NULL DEFAULT '', `Routine_type` enum('FUNCTION','PROCEDURE','PACKAGE','PACKAGE BODY') COLLATE utf8_bin NOT NULL, - `Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '', + `Grantor` varchar(384) COLLATE utf8_bin NOT NULL DEFAULT '', `Proc_priv` set('Execute','Alter Routine','Grant') CHARACTER SET utf8 NOT NULL DEFAULT '', `Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), PRIMARY KEY (`Host`,`Db`,`User`,`Routine_name`,`Routine_type`), @@ -126,7 +126,7 @@ servers CREATE TABLE `servers` ( `Server_name` char(64) NOT NULL DEFAULT '', `Host` varchar(2048) NOT NULL DEFAULT '', `Db` char(64) NOT NULL DEFAULT '', - `Username` char(80) NOT NULL DEFAULT '', + `Username` char(128) NOT NULL DEFAULT '', `Password` char(64) NOT NULL DEFAULT '', `Port` int(4) NOT NULL DEFAULT 0, `Socket` char(64) NOT NULL DEFAULT '', @@ -148,7 +148,7 @@ proc CREATE TABLE `proc` ( `param_list` blob NOT NULL, `returns` longblob NOT NULL, `body` longblob NOT NULL, - `definer` char(141) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `definer` varchar(384) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', `created` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT','TIME_ROUND_FRACTIONAL') NOT NULL DEFAULT '', @@ -166,7 +166,7 @@ event CREATE TABLE `event` ( `db` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', `name` char(64) NOT NULL DEFAULT '', `body` longblob NOT NULL, - `definer` char(141) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `definer` varchar(384) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', `execute_at` datetime DEFAULT NULL, `interval_value` int(11) DEFAULT NULL, `interval_field` enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') DEFAULT NULL, diff --git a/mysql-test/main/system_mysql_db_fix40123.result b/mysql-test/main/system_mysql_db_fix40123.result index c1bf2f492f1..29365c258e8 100644 --- a/mysql-test/main/system_mysql_db_fix40123.result +++ b/mysql-test/main/system_mysql_db_fix40123.result @@ -72,9 +72,9 @@ user show create table db; Table Create Table db CREATE TABLE `db` ( - `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Host` char(255) COLLATE utf8_bin NOT NULL DEFAULT '', `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(128) COLLATE utf8_bin NOT NULL DEFAULT '', `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', @@ -113,19 +113,19 @@ func CREATE TABLE `func` ( show create table global_priv; Table Create Table global_priv CREATE TABLE `global_priv` ( - `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', - `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', + `Host` char(255) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(128) COLLATE utf8_bin NOT NULL DEFAULT '', `Priv` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '{}' CHECK (json_valid(`Priv`)), PRIMARY KEY (`Host`,`User`) ) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Users and global privileges' show create table tables_priv; Table Create Table tables_priv CREATE TABLE `tables_priv` ( - `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Host` char(255) COLLATE utf8_bin NOT NULL DEFAULT '', `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(128) COLLATE utf8_bin NOT NULL DEFAULT '', `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '', + `Grantor` varchar(384) COLLATE utf8_bin NOT NULL DEFAULT '', `Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger','Delete versioning rows') CHARACTER SET utf8 NOT NULL DEFAULT '', `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '', @@ -135,9 +135,9 @@ tables_priv CREATE TABLE `tables_priv` ( show create table columns_priv; Table Create Table columns_priv CREATE TABLE `columns_priv` ( - `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Host` char(255) COLLATE utf8_bin NOT NULL DEFAULT '', `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(128) COLLATE utf8_bin NOT NULL DEFAULT '', `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', `Column_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', `Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), @@ -147,12 +147,12 @@ columns_priv CREATE TABLE `columns_priv` ( show create table procs_priv; Table Create Table procs_priv CREATE TABLE `procs_priv` ( - `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Host` char(255) COLLATE utf8_bin NOT NULL DEFAULT '', `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(128) COLLATE utf8_bin NOT NULL DEFAULT '', `Routine_name` char(64) CHARACTER SET utf8 NOT NULL DEFAULT '', `Routine_type` enum('FUNCTION','PROCEDURE','PACKAGE','PACKAGE BODY') COLLATE utf8_bin NOT NULL, - `Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '', + `Grantor` varchar(384) COLLATE utf8_bin NOT NULL DEFAULT '', `Proc_priv` set('Execute','Alter Routine','Grant') CHARACTER SET utf8 NOT NULL DEFAULT '', `Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), PRIMARY KEY (`Host`,`Db`,`User`,`Routine_name`,`Routine_type`), @@ -164,7 +164,7 @@ servers CREATE TABLE `servers` ( `Server_name` char(64) NOT NULL DEFAULT '', `Host` varchar(2048) NOT NULL DEFAULT '', `Db` char(64) NOT NULL DEFAULT '', - `Username` char(80) NOT NULL DEFAULT '', + `Username` char(128) NOT NULL DEFAULT '', `Password` char(64) NOT NULL DEFAULT '', `Port` int(4) NOT NULL DEFAULT 0, `Socket` char(64) NOT NULL DEFAULT '', @@ -186,7 +186,7 @@ proc CREATE TABLE `proc` ( `param_list` blob NOT NULL, `returns` longblob NOT NULL, `body` longblob NOT NULL, - `definer` char(141) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `definer` varchar(384) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', `created` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT','TIME_ROUND_FRACTIONAL') NOT NULL DEFAULT '', @@ -204,7 +204,7 @@ event CREATE TABLE `event` ( `db` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', `name` char(64) NOT NULL DEFAULT '', `body` longblob NOT NULL, - `definer` char(141) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `definer` varchar(384) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', `execute_at` datetime DEFAULT NULL, `interval_value` int(11) DEFAULT NULL, `interval_field` enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') DEFAULT NULL, diff --git a/mysql-test/main/system_mysql_db_fix50030.result b/mysql-test/main/system_mysql_db_fix50030.result index bb003eabffe..b9fd226a7e0 100644 --- a/mysql-test/main/system_mysql_db_fix50030.result +++ b/mysql-test/main/system_mysql_db_fix50030.result @@ -76,9 +76,9 @@ user show create table db; Table Create Table db CREATE TABLE `db` ( - `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Host` char(255) COLLATE utf8_bin NOT NULL DEFAULT '', `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(128) COLLATE utf8_bin NOT NULL DEFAULT '', `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', @@ -117,19 +117,19 @@ func CREATE TABLE `func` ( show create table global_priv; Table Create Table global_priv CREATE TABLE `global_priv` ( - `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', - `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', + `Host` char(255) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(128) COLLATE utf8_bin NOT NULL DEFAULT '', `Priv` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '{}' CHECK (json_valid(`Priv`)), PRIMARY KEY (`Host`,`User`) ) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Users and global privileges' show create table tables_priv; Table Create Table tables_priv CREATE TABLE `tables_priv` ( - `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Host` char(255) COLLATE utf8_bin NOT NULL DEFAULT '', `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(128) COLLATE utf8_bin NOT NULL DEFAULT '', `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '', + `Grantor` varchar(384) COLLATE utf8_bin NOT NULL DEFAULT '', `Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger','Delete versioning rows') CHARACTER SET utf8 NOT NULL DEFAULT '', `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '', @@ -139,9 +139,9 @@ tables_priv CREATE TABLE `tables_priv` ( show create table columns_priv; Table Create Table columns_priv CREATE TABLE `columns_priv` ( - `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Host` char(255) COLLATE utf8_bin NOT NULL DEFAULT '', `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(128) COLLATE utf8_bin NOT NULL DEFAULT '', `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', `Column_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', `Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), @@ -153,10 +153,10 @@ Table Create Table procs_priv CREATE TABLE `procs_priv` ( `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(128) COLLATE utf8_bin NOT NULL DEFAULT '', `Routine_name` char(64) CHARACTER SET utf8 NOT NULL DEFAULT '', `Routine_type` enum('FUNCTION','PROCEDURE','PACKAGE','PACKAGE BODY') COLLATE utf8_bin NOT NULL, - `Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '', + `Grantor` varchar(384) COLLATE utf8_bin NOT NULL DEFAULT '', `Proc_priv` set('Execute','Alter Routine','Grant') CHARACTER SET utf8 NOT NULL DEFAULT '', `Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), PRIMARY KEY (`Host`,`Db`,`User`,`Routine_name`,`Routine_type`), @@ -168,7 +168,7 @@ servers CREATE TABLE `servers` ( `Server_name` char(64) NOT NULL DEFAULT '', `Host` char(64) NOT NULL DEFAULT '', `Db` char(64) NOT NULL DEFAULT '', - `Username` char(80) NOT NULL DEFAULT '', + `Username` char(128) NOT NULL DEFAULT '', `Password` char(64) NOT NULL DEFAULT '', `Port` int(4) NOT NULL DEFAULT 0, `Socket` char(64) NOT NULL DEFAULT '', @@ -190,7 +190,7 @@ proc CREATE TABLE `proc` ( `param_list` blob NOT NULL DEFAULT '', `returns` longblob NOT NULL, `body` longblob NOT NULL, - `definer` char(141) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `definer` varchar(384) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', `created` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT','TIME_ROUND_FRACTIONAL') NOT NULL DEFAULT '', @@ -208,7 +208,7 @@ event CREATE TABLE `event` ( `db` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', `name` char(64) NOT NULL DEFAULT '', `body` longblob NOT NULL, - `definer` char(141) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `definer` varchar(384) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', `execute_at` datetime DEFAULT NULL, `interval_value` int(11) DEFAULT NULL, `interval_field` enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') DEFAULT NULL, diff --git a/mysql-test/main/system_mysql_db_fix50117.result b/mysql-test/main/system_mysql_db_fix50117.result index 1557817fc80..c81892806c8 100644 --- a/mysql-test/main/system_mysql_db_fix50117.result +++ b/mysql-test/main/system_mysql_db_fix50117.result @@ -56,9 +56,9 @@ user show create table db; Table Create Table db CREATE TABLE `db` ( - `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Host` char(255) COLLATE utf8_bin NOT NULL DEFAULT '', `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(128) COLLATE utf8_bin NOT NULL DEFAULT '', `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', @@ -97,19 +97,19 @@ func CREATE TABLE `func` ( show create table global_priv; Table Create Table global_priv CREATE TABLE `global_priv` ( - `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', - `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', + `Host` char(255) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(128) COLLATE utf8_bin NOT NULL DEFAULT '', `Priv` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '{}' CHECK (json_valid(`Priv`)), PRIMARY KEY (`Host`,`User`) ) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Users and global privileges' show create table tables_priv; Table Create Table tables_priv CREATE TABLE `tables_priv` ( - `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Host` char(255) COLLATE utf8_bin NOT NULL DEFAULT '', `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(128) COLLATE utf8_bin NOT NULL DEFAULT '', `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '', + `Grantor` varchar(384) COLLATE utf8_bin NOT NULL DEFAULT '', `Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger','Delete versioning rows') CHARACTER SET utf8 NOT NULL DEFAULT '', `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '', @@ -119,9 +119,9 @@ tables_priv CREATE TABLE `tables_priv` ( show create table columns_priv; Table Create Table columns_priv CREATE TABLE `columns_priv` ( - `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Host` char(255) COLLATE utf8_bin NOT NULL DEFAULT '', `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(128) COLLATE utf8_bin NOT NULL DEFAULT '', `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', `Column_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', `Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), @@ -133,10 +133,10 @@ Table Create Table procs_priv CREATE TABLE `procs_priv` ( `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(128) COLLATE utf8_bin NOT NULL DEFAULT '', `Routine_name` char(64) CHARACTER SET utf8 NOT NULL DEFAULT '', `Routine_type` enum('FUNCTION','PROCEDURE','PACKAGE','PACKAGE BODY') COLLATE utf8_bin NOT NULL, - `Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '', + `Grantor` varchar(384) COLLATE utf8_bin NOT NULL DEFAULT '', `Proc_priv` set('Execute','Alter Routine','Grant') CHARACTER SET utf8 NOT NULL DEFAULT '', `Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), PRIMARY KEY (`Host`,`Db`,`User`,`Routine_name`,`Routine_type`), @@ -148,7 +148,7 @@ servers CREATE TABLE `servers` ( `Server_name` char(64) NOT NULL DEFAULT '', `Host` char(64) NOT NULL DEFAULT '', `Db` char(64) NOT NULL DEFAULT '', - `Username` char(80) NOT NULL DEFAULT '', + `Username` char(128) NOT NULL DEFAULT '', `Password` char(64) NOT NULL DEFAULT '', `Port` int(4) NOT NULL DEFAULT 0, `Socket` char(64) NOT NULL DEFAULT '', @@ -170,7 +170,7 @@ proc CREATE TABLE `proc` ( `param_list` blob NOT NULL, `returns` longblob NOT NULL, `body` longblob NOT NULL, - `definer` char(141) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `definer` varchar(384) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', `created` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT','TIME_ROUND_FRACTIONAL') NOT NULL DEFAULT '', @@ -188,7 +188,7 @@ event CREATE TABLE `event` ( `db` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', `name` char(64) NOT NULL DEFAULT '', `body` longblob NOT NULL, - `definer` char(141) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `definer` varchar(384) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', `execute_at` datetime DEFAULT NULL, `interval_value` int(11) DEFAULT NULL, `interval_field` enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') DEFAULT NULL, diff --git a/mysql-test/main/trigger.result b/mysql-test/main/trigger.result index 339394a29c2..26b14926481 100644 --- a/mysql-test/main/trigger.result +++ b/mysql-test/main/trigger.result @@ -1187,10 +1187,10 @@ CREATE TABLE t1(c INT); CREATE TABLE t2(c INT); CREATE DEFINER=longer_than_80_456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789@localhost TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1; -ERROR HY000: String 'longer_than_80_4567890123456789012345678901234567890123456789012345...' is too long for user name (should be no longer than 80) -CREATE DEFINER=some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY +ERROR HY000: String 'longer_than_80_4567890123456789012345678901234567890123456789012345...' is too long for user name (should be no longer than 128) +CREATE DEFINER=some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYsome_user_name1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYsome_user_name1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYsome_user_name1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYsome_user_name1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYsome_user_name1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYsome_user_name1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYvvv234567890abcdefghijQWERTYvvvjdnkjfbewfjefnkejfnejfnERTYvvvjdnkjfbewfjefnkejfnejfn TRIGGER t2_bi BEFORE INSERT ON t2 FOR EACH ROW SET @a = 2; -ERROR HY000: String '1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY' is too long for host name (should be no longer than 60) +ERROR HY000: String '1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYs...' is too long for host name (should be no longer than 255) DROP TABLE t1; DROP TABLE t2; drop table if exists t1; diff --git a/mysql-test/main/trigger.test b/mysql-test/main/trigger.test index 543d516010d..0461d5195c3 100644 --- a/mysql-test/main/trigger.test +++ b/mysql-test/main/trigger.test @@ -1413,7 +1413,7 @@ CREATE DEFINER=longer_than_80_45678901234567890123456789012345678901234567890123 TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1; --error ER_WRONG_STRING_LENGTH -CREATE DEFINER=some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY +CREATE DEFINER=some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYsome_user_name1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYsome_user_name1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYsome_user_name1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYsome_user_name1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYsome_user_name1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYsome_user_name1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYvvv234567890abcdefghijQWERTYvvvjdnkjfbewfjefnkejfnejfnERTYvvvjdnkjfbewfjefnkejfnejfn TRIGGER t2_bi BEFORE INSERT ON t2 FOR EACH ROW SET @a = 2; # Cleanup. diff --git a/mysql-test/main/view.result b/mysql-test/main/view.result index 5d171268624..0bb4bda4c28 100644 --- a/mysql-test/main/view.result +++ b/mysql-test/main/view.result @@ -2907,10 +2907,10 @@ DROP VIEW IF EXISTS v2; CREATE TABLE t1(a INT, b INT); CREATE DEFINER=longer_than_80_456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789@localhost VIEW v1 AS SELECT a FROM t1; -ERROR HY000: String 'longer_than_80_4567890123456789012345678901234567890123456789012345...' is too long for user name (should be no longer than 80) -CREATE DEFINER=some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY +ERROR HY000: String 'longer_than_80_4567890123456789012345678901234567890123456789012345...' is too long for user name (should be no longer than 128) +CREATE DEFINER=some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYabcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYabcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYabcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYabcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYabcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYabcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYsome_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYabcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYabcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYabcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYabcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYabcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYabcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY VIEW v2 AS SELECT b FROM t1; -ERROR HY000: String '1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY' is too long for host name (should be no longer than 60) +ERROR HY000: String '1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYa...' is too long for host name (should be no longer than 255) DROP TABLE t1; DROP FUNCTION IF EXISTS f1; DROP FUNCTION IF EXISTS f2; diff --git a/mysql-test/main/view.test b/mysql-test/main/view.test index b504600de91..805afedc8ae 100644 --- a/mysql-test/main/view.test +++ b/mysql-test/main/view.test @@ -2812,7 +2812,7 @@ CREATE DEFINER=longer_than_80_45678901234567890123456789012345678901234567890123 VIEW v1 AS SELECT a FROM t1; --error ER_WRONG_STRING_LENGTH -CREATE DEFINER=some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY +CREATE DEFINER=some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYabcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYabcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYabcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYabcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYabcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYabcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYsome_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYabcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYabcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYabcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYabcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYabcdefghij1234567890abcdefghij1234567890abcdefghijQWERTYabcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY VIEW v2 AS SELECT b FROM t1; # Cleanup. diff --git a/mysql-test/suite/funcs_1/r/is_column_privileges.result b/mysql-test/suite/funcs_1/r/is_column_privileges.result index b6be9118048..9aba0b53e30 100644 --- a/mysql-test/suite/funcs_1/r/is_column_privileges.result +++ b/mysql-test/suite/funcs_1/r/is_column_privileges.result @@ -28,7 +28,7 @@ DROP FUNCTION test.f1; ######################################################################### DESCRIBE information_schema.COLUMN_PRIVILEGES; Field Type Null Key Default Extra -GRANTEE varchar(190) NO +GRANTEE varchar(385) NO TABLE_CATALOG varchar(512) NO TABLE_SCHEMA varchar(64) NO TABLE_NAME varchar(64) NO @@ -38,7 +38,7 @@ IS_GRANTABLE varchar(3) NO SHOW CREATE TABLE information_schema.COLUMN_PRIVILEGES; Table Create Table COLUMN_PRIVILEGES CREATE TEMPORARY TABLE `COLUMN_PRIVILEGES` ( - `GRANTEE` varchar(190) NOT NULL DEFAULT '', + `GRANTEE` varchar(385) NOT NULL DEFAULT '', `TABLE_CATALOG` varchar(512) NOT NULL DEFAULT '', `TABLE_SCHEMA` varchar(64) NOT NULL DEFAULT '', `TABLE_NAME` varchar(64) NOT NULL DEFAULT '', @@ -48,7 +48,7 @@ COLUMN_PRIVILEGES CREATE TEMPORARY TABLE `COLUMN_PRIVILEGES` ( ) ENGINE=MEMORY DEFAULT CHARSET=utf8 SHOW COLUMNS FROM information_schema.COLUMN_PRIVILEGES; Field Type Null Key Default Extra -GRANTEE varchar(190) NO +GRANTEE varchar(385) NO TABLE_CATALOG varchar(512) NO TABLE_SCHEMA varchar(64) NO TABLE_NAME varchar(64) NO diff --git a/mysql-test/suite/funcs_1/r/is_columns_is.result b/mysql-test/suite/funcs_1/r/is_columns_is.result index 324aa680d47..50525b74547 100644 --- a/mysql-test/suite/funcs_1/r/is_columns_is.result +++ b/mysql-test/suite/funcs_1/r/is_columns_is.result @@ -16,7 +16,7 @@ def information_schema ALL_PLUGINS PLUGIN_STATUS 3 '' NO varchar 16 48 NULL NULL def information_schema ALL_PLUGINS PLUGIN_TYPE 4 '' NO varchar 80 240 NULL NULL NULL utf8 utf8_general_ci varchar(80) select NEVER NULL def information_schema ALL_PLUGINS PLUGIN_TYPE_VERSION 5 '' NO varchar 20 60 NULL NULL NULL utf8 utf8_general_ci varchar(20) select NEVER NULL def information_schema ALL_PLUGINS PLUGIN_VERSION 2 '' NO varchar 20 60 NULL NULL NULL utf8 utf8_general_ci varchar(20) select NEVER NULL -def information_schema APPLICABLE_ROLES GRANTEE 1 '' NO varchar 190 570 NULL NULL NULL utf8 utf8_general_ci varchar(190) select NEVER NULL +def information_schema APPLICABLE_ROLES GRANTEE 1 '' NO varchar 385 1155 NULL NULL NULL utf8 utf8_general_ci varchar(385) select NEVER NULL def information_schema APPLICABLE_ROLES IS_DEFAULT 4 NULL YES varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) select NEVER NULL def information_schema APPLICABLE_ROLES IS_GRANTABLE 3 '' NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) select NEVER NULL def information_schema APPLICABLE_ROLES ROLE_NAME 2 '' NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select NEVER NULL @@ -86,7 +86,7 @@ def information_schema COLUMNS TABLE_CATALOG 1 '' NO varchar 512 1536 NULL NULL def information_schema COLUMNS TABLE_NAME 3 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL def information_schema COLUMNS TABLE_SCHEMA 2 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL def information_schema COLUMN_PRIVILEGES COLUMN_NAME 5 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema COLUMN_PRIVILEGES GRANTEE 1 '' NO varchar 190 570 NULL NULL NULL utf8 utf8_general_ci varchar(190) select NEVER NULL +def information_schema COLUMN_PRIVILEGES GRANTEE 1 '' NO varchar 385 1155 NULL NULL NULL utf8 utf8_general_ci varchar(385) select NEVER NULL def information_schema COLUMN_PRIVILEGES IS_GRANTABLE 7 '' NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) select NEVER NULL def information_schema COLUMN_PRIVILEGES PRIVILEGE_TYPE 6 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL def information_schema COLUMN_PRIVILEGES TABLE_CATALOG 2 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL @@ -103,7 +103,7 @@ def information_schema EVENTS CHARACTER_SET_CLIENT 22 '' NO varchar 32 96 NULL N def information_schema EVENTS COLLATION_CONNECTION 23 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select NEVER NULL def information_schema EVENTS CREATED 17 '0000-00-00 00:00:00' NO datetime NULL NULL NULL NULL 0 NULL NULL datetime select NEVER NULL def information_schema EVENTS DATABASE_COLLATION 24 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select NEVER NULL -def information_schema EVENTS DEFINER 4 '' NO varchar 189 567 NULL NULL NULL utf8 utf8_general_ci varchar(189) select NEVER NULL +def information_schema EVENTS DEFINER 4 '' NO varchar 384 1152 NULL NULL NULL utf8 utf8_general_ci varchar(384) select NEVER NULL def information_schema EVENTS ENDS 14 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime select NEVER NULL def information_schema EVENTS EVENT_BODY 6 '' NO varchar 8 24 NULL NULL NULL utf8 utf8_general_ci varchar(8) select NEVER NULL def information_schema EVENTS EVENT_CATALOG 1 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL @@ -303,7 +303,7 @@ def information_schema ROUTINES CREATED 24 '0000-00-00 00:00:00' NO datetime NUL def information_schema ROUTINES DATABASE_COLLATION 31 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select NEVER NULL def information_schema ROUTINES DATA_TYPE 6 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL def information_schema ROUTINES DATETIME_PRECISION 11 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL -def information_schema ROUTINES DEFINER 28 '' NO varchar 189 567 NULL NULL NULL utf8 utf8_general_ci varchar(189) select NEVER NULL +def information_schema ROUTINES DEFINER 28 '' NO varchar 384 1152 NULL NULL NULL utf8 utf8_general_ci varchar(384) select NEVER NULL def information_schema ROUTINES DTD_IDENTIFIER 14 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select NEVER NULL def information_schema ROUTINES EXTERNAL_LANGUAGE 18 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL def information_schema ROUTINES EXTERNAL_NAME 17 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL @@ -330,7 +330,7 @@ def information_schema SCHEMATA DEFAULT_COLLATION_NAME 4 '' NO varchar 32 96 NUL def information_schema SCHEMATA SCHEMA_COMMENT 6 '' NO varchar 1024 3072 NULL NULL NULL utf8 utf8_general_ci varchar(1024) select NEVER NULL def information_schema SCHEMATA SCHEMA_NAME 2 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL def information_schema SCHEMATA SQL_PATH 5 NULL YES varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL -def information_schema SCHEMA_PRIVILEGES GRANTEE 1 '' NO varchar 190 570 NULL NULL NULL utf8 utf8_general_ci varchar(190) select NEVER NULL +def information_schema SCHEMA_PRIVILEGES GRANTEE 1 '' NO varchar 385 1155 NULL NULL NULL utf8 utf8_general_ci varchar(385) select NEVER NULL def information_schema SCHEMA_PRIVILEGES IS_GRANTABLE 5 '' NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) select NEVER NULL def information_schema SCHEMA_PRIVILEGES PRIVILEGE_TYPE 4 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL def information_schema SCHEMA_PRIVILEGES TABLE_CATALOG 2 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL @@ -413,7 +413,7 @@ def information_schema TABLE_CONSTRAINTS CONSTRAINT_SCHEMA 2 '' NO varchar 64 19 def information_schema TABLE_CONSTRAINTS CONSTRAINT_TYPE 6 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL def information_schema TABLE_CONSTRAINTS TABLE_NAME 5 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL def information_schema TABLE_CONSTRAINTS TABLE_SCHEMA 4 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema TABLE_PRIVILEGES GRANTEE 1 '' NO varchar 190 570 NULL NULL NULL utf8 utf8_general_ci varchar(190) select NEVER NULL +def information_schema TABLE_PRIVILEGES GRANTEE 1 '' NO varchar 385 1155 NULL NULL NULL utf8 utf8_general_ci varchar(385) select NEVER NULL def information_schema TABLE_PRIVILEGES IS_GRANTABLE 6 '' NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) select NEVER NULL def information_schema TABLE_PRIVILEGES PRIVILEGE_TYPE 5 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL def information_schema TABLE_PRIVILEGES TABLE_CATALOG 2 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL @@ -437,7 +437,7 @@ def information_schema TRIGGERS CHARACTER_SET_CLIENT 20 '' NO varchar 32 96 NULL def information_schema TRIGGERS COLLATION_CONNECTION 21 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select NEVER NULL def information_schema TRIGGERS CREATED 17 NULL YES datetime NULL NULL NULL NULL 2 NULL NULL datetime(2) select NEVER NULL def information_schema TRIGGERS DATABASE_COLLATION 22 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select NEVER NULL -def information_schema TRIGGERS DEFINER 19 '' NO varchar 189 567 NULL NULL NULL utf8 utf8_general_ci varchar(189) select NEVER NULL +def information_schema TRIGGERS DEFINER 19 '' NO varchar 384 1152 NULL NULL NULL utf8 utf8_general_ci varchar(384) select NEVER NULL def information_schema TRIGGERS EVENT_MANIPULATION 4 '' NO varchar 6 18 NULL NULL NULL utf8 utf8_general_ci varchar(6) select NEVER NULL def information_schema TRIGGERS EVENT_OBJECT_CATALOG 5 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL def information_schema TRIGGERS EVENT_OBJECT_SCHEMA 6 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL @@ -446,7 +446,7 @@ def information_schema TRIGGERS SQL_MODE 18 '' NO varchar 8192 24576 NULL NULL N def information_schema TRIGGERS TRIGGER_CATALOG 1 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL def information_schema TRIGGERS TRIGGER_NAME 3 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL def information_schema TRIGGERS TRIGGER_SCHEMA 2 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema USER_PRIVILEGES GRANTEE 1 '' NO varchar 190 570 NULL NULL NULL utf8 utf8_general_ci varchar(190) select NEVER NULL +def information_schema USER_PRIVILEGES GRANTEE 1 '' NO varchar 385 1155 NULL NULL NULL utf8 utf8_general_ci varchar(385) select NEVER NULL def information_schema USER_PRIVILEGES IS_GRANTABLE 4 '' NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) select NEVER NULL def information_schema USER_PRIVILEGES PRIVILEGE_TYPE 3 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL def information_schema USER_PRIVILEGES TABLE_CATALOG 2 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL @@ -479,7 +479,7 @@ def information_schema VIEWS ALGORITHM 11 '' NO varchar 10 30 NULL NULL NULL utf def information_schema VIEWS CHARACTER_SET_CLIENT 9 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select NEVER NULL def information_schema VIEWS CHECK_OPTION 5 '' NO varchar 8 24 NULL NULL NULL utf8 utf8_general_ci varchar(8) select NEVER NULL def information_schema VIEWS COLLATION_CONNECTION 10 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select NEVER NULL -def information_schema VIEWS DEFINER 7 '' NO varchar 189 567 NULL NULL NULL utf8 utf8_general_ci varchar(189) select NEVER NULL +def information_schema VIEWS DEFINER 7 '' NO varchar 384 1152 NULL NULL NULL utf8 utf8_general_ci varchar(384) select NEVER NULL def information_schema VIEWS IS_UPDATABLE 6 '' NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) select NEVER NULL def information_schema VIEWS SECURITY_TYPE 8 '' NO varchar 7 21 NULL NULL NULL utf8 utf8_general_ci varchar(7) select NEVER NULL def information_schema VIEWS TABLE_CATALOG 1 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL @@ -562,7 +562,7 @@ COL_CML TABLE_SCHEMA TABLE_NAME COLUMN_NAME DATA_TYPE CHARACTER_MAXIMUM_LENGTH C 3.0000 information_schema ALL_PLUGINS LOAD_OPTION varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema ALL_PLUGINS PLUGIN_MATURITY varchar 12 36 utf8 utf8_general_ci varchar(12) 3.0000 information_schema ALL_PLUGINS PLUGIN_AUTH_VERSION varchar 80 240 utf8 utf8_general_ci varchar(80) -3.0000 information_schema APPLICABLE_ROLES GRANTEE varchar 190 570 utf8 utf8_general_ci varchar(190) +3.0000 information_schema APPLICABLE_ROLES GRANTEE varchar 385 1155 utf8 utf8_general_ci varchar(385) 3.0000 information_schema APPLICABLE_ROLES ROLE_NAME varchar 128 384 utf8 utf8_general_ci varchar(128) 3.0000 information_schema APPLICABLE_ROLES IS_GRANTABLE varchar 3 9 utf8 utf8_general_ci varchar(3) 3.0000 information_schema APPLICABLE_ROLES IS_DEFAULT varchar 3 9 utf8 utf8_general_ci varchar(3) @@ -631,7 +631,7 @@ NULL information_schema COLUMNS DATETIME_PRECISION bigint NULL NULL NULL NULL bi 3.0000 information_schema COLUMNS COLUMN_COMMENT varchar 1024 3072 utf8 utf8_general_ci varchar(1024) 3.0000 information_schema COLUMNS IS_GENERATED varchar 6 18 utf8 utf8_general_ci varchar(6) 1.0000 information_schema COLUMNS GENERATION_EXPRESSION longtext 4294967295 4294967295 utf8 utf8_general_ci longtext -3.0000 information_schema COLUMN_PRIVILEGES GRANTEE varchar 190 570 utf8 utf8_general_ci varchar(190) +3.0000 information_schema COLUMN_PRIVILEGES GRANTEE varchar 385 1155 utf8 utf8_general_ci varchar(385) 3.0000 information_schema COLUMN_PRIVILEGES TABLE_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512) 3.0000 information_schema COLUMN_PRIVILEGES TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema COLUMN_PRIVILEGES TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) @@ -648,7 +648,7 @@ NULL information_schema COLUMNS DATETIME_PRECISION bigint NULL NULL NULL NULL bi 3.0000 information_schema EVENTS EVENT_CATALOG varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema EVENTS EVENT_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema EVENTS EVENT_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema EVENTS DEFINER varchar 189 567 utf8 utf8_general_ci varchar(189) +3.0000 information_schema EVENTS DEFINER varchar 384 1152 utf8 utf8_general_ci varchar(384) 3.0000 information_schema EVENTS TIME_ZONE varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema EVENTS EVENT_BODY varchar 8 24 utf8 utf8_general_ci varchar(8) 1.0000 information_schema EVENTS EVENT_DEFINITION longtext 4294967295 4294967295 utf8 utf8_general_ci longtext @@ -866,7 +866,7 @@ NULL information_schema ROUTINES CREATED datetime NULL NULL NULL NULL datetime NULL information_schema ROUTINES LAST_ALTERED datetime NULL NULL NULL NULL datetime 3.0000 information_schema ROUTINES SQL_MODE varchar 8192 24576 utf8 utf8_general_ci varchar(8192) 1.0000 information_schema ROUTINES ROUTINE_COMMENT longtext 4294967295 4294967295 utf8 utf8_general_ci longtext -3.0000 information_schema ROUTINES DEFINER varchar 189 567 utf8 utf8_general_ci varchar(189) +3.0000 information_schema ROUTINES DEFINER varchar 384 1152 utf8 utf8_general_ci varchar(384) 3.0000 information_schema ROUTINES CHARACTER_SET_CLIENT varchar 32 96 utf8 utf8_general_ci varchar(32) 3.0000 information_schema ROUTINES COLLATION_CONNECTION varchar 32 96 utf8 utf8_general_ci varchar(32) 3.0000 information_schema ROUTINES DATABASE_COLLATION varchar 32 96 utf8 utf8_general_ci varchar(32) @@ -876,7 +876,7 @@ NULL information_schema ROUTINES LAST_ALTERED datetime NULL NULL NULL NULL datet 3.0000 information_schema SCHEMATA DEFAULT_COLLATION_NAME varchar 32 96 utf8 utf8_general_ci varchar(32) 3.0000 information_schema SCHEMATA SQL_PATH varchar 512 1536 utf8 utf8_general_ci varchar(512) 3.0000 information_schema SCHEMATA SCHEMA_COMMENT varchar 1024 3072 utf8 utf8_general_ci varchar(1024) -3.0000 information_schema SCHEMA_PRIVILEGES GRANTEE varchar 190 570 utf8 utf8_general_ci varchar(190) +3.0000 information_schema SCHEMA_PRIVILEGES GRANTEE varchar 385 1155 utf8 utf8_general_ci varchar(385) 3.0000 information_schema SCHEMA_PRIVILEGES TABLE_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512) 3.0000 information_schema SCHEMA_PRIVILEGES TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema SCHEMA_PRIVILEGES PRIVILEGE_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64) @@ -959,7 +959,7 @@ NULL information_schema TABLESPACES NODEGROUP_ID bigint NULL NULL NULL NULL bigi 3.0000 information_schema TABLE_CONSTRAINTS TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema TABLE_CONSTRAINTS TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema TABLE_CONSTRAINTS CONSTRAINT_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema TABLE_PRIVILEGES GRANTEE varchar 190 570 utf8 utf8_general_ci varchar(190) +3.0000 information_schema TABLE_PRIVILEGES GRANTEE varchar 385 1155 utf8 utf8_general_ci varchar(385) 3.0000 information_schema TABLE_PRIVILEGES TABLE_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512) 3.0000 information_schema TABLE_PRIVILEGES TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema TABLE_PRIVILEGES TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) @@ -988,11 +988,11 @@ NULL information_schema TRIGGERS ACTION_ORDER bigint NULL NULL NULL NULL bigint( 3.0000 information_schema TRIGGERS ACTION_REFERENCE_NEW_ROW varchar 3 9 utf8 utf8_general_ci varchar(3) NULL information_schema TRIGGERS CREATED datetime NULL NULL NULL NULL datetime(2) 3.0000 information_schema TRIGGERS SQL_MODE varchar 8192 24576 utf8 utf8_general_ci varchar(8192) -3.0000 information_schema TRIGGERS DEFINER varchar 189 567 utf8 utf8_general_ci varchar(189) +3.0000 information_schema TRIGGERS DEFINER varchar 384 1152 utf8 utf8_general_ci varchar(384) 3.0000 information_schema TRIGGERS CHARACTER_SET_CLIENT varchar 32 96 utf8 utf8_general_ci varchar(32) 3.0000 information_schema TRIGGERS COLLATION_CONNECTION varchar 32 96 utf8 utf8_general_ci varchar(32) 3.0000 information_schema TRIGGERS DATABASE_COLLATION varchar 32 96 utf8 utf8_general_ci varchar(32) -3.0000 information_schema USER_PRIVILEGES GRANTEE varchar 190 570 utf8 utf8_general_ci varchar(190) +3.0000 information_schema USER_PRIVILEGES GRANTEE varchar 385 1155 utf8 utf8_general_ci varchar(385) 3.0000 information_schema USER_PRIVILEGES TABLE_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512) 3.0000 information_schema USER_PRIVILEGES PRIVILEGE_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema USER_PRIVILEGES IS_GRANTABLE varchar 3 9 utf8 utf8_general_ci varchar(3) @@ -1027,7 +1027,7 @@ NULL information_schema USER_STATISTICS MAX_STATEMENT_TIME_EXCEEDED bigint NULL 1.0000 information_schema VIEWS VIEW_DEFINITION longtext 4294967295 4294967295 utf8 utf8_general_ci longtext 3.0000 information_schema VIEWS CHECK_OPTION varchar 8 24 utf8 utf8_general_ci varchar(8) 3.0000 information_schema VIEWS IS_UPDATABLE varchar 3 9 utf8 utf8_general_ci varchar(3) -3.0000 information_schema VIEWS DEFINER varchar 189 567 utf8 utf8_general_ci varchar(189) +3.0000 information_schema VIEWS DEFINER varchar 384 1152 utf8 utf8_general_ci varchar(384) 3.0000 information_schema VIEWS SECURITY_TYPE varchar 7 21 utf8 utf8_general_ci varchar(7) 3.0000 information_schema VIEWS CHARACTER_SET_CLIENT varchar 32 96 utf8 utf8_general_ci varchar(32) 3.0000 information_schema VIEWS COLLATION_CONNECTION varchar 32 96 utf8 utf8_general_ci varchar(32) diff --git a/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result b/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result index 49ba54d3bb5..4d6362d7a6e 100644 --- a/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result +++ b/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result @@ -16,7 +16,7 @@ def information_schema ALL_PLUGINS PLUGIN_STATUS 3 '' NO varchar 16 48 NULL NULL def information_schema ALL_PLUGINS PLUGIN_TYPE 4 '' NO varchar 80 240 NULL NULL NULL utf8 utf8_general_ci varchar(80) NEVER NULL def information_schema ALL_PLUGINS PLUGIN_TYPE_VERSION 5 '' NO varchar 20 60 NULL NULL NULL utf8 utf8_general_ci varchar(20) NEVER NULL def information_schema ALL_PLUGINS PLUGIN_VERSION 2 '' NO varchar 20 60 NULL NULL NULL utf8 utf8_general_ci varchar(20) NEVER NULL -def information_schema APPLICABLE_ROLES GRANTEE 1 '' NO varchar 190 570 NULL NULL NULL utf8 utf8_general_ci varchar(190) NEVER NULL +def information_schema APPLICABLE_ROLES GRANTEE 1 '' NO varchar 385 1155 NULL NULL NULL utf8 utf8_general_ci varchar(385) NEVER NULL def information_schema APPLICABLE_ROLES IS_DEFAULT 4 NULL YES varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) NEVER NULL def information_schema APPLICABLE_ROLES IS_GRANTABLE 3 '' NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) NEVER NULL def information_schema APPLICABLE_ROLES ROLE_NAME 2 '' NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) NEVER NULL @@ -86,7 +86,7 @@ def information_schema COLUMNS TABLE_CATALOG 1 '' NO varchar 512 1536 NULL NULL def information_schema COLUMNS TABLE_NAME 3 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL def information_schema COLUMNS TABLE_SCHEMA 2 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL def information_schema COLUMN_PRIVILEGES COLUMN_NAME 5 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema COLUMN_PRIVILEGES GRANTEE 1 '' NO varchar 190 570 NULL NULL NULL utf8 utf8_general_ci varchar(190) NEVER NULL +def information_schema COLUMN_PRIVILEGES GRANTEE 1 '' NO varchar 385 1155 NULL NULL NULL utf8 utf8_general_ci varchar(385) NEVER NULL def information_schema COLUMN_PRIVILEGES IS_GRANTABLE 7 '' NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) NEVER NULL def information_schema COLUMN_PRIVILEGES PRIVILEGE_TYPE 6 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL def information_schema COLUMN_PRIVILEGES TABLE_CATALOG 2 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL @@ -103,7 +103,7 @@ def information_schema EVENTS CHARACTER_SET_CLIENT 22 '' NO varchar 32 96 NULL N def information_schema EVENTS COLLATION_CONNECTION 23 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) NEVER NULL def information_schema EVENTS CREATED 17 '0000-00-00 00:00:00' NO datetime NULL NULL NULL NULL 0 NULL NULL datetime NEVER NULL def information_schema EVENTS DATABASE_COLLATION 24 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) NEVER NULL -def information_schema EVENTS DEFINER 4 '' NO varchar 189 567 NULL NULL NULL utf8 utf8_general_ci varchar(189) NEVER NULL +def information_schema EVENTS DEFINER 4 '' NO varchar 384 1152 NULL NULL NULL utf8 utf8_general_ci varchar(384) NEVER NULL def information_schema EVENTS ENDS 14 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime NEVER NULL def information_schema EVENTS EVENT_BODY 6 '' NO varchar 8 24 NULL NULL NULL utf8 utf8_general_ci varchar(8) NEVER NULL def information_schema EVENTS EVENT_CATALOG 1 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL @@ -303,7 +303,7 @@ def information_schema ROUTINES CREATED 24 '0000-00-00 00:00:00' NO datetime NUL def information_schema ROUTINES DATABASE_COLLATION 31 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) NEVER NULL def information_schema ROUTINES DATA_TYPE 6 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL def information_schema ROUTINES DATETIME_PRECISION 11 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL -def information_schema ROUTINES DEFINER 28 '' NO varchar 189 567 NULL NULL NULL utf8 utf8_general_ci varchar(189) NEVER NULL +def information_schema ROUTINES DEFINER 28 '' NO varchar 384 1152 NULL NULL NULL utf8 utf8_general_ci varchar(384) NEVER NULL def information_schema ROUTINES DTD_IDENTIFIER 14 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext NEVER NULL def information_schema ROUTINES EXTERNAL_LANGUAGE 18 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL def information_schema ROUTINES EXTERNAL_NAME 17 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL @@ -330,7 +330,7 @@ def information_schema SCHEMATA DEFAULT_COLLATION_NAME 4 '' NO varchar 32 96 NUL def information_schema SCHEMATA SCHEMA_COMMENT 6 '' NO varchar 1024 3072 NULL NULL NULL utf8 utf8_general_ci varchar(1024) NEVER NULL def information_schema SCHEMATA SCHEMA_NAME 2 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL def information_schema SCHEMATA SQL_PATH 5 NULL YES varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL -def information_schema SCHEMA_PRIVILEGES GRANTEE 1 '' NO varchar 190 570 NULL NULL NULL utf8 utf8_general_ci varchar(190) NEVER NULL +def information_schema SCHEMA_PRIVILEGES GRANTEE 1 '' NO varchar 385 1155 NULL NULL NULL utf8 utf8_general_ci varchar(385) NEVER NULL def information_schema SCHEMA_PRIVILEGES IS_GRANTABLE 5 '' NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) NEVER NULL def information_schema SCHEMA_PRIVILEGES PRIVILEGE_TYPE 4 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL def information_schema SCHEMA_PRIVILEGES TABLE_CATALOG 2 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL @@ -413,7 +413,7 @@ def information_schema TABLE_CONSTRAINTS CONSTRAINT_SCHEMA 2 '' NO varchar 64 19 def information_schema TABLE_CONSTRAINTS CONSTRAINT_TYPE 6 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL def information_schema TABLE_CONSTRAINTS TABLE_NAME 5 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL def information_schema TABLE_CONSTRAINTS TABLE_SCHEMA 4 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema TABLE_PRIVILEGES GRANTEE 1 '' NO varchar 190 570 NULL NULL NULL utf8 utf8_general_ci varchar(190) NEVER NULL +def information_schema TABLE_PRIVILEGES GRANTEE 1 '' NO varchar 385 1155 NULL NULL NULL utf8 utf8_general_ci varchar(385) NEVER NULL def information_schema TABLE_PRIVILEGES IS_GRANTABLE 6 '' NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) NEVER NULL def information_schema TABLE_PRIVILEGES PRIVILEGE_TYPE 5 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL def information_schema TABLE_PRIVILEGES TABLE_CATALOG 2 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL @@ -437,7 +437,7 @@ def information_schema TRIGGERS CHARACTER_SET_CLIENT 20 '' NO varchar 32 96 NULL def information_schema TRIGGERS COLLATION_CONNECTION 21 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) NEVER NULL def information_schema TRIGGERS CREATED 17 NULL YES datetime NULL NULL NULL NULL 2 NULL NULL datetime(2) NEVER NULL def information_schema TRIGGERS DATABASE_COLLATION 22 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) NEVER NULL -def information_schema TRIGGERS DEFINER 19 '' NO varchar 189 567 NULL NULL NULL utf8 utf8_general_ci varchar(189) NEVER NULL +def information_schema TRIGGERS DEFINER 19 '' NO varchar 384 1152 NULL NULL NULL utf8 utf8_general_ci varchar(384) NEVER NULL def information_schema TRIGGERS EVENT_MANIPULATION 4 '' NO varchar 6 18 NULL NULL NULL utf8 utf8_general_ci varchar(6) NEVER NULL def information_schema TRIGGERS EVENT_OBJECT_CATALOG 5 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL def information_schema TRIGGERS EVENT_OBJECT_SCHEMA 6 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL @@ -446,7 +446,7 @@ def information_schema TRIGGERS SQL_MODE 18 '' NO varchar 8192 24576 NULL NULL N def information_schema TRIGGERS TRIGGER_CATALOG 1 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL def information_schema TRIGGERS TRIGGER_NAME 3 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL def information_schema TRIGGERS TRIGGER_SCHEMA 2 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema USER_PRIVILEGES GRANTEE 1 '' NO varchar 190 570 NULL NULL NULL utf8 utf8_general_ci varchar(190) NEVER NULL +def information_schema USER_PRIVILEGES GRANTEE 1 '' NO varchar 385 1155 NULL NULL NULL utf8 utf8_general_ci varchar(385) NEVER NULL def information_schema USER_PRIVILEGES IS_GRANTABLE 4 '' NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) NEVER NULL def information_schema USER_PRIVILEGES PRIVILEGE_TYPE 3 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL def information_schema USER_PRIVILEGES TABLE_CATALOG 2 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL @@ -479,7 +479,7 @@ def information_schema VIEWS ALGORITHM 11 '' NO varchar 10 30 NULL NULL NULL utf def information_schema VIEWS CHARACTER_SET_CLIENT 9 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) NEVER NULL def information_schema VIEWS CHECK_OPTION 5 '' NO varchar 8 24 NULL NULL NULL utf8 utf8_general_ci varchar(8) NEVER NULL def information_schema VIEWS COLLATION_CONNECTION 10 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) NEVER NULL -def information_schema VIEWS DEFINER 7 '' NO varchar 189 567 NULL NULL NULL utf8 utf8_general_ci varchar(189) NEVER NULL +def information_schema VIEWS DEFINER 7 '' NO varchar 384 1152 NULL NULL NULL utf8 utf8_general_ci varchar(384) NEVER NULL def information_schema VIEWS IS_UPDATABLE 6 '' NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) NEVER NULL def information_schema VIEWS SECURITY_TYPE 8 '' NO varchar 7 21 NULL NULL NULL utf8 utf8_general_ci varchar(7) NEVER NULL def information_schema VIEWS TABLE_CATALOG 1 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL @@ -562,7 +562,7 @@ COL_CML TABLE_SCHEMA TABLE_NAME COLUMN_NAME DATA_TYPE CHARACTER_MAXIMUM_LENGTH C 3.0000 information_schema ALL_PLUGINS LOAD_OPTION varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema ALL_PLUGINS PLUGIN_MATURITY varchar 12 36 utf8 utf8_general_ci varchar(12) 3.0000 information_schema ALL_PLUGINS PLUGIN_AUTH_VERSION varchar 80 240 utf8 utf8_general_ci varchar(80) -3.0000 information_schema APPLICABLE_ROLES GRANTEE varchar 190 570 utf8 utf8_general_ci varchar(190) +3.0000 information_schema APPLICABLE_ROLES GRANTEE varchar 385 1155 utf8 utf8_general_ci varchar(385) 3.0000 information_schema APPLICABLE_ROLES ROLE_NAME varchar 128 384 utf8 utf8_general_ci varchar(128) 3.0000 information_schema APPLICABLE_ROLES IS_GRANTABLE varchar 3 9 utf8 utf8_general_ci varchar(3) 3.0000 information_schema APPLICABLE_ROLES IS_DEFAULT varchar 3 9 utf8 utf8_general_ci varchar(3) @@ -631,7 +631,7 @@ NULL information_schema COLUMNS DATETIME_PRECISION bigint NULL NULL NULL NULL bi 3.0000 information_schema COLUMNS COLUMN_COMMENT varchar 1024 3072 utf8 utf8_general_ci varchar(1024) 3.0000 information_schema COLUMNS IS_GENERATED varchar 6 18 utf8 utf8_general_ci varchar(6) 1.0000 information_schema COLUMNS GENERATION_EXPRESSION longtext 4294967295 4294967295 utf8 utf8_general_ci longtext -3.0000 information_schema COLUMN_PRIVILEGES GRANTEE varchar 190 570 utf8 utf8_general_ci varchar(190) +3.0000 information_schema COLUMN_PRIVILEGES GRANTEE varchar 385 1155 utf8 utf8_general_ci varchar(385) 3.0000 information_schema COLUMN_PRIVILEGES TABLE_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512) 3.0000 information_schema COLUMN_PRIVILEGES TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema COLUMN_PRIVILEGES TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) @@ -648,7 +648,7 @@ NULL information_schema COLUMNS DATETIME_PRECISION bigint NULL NULL NULL NULL bi 3.0000 information_schema EVENTS EVENT_CATALOG varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema EVENTS EVENT_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema EVENTS EVENT_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema EVENTS DEFINER varchar 189 567 utf8 utf8_general_ci varchar(189) +3.0000 information_schema EVENTS DEFINER varchar 384 1152 utf8 utf8_general_ci varchar(384) 3.0000 information_schema EVENTS TIME_ZONE varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema EVENTS EVENT_BODY varchar 8 24 utf8 utf8_general_ci varchar(8) 1.0000 information_schema EVENTS EVENT_DEFINITION longtext 4294967295 4294967295 utf8 utf8_general_ci longtext @@ -866,7 +866,7 @@ NULL information_schema ROUTINES CREATED datetime NULL NULL NULL NULL datetime NULL information_schema ROUTINES LAST_ALTERED datetime NULL NULL NULL NULL datetime 3.0000 information_schema ROUTINES SQL_MODE varchar 8192 24576 utf8 utf8_general_ci varchar(8192) 1.0000 information_schema ROUTINES ROUTINE_COMMENT longtext 4294967295 4294967295 utf8 utf8_general_ci longtext -3.0000 information_schema ROUTINES DEFINER varchar 189 567 utf8 utf8_general_ci varchar(189) +3.0000 information_schema ROUTINES DEFINER varchar 384 1152 utf8 utf8_general_ci varchar(384) 3.0000 information_schema ROUTINES CHARACTER_SET_CLIENT varchar 32 96 utf8 utf8_general_ci varchar(32) 3.0000 information_schema ROUTINES COLLATION_CONNECTION varchar 32 96 utf8 utf8_general_ci varchar(32) 3.0000 information_schema ROUTINES DATABASE_COLLATION varchar 32 96 utf8 utf8_general_ci varchar(32) @@ -876,7 +876,7 @@ NULL information_schema ROUTINES LAST_ALTERED datetime NULL NULL NULL NULL datet 3.0000 information_schema SCHEMATA DEFAULT_COLLATION_NAME varchar 32 96 utf8 utf8_general_ci varchar(32) 3.0000 information_schema SCHEMATA SQL_PATH varchar 512 1536 utf8 utf8_general_ci varchar(512) 3.0000 information_schema SCHEMATA SCHEMA_COMMENT varchar 1024 3072 utf8 utf8_general_ci varchar(1024) -3.0000 information_schema SCHEMA_PRIVILEGES GRANTEE varchar 190 570 utf8 utf8_general_ci varchar(190) +3.0000 information_schema SCHEMA_PRIVILEGES GRANTEE varchar 385 1155 utf8 utf8_general_ci varchar(385) 3.0000 information_schema SCHEMA_PRIVILEGES TABLE_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512) 3.0000 information_schema SCHEMA_PRIVILEGES TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema SCHEMA_PRIVILEGES PRIVILEGE_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64) @@ -959,7 +959,7 @@ NULL information_schema TABLESPACES NODEGROUP_ID bigint NULL NULL NULL NULL bigi 3.0000 information_schema TABLE_CONSTRAINTS TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema TABLE_CONSTRAINTS TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema TABLE_CONSTRAINTS CONSTRAINT_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema TABLE_PRIVILEGES GRANTEE varchar 190 570 utf8 utf8_general_ci varchar(190) +3.0000 information_schema TABLE_PRIVILEGES GRANTEE varchar 385 1155 utf8 utf8_general_ci varchar(385) 3.0000 information_schema TABLE_PRIVILEGES TABLE_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512) 3.0000 information_schema TABLE_PRIVILEGES TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema TABLE_PRIVILEGES TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) @@ -988,11 +988,11 @@ NULL information_schema TRIGGERS ACTION_ORDER bigint NULL NULL NULL NULL bigint( 3.0000 information_schema TRIGGERS ACTION_REFERENCE_NEW_ROW varchar 3 9 utf8 utf8_general_ci varchar(3) NULL information_schema TRIGGERS CREATED datetime NULL NULL NULL NULL datetime(2) 3.0000 information_schema TRIGGERS SQL_MODE varchar 8192 24576 utf8 utf8_general_ci varchar(8192) -3.0000 information_schema TRIGGERS DEFINER varchar 189 567 utf8 utf8_general_ci varchar(189) +3.0000 information_schema TRIGGERS DEFINER varchar 384 1152 utf8 utf8_general_ci varchar(384) 3.0000 information_schema TRIGGERS CHARACTER_SET_CLIENT varchar 32 96 utf8 utf8_general_ci varchar(32) 3.0000 information_schema TRIGGERS COLLATION_CONNECTION varchar 32 96 utf8 utf8_general_ci varchar(32) 3.0000 information_schema TRIGGERS DATABASE_COLLATION varchar 32 96 utf8 utf8_general_ci varchar(32) -3.0000 information_schema USER_PRIVILEGES GRANTEE varchar 190 570 utf8 utf8_general_ci varchar(190) +3.0000 information_schema USER_PRIVILEGES GRANTEE varchar 385 1155 utf8 utf8_general_ci varchar(385) 3.0000 information_schema USER_PRIVILEGES TABLE_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512) 3.0000 information_schema USER_PRIVILEGES PRIVILEGE_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema USER_PRIVILEGES IS_GRANTABLE varchar 3 9 utf8 utf8_general_ci varchar(3) @@ -1027,7 +1027,7 @@ NULL information_schema USER_STATISTICS MAX_STATEMENT_TIME_EXCEEDED bigint NULL 1.0000 information_schema VIEWS VIEW_DEFINITION longtext 4294967295 4294967295 utf8 utf8_general_ci longtext 3.0000 information_schema VIEWS CHECK_OPTION varchar 8 24 utf8 utf8_general_ci varchar(8) 3.0000 information_schema VIEWS IS_UPDATABLE varchar 3 9 utf8 utf8_general_ci varchar(3) -3.0000 information_schema VIEWS DEFINER varchar 189 567 utf8 utf8_general_ci varchar(189) +3.0000 information_schema VIEWS DEFINER varchar 384 1152 utf8 utf8_general_ci varchar(384) 3.0000 information_schema VIEWS SECURITY_TYPE varchar 7 21 utf8 utf8_general_ci varchar(7) 3.0000 information_schema VIEWS CHARACTER_SET_CLIENT varchar 32 96 utf8 utf8_general_ci varchar(32) 3.0000 information_schema VIEWS COLLATION_CONNECTION varchar 32 96 utf8 utf8_general_ci varchar(32) diff --git a/mysql-test/suite/funcs_1/r/is_columns_mysql.result b/mysql-test/suite/funcs_1/r/is_columns_mysql.result index f5f134bd7a7..2a0f96070b8 100644 --- a/mysql-test/suite/funcs_1/r/is_columns_mysql.result +++ b/mysql-test/suite/funcs_1/r/is_columns_mysql.result @@ -5,10 +5,10 @@ TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAUL def mysql columns_priv Column_name 5 '' NO char 64 192 NULL NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references NEVER NULL def mysql columns_priv Column_priv 7 '' NO set 31 93 NULL NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','References') select,insert,update,references NEVER NULL def mysql columns_priv Db 2 '' NO char 64 192 NULL NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references NEVER NULL -def mysql columns_priv Host 1 '' NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references NEVER NULL +def mysql columns_priv Host 1 '' NO char 255 765 NULL NULL NULL utf8 utf8_bin char(255) PRI select,insert,update,references NEVER NULL def mysql columns_priv Table_name 4 '' NO char 64 192 NULL NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references NEVER NULL def mysql columns_priv Timestamp 6 current_timestamp() NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update current_timestamp() select,insert,update,references NEVER NULL -def mysql columns_priv User 3 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) PRI select,insert,update,references NEVER NULL +def mysql columns_priv User 3 '' NO char 128 384 NULL NULL NULL utf8 utf8_bin char(128) PRI select,insert,update,references NEVER NULL def mysql column_stats avg_frequency 8 NULL YES decimal NULL NULL 12 4 NULL NULL NULL decimal(12,4) select,insert,update,references NEVER NULL def mysql column_stats avg_length 7 NULL YES decimal NULL NULL 12 4 NULL NULL NULL decimal(12,4) select,insert,update,references NEVER NULL def mysql column_stats column_name 3 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) PRI select,insert,update,references NEVER NULL @@ -33,7 +33,7 @@ def mysql db Drop_priv 9 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enu def mysql db Event_priv 21 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL def mysql db Execute_priv 20 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL def mysql db Grant_priv 10 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL -def mysql db Host 1 '' NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references NEVER NULL +def mysql db Host 1 '' NO char 255 765 NULL NULL NULL utf8 utf8_bin char(255) PRI select,insert,update,references NEVER NULL def mysql db Index_priv 12 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL def mysql db Insert_priv 5 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL def mysql db Lock_tables_priv 15 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL @@ -42,7 +42,7 @@ def mysql db Select_priv 4 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci e def mysql db Show_view_priv 17 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL def mysql db Trigger_priv 22 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL def mysql db Update_priv 6 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL -def mysql db User 3 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) PRI select,insert,update,references NEVER NULL +def mysql db User 3 '' NO char 128 384 NULL NULL NULL utf8 utf8_bin char(128) PRI select,insert,update,references NEVER NULL def mysql event body 3 NULL NO longblob 4294967295 4294967295 NULL NULL NULL NULL NULL longblob select,insert,update,references NEVER NULL def mysql event body_utf8 22 NULL YES longblob 4294967295 4294967295 NULL NULL NULL NULL NULL longblob select,insert,update,references NEVER NULL def mysql event character_set_client 19 NULL YES char 32 96 NULL NULL NULL utf8 utf8_bin char(32) select,insert,update,references NEVER NULL @@ -51,7 +51,7 @@ def mysql event comment 16 '' NO char 64 192 NULL NULL NULL utf8 utf8_bin char(6 def mysql event created 8 current_timestamp() NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update current_timestamp() select,insert,update,references NEVER NULL def mysql event db 1 '' NO char 64 192 NULL NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references NEVER NULL def mysql event db_collation 21 NULL YES char 32 96 NULL NULL NULL utf8 utf8_bin char(32) select,insert,update,references NEVER NULL -def mysql event definer 4 '' NO char 141 423 NULL NULL NULL utf8 utf8_bin char(141) select,insert,update,references NEVER NULL +def mysql event definer 4 '' NO varchar 384 1152 NULL NULL NULL utf8 utf8_bin varchar(384) select,insert,update,references NEVER NULL def mysql event ends 12 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime select,insert,update,references NEVER NULL def mysql event execute_at 5 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime select,insert,update,references NEVER NULL def mysql event interval_field 7 NULL YES enum 18 54 NULL NULL NULL utf8 utf8_general_ci enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') select,insert,update,references NEVER NULL @@ -75,9 +75,9 @@ def mysql general_log event_time 1 current_timestamp(6) NO timestamp NULL NULL N def mysql general_log server_id 4 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned select,insert,update,references NEVER NULL def mysql general_log thread_id 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select,insert,update,references NEVER NULL def mysql general_log user_host 2 NULL NO mediumtext 16777215 16777215 NULL NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references NEVER NULL -def mysql global_priv Host 1 '' NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references NEVER NULL +def mysql global_priv Host 1 '' NO char 255 765 NULL NULL NULL utf8 utf8_bin char(255) PRI select,insert,update,references NEVER NULL def mysql global_priv Priv 3 '{}' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext select,insert,update,references NEVER NULL -def mysql global_priv User 2 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) PRI select,insert,update,references NEVER NULL +def mysql global_priv User 2 '' NO char 128 384 NULL NULL NULL utf8 utf8_bin char(128) PRI select,insert,update,references NEVER NULL def mysql gtid_slave_pos domain_id 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI select,insert,update,references NEVER NULL def mysql gtid_slave_pos seq_no 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL def mysql gtid_slave_pos server_id 3 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned select,insert,update,references NEVER NULL @@ -126,7 +126,7 @@ def mysql proc comment 16 NULL NO text 65535 65535 NULL NULL NULL utf8 utf8_bin def mysql proc created 13 current_timestamp() NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update current_timestamp() select,insert,update,references NEVER NULL def mysql proc db 1 '' NO char 64 192 NULL NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references NEVER NULL def mysql proc db_collation 19 NULL YES char 32 96 NULL NULL NULL utf8 utf8_bin char(32) select,insert,update,references NEVER NULL -def mysql proc definer 12 '' NO char 141 423 NULL NULL NULL utf8 utf8_bin char(141) select,insert,update,references NEVER NULL +def mysql proc definer 12 '' NO varchar 384 1152 NULL NULL NULL utf8 utf8_bin varchar(384) select,insert,update,references NEVER NULL def mysql proc is_deterministic 7 'NO' NO enum 3 9 NULL NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references NEVER NULL def mysql proc language 5 'SQL' NO enum 3 9 NULL NULL NULL utf8 utf8_general_ci enum('SQL') select,insert,update,references NEVER NULL def mysql proc modified 14 '0000-00-00 00:00:00' NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp select,insert,update,references NEVER NULL @@ -139,24 +139,24 @@ def mysql proc sql_data_access 6 'CONTAINS_SQL' NO enum 17 51 NULL NULL NULL utf def mysql proc sql_mode 15 '' NO set 561 1683 NULL NULL NULL utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT','TIME_ROUND_FRACTIONAL') select,insert,update,references NEVER NULL def mysql proc type 3 NULL NO enum 12 36 NULL NULL NULL utf8 utf8_general_ci enum('FUNCTION','PROCEDURE','PACKAGE','PACKAGE BODY') PRI select,insert,update,references NEVER NULL def mysql procs_priv Db 2 '' NO char 64 192 NULL NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references NEVER NULL -def mysql procs_priv Grantor 6 '' NO char 141 423 NULL NULL NULL utf8 utf8_bin char(141) MUL select,insert,update,references NEVER NULL -def mysql procs_priv Host 1 '' NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references NEVER NULL +def mysql procs_priv Grantor 6 '' NO varchar 384 1152 NULL NULL NULL utf8 utf8_bin varchar(384) MUL select,insert,update,references NEVER NULL +def mysql procs_priv Host 1 '' NO char 255 765 NULL NULL NULL utf8 utf8_bin char(255) PRI select,insert,update,references NEVER NULL def mysql procs_priv Proc_priv 7 '' NO set 27 81 NULL NULL NULL utf8 utf8_general_ci set('Execute','Alter Routine','Grant') select,insert,update,references NEVER NULL def mysql procs_priv Routine_name 4 '' NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) PRI select,insert,update,references NEVER NULL def mysql procs_priv Routine_type 5 NULL NO enum 12 36 NULL NULL NULL utf8 utf8_bin enum('FUNCTION','PROCEDURE','PACKAGE','PACKAGE BODY') PRI select,insert,update,references NEVER NULL def mysql procs_priv Timestamp 8 current_timestamp() NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update current_timestamp() select,insert,update,references NEVER NULL -def mysql procs_priv User 3 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) PRI select,insert,update,references NEVER NULL -def mysql proxies_priv Grantor 6 '' NO char 141 423 NULL NULL NULL utf8 utf8_bin char(141) MUL select,insert,update,references NEVER NULL -def mysql proxies_priv Host 1 '' NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references NEVER NULL -def mysql proxies_priv Proxied_host 3 '' NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references NEVER NULL -def mysql proxies_priv Proxied_user 4 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) PRI select,insert,update,references NEVER NULL +def mysql procs_priv User 3 '' NO char 128 384 NULL NULL NULL utf8 utf8_bin char(128) PRI select,insert,update,references NEVER NULL +def mysql proxies_priv Grantor 6 '' NO varchar 384 1152 NULL NULL NULL utf8 utf8_bin varchar(384) MUL select,insert,update,references NEVER NULL +def mysql proxies_priv Host 1 '' NO char 255 765 NULL NULL NULL utf8 utf8_bin char(255) PRI select,insert,update,references NEVER NULL +def mysql proxies_priv Proxied_host 3 '' NO char 255 765 NULL NULL NULL utf8 utf8_bin char(255) PRI select,insert,update,references NEVER NULL +def mysql proxies_priv Proxied_user 4 '' NO char 128 384 NULL NULL NULL utf8 utf8_bin char(128) PRI select,insert,update,references NEVER NULL def mysql proxies_priv Timestamp 7 current_timestamp() NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update current_timestamp() select,insert,update,references NEVER NULL -def mysql proxies_priv User 2 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) PRI select,insert,update,references NEVER NULL +def mysql proxies_priv User 2 '' NO char 128 384 NULL NULL NULL utf8 utf8_bin char(128) PRI select,insert,update,references NEVER NULL def mysql proxies_priv With_grant 5 0 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(1) select,insert,update,references NEVER NULL def mysql roles_mapping Admin_option 4 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL -def mysql roles_mapping Host 1 '' NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references NEVER NULL -def mysql roles_mapping Role 3 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) PRI select,insert,update,references NEVER NULL -def mysql roles_mapping User 2 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) PRI select,insert,update,references NEVER NULL +def mysql roles_mapping Host 1 '' NO char 255 765 NULL NULL NULL utf8 utf8_bin char(255) PRI select,insert,update,references NEVER NULL +def mysql roles_mapping Role 3 '' NO char 128 384 NULL NULL NULL utf8 utf8_bin char(128) PRI select,insert,update,references NEVER NULL +def mysql roles_mapping User 2 '' NO char 128 384 NULL NULL NULL utf8 utf8_bin char(128) PRI select,insert,update,references NEVER NULL def mysql servers Db 3 '' NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references NEVER NULL def mysql servers Host 2 '' NO varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048) select,insert,update,references NEVER NULL def mysql servers Owner 9 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select,insert,update,references NEVER NULL @@ -164,7 +164,7 @@ def mysql servers Password 5 '' NO char 64 192 NULL NULL NULL utf8 utf8_general_ def mysql servers Port 6 0 NO int NULL NULL 10 0 NULL NULL NULL int(4) select,insert,update,references NEVER NULL def mysql servers Server_name 1 '' NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) PRI select,insert,update,references NEVER NULL def mysql servers Socket 7 '' NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references NEVER NULL -def mysql servers Username 4 '' NO char 80 240 NULL NULL NULL utf8 utf8_general_ci char(80) select,insert,update,references NEVER NULL +def mysql servers Username 4 '' NO char 128 384 NULL NULL NULL utf8 utf8_general_ci char(128) select,insert,update,references NEVER NULL def mysql servers Wrapper 8 '' NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references NEVER NULL def mysql slow_log db 7 NULL NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select,insert,update,references NEVER NULL def mysql slow_log insert_id 9 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL @@ -181,12 +181,12 @@ def mysql slow_log thread_id 12 NULL NO bigint NULL NULL 20 0 NULL NULL NULL big def mysql slow_log user_host 2 NULL NO mediumtext 16777215 16777215 NULL NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references NEVER NULL def mysql tables_priv Column_priv 8 '' NO set 31 93 NULL NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','References') select,insert,update,references NEVER NULL def mysql tables_priv Db 2 '' NO char 64 192 NULL NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references NEVER NULL -def mysql tables_priv Grantor 5 '' NO char 141 423 NULL NULL NULL utf8 utf8_bin char(141) MUL select,insert,update,references NEVER NULL -def mysql tables_priv Host 1 '' NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references NEVER NULL +def mysql tables_priv Grantor 5 '' NO varchar 384 1152 NULL NULL NULL utf8 utf8_bin varchar(384) MUL select,insert,update,references NEVER NULL +def mysql tables_priv Host 1 '' NO char 255 765 NULL NULL NULL utf8 utf8_bin char(255) PRI select,insert,update,references NEVER NULL def mysql tables_priv Table_name 4 '' NO char 64 192 NULL NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references NEVER NULL def mysql tables_priv Table_priv 7 '' NO set 121 363 NULL NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger','Delete versioning rows') select,insert,update,references NEVER NULL def mysql tables_priv Timestamp 6 current_timestamp() NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update current_timestamp() select,insert,update,references NEVER NULL -def mysql tables_priv User 3 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) PRI select,insert,update,references NEVER NULL +def mysql tables_priv User 3 '' NO char 128 384 NULL NULL NULL utf8 utf8_bin char(128) PRI select,insert,update,references NEVER NULL def mysql table_stats cardinality 3 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select,insert,update,references NEVER NULL def mysql table_stats db_name 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) PRI select,insert,update,references NEVER NULL def mysql table_stats table_name 2 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) PRI select,insert,update,references NEVER NULL @@ -226,7 +226,7 @@ def mysql user Event_priv 30 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_s def mysql user Execute_priv 22 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL def mysql user File_priv 13 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL def mysql user Grant_priv 14 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL -def mysql user Host 1 '' NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) select,insert,update,references NEVER NULL +def mysql user Host 1 '' NO char 255 765 NULL NULL NULL utf8 utf8_bin char(255) select,insert,update,references NEVER NULL def mysql user Index_priv 16 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL def mysql user Insert_priv 5 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL def mysql user is_role 45 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL @@ -253,7 +253,7 @@ def mysql user ssl_type 34 NULL YES varchar 9 9 NULL NULL NULL latin1 latin1_swe def mysql user Super_priv 19 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL def mysql user Trigger_priv 31 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL def mysql user Update_priv 6 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL -def mysql user User 2 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) select,insert,update,references NEVER NULL +def mysql user User 2 '' NO char 128 384 NULL NULL NULL utf8 utf8_bin char(128) select,insert,update,references NEVER NULL def mysql user x509_issuer 36 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext select,insert,update,references NEVER NULL def mysql user x509_subject 37 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext select,insert,update,references NEVER NULL ########################################################################## @@ -329,9 +329,9 @@ FROM information_schema.columns WHERE table_schema = 'mysql' ORDER BY TABLE_SCHEMA, TABLE_NAME, ORDINAL_POSITION; COL_CML TABLE_SCHEMA TABLE_NAME COLUMN_NAME DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE -3.0000 mysql columns_priv Host char 60 180 utf8 utf8_bin char(60) +3.0000 mysql columns_priv Host char 255 765 utf8 utf8_bin char(255) 3.0000 mysql columns_priv Db char 64 192 utf8 utf8_bin char(64) -3.0000 mysql columns_priv User char 80 240 utf8 utf8_bin char(80) +3.0000 mysql columns_priv User char 128 384 utf8 utf8_bin char(128) 3.0000 mysql columns_priv Table_name char 64 192 utf8 utf8_bin char(64) 3.0000 mysql columns_priv Column_name char 64 192 utf8 utf8_bin char(64) NULL mysql columns_priv Timestamp timestamp NULL NULL NULL NULL timestamp @@ -347,9 +347,9 @@ NULL mysql column_stats avg_frequency decimal NULL NULL NULL NULL decimal(12,4) NULL mysql column_stats hist_size tinyint NULL NULL NULL NULL tinyint(3) unsigned 3.0000 mysql column_stats hist_type enum 14 42 utf8 utf8_bin enum('SINGLE_PREC_HB','DOUBLE_PREC_HB') 1.0000 mysql column_stats histogram varbinary 255 255 NULL NULL varbinary(255) -3.0000 mysql db Host char 60 180 utf8 utf8_bin char(60) +3.0000 mysql db Host char 255 765 utf8 utf8_bin char(255) 3.0000 mysql db Db char 64 192 utf8 utf8_bin char(64) -3.0000 mysql db User char 80 240 utf8 utf8_bin char(80) +3.0000 mysql db User char 128 384 utf8 utf8_bin char(128) 3.0000 mysql db Select_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 3.0000 mysql db Insert_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 3.0000 mysql db Update_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') @@ -373,7 +373,7 @@ NULL mysql column_stats hist_size tinyint NULL NULL NULL NULL tinyint(3) unsigne 3.0000 mysql event db char 64 192 utf8 utf8_bin char(64) 3.0000 mysql event name char 64 192 utf8 utf8_general_ci char(64) 1.0000 mysql event body longblob 4294967295 4294967295 NULL NULL longblob -3.0000 mysql event definer char 141 423 utf8 utf8_bin char(141) +3.0000 mysql event definer varchar 384 1152 utf8 utf8_bin varchar(384) NULL mysql event execute_at datetime NULL NULL NULL NULL datetime NULL mysql event interval_value int NULL NULL NULL NULL int(11) 3.0000 mysql event interval_field enum 18 54 utf8 utf8_general_ci enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') @@ -402,8 +402,8 @@ NULL mysql general_log thread_id bigint NULL NULL NULL NULL bigint(21) unsigned NULL mysql general_log server_id int NULL NULL NULL NULL int(10) unsigned 3.0000 mysql general_log command_type varchar 64 192 utf8 utf8_general_ci varchar(64) 1.0000 mysql general_log argument mediumtext 16777215 16777215 utf8 utf8_general_ci mediumtext -3.0000 mysql global_priv Host char 60 180 utf8 utf8_bin char(60) -3.0000 mysql global_priv User char 80 240 utf8 utf8_bin char(80) +3.0000 mysql global_priv Host char 255 765 utf8 utf8_bin char(255) +3.0000 mysql global_priv User char 128 384 utf8 utf8_bin char(128) 1.0000 mysql global_priv Priv longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext NULL mysql gtid_slave_pos domain_id int NULL NULL NULL NULL int(10) unsigned NULL mysql gtid_slave_pos sub_id bigint NULL NULL NULL NULL bigint(20) unsigned @@ -455,7 +455,7 @@ NULL mysql innodb_table_stats sum_of_other_index_sizes bigint NULL NULL NULL NUL 1.0000 mysql proc param_list blob 65535 65535 NULL NULL blob 1.0000 mysql proc returns longblob 4294967295 4294967295 NULL NULL longblob 1.0000 mysql proc body longblob 4294967295 4294967295 NULL NULL longblob -3.0000 mysql proc definer char 141 423 utf8 utf8_bin char(141) +3.0000 mysql proc definer varchar 384 1152 utf8 utf8_bin varchar(384) NULL mysql proc created timestamp NULL NULL NULL NULL timestamp NULL mysql proc modified timestamp NULL NULL NULL NULL timestamp 3.0000 mysql proc sql_mode set 561 1683 utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT','TIME_ROUND_FRACTIONAL') @@ -465,29 +465,29 @@ NULL mysql proc modified timestamp NULL NULL NULL NULL timestamp 3.0000 mysql proc db_collation char 32 96 utf8 utf8_bin char(32) 1.0000 mysql proc body_utf8 longblob 4294967295 4294967295 NULL NULL longblob 3.0000 mysql proc aggregate enum 5 15 utf8 utf8_general_ci enum('NONE','GROUP') -3.0000 mysql procs_priv Host char 60 180 utf8 utf8_bin char(60) +3.0000 mysql procs_priv Host char 255 765 utf8 utf8_bin char(255) 3.0000 mysql procs_priv Db char 64 192 utf8 utf8_bin char(64) -3.0000 mysql procs_priv User char 80 240 utf8 utf8_bin char(80) +3.0000 mysql procs_priv User char 128 384 utf8 utf8_bin char(128) 3.0000 mysql procs_priv Routine_name char 64 192 utf8 utf8_general_ci char(64) 3.0000 mysql procs_priv Routine_type enum 12 36 utf8 utf8_bin enum('FUNCTION','PROCEDURE','PACKAGE','PACKAGE BODY') -3.0000 mysql procs_priv Grantor char 141 423 utf8 utf8_bin char(141) +3.0000 mysql procs_priv Grantor varchar 384 1152 utf8 utf8_bin varchar(384) 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 -3.0000 mysql proxies_priv Host char 60 180 utf8 utf8_bin char(60) -3.0000 mysql proxies_priv User char 80 240 utf8 utf8_bin char(80) -3.0000 mysql proxies_priv Proxied_host char 60 180 utf8 utf8_bin char(60) -3.0000 mysql proxies_priv Proxied_user char 80 240 utf8 utf8_bin char(80) +3.0000 mysql proxies_priv Host char 255 765 utf8 utf8_bin char(255) +3.0000 mysql proxies_priv User char 128 384 utf8 utf8_bin char(128) +3.0000 mysql proxies_priv Proxied_host char 255 765 utf8 utf8_bin char(255) +3.0000 mysql proxies_priv Proxied_user char 128 384 utf8 utf8_bin char(128) NULL mysql proxies_priv With_grant tinyint NULL NULL NULL NULL tinyint(1) -3.0000 mysql proxies_priv Grantor char 141 423 utf8 utf8_bin char(141) +3.0000 mysql proxies_priv Grantor varchar 384 1152 utf8 utf8_bin varchar(384) NULL mysql proxies_priv Timestamp timestamp NULL NULL NULL NULL timestamp -3.0000 mysql roles_mapping Host char 60 180 utf8 utf8_bin char(60) -3.0000 mysql roles_mapping User char 80 240 utf8 utf8_bin char(80) -3.0000 mysql roles_mapping Role char 80 240 utf8 utf8_bin char(80) +3.0000 mysql roles_mapping Host char 255 765 utf8 utf8_bin char(255) +3.0000 mysql roles_mapping User char 128 384 utf8 utf8_bin char(128) +3.0000 mysql roles_mapping Role char 128 384 utf8 utf8_bin char(128) 3.0000 mysql roles_mapping Admin_option enum 1 3 utf8 utf8_general_ci enum('N','Y') 3.0000 mysql servers Server_name char 64 192 utf8 utf8_general_ci char(64) 3.0000 mysql servers Host varchar 2048 6144 utf8 utf8_general_ci varchar(2048) 3.0000 mysql servers Db char 64 192 utf8 utf8_general_ci char(64) -3.0000 mysql servers Username char 80 240 utf8 utf8_general_ci char(80) +3.0000 mysql servers Username char 128 384 utf8 utf8_general_ci char(128) 3.0000 mysql servers Password char 64 192 utf8 utf8_general_ci char(64) NULL mysql servers Port int NULL NULL NULL NULL int(4) 3.0000 mysql servers Socket char 64 192 utf8 utf8_general_ci char(64) @@ -506,11 +506,11 @@ NULL mysql slow_log server_id int NULL NULL NULL NULL int(10) unsigned 1.0000 mysql slow_log sql_text mediumtext 16777215 16777215 utf8 utf8_general_ci mediumtext NULL mysql slow_log thread_id bigint NULL NULL NULL NULL bigint(21) unsigned NULL mysql slow_log rows_affected int NULL NULL NULL NULL int(11) -3.0000 mysql tables_priv Host char 60 180 utf8 utf8_bin char(60) +3.0000 mysql tables_priv Host char 255 765 utf8 utf8_bin char(255) 3.0000 mysql tables_priv Db char 64 192 utf8 utf8_bin char(64) -3.0000 mysql tables_priv User char 80 240 utf8 utf8_bin char(80) +3.0000 mysql tables_priv User char 128 384 utf8 utf8_bin char(128) 3.0000 mysql tables_priv Table_name char 64 192 utf8 utf8_bin char(64) -3.0000 mysql tables_priv Grantor char 141 423 utf8 utf8_bin char(141) +3.0000 mysql tables_priv Grantor varchar 384 1152 utf8 utf8_bin varchar(384) NULL mysql tables_priv Timestamp timestamp NULL NULL NULL NULL timestamp 3.0000 mysql tables_priv Table_priv set 121 363 utf8 utf8_general_ci set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger','Delete versioning rows') 3.0000 mysql tables_priv Column_priv set 31 93 utf8 utf8_general_ci set('Select','Insert','Update','References') @@ -536,8 +536,8 @@ NULL mysql transaction_registry commit_id bigint NULL NULL NULL NULL bigint(20) NULL mysql transaction_registry begin_timestamp timestamp NULL NULL NULL NULL timestamp(6) NULL mysql transaction_registry commit_timestamp timestamp NULL NULL NULL NULL timestamp(6) 3.0000 mysql transaction_registry isolation_level enum 16 48 utf8 utf8_bin enum('READ-UNCOMMITTED','READ-COMMITTED','REPEATABLE-READ','SERIALIZABLE') -3.0000 mysql user Host char 60 180 utf8 utf8_bin char(60) -3.0000 mysql user User char 80 240 utf8 utf8_bin char(80) +3.0000 mysql user Host char 255 765 utf8 utf8_bin char(255) +3.0000 mysql user User char 128 384 utf8 utf8_bin char(128) 1.0000 mysql user Password longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext 1.0000 mysql user Select_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) 1.0000 mysql user Insert_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) diff --git a/mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result b/mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result index 0a375faf072..1d0c545b419 100644 --- a/mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result +++ b/mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result @@ -5,10 +5,10 @@ TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAUL def mysql columns_priv Column_name 5 '' NO char 64 192 NULL NULL NULL utf8 utf8_bin char(64) PRI NEVER NULL def mysql columns_priv Column_priv 7 '' NO set 31 93 NULL NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','References') NEVER NULL def mysql columns_priv Db 2 '' NO char 64 192 NULL NULL NULL utf8 utf8_bin char(64) PRI NEVER NULL -def mysql columns_priv Host 1 '' NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) PRI NEVER NULL +def mysql columns_priv Host 1 '' NO char 255 765 NULL NULL NULL utf8 utf8_bin char(255) PRI NEVER NULL def mysql columns_priv Table_name 4 '' NO char 64 192 NULL NULL NULL utf8 utf8_bin char(64) PRI NEVER NULL def mysql columns_priv Timestamp 6 current_timestamp() NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update current_timestamp() NEVER NULL -def mysql columns_priv User 3 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) PRI NEVER NULL +def mysql columns_priv User 3 '' NO char 128 384 NULL NULL NULL utf8 utf8_bin char(128) PRI NEVER NULL def mysql column_stats avg_frequency 8 NULL YES decimal NULL NULL 12 4 NULL NULL NULL decimal(12,4) NEVER NULL def mysql column_stats avg_length 7 NULL YES decimal NULL NULL 12 4 NULL NULL NULL decimal(12,4) NEVER NULL def mysql column_stats column_name 3 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) PRI NEVER NULL @@ -33,7 +33,7 @@ def mysql db Drop_priv 9 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enu def mysql db Event_priv 21 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL def mysql db Execute_priv 20 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL def mysql db Grant_priv 10 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL -def mysql db Host 1 '' NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) PRI NEVER NULL +def mysql db Host 1 '' NO char 255 765 NULL NULL NULL utf8 utf8_bin char(255) PRI NEVER NULL def mysql db Index_priv 12 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL def mysql db Insert_priv 5 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL def mysql db Lock_tables_priv 15 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL @@ -42,7 +42,7 @@ def mysql db Select_priv 4 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci e def mysql db Show_view_priv 17 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL def mysql db Trigger_priv 22 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL def mysql db Update_priv 6 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL -def mysql db User 3 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) PRI NEVER NULL +def mysql db User 3 '' NO char 128 384 NULL NULL NULL utf8 utf8_bin char(128) PRI NEVER NULL def mysql event body 3 NULL NO longblob 4294967295 4294967295 NULL NULL NULL NULL NULL longblob NEVER NULL def mysql event body_utf8 22 NULL YES longblob 4294967295 4294967295 NULL NULL NULL NULL NULL longblob NEVER NULL def mysql event character_set_client 19 NULL YES char 32 96 NULL NULL NULL utf8 utf8_bin char(32) NEVER NULL @@ -51,7 +51,7 @@ def mysql event comment 16 '' NO char 64 192 NULL NULL NULL utf8 utf8_bin char(6 def mysql event created 8 current_timestamp() NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update current_timestamp() NEVER NULL def mysql event db 1 '' NO char 64 192 NULL NULL NULL utf8 utf8_bin char(64) PRI NEVER NULL def mysql event db_collation 21 NULL YES char 32 96 NULL NULL NULL utf8 utf8_bin char(32) NEVER NULL -def mysql event definer 4 '' NO char 141 423 NULL NULL NULL utf8 utf8_bin char(141) NEVER NULL +def mysql event definer 4 '' NO varchar 384 1152 NULL NULL NULL utf8 utf8_bin varchar(384) NEVER NULL def mysql event ends 12 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime NEVER NULL def mysql event execute_at 5 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime NEVER NULL def mysql event interval_field 7 NULL YES enum 18 54 NULL NULL NULL utf8 utf8_general_ci enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') NEVER NULL @@ -75,9 +75,9 @@ def mysql general_log event_time 1 current_timestamp(6) NO timestamp NULL NULL N def mysql general_log server_id 4 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned NEVER NULL def mysql general_log thread_id 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL def mysql general_log user_host 2 NULL NO mediumtext 16777215 16777215 NULL NULL NULL utf8 utf8_general_ci mediumtext NEVER NULL -def mysql global_priv Host 1 '' NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) PRI NEVER NULL +def mysql global_priv Host 1 '' NO char 255 765 NULL NULL NULL utf8 utf8_bin char(255) PRI NEVER NULL def mysql global_priv Priv 3 '{}' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext NEVER NULL -def mysql global_priv User 2 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) PRI NEVER NULL +def mysql global_priv User 2 '' NO char 128 384 NULL NULL NULL utf8 utf8_bin char(128) PRI NEVER NULL def mysql gtid_slave_pos domain_id 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI NEVER NULL def mysql gtid_slave_pos seq_no 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned NEVER NULL def mysql gtid_slave_pos server_id 3 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned NEVER NULL @@ -112,7 +112,7 @@ def mysql proc comment 16 NULL NO text 65535 65535 NULL NULL NULL utf8 utf8_bin def mysql proc created 13 current_timestamp() NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update current_timestamp() NEVER NULL def mysql proc db 1 '' NO char 64 192 NULL NULL NULL utf8 utf8_bin char(64) PRI NEVER NULL def mysql proc db_collation 19 NULL YES char 32 96 NULL NULL NULL utf8 utf8_bin char(32) NEVER NULL -def mysql proc definer 12 '' NO char 141 423 NULL NULL NULL utf8 utf8_bin char(141) NEVER NULL +def mysql proc definer 12 '' NO varchar 384 1152 NULL NULL NULL utf8 utf8_bin varchar(384) NEVER NULL def mysql proc is_deterministic 7 'NO' NO enum 3 9 NULL NULL NULL utf8 utf8_general_ci enum('YES','NO') NEVER NULL def mysql proc language 5 'SQL' NO enum 3 9 NULL NULL NULL utf8 utf8_general_ci enum('SQL') NEVER NULL def mysql proc modified 14 '0000-00-00 00:00:00' NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp NEVER NULL @@ -125,24 +125,24 @@ def mysql proc sql_data_access 6 'CONTAINS_SQL' NO enum 17 51 NULL NULL NULL utf def mysql proc sql_mode 15 '' NO set 561 1683 NULL NULL NULL utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT','TIME_ROUND_FRACTIONAL') NEVER NULL def mysql proc type 3 NULL NO enum 12 36 NULL NULL NULL utf8 utf8_general_ci enum('FUNCTION','PROCEDURE','PACKAGE','PACKAGE BODY') PRI NEVER NULL def mysql procs_priv Db 2 '' NO char 64 192 NULL NULL NULL utf8 utf8_bin char(64) PRI NEVER NULL -def mysql procs_priv Grantor 6 '' NO char 141 423 NULL NULL NULL utf8 utf8_bin char(141) MUL NEVER NULL -def mysql procs_priv Host 1 '' NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) PRI NEVER NULL +def mysql procs_priv Grantor 6 '' NO varchar 384 1152 NULL NULL NULL utf8 utf8_bin varchar(384) MUL NEVER NULL +def mysql procs_priv Host 1 '' NO char 255 765 NULL NULL NULL utf8 utf8_bin char(255) PRI NEVER NULL def mysql procs_priv Proc_priv 7 '' NO set 27 81 NULL NULL NULL utf8 utf8_general_ci set('Execute','Alter Routine','Grant') NEVER NULL def mysql procs_priv Routine_name 4 '' NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) PRI NEVER NULL def mysql procs_priv Routine_type 5 NULL NO enum 12 36 NULL NULL NULL utf8 utf8_bin enum('FUNCTION','PROCEDURE','PACKAGE','PACKAGE BODY') PRI NEVER NULL def mysql procs_priv Timestamp 8 current_timestamp() NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update current_timestamp() NEVER NULL -def mysql procs_priv User 3 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) PRI NEVER NULL -def mysql proxies_priv Grantor 6 '' NO char 141 423 NULL NULL NULL utf8 utf8_bin char(141) MUL NEVER NULL -def mysql proxies_priv Host 1 '' NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) PRI NEVER NULL -def mysql proxies_priv Proxied_host 3 '' NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) PRI NEVER NULL -def mysql proxies_priv Proxied_user 4 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) PRI NEVER NULL +def mysql procs_priv User 3 '' NO char 128 384 NULL NULL NULL utf8 utf8_bin char(128) PRI NEVER NULL +def mysql proxies_priv Grantor 6 '' NO varchar 384 1152 NULL NULL NULL utf8 utf8_bin varchar(384) MUL NEVER NULL +def mysql proxies_priv Host 1 '' NO char 255 765 NULL NULL NULL utf8 utf8_bin char(255) PRI NEVER NULL +def mysql proxies_priv Proxied_host 3 '' NO char 255 765 NULL NULL NULL utf8 utf8_bin char(255) PRI NEVER NULL +def mysql proxies_priv Proxied_user 4 '' NO char 128 384 NULL NULL NULL utf8 utf8_bin char(128) PRI NEVER NULL def mysql proxies_priv Timestamp 7 current_timestamp() NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update current_timestamp() NEVER NULL -def mysql proxies_priv User 2 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) PRI NEVER NULL +def mysql proxies_priv User 2 '' NO char 128 384 NULL NULL NULL utf8 utf8_bin char(128) PRI NEVER NULL def mysql proxies_priv With_grant 5 0 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(1) NEVER NULL def mysql roles_mapping Admin_option 4 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL -def mysql roles_mapping Host 1 '' NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) PRI NEVER NULL -def mysql roles_mapping Role 3 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) PRI NEVER NULL -def mysql roles_mapping User 2 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) PRI NEVER NULL +def mysql roles_mapping Host 1 '' NO char 255 765 NULL NULL NULL utf8 utf8_bin char(255) PRI NEVER NULL +def mysql roles_mapping Role 3 '' NO char 128 384 NULL NULL NULL utf8 utf8_bin char(128) PRI NEVER NULL +def mysql roles_mapping User 2 '' NO char 128 384 NULL NULL NULL utf8 utf8_bin char(128) PRI NEVER NULL def mysql servers Db 3 '' NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) NEVER NULL def mysql servers Host 2 '' NO varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048) NEVER NULL def mysql servers Owner 9 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL @@ -150,7 +150,7 @@ def mysql servers Password 5 '' NO char 64 192 NULL NULL NULL utf8 utf8_general_ def mysql servers Port 6 0 NO int NULL NULL 10 0 NULL NULL NULL int(4) NEVER NULL def mysql servers Server_name 1 '' NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) PRI NEVER NULL def mysql servers Socket 7 '' NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) NEVER NULL -def mysql servers Username 4 '' NO char 80 240 NULL NULL NULL utf8 utf8_general_ci char(80) NEVER NULL +def mysql servers Username 4 '' NO char 128 384 NULL NULL NULL utf8 utf8_general_ci char(128) NEVER NULL def mysql servers Wrapper 8 '' NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) NEVER NULL def mysql slow_log db 7 NULL NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL def mysql slow_log insert_id 9 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) NEVER NULL @@ -167,12 +167,12 @@ def mysql slow_log thread_id 12 NULL NO bigint NULL NULL 20 0 NULL NULL NULL big def mysql slow_log user_host 2 NULL NO mediumtext 16777215 16777215 NULL NULL NULL utf8 utf8_general_ci mediumtext NEVER NULL def mysql tables_priv Column_priv 8 '' NO set 31 93 NULL NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','References') NEVER NULL def mysql tables_priv Db 2 '' NO char 64 192 NULL NULL NULL utf8 utf8_bin char(64) PRI NEVER NULL -def mysql tables_priv Grantor 5 '' NO char 141 423 NULL NULL NULL utf8 utf8_bin char(141) MUL NEVER NULL -def mysql tables_priv Host 1 '' NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) PRI NEVER NULL +def mysql tables_priv Grantor 5 '' NO varchar 384 1152 NULL NULL NULL utf8 utf8_bin varchar(384) MUL NEVER NULL +def mysql tables_priv Host 1 '' NO char 255 765 NULL NULL NULL utf8 utf8_bin char(255) PRI NEVER NULL def mysql tables_priv Table_name 4 '' NO char 64 192 NULL NULL NULL utf8 utf8_bin char(64) PRI NEVER NULL def mysql tables_priv Table_priv 7 '' NO set 121 363 NULL NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger','Delete versioning rows') NEVER NULL def mysql tables_priv Timestamp 6 current_timestamp() NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update current_timestamp() NEVER NULL -def mysql tables_priv User 3 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) PRI NEVER NULL +def mysql tables_priv User 3 '' NO char 128 384 NULL NULL NULL utf8 utf8_bin char(128) PRI NEVER NULL def mysql table_stats cardinality 3 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL def mysql table_stats db_name 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) PRI NEVER NULL def mysql table_stats table_name 2 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) PRI NEVER NULL @@ -207,7 +207,7 @@ def mysql user Event_priv 30 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_s def mysql user Execute_priv 22 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL def mysql user File_priv 13 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL def mysql user Grant_priv 14 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL -def mysql user Host 1 '' NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) NEVER NULL +def mysql user Host 1 '' NO char 255 765 NULL NULL NULL utf8 utf8_bin char(255) NEVER NULL def mysql user Index_priv 16 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL def mysql user Insert_priv 5 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL def mysql user is_role 45 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL @@ -234,7 +234,7 @@ def mysql user ssl_type 34 NULL YES varchar 9 9 NULL NULL NULL latin1 latin1_swe def mysql user Super_priv 19 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL def mysql user Trigger_priv 31 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL def mysql user Update_priv 6 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL -def mysql user User 2 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) NEVER NULL +def mysql user User 2 '' NO char 128 384 NULL NULL NULL utf8 utf8_bin char(128) NEVER NULL def mysql user x509_issuer 36 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext NEVER NULL def mysql user x509_subject 37 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext NEVER NULL Warnings: @@ -326,9 +326,9 @@ FROM information_schema.columns WHERE table_schema = 'mysql' ORDER BY TABLE_SCHEMA, TABLE_NAME, ORDINAL_POSITION; COL_CML TABLE_SCHEMA TABLE_NAME COLUMN_NAME DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE -3.0000 mysql columns_priv Host char 60 180 utf8 utf8_bin char(60) +3.0000 mysql columns_priv Host char 255 765 utf8 utf8_bin char(255) 3.0000 mysql columns_priv Db char 64 192 utf8 utf8_bin char(64) -3.0000 mysql columns_priv User char 80 240 utf8 utf8_bin char(80) +3.0000 mysql columns_priv User char 128 384 utf8 utf8_bin char(128) 3.0000 mysql columns_priv Table_name char 64 192 utf8 utf8_bin char(64) 3.0000 mysql columns_priv Column_name char 64 192 utf8 utf8_bin char(64) NULL mysql columns_priv Timestamp timestamp NULL NULL NULL NULL timestamp @@ -344,9 +344,9 @@ NULL mysql column_stats avg_frequency decimal NULL NULL NULL NULL decimal(12,4) NULL mysql column_stats hist_size tinyint NULL NULL NULL NULL tinyint(3) unsigned 3.0000 mysql column_stats hist_type enum 14 42 utf8 utf8_bin enum('SINGLE_PREC_HB','DOUBLE_PREC_HB') 1.0000 mysql column_stats histogram varbinary 255 255 NULL NULL varbinary(255) -3.0000 mysql db Host char 60 180 utf8 utf8_bin char(60) +3.0000 mysql db Host char 255 765 utf8 utf8_bin char(255) 3.0000 mysql db Db char 64 192 utf8 utf8_bin char(64) -3.0000 mysql db User char 80 240 utf8 utf8_bin char(80) +3.0000 mysql db User char 128 384 utf8 utf8_bin char(128) 3.0000 mysql db Select_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 3.0000 mysql db Insert_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 3.0000 mysql db Update_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') @@ -370,7 +370,7 @@ NULL mysql column_stats hist_size tinyint NULL NULL NULL NULL tinyint(3) unsigne 3.0000 mysql event db char 64 192 utf8 utf8_bin char(64) 3.0000 mysql event name char 64 192 utf8 utf8_general_ci char(64) 1.0000 mysql event body longblob 4294967295 4294967295 NULL NULL longblob -3.0000 mysql event definer char 141 423 utf8 utf8_bin char(141) +3.0000 mysql event definer varchar 384 1152 utf8 utf8_bin varchar(384) NULL mysql event execute_at datetime NULL NULL NULL NULL datetime NULL mysql event interval_value int NULL NULL NULL NULL int(11) 3.0000 mysql event interval_field enum 18 54 utf8 utf8_general_ci enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') @@ -399,8 +399,8 @@ NULL mysql general_log thread_id bigint NULL NULL NULL NULL bigint(21) unsigned NULL mysql general_log server_id int NULL NULL NULL NULL int(10) unsigned 3.0000 mysql general_log command_type varchar 64 192 utf8 utf8_general_ci varchar(64) 1.0000 mysql general_log argument mediumtext 16777215 16777215 utf8 utf8_general_ci mediumtext -3.0000 mysql global_priv Host char 60 180 utf8 utf8_bin char(60) -3.0000 mysql global_priv User char 80 240 utf8 utf8_bin char(80) +3.0000 mysql global_priv Host char 255 765 utf8 utf8_bin char(255) +3.0000 mysql global_priv User char 128 384 utf8 utf8_bin char(128) 1.0000 mysql global_priv Priv longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext NULL mysql gtid_slave_pos domain_id int NULL NULL NULL NULL int(10) unsigned NULL mysql gtid_slave_pos sub_id bigint NULL NULL NULL NULL bigint(20) unsigned @@ -438,7 +438,7 @@ NULL mysql index_stats avg_frequency decimal NULL NULL NULL NULL decimal(12,4) 1.0000 mysql proc param_list blob 65535 65535 NULL NULL blob 1.0000 mysql proc returns longblob 4294967295 4294967295 NULL NULL longblob 1.0000 mysql proc body longblob 4294967295 4294967295 NULL NULL longblob -3.0000 mysql proc definer char 141 423 utf8 utf8_bin char(141) +3.0000 mysql proc definer varchar 384 1152 utf8 utf8_bin varchar(384) NULL mysql proc created timestamp NULL NULL NULL NULL timestamp NULL mysql proc modified timestamp NULL NULL NULL NULL timestamp 3.0000 mysql proc sql_mode set 561 1683 utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT','TIME_ROUND_FRACTIONAL') @@ -448,29 +448,29 @@ NULL mysql proc modified timestamp NULL NULL NULL NULL timestamp 3.0000 mysql proc db_collation char 32 96 utf8 utf8_bin char(32) 1.0000 mysql proc body_utf8 longblob 4294967295 4294967295 NULL NULL longblob 3.0000 mysql proc aggregate enum 5 15 utf8 utf8_general_ci enum('NONE','GROUP') -3.0000 mysql procs_priv Host char 60 180 utf8 utf8_bin char(60) +3.0000 mysql procs_priv Host char 255 765 utf8 utf8_bin char(255) 3.0000 mysql procs_priv Db char 64 192 utf8 utf8_bin char(64) -3.0000 mysql procs_priv User char 80 240 utf8 utf8_bin char(80) +3.0000 mysql procs_priv User char 128 384 utf8 utf8_bin char(128) 3.0000 mysql procs_priv Routine_name char 64 192 utf8 utf8_general_ci char(64) 3.0000 mysql procs_priv Routine_type enum 12 36 utf8 utf8_bin enum('FUNCTION','PROCEDURE','PACKAGE','PACKAGE BODY') -3.0000 mysql procs_priv Grantor char 141 423 utf8 utf8_bin char(141) +3.0000 mysql procs_priv Grantor varchar 384 1152 utf8 utf8_bin varchar(384) 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 -3.0000 mysql proxies_priv Host char 60 180 utf8 utf8_bin char(60) -3.0000 mysql proxies_priv User char 80 240 utf8 utf8_bin char(80) -3.0000 mysql proxies_priv Proxied_host char 60 180 utf8 utf8_bin char(60) -3.0000 mysql proxies_priv Proxied_user char 80 240 utf8 utf8_bin char(80) +3.0000 mysql proxies_priv Host char 255 765 utf8 utf8_bin char(255) +3.0000 mysql proxies_priv User char 128 384 utf8 utf8_bin char(128) +3.0000 mysql proxies_priv Proxied_host char 255 765 utf8 utf8_bin char(255) +3.0000 mysql proxies_priv Proxied_user char 128 384 utf8 utf8_bin char(128) NULL mysql proxies_priv With_grant tinyint NULL NULL NULL NULL tinyint(1) -3.0000 mysql proxies_priv Grantor char 141 423 utf8 utf8_bin char(141) +3.0000 mysql proxies_priv Grantor varchar 384 1152 utf8 utf8_bin varchar(384) NULL mysql proxies_priv Timestamp timestamp NULL NULL NULL NULL timestamp -3.0000 mysql roles_mapping Host char 60 180 utf8 utf8_bin char(60) -3.0000 mysql roles_mapping User char 80 240 utf8 utf8_bin char(80) -3.0000 mysql roles_mapping Role char 80 240 utf8 utf8_bin char(80) +3.0000 mysql roles_mapping Host char 255 765 utf8 utf8_bin char(255) +3.0000 mysql roles_mapping User char 128 384 utf8 utf8_bin char(128) +3.0000 mysql roles_mapping Role char 128 384 utf8 utf8_bin char(128) 3.0000 mysql roles_mapping Admin_option enum 1 3 utf8 utf8_general_ci enum('N','Y') 3.0000 mysql servers Server_name char 64 192 utf8 utf8_general_ci char(64) 3.0000 mysql servers Host varchar 2048 6144 utf8 utf8_general_ci varchar(2048) 3.0000 mysql servers Db char 64 192 utf8 utf8_general_ci char(64) -3.0000 mysql servers Username char 80 240 utf8 utf8_general_ci char(80) +3.0000 mysql servers Username char 128 384 utf8 utf8_general_ci char(128) 3.0000 mysql servers Password char 64 192 utf8 utf8_general_ci char(64) NULL mysql servers Port int NULL NULL NULL NULL int(4) 3.0000 mysql servers Socket char 64 192 utf8 utf8_general_ci char(64) @@ -489,11 +489,11 @@ NULL mysql slow_log server_id int NULL NULL NULL NULL int(10) unsigned 1.0000 mysql slow_log sql_text mediumtext 16777215 16777215 utf8 utf8_general_ci mediumtext NULL mysql slow_log thread_id bigint NULL NULL NULL NULL bigint(21) unsigned NULL mysql slow_log rows_affected int NULL NULL NULL NULL int(11) -3.0000 mysql tables_priv Host char 60 180 utf8 utf8_bin char(60) +3.0000 mysql tables_priv Host char 255 765 utf8 utf8_bin char(255) 3.0000 mysql tables_priv Db char 64 192 utf8 utf8_bin char(64) -3.0000 mysql tables_priv User char 80 240 utf8 utf8_bin char(80) +3.0000 mysql tables_priv User char 128 384 utf8 utf8_bin char(128) 3.0000 mysql tables_priv Table_name char 64 192 utf8 utf8_bin char(64) -3.0000 mysql tables_priv Grantor char 141 423 utf8 utf8_bin char(141) +3.0000 mysql tables_priv Grantor varchar 384 1152 utf8 utf8_bin varchar(384) NULL mysql tables_priv Timestamp timestamp NULL NULL NULL NULL timestamp 3.0000 mysql tables_priv Table_priv set 121 363 utf8 utf8_general_ci set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger','Delete versioning rows') 3.0000 mysql tables_priv Column_priv set 31 93 utf8 utf8_general_ci set('Select','Insert','Update','References') @@ -514,8 +514,8 @@ NULL mysql time_zone_transition_type Transition_type_id int NULL NULL NULL NULL NULL mysql time_zone_transition_type Offset int NULL NULL NULL NULL int(11) NULL mysql time_zone_transition_type Is_DST tinyint NULL NULL NULL NULL tinyint(3) unsigned 3.0000 mysql time_zone_transition_type Abbreviation char 8 24 utf8 utf8_general_ci char(8) -3.0000 mysql user Host char 60 180 utf8 utf8_bin char(60) -3.0000 mysql user User char 80 240 utf8 utf8_bin char(80) +3.0000 mysql user Host char 255 765 utf8 utf8_bin char(255) +3.0000 mysql user User char 128 384 utf8 utf8_bin char(128) 1.0000 mysql user Password longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext 1.0000 mysql user Select_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) 1.0000 mysql user Insert_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) diff --git a/mysql-test/suite/funcs_1/r/is_events.result b/mysql-test/suite/funcs_1/r/is_events.result index ca9e7427513..5e4ee37ef91 100644 --- a/mysql-test/suite/funcs_1/r/is_events.result +++ b/mysql-test/suite/funcs_1/r/is_events.result @@ -31,7 +31,7 @@ Field Type Null Key Default Extra EVENT_CATALOG varchar(64) NO EVENT_SCHEMA varchar(64) NO EVENT_NAME varchar(64) NO -DEFINER varchar(189) NO +DEFINER varchar(384) NO TIME_ZONE varchar(64) NO EVENT_BODY varchar(8) NO EVENT_DEFINITION longtext NO @@ -58,7 +58,7 @@ EVENTS CREATE TEMPORARY TABLE `EVENTS` ( `EVENT_CATALOG` varchar(64) NOT NULL DEFAULT '', `EVENT_SCHEMA` varchar(64) NOT NULL DEFAULT '', `EVENT_NAME` varchar(64) NOT NULL DEFAULT '', - `DEFINER` varchar(189) NOT NULL DEFAULT '', + `DEFINER` varchar(384) NOT NULL DEFAULT '', `TIME_ZONE` varchar(64) NOT NULL DEFAULT '', `EVENT_BODY` varchar(8) NOT NULL DEFAULT '', `EVENT_DEFINITION` longtext NOT NULL DEFAULT '', @@ -85,7 +85,7 @@ Field Type Null Key Default Extra EVENT_CATALOG varchar(64) NO EVENT_SCHEMA varchar(64) NO EVENT_NAME varchar(64) NO -DEFINER varchar(189) NO +DEFINER varchar(384) NO TIME_ZONE varchar(64) NO EVENT_BODY varchar(8) NO EVENT_DEFINITION longtext NO diff --git a/mysql-test/suite/funcs_1/r/is_routines.result b/mysql-test/suite/funcs_1/r/is_routines.result index 706ea7f623c..d0266ea8245 100644 --- a/mysql-test/suite/funcs_1/r/is_routines.result +++ b/mysql-test/suite/funcs_1/r/is_routines.result @@ -56,7 +56,7 @@ CREATED datetime NO 0000-00-00 00:00:00 LAST_ALTERED datetime NO 0000-00-00 00:00:00 SQL_MODE varchar(8192) NO ROUTINE_COMMENT longtext NO -DEFINER varchar(189) NO +DEFINER varchar(384) NO CHARACTER_SET_CLIENT varchar(32) NO COLLATION_CONNECTION varchar(32) NO DATABASE_COLLATION varchar(32) NO @@ -90,7 +90,7 @@ ROUTINES CREATE TEMPORARY TABLE `ROUTINES` ( `LAST_ALTERED` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `SQL_MODE` varchar(8192) NOT NULL DEFAULT '', `ROUTINE_COMMENT` longtext NOT NULL DEFAULT '', - `DEFINER` varchar(189) NOT NULL DEFAULT '', + `DEFINER` varchar(384) NOT NULL DEFAULT '', `CHARACTER_SET_CLIENT` varchar(32) NOT NULL DEFAULT '', `COLLATION_CONNECTION` varchar(32) NOT NULL DEFAULT '', `DATABASE_COLLATION` varchar(32) NOT NULL DEFAULT '' @@ -124,7 +124,7 @@ CREATED datetime NO 0000-00-00 00:00:00 LAST_ALTERED datetime NO 0000-00-00 00:00:00 SQL_MODE varchar(8192) NO ROUTINE_COMMENT longtext NO -DEFINER varchar(189) NO +DEFINER varchar(384) NO CHARACTER_SET_CLIENT varchar(32) NO COLLATION_CONNECTION varchar(32) NO DATABASE_COLLATION varchar(32) NO diff --git a/mysql-test/suite/funcs_1/r/is_routines_embedded.result b/mysql-test/suite/funcs_1/r/is_routines_embedded.result index 002ff2915d4..15ee96b8b25 100644 --- a/mysql-test/suite/funcs_1/r/is_routines_embedded.result +++ b/mysql-test/suite/funcs_1/r/is_routines_embedded.result @@ -56,7 +56,7 @@ CREATED datetime NO 0000-00-00 00:00:00 LAST_ALTERED datetime NO 0000-00-00 00:00:00 SQL_MODE varchar(8192) NO ROUTINE_COMMENT longtext NO -DEFINER varchar(189) NO +DEFINER varchar(384) NO CHARACTER_SET_CLIENT varchar(32) NO COLLATION_CONNECTION varchar(32) NO DATABASE_COLLATION varchar(32) NO @@ -90,7 +90,7 @@ ROUTINES CREATE TEMPORARY TABLE `ROUTINES` ( `LAST_ALTERED` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `SQL_MODE` varchar(8192) NOT NULL DEFAULT '', `ROUTINE_COMMENT` longtext NOT NULL DEFAULT '', - `DEFINER` varchar(189) NOT NULL DEFAULT '', + `DEFINER` varchar(384) NOT NULL DEFAULT '', `CHARACTER_SET_CLIENT` varchar(32) NOT NULL DEFAULT '', `COLLATION_CONNECTION` varchar(32) NOT NULL DEFAULT '', `DATABASE_COLLATION` varchar(32) NOT NULL DEFAULT '' @@ -124,7 +124,7 @@ CREATED datetime NO 0000-00-00 00:00:00 LAST_ALTERED datetime NO 0000-00-00 00:00:00 SQL_MODE varchar(8192) NO ROUTINE_COMMENT longtext NO -DEFINER varchar(189) NO +DEFINER varchar(384) NO CHARACTER_SET_CLIENT varchar(32) NO COLLATION_CONNECTION varchar(32) NO DATABASE_COLLATION varchar(32) NO diff --git a/mysql-test/suite/funcs_1/r/is_schema_privileges.result b/mysql-test/suite/funcs_1/r/is_schema_privileges.result index 8669b2873ed..def50df4364 100644 --- a/mysql-test/suite/funcs_1/r/is_schema_privileges.result +++ b/mysql-test/suite/funcs_1/r/is_schema_privileges.result @@ -28,7 +28,7 @@ DROP FUNCTION test.f1; ######################################################################### DESCRIBE information_schema.SCHEMA_PRIVILEGES; Field Type Null Key Default Extra -GRANTEE varchar(190) NO +GRANTEE varchar(385) NO TABLE_CATALOG varchar(512) NO TABLE_SCHEMA varchar(64) NO PRIVILEGE_TYPE varchar(64) NO @@ -36,7 +36,7 @@ IS_GRANTABLE varchar(3) NO SHOW CREATE TABLE information_schema.SCHEMA_PRIVILEGES; Table Create Table SCHEMA_PRIVILEGES CREATE TEMPORARY TABLE `SCHEMA_PRIVILEGES` ( - `GRANTEE` varchar(190) NOT NULL DEFAULT '', + `GRANTEE` varchar(385) NOT NULL DEFAULT '', `TABLE_CATALOG` varchar(512) NOT NULL DEFAULT '', `TABLE_SCHEMA` varchar(64) NOT NULL DEFAULT '', `PRIVILEGE_TYPE` varchar(64) NOT NULL DEFAULT '', @@ -44,7 +44,7 @@ SCHEMA_PRIVILEGES CREATE TEMPORARY TABLE `SCHEMA_PRIVILEGES` ( ) ENGINE=MEMORY DEFAULT CHARSET=utf8 SHOW COLUMNS FROM information_schema.SCHEMA_PRIVILEGES; Field Type Null Key Default Extra -GRANTEE varchar(190) NO +GRANTEE varchar(385) NO TABLE_CATALOG varchar(512) NO TABLE_SCHEMA varchar(64) NO PRIVILEGE_TYPE varchar(64) NO diff --git a/mysql-test/suite/funcs_1/r/is_table_privileges.result b/mysql-test/suite/funcs_1/r/is_table_privileges.result index d7065b54788..504f32fcaf5 100644 --- a/mysql-test/suite/funcs_1/r/is_table_privileges.result +++ b/mysql-test/suite/funcs_1/r/is_table_privileges.result @@ -28,7 +28,7 @@ DROP FUNCTION test.f1; ######################################################################### DESCRIBE information_schema.TABLE_PRIVILEGES; Field Type Null Key Default Extra -GRANTEE varchar(190) NO +GRANTEE varchar(385) NO TABLE_CATALOG varchar(512) NO TABLE_SCHEMA varchar(64) NO TABLE_NAME varchar(64) NO @@ -37,7 +37,7 @@ IS_GRANTABLE varchar(3) NO SHOW CREATE TABLE information_schema.TABLE_PRIVILEGES; Table Create Table TABLE_PRIVILEGES CREATE TEMPORARY TABLE `TABLE_PRIVILEGES` ( - `GRANTEE` varchar(190) NOT NULL DEFAULT '', + `GRANTEE` varchar(385) NOT NULL DEFAULT '', `TABLE_CATALOG` varchar(512) NOT NULL DEFAULT '', `TABLE_SCHEMA` varchar(64) NOT NULL DEFAULT '', `TABLE_NAME` varchar(64) NOT NULL DEFAULT '', @@ -46,7 +46,7 @@ TABLE_PRIVILEGES CREATE TEMPORARY TABLE `TABLE_PRIVILEGES` ( ) ENGINE=MEMORY DEFAULT CHARSET=utf8 SHOW COLUMNS FROM information_schema.TABLE_PRIVILEGES; Field Type Null Key Default Extra -GRANTEE varchar(190) NO +GRANTEE varchar(385) NO TABLE_CATALOG varchar(512) NO TABLE_SCHEMA varchar(64) NO TABLE_NAME varchar(64) NO diff --git a/mysql-test/suite/funcs_1/r/is_triggers.result b/mysql-test/suite/funcs_1/r/is_triggers.result index 6cfcd1718fe..49866bcbd85 100644 --- a/mysql-test/suite/funcs_1/r/is_triggers.result +++ b/mysql-test/suite/funcs_1/r/is_triggers.result @@ -48,7 +48,7 @@ ACTION_REFERENCE_OLD_ROW varchar(3) NO ACTION_REFERENCE_NEW_ROW varchar(3) NO CREATED datetime(2) YES NULL SQL_MODE varchar(8192) NO -DEFINER varchar(189) NO +DEFINER varchar(384) NO CHARACTER_SET_CLIENT varchar(32) NO COLLATION_CONNECTION varchar(32) NO DATABASE_COLLATION varchar(32) NO @@ -73,7 +73,7 @@ TRIGGERS CREATE TEMPORARY TABLE `TRIGGERS` ( `ACTION_REFERENCE_NEW_ROW` varchar(3) NOT NULL DEFAULT '', `CREATED` datetime(2) DEFAULT NULL, `SQL_MODE` varchar(8192) NOT NULL DEFAULT '', - `DEFINER` varchar(189) NOT NULL DEFAULT '', + `DEFINER` varchar(384) NOT NULL DEFAULT '', `CHARACTER_SET_CLIENT` varchar(32) NOT NULL DEFAULT '', `COLLATION_CONNECTION` varchar(32) NOT NULL DEFAULT '', `DATABASE_COLLATION` varchar(32) NOT NULL DEFAULT '' @@ -98,7 +98,7 @@ ACTION_REFERENCE_OLD_ROW varchar(3) NO ACTION_REFERENCE_NEW_ROW varchar(3) NO CREATED datetime(2) YES NULL SQL_MODE varchar(8192) NO -DEFINER varchar(189) NO +DEFINER varchar(384) NO CHARACTER_SET_CLIENT varchar(32) NO COLLATION_CONNECTION varchar(32) NO DATABASE_COLLATION varchar(32) NO diff --git a/mysql-test/suite/funcs_1/r/is_triggers_embedded.result b/mysql-test/suite/funcs_1/r/is_triggers_embedded.result index c5186fb1004..c338752ae35 100644 --- a/mysql-test/suite/funcs_1/r/is_triggers_embedded.result +++ b/mysql-test/suite/funcs_1/r/is_triggers_embedded.result @@ -48,7 +48,7 @@ ACTION_REFERENCE_OLD_ROW varchar(3) NO ACTION_REFERENCE_NEW_ROW varchar(3) NO CREATED datetime(2) YES NULL SQL_MODE varchar(8192) NO -DEFINER varchar(189) NO +DEFINER varchar(384) NO CHARACTER_SET_CLIENT varchar(32) NO COLLATION_CONNECTION varchar(32) NO DATABASE_COLLATION varchar(32) NO @@ -73,7 +73,7 @@ TRIGGERS CREATE TEMPORARY TABLE `TRIGGERS` ( `ACTION_REFERENCE_NEW_ROW` varchar(3) NOT NULL DEFAULT '', `CREATED` datetime(2) DEFAULT NULL, `SQL_MODE` varchar(8192) NOT NULL DEFAULT '', - `DEFINER` varchar(189) NOT NULL DEFAULT '', + `DEFINER` varchar(384) NOT NULL DEFAULT '', `CHARACTER_SET_CLIENT` varchar(32) NOT NULL DEFAULT '', `COLLATION_CONNECTION` varchar(32) NOT NULL DEFAULT '', `DATABASE_COLLATION` varchar(32) NOT NULL DEFAULT '' @@ -98,7 +98,7 @@ ACTION_REFERENCE_OLD_ROW varchar(3) NO ACTION_REFERENCE_NEW_ROW varchar(3) NO CREATED datetime(2) YES NULL SQL_MODE varchar(8192) NO -DEFINER varchar(189) NO +DEFINER varchar(384) NO CHARACTER_SET_CLIENT varchar(32) NO COLLATION_CONNECTION varchar(32) NO DATABASE_COLLATION varchar(32) NO diff --git a/mysql-test/suite/funcs_1/r/is_user_privileges.result b/mysql-test/suite/funcs_1/r/is_user_privileges.result index 27bb2b3de83..0575d1416d5 100644 --- a/mysql-test/suite/funcs_1/r/is_user_privileges.result +++ b/mysql-test/suite/funcs_1/r/is_user_privileges.result @@ -28,21 +28,21 @@ DROP FUNCTION test.f1; ######################################################################### DESCRIBE information_schema.USER_PRIVILEGES; Field Type Null Key Default Extra -GRANTEE varchar(190) NO +GRANTEE varchar(385) NO TABLE_CATALOG varchar(512) NO PRIVILEGE_TYPE varchar(64) NO IS_GRANTABLE varchar(3) NO SHOW CREATE TABLE information_schema.USER_PRIVILEGES; Table Create Table USER_PRIVILEGES CREATE TEMPORARY TABLE `USER_PRIVILEGES` ( - `GRANTEE` varchar(190) NOT NULL DEFAULT '', + `GRANTEE` varchar(385) NOT NULL DEFAULT '', `TABLE_CATALOG` varchar(512) NOT NULL DEFAULT '', `PRIVILEGE_TYPE` varchar(64) NOT NULL DEFAULT '', `IS_GRANTABLE` varchar(3) NOT NULL DEFAULT '' ) ENGINE=MEMORY DEFAULT CHARSET=utf8 SHOW COLUMNS FROM information_schema.USER_PRIVILEGES; Field Type Null Key Default Extra -GRANTEE varchar(190) NO +GRANTEE varchar(385) NO TABLE_CATALOG varchar(512) NO PRIVILEGE_TYPE varchar(64) NO IS_GRANTABLE varchar(3) NO diff --git a/mysql-test/suite/funcs_1/r/is_views.result b/mysql-test/suite/funcs_1/r/is_views.result index 6c948ea667b..9ab9138e9c2 100644 --- a/mysql-test/suite/funcs_1/r/is_views.result +++ b/mysql-test/suite/funcs_1/r/is_views.result @@ -34,7 +34,7 @@ TABLE_NAME varchar(64) NO VIEW_DEFINITION longtext NO CHECK_OPTION varchar(8) NO IS_UPDATABLE varchar(3) NO -DEFINER varchar(189) NO +DEFINER varchar(384) NO SECURITY_TYPE varchar(7) NO CHARACTER_SET_CLIENT varchar(32) NO COLLATION_CONNECTION varchar(32) NO @@ -48,7 +48,7 @@ VIEWS CREATE TEMPORARY TABLE `VIEWS` ( `VIEW_DEFINITION` longtext NOT NULL DEFAULT '', `CHECK_OPTION` varchar(8) NOT NULL DEFAULT '', `IS_UPDATABLE` varchar(3) NOT NULL DEFAULT '', - `DEFINER` varchar(189) NOT NULL DEFAULT '', + `DEFINER` varchar(384) NOT NULL DEFAULT '', `SECURITY_TYPE` varchar(7) NOT NULL DEFAULT '', `CHARACTER_SET_CLIENT` varchar(32) NOT NULL DEFAULT '', `COLLATION_CONNECTION` varchar(32) NOT NULL DEFAULT '', @@ -62,7 +62,7 @@ TABLE_NAME varchar(64) NO VIEW_DEFINITION longtext NO CHECK_OPTION varchar(8) NO IS_UPDATABLE varchar(3) NO -DEFINER varchar(189) NO +DEFINER varchar(384) NO SECURITY_TYPE varchar(7) NO CHARACTER_SET_CLIENT varchar(32) NO COLLATION_CONNECTION varchar(32) NO diff --git a/mysql-test/suite/funcs_1/r/is_views_embedded.result b/mysql-test/suite/funcs_1/r/is_views_embedded.result index 6a628c95bda..58d3b1048f5 100644 --- a/mysql-test/suite/funcs_1/r/is_views_embedded.result +++ b/mysql-test/suite/funcs_1/r/is_views_embedded.result @@ -34,7 +34,7 @@ TABLE_NAME varchar(64) NO VIEW_DEFINITION longtext NO CHECK_OPTION varchar(8) NO IS_UPDATABLE varchar(3) NO -DEFINER varchar(189) NO +DEFINER varchar(384) NO SECURITY_TYPE varchar(7) NO CHARACTER_SET_CLIENT varchar(32) NO COLLATION_CONNECTION varchar(32) NO @@ -48,7 +48,7 @@ VIEWS CREATE TEMPORARY TABLE `VIEWS` ( `VIEW_DEFINITION` longtext NOT NULL DEFAULT '', `CHECK_OPTION` varchar(8) NOT NULL DEFAULT '', `IS_UPDATABLE` varchar(3) NOT NULL DEFAULT '', - `DEFINER` varchar(189) NOT NULL DEFAULT '', + `DEFINER` varchar(384) NOT NULL DEFAULT '', `SECURITY_TYPE` varchar(7) NOT NULL DEFAULT '', `CHARACTER_SET_CLIENT` varchar(32) NOT NULL DEFAULT '', `COLLATION_CONNECTION` varchar(32) NOT NULL DEFAULT '', @@ -62,7 +62,7 @@ TABLE_NAME varchar(64) NO VIEW_DEFINITION longtext NO CHECK_OPTION varchar(8) NO IS_UPDATABLE varchar(3) NO -DEFINER varchar(189) NO +DEFINER varchar(384) NO SECURITY_TYPE varchar(7) NO CHARACTER_SET_CLIENT varchar(32) NO COLLATION_CONNECTION varchar(32) NO diff --git a/mysql-test/suite/maria/maria-ucs2.result b/mysql-test/suite/maria/maria-ucs2.result index 7f3b691b139..5e5bc2cd312 100644 --- a/mysql-test/suite/maria/maria-ucs2.result +++ b/mysql-test/suite/maria/maria-ucs2.result @@ -28,7 +28,7 @@ t1 CREATE TABLE `t1` ( DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(1200),KEY(a)) ENGINE=Aria CHARACTER SET ucs2; Warnings: -Note 1071 Specified key was too long; max key length is 2000 bytes +Note 1071 Specified key was too long; max key length is 2300 bytes INSERT INTO t1 VALUES (REPEAT('abc ',200)); CHECK TABLE t1; Table Op Msg_type Msg_text diff --git a/mysql-test/suite/maria/maria.result b/mysql-test/suite/maria/maria.result index e367973c1f1..9f38d8605ad 100644 --- a/mysql-test/suite/maria/maria.result +++ b/mysql-test/suite/maria/maria.result @@ -351,13 +351,13 @@ CHECK TABLE t1; Table Op Msg_type Msg_text test.t1 check status OK drop table t1; -CREATE TABLE t1 (a varchar(255), b varchar(255), c varchar(255), d varchar(255), e varchar(255), f varchar(255), g varchar(255), h varchar(255), i varchar(255), KEY t1 (a, b, c, d, e, f, g, h, i)); -ERROR 42000: Specified key was too long; max key length is 2000 bytes +CREATE TABLE t1 (a varchar(255), b varchar(255), c varchar(255), d varchar(255), e varchar(255), f varchar(255), g varchar(255), h varchar(255), i varchar(255), j varchar(255), KEY t1 (a, b, c, d, e, f, g, h, i, j)); +ERROR 42000: Specified key was too long; max key length is 2300 bytes CREATE TABLE t1 (a varchar(1), b varchar(1), key (a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b)); ERROR 42000: Too many key parts specified; max 32 parts allowed -CREATE TABLE t1 (a varchar(255), b varchar(255), c varchar(255), d varchar(255), e varchar(255), f varchar(255), g varchar(255), h varchar(255), i varchar(255)); -ALTER TABLE t1 ADD INDEX t1 (a, b, c, d, e, f, g, h, i); -ERROR 42000: Specified key was too long; max key length is 2000 bytes +CREATE TABLE t1 (a varchar(255), b varchar(255), c varchar(255), d varchar(255), e varchar(255), f varchar(255), g varchar(255), h varchar(255), i varchar(255), j varchar(255)); +ALTER TABLE t1 ADD INDEX t1 (a, b, c, d, e, f, g, h, i, j); +ERROR 42000: Specified key was too long; max key length is 2300 bytes DROP TABLE t1; CREATE TABLE t1 (a int not null, b int, c int, key(b), key(c), key(a,b), key(c,a)); INSERT into t1 values (0,null,0), (0,null,1), (0,null,2), (0,null,3), (1,1,4); @@ -1594,7 +1594,7 @@ a b drop table t1; create table t1 (v varchar(65530), key(v)); Warnings: -Note 1071 Specified key was too long; max key length is 2000 bytes +Note 1071 Specified key was too long; max key length is 2300 bytes drop table if exists t1; set statement sql_mode = 'NO_ENGINE_SUBSTITUTION' for create table t1 (v varchar(65536)); @@ -1864,55 +1864,55 @@ t1 CREATE TABLE `t1` ( KEY `a` (`a`) KEY_BLOCK_SIZE=8192 ) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 drop table t1; -create table t1 (a varchar(2048), key `a` (a)); +create table t1 (a varchar(4096), key `a` (a)); Warnings: -Note 1071 Specified key was too long; max key length is 2000 bytes +Note 1071 Specified key was too long; max key length is 2300 bytes show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(2048) DEFAULT NULL, - KEY `a` (`a`(2000)) + `a` varchar(4096) DEFAULT NULL, + KEY `a` (`a`(2300)) ) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 drop table t1; -create table t1 (a varchar(2048), key `a` (a) key_block_size=1024); +create table t1 (a varchar(4096), key `a` (a) key_block_size=1024); Warnings: -Note 1071 Specified key was too long; max key length is 2000 bytes +Note 1071 Specified key was too long; max key length is 2300 bytes show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(2048) DEFAULT NULL, - KEY `a` (`a`(2000)) KEY_BLOCK_SIZE=8192 + `a` varchar(4096) DEFAULT NULL, + KEY `a` (`a`(2300)) KEY_BLOCK_SIZE=8192 ) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 drop table t1; -create table t1 (a int not null, b varchar(2048), key (a), key(b)) key_block_size=1024; +create table t1 (a int not null, b varchar(4096), key (a), key(b)) key_block_size=1024; Warnings: -Note 1071 Specified key was too long; max key length is 2000 bytes +Note 1071 Specified key was too long; max key length is 2300 bytes show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL, - `b` varchar(2048) DEFAULT NULL, + `b` varchar(4096) DEFAULT NULL, KEY `a` (`a`) KEY_BLOCK_SIZE=8192, - KEY `b` (`b`(2000)) KEY_BLOCK_SIZE=8192 + KEY `b` (`b`(2300)) KEY_BLOCK_SIZE=8192 ) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 KEY_BLOCK_SIZE=1024 alter table t1 key_block_size=2048; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL, - `b` varchar(2048) DEFAULT NULL, + `b` varchar(4096) DEFAULT NULL, KEY `a` (`a`) KEY_BLOCK_SIZE=8192, - KEY `b` (`b`(2000)) KEY_BLOCK_SIZE=8192 + KEY `b` (`b`(2300)) KEY_BLOCK_SIZE=8192 ) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 KEY_BLOCK_SIZE=2048 alter table t1 add c int, add key (c); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL, - `b` varchar(2048) DEFAULT NULL, + `b` varchar(4096) DEFAULT NULL, `c` int(11) DEFAULT NULL, KEY `a` (`a`) KEY_BLOCK_SIZE=8192, - KEY `b` (`b`(2000)) KEY_BLOCK_SIZE=8192, + KEY `b` (`b`(2300)) KEY_BLOCK_SIZE=8192, KEY `c` (`c`) KEY_BLOCK_SIZE=8192 ) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 KEY_BLOCK_SIZE=2048 alter table t1 key_block_size=4096; @@ -1920,10 +1920,10 @@ show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL, - `b` varchar(2048) DEFAULT NULL, + `b` varchar(4096) DEFAULT NULL, `c` int(11) DEFAULT NULL, KEY `a` (`a`) KEY_BLOCK_SIZE=8192, - KEY `b` (`b`(2000)) KEY_BLOCK_SIZE=8192, + KEY `b` (`b`(2300)) KEY_BLOCK_SIZE=8192, KEY `c` (`c`) KEY_BLOCK_SIZE=8192 ) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 KEY_BLOCK_SIZE=4096 alter table t1 key_block_size=0; @@ -1931,10 +1931,10 @@ show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL, - `b` varchar(2048) DEFAULT NULL, + `b` varchar(4096) DEFAULT NULL, `c` int(11) DEFAULT NULL, KEY `a` (`a`) KEY_BLOCK_SIZE=8192, - KEY `b` (`b`(2000)) KEY_BLOCK_SIZE=8192, + KEY `b` (`b`(2300)) KEY_BLOCK_SIZE=8192, KEY `c` (`c`) KEY_BLOCK_SIZE=8192 ) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 alter table t1 add d int, add key (d); @@ -1942,37 +1942,37 @@ show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL, - `b` varchar(2048) DEFAULT NULL, + `b` varchar(4096) DEFAULT NULL, `c` int(11) DEFAULT NULL, `d` int(11) DEFAULT NULL, KEY `a` (`a`) KEY_BLOCK_SIZE=8192, - KEY `b` (`b`(2000)) KEY_BLOCK_SIZE=8192, + KEY `b` (`b`(2300)) KEY_BLOCK_SIZE=8192, KEY `c` (`c`) KEY_BLOCK_SIZE=8192, KEY `d` (`d`) ) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 drop table t1; -create table t1 (a int not null, b varchar(2048), key (a), key(b)) key_block_size=8192; +create table t1 (a int not null, b varchar(4096), key (a), key(b)) key_block_size=8192; Warnings: -Note 1071 Specified key was too long; max key length is 2000 bytes +Note 1071 Specified key was too long; max key length is 2300 bytes show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL, - `b` varchar(2048) DEFAULT NULL, + `b` varchar(4096) DEFAULT NULL, KEY `a` (`a`), - KEY `b` (`b`(2000)) + KEY `b` (`b`(2300)) ) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 KEY_BLOCK_SIZE=8192 drop table t1; -create table t1 (a int not null, b varchar(2048), key (a) key_block_size=1024, key(b)) key_block_size=8192; +create table t1 (a int not null, b varchar(4096), key (a) key_block_size=1024, key(b)) key_block_size=8192; Warnings: -Note 1071 Specified key was too long; max key length is 2000 bytes +Note 1071 Specified key was too long; max key length is 2300 bytes show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL, - `b` varchar(2048) DEFAULT NULL, + `b` varchar(4096) DEFAULT NULL, KEY `a` (`a`), - KEY `b` (`b`(2000)) + KEY `b` (`b`(2300)) ) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 KEY_BLOCK_SIZE=8192 drop table t1; create table t1 (a int not null, b int, key (a) key_block_size=1024, key(b) key_block_size=8192) key_block_size=16384; @@ -1993,14 +1993,14 @@ t1 CREATE TABLE `t1` ( KEY `a` (`a`) KEY_BLOCK_SIZE=8192 ) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 drop table t1; -create table t1 (a varchar(2048), key `a` (a) key_block_size=1000000000000000000); +create table t1 (a varchar(4096), key `a` (a) key_block_size=1000000000000000000); Warnings: -Note 1071 Specified key was too long; max key length is 2000 bytes +Note 1071 Specified key was too long; max key length is 2300 bytes show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(2048) DEFAULT NULL, - KEY `a` (`a`(2000)) KEY_BLOCK_SIZE=8192 + `a` varchar(4096) DEFAULT NULL, + KEY `a` (`a`(2300)) KEY_BLOCK_SIZE=8192 ) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 drop table t1; create table t1 (a int not null, key `a` (a) key_block_size=1025); diff --git a/mysql-test/suite/maria/maria.test b/mysql-test/suite/maria/maria.test index c940fc66bd4..123996bed05 100644 --- a/mysql-test/suite/maria/maria.test +++ b/mysql-test/suite/maria/maria.test @@ -373,12 +373,12 @@ drop table t1; # --error 1071 -CREATE TABLE t1 (a varchar(255), b varchar(255), c varchar(255), d varchar(255), e varchar(255), f varchar(255), g varchar(255), h varchar(255), i varchar(255), KEY t1 (a, b, c, d, e, f, g, h, i)); +CREATE TABLE t1 (a varchar(255), b varchar(255), c varchar(255), d varchar(255), e varchar(255), f varchar(255), g varchar(255), h varchar(255), i varchar(255), j varchar(255), KEY t1 (a, b, c, d, e, f, g, h, i, j)); --error 1070 CREATE TABLE t1 (a varchar(1), b varchar(1), key (a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b)); -CREATE TABLE t1 (a varchar(255), b varchar(255), c varchar(255), d varchar(255), e varchar(255), f varchar(255), g varchar(255), h varchar(255), i varchar(255)); +CREATE TABLE t1 (a varchar(255), b varchar(255), c varchar(255), d varchar(255), e varchar(255), f varchar(255), g varchar(255), h varchar(255), i varchar(255), j varchar(255)); --error 1071 -ALTER TABLE t1 ADD INDEX t1 (a, b, c, d, e, f, g, h, i); +ALTER TABLE t1 ADD INDEX t1 (a, b, c, d, e, f, g, h, i, j); DROP TABLE t1; # @@ -1159,15 +1159,15 @@ create table t1 (a int not null, key `a` (a) key_block_size=2048); show create table t1; drop table t1; -create table t1 (a varchar(2048), key `a` (a)); +create table t1 (a varchar(4096), key `a` (a)); show create table t1; drop table t1; -create table t1 (a varchar(2048), key `a` (a) key_block_size=1024); +create table t1 (a varchar(4096), key `a` (a) key_block_size=1024); show create table t1; drop table t1; -create table t1 (a int not null, b varchar(2048), key (a), key(b)) key_block_size=1024; +create table t1 (a int not null, b varchar(4096), key (a), key(b)) key_block_size=1024; show create table t1; alter table t1 key_block_size=2048; show create table t1; @@ -1181,11 +1181,11 @@ alter table t1 add d int, add key (d); show create table t1; drop table t1; -create table t1 (a int not null, b varchar(2048), key (a), key(b)) key_block_size=8192; +create table t1 (a int not null, b varchar(4096), key (a), key(b)) key_block_size=8192; show create table t1; drop table t1; -create table t1 (a int not null, b varchar(2048), key (a) key_block_size=1024, key(b)) key_block_size=8192; +create table t1 (a int not null, b varchar(4096), key (a) key_block_size=1024, key(b)) key_block_size=8192; show create table t1; drop table t1; @@ -1199,7 +1199,7 @@ create table t1 (a int not null, key `a` (a) key_block_size=512); show create table t1; drop table t1; -create table t1 (a varchar(2048), key `a` (a) key_block_size=1000000000000000000); +create table t1 (a varchar(4096), key `a` (a) key_block_size=1000000000000000000); show create table t1; drop table t1; diff --git a/mysql-test/suite/maria/maria3.result b/mysql-test/suite/maria/maria3.result index 871748b399a..fa794029226 100644 --- a/mysql-test/suite/maria/maria3.result +++ b/mysql-test/suite/maria/maria3.result @@ -15,14 +15,14 @@ t1 CREATE TABLE `t1` ( KEY `a` (`a`) KEY_BLOCK_SIZE=8192 ) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 drop table t1; -create table t1 (a varchar(2048), key `a` (a) key_block_size=1000000000000000000); +create table t1 (a varchar(4096), key `a` (a) key_block_size=1000000000000000000); Warnings: -Note 1071 Specified key was too long; max key length is 2000 bytes +Note 1071 Specified key was too long; max key length is 2300 bytes show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(2048) DEFAULT NULL, - KEY `a` (`a`(2000)) KEY_BLOCK_SIZE=8192 + `a` varchar(4096) DEFAULT NULL, + KEY `a` (`a`(2300)) KEY_BLOCK_SIZE=8192 ) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 drop table t1; create table t1 (a int not null, key `a` (a) key_block_size=1025); diff --git a/mysql-test/suite/maria/maria3.test b/mysql-test/suite/maria/maria3.test index bf533228300..d8f0721cd9a 100644 --- a/mysql-test/suite/maria/maria3.test +++ b/mysql-test/suite/maria/maria3.test @@ -22,7 +22,7 @@ create table t1 (a int not null, key `a` (a) key_block_size=512); show create table t1; drop table t1; -create table t1 (a varchar(2048), key `a` (a) key_block_size=1000000000000000000); +create table t1 (a varchar(4096), key `a` (a) key_block_size=1000000000000000000); show create table t1; drop table t1; diff --git a/mysql-test/suite/maria/mrr.result b/mysql-test/suite/maria/mrr.result index df915e4a15d..a8d444d4bd4 100644 --- a/mysql-test/suite/maria/mrr.result +++ b/mysql-test/suite/maria/mrr.result @@ -423,12 +423,12 @@ set join_buffer_size=10240; CREATE TABLE t1 ( f2 varchar(32) COLLATE latin1_swedish_ci, f3 int(11), -f4 varchar(2048) COLLATE utf8_bin, -f5 varchar(2048) COLLATE latin1_bin, +f4 varchar(4096) COLLATE utf8_bin, +f5 varchar(4096) COLLATE latin1_bin, KEY (f5) ) ENGINE=Aria TRANSACTIONAL=0 ; Warnings: -Note 1071 Specified key was too long; max key length is 2000 bytes +Note 1071 Specified key was too long; max key length is 2300 bytes # Fill the table with some data SELECT alias2.* , alias1.f2 FROM diff --git a/mysql-test/suite/maria/mrr.test b/mysql-test/suite/maria/mrr.test index 45d75a9d795..49da28fda5e 100644 --- a/mysql-test/suite/maria/mrr.test +++ b/mysql-test/suite/maria/mrr.test @@ -144,8 +144,8 @@ set join_buffer_size=10240; CREATE TABLE t1 ( f2 varchar(32) COLLATE latin1_swedish_ci, f3 int(11), - f4 varchar(2048) COLLATE utf8_bin, - f5 varchar(2048) COLLATE latin1_bin, + f4 varchar(4096) COLLATE utf8_bin, + f5 varchar(4096) COLLATE latin1_bin, KEY (f5) ) ENGINE=Aria TRANSACTIONAL=0 ; diff --git a/mysql-test/suite/perfschema/r/schema.result b/mysql-test/suite/perfschema/r/schema.result index 32498723aa6..71bbf00bf72 100644 --- a/mysql-test/suite/perfschema/r/schema.result +++ b/mysql-test/suite/perfschema/r/schema.result @@ -92,7 +92,7 @@ show create table accounts; Table Create Table accounts CREATE TABLE `accounts` ( `USER` char(128) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, - `HOST` char(60) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `HOST` char(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, `CURRENT_CONNECTIONS` bigint(20) NOT NULL, `TOTAL_CONNECTIONS` bigint(20) NOT NULL ) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8 @@ -153,7 +153,7 @@ events_stages_history_long CREATE TABLE `events_stages_history_long` ( show create table events_stages_summary_by_host_by_event_name; Table Create Table events_stages_summary_by_host_by_event_name CREATE TABLE `events_stages_summary_by_host_by_event_name` ( - `HOST` char(60) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `HOST` char(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, `EVENT_NAME` varchar(128) NOT NULL, `COUNT_STAR` bigint(20) unsigned NOT NULL, `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL, @@ -187,7 +187,7 @@ show create table events_stages_summary_by_account_by_event_name; Table Create Table events_stages_summary_by_account_by_event_name CREATE TABLE `events_stages_summary_by_account_by_event_name` ( `USER` char(128) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, - `HOST` char(60) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `HOST` char(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, `EVENT_NAME` varchar(128) NOT NULL, `COUNT_STAR` bigint(20) unsigned NOT NULL, `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL, @@ -376,7 +376,7 @@ events_statements_summary_by_digest CREATE TABLE `events_statements_summary_by_d show create table events_statements_summary_by_host_by_event_name; Table Create Table events_statements_summary_by_host_by_event_name CREATE TABLE `events_statements_summary_by_host_by_event_name` ( - `HOST` char(60) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `HOST` char(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, `EVENT_NAME` varchar(128) NOT NULL, `COUNT_STAR` bigint(20) unsigned NOT NULL, `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL, @@ -467,7 +467,7 @@ show create table events_statements_summary_by_account_by_event_name; Table Create Table events_statements_summary_by_account_by_event_name CREATE TABLE `events_statements_summary_by_account_by_event_name` ( `USER` char(128) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, - `HOST` char(60) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `HOST` char(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, `EVENT_NAME` varchar(128) NOT NULL, `COUNT_STAR` bigint(20) unsigned NOT NULL, `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL, @@ -784,7 +784,7 @@ events_waits_history_long CREATE TABLE `events_waits_history_long` ( show create table events_waits_summary_by_host_by_event_name; Table Create Table events_waits_summary_by_host_by_event_name CREATE TABLE `events_waits_summary_by_host_by_event_name` ( - `HOST` char(60) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `HOST` char(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, `EVENT_NAME` varchar(128) NOT NULL, `COUNT_STAR` bigint(20) unsigned NOT NULL, `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL, @@ -829,7 +829,7 @@ show create table events_waits_summary_by_account_by_event_name; Table Create Table events_waits_summary_by_account_by_event_name CREATE TABLE `events_waits_summary_by_account_by_event_name` ( `USER` char(128) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, - `HOST` char(60) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `HOST` char(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, `EVENT_NAME` varchar(128) NOT NULL, `COUNT_STAR` bigint(20) unsigned NOT NULL, `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL, @@ -1040,7 +1040,7 @@ host_cache CREATE TABLE `host_cache` ( show create table hosts; Table Create Table hosts CREATE TABLE `hosts` ( - `HOST` char(60) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `HOST` char(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, `CURRENT_CONNECTIONS` bigint(20) NOT NULL, `TOTAL_CONNECTIONS` bigint(20) NOT NULL ) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8 @@ -1082,7 +1082,7 @@ rwlock_instances CREATE TABLE `rwlock_instances` ( show create table setup_actors; Table Create Table setup_actors CREATE TABLE `setup_actors` ( - `HOST` char(60) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '%', + `HOST` char(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '%', `USER` char(128) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '%', `ROLE` char(128) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '%', `ENABLED` enum('YES','NO') NOT NULL DEFAULT 'YES', @@ -1364,7 +1364,7 @@ threads CREATE TABLE `threads` ( `TYPE` varchar(10) NOT NULL, `PROCESSLIST_ID` bigint(20) unsigned DEFAULT NULL, `PROCESSLIST_USER` varchar(128) DEFAULT NULL, - `PROCESSLIST_HOST` varchar(60) DEFAULT NULL, + `PROCESSLIST_HOST` varchar(255) DEFAULT NULL, `PROCESSLIST_DB` varchar(64) DEFAULT NULL, `PROCESSLIST_COMMAND` varchar(16) DEFAULT NULL, `PROCESSLIST_TIME` bigint(20) DEFAULT NULL, diff --git a/mysql-test/suite/perfschema/r/table_schema.result b/mysql-test/suite/perfschema/r/table_schema.result index 10e5f677a91..2fd7677ce26 100644 --- a/mysql-test/suite/perfschema/r/table_schema.result +++ b/mysql-test/suite/perfschema/r/table_schema.result @@ -2,7 +2,7 @@ select * from information_schema.columns where table_schema="performance_schema" order by table_name, ordinal_position; TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT IS_GENERATED GENERATION_EXPRESSION def performance_schema accounts USER 1 NULL YES char 128 384 NULL NULL NULL utf8 utf8_bin char(128) select,insert,update,references NEVER NULL -def performance_schema accounts HOST 2 NULL YES char 60 180 NULL NULL NULL utf8 utf8_bin char(60) select,insert,update,references NEVER NULL +def performance_schema accounts HOST 2 NULL YES char 255 765 NULL NULL NULL utf8 utf8_bin char(255) select,insert,update,references NEVER NULL def performance_schema accounts CURRENT_CONNECTIONS 3 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL def performance_schema accounts TOTAL_CONNECTIONS 4 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL def performance_schema cond_instances NAME 1 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references NEVER NULL @@ -44,14 +44,14 @@ def performance_schema events_stages_history_long WORK_ESTIMATED 10 NULL YES big def performance_schema events_stages_history_long NESTING_EVENT_ID 11 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL def performance_schema events_stages_history_long NESTING_EVENT_TYPE 12 NULL YES enum 11 33 NULL NULL NULL utf8 utf8_general_ci enum('TRANSACTION','STATEMENT','STAGE','WAIT') select,insert,update,references NEVER NULL def performance_schema events_stages_summary_by_account_by_event_name USER 1 NULL YES char 128 384 NULL NULL NULL utf8 utf8_bin char(128) select,insert,update,references NEVER NULL -def performance_schema events_stages_summary_by_account_by_event_name HOST 2 NULL YES char 60 180 NULL NULL NULL utf8 utf8_bin char(60) select,insert,update,references NEVER NULL +def performance_schema events_stages_summary_by_account_by_event_name HOST 2 NULL YES char 255 765 NULL NULL NULL utf8 utf8_bin char(255) select,insert,update,references NEVER NULL def performance_schema events_stages_summary_by_account_by_event_name EVENT_NAME 3 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references NEVER NULL def performance_schema events_stages_summary_by_account_by_event_name COUNT_STAR 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL def performance_schema events_stages_summary_by_account_by_event_name SUM_TIMER_WAIT 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL def performance_schema events_stages_summary_by_account_by_event_name MIN_TIMER_WAIT 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL def performance_schema events_stages_summary_by_account_by_event_name AVG_TIMER_WAIT 7 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL def performance_schema events_stages_summary_by_account_by_event_name MAX_TIMER_WAIT 8 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL -def performance_schema events_stages_summary_by_host_by_event_name HOST 1 NULL YES char 60 180 NULL NULL NULL utf8 utf8_bin char(60) select,insert,update,references NEVER NULL +def performance_schema events_stages_summary_by_host_by_event_name HOST 1 NULL YES char 255 765 NULL NULL NULL utf8 utf8_bin char(255) select,insert,update,references NEVER NULL def performance_schema events_stages_summary_by_host_by_event_name EVENT_NAME 2 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references NEVER NULL def performance_schema events_stages_summary_by_host_by_event_name COUNT_STAR 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL def performance_schema events_stages_summary_by_host_by_event_name SUM_TIMER_WAIT 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL @@ -202,7 +202,7 @@ def performance_schema events_statements_history_long NESTING_EVENT_ID 39 NULL Y def performance_schema events_statements_history_long NESTING_EVENT_TYPE 40 NULL YES enum 11 33 NULL NULL NULL utf8 utf8_general_ci enum('TRANSACTION','STATEMENT','STAGE','WAIT') select,insert,update,references NEVER NULL def performance_schema events_statements_history_long NESTING_EVENT_LEVEL 41 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL def performance_schema events_statements_summary_by_account_by_event_name USER 1 NULL YES char 128 384 NULL NULL NULL utf8 utf8_bin char(128) select,insert,update,references NEVER NULL -def performance_schema events_statements_summary_by_account_by_event_name HOST 2 NULL YES char 60 180 NULL NULL NULL utf8 utf8_bin char(60) select,insert,update,references NEVER NULL +def performance_schema events_statements_summary_by_account_by_event_name HOST 2 NULL YES char 255 765 NULL NULL NULL utf8 utf8_bin char(255) select,insert,update,references NEVER NULL def performance_schema events_statements_summary_by_account_by_event_name EVENT_NAME 3 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references NEVER NULL def performance_schema events_statements_summary_by_account_by_event_name COUNT_STAR 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL def performance_schema events_statements_summary_by_account_by_event_name SUM_TIMER_WAIT 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL @@ -257,7 +257,7 @@ def performance_schema events_statements_summary_by_digest SUM_NO_INDEX_USED 26 def performance_schema events_statements_summary_by_digest SUM_NO_GOOD_INDEX_USED 27 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL def performance_schema events_statements_summary_by_digest FIRST_SEEN 28 '0000-00-00 00:00:00' NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp select,insert,update,references NEVER NULL def performance_schema events_statements_summary_by_digest LAST_SEEN 29 '0000-00-00 00:00:00' NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp select,insert,update,references NEVER NULL -def performance_schema events_statements_summary_by_host_by_event_name HOST 1 NULL YES char 60 180 NULL NULL NULL utf8 utf8_bin char(60) select,insert,update,references NEVER NULL +def performance_schema events_statements_summary_by_host_by_event_name HOST 1 NULL YES char 255 765 NULL NULL NULL utf8 utf8_bin char(255) select,insert,update,references NEVER NULL def performance_schema events_statements_summary_by_host_by_event_name EVENT_NAME 2 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references NEVER NULL def performance_schema events_statements_summary_by_host_by_event_name COUNT_STAR 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL def performance_schema events_statements_summary_by_host_by_event_name SUM_TIMER_WAIT 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL @@ -607,14 +607,14 @@ def performance_schema events_waits_history_long OPERATION 17 NULL NO varchar 32 def performance_schema events_waits_history_long NUMBER_OF_BYTES 18 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL def performance_schema events_waits_history_long FLAGS 19 NULL YES int NULL NULL 10 0 NULL NULL NULL int(10) unsigned select,insert,update,references NEVER NULL def performance_schema events_waits_summary_by_account_by_event_name USER 1 NULL YES char 128 384 NULL NULL NULL utf8 utf8_bin char(128) select,insert,update,references NEVER NULL -def performance_schema events_waits_summary_by_account_by_event_name HOST 2 NULL YES char 60 180 NULL NULL NULL utf8 utf8_bin char(60) select,insert,update,references NEVER NULL +def performance_schema events_waits_summary_by_account_by_event_name HOST 2 NULL YES char 255 765 NULL NULL NULL utf8 utf8_bin char(255) select,insert,update,references NEVER NULL def performance_schema events_waits_summary_by_account_by_event_name EVENT_NAME 3 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references NEVER NULL def performance_schema events_waits_summary_by_account_by_event_name COUNT_STAR 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL def performance_schema events_waits_summary_by_account_by_event_name SUM_TIMER_WAIT 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL def performance_schema events_waits_summary_by_account_by_event_name MIN_TIMER_WAIT 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL def performance_schema events_waits_summary_by_account_by_event_name AVG_TIMER_WAIT 7 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL def performance_schema events_waits_summary_by_account_by_event_name MAX_TIMER_WAIT 8 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL -def performance_schema events_waits_summary_by_host_by_event_name HOST 1 NULL YES char 60 180 NULL NULL NULL utf8 utf8_bin char(60) select,insert,update,references NEVER NULL +def performance_schema events_waits_summary_by_host_by_event_name HOST 1 NULL YES char 255 765 NULL NULL NULL utf8 utf8_bin char(255) select,insert,update,references NEVER NULL def performance_schema events_waits_summary_by_host_by_event_name EVENT_NAME 2 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references NEVER NULL def performance_schema events_waits_summary_by_host_by_event_name COUNT_STAR 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL def performance_schema events_waits_summary_by_host_by_event_name SUM_TIMER_WAIT 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL @@ -701,7 +701,7 @@ def performance_schema file_summary_by_instance AVG_TIMER_MISC 24 NULL NO bigint def performance_schema file_summary_by_instance MAX_TIMER_MISC 25 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL def performance_schema global_status VARIABLE_NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NEVER NULL def performance_schema global_status VARIABLE_VALUE 2 NULL YES varchar 1024 3072 NULL NULL NULL utf8 utf8_general_ci varchar(1024) select,insert,update,references NEVER NULL -def performance_schema hosts HOST 1 NULL YES char 60 180 NULL NULL NULL utf8 utf8_bin char(60) select,insert,update,references NEVER NULL +def performance_schema hosts HOST 1 NULL YES char 255 765 NULL NULL NULL utf8 utf8_bin char(255) select,insert,update,references NEVER NULL def performance_schema hosts CURRENT_CONNECTIONS 2 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL def performance_schema hosts TOTAL_CONNECTIONS 3 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL def performance_schema host_cache IP 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NEVER NULL @@ -910,7 +910,7 @@ def performance_schema session_connect_attrs ATTR_VALUE 3 NULL YES varchar 1024 def performance_schema session_connect_attrs ORDINAL_POSITION 4 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL def performance_schema session_status VARIABLE_NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NEVER NULL def performance_schema session_status VARIABLE_VALUE 2 NULL YES varchar 1024 3072 NULL NULL NULL utf8 utf8_general_ci varchar(1024) select,insert,update,references NEVER NULL -def performance_schema setup_actors HOST 1 '%' NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) select,insert,update,references NEVER NULL +def performance_schema setup_actors HOST 1 '%' NO char 255 765 NULL NULL NULL utf8 utf8_bin char(255) select,insert,update,references NEVER NULL def performance_schema setup_actors USER 2 '%' NO char 128 384 NULL NULL NULL utf8 utf8_bin char(128) select,insert,update,references NEVER NULL def performance_schema setup_actors ROLE 3 '%' NO char 128 384 NULL NULL NULL utf8 utf8_bin char(128) select,insert,update,references NEVER NULL def performance_schema setup_actors ENABLED 4 'YES' NO enum 3 9 NULL NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references NEVER NULL @@ -1157,7 +1157,7 @@ def performance_schema threads NAME 2 NULL NO varchar 128 384 NULL NULL NULL utf def performance_schema threads TYPE 3 NULL NO varchar 10 30 NULL NULL NULL utf8 utf8_general_ci varchar(10) select,insert,update,references NEVER NULL def performance_schema threads PROCESSLIST_ID 4 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL def performance_schema threads PROCESSLIST_USER 5 NULL YES varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references NEVER NULL -def performance_schema threads PROCESSLIST_HOST 6 NULL YES varchar 60 180 NULL NULL NULL utf8 utf8_general_ci varchar(60) select,insert,update,references NEVER NULL +def performance_schema threads PROCESSLIST_HOST 6 NULL YES varchar 255 765 NULL NULL NULL utf8 utf8_general_ci varchar(255) select,insert,update,references NEVER NULL def performance_schema threads PROCESSLIST_DB 7 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NEVER NULL def performance_schema threads PROCESSLIST_COMMAND 8 NULL YES varchar 16 48 NULL NULL NULL utf8 utf8_general_ci varchar(16) select,insert,update,references NEVER NULL def performance_schema threads PROCESSLIST_TIME 9 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL diff --git a/mysql-test/suite/rpl/r/rpl_password_boundaries.result b/mysql-test/suite/rpl/r/rpl_password_boundaries.result index 8370213ad0e..ed05ebbfd68 100644 --- a/mysql-test/suite/rpl/r/rpl_password_boundaries.result +++ b/mysql-test/suite/rpl/r/rpl_password_boundaries.result @@ -27,8 +27,8 @@ change master to master_user='rpl33',master_password='0123456789abcdef0123456789 ERROR HY000: String '0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef012...' is too long for MASTER_PASSWORD (should be no longer than 96) change master to master_user='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'; ERROR HY000: String 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...' is too long for MASTER_USER (should be no longer than 128) -change master to master_host='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'; -ERROR HY000: String 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbb...' is too long for MASTER_HOST (should be no longer than 60) +change master to master_host='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddE'; +ERROR HY000: String 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbb...' is too long for MASTER_HOST (should be no longer than 255) connection master; set sql_log_bin=0; grant replication slave on *.* to rpl16cyr@127.0.0.1 identified by 'воттакойужпарольвоттакойужпарольвоттакойужпароль'; diff --git a/mysql-test/suite/rpl/t/rpl_password_boundaries.test b/mysql-test/suite/rpl/t/rpl_password_boundaries.test index 9e9685943f7..567fe35e6db 100644 --- a/mysql-test/suite/rpl/t/rpl_password_boundaries.test +++ b/mysql-test/suite/rpl/t/rpl_password_boundaries.test @@ -47,10 +47,13 @@ source include/stop_slave.inc; change master to master_user='rpl33',master_password='0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef!'; # Check also master_user and master_host + --error ER_WRONG_STRING_LENGTH change master to master_user='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'; + +# One more char to the master host naturally max ends up with --error ER_WRONG_STRING_LENGTH -change master to master_host='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'; +change master to master_host='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddE'; # 48-character cyrillic password should work all right connection master; diff --git a/mysql-test/suite/sysschema/r/v_host_summary.result b/mysql-test/suite/sysschema/r/v_host_summary.result index bb137cc88ac..b619a8a55fd 100644 --- a/mysql-test/suite/sysschema/r/v_host_summary.result +++ b/mysql-test/suite/sysschema/r/v_host_summary.result @@ -1,6 +1,6 @@ DESC sys.host_summary; Field Type Null Key Default Extra -host varchar(60) YES NULL +host varchar(255) YES NULL statements decimal(64,0) YES NULL statement_latency text YES NULL statement_avg_latency text YES NULL @@ -15,7 +15,7 @@ total_memory_allocated text YES NULL SELECT * FROM sys.host_summary; DESC sys.x$host_summary; Field Type Null Key Default Extra -host varchar(60) YES NULL +host varchar(255) YES NULL statements decimal(64,0) YES NULL statement_latency decimal(64,0) YES NULL statement_avg_latency decimal(65,4) YES NULL diff --git a/mysql-test/suite/sysschema/r/v_host_summary_by_file_io.result b/mysql-test/suite/sysschema/r/v_host_summary_by_file_io.result index 3a6f868bcf4..8e257163da7 100644 --- a/mysql-test/suite/sysschema/r/v_host_summary_by_file_io.result +++ b/mysql-test/suite/sysschema/r/v_host_summary_by_file_io.result @@ -1,12 +1,12 @@ DESC sys.host_summary_by_file_io; Field Type Null Key Default Extra -host varchar(60) YES NULL +host varchar(255) YES NULL ios decimal(42,0) YES NULL io_latency text YES NULL SELECT * FROM sys.host_summary_by_file_io; DESC sys.x$host_summary_by_file_io; Field Type Null Key Default Extra -host varchar(60) YES NULL +host varchar(255) YES NULL ios decimal(42,0) YES NULL io_latency decimal(42,0) YES NULL SELECT * FROM sys.x$host_summary_by_file_io; diff --git a/mysql-test/suite/sysschema/r/v_host_summary_by_file_io_type.result b/mysql-test/suite/sysschema/r/v_host_summary_by_file_io_type.result index b963b480ecb..c9a56aa9943 100644 --- a/mysql-test/suite/sysschema/r/v_host_summary_by_file_io_type.result +++ b/mysql-test/suite/sysschema/r/v_host_summary_by_file_io_type.result @@ -1,6 +1,6 @@ DESC sys.host_summary_by_file_io_type; Field Type Null Key Default Extra -host varchar(60) YES NULL +host varchar(255) YES NULL event_name varchar(128) NO NULL total bigint(20) unsigned NO NULL total_latency text YES NULL @@ -8,7 +8,7 @@ max_latency text YES NULL SELECT * FROM sys.host_summary_by_file_io_type; DESC sys.x$host_summary_by_file_io_type; Field Type Null Key Default Extra -host varchar(60) YES NULL +host varchar(255) YES NULL event_name varchar(128) NO NULL total bigint(20) unsigned NO NULL total_latency bigint(20) unsigned NO NULL diff --git a/mysql-test/suite/sysschema/r/v_host_summary_by_stages.result b/mysql-test/suite/sysschema/r/v_host_summary_by_stages.result index af6ea64ddf3..0ee6f25562c 100644 --- a/mysql-test/suite/sysschema/r/v_host_summary_by_stages.result +++ b/mysql-test/suite/sysschema/r/v_host_summary_by_stages.result @@ -1,6 +1,6 @@ DESC sys.host_summary_by_stages; Field Type Null Key Default Extra -host varchar(60) YES NULL +host varchar(255) YES NULL event_name varchar(128) NO NULL total bigint(20) unsigned NO NULL total_latency text YES NULL @@ -8,7 +8,7 @@ avg_latency text YES NULL SELECT * FROM sys.host_summary_by_stages; DESC sys.x$host_summary_by_stages; Field Type Null Key Default Extra -host varchar(60) YES NULL +host varchar(255) YES NULL event_name varchar(128) NO NULL total bigint(20) unsigned NO NULL total_latency bigint(20) unsigned NO NULL diff --git a/mysql-test/suite/sysschema/r/v_host_summary_by_statement_latency.result b/mysql-test/suite/sysschema/r/v_host_summary_by_statement_latency.result index e72c7a3ff08..882a30b71a1 100644 --- a/mysql-test/suite/sysschema/r/v_host_summary_by_statement_latency.result +++ b/mysql-test/suite/sysschema/r/v_host_summary_by_statement_latency.result @@ -1,6 +1,6 @@ DESC sys.host_summary_by_statement_latency; Field Type Null Key Default Extra -host varchar(60) YES NULL +host varchar(255) YES NULL total decimal(42,0) YES NULL total_latency text YES NULL max_latency text YES NULL @@ -12,7 +12,7 @@ full_scans decimal(43,0) YES NULL SELECT * FROM sys.host_summary_by_statement_latency; DESC sys.x$host_summary_by_statement_latency; Field Type Null Key Default Extra -host varchar(60) YES NULL +host varchar(255) YES NULL total decimal(42,0) YES NULL total_latency decimal(42,0) YES NULL max_latency bigint(20) unsigned YES NULL diff --git a/mysql-test/suite/sysschema/r/v_host_summary_by_statement_type.result b/mysql-test/suite/sysschema/r/v_host_summary_by_statement_type.result index 9154b071341..eec8f8695c6 100644 --- a/mysql-test/suite/sysschema/r/v_host_summary_by_statement_type.result +++ b/mysql-test/suite/sysschema/r/v_host_summary_by_statement_type.result @@ -1,6 +1,6 @@ DESC sys.host_summary_by_statement_type; Field Type Null Key Default Extra -host varchar(60) YES NULL +host varchar(255) YES NULL statement varchar(128) YES NULL total bigint(20) unsigned NO NULL total_latency text YES NULL @@ -13,7 +13,7 @@ full_scans bigint(21) unsigned NO 0 SELECT * FROM sys.host_summary_by_statement_type; DESC sys.x$host_summary_by_statement_type; Field Type Null Key Default Extra -host varchar(60) YES NULL +host varchar(255) YES NULL statement varchar(128) YES NULL total bigint(20) unsigned NO NULL total_latency bigint(20) unsigned NO NULL diff --git a/mysql-test/suite/sysschema/r/v_io_by_thread_by_latency.result b/mysql-test/suite/sysschema/r/v_io_by_thread_by_latency.result index 6f44f7ce504..fddd2f266df 100644 --- a/mysql-test/suite/sysschema/r/v_io_by_thread_by_latency.result +++ b/mysql-test/suite/sysschema/r/v_io_by_thread_by_latency.result @@ -1,6 +1,6 @@ DESC sys.io_by_thread_by_latency; Field Type Null Key Default Extra -user varchar(189) YES NULL +user varchar(384) YES NULL total decimal(42,0) YES NULL total_latency text YES NULL min_latency text YES NULL @@ -11,7 +11,7 @@ processlist_id bigint(20) unsigned YES NULL SELECT * FROM sys.io_by_thread_by_latency; DESC sys.x$io_by_thread_by_latency; Field Type Null Key Default Extra -user varchar(189) YES NULL +user varchar(384) YES NULL total decimal(42,0) YES NULL total_latency decimal(42,0) YES NULL min_latency bigint(20) unsigned YES NULL diff --git a/mysql-test/suite/sysschema/r/v_memory_by_thread_by_current_bytes.result b/mysql-test/suite/sysschema/r/v_memory_by_thread_by_current_bytes.result index 0d091673509..80bb84c3e71 100644 --- a/mysql-test/suite/sysschema/r/v_memory_by_thread_by_current_bytes.result +++ b/mysql-test/suite/sysschema/r/v_memory_by_thread_by_current_bytes.result @@ -1,7 +1,7 @@ DESC sys.memory_by_thread_by_current_bytes; Field Type Null Key Default Extra thread_id bigint(20) unsigned NO NULL -user varchar(189) YES NULL +user varchar(384) YES NULL current_count_used decimal(41,0) YES NULL current_allocated text YES NULL current_avg_alloc text YES NULL @@ -11,7 +11,7 @@ SELECT * FROM sys.memory_by_thread_by_current_bytes; DESC sys.x$memory_by_thread_by_current_bytes; Field Type Null Key Default Extra thread_id bigint(20) unsigned NO NULL -user varchar(189) YES NULL +user varchar(384) YES NULL current_count_used decimal(41,0) YES NULL current_allocated decimal(41,0) YES NULL current_avg_alloc decimal(45,4) NO 0.0000 diff --git a/mysql-test/suite/sysschema/r/v_processlist.result b/mysql-test/suite/sysschema/r/v_processlist.result index 58c3b3bf7d4..dfc048143d6 100644 --- a/mysql-test/suite/sysschema/r/v_processlist.result +++ b/mysql-test/suite/sysschema/r/v_processlist.result @@ -2,7 +2,7 @@ DESC sys.processlist; Field Type Null Key Default Extra thd_id bigint(20) unsigned NO NULL conn_id bigint(20) unsigned YES NULL -user varchar(189) YES NULL +user varchar(384) YES NULL db varchar(64) YES NULL command varchar(16) YES NULL state varchar(64) YES NULL @@ -33,7 +33,7 @@ DESC sys.x$processlist; Field Type Null Key Default Extra thd_id bigint(20) unsigned NO NULL conn_id bigint(20) unsigned YES NULL -user varchar(189) YES NULL +user varchar(384) YES NULL db varchar(64) YES NULL command varchar(16) YES NULL state varchar(64) YES NULL diff --git a/mysql-test/suite/sysschema/r/v_session.result b/mysql-test/suite/sysschema/r/v_session.result index 005696c0c50..fd88b8f1d6a 100644 --- a/mysql-test/suite/sysschema/r/v_session.result +++ b/mysql-test/suite/sysschema/r/v_session.result @@ -2,7 +2,7 @@ DESC sys.session; Field Type Null Key Default Extra thd_id bigint(20) unsigned NO NULL conn_id bigint(20) unsigned YES NULL -user varchar(189) YES NULL +user varchar(384) YES NULL db varchar(64) YES NULL command varchar(16) YES NULL state varchar(64) YES NULL @@ -33,7 +33,7 @@ DESC sys.x$session; Field Type Null Key Default Extra thd_id bigint(20) unsigned NO NULL conn_id bigint(20) unsigned YES NULL -user varchar(189) YES NULL +user varchar(384) YES NULL db varchar(64) YES NULL command varchar(16) YES NULL state varchar(64) YES NULL diff --git a/mysql-test/suite/sysschema/r/v_waits_by_host_by_latency.result b/mysql-test/suite/sysschema/r/v_waits_by_host_by_latency.result index db90f019752..5e595d9cf85 100644 --- a/mysql-test/suite/sysschema/r/v_waits_by_host_by_latency.result +++ b/mysql-test/suite/sysschema/r/v_waits_by_host_by_latency.result @@ -1,6 +1,6 @@ DESC sys.waits_by_host_by_latency; Field Type Null Key Default Extra -host varchar(60) YES NULL +host varchar(255) YES NULL event varchar(128) NO NULL total bigint(20) unsigned NO NULL total_latency text YES NULL @@ -9,7 +9,7 @@ max_latency text YES NULL SELECT * FROM sys.waits_by_host_by_latency; DESC sys.x$waits_by_host_by_latency; Field Type Null Key Default Extra -host varchar(60) YES NULL +host varchar(255) YES NULL event varchar(128) NO NULL total bigint(20) unsigned NO NULL total_latency bigint(20) unsigned NO NULL diff --git a/plugin/server_audit/server_audit.c b/plugin/server_audit/server_audit.c index e94361de5ad..bfabe763eb7 100644 --- a/plugin/server_audit/server_audit.c +++ b/plugin/server_audit/server_audit.c @@ -142,6 +142,13 @@ static int loc_file_errno; #define logger_init_mutexts loc_logger_init_mutexts #define logger_time_to_rotate loc_logger_time_to_rotate +#ifndef HOSTNAME_LENGTH +#define HOSTNAME_LENGTH 255 +#endif +#ifndef USERNAME_CHAR_LENGTH +#define USERNAME_CHAR_LENGTH 128 +#endif + static size_t loc_write(File Filedes, const uchar *Buffer, size_t Count) { @@ -279,6 +286,7 @@ static my_off_t loc_tell(File fd) extern MYSQL_PLUGIN_IMPORT char server_version[]; static const char *serv_ver= NULL; +const char *(*thd_priv_host_ptr)(MYSQL_THD thd, size_t *length); static int started_mysql= 0; static int mysql_57_started= 0; static int debug_server_started= 0; @@ -305,7 +313,7 @@ static char *big_buffer= NULL; static size_t big_buffer_alloced= 0; static unsigned int query_log_limit= 0; -static char servhost[256]; +static char servhost[HOSTNAME_LENGTH+1]; static uint servhost_len; static char *syslog_ident; static char syslog_ident_buffer[128]= "mysql-server_auditing"; @@ -317,9 +325,9 @@ struct connection_info unsigned long long query_id; char db[256]; int db_length; - char user[64]; + char user[USERNAME_CHAR_LENGTH+1]; int user_length; - char host[64]; + char host[HOSTNAME_LENGTH+1]; int host_length; char ip[64]; int ip_length; @@ -328,9 +336,9 @@ struct connection_info char query_buffer[1024]; time_t query_time; int log_always; - char proxy[64]; + char proxy[USERNAME_CHAR_LENGTH+1]; int proxy_length; - char proxy_host[64]; + char proxy_host[HOSTNAME_LENGTH+1]; int proxy_host_length; }; @@ -1142,10 +1150,10 @@ static void setup_connection_simple(struct connection_info *ci) } -#define MAX_HOSTNAME 61 +#define MAX_HOSTNAME (HOSTNAME_LENGTH + 1) /* len+1 in mysql.user */ #define USERNAME_LENGTH 384 -static void setup_connection_connect(struct connection_info *cn, +static void setup_connection_connect(MYSQL_THD thd,struct connection_info *cn, const struct mysql_event_connection *event) { cn->query_id= 0; @@ -1163,17 +1171,26 @@ static void setup_connection_connect(struct connection_info *cn, cn->header= 0; if (event->proxy_user && event->proxy_user[0]) { - const char *priv_host= event->proxy_user + - sizeof(char[MAX_HOSTNAME+USERNAME_LENGTH+5]); + const char *priv_host; size_t priv_host_length; - if (mysql_57_started) + if (thd_priv_host_ptr) { - priv_host+= sizeof(size_t); - priv_host_length= *(size_t *) (priv_host + MAX_HOSTNAME); + priv_host= (*thd_priv_host_ptr)(thd, &priv_host_length); } else - priv_host_length= strlen(priv_host); + { + // 5 is "'" around host and user and "@" + priv_host= event->proxy_user + + sizeof(char[MAX_HOSTNAME + USERNAME_LENGTH + 5]); + if (mysql_57_started) + { + priv_host+= sizeof(size_t); + priv_host_length= *(size_t *) (priv_host + MAX_HOSTNAME); + } + else + priv_host_length= strlen(priv_host); + } get_str_n(cn->proxy, &cn->proxy_length, sizeof(cn->proxy), @@ -1974,7 +1991,7 @@ static struct connection_info ci_disconnect_buffer; #define AA_FREE_CONNECTION 1 #define AA_CHANGE_USER 2 -static void update_connection_info(struct connection_info *cn, +static void update_connection_info(MYSQL_THD thd, struct connection_info *cn, unsigned int event_class, const void *ev, int *after_action) { *after_action= 0; @@ -2095,7 +2112,7 @@ static void update_connection_info(struct connection_info *cn, switch (event->event_subclass) { case MYSQL_AUDIT_CONNECTION_CONNECT: - setup_connection_connect(cn, event); + setup_connection_connect(thd, cn, event); break; case MYSQL_AUDIT_CONNECTION_CHANGE_USER: *after_action= AA_CHANGE_USER; @@ -2153,7 +2170,7 @@ void auditing(MYSQL_THD thd, unsigned int event_class, const void *ev) cn= get_loc_info(thd); } - update_connection_info(cn, event_class, ev, &after_action); + update_connection_info(thd, cn, event_class, ev, &after_action); if (!logging) { @@ -2497,6 +2514,8 @@ static int server_audit_init(void *p __attribute__((unused))) } if (!my_hash_init_ptr) return 1; + + thd_priv_host_ptr= dlsym(RTLD_DEFAULT, "thd_priv_host"); } if(!(int_mysql_data_home= find_sym("mysql_data_home"))) diff --git a/scripts/mysql_system_tables.sql b/scripts/mysql_system_tables.sql index 5e9d84244bf..6abcb81cab7 100644 --- a/scripts/mysql_system_tables.sql +++ b/scripts/mysql_system_tables.sql @@ -28,12 +28,12 @@ set system_versioning_alter_history=keep; set @have_innodb= (select count(engine) from information_schema.engines where engine='INNODB' and support != 'NO'); SET @innodb_or_aria=IF(@have_innodb <> 0, 'InnoDB', 'Aria'); -CREATE TABLE IF NOT EXISTS db ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(80) 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, 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, Delete_history_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, PRIMARY KEY /*Host */(Host,Db,User), KEY User (User) ) engine=Aria transactional=1 CHARACTER SET utf8 COLLATE utf8_bin comment='Database privileges'; +CREATE TABLE IF NOT EXISTS db ( Host char(255) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(128) 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, 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, Delete_history_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, PRIMARY KEY /*Host */(Host,Db,User), KEY User (User) ) engine=Aria transactional=1 CHARACTER SET utf8 COLLATE utf8_bin comment='Database privileges'; -- Remember for later if db table already existed set @had_db_table= @@warning_count != 0; -CREATE TABLE IF NOT EXISTS global_priv (Host char(60) binary DEFAULT '', User char(80) binary DEFAULT '', Priv JSON NOT NULL DEFAULT '{}' CHECK(JSON_VALID(Priv)), PRIMARY KEY (Host,User)) engine=Aria transactional=1 CHARACTER SET utf8 COLLATE utf8_bin comment='Users and global privileges'; +CREATE TABLE IF NOT EXISTS global_priv (Host char(255) binary DEFAULT '', User char(128) binary DEFAULT '', Priv JSON NOT NULL DEFAULT '{}' CHECK(JSON_VALID(Priv)), PRIMARY KEY (Host,User)) engine=Aria transactional=1 CHARACTER SET utf8 COLLATE utf8_bin comment='Users and global privileges'; set @had_sys_user= 0 <> (select count(*) from mysql.global_priv where Host="localhost" and User="mariadb.sys"); @@ -102,7 +102,7 @@ CREATE DEFINER='mariadb.sys'@'localhost' SQL SECURITY DEFINER VIEW IF NOT EXISTS -- Remember for later if user table already existed set @had_user_table= @@warning_count != 0; -CREATE TABLE IF NOT EXISTS roles_mapping ( Host char(60) binary DEFAULT '' NOT NULL, User char(80) binary DEFAULT '' NOT NULL, Role char(80) binary DEFAULT '' NOT NULL, Admin_option enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, UNIQUE (Host, User, Role)) engine=Aria transactional=1 CHARACTER SET utf8 COLLATE utf8_bin comment='Granted roles'; +CREATE TABLE IF NOT EXISTS roles_mapping ( Host char(255) binary DEFAULT '' NOT NULL, User char(128) binary DEFAULT '' NOT NULL, Role char(128) binary DEFAULT '' NOT NULL, Admin_option enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, UNIQUE (Host, User, Role)) engine=Aria transactional=1 CHARACTER SET utf8 COLLATE utf8_bin comment='Granted roles'; CREATE TABLE IF NOT EXISTS func ( name char(64) binary DEFAULT '' NOT NULL, ret tinyint(1) DEFAULT '0' NOT NULL, dl char(128) DEFAULT '' NOT NULL, type enum ('function','aggregate') COLLATE utf8_general_ci NOT NULL, PRIMARY KEY (name) ) engine=Aria transactional=1 CHARACTER SET utf8 COLLATE utf8_bin comment='User defined functions'; @@ -110,17 +110,17 @@ CREATE TABLE IF NOT EXISTS func ( name char(64) binary DEFAULT '' NOT NULL, ret CREATE TABLE IF NOT EXISTS plugin ( name varchar(64) DEFAULT '' NOT NULL, dl varchar(128) DEFAULT '' NOT NULL, PRIMARY KEY (name) ) engine=Aria transactional=1 CHARACTER SET utf8 COLLATE utf8_general_ci comment='MySQL plugins'; -CREATE TABLE IF NOT EXISTS servers ( Server_name char(64) NOT NULL DEFAULT '', Host varchar(2048) NOT NULL DEFAULT '', Db char(64) NOT NULL DEFAULT '', Username char(80) NOT NULL DEFAULT '', Password char(64) NOT NULL DEFAULT '', Port INT(4) NOT NULL DEFAULT '0', Socket char(64) NOT NULL DEFAULT '', Wrapper char(64) NOT NULL DEFAULT '', Owner varchar(512) NOT NULL DEFAULT '', PRIMARY KEY (Server_name)) engine=Aria transactional=1 CHARACTER SET utf8 comment='MySQL Foreign Servers table'; +CREATE TABLE IF NOT EXISTS servers ( Server_name char(64) NOT NULL DEFAULT '', Host varchar(2048) NOT NULL DEFAULT '', Db char(64) NOT NULL DEFAULT '', Username char(128) NOT NULL DEFAULT '', Password char(64) NOT NULL DEFAULT '', Port INT(4) NOT NULL DEFAULT '0', Socket char(64) NOT NULL DEFAULT '', Wrapper char(64) NOT NULL DEFAULT '', Owner varchar(512) NOT NULL DEFAULT '', PRIMARY KEY (Server_name)) engine=Aria transactional=1 CHARACTER SET utf8 comment='MySQL Foreign Servers table'; -CREATE TABLE IF NOT EXISTS tables_priv ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(80) binary DEFAULT '' NOT NULL, Table_name char(64) binary DEFAULT '' NOT NULL, Grantor char(141) DEFAULT '' NOT NULL, Timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, Table_priv set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger','Delete versioning rows') COLLATE utf8_general_ci DEFAULT '' NOT NULL, Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL, PRIMARY KEY (Host,Db,User,Table_name), KEY Grantor (Grantor) ) engine=Aria transactional=1 CHARACTER SET utf8 COLLATE utf8_bin comment='Table privileges'; +CREATE TABLE IF NOT EXISTS tables_priv ( Host char(255) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(128) binary DEFAULT '' NOT NULL, Table_name char(64) binary DEFAULT '' NOT NULL, Grantor varchar(384) DEFAULT '' NOT NULL, Timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, Table_priv set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger','Delete versioning rows') COLLATE utf8_general_ci DEFAULT '' NOT NULL, Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL, PRIMARY KEY (Host,Db,User,Table_name), KEY Grantor (Grantor) ) engine=Aria transactional=1 CHARACTER SET utf8 COLLATE utf8_bin comment='Table privileges'; CREATE TEMPORARY TABLE tmp_user_sys LIKE tables_priv; INSERT INTO tmp_user_sys (Host,Db,User,Table_name,Grantor,Timestamp,Table_priv) VALUES ('localhost','mysql','mariadb.sys','global_priv','root@localhost','0','Select,Delete'); INSERT INTO tables_priv SELECT * FROM tmp_user_sys WHERE 0 <> @need_sys_user_creation; DROP TABLE tmp_user_sys; -CREATE TABLE IF NOT EXISTS columns_priv ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(80) binary DEFAULT '' NOT NULL, Table_name char(64) binary DEFAULT '' NOT NULL, Column_name char(64) binary DEFAULT '' NOT NULL, Timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL, PRIMARY KEY (Host,Db,User,Table_name,Column_name) ) engine=Aria transactional=1 CHARACTER SET utf8 COLLATE utf8_bin comment='Column privileges'; +CREATE TABLE IF NOT EXISTS columns_priv ( Host char(255) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(128) binary DEFAULT '' NOT NULL, Table_name char(64) binary DEFAULT '' NOT NULL, Column_name char(64) binary DEFAULT '' NOT NULL, Timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL, PRIMARY KEY (Host,Db,User,Table_name,Column_name) ) engine=Aria transactional=1 CHARACTER SET utf8 COLLATE utf8_bin comment='Column privileges'; CREATE TABLE IF NOT EXISTS help_topic ( help_topic_id int unsigned not null, name char(64) not null, help_category_id smallint unsigned not null, description text not null, example text not null, url text not null, primary key (help_topic_id), unique index (name) ) engine=Aria transactional=0 CHARACTER SET utf8 comment='help topics'; @@ -149,9 +149,9 @@ CREATE TABLE IF NOT EXISTS time_zone_transition_type ( Time_zone_id int unsign CREATE TABLE IF NOT EXISTS time_zone_leap_second ( Transition_time bigint signed NOT NULL, Correction int signed NOT NULL, PRIMARY KEY /*TranTime*/ (Transition_time) ) engine=Aria transactional=1 CHARACTER SET utf8 comment='Leap seconds information for time zones'; -CREATE TABLE IF NOT EXISTS proc (db char(64) collate utf8_bin DEFAULT '' NOT NULL, name char(64) DEFAULT '' NOT NULL, type enum('FUNCTION','PROCEDURE','PACKAGE','PACKAGE BODY') NOT NULL, specific_name char(64) DEFAULT '' NOT NULL, language enum('SQL') DEFAULT 'SQL' NOT NULL, sql_data_access enum( 'CONTAINS_SQL', 'NO_SQL', 'READS_SQL_DATA', 'MODIFIES_SQL_DATA') DEFAULT 'CONTAINS_SQL' NOT NULL, is_deterministic enum('YES','NO') DEFAULT 'NO' NOT NULL, security_type enum('INVOKER','DEFINER') DEFAULT 'DEFINER' NOT NULL, param_list blob NOT NULL, returns longblob NOT NULL, body longblob NOT NULL, definer char(141) collate utf8_bin DEFAULT '' NOT NULL, created timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, modified timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', sql_mode set( 'REAL_AS_FLOAT', 'PIPES_AS_CONCAT', 'ANSI_QUOTES', 'IGNORE_SPACE', 'IGNORE_BAD_TABLE_OPTIONS', 'ONLY_FULL_GROUP_BY', 'NO_UNSIGNED_SUBTRACTION', 'NO_DIR_IN_CREATE', 'POSTGRESQL', 'ORACLE', 'MSSQL', 'DB2', 'MAXDB', 'NO_KEY_OPTIONS', 'NO_TABLE_OPTIONS', 'NO_FIELD_OPTIONS', 'MYSQL323', 'MYSQL40', 'ANSI', 'NO_AUTO_VALUE_ON_ZERO', 'NO_BACKSLASH_ESCAPES', 'STRICT_TRANS_TABLES', 'STRICT_ALL_TABLES', 'NO_ZERO_IN_DATE', 'NO_ZERO_DATE', 'INVALID_DATES', 'ERROR_FOR_DIVISION_BY_ZERO', 'TRADITIONAL', 'NO_AUTO_CREATE_USER', 'HIGH_NOT_PRECEDENCE', 'NO_ENGINE_SUBSTITUTION', 'PAD_CHAR_TO_FULL_LENGTH', 'EMPTY_STRING_IS_NULL', 'SIMULTANEOUS_ASSIGNMENT', 'TIME_ROUND_FRACTIONAL') DEFAULT '' NOT NULL, comment text collate utf8_bin NOT NULL, character_set_client char(32) collate utf8_bin, collation_connection char(32) collate utf8_bin, db_collation char(32) collate utf8_bin, body_utf8 longblob, aggregate enum('NONE', 'GROUP') DEFAULT 'NONE' NOT NULL, PRIMARY KEY (db,name,type)) engine=Aria transactional=1 character set utf8 comment='Stored Procedures'; +CREATE TABLE IF NOT EXISTS proc (db char(64) collate utf8_bin DEFAULT '' NOT NULL, name char(64) DEFAULT '' NOT NULL, type enum('FUNCTION','PROCEDURE','PACKAGE','PACKAGE BODY') NOT NULL, specific_name char(64) DEFAULT '' NOT NULL, language enum('SQL') DEFAULT 'SQL' NOT NULL, sql_data_access enum( 'CONTAINS_SQL', 'NO_SQL', 'READS_SQL_DATA', 'MODIFIES_SQL_DATA') DEFAULT 'CONTAINS_SQL' NOT NULL, is_deterministic enum('YES','NO') DEFAULT 'NO' NOT NULL, security_type enum('INVOKER','DEFINER') DEFAULT 'DEFINER' NOT NULL, param_list blob NOT NULL, returns longblob NOT NULL, body longblob NOT NULL, definer varchar(384) collate utf8_bin DEFAULT '' NOT NULL, created timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, modified timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', sql_mode set( 'REAL_AS_FLOAT', 'PIPES_AS_CONCAT', 'ANSI_QUOTES', 'IGNORE_SPACE', 'IGNORE_BAD_TABLE_OPTIONS', 'ONLY_FULL_GROUP_BY', 'NO_UNSIGNED_SUBTRACTION', 'NO_DIR_IN_CREATE', 'POSTGRESQL', 'ORACLE', 'MSSQL', 'DB2', 'MAXDB', 'NO_KEY_OPTIONS', 'NO_TABLE_OPTIONS', 'NO_FIELD_OPTIONS', 'MYSQL323', 'MYSQL40', 'ANSI', 'NO_AUTO_VALUE_ON_ZERO', 'NO_BACKSLASH_ESCAPES', 'STRICT_TRANS_TABLES', 'STRICT_ALL_TABLES', 'NO_ZERO_IN_DATE', 'NO_ZERO_DATE', 'INVALID_DATES', 'ERROR_FOR_DIVISION_BY_ZERO', 'TRADITIONAL', 'NO_AUTO_CREATE_USER', 'HIGH_NOT_PRECEDENCE', 'NO_ENGINE_SUBSTITUTION', 'PAD_CHAR_TO_FULL_LENGTH', 'EMPTY_STRING_IS_NULL', 'SIMULTANEOUS_ASSIGNMENT', 'TIME_ROUND_FRACTIONAL') DEFAULT '' NOT NULL, comment text collate utf8_bin NOT NULL, character_set_client char(32) collate utf8_bin, collation_connection char(32) collate utf8_bin, db_collation char(32) collate utf8_bin, body_utf8 longblob, aggregate enum('NONE', 'GROUP') DEFAULT 'NONE' NOT NULL, PRIMARY KEY (db,name,type)) engine=Aria transactional=1 character set utf8 comment='Stored Procedures'; -CREATE TABLE IF NOT EXISTS procs_priv ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(80) binary DEFAULT '' NOT NULL, Routine_name char(64) COLLATE utf8_general_ci DEFAULT '' NOT NULL, Routine_type enum('FUNCTION','PROCEDURE','PACKAGE','PACKAGE BODY') NOT NULL, Grantor char(141) DEFAULT '' NOT NULL, Proc_priv set('Execute','Alter Routine','Grant') COLLATE utf8_general_ci DEFAULT '' NOT NULL, Timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (Host,Db,User,Routine_name,Routine_type), KEY Grantor (Grantor) ) engine=Aria transactional=1 CHARACTER SET utf8 COLLATE utf8_bin comment='Procedure privileges'; +CREATE TABLE IF NOT EXISTS procs_priv ( Host char(255) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(128) binary DEFAULT '' NOT NULL, Routine_name char(64) COLLATE utf8_general_ci DEFAULT '' NOT NULL, Routine_type enum('FUNCTION','PROCEDURE','PACKAGE','PACKAGE BODY') NOT NULL, Grantor varchar(384) DEFAULT '' NOT NULL, Proc_priv set('Execute','Alter Routine','Grant') COLLATE utf8_general_ci DEFAULT '' NOT NULL, Timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (Host,Db,User,Routine_name,Routine_type), KEY Grantor (Grantor) ) engine=Aria transactional=1 CHARACTER SET utf8 COLLATE utf8_bin comment='Procedure privileges'; -- Create general_log if CSV is enabled. @@ -170,7 +170,7 @@ PREPARE stmt FROM @str; EXECUTE stmt; DROP PREPARE stmt; -CREATE TABLE IF NOT EXISTS event ( db char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '', name char(64) CHARACTER SET utf8 NOT NULL default '', body longblob NOT NULL, definer char(141) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '', execute_at DATETIME default NULL, interval_value int(11) default NULL, interval_field ENUM('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') default NULL, created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, modified TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00', last_executed DATETIME default NULL, starts DATETIME default NULL, ends DATETIME default NULL, status ENUM('ENABLED','DISABLED','SLAVESIDE_DISABLED') NOT NULL default 'ENABLED', on_completion ENUM('DROP','PRESERVE') NOT NULL default 'DROP', sql_mode set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT','TIME_ROUND_FRACTIONAL') DEFAULT '' NOT NULL, comment char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '', originator INTEGER UNSIGNED NOT NULL, time_zone char(64) CHARACTER SET latin1 NOT NULL DEFAULT 'SYSTEM', character_set_client char(32) collate utf8_bin, collation_connection char(32) collate utf8_bin, db_collation char(32) collate utf8_bin, body_utf8 longblob, PRIMARY KEY (db, name) ) engine=Aria transactional=1 DEFAULT CHARSET=utf8 COMMENT 'Events'; +CREATE TABLE IF NOT EXISTS event ( db char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '', name char(64) CHARACTER SET utf8 NOT NULL default '', body longblob NOT NULL, definer varchar(384) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '', execute_at DATETIME default NULL, interval_value int(11) default NULL, interval_field ENUM('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') default NULL, created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, modified TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00', last_executed DATETIME default NULL, starts DATETIME default NULL, ends DATETIME default NULL, status ENUM('ENABLED','DISABLED','SLAVESIDE_DISABLED') NOT NULL default 'ENABLED', on_completion ENUM('DROP','PRESERVE') NOT NULL default 'DROP', sql_mode set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT','TIME_ROUND_FRACTIONAL') DEFAULT '' NOT NULL, comment char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '', originator INTEGER UNSIGNED NOT NULL, time_zone char(64) CHARACTER SET latin1 NOT NULL DEFAULT 'SYSTEM', character_set_client char(32) collate utf8_bin, collation_connection char(32) collate utf8_bin, db_collation char(32) collate utf8_bin, body_utf8 longblob, PRIMARY KEY (db, name) ) engine=Aria transactional=1 DEFAULT CHARSET=utf8 COMMENT 'Events'; SET @create_innodb_table_stats="CREATE TABLE IF NOT EXISTS innodb_table_stats ( database_name VARCHAR(64) NOT NULL, @@ -247,7 +247,7 @@ SET @cmd= "CREATE TABLE IF NOT EXISTS slave_master_info ( Number_of_lines INTEGER UNSIGNED NOT NULL COMMENT 'Number of lines in the file.', Master_log_name TEXT CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'The name of the master binary log currently being read from the master.', Master_log_pos BIGINT UNSIGNED NOT NULL COMMENT 'The master log position of the last read event.', - Host CHAR(64) CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The host name of the master.', + Host CHAR(255) CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The host name of the master.', User_name TEXT CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The user name used to connect to the master.', User_password TEXT CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The password used to connect to the master.', Port INTEGER UNSIGNED NOT NULL COMMENT 'The network port used to connect to the master.', @@ -296,7 +296,7 @@ SET @str=CONCAT(@cmd, ' ENGINE=', @innodb_or_aria); #EXECUTE stmt; #DROP PREPARE stmt; -CREATE TABLE IF NOT EXISTS proxies_priv (Host char(60) binary DEFAULT '' NOT NULL, User char(80) binary DEFAULT '' NOT NULL, Proxied_host char(60) binary DEFAULT '' NOT NULL, Proxied_user char(80) binary DEFAULT '' NOT NULL, With_grant BOOL DEFAULT 0 NOT NULL, Grantor char(141) DEFAULT '' NOT NULL, Timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY /*Host*/ (Host,User,Proxied_host,Proxied_user), KEY Grantor (Grantor) ) engine=Aria transactional=1 CHARACTER SET utf8 COLLATE utf8_bin comment='User proxy privileges'; +CREATE TABLE IF NOT EXISTS proxies_priv (Host char(255) binary DEFAULT '' NOT NULL, User char(128) binary DEFAULT '' NOT NULL, Proxied_host char(255) binary DEFAULT '' NOT NULL, Proxied_user char(128) binary DEFAULT '' NOT NULL, With_grant BOOL DEFAULT 0 NOT NULL, Grantor varchar(384) DEFAULT '' NOT NULL, Timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY /*Host*/ (Host,User,Proxied_host,Proxied_user), KEY Grantor (Grantor) ) engine=Aria transactional=1 CHARACTER SET utf8 COLLATE utf8_bin comment='User proxy privileges'; -- Remember for later if proxies_priv table already existed set @had_proxies_priv_table= @@warning_count != 0; diff --git a/scripts/mysql_system_tables_fix.sql b/scripts/mysql_system_tables_fix.sql index 2352f801d66..78e8e06783a 100644 --- a/scripts/mysql_system_tables_fix.sql +++ b/scripts/mysql_system_tables_fix.sql @@ -31,6 +31,37 @@ set alter_algorithm=DEFAULT; set @have_innodb= (select count(engine) from information_schema.engines where engine='INNODB' and support != 'NO'); +-- +-- Ensure that all tables are of type Aria and transactional +-- + +ALTER TABLE user ENGINE=Aria transactional=1; +ALTER TABLE db ENGINE=Aria transactional=1; +ALTER TABLE func ENGINE=Aria transactional=1; +ALTER TABLE procs_priv ENGINE=Aria transactional=1; +ALTER TABLE tables_priv ENGINE=Aria transactional=1; +ALTER TABLE columns_priv ENGINE=Aria transactional=1; +ALTER TABLE roles_mapping ENGINE=Aria transactional=1; +ALTER TABLE plugin ENGINE=Aria transactional=1; +ALTER TABLE servers ENGINE=Aria transactional=1; +ALTER TABLE time_zone_name ENGINE=Aria transactional=1; +ALTER TABLE time_zone ENGINE=Aria transactional=1; +ALTER TABLE time_zone_transition ENGINE=Aria transactional=1; +ALTER TABLE time_zone_transition_type ENGINE=Aria transactional=1; +ALTER TABLE time_zone_leap_second ENGINE=Aria transactional=1; +ALTER TABLE proc ENGINE=Aria transactional=1; +ALTER TABLE event ENGINE=Aria transactional=1; +ALTER TABLE proxies_priv ENGINE=Aria transactional=1; + +-- The following tables doesn't have to be transactional +ALTER TABLE help_topic ENGINE=Aria transactional=0; +ALTER TABLE help_category ENGINE=Aria transactional=0; +ALTER TABLE help_relation ENGINE=Aria transactional=0; +ALTER TABLE help_keyword ENGINE=Aria transactional=0; +ALTER TABLE table_stats ENGINE=Aria transactional=0; +ALTER TABLE column_stats ENGINE=Aria transactional=0; +ALTER TABLE index_stats ENGINE=Aria transactional=0; + ALTER TABLE user add File_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL; # Detect whether or not we had the Grant_priv column @@ -67,11 +98,11 @@ ALTER TABLE tables_priv ADD KEY Grantor (Grantor); ALTER TABLE tables_priv - MODIFY Host char(60) NOT NULL default '', + MODIFY Host char(255) NOT NULL default '', MODIFY Db char(64) NOT NULL default '', - MODIFY User char(80) binary NOT NULL default '', + MODIFY User char(128) binary NOT NULL default '', MODIFY Table_name char(64) NOT NULL default '', - MODIFY Grantor char(141) COLLATE utf8_bin NOT NULL default '', + MODIFY Grantor varchar(384) COLLATE utf8_bin NOT NULL default '', ENGINE=Aria, CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin; @@ -95,9 +126,9 @@ ALTER TABLE columns_priv COLLATE utf8_general_ci DEFAULT '' NOT NULL; ALTER TABLE columns_priv - MODIFY Host char(60) NOT NULL default '', + MODIFY Host char(255) NOT NULL default '', MODIFY Db char(64) NOT NULL default '', - MODIFY User char(80) binary NOT NULL default '', + MODIFY User char(128) binary NOT NULL default '', MODIFY Table_name char(64) NOT NULL default '', MODIFY Column_name char(64) NOT NULL default '', ENGINE=Aria, @@ -163,8 +194,8 @@ alter table func comment='User defined functions'; # Convert all tables to UTF-8 with binary collation # and reset all char columns to correct width ALTER TABLE user - MODIFY Host char(60) NOT NULL default '', - MODIFY User char(80) binary NOT NULL default '', + MODIFY Host char(255) NOT NULL default '', + MODIFY User char(128) binary NOT NULL default '', ENGINE=Aria, CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin; # In MySQL 5.7.6 the Password column is removed. Recreate it to preserve the number @@ -206,9 +237,9 @@ ALTER TABLE user MODIFY ssl_type enum('','ANY','X509', 'SPECIFIED') COLLATE utf8_general_ci DEFAULT '' NOT NULL; ALTER TABLE db - MODIFY Host char(60) NOT NULL default '', + MODIFY Host char(255) NOT NULL default '', MODIFY Db char(64) NOT NULL default '', - MODIFY User char(80) binary NOT NULL default '', + MODIFY User char(128) binary NOT NULL default '', ENGINE=Aria, CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin; ALTER TABLE db MODIFY Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, @@ -437,7 +468,7 @@ ALTER TABLE proc MODIFY name char(64) DEFAULT '' NOT NULL, # Reset some fields after the conversion ALTER TABLE proc CONVERT TO CHARACTER SET utf8, MODIFY db char(64) binary DEFAULT '' NOT NULL, - MODIFY definer char(141) binary DEFAULT '' NOT NULL, + MODIFY definer varchar(384) binary DEFAULT '' NOT NULL, MODIFY comment text binary NOT NULL; ALTER TABLE proc ADD character_set_client @@ -656,7 +687,7 @@ ALTER TABLE user ADD password_last_changed timestamp DEFAULT CURRENT_TIMESTAMP N ALTER TABLE user ADD password_lifetime smallint unsigned DEFAULT NULL after password_last_changed; ALTER TABLE user ADD account_locked enum('N', 'Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL after password_lifetime; ALTER TABLE user ADD is_role enum('N', 'Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER account_locked; -ALTER TABLE user ADD default_role char(80) binary DEFAULT '' NOT NULL AFTER is_role; +ALTER TABLE user ADD default_role char(128) binary DEFAULT '' NOT NULL AFTER is_role; ALTER TABLE user ADD max_statement_time decimal(12,6) DEFAULT 0 NOT NULL AFTER default_role; -- Somewhere above, we ran ALTER TABLE user .... CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin. @@ -709,19 +740,19 @@ end if // DELIMITER ; # MDEV-4332 longer user names -alter table user modify User char(80) binary not null default ''; -alter table db modify User char(80) binary not null default ''; -alter table tables_priv modify User char(80) binary not null default ''; -alter table columns_priv modify User char(80) binary not null default ''; -alter table procs_priv modify User char(80) binary not null default ''; -alter table proc modify definer char(141) collate utf8_bin not null default ''; -alter table event modify definer char(141) collate utf8_bin not null default ''; -alter table proxies_priv modify User char(80) COLLATE utf8_bin not null default ''; -alter table proxies_priv modify Proxied_user char(80) COLLATE utf8_bin not null default ''; -alter table proxies_priv modify Grantor char(141) COLLATE utf8_bin not null default ''; -alter table servers modify Username char(80) not null default ''; -alter table procs_priv modify Grantor char(141) COLLATE utf8_bin not null default ''; -alter table tables_priv modify Grantor char(141) COLLATE utf8_bin not null default ''; +alter table user modify User char(128) binary not null default ''; +alter table db modify User char(128) binary not null default ''; +alter table tables_priv modify User char(128) binary not null default ''; +alter table columns_priv modify User char(128) binary not null default ''; +alter table procs_priv modify User char(128) binary not null default ''; +alter table proc modify definer varchar(384) collate utf8_bin not null default ''; +alter table event modify definer varchar(384) collate utf8_bin not null default ''; +alter table proxies_priv modify User char(128) COLLATE utf8_bin not null default ''; +alter table proxies_priv modify Proxied_user char(128) COLLATE utf8_bin not null default ''; +alter table proxies_priv modify Grantor varchar(384) COLLATE utf8_bin not null default ''; +alter table servers modify Username char(128) not null default ''; +alter table procs_priv modify Grantor varchar(384) COLLATE utf8_bin not null default ''; +alter table tables_priv modify Grantor varchar(384) COLLATE utf8_bin not null default ''; # Activate the new, possible modified privilege tables # This should not be needed, but gives us some extra testing that the above @@ -739,40 +770,9 @@ ALTER TABLE help_topic MODIFY url TEXT NOT NULL; # MDEV-7383 - varbinary on mix/max of column_stats alter table column_stats modify min_value varbinary(255) DEFAULT NULL, modify max_value varbinary(255) DEFAULT NULL; --- --- Ensure that all tables are of type Aria and transactional --- - -ALTER TABLE user ENGINE=Aria transactional=1; -ALTER TABLE db ENGINE=Aria transactional=1; -ALTER TABLE func ENGINE=Aria transactional=1; -ALTER TABLE procs_priv ENGINE=Aria transactional=1; -ALTER TABLE tables_priv ENGINE=Aria transactional=1; -ALTER TABLE columns_priv ENGINE=Aria transactional=1; -ALTER TABLE roles_mapping ENGINE=Aria transactional=1; -ALTER TABLE plugin ENGINE=Aria transactional=1; -ALTER TABLE servers ENGINE=Aria transactional=1; -ALTER TABLE time_zone_name ENGINE=Aria transactional=1; -ALTER TABLE time_zone ENGINE=Aria transactional=1; -ALTER TABLE time_zone_transition ENGINE=Aria transactional=1; -ALTER TABLE time_zone_transition_type ENGINE=Aria transactional=1; -ALTER TABLE time_zone_leap_second ENGINE=Aria transactional=1; -ALTER TABLE proc ENGINE=Aria transactional=1; -ALTER TABLE event ENGINE=Aria transactional=1; -ALTER TABLE proxies_priv ENGINE=Aria transactional=1; - --- The following tables doesn't have to be transactional -ALTER TABLE help_topic ENGINE=Aria transactional=0; -ALTER TABLE help_category ENGINE=Aria transactional=0; -ALTER TABLE help_relation ENGINE=Aria transactional=0; -ALTER TABLE help_keyword ENGINE=Aria transactional=0; -ALTER TABLE table_stats ENGINE=Aria transactional=0; -ALTER TABLE column_stats ENGINE=Aria transactional=0; -ALTER TABLE index_stats ENGINE=Aria transactional=0; - DELIMITER // IF 'BASE TABLE' = (select table_type from information_schema.tables where table_schema=database() and table_name='user') THEN - CREATE TABLE IF NOT EXISTS global_priv (Host char(60) binary DEFAULT '', User char(80) binary DEFAULT '', Priv JSON NOT NULL DEFAULT '{}' CHECK(JSON_VALID(Priv)), PRIMARY KEY Host (Host,User)) engine=Aria transactional=1 CHARACTER SET utf8 COLLATE utf8_bin comment='Users and global privileges' + CREATE TABLE IF NOT EXISTS global_priv (Host char(255) binary DEFAULT '', User char(128) binary DEFAULT '', Priv JSON NOT NULL DEFAULT '{}' CHECK(JSON_VALID(Priv)), PRIMARY KEY Host (Host,User)) engine=Aria transactional=1 CHARACTER SET utf8 COLLATE utf8_bin comment='Users and global privileges' SELECT Host, User, JSON_COMPACT(JSON_OBJECT('access', 1*('Y'=Select_priv)+ 2*('Y'=Insert_priv)+ diff --git a/sql/event_db_repository.cc b/sql/event_db_repository.cc index a11f7adb9dd..4d3e6ba6ca1 100644 --- a/sql/event_db_repository.cc +++ b/sql/event_db_repository.cc @@ -57,7 +57,7 @@ const TABLE_FIELD_TYPE event_table_fields[ET_FIELD_COUNT] = }, { { STRING_WITH_LEN("definer") }, - { STRING_WITH_LEN("char(") }, + { STRING_WITH_LEN("varchar(") }, { STRING_WITH_LEN("utf8") } }, { diff --git a/sql/hostname.cc b/sql/hostname.cc index edf31c11081..fed47e88597 100644 --- a/sql/hostname.cc +++ b/sql/hostname.cc @@ -554,6 +554,13 @@ int ip_to_hostname(struct sockaddr_storage *ip_storage, } ); + DBUG_EXECUTE_IF("getnameinfo_fake_long_host", + { + strcpy(hostname_buffer, "host5678901_345678902_345678903_345678904_345678905_345678906_345678907_345678908_345678909_345678910_345678911_345678912_345678913_345678914_345678915_345678916_345678917_345678918_345678919_345678920_345678921_345678922_345678923_345678924_345678925_345"); + err_code= 0; + } + ); + /* =========================================================================== DEBUG code only (end) diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index b4f706984a5..5a6cb1a4c8f 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -55,7 +55,7 @@ C_MODE_END #include <sql_repl.h> #include "sql_statistics.h" -size_t username_char_length= 80; +size_t username_char_length= USERNAME_CHAR_LENGTH; /* Calculate max length of string from length argument to LEFT and RIGHT diff --git a/sql/sp.cc b/sql/sp.cc index 46494fb2393..ac9203ffb8a 100644 --- a/sql/sp.cc +++ b/sql/sp.cc @@ -177,7 +177,7 @@ TABLE_FIELD_TYPE proc_table_fields[MYSQL_PROC_FIELD_COUNT] = }, { { STRING_WITH_LEN("definer") }, - { STRING_WITH_LEN("char(") }, + { STRING_WITH_LEN("varchar(") }, { STRING_WITH_LEN("utf8") } }, { diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index a8e86e5f90f..5aa2a101822 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -64,8 +64,8 @@ bool using_global_priv_table= true; // set that from field length in acl_load? #ifndef NO_EMBEDDED_ACCESS_CHECKS -const uint max_hostname_length= 60; -const uint max_dbname_length= 64; +const uint max_hostname_length= HOSTNAME_LENGTH; +const uint max_dbname_length= NAME_CHAR_LEN; #endif const char *safe_vio_type_name(Vio *vio) diff --git a/sql/sql_acl_getsort.ic b/sql/sql_acl_getsort.ic index df55c7c5f1e..046b412d5f6 100644 --- a/sql/sql_acl_getsort.ic +++ b/sql/sql_acl_getsort.ic @@ -14,6 +14,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */ #ifndef NO_EMBEDDED_ACCESS_CHECKS + +#define magic_bits 30 /* Returns a number which, if sorted in descending order, magically puts patterns in the order from most specific (e.g. no wildcards) to most generic @@ -21,8 +23,8 @@ Takes a template that lists types of following patterns (by the first letter of _h_ostname, _d_bname, _u_sername) and up to four patterns. - No more than two can be of 'h' or 'd' type (because one magic value takes 26 - bits, see below). + No more than two can be of 'h' or 'd' type (because one magic value takes + magic_bits bits, see below). ======================================================================== @@ -142,7 +144,7 @@ case 2: ((M*2*(maxlen+1) + L)*(maxlen+1) + K)*(maxlen+1) + P upper bound: L<=maxlen, M<=maxlen, K<=maxlen/2, P<maxlen - for a current maxlen=64, the magic number needs 26 bits. + for a current maxlen=64, the magic number needs magic_bits bits. */ static ulonglong get_magic_sort(const char *templ, ...) @@ -165,9 +167,9 @@ static ulonglong get_magic_sort(const char *templ, ...) continue; } - /* A wildcard pattern. Encoded in 26 bits. */ + /* A wildcard pattern. Encoded in magic_bits bits. */ uint maxlen= *templ == 'd' ? max_dbname_length : max_hostname_length; - DBUG_ASSERT(maxlen <= 64); + DBUG_ASSERT(maxlen <= 255); DBUG_ASSERT(*templ == 'd' || *templ == 'h'); uint N= 0, M= 0, K= 0, P= 0; @@ -189,14 +191,19 @@ static ulonglong get_magic_sort(const char *templ, ...) if (pat[i] == wild_prefix && pat[i+1]) i++; N++; } - uint L= K ? maxlen - N - M : 0, d= maxlen + 1, magic; + + set_if_smaller(K, 31); + set_if_smaller(M, 31); + + ulonglong L= K ? maxlen - N - M : 0, d= maxlen + 1, magic; + ulonglong d1= MY_MIN(d, 32); if (L > M) - magic= (((L * 2 + 1) * d + K) * d + M) * d + P; + magic= (((L * 2 + 1) * d + K) * d1 + M) * d + P; else - magic= (((M * 2 + 0) * d + L) * d + K) * d + P; - DBUG_ASSERT(magic < 1<<26); - sort= (sort << 26) + magic; - IF_DBUG(bits_used+= 26,); + magic= (((M * 2 + 0) * d + L) * d1 + K) * d + P; + DBUG_ASSERT(magic < (1ULL << magic_bits)); + sort= (sort << magic_bits) + magic; + IF_DBUG(bits_used+= magic_bits,); } DBUG_ASSERT(bits_used < 8*sizeof(sort)); va_end(args); diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 7e5cffabffd..2fd07cef649 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -4720,6 +4720,19 @@ extern "C" void thd_create_random_password(MYSQL_THD thd, } +extern "C" const char *thd_priv_host(MYSQL_THD thd, size_t *length) +{ + const Security_context *sctx= thd->security_ctx; + if (!sctx) + { + *length= 0; + return NULL; + } + *length= strlen(sctx->priv_host); + return sctx->priv_host; +} + + #ifdef INNODB_COMPATIBILITY_HOOKS /** open a table and add it to thd->open_tables diff --git a/sql/sql_class.h b/sql/sql_class.h index f001f14c219..0de1d74ec69 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -197,6 +197,7 @@ extern MYSQL_PLUGIN_IMPORT const char **errmesg; extern "C" LEX_STRING * thd_query_string (MYSQL_THD thd); extern "C" unsigned long long thd_query_id(const MYSQL_THD thd); extern "C" size_t thd_query_safe(MYSQL_THD thd, char *buf, size_t buflen); +extern "C" const char *thd_priv_host(MYSQL_THD thd, size_t *length); extern "C" const char *thd_user_name(MYSQL_THD thd); extern "C" const char *thd_client_host(MYSQL_THD thd); extern "C" const char *thd_client_ip(MYSQL_THD thd); diff --git a/sql/sql_const.h b/sql/sql_const.h index 3f053a1606d..762728aa876 100644 --- a/sql/sql_const.h +++ b/sql/sql_const.h @@ -49,7 +49,7 @@ #else #define MAX_REFLENGTH 4 /* Max length for record ref */ #endif -#define MAX_HOSTNAME 61 /* len+1 in mysql.user */ +#define MAX_HOSTNAME (HOSTNAME_LENGTH + 1) /* len+1 in mysql.user */ #define MAX_CONNECTION_NAME NAME_LEN #define MAX_MBWIDTH 3 /* Max multibyte sequence */ diff --git a/storage/maria/maria_def.h b/storage/maria/maria_def.h index 0002048d924..d8adcdece10 100644 --- a/storage/maria/maria_def.h +++ b/storage/maria/maria_def.h @@ -511,7 +511,7 @@ typedef struct st_maria_state_info #define MARIA_FILE_CREATE_RENAME_LSN_OFFSET 4 #define MARIA_FILE_CREATE_TRID_OFFSET (4 + LSN_STORE_SIZE*3 + 11*8) -#define MARIA_MAX_KEY_LENGTH 2000 +#define MARIA_MAX_KEY_LENGTH 2300 #define MARIA_MAX_KEY_BUFF (MARIA_MAX_KEY_LENGTH+HA_MAX_KEY_SEG*6+8+8 + \ MARIA_MAX_PACK_TRANSID_SIZE) #define MARIA_MAX_POSSIBLE_KEY_BUFF (MARIA_MAX_KEY_LENGTH + 24+ 6+6) |