Commit 9a8a84d9 authored by Timothy Smith's avatar Timothy Smith

Auto-merge from upstream

parents 676c9824 402bc523
...@@ -736,6 +736,17 @@ select replace(@full_mode, 'ALLOW_INVALID_DATES', 'INVALID_DATES') into @full_mo ...@@ -736,6 +736,17 @@ select replace(@full_mode, 'ALLOW_INVALID_DATES', 'INVALID_DATES') into @full_mo
select name from mysql.event where name = 'p' and sql_mode = @full_mode; select name from mysql.event where name = 'p' and sql_mode = @full_mode;
name name
drop event e1; drop event e1;
SET @old_server_id = @@GLOBAL.server_id;
SET GLOBAL server_id = (1 << 32) - 1;
SELECT @@GLOBAL.server_id;
@@GLOBAL.server_id
4294967295
CREATE EVENT ev1 ON SCHEDULE EVERY 1 DAY DO SELECT 1;
SELECT event_name, originator FROM INFORMATION_SCHEMA.EVENTS;
event_name originator
ev1 4294967295
DROP EVENT ev1;
SET GLOBAL server_id = @old_server_id;
DROP DATABASE events_test; DROP DATABASE events_test;
SET GLOBAL event_scheduler= 'ON'; SET GLOBAL event_scheduler= 'ON';
SET @@global.concurrent_insert= @concurrent_insert; SET @@global.concurrent_insert= @concurrent_insert;
...@@ -56,7 +56,7 @@ general_log CREATE TABLE `general_log` ( ...@@ -56,7 +56,7 @@ general_log CREATE TABLE `general_log` (
`event_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `event_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`user_host` mediumtext NOT NULL, `user_host` mediumtext NOT NULL,
`thread_id` int(11) NOT NULL, `thread_id` int(11) NOT NULL,
`server_id` int(11) NOT NULL, `server_id` int(10) unsigned NOT NULL,
`command_type` varchar(64) NOT NULL, `command_type` varchar(64) NOT NULL,
`argument` mediumtext NOT NULL `argument` mediumtext NOT NULL
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='General log' ) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='General log'
...@@ -65,7 +65,7 @@ Field Type Null Key Default Extra ...@@ -65,7 +65,7 @@ Field Type Null Key Default Extra
event_time timestamp NO CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP event_time timestamp NO CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP
user_host mediumtext NO NULL user_host mediumtext NO NULL
thread_id int(11) NO NULL thread_id int(11) NO NULL
server_id int(11) NO NULL server_id int(10) unsigned NO NULL
command_type varchar(64) NO NULL command_type varchar(64) NO NULL
argument mediumtext NO NULL argument mediumtext NO NULL
show create table mysql.slow_log; show create table mysql.slow_log;
...@@ -80,7 +80,7 @@ slow_log CREATE TABLE `slow_log` ( ...@@ -80,7 +80,7 @@ slow_log CREATE TABLE `slow_log` (
`db` varchar(512) NOT NULL, `db` varchar(512) NOT NULL,
`last_insert_id` int(11) NOT NULL, `last_insert_id` int(11) NOT NULL,
`insert_id` int(11) NOT NULL, `insert_id` int(11) NOT NULL,
`server_id` int(11) NOT NULL, `server_id` int(10) unsigned NOT NULL,
`sql_text` mediumtext NOT NULL `sql_text` mediumtext NOT NULL
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log' ) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log'
show fields from mysql.slow_log; show fields from mysql.slow_log;
...@@ -94,7 +94,7 @@ rows_examined int(11) NO NULL ...@@ -94,7 +94,7 @@ rows_examined int(11) NO NULL
db varchar(512) NO NULL db varchar(512) NO NULL
last_insert_id int(11) NO NULL last_insert_id int(11) NO NULL
insert_id int(11) NO NULL insert_id int(11) NO NULL
server_id int(11) NO NULL server_id int(10) unsigned NO NULL
sql_text mediumtext NO NULL sql_text mediumtext NO NULL
flush logs; flush logs;
flush tables; flush tables;
...@@ -167,7 +167,7 @@ general_log CREATE TABLE `general_log` ( ...@@ -167,7 +167,7 @@ general_log CREATE TABLE `general_log` (
`event_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `event_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`user_host` mediumtext NOT NULL, `user_host` mediumtext NOT NULL,
`thread_id` int(11) NOT NULL, `thread_id` int(11) NOT NULL,
`server_id` int(11) NOT NULL, `server_id` int(10) unsigned NOT NULL,
`command_type` varchar(64) NOT NULL, `command_type` varchar(64) NOT NULL,
`argument` mediumtext NOT NULL `argument` mediumtext NOT NULL
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='General log' ) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='General log'
...@@ -183,7 +183,7 @@ slow_log CREATE TABLE `slow_log` ( ...@@ -183,7 +183,7 @@ slow_log CREATE TABLE `slow_log` (
`db` varchar(512) NOT NULL, `db` varchar(512) NOT NULL,
`last_insert_id` int(11) NOT NULL, `last_insert_id` int(11) NOT NULL,
`insert_id` int(11) NOT NULL, `insert_id` int(11) NOT NULL,
`server_id` int(11) NOT NULL, `server_id` int(10) unsigned NOT NULL,
`sql_text` mediumtext NOT NULL `sql_text` mediumtext NOT NULL
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log' ) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log'
alter table mysql.general_log engine=myisam; alter table mysql.general_log engine=myisam;
...@@ -194,7 +194,7 @@ general_log CREATE TABLE `general_log` ( ...@@ -194,7 +194,7 @@ general_log CREATE TABLE `general_log` (
`event_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `event_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`user_host` mediumtext NOT NULL, `user_host` mediumtext NOT NULL,
`thread_id` int(11) NOT NULL, `thread_id` int(11) NOT NULL,
`server_id` int(11) NOT NULL, `server_id` int(10) unsigned NOT NULL,
`command_type` varchar(64) NOT NULL, `command_type` varchar(64) NOT NULL,
`argument` mediumtext NOT NULL `argument` mediumtext NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='General log' ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='General log'
...@@ -210,7 +210,7 @@ slow_log CREATE TABLE `slow_log` ( ...@@ -210,7 +210,7 @@ slow_log CREATE TABLE `slow_log` (
`db` varchar(512) NOT NULL, `db` varchar(512) NOT NULL,
`last_insert_id` int(11) NOT NULL, `last_insert_id` int(11) NOT NULL,
`insert_id` int(11) NOT NULL, `insert_id` int(11) NOT NULL,
`server_id` int(11) NOT NULL, `server_id` int(10) unsigned NOT NULL,
`sql_text` mediumtext NOT NULL `sql_text` mediumtext NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Slow log' ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Slow log'
set global general_log='ON'; set global general_log='ON';
...@@ -268,7 +268,7 @@ CREATE TABLE `general_log` ( ...@@ -268,7 +268,7 @@ CREATE TABLE `general_log` (
ON UPDATE CURRENT_TIMESTAMP, ON UPDATE CURRENT_TIMESTAMP,
`user_host` mediumtext NOT NULL, `user_host` mediumtext NOT NULL,
`thread_id` int(11) NOT NULL, `thread_id` int(11) NOT NULL,
`server_id` int(11) NOT NULL, `server_id` int(10) unsigned NOT NULL,
`command_type` varchar(64) NOT NULL, `command_type` varchar(64) NOT NULL,
`argument` mediumtext NOT NULL `argument` mediumtext NOT NULL
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='General log'; ) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='General log';
...@@ -283,7 +283,7 @@ ON UPDATE CURRENT_TIMESTAMP, ...@@ -283,7 +283,7 @@ ON UPDATE CURRENT_TIMESTAMP,
`db` varchar(512) NOT NULL, `db` varchar(512) NOT NULL,
`last_insert_id` int(11) NOT NULL, `last_insert_id` int(11) NOT NULL,
`insert_id` int(11) NOT NULL, `insert_id` int(11) NOT NULL,
`server_id` int(11) NOT NULL, `server_id` int(10) unsigned NOT NULL,
`sql_text` mediumtext NOT NULL `sql_text` mediumtext NOT NULL
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log'; ) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log';
set global general_log='ON'; set global general_log='ON';
......
...@@ -227,7 +227,7 @@ event CREATE TABLE `event` ( ...@@ -227,7 +227,7 @@ event CREATE TABLE `event` (
`on_completion` enum('DROP','PRESERVE') NOT NULL DEFAULT 'DROP', `on_completion` enum('DROP','PRESERVE') NOT NULL DEFAULT 'DROP',
`sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','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') NOT NULL DEFAULT '', `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','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') NOT NULL DEFAULT '',
`comment` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', `comment` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
`originator` int(10) NOT NULL, `originator` int(10) unsigned NOT NULL,
`time_zone` char(64) CHARACTER SET latin1 NOT NULL DEFAULT 'SYSTEM', `time_zone` char(64) CHARACTER SET latin1 NOT NULL DEFAULT 'SYSTEM',
`character_set_client` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, `character_set_client` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
`collation_connection` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, `collation_connection` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
...@@ -241,7 +241,7 @@ general_log CREATE TABLE `general_log` ( ...@@ -241,7 +241,7 @@ general_log CREATE TABLE `general_log` (
`event_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `event_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`user_host` mediumtext NOT NULL, `user_host` mediumtext NOT NULL,
`thread_id` int(11) NOT NULL, `thread_id` int(11) NOT NULL,
`server_id` int(11) NOT NULL, `server_id` int(10) unsigned NOT NULL,
`command_type` varchar(64) NOT NULL, `command_type` varchar(64) NOT NULL,
`argument` mediumtext NOT NULL `argument` mediumtext NOT NULL
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='General log' ) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='General log'
...@@ -257,7 +257,7 @@ slow_log CREATE TABLE `slow_log` ( ...@@ -257,7 +257,7 @@ slow_log CREATE TABLE `slow_log` (
`db` varchar(512) NOT NULL, `db` varchar(512) NOT NULL,
`last_insert_id` int(11) NOT NULL, `last_insert_id` int(11) NOT NULL,
`insert_id` int(11) NOT NULL, `insert_id` int(11) NOT NULL,
`server_id` int(11) NOT NULL, `server_id` int(10) unsigned NOT NULL,
`sql_text` mediumtext NOT NULL `sql_text` mediumtext NOT NULL
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log' ) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log'
show tables; show tables;
......
...@@ -1426,4 +1426,32 @@ Catalog Database Table Table_alias Column Column_alias Type Length Max length Is ...@@ -1426,4 +1426,32 @@ Catalog Database Table Table_alias Column Column_alias Type Length Max length Is
def @@storage_engine 253 6 6 N 1 31 8 def @@storage_engine 253 6 6 N 1 31 8
@@storage_engine @@storage_engine
MyISAM MyISAM
SET @old_server_id = @@GLOBAL.server_id;
SET GLOBAL server_id = (1 << 32) - 1;
SELECT @@GLOBAL.server_id;
@@GLOBAL.server_id
4294967295
SET GLOBAL server_id = (1 << 32);
Warnings:
Warning 1292 Truncated incorrect server-id value: '4294967296'
SELECT @@GLOBAL.server_id;
@@GLOBAL.server_id
4294967295
SET GLOBAL server_id = (1 << 60);
Warnings:
Warning 1292 Truncated incorrect server-id value: '1152921504606846976'
SELECT @@GLOBAL.server_id;
@@GLOBAL.server_id
4294967295
SET GLOBAL server_id = 0;
SELECT @@GLOBAL.server_id;
@@GLOBAL.server_id
0
SET GLOBAL server_id = -1;
Warnings:
Warning 1292 Truncated incorrect server_id value: '-1'
SELECT @@GLOBAL.server_id;
@@GLOBAL.server_id
0
SET GLOBAL server_id = @old_server_id;
End of 5.1 tests End of 5.1 tests
...@@ -60,9 +60,11 @@ SELECT @@global.server_id; ...@@ -60,9 +60,11 @@ SELECT @@global.server_id;
@@global.server_id @@global.server_id
0 0
SET @@global.server_id = 2147483649*2; SET @@global.server_id = 2147483649*2;
Warnings:
Warning 1292 Truncated incorrect server-id value: '4294967298'
SELECT @@global.server_id; SELECT @@global.server_id;
@@global.server_id @@global.server_id
4294967298 4294967295
SET @@global.server_id = 65530.34.; SET @@global.server_id = 65530.34.;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
SET @@global.server_id = '125'; SET @@global.server_id = '125';
......
...@@ -1209,6 +1209,18 @@ select replace(@full_mode, 'ALLOW_INVALID_DATES', 'INVALID_DATES') into @full_mo ...@@ -1209,6 +1209,18 @@ select replace(@full_mode, 'ALLOW_INVALID_DATES', 'INVALID_DATES') into @full_mo
select name from mysql.event where name = 'p' and sql_mode = @full_mode; select name from mysql.event where name = 'p' and sql_mode = @full_mode;
drop event e1; drop event e1;
#
# Bug#36540: CREATE EVENT and ALTER EVENT statements fail with large server_id
#
SET @old_server_id = @@GLOBAL.server_id;
SET GLOBAL server_id = (1 << 32) - 1;
SELECT @@GLOBAL.server_id;
CREATE EVENT ev1 ON SCHEDULE EVERY 1 DAY DO SELECT 1;
SELECT event_name, originator FROM INFORMATION_SCHEMA.EVENTS;
DROP EVENT ev1;
SET GLOBAL server_id = @old_server_id;
########################################################################### ###########################################################################
# #
# End of tests # End of tests
......
...@@ -287,7 +287,7 @@ CREATE TABLE `general_log` ( ...@@ -287,7 +287,7 @@ CREATE TABLE `general_log` (
ON UPDATE CURRENT_TIMESTAMP, ON UPDATE CURRENT_TIMESTAMP,
`user_host` mediumtext NOT NULL, `user_host` mediumtext NOT NULL,
`thread_id` int(11) NOT NULL, `thread_id` int(11) NOT NULL,
`server_id` int(11) NOT NULL, `server_id` int(10) unsigned NOT NULL,
`command_type` varchar(64) NOT NULL, `command_type` varchar(64) NOT NULL,
`argument` mediumtext NOT NULL `argument` mediumtext NOT NULL
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='General log'; ) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='General log';
...@@ -303,7 +303,7 @@ CREATE TABLE `slow_log` ( ...@@ -303,7 +303,7 @@ CREATE TABLE `slow_log` (
`db` varchar(512) NOT NULL, `db` varchar(512) NOT NULL,
`last_insert_id` int(11) NOT NULL, `last_insert_id` int(11) NOT NULL,
`insert_id` int(11) NOT NULL, `insert_id` int(11) NOT NULL,
`server_id` int(11) NOT NULL, `server_id` int(10) unsigned NOT NULL,
`sql_text` mediumtext NOT NULL `sql_text` mediumtext NOT NULL
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log'; ) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log';
......
...@@ -1164,5 +1164,21 @@ SET GLOBAL expire_logs_days = @old_eld; ...@@ -1164,5 +1164,21 @@ SET GLOBAL expire_logs_days = @old_eld;
select @@storage_engine; select @@storage_engine;
--disable_metadata --disable_metadata
#
# Bug#36540: CREATE EVENT and ALTER EVENT statements fail with large server_id
#
SET @old_server_id = @@GLOBAL.server_id;
SET GLOBAL server_id = (1 << 32) - 1;
SELECT @@GLOBAL.server_id;
SET GLOBAL server_id = (1 << 32);
SELECT @@GLOBAL.server_id;
SET GLOBAL server_id = (1 << 60);
SELECT @@GLOBAL.server_id;
SET GLOBAL server_id = 0;
SELECT @@GLOBAL.server_id;
SET GLOBAL server_id = -1;
SELECT @@GLOBAL.server_id;
SET GLOBAL server_id = @old_server_id;
--echo End of 5.1 tests --echo End of 5.1 tests
...@@ -66,7 +66,7 @@ CREATE TABLE IF NOT EXISTS procs_priv ( Host char(60) binary DEFAULT '' NOT NULL ...@@ -66,7 +66,7 @@ CREATE TABLE IF NOT EXISTS procs_priv ( Host char(60) binary DEFAULT '' NOT NULL
-- Create general_log if CSV is enabled. -- Create general_log if CSV is enabled.
SET @str = IF (@@have_csv = 'YES', 'CREATE TABLE IF NOT EXISTS general_log (event_time TIMESTAMP NOT NULL, user_host MEDIUMTEXT NOT NULL, thread_id INTEGER NOT NULL, server_id INTEGER NOT NULL, command_type VARCHAR(64) NOT NULL, argument MEDIUMTEXT NOT NULL) engine=CSV CHARACTER SET utf8 comment="General log"', 'SET @dummy = 0'); SET @str = IF (@@have_csv = 'YES', 'CREATE TABLE IF NOT EXISTS general_log (event_time TIMESTAMP NOT NULL, user_host MEDIUMTEXT NOT NULL, thread_id INTEGER NOT NULL, server_id INTEGER UNSIGNED NOT NULL, command_type VARCHAR(64) NOT NULL, argument MEDIUMTEXT NOT NULL) engine=CSV CHARACTER SET utf8 comment="General log"', 'SET @dummy = 0');
PREPARE stmt FROM @str; PREPARE stmt FROM @str;
EXECUTE stmt; EXECUTE stmt;
...@@ -74,13 +74,13 @@ DROP PREPARE stmt; ...@@ -74,13 +74,13 @@ DROP PREPARE stmt;
-- Create slow_log if CSV is enabled. -- Create slow_log if CSV is enabled.
SET @str = IF (@@have_csv = 'YES', 'CREATE TABLE IF NOT EXISTS slow_log (start_time TIMESTAMP NOT NULL, user_host MEDIUMTEXT NOT NULL, query_time TIME NOT NULL, lock_time TIME NOT NULL, rows_sent INTEGER NOT NULL, rows_examined INTEGER NOT NULL, db VARCHAR(512) NOT NULL, last_insert_id INTEGER NOT NULL, insert_id INTEGER NOT NULL, server_id INTEGER NOT NULL, sql_text MEDIUMTEXT NOT NULL) engine=CSV CHARACTER SET utf8 comment="Slow log"', 'SET @dummy = 0'); SET @str = IF (@@have_csv = 'YES', 'CREATE TABLE IF NOT EXISTS slow_log (start_time TIMESTAMP NOT NULL, user_host MEDIUMTEXT NOT NULL, query_time TIME NOT NULL, lock_time TIME NOT NULL, rows_sent INTEGER NOT NULL, rows_examined INTEGER NOT NULL, db VARCHAR(512) NOT NULL, last_insert_id INTEGER NOT NULL, insert_id INTEGER NOT NULL, server_id INTEGER UNSIGNED NOT NULL, sql_text MEDIUMTEXT NOT NULL) engine=CSV CHARACTER SET utf8 comment="Slow log"', 'SET @dummy = 0');
PREPARE stmt FROM @str; PREPARE stmt FROM @str;
EXECUTE stmt; EXECUTE stmt;
DROP PREPARE 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(77) 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, modified TIMESTAMP NOT NULL, 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','NOT_USED','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') DEFAULT '' NOT NULL, comment char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '', originator int(10) 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=MyISAM 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 char(77) 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, modified TIMESTAMP NOT NULL, 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','NOT_USED','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') 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=MyISAM DEFAULT CHARSET=utf8 COMMENT 'Events';
CREATE TABLE IF NOT EXISTS ndb_binlog_index (Position BIGINT UNSIGNED NOT NULL, File VARCHAR(255) NOT NULL, epoch BIGINT UNSIGNED NOT NULL, inserts BIGINT UNSIGNED NOT NULL, updates BIGINT UNSIGNED NOT NULL, deletes BIGINT UNSIGNED NOT NULL, schemaops BIGINT UNSIGNED NOT NULL, PRIMARY KEY(epoch)) ENGINE=MYISAM; CREATE TABLE IF NOT EXISTS ndb_binlog_index (Position BIGINT UNSIGNED NOT NULL, File VARCHAR(255) NOT NULL, epoch BIGINT UNSIGNED NOT NULL, inserts BIGINT UNSIGNED NOT NULL, updates BIGINT UNSIGNED NOT NULL, deletes BIGINT UNSIGNED NOT NULL, schemaops BIGINT UNSIGNED NOT NULL, PRIMARY KEY(epoch)) ENGINE=MYISAM;
......
...@@ -215,6 +215,20 @@ ALTER TABLE func ...@@ -215,6 +215,20 @@ ALTER TABLE func
ALTER TABLE func ALTER TABLE func
MODIFY type enum ('function','aggregate') COLLATE utf8_general_ci NOT NULL; MODIFY type enum ('function','aggregate') COLLATE utf8_general_ci NOT NULL;
#
# Modify log tables.
#
SET @old_log_state = @@global.general_log;
SET GLOBAL general_log = 'OFF';
ALTER TABLE general_log MODIFY COLUMN server_id INTEGER UNSIGNED NOT NULL;
SET GLOBAL general_log = @old_log_state;
SET @old_log_state = @@global.slow_query_log;
SET GLOBAL slow_query_log = 'OFF';
ALTER TABLE slow_log MODIFY COLUMN server_id INTEGER UNSIGNED NOT NULL;
SET GLOBAL slow_query_log = @old_log_state;
# #
# Detect whether we had Create_view_priv # Detect whether we had Create_view_priv
# #
...@@ -471,7 +485,10 @@ ALTER TABLE event MODIFY sql_mode ...@@ -471,7 +485,10 @@ ALTER TABLE event MODIFY sql_mode
'PAD_CHAR_TO_FULL_LENGTH' 'PAD_CHAR_TO_FULL_LENGTH'
) DEFAULT '' NOT NULL AFTER on_completion; ) DEFAULT '' NOT NULL AFTER on_completion;
ALTER TABLE event MODIFY name char(64) CHARACTER SET utf8 NOT NULL default ''; ALTER TABLE event MODIFY name char(64) CHARACTER SET utf8 NOT NULL default '';
ALTER TABLE event ADD COLUMN originator INT(10) NOT NULL AFTER comment;
ALTER TABLE event MODIFY COLUMN originator INT UNSIGNED NOT NULL;
ALTER TABLE event ADD COLUMN originator INT UNSIGNED NOT NULL AFTER comment;
ALTER TABLE event MODIFY COLUMN status ENUM('ENABLED','DISABLED','SLAVESIDE_DISABLED') NOT NULL default 'ENABLED'; ALTER TABLE event MODIFY COLUMN status ENUM('ENABLED','DISABLED','SLAVESIDE_DISABLED') NOT NULL default 'ENABLED';
ALTER TABLE event ADD COLUMN time_zone char(64) CHARACTER SET latin1 ALTER TABLE event ADD COLUMN time_zone char(64) CHARACTER SET latin1
......
...@@ -6249,7 +6249,7 @@ Can't be set to 1 if --log-slave-updates is used.", ...@@ -6249,7 +6249,7 @@ Can't be set to 1 if --log-slave-updates is used.",
GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"server-id", OPT_SERVER_ID, {"server-id", OPT_SERVER_ID,
"Uniquely identifies the server instance in the community of replication partners.", "Uniquely identifies the server instance in the community of replication partners.",
(uchar**) &server_id, (uchar**) &server_id, 0, GET_ULONG, REQUIRED_ARG, 0, 0, 0, (uchar**) &server_id, (uchar**) &server_id, 0, GET_ULONG, REQUIRED_ARG, 0, 0, UINT_MAX32,
0, 0, 0}, 0, 0, 0},
{"set-variable", 'O', {"set-variable", 'O',
"Change the value of a variable. Please note that this option is deprecated;you can set variables directly with --variable-name=value.", "Change the value of a variable. Please note that this option is deprecated;you can set variables directly with --variable-name=value.",
......
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