diff options
author | unknown <kostja@bodhi.local> | 2007-04-03 14:34:37 +0400 |
---|---|---|
committer | unknown <kostja@bodhi.local> | 2007-04-03 14:34:37 +0400 |
commit | 7b1bfbb77a2c753a705b5b594ed4b75d7fb3c9e2 (patch) | |
tree | 6e120dc301ebc2a12e142e8b8dcb20f4a8fe3986 /mysql-test | |
parent | 516b8b2137e27661960372c8bf5f757ffb2f2883 (diff) | |
parent | c1020aa4c67d48e061065f60400127d04a0adb30 (diff) | |
download | mariadb-git-7b1bfbb77a2c753a705b5b594ed4b75d7fb3c9e2.tar.gz |
Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into bodhi.local:/opt/local/work/mysql-5.1-runtime
mysql-test/r/events_bugs.result:
Auto merged
mysql-test/r/ps.result:
Auto merged
mysql-test/t/events.test:
Auto merged
sql/event_data_objects.cc:
Auto merged
sql/event_data_objects.h:
Auto merged
sql/event_db_repository.h:
Auto merged
sql/event_queue.cc:
Auto merged
sql/events.cc:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_servers.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.h:
Auto merged
sql/share/errmsg.txt:
Auto merged
mysql-test/r/events.result:
Manual merge.
sql/event_db_repository.cc:
Manual merge.
sql/sql_parse.cc:
Manual merge.
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/events.result | 18 | ||||
-rw-r--r-- | mysql-test/r/events_bugs.result | 2 | ||||
-rw-r--r-- | mysql-test/r/events_restart_phase0.result | 22 | ||||
-rw-r--r-- | mysql-test/r/information_schema.result | 28 | ||||
-rw-r--r-- | mysql-test/r/ps.result | 2 | ||||
-rw-r--r-- | mysql-test/r/sp.result | 85 | ||||
-rw-r--r-- | mysql-test/t/events.test | 4 | ||||
-rw-r--r-- | mysql-test/t/events_bugs.test | 2 | ||||
-rw-r--r-- | mysql-test/t/events_restart_phase0.log | 22 | ||||
-rw-r--r-- | mysql-test/t/events_restart_phase0.result | 22 | ||||
-rw-r--r-- | mysql-test/t/information_schema.test | 40 | ||||
-rw-r--r-- | mysql-test/t/ps.test | 2 | ||||
-rw-r--r-- | mysql-test/t/sp.test | 60 |
13 files changed, 223 insertions, 86 deletions
diff --git a/mysql-test/r/events.result b/mysql-test/r/events.result index 59073358185..990f1aee6fa 100644 --- a/mysql-test/r/events.result +++ b/mysql-test/r/events.result @@ -73,7 +73,7 @@ DROP EVENT event_starts_test; create table test_nested(a int); create event e_43 on schedule every 1 second do set @a = 5; alter event e_43 do alter event e_43 do set @a = 4; -ERROR HY000: Recursivity of EVENT DDL statements is forbidden when body is present +ERROR HY000: Recursion of EVENT DDL statements is forbidden when body is present alter event e_43 do begin alter event e_43 on schedule every 5 minute; @@ -229,10 +229,10 @@ Db Name Definer Time zone Type Execute at Interval value Interval field Starts E events_test intact_check root@localhost SYSTEM RECURRING NULL 10 # # NULL ENABLED 1 ALTER TABLE mysql.event ADD dummy INT FIRST; SHOW EVENTS; -ERROR HY000: Column count of mysql.event is wrong. Expected 18, found 19. Table probably corrupted +ERROR HY000: Column count of mysql.event is wrong. Expected 18, found 19. The table is probably corrupted ALTER TABLE mysql.event DROP dummy, ADD dummy2 VARCHAR(64) FIRST; SHOW EVENTS; -ERROR HY000: Column count of mysql.event is wrong. Expected 18, found 19. Table probably corrupted +ERROR HY000: Column count of mysql.event is wrong. Expected 18, found 19. The table is probably corrupted ALTER TABLE mysql.event DROP dummy2; SHOW EVENTS; Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator @@ -241,7 +241,7 @@ CREATE TABLE event_like LIKE mysql.event; INSERT INTO event_like SELECT * FROM mysql.event; ALTER TABLE mysql.event MODIFY db char(64) character set cp1251 default ''; SELECT event_name FROM INFORMATION_SCHEMA.EVENTS; -ERROR HY000: Cannot load from mysql.event. Table probably corrupted. See error log. +ERROR HY000: Cannot load from mysql.event. The table is probably corrupted. Please see the error log for details ALTER TABLE mysql.event MODIFY db char(20) character set utf8 collate utf8_bin default ''; SHOW CREATE TABLE mysql.event; Table Create Table @@ -267,7 +267,7 @@ event CREATE TABLE `event` ( PRIMARY KEY (`db`,`name`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Events' SELECT event_name FROM INFORMATION_SCHEMA.EVENTS; -ERROR HY000: Cannot load from mysql.event. Table probably corrupted. See error log. +ERROR HY000: Cannot load from mysql.event. The table is probably corrupted. Please see the error log for details ALTER TABLE mysql.event MODIFY db char(64) character set utf8 collate utf8_bin default ''; "This should work" SHOW EVENTS; @@ -275,13 +275,13 @@ Db Name Definer Time zone Type Execute at Interval value Interval field Starts E events_test intact_check root@localhost SYSTEM RECURRING NULL 10 # # NULL ENABLED 1 ALTER TABLE mysql.event MODIFY db char(64) character set cp1251 default ''; SELECT event_name FROM INFORMATION_SCHEMA.EVENTS; -ERROR HY000: Cannot load from mysql.event. Table probably corrupted. See error log. +ERROR HY000: Cannot load from mysql.event. The table is probably corrupted. Please see the error log for details ALTER TABLE mysql.event MODIFY db varchar(64) character set utf8 collate utf8_bin default ''; SELECT event_name FROM INFORMATION_SCHEMA.EVENTS; -ERROR HY000: Cannot load from mysql.event. Table probably corrupted. See error log. +ERROR HY000: Cannot load from mysql.event. The table is probably corrupted. Please see the error log for details ALTER TABLE mysql.event DROP comment, DROP starts; SELECT event_name FROM INFORMATION_SCHEMA.EVENTS; -ERROR HY000: Column count of mysql.event is wrong. Expected 18, found 16. Table probably corrupted +ERROR HY000: Column count of mysql.event is wrong. Expected 18, found 16. The table is probably corrupted DROP TABLE mysql.event; CREATE TABLE mysql.event like event_like; INSERT INTO mysql.event SELECT * FROM event_like; @@ -368,7 +368,7 @@ root localhost events_test Connect User lock select get_lock("test_lock2_1", 20) drop event закачка21; create table t_16 (s1 int); create trigger t_16_bi before insert on t_16 for each row create event e_16 on schedule every 1 second do set @a=5; -ERROR HY000: Recursivity of EVENT DDL statements is forbidden when body is present +ERROR HY000: Recursion of EVENT DDL statements is forbidden when body is present drop table t_16; create event white_space on schedule every 10 hour diff --git a/mysql-test/r/events_bugs.result b/mysql-test/r/events_bugs.result index 9b58420465e..c2278296bee 100644 --- a/mysql-test/r/events_bugs.result +++ b/mysql-test/r/events_bugs.result @@ -17,7 +17,7 @@ DROP EVENT ДОЛЕН_регистър_утф8; SET NAMES latin1; set @a=3; CREATE PROCEDURE p_16 () CREATE EVENT e_16 ON SCHEDULE EVERY @a SECOND DO SET @a=5; -ERROR HY000: Recursivity of EVENT DDL statements is forbidden when body is present +ERROR HY000: Recursion of EVENT DDL statements is forbidden when body is present create event e_55 on schedule at 99990101000000 do drop table t; ERROR HY000: Incorrect AT value: '99990101000000' create event e_55 on schedule every 10 hour starts 99990101000000 do drop table t; diff --git a/mysql-test/r/events_restart_phase0.result b/mysql-test/r/events_restart_phase0.result deleted file mode 100644 index 218b804a302..00000000000 --- a/mysql-test/r/events_restart_phase0.result +++ /dev/null @@ -1,22 +0,0 @@ -SHOW VARIABLES LIKE 'event%'; -Variable_name Value -event_scheduler DISABLED -SELECT @@global.event_scheduler; -@@global.event_scheduler -DISABLED -SET GLOBAL event_scheduler=on; -ERROR HY000: The MySQL server is running with the --event-scheduler=DISABLED option so it cannot execute this statement -SET GLOBAL event_scheduler=off; -ERROR HY000: The MySQL server is running with the --event-scheduler=DISABLED option so it cannot execute this statement -SET GLOBAL event_scheduler=0; -ERROR HY000: The MySQL server is running with the --event-scheduler=DISABLED option so it cannot execute this statement -SET GLOBAL event_scheduler=1; -ERROR HY000: The MySQL server is running with the --event-scheduler=DISABLED option so it cannot execute this statement -SET GLOBAL event_scheduler=2; -ERROR 42000: Variable 'event_scheduler' can't be set to the value of '2' -SET GLOBAL event_scheduler=SUSPEND; -ERROR 42000: Variable 'event_scheduler' can't be set to the value of 'SUSPEND' -SET GLOBAL event_scheduler=SUSPENDED; -ERROR 42000: Variable 'event_scheduler' can't be set to the value of 'SUSPENDED' -SET GLOBAL event_scheduler=disabled; -ERROR 42000: Variable 'event_scheduler' can't be set to the value of 'disabled' diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result index e5d6078e863..6c03ace3d27 100644 --- a/mysql-test/r/information_schema.result +++ b/mysql-test/r/information_schema.result @@ -1408,4 +1408,32 @@ select user,db from information_schema.processlist; user db user3148 test drop user user3148@localhost; +DROP TABLE IF EXISTS thread_status; +CREATE TABLE thread_status (variable_name VARCHAR(64), +variable_value DECIMAL(22,7)); +CREATE TABLE server_status (variable_name VARCHAR(64), +variable_value DECIMAL(22,7)); +DROP EVENT IF EXISTS log_status; +CREATE EVENT log_status +ON SCHEDULE EVERY 1 SECOND +DO +BEGIN +INSERT INTO thread_status SELECT variable_name, variable_value FROM +information_schema.session_status; +INSERT INTO server_status SELECT variable_name, variable_value FROM +information_schema.global_status; +END$$ +SET GLOBAL event_scheduler=1; +SELECT * FROM thread_status WHERE variable_name LIKE 'SSL%' LIMIT 1,2; +variable_name variable_value +SSL_ACCEPTS 0.0000000 +SSL_CALLBACK_CACHE_HITS 0.0000000 +SELECT variable_name FROM server_status LIMIT 1,2; +variable_name +ABORTED_CONNECTS +BINLOG_CACHE_DISK_USE +DROP EVENT log_status; +DROP TABLE thread_status; +DROP TABLE server_status; +SET GLOBAL event_scheduler=0; End of 5.1 tests. diff --git a/mysql-test/r/ps.result b/mysql-test/r/ps.result index 1df845850b8..15e1c8730f0 100644 --- a/mysql-test/r/ps.result +++ b/mysql-test/r/ps.result @@ -2285,7 +2285,7 @@ drop user pstest_xyz@localhost; deallocate prepare abc; drop event if exists xyz; create function func_1() returns int begin create event xyz on schedule at now() do select 123; return 1; end| -ERROR HY000: Recursivity of EVENT DDL statements is forbidden when body is present +ERROR HY000: Recursion of EVENT DDL statements is forbidden when body is present select func_1(), func_1(), func_1() from dual; ERROR 42000: FUNCTION test.func_1 does not exist drop function func_1; diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result index 4abbb35bd6a..04e1be9f9f7 100644 --- a/mysql-test/r/sp.result +++ b/mysql-test/r/sp.result @@ -6061,4 +6061,89 @@ SUM(f2) bug25373(f1) 21.300000071526 NULL DROP FUNCTION bug25373| DROP TABLE t3| +drop function if exists bug20777| +drop table if exists examplebug20777| +create function bug20777(f1 bigint unsigned) returns bigint unsigned +begin +set f1 = (f1 - 10); set f1 = (f1 + 10); +return f1; +end| +select bug20777(9223372036854775803) as '9223372036854775803 2**63-5'; +9223372036854775803 2**63-5 +9223372036854775803 +select bug20777(9223372036854775804) as '9223372036854775804 2**63-4'; +9223372036854775804 2**63-4 +9223372036854775804 +select bug20777(9223372036854775805) as '9223372036854775805 2**63-3'; +9223372036854775805 2**63-3 +9223372036854775805 +select bug20777(9223372036854775806) as '9223372036854775806 2**63-2'; +9223372036854775806 2**63-2 +9223372036854775806 +select bug20777(9223372036854775807) as '9223372036854775807 2**63-1'; +9223372036854775807 2**63-1 +9223372036854775807 +select bug20777(9223372036854775808) as '9223372036854775808 2**63+0'; +9223372036854775808 2**63+0 +9223372036854775808 +select bug20777(9223372036854775809) as '9223372036854775809 2**63+1'; +9223372036854775809 2**63+1 +9223372036854775809 +select bug20777(9223372036854775810) as '9223372036854775810 2**63+2'; +9223372036854775810 2**63+2 +9223372036854775810 +select bug20777(-9223372036854775808) as 'lower bounds signed bigint'; +lower bounds signed bigint +0 +select bug20777(9223372036854775807) as 'upper bounds signed bigint'; +upper bounds signed bigint +9223372036854775807 +select bug20777(0) as 'lower bounds unsigned bigint'; +lower bounds unsigned bigint +0 +select bug20777(18446744073709551615) as 'upper bounds unsigned bigint'; +upper bounds unsigned bigint +18446744073709551615 +select bug20777(18446744073709551616) as 'upper bounds unsigned bigint + 1'; +upper bounds unsigned bigint + 1 +18446744073709551615 +select bug20777(-1) as 'lower bounds unsigned bigint - 1'; +lower bounds unsigned bigint - 1 +0 +create table examplebug20777 as select +0 as 'i', +bug20777(9223372036854775806) as '2**63-2', +bug20777(9223372036854775807) as '2**63-1', +bug20777(9223372036854775808) as '2**63', +bug20777(9223372036854775809) as '2**63+1', +bug20777(18446744073709551614) as '2**64-2', +bug20777(18446744073709551615) as '2**64-1', +bug20777(18446744073709551616) as '2**64', +bug20777(0) as '0', +bug20777(-1) as '-1'; +insert into examplebug20777 values (1, 9223372036854775806, 9223372036854775807, 223372036854775808, 9223372036854775809, 18446744073709551614, 18446744073709551615, 8446744073709551616, 0, -1); +show create table examplebug20777; +Table Create Table +examplebug20777 CREATE TABLE `examplebug20777` ( + `i` int(1) NOT NULL DEFAULT '0', + `2**63-2` bigint(20) unsigned DEFAULT NULL, + `2**63-1` bigint(20) unsigned DEFAULT NULL, + `2**63` bigint(20) unsigned DEFAULT NULL, + `2**63+1` bigint(20) unsigned DEFAULT NULL, + `2**64-2` bigint(20) unsigned DEFAULT NULL, + `2**64-1` bigint(20) unsigned DEFAULT NULL, + `2**64` bigint(20) unsigned DEFAULT NULL, + `0` bigint(20) unsigned DEFAULT NULL, + `-1` bigint(20) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +select * from examplebug20777 order by i; +i 2**63-2 2**63-1 2**63 2**63+1 2**64-2 2**64-1 2**64 0 -1 +0 9223372036854775806 9223372036854775807 9223372036854775808 9223372036854775809 18446744073709551614 18446744073709551615 18446744073709551615 0 0 +1 9223372036854775806 9223372036854775807 223372036854775808 9223372036854775809 18446744073709551614 18446744073709551615 8446744073709551616 0 0 +drop table examplebug20777; +select bug20777(18446744073709551613)+1; +bug20777(18446744073709551613)+1 +18446744073709551614 +drop function bug20777; +End of 5.0 tests. drop table t1,t2; diff --git a/mysql-test/t/events.test b/mysql-test/t/events.test index 8236ae32588..67baafd8b76 100644 --- a/mysql-test/t/events.test +++ b/mysql-test/t/events.test @@ -74,7 +74,7 @@ DROP EVENT event_starts_test; # create table test_nested(a int); create event e_43 on schedule every 1 second do set @a = 5; ---error ER_EVENT_RECURSIVITY_FORBIDDEN +--error ER_EVENT_RECURSION_FORBIDDEN alter event e_43 do alter event e_43 do set @a = 4; delimiter |; alter event e_43 do @@ -351,7 +351,7 @@ drop event закачка21; # Bug #16410 Events: CREATE EVENT is legal in a CREATE TRIGGER statement # create table t_16 (s1 int); ---error ER_EVENT_RECURSIVITY_FORBIDDEN +--error ER_EVENT_RECURSION_FORBIDDEN create trigger t_16_bi before insert on t_16 for each row create event e_16 on schedule every 1 second do set @a=5; drop table t_16; # diff --git a/mysql-test/t/events_bugs.test b/mysql-test/t/events_bugs.test index c1016f1752b..56c44dc3a9f 100644 --- a/mysql-test/t/events_bugs.test +++ b/mysql-test/t/events_bugs.test @@ -30,7 +30,7 @@ SET NAMES latin1; # START - BUG#16408: Events: crash for an event in a procedure # set @a=3; ---error ER_EVENT_RECURSIVITY_FORBIDDEN +--error ER_EVENT_RECURSION_FORBIDDEN CREATE PROCEDURE p_16 () CREATE EVENT e_16 ON SCHEDULE EVERY @a SECOND DO SET @a=5; # # END - BUG#16408: Events: crash for an event in a procedure diff --git a/mysql-test/t/events_restart_phase0.log b/mysql-test/t/events_restart_phase0.log deleted file mode 100644 index 218b804a302..00000000000 --- a/mysql-test/t/events_restart_phase0.log +++ /dev/null @@ -1,22 +0,0 @@ -SHOW VARIABLES LIKE 'event%'; -Variable_name Value -event_scheduler DISABLED -SELECT @@global.event_scheduler; -@@global.event_scheduler -DISABLED -SET GLOBAL event_scheduler=on; -ERROR HY000: The MySQL server is running with the --event-scheduler=DISABLED option so it cannot execute this statement -SET GLOBAL event_scheduler=off; -ERROR HY000: The MySQL server is running with the --event-scheduler=DISABLED option so it cannot execute this statement -SET GLOBAL event_scheduler=0; -ERROR HY000: The MySQL server is running with the --event-scheduler=DISABLED option so it cannot execute this statement -SET GLOBAL event_scheduler=1; -ERROR HY000: The MySQL server is running with the --event-scheduler=DISABLED option so it cannot execute this statement -SET GLOBAL event_scheduler=2; -ERROR 42000: Variable 'event_scheduler' can't be set to the value of '2' -SET GLOBAL event_scheduler=SUSPEND; -ERROR 42000: Variable 'event_scheduler' can't be set to the value of 'SUSPEND' -SET GLOBAL event_scheduler=SUSPENDED; -ERROR 42000: Variable 'event_scheduler' can't be set to the value of 'SUSPENDED' -SET GLOBAL event_scheduler=disabled; -ERROR 42000: Variable 'event_scheduler' can't be set to the value of 'disabled' diff --git a/mysql-test/t/events_restart_phase0.result b/mysql-test/t/events_restart_phase0.result deleted file mode 100644 index 218b804a302..00000000000 --- a/mysql-test/t/events_restart_phase0.result +++ /dev/null @@ -1,22 +0,0 @@ -SHOW VARIABLES LIKE 'event%'; -Variable_name Value -event_scheduler DISABLED -SELECT @@global.event_scheduler; -@@global.event_scheduler -DISABLED -SET GLOBAL event_scheduler=on; -ERROR HY000: The MySQL server is running with the --event-scheduler=DISABLED option so it cannot execute this statement -SET GLOBAL event_scheduler=off; -ERROR HY000: The MySQL server is running with the --event-scheduler=DISABLED option so it cannot execute this statement -SET GLOBAL event_scheduler=0; -ERROR HY000: The MySQL server is running with the --event-scheduler=DISABLED option so it cannot execute this statement -SET GLOBAL event_scheduler=1; -ERROR HY000: The MySQL server is running with the --event-scheduler=DISABLED option so it cannot execute this statement -SET GLOBAL event_scheduler=2; -ERROR 42000: Variable 'event_scheduler' can't be set to the value of '2' -SET GLOBAL event_scheduler=SUSPEND; -ERROR 42000: Variable 'event_scheduler' can't be set to the value of 'SUSPEND' -SET GLOBAL event_scheduler=SUSPENDED; -ERROR 42000: Variable 'event_scheduler' can't be set to the value of 'SUSPENDED' -SET GLOBAL event_scheduler=disabled; -ERROR 42000: Variable 'event_scheduler' can't be set to the value of 'disabled' diff --git a/mysql-test/t/information_schema.test b/mysql-test/t/information_schema.test index 09a588c9195..bd1f4271c94 100644 --- a/mysql-test/t/information_schema.test +++ b/mysql-test/t/information_schema.test @@ -1042,5 +1042,45 @@ select user,db from information_schema.processlist; connection default; drop user user3148@localhost; + + +# +# Bug #26174 Server Crash: INSERT ... SELECT ... FROM I_S.GLOBAL_STATUS in Event +# +--disable_warnings +DROP TABLE IF EXISTS thread_status; +CREATE TABLE thread_status (variable_name VARCHAR(64), +variable_value DECIMAL(22,7)); +CREATE TABLE server_status (variable_name VARCHAR(64), +variable_value DECIMAL(22,7)); +DROP EVENT IF EXISTS log_status; +--enable_warnings + +DELIMITER $$; + +CREATE EVENT log_status + ON SCHEDULE EVERY 1 SECOND + DO + BEGIN + INSERT INTO thread_status SELECT variable_name, variable_value FROM +information_schema.session_status; + INSERT INTO server_status SELECT variable_name, variable_value FROM +information_schema.global_status; + END$$ + +DELIMITER ;$$ + +SET GLOBAL event_scheduler=1; +sleep 1; +SELECT * FROM thread_status WHERE variable_name LIKE 'SSL%' LIMIT 1,2; +SELECT variable_name FROM server_status LIMIT 1,2; + + + +DROP EVENT log_status; +DROP TABLE thread_status; +DROP TABLE server_status; +SET GLOBAL event_scheduler=0; + --echo End of 5.1 tests. diff --git a/mysql-test/t/ps.test b/mysql-test/t/ps.test index 9f670f9973f..44f9bf350b2 100644 --- a/mysql-test/t/ps.test +++ b/mysql-test/t/ps.test @@ -2324,7 +2324,7 @@ drop event if exists xyz; #drop event xyz; #drop procedure proc_1; delimiter |; ---error ER_EVENT_RECURSIVITY_FORBIDDEN +--error ER_EVENT_RECURSION_FORBIDDEN create function func_1() returns int begin create event xyz on schedule at now() do select 123; return 1; end| delimiter ;| --error ER_SP_DOES_NOT_EXIST diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test index d49f36fd6d7..1c41498c4c7 100644 --- a/mysql-test/t/sp.test +++ b/mysql-test/t/sp.test @@ -7018,9 +7018,54 @@ SELECT SUM(f2), bug25373(f1) FROM t3 GROUP BY bug25373(f1) WITH ROLLUP| DROP FUNCTION bug25373| DROP TABLE t3| # -# NOTE: The delimiter is `|`, and not `;`. It is changed to `;` -# at the end of the file! -# +# Bug#20777: Function w BIGINT UNSIGNED shows diff. behaviour --ps-protocol +--disable_warnings +drop function if exists bug20777| +drop table if exists examplebug20777| +--enabled_warnings +create function bug20777(f1 bigint unsigned) returns bigint unsigned +begin + set f1 = (f1 - 10); set f1 = (f1 + 10); +return f1; +end| +delimiter ;| +select bug20777(9223372036854775803) as '9223372036854775803 2**63-5'; +select bug20777(9223372036854775804) as '9223372036854775804 2**63-4'; +select bug20777(9223372036854775805) as '9223372036854775805 2**63-3'; +select bug20777(9223372036854775806) as '9223372036854775806 2**63-2'; +select bug20777(9223372036854775807) as '9223372036854775807 2**63-1'; +select bug20777(9223372036854775808) as '9223372036854775808 2**63+0'; +select bug20777(9223372036854775809) as '9223372036854775809 2**63+1'; +select bug20777(9223372036854775810) as '9223372036854775810 2**63+2'; +select bug20777(-9223372036854775808) as 'lower bounds signed bigint'; +select bug20777(9223372036854775807) as 'upper bounds signed bigint'; +select bug20777(0) as 'lower bounds unsigned bigint'; +select bug20777(18446744073709551615) as 'upper bounds unsigned bigint'; +select bug20777(18446744073709551616) as 'upper bounds unsigned bigint + 1'; +select bug20777(-1) as 'lower bounds unsigned bigint - 1'; + +create table examplebug20777 as select + 0 as 'i', + bug20777(9223372036854775806) as '2**63-2', + bug20777(9223372036854775807) as '2**63-1', + bug20777(9223372036854775808) as '2**63', + bug20777(9223372036854775809) as '2**63+1', + bug20777(18446744073709551614) as '2**64-2', + bug20777(18446744073709551615) as '2**64-1', + bug20777(18446744073709551616) as '2**64', + bug20777(0) as '0', + bug20777(-1) as '-1'; +insert into examplebug20777 values (1, 9223372036854775806, 9223372036854775807, 223372036854775808, 9223372036854775809, 18446744073709551614, 18446744073709551615, 8446744073709551616, 0, -1); +show create table examplebug20777; +select * from examplebug20777 order by i; + +drop table examplebug20777; +select bug20777(18446744073709551613)+1; +drop function bug20777; +delimiter |; + +### +--echo End of 5.0 tests. # # BUG#NNNN: New bug synopsis @@ -7029,8 +7074,13 @@ DROP TABLE t3| #drop procedure if exists bugNNNN| #--enable_warnings #create procedure bugNNNN... - +# # Add bugs above this line. Use existing tables t1 and t2 when -# practical, or create table t3, t4 etc temporarily (and drop them). +# practical, or create table t3,t4 etc temporarily (and drop them). +# NOTE: The delimiter is `|`, and not `;`. It is changed to `;` +# at the end of the file! +# + delimiter ;| drop table t1,t2; + |