Commit 9b1e80b9 authored by aelkin@mysql.com's avatar aelkin@mysql.com

Merge aelkin@bk-internal.mysql.com:/home/bk/mysql-5.1-new

into  mysql.com:/usr_rh9/home/elkin.rh9/MySQL/Merge/5.1-new
parents a70ac6ea 3e637658
......@@ -112,9 +112,9 @@ Event sql_mode Create Event
ðóóò21 CREATE EVENT `events_test`.`ðóóò21` ON SCHEDULE EVERY '51 0:0:35' DAY_SECOND ON COMPLETION NOT PRESERVE ENABLE COMMENT 'òîâà å 1251 êîìåíòàð' DO select 1
insert into mysql.event (db, name, body, definer, interval_value, interval_field) values (database(), "root22", "select 1", user(), 100, "SECOND_MICROSECOND");
show create event root22;
ERROR HY000: Microseconds intervals are not yet supported
ERROR 42000: This version of MySQL doesn't yet support 'MICROSECOND'
SHOW EVENTS;
ERROR HY000: Microseconds intervals are not yet supported
ERROR 42000: This version of MySQL doesn't yet support 'MICROSECOND'
drop event root22;
drop event root6;
drop event root7;
......@@ -142,10 +142,10 @@ Db Name Definer Type Execute at Interval value Interval field Starts Ends Status
events_test intact_check root@localhost RECURRING NULL 10 10 HOUR # # ENABLED
ALTER TABLE mysql.event ADD dummy INT FIRST;
SHOW EVENTS;
ERROR HY000: Column count of mysql.event is wrong. Table probably corrupted. Expected 15, found 16.
ERROR HY000: Column count of mysql.event is wrong. Expected 16, found 17. Table probably corrupted
ALTER TABLE mysql.event DROP dummy, ADD dummy2 VARCHAR(64) FIRST;
SHOW EVENTS;
ERROR HY000: Column count of mysql.event is wrong. Table probably corrupted. Expected 15, found 16.
ERROR HY000: Column count of mysql.event is wrong. Expected 16, found 17. Table probably corrupted
ALTER TABLE mysql.event DROP dummy2;
SHOW EVENTS;
Db Name Definer Type Execute at Interval value Interval field Starts Ends Status
......@@ -170,6 +170,7 @@ event CREATE TABLE `event` (
`ends` datetime default NULL,
`status` enum('ENABLED','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') NOT NULL default '',
`comment` char(64) character set utf8 collate utf8_bin NOT NULL default '',
PRIMARY KEY (`definer`,`db`,`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Events'
......@@ -188,7 +189,7 @@ SELECT event_name FROM INFORMATION_SCHEMA.EVENTS;
ERROR HY000: Cannot load from mysql.event. Table probably corrupted. See error log.
ALTER TABLE mysql.event DROP comment, DROP starts;
SELECT event_name FROM INFORMATION_SCHEMA.EVENTS;
ERROR HY000: Column count of mysql.event is wrong. Table probably corrupted. Expected 15, found 13.
ERROR HY000: Column count of mysql.event is wrong. Expected 16, found 14. Table probably corrupted
DROP TABLE mysql.event;
CREATE TABLE mysql.event like event_like;
INSERT INTO mysql.event SELECT * FROM event_like;
......@@ -349,6 +350,8 @@ set global event_scheduler=0;
show processlist;
Id User Host db Command Time State Info
# root localhost events_test Query # NULL show processlist
# event_scheduler NULL Connect # Sleeping NULL
# root events_test Connect # User lock select get_lock("test_lock2_1", 20)
"Release the lock so the child process should finish. Hence the scheduler also"
select release_lock("test_lock2_1");
release_lock("test_lock2_1")
......
......@@ -78,9 +78,9 @@ set names cp1251;
create event ðóóò21 on schedule every '50:23:59:95' day_second COMMENT 'òîâà å 1251 êîìåíòàð' do select 1;
SHOW CREATE EVENT ðóóò21;
insert into mysql.event (db, name, body, definer, interval_value, interval_field) values (database(), "root22", "select 1", user(), 100, "SECOND_MICROSECOND");
--error 1535
--error 1235
show create event root22;
--error 1535
--error 1235
SHOW EVENTS;
drop event root22;
drop event root6;
......
......@@ -141,7 +141,6 @@ static TABLE_FIELD_W_TYPE event_table_fields[EVEX_FIELD_COUNT] = {
{(char *) STRING_WITH_LEN("enum('DROP','PRESERVE')")},
{NULL, 0}
},
/*
{
{(char *) STRING_WITH_LEN("sql_mode")},
{(char *) STRING_WITH_LEN("set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES',"
......@@ -154,7 +153,6 @@ static TABLE_FIELD_W_TYPE event_table_fields[EVEX_FIELD_COUNT] = {
"'HIGH_NOT_PRECEDENCE')")},
{NULL, 0}
},
*/
{
{(char *) STRING_WITH_LEN("comment")},
{(char *) STRING_WITH_LEN("char(64)")},
......@@ -440,7 +438,7 @@ common_1_lev_code:
case INTERVAL_HOUR_MICROSECOND:
case INTERVAL_MINUTE_MICROSECOND:
case INTERVAL_SECOND_MICROSECOND:
my_error(ER_NOT_SUPPORTED_YET, MYF(0));
my_error(ER_NOT_SUPPORTED_YET, MYF(0), "MICROSECOND");
return 1;
break;
case INTERVAL_QUARTER:
......
......@@ -109,6 +109,8 @@ evex_init_mutexes()
event_executor_running_global_var= opt_event_executor;
}
extern TABLE_FIELD_W_TYPE mysql_db_table_fields[];
extern time_t mysql_db_table_last_check;
/*
Opens mysql.db and mysql.user and checks whether
......
......@@ -5779,10 +5779,10 @@ ER_EVENT_OPEN_TABLE_FAILED
eng "Failed to open mysql.event"
ER_EVENT_NEITHER_M_EXPR_NOR_M_AT
eng "No datetime expression provided"
ER_EVENT_COL_COUNT_DOESNT_MATCH
eng "Column count of %s.%s is wrong. Table probably corrupted"
ER_COL_COUNT_DOESNT_MATCH_CORRUPTED
eng "Column count of mysql.%s is wrong. Expected %d, found %d. Table probably corrupted"
ER_EVENT_CANNOT_LOAD_FROM_TABLE
eng "Cannot load from mysql.event. Table probably corrupted"
eng "Cannot load from mysql.%s. Table probably corrupted. See error log."
ER_EVENT_CANNOT_DELETE
eng "Failed to delete the event from mysql.event"
ER_EVENT_COMPILE_ERROR
......@@ -5802,3 +5802,5 @@ ER_SP_WRONG_NAME 42000
eng "Incorrect routine name '%-.64s'"
ER_FOREIGN_DUPLICATE_KEY 23000 S1009
eng "Upholding foreign key constraints for table '%.64s', entry '%-.64s', key %d would lead to a duplicate entry"
ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE
eng "Column count of mysql.%s is wrong. Expected %d, found %d. Created with MySQL %d, now running %d. Please use scripts/mysql_fix_privilege_tables"
......@@ -2419,7 +2419,7 @@ table_check_intact(TABLE *table, uint table_f_count,
}
else
{
DBUG_PRINT("info", ("Table seems ok without through checking."));
DBUG_PRINT("info", ("Table seems ok without thorough checking."));
*last_create_time= table->file->create_time;
}
......
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