mariadb/mysql-test/suite
Davi Arnaut 402bc523b2 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.

mysql-test/r/events_bugs.result:
  Add test case result for Bug#36540
mysql-test/r/log_tables.result:
  Update column type.
mysql-test/r/system_mysql_db.result:
  Update column type.
mysql-test/r/variables.result:
  Add test case result for server_id value range.
mysql-test/suite/sys_vars/r/server_id_basic_64.result:
  Update test case results.
mysql-test/t/events_bugs.test:
  Add test case for Bug#36540
mysql-test/t/log_tables.test:
  Fix column type.
mysql-test/t/variables.test:
  Add test case for server_id value range.
scripts/mysql_system_tables.sql:
  Columns that store the server_id value must be of type INT UNSIGNED,
  fix event (originator), general_log and slow_log (server_id) tables
  in accordance.
scripts/mysql_system_tables_fix.sql:
  Columns that store the server_id value must be of type INT UNSIGNED,
  fix event (originator), general_log and slow_log (server_id) tables
  in accordance.
sql/mysqld.cc:
  Set min and max values for the server_id variable.
  Unfortunately we can't easily change server_id variable type
  from ulong to uint32 because of the sys_var classes.
2009-03-11 17:30:56 -03:00
..
binlog Auto merged 2009-03-05 19:01:46 +00:00
bugs merged 5.1-main -> 5.1-bugteam 2009-01-30 15:44:49 +02:00
federated fixed system_mysql_db_fix30020 test faiilure 2009-02-02 13:36:03 +02:00
funcs_1 merge 5.0 -> 5.1 2009-03-09 13:45:40 -04:00
funcs_2 Fix for Bug#40904 20 tests in 5.1 are disabled in a bad manner 2008-12-08 15:36:42 +01:00
im
jp fixed jp test failures 2009-02-02 14:42:33 +04:00
large_tests
manual manual merge for bug_29136, bug#29309. 2007-10-13 23:12:50 +03:00
ndb Merge mysql-5.0-bugteam -> mysql-5.1-bugteam 2009-02-14 19:00:11 +03:00
ndb_team merge 5.0 -> 5.1 2009-02-19 18:24:25 -05:00
parts pre push test result update for bug#38719 2009-02-20 10:27:32 +01:00
rpl Revert the push for bug #39858 2009-03-11 17:19:18 +02:00
rpl_ndb Bug #41183 rpl_ndb_circular, rpl_ndb_circular_simplex need maintenance, crash 2009-02-04 12:13:54 +02:00
stress Merge trift2.:/MySQL/M51/mysql-5.1 2008-02-22 16:14:27 +01:00
sys_vars Bug#36540: CREATE EVENT and ALTER EVENT statements fail with large server_id 2009-03-11 17:30:56 -03:00