diff options
author | Davi Arnaut <Davi.Arnaut@Sun.COM> | 2009-03-11 17:30:56 -0300 |
---|---|---|
committer | Davi Arnaut <Davi.Arnaut@Sun.COM> | 2009-03-11 17:30:56 -0300 |
commit | c5bb49d020066c2805efc52507e904d8342ed0a7 (patch) | |
tree | d672fd8c16180cf05a73eb32d08e77a091a2adaa /mysql-test/r/events_bugs.result | |
parent | cd7d25f4b900f11a3789bb485d098b58b31a0afb (diff) | |
download | mariadb-git-c5bb49d020066c2805efc52507e904d8342ed0a7.tar.gz |
Bug#36540: CREATE EVENT and ALTER EVENT statements fail with large server_id
The problem is that creating a event could fail if the value of
the variable server_id didn't fit in the originator column of
the event system table. The cause is two-fold: it was possible
to set server_id to a value outside the documented range (from
0 to 2^32-1) and the originator column of the event table didn't
have enough room for values in this range.
The log tables (general_log and slow_log) also don't have a proper
column type to store the server_id and having a large server_id
value could prevent queries from being logged.
The solution is to ensure that all system tables that store the
server_id value have a proper column type (int unsigned) and that
the variable can't be set to a value that is not within the range.
Diffstat (limited to 'mysql-test/r/events_bugs.result')
-rw-r--r-- | mysql-test/r/events_bugs.result | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mysql-test/r/events_bugs.result b/mysql-test/r/events_bugs.result index 83030a00179..50bfa97c59f 100644 --- a/mysql-test/r/events_bugs.result +++ b/mysql-test/r/events_bugs.result @@ -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; name 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; SET GLOBAL event_scheduler= 'ON'; SET @@global.concurrent_insert= @concurrent_insert; |