WL #3031

* New result files due to new error message/error numbers
* Fixed system_mysql_db tests to work with servers table
* Added UTF8 charset to table defs
parent ca65d017
......@@ -11,6 +11,7 @@ show create table func;
show create table tables_priv;
show create table columns_priv;
show create table procs_priv;
show create table servers;
show create table proc;
show create table event;
show create table general_log;
......
......@@ -125,7 +125,7 @@ CREATE TABLE servers (
Wrapper char(64) NOT NULL DEFAULT '',
Owner char(64) NOT NULL DEFAULT '',
PRIMARY KEY (Server_name))
comment='MySQL Foreign Servers table';
CHARACTER SET utf8 comment='MySQL Foreign Servers table';
INSERT INTO servers VALUES ('test','localhost','test','root','', 0,'','mysql','root');
......
......@@ -172,8 +172,8 @@ ERROR 1049 (42000) at line 1: Unknown database 'invalid'
ERROR 1049 (42000) at line 1: Unknown database 'invalid'
Test connect with dbname + hostname
Test connect with dbname + _invalid_ hostname
ERROR 2003 (HY000) at line 1: Can't connect to MySQL server on 'invalid_hostname' (errno)
ERROR 2003 (HY000) at line 1: Can't connect to MySQL server on 'invalid_hostname' (errno)
ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'invalid_hostname' (errno)
ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'invalid_hostname' (errno)
The commands reported in the bug report
ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'cyril has found a bug :)XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' (errno)
Too long dbname
......
......@@ -181,7 +181,7 @@ end|
ERROR HY000: You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)
set global log_bin_trust_routine_creators=1;
Warnings:
Warning 1541 The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
Warning 1543 The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
set global log_bin_trust_function_creators=0;
set global log_bin_trust_function_creators=1;
set global log_bin_trust_function_creators=1;
......
......@@ -5633,7 +5633,7 @@ drop function if exists pi;
create function pi() returns varchar(50)
return "pie, my favorite desert.";
Warnings:
Note 1580 This function 'pi' has the same name as a native function.
Note 1581 This function 'pi' has the same name as a native function.
SET @save_sql_mode=@@sql_mode;
SET SQL_MODE='IGNORE_SPACE';
select pi(), pi ();
......@@ -5682,15 +5682,15 @@ use test;
create function `database`() returns varchar(50)
return "Stored function database";
Warnings:
Note 1580 This function 'database' has the same name as a native function.
Note 1581 This function 'database' has the same name as a native function.
create function `current_user`() returns varchar(50)
return "Stored function current_user";
Warnings:
Note 1580 This function 'current_user' has the same name as a native function.
Note 1581 This function 'current_user' has the same name as a native function.
create function md5(x varchar(50)) returns varchar(50)
return "Stored function md5";
Warnings:
Note 1580 This function 'md5' has the same name as a native function.
Note 1581 This function 'md5' has the same name as a native function.
SET SQL_MODE='IGNORE_SPACE';
select database(), database ();
database() database ()
......
......@@ -7,11 +7,11 @@ return 1;
create function x() returns int
return 2;
Warnings:
Note 1580 This function 'x' has the same name as a native function.
Note 1581 This function 'x' has the same name as a native function.
create function y() returns int
return 3;
Warnings:
Note 1580 This function 'y' has the same name as a native function.
Note 1581 This function 'y' has the same name as a native function.
select a();
a()
1
......
......@@ -170,6 +170,20 @@ procs_priv CREATE TABLE `procs_priv` (
PRIMARY KEY (`Host`,`Db`,`User`,`Routine_name`,`Routine_type`),
KEY `Grantor` (`Grantor`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Procedure privileges'
show create table servers;
Table Create Table
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(64) 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` char(64) NOT NULL DEFAULT '',
PRIMARY KEY (`Server_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='MySQL Foreign Servers table'
show create table proc;
Table Create Table
proc CREATE TABLE `proc` (
......
......@@ -96,7 +96,7 @@ INSERT INTO user VALUES ('localhost','', '','N','N','N','N','N','N','N','N','
-- disable_query_log
DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv,
procs_priv, help_category, help_keyword, help_relation, help_topic, proc,
procs_priv, servers, help_category, help_keyword, help_relation, help_topic, proc,
time_zone, time_zone_leap_second, time_zone_name, time_zone_transition,
time_zone_transition_type, general_log, slow_log, event, ndb_binlog_index;
......
......@@ -69,7 +69,7 @@ CREATE TABLE time_zone_leap_second ( Transition_time bigint signed NOT NULL,
-- disable_query_log
# Drop all tables created by this test
DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv, procs_priv, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, ndb_binlog_index;
DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv, procs_priv, servers, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, ndb_binlog_index;
-- enable_query_log
......
......@@ -59,6 +59,9 @@ CREATE TABLE proc ( db char(64) collate utf8_bin DEFAULT '' NOT
CREATE TABLE procs_priv ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Routine_name char(64) binary DEFAULT '' NOT NULL, Routine_type enum('FUNCTION','PROCEDURE') NOT NULL, Grantor char(77) DEFAULT '' NOT NULL, Proc_priv set('Execute','Alter Routine','Grant') COLLATE utf8_general_ci DEFAULT '' NOT NULL, Timestamp timestamp(14), PRIMARY KEY (Host,Db,User,Routine_name,Routine_type), KEY Grantor (Grantor) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Procedure privileges';
CREATE TABLE servers ( Server_name char(64) NOT NULL DEFAULT '', Host char(64) NOT NULL DEFAULT '', Db char(64) NOT NULL DEFAULT '', Username char(64) 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 char(64) NOT NULL DEFAULT '', PRIMARY KEY (Server_name)) CHARACTER SET utf8 comment='MySQL Foreign Servers table';
INSERT INTO servers VALUES ('test','localhost','test','root','', 0,'','mysql','root');
# Run the mysql_fix_privilege_tables.sql using "mysql --force"
--exec $MYSQL --force test < $MYSQL_FIX_PRIVILEGE_TABLES > $MYSQLTEST_VARDIR/log/system_mysql_db_fix50030.log 2>&1
......@@ -72,7 +75,7 @@ CREATE TABLE procs_priv ( Host char(60) binary DEFAULT '' NOT NULL, Db char(
-- disable_query_log
# Drop all tables created by this test
DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv, procs_priv, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, ndb_binlog_index;
DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv, procs_priv, servers, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, ndb_binlog_index;
-- enable_query_log
......
......@@ -212,7 +212,7 @@ CREATE TABLE servers ("
c_s="$c_s Wrapper char(64) NOT NULL,"
c_s="$c_s Owner char(64) NOT NULL,"
c_s="$c_s PRIMARY KEY (Server_name))"
c_s="$c_s comment='MySQL Foreign Servers table';"
c_s="$c_s CHARACTER SET utf8 comment='MySQL Foreign Servers table';"
i_s="INSERT INTO servers VALUES
('test','localhost','test','root','', 0,
......
......@@ -379,6 +379,22 @@ ALTER TABLE procs_priv
ALTER TABLE procs_priv
MODIFY Timestamp timestamp(14) AFTER Proc_priv;
--
-- 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(64) 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 char(64) NOT NULL DEFAULT '',
PRIMARY KEY (Server_name))
CHARACTER SET utf8 comment='MySQL Foreign Servers table';
--
-- help_topic
--
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment