mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Bug#35924 DEFINER should be stored 'quoted' in I_S
The '@' symbol can not be used in the host name according to rfc952. The fix: added function check_host_name(LEX_STRING *str) which checks that all symbols in host name string are valid and host name length is not more than max host name length (just moved check_string_length() function from the parser into check_host_name()). mysql-test/r/create.result: test result mysql-test/t/create.test: test case sql/mysql_priv.h: added function check_host_name(LEX_STRING *str) sql/sql_parse.cc: added function check_host_name(LEX_STRING *str) which checks that all symbols in host name string are valid and host name length is not more than max host name length(HOSTNAME_LENGTH). sql/sql_yacc.yy: using newly added function check_host_name()
This commit is contained in:
@ -1546,6 +1546,8 @@ SHOW INDEX FROM t1;
|
||||
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
|
||||
t1 1 c1 1 c1 A NULL NULL NULL YES BTREE
|
||||
DROP TABLE t1;
|
||||
create user mysqltest_1@'test@test';
|
||||
ERROR HY000: Malformed hostname (illegal symbol: '@')
|
||||
CREATE TABLE t1 (a INTEGER AUTO_INCREMENT PRIMARY KEY, b INTEGER NOT NULL);
|
||||
INSERT IGNORE INTO t1 (b) VALUES (5);
|
||||
CREATE TABLE IF NOT EXISTS t2 (a INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY)
|
||||
|
Reference in New Issue
Block a user