diff options
author | Alexander Nozdrin <alik@sun.com> | 2010-01-18 23:19:19 +0300 |
---|---|---|
committer | Alexander Nozdrin <alik@sun.com> | 2010-01-18 23:19:19 +0300 |
commit | dedfdb490ba528ddf3f9155a4fb6f0b3728df149 (patch) | |
tree | d38210df12297fa40d9edbf59cbb72329a4ccad4 /mysql-test/t | |
parent | 7917f0852f57ff0fecb80f561eccd674a4e1866d (diff) | |
parent | dccf2acceab7a3ed125c0d9c11330fe5f6898a1f (diff) | |
download | mariadb-git-dedfdb490ba528ddf3f9155a4fb6f0b3728df149.tar.gz |
Manual merge from mysql-next-mr.
Conflicts:
- sql/sql_plugin.cc
Diffstat (limited to 'mysql-test/t')
49 files changed, 405 insertions, 237 deletions
diff --git a/mysql-test/t/archive.test b/mysql-test/t/archive.test index bd5f8c96518..5de34ec6db8 100644 --- a/mysql-test/t/archive.test +++ b/mysql-test/t/archive.test @@ -5,6 +5,8 @@ -- source include/have_archive.inc -- source include/have_binlog_format_mixed_or_statement.inc +CALL mtr.add_suppression("Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT"); + --disable_warnings DROP TABLE if exists t1,t2,t3,t4,t5,t6; --enable_warnings @@ -1615,7 +1617,7 @@ DROP TABLE t1; # BUG#46961 - archive engine loses rows during self joining select! # SET @save_join_buffer_size= @@join_buffer_size; -SET @@join_buffer_size= 8228; +SET @@join_buffer_size= 8192; CREATE TABLE t1(a CHAR(255)) ENGINE=archive; INSERT INTO t1 VALUES('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'), ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'), diff --git a/mysql-test/t/bug46080-master.opt b/mysql-test/t/bug46080-master.opt index f59740afe60..71024d39356 100644 --- a/mysql-test/t/bug46080-master.opt +++ b/mysql-test/t/bug46080-master.opt @@ -1 +1 @@ ---skip-grant-tables --skip-name-resolve --safemalloc-mem-limit=4000000 +--loose-performance-schema=0 --skip-grant-tables --skip-name-resolve --loose-safemalloc-mem-limit=4000000 diff --git a/mysql-test/t/bug46080.test b/mysql-test/t/bug46080.test index 8b4cee4d8b0..6daf12cf1c5 100644 --- a/mysql-test/t/bug46080.test +++ b/mysql-test/t/bug46080.test @@ -3,6 +3,8 @@ --echo # sort_buffer_size cannot allocate --echo # +--source include/have_debug.inc + call mtr.add_suppression("Out of memory at line .*, 'my_alloc.c'"); call mtr.add_suppression("needed .* byte .*k., memory in use: .* bytes .*k"); diff --git a/mysql-test/t/cast.test b/mysql-test/t/cast.test index 8e60d548c2f..f5426f8d631 100644 --- a/mysql-test/t/cast.test +++ b/mysql-test/t/cast.test @@ -177,8 +177,6 @@ select cast(1.0e+300 as signed int); CREATE TABLE t1 (f1 double); INSERT INTO t1 SET f1 = -1.0e+30 ; INSERT INTO t1 SET f1 = +1.0e+30 ; -# Expected result is +-1e+30, but Windows returns +-1e+030. ---replace_result 1e+030 1e+30 SELECT f1 AS double_val, CAST(f1 AS SIGNED INT) AS cast_val FROM t1; DROP TABLE t1; diff --git a/mysql-test/t/change_user.test b/mysql-test/t/change_user.test index 89f35116a2c..3ed798e8d36 100644 --- a/mysql-test/t/change_user.test +++ b/mysql-test/t/change_user.test @@ -20,7 +20,7 @@ SET @@session.max_join_size = default; SELECT @@session.sql_big_selects; # On some machines the following will result into a warning --disable_warnings -SET @@global.max_join_size = -1; +SET @@global.max_join_size = 18446744073709551615; --enable_warnings SET @@session.max_join_size = default; --echo change_user diff --git a/mysql-test/t/commit_1innodb.test b/mysql-test/t/commit_1innodb.test index c4a29acdddd..5e2159c808b 100644 --- a/mysql-test/t/commit_1innodb.test +++ b/mysql-test/t/commit_1innodb.test @@ -1,6 +1,8 @@ -- source include/have_log_bin.inc -- source include/have_innodb.inc +call mtr.add_suppression("Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT"); + let $engine_type = InnoDB; -- source include/commit.inc diff --git a/mysql-test/t/ctype_cp932_binlog_stm.test b/mysql-test/t/ctype_cp932_binlog_stm.test index af6e6baf92a..b001b8e927d 100644 --- a/mysql-test/t/ctype_cp932_binlog_stm.test +++ b/mysql-test/t/ctype_cp932_binlog_stm.test @@ -4,6 +4,8 @@ -- source include/have_binlog_format_mixed_or_statement.inc -- source extra/binlog_tests/ctype_cp932_binlog.test +call mtr.add_suppression('Error in Log_event::read_log_event()'); + # # Bug#18293: Values in stored procedure written to binlog unescaped # @@ -22,18 +24,15 @@ CALL bug18293("Foo's a Bar", _cp932 0xED40ED41ED42, 47.93)| SELECT HEX(s1),HEX(s2),d FROM t4| DROP PROCEDURE bug18293| DROP TABLE t4| -SHOW BINLOG EVENTS FROM 371| +SHOW BINLOG EVENTS FROM 514| delimiter ;| --echo End of 5.0 tests # # #28436: Incorrect position in SHOW BINLOG EVENTS causes server coredump -# Note: 365 is a magic position (found experimentally, depends on -# the log's contents) that caused the server crash. - --error 1220 -SHOW BINLOG EVENTS FROM 366; +SHOW BINLOG EVENTS FROM 490; --echo Bug#44352 UPPER/LOWER function doesn't work correctly on cp932 and sjis environment. CREATE TABLE t1 (a varchar(16)) character set cp932; diff --git a/mysql-test/t/date_formats.test b/mysql-test/t/date_formats.test index e5dc7ffa53e..a83e18c44d9 100644 --- a/mysql-test/t/date_formats.test +++ b/mysql-test/t/date_formats.test @@ -17,82 +17,77 @@ WHERE variable_name IN ('date_format', 'datetime_format', 'time_format') ORDER BY variable_name; # -# Test setting a lot of different formats to see which formats are accepted and -# which aren't -# - -SET time_format='%H%i%s'; -SET time_format='%H:%i:%s.%f'; -SET time_format='%h-%i-%s.%f%p'; -SET time_format='%h:%i:%s.%f %p'; -SET time_format='%h:%i:%s%p'; - -SET date_format='%Y%m%d'; -SET date_format='%Y.%m.%d'; -SET date_format='%d.%m.%Y'; -SET date_format='%m-%d-%Y'; - -set datetime_format= '%Y%m%d%H%i%s'; -set datetime_format= '%Y-%m-%d %H:%i:%s'; -set datetime_format= '%m-%d-%y %H:%i:%s.%f'; -set datetime_format= '%d-%m-%Y %h:%i:%s%p'; -set datetime_format= '%H:%i:%s %Y-%m-%d'; -set datetime_format= '%H:%i:%s.%f %m-%d-%Y'; -set datetime_format= '%h:%i:%s %p %Y-%m-%d'; -set datetime_format= '%h:%i:%s.%f %p %Y-%m-%d'; - -SELECT variable_name, variable_value -FROM information_schema.session_variables -WHERE variable_name IN ('date_format', 'datetime_format', 'time_format') -ORDER BY variable_name; - ---error 1231 -SET time_format='%h:%i:%s'; ---error 1231 -SET time_format='%H %i:%s'; ---error 1231 -SET time_format='%H::%i:%s'; ---error 1231 -SET time_format='%H:%i:%s%f'; ---error 1231 -SET time_format='%H:%i.%f:%s'; ---error 1231 -SET time_format='%H:%i:%s%p'; ---error 1231 -SET time_format='%h:%i:%s.%f %p %Y-%m-%d'; ---error 1231 -SET time_format='%H%i%s.%f'; ---error 1231 -SET time_format='%H:%i-%s.%f'; ---error 1231 -SET date_format='%d.%m.%d'; ---error 1231 -SET datetime_format='%h.%m.%y %d.%i.%s'; ---error 1231 -set datetime_format= '%H:%i:%s.%f %p %Y-%m-%d'; - -# -# Test GLOBAL values - -set GLOBAL datetime_format= '%H:%i:%s %Y-%m-%d'; -SET SESSION datetime_format=default; -select @@global.datetime_format, @@session.datetime_format; -SET GLOBAL datetime_format=default; -SET SESSION datetime_format=default; -select @@global.datetime_format, @@session.datetime_format; - -SET GLOBAL date_format=default; -SET GLOBAL time_format=default; -SET GLOBAL datetime_format=default; -SET time_format=default; -SET date_format=default; -SET datetime_format=default; - -# # The following tests will work only when we at some point will enable # dynamic changing of formats # +# SET time_format='%H%i%s'; +# SET time_format='%H:%i:%s.%f'; +# SET time_format='%h-%i-%s.%f%p'; +# SET time_format='%h:%i:%s.%f %p'; +# SET time_format='%h:%i:%s%p'; +# +# SET date_format='%Y%m%d'; +# SET date_format='%Y.%m.%d'; +# SET date_format='%d.%m.%Y'; +# SET date_format='%m-%d-%Y'; +# +# set datetime_format= '%Y%m%d%H%i%s'; +# set datetime_format= '%Y-%m-%d %H:%i:%s'; +# set datetime_format= '%m-%d-%y %H:%i:%s.%f'; +# set datetime_format= '%d-%m-%Y %h:%i:%s%p'; +# set datetime_format= '%H:%i:%s %Y-%m-%d'; +# set datetime_format= '%H:%i:%s.%f %m-%d-%Y'; +# set datetime_format= '%h:%i:%s %p %Y-%m-%d'; +# set datetime_format= '%h:%i:%s.%f %p %Y-%m-%d'; +# +# SELECT variable_name, variable_value +# FROM information_schema.session_variables +# WHERE variable_name IN ('date_format', 'datetime_format', 'time_format') +# ORDER BY variable_name; +# +# --error 1231 +# SET time_format='%h:%i:%s'; +# --error 1231 +# SET time_format='%H %i:%s'; +# --error 1231 +# SET time_format='%H::%i:%s'; +# --error 1231 +# SET time_format='%H:%i:%s%f'; +# --error 1231 +# SET time_format='%H:%i.%f:%s'; +# --error 1231 +# SET time_format='%H:%i:%s%p'; +# --error 1231 +# SET time_format='%h:%i:%s.%f %p %Y-%m-%d'; +# --error 1231 +# SET time_format='%H%i%s.%f'; +# --error 1231 +# SET time_format='%H:%i-%s.%f'; +# --error 1231 +# SET date_format='%d.%m.%d'; +# --error 1231 +# SET datetime_format='%h.%m.%y %d.%i.%s'; +# --error 1231 +# set datetime_format= '%H:%i:%s.%f %p %Y-%m-%d'; +# +# # +# # Test GLOBAL values +# +# set GLOBAL datetime_format= '%H:%i:%s %Y-%m-%d'; +# SET SESSION datetime_format=default; +# select @@global.datetime_format, @@session.datetime_format; +# SET GLOBAL datetime_format=default; +# SET SESSION datetime_format=default; +# select @@global.datetime_format, @@session.datetime_format; +# +# SET GLOBAL date_format=default; +# SET GLOBAL time_format=default; +# SET GLOBAL datetime_format=default; +# SET time_format=default; +# SET date_format=default; +# SET datetime_format=default; + # SET date_format='%d.%m.%Y'; # select CAST('01.01.2001' as DATE) as a; # SET datetime_format='%d.%m.%Y %H.%i.%s'; diff --git a/mysql-test/t/ddl_i18n_koi8r.test b/mysql-test/t/ddl_i18n_koi8r.test index fecef2f95d5..7ad46ae5f61 100644 --- a/mysql-test/t/ddl_i18n_koi8r.test +++ b/mysql-test/t/ddl_i18n_koi8r.test @@ -148,7 +148,7 @@ set names koi8r| --echo --echo ---> Dumping mysqltest1 to ddl_i18n_koi8r.views.mysqltest1.sql ---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --databases mysqltest1 > $views_dump1 +--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --databases mysqltest1 > $views_dump1 # - Clean mysqltest1; @@ -408,22 +408,22 @@ set names koi8r| --echo --echo ---> Dump of mysqltest1 ---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --compact --routines --databases mysqltest1 +--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --compact --routines --databases mysqltest1 --echo --echo ---> Dumping mysqltest1 to ddl_i18n_koi8r.sp.mysqltest1.sql ---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --compact --routines --databases mysqltest1 > $sp_dump1 +--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --compact --routines --databases mysqltest1 > $sp_dump1 --echo --echo ---> Dump of mysqltest2 ---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --compact --routines --databases mysqltest2 +--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --compact --routines --databases mysqltest2 --echo --echo ---> Dumping mysqltest2 to ddl_i18n_koi8r.sp.mysqltest2.sql ---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --compact --routines --databases mysqltest2 > $sp_dump2 +--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --compact --routines --databases mysqltest2 > $sp_dump2 # - Clean mysqltest1, mysqltest2; @@ -685,22 +685,22 @@ use mysqltest1| --echo --echo ---> Dump of mysqltest1 ---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --compact --triggers --databases mysqltest1 +--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --compact --triggers --databases mysqltest1 --echo --echo ---> Dumping mysqltest1 to ddl_i18n_koi8r.triggers.mysqltest1.sql ---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --compact --triggers --databases mysqltest1 > $triggers_dump1 +--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --compact --triggers --databases mysqltest1 > $triggers_dump1 --echo --echo ---> Dump of mysqltest2 ---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --compact --triggers --databases mysqltest2 +--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --compact --triggers --databases mysqltest2 --echo --echo ---> Dumping mysqltest2 to ddl_i18n_koi8r.triggers.mysqltest2.sql ---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --compact --triggers --databases mysqltest2 > $triggers_dump2 +--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --compact --triggers --databases mysqltest2 > $triggers_dump2 # - Clean mysqltest1, mysqltest2; @@ -946,22 +946,22 @@ set names koi8r| --echo --echo ---> Dump of mysqltest1 ---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --compact --events --databases mysqltest1 +--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --compact --events --databases mysqltest1 --echo --echo ---> Dumping mysqltest1 to ddl_i18n_koi8r.events.mysqltest1.sql ---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --compact --events --databases mysqltest1 > $events_dump1 +--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --compact --events --databases mysqltest1 > $events_dump1 --echo --echo ---> Dump of mysqltest2 ---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --compact --events --databases mysqltest2 +--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --compact --events --databases mysqltest2 --echo --echo ---> Dumping mysqltest2 to ddl_i18n_koi8r.events.mysqltest2.sql ---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --compact --events --databases mysqltest2 > $events_dump2 +--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --compact --events --databases mysqltest2 > $events_dump2 # - Clean mysqltest1, mysqltest2; diff --git a/mysql-test/t/ddl_i18n_utf8.test b/mysql-test/t/ddl_i18n_utf8.test index 8788d0604f2..6ef418fc6e7 100644 --- a/mysql-test/t/ddl_i18n_utf8.test +++ b/mysql-test/t/ddl_i18n_utf8.test @@ -148,7 +148,7 @@ set names utf8| --echo --echo ---> Dumping mysqltest1 to ddl_i18n_utf8views.mysqltest1.sql ---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --databases mysqltest1 > $views_dump1 +--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --databases mysqltest1 > $views_dump1 # - Clean mysqltest1; @@ -408,22 +408,22 @@ set names utf8| --echo --echo ---> Dump of mysqltest1 ---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --compact --routines --databases mysqltest1 +--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --compact --routines --databases mysqltest1 --echo --echo ---> Dumping mysqltest1 to ddl_i18n_utf8sp.mysqltest1.sql ---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --compact --routines --databases mysqltest1 > $sp_dump1 +--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --compact --routines --databases mysqltest1 > $sp_dump1 --echo --echo ---> Dump of mysqltest2 ---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --compact --routines --databases mysqltest2 +--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --compact --routines --databases mysqltest2 --echo --echo ---> Dumping mysqltest2 to ddl_i18n_utf8sp.mysqltest2.sql ---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --compact --routines --databases mysqltest2 > $sp_dump2 +--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --compact --routines --databases mysqltest2 > $sp_dump2 # - Clean mysqltest1, mysqltest2; @@ -685,22 +685,22 @@ use mysqltest1| --echo --echo ---> Dump of mysqltest1 ---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --compact --triggers --databases mysqltest1 +--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --compact --triggers --databases mysqltest1 --echo --echo ---> Dumping mysqltest1 to ddl_i18n_utf8triggers.mysqltest1.sql ---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --compact --triggers --databases mysqltest1 > $triggers_dump1 +--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --compact --triggers --databases mysqltest1 > $triggers_dump1 --echo --echo ---> Dump of mysqltest2 ---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --compact --triggers --databases mysqltest2 +--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --compact --triggers --databases mysqltest2 --echo --echo ---> Dumping mysqltest2 to ddl_i18n_utf8triggers.mysqltest2.sql ---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --compact --triggers --databases mysqltest2 > $triggers_dump2 +--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --compact --triggers --databases mysqltest2 > $triggers_dump2 # - Clean mysqltest1, mysqltest2; @@ -946,22 +946,22 @@ set names utf8| --echo --echo ---> Dump of mysqltest1 ---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --compact --events --databases mysqltest1 +--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --compact --events --databases mysqltest1 --echo --echo ---> Dumping mysqltest1 to ddl_i18n_utf8events.mysqltest1.sql ---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --compact --events --databases mysqltest1 > $events_dump1 +--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --compact --events --databases mysqltest1 > $events_dump1 --echo --echo ---> Dump of mysqltest2 ---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --compact --events --databases mysqltest2 +--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --compact --events --databases mysqltest2 --echo --echo ---> Dumping mysqltest2 to ddl_i18n_utf8events.mysqltest2.sql ---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --compact --events --databases mysqltest2 > $events_dump2 +--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --compact --events --databases mysqltest2 > $events_dump2 # - Clean mysqltest1, mysqltest2; diff --git a/mysql-test/t/errors.test b/mysql-test/t/errors.test index 44c514f1244..5e53eaf0a52 100644 --- a/mysql-test/t/errors.test +++ b/mysql-test/t/errors.test @@ -102,8 +102,11 @@ drop table t1; drop table t2; drop function f1; drop function f2; + +# +# testing the value encoding in the error messages # -# testing the value encoding in the error messages of set_var +# should be TR\xC3\x9CE, TRE, TRE # SET NAMES utf8; --error ER_WRONG_VALUE_FOR_VAR @@ -125,9 +128,9 @@ SET sql_quote_show_create= _utf8 x'5452C39C45'; --error ER_WRONG_VALUE_FOR_VAR SET sql_quote_show_create=_latin1 x'5452DC45'; --error ER_WRONG_VALUE_FOR_VAR -SET sql_quote_show_create='TR.E'; +SET sql_quote_show_create='TRE'; --error ER_WRONG_VALUE_FOR_VAR -SET sql_quote_show_create=TR.E; +SET sql_quote_show_create=TRE; SET NAMES binary; --error ER_WRONG_VALUE_FOR_VAR @@ -136,3 +139,4 @@ SET sql_quote_show_create= _binary x'5452C39C45'; SET sql_quote_show_create= _utf8 x'5452C39C45'; --error ER_WRONG_VALUE_FOR_VAR SET sql_quote_show_create=_latin1 x'5452DC45'; + diff --git a/mysql-test/t/events_2.test b/mysql-test/t/events_2.test index a50255e9f8b..08412d2f5b0 100644 --- a/mysql-test/t/events_2.test +++ b/mysql-test/t/events_2.test @@ -25,15 +25,6 @@ set names utf8; create event задачка on schedule every 123 minute starts now() ends now() + interval 1 month do select 1; drop event задачка; -# event_scheduler is a global var ---error ER_GLOBAL_VARIABLE -set event_scheduler=off; -# event_scheduler could be only either 1 or 2 ---error ER_WRONG_VALUE_FOR_VAR -set global event_scheduler=3; ---error ER_WRONG_VALUE_FOR_VAR -set global event_scheduler=disabled; - --echo "DISABLE the scheduler. Testing that it does not work when the variable is 0" set global event_scheduler=off; select definer, name, db from mysql.event; diff --git a/mysql-test/t/events_bugs.test b/mysql-test/t/events_bugs.test index 81397b333f9..8d9959f1b0a 100644 --- a/mysql-test/t/events_bugs.test +++ b/mysql-test/t/events_bugs.test @@ -1199,14 +1199,14 @@ DROP USER mysqltest_u1@localhost; drop procedure if exists p; --enable_warnings set @old_mode= @@sql_mode; -set @@sql_mode= pow(2,32)-1; +set @@sql_mode= cast(pow(2,32)-1 as unsigned integer); create event e1 on schedule every 1 day do select 1; -select @@sql_mode; +select @@sql_mode into @full_mode; set @@sql_mode= @old_mode; # Rename SQL modes that differ in name between the server and the table definition. -select replace(@full_mode, '?', 'NOT_USED') into @full_mode; +select replace(@full_mode, ',,,', ',NOT_USED,') into @full_mode; select replace(@full_mode, 'ALLOW_INVALID_DATES', 'INVALID_DATES') into @full_mode; -select name from mysql.event where name = 'p' and sql_mode = @full_mode; +select name from mysql.event where name = 'e1' and sql_mode = @full_mode; drop event e1; # diff --git a/mysql-test/t/events_scheduling.test b/mysql-test/t/events_scheduling.test index 041a2def490..5f16f8bea6a 100644 --- a/mysql-test/t/events_scheduling.test +++ b/mysql-test/t/events_scheduling.test @@ -108,6 +108,32 @@ DROP TABLE table_1; DROP TABLE table_2; DROP TABLE table_3; DROP TABLE table_4; + +-- echo +-- echo Bug #50087 Interval arithmetic for Event_queue_element is not portable. +-- echo + +CREATE TABLE t1(a int); + +CREATE EVENT e1 ON SCHEDULE EVERY 1 MONTH +STARTS NOW() - INTERVAL 1 MONTH +ENDS NOW() + INTERVAL 2 MONTH +ON COMPLETION PRESERVE +DO + INSERT INTO t1 VALUES (1); + +CREATE EVENT e2 ON SCHEDULE EVERY 1 MONTH +STARTS NOW() +ENDS NOW() + INTERVAL 11 MONTH +ON COMPLETION PRESERVE +DO + INSERT INTO t1 VALUES (1); + +DROP TABLE t1; +DROP EVENT e1; +DROP EVENT e2; + + DROP DATABASE events_test; SET GLOBAL event_scheduler=@event_scheduler; diff --git a/mysql-test/t/gis.test b/mysql-test/t/gis.test index bc0695aaa93..70d73234ea8 100644 --- a/mysql-test/t/gis.test +++ b/mysql-test/t/gis.test @@ -353,6 +353,9 @@ insert into t1 values ('85984',GeomFromText('MULTIPOLYGON(((-115.006363 36.248666,-115.263639 36.247466,-115.263839 36.252766,-115.261439 36.252666,-115.261439 36.247366,-115.247239 36.247066)))')); +# Expected result is 115.31877315203187, but IA64 returns 115.31877315203188 +# due to fused multiply-add instructions. +--replace_result 115.31877315203188 115.31877315203187 select object_id, geometrytype(geo), ISSIMPLE(GEO), ASTEXT(centroid(geo)) from t1 where object_id=85998; diff --git a/mysql-test/t/index_merge_myisam.test b/mysql-test/t/index_merge_myisam.test index dccaecef20a..86195cc3cd9 100644 --- a/mysql-test/t/index_merge_myisam.test +++ b/mysql-test/t/index_merge_myisam.test @@ -36,7 +36,6 @@ select @@optimizer_switch; set optimizer_switch='default,index_merge_sort_union=off'; select @@optimizer_switch; ---error ER_WRONG_VALUE_FOR_VAR set optimizer_switch=4; --error ER_WRONG_VALUE_FOR_VAR diff --git a/mysql-test/t/innodb_bug42101-nonzero.test b/mysql-test/t/innodb_bug42101-nonzero.test index 685fdf20489..2e4cf1f46dd 100644 --- a/mysql-test/t/innodb_bug42101-nonzero.test +++ b/mysql-test/t/innodb_bug42101-nonzero.test @@ -5,7 +5,7 @@ -- source include/have_innodb.inc ---error ER_WRONG_ARGUMENTS +--error ER_WRONG_VALUE_FOR_VAR set global innodb_commit_concurrency=0; select @@innodb_commit_concurrency; set global innodb_commit_concurrency=1; @@ -14,7 +14,7 @@ set global innodb_commit_concurrency=42; select @@innodb_commit_concurrency; set global innodb_commit_concurrency=DEFAULT; select @@innodb_commit_concurrency; ---error ER_WRONG_ARGUMENTS +--error ER_WRONG_VALUE_FOR_VAR set global innodb_commit_concurrency=0; select @@innodb_commit_concurrency; set global innodb_commit_concurrency=1; diff --git a/mysql-test/t/innodb_bug42101.test b/mysql-test/t/innodb_bug42101.test index b6536490d48..f0b88e034a0 100644 --- a/mysql-test/t/innodb_bug42101.test +++ b/mysql-test/t/innodb_bug42101.test @@ -7,10 +7,10 @@ set global innodb_commit_concurrency=0; select @@innodb_commit_concurrency; ---error ER_WRONG_ARGUMENTS +--error ER_WRONG_VALUE_FOR_VAR set global innodb_commit_concurrency=1; select @@innodb_commit_concurrency; ---error ER_WRONG_ARGUMENTS +--error ER_WRONG_VALUE_FOR_VAR set global innodb_commit_concurrency=42; select @@innodb_commit_concurrency; set global innodb_commit_concurrency=0; diff --git a/mysql-test/t/insert.test b/mysql-test/t/insert.test index 40d1464b86a..4f918504597 100644 --- a/mysql-test/t/insert.test +++ b/mysql-test/t/insert.test @@ -422,9 +422,6 @@ INSERT INTO t1(a,c) VALUES (1.87e-3, 1.87e-3); INSERT INTO t1(a,c) VALUES (-1.87e-2, -1.87e-2); INSERT INTO t1(a,c) VALUES (5000e+0, 5000e+0); INSERT INTO t1(a,c) VALUES (-5000e+0, -5000e+0); -# Expected results are "12.2" and "1.2e+78", but Windows returns "12.3" and -# "1.3e+78" due to different rounding rules ---replace_result 12.3 12.2 1.3e+78 1.2e+78 SELECT * FROM t1; DROP TABLE t1; @@ -459,9 +456,6 @@ INSERT INTO t1(a,c) VALUES (-1.87e-2, -1.87e-2); INSERT INTO t1(a,c) VALUES (5000e+0, 5000e+0); INSERT INTO t1(a,c) VALUES (-5000e+0, -5000e+0); -# Expected results are "12.2" and "1.2e+78", but Windows returns "12.3" and -# "1.3e+78" due to different rounding rules ---replace_result 12.3 12.2 1.3e+78 1.2e+78 SELECT * FROM t1; DROP TABLE t1; diff --git a/mysql-test/t/key_cache.test b/mysql-test/t/key_cache.test index 4c14dc96aaa..a404e9bf15a 100644 --- a/mysql-test/t/key_cache.test +++ b/mysql-test/t/key_cache.test @@ -149,10 +149,13 @@ show status like 'key_blocks_used'; --replace_result 1812 KEY_BLOCKS_UNUSED 1793 KEY_BLOCKS_UNUSED 1674 KEY_BLOCKS_UNUSED 1818 KEY_BLOCKS_UNUSED 1824 KEY_BLOCKS_UNUSED show status like 'key_blocks_unused'; - -# Cleanup -# We don't reset keycache2 as we want to ensure that mysqld will reset it +create table t1 (a int primary key); +cache index t1 in keycache2; +insert t1 values (1),(2),(3),(4),(5),(6),(7),(8); +# delete keycache2, t1 is reassigned to default set global keycache2.key_buffer_size=0; +select * from t1; +drop table t1; # Test to set up a too small size for a key cache (bug #2064) set global keycache3.key_buffer_size=100; @@ -216,6 +219,7 @@ set global key_cache_block_size= @my_key_cache_block_size; # Bug#10473 - Can't set 'key_buffer_size' system variable to ZERO # (One cannot drop the default key cache.) # +--error ER_WARN_CANT_DROP_DEFAULT_KEYCACHE set @@global.key_buffer_size=0; select @@global.key_buffer_size; diff --git a/mysql-test/t/mysql-bug45236-master.opt b/mysql-test/t/mysql-bug45236-master.opt new file mode 100644 index 00000000000..fc1887bca47 --- /dev/null +++ b/mysql-test/t/mysql-bug45236-master.opt @@ -0,0 +1 @@ +--loose-skip-safemalloc diff --git a/mysql-test/t/mysql_locale_posix.test b/mysql-test/t/mysql_locale_posix.test index 7d306dfc6c4..c047b7b1ae9 100644 --- a/mysql-test/t/mysql_locale_posix.test +++ b/mysql-test/t/mysql_locale_posix.test @@ -128,10 +128,10 @@ DROP DATABASE IF EXISTS `ó`; # --echo --echo iso88592 ---exec LC_ALL=cs_CZ.iso88592 $MYSQL --character-sets-dir=$CHARSETSDIR --default-character-set=auto test -e "SELECT @@character_set_client" ---exec LC_ALL=cs_CZ.iso88592 $MYSQLADMIN --character-sets-dir=$CHARSETSDIR -uroot -S $MASTER_MYSOCK -P $MASTER_MYPORT --default-character-set=auto create ó ---exec LC_ALL=cs_CZ.iso88592 $MYSQL_SHOW --character-sets-dir=$CHARSETSDIR --default-character-set=auto ó ---exec LC_ALL=cs_CZ.iso88592 $MYSQL_CHECK --character-sets-dir=$CHARSETSDIR--default-character-set=auto "ó" +--exec LC_ALL=cs_CZ.iso88592 $MYSQL --character-sets-dir=$MYSQL_SHAREDIR/charsets --default-character-set=auto test -e "SELECT @@character_set_client" +--exec LC_ALL=cs_CZ.iso88592 $MYSQLADMIN --character-sets-dir=$MYSQL_SHAREDIR/charsets -uroot -S $MASTER_MYSOCK -P $MASTER_MYPORT --default-character-set=auto create ó +--exec LC_ALL=cs_CZ.iso88592 $MYSQL_SHOW --character-sets-dir=$MYSQL_SHAREDIR/charsets --default-character-set=auto ó +--exec LC_ALL=cs_CZ.iso88592 $MYSQL_CHECK --character-sets-dir=$MYSQL_SHAREDIR/charsets--default-character-set=auto "ó" # {"iso88597", "greek", my_cs_exact}, @@ -163,10 +163,10 @@ DROP DATABASE IF EXISTS `ó`; --echo --echo koi8r ---exec LC_ALL=ru_RU.koi8r $MYSQL --character-sets-dir=$CHARSETSDIR --default-character-set=auto test -e "SELECT @@character_set_client" ---exec LC_ALL=ru_RU.koi8r $MYSQLADMIN --character-sets-dir=$CHARSETSDIR -uroot -S $MASTER_MYSOCK -P $MASTER_MYPORT --default-character-set=auto create ó ---exec LC_ALL=ru_RU.koi8r $MYSQL_SHOW --character-sets-dir=$CHARSETSDIR --default-character-set=auto ó ---exec LC_ALL=ru_RU.koi8r $MYSQL_CHECK --character-sets-dir=$CHARSETSDIR --default-character-set=auto "ó" +--exec LC_ALL=ru_RU.koi8r $MYSQL --character-sets-dir=$MYSQL_SHAREDIR/charsets --default-character-set=auto test -e "SELECT @@character_set_client" +--exec LC_ALL=ru_RU.koi8r $MYSQLADMIN --character-sets-dir=$MYSQL_SHAREDIR/charsets -uroot -S $MASTER_MYSOCK -P $MASTER_MYPORT --default-character-set=auto create ó +--exec LC_ALL=ru_RU.koi8r $MYSQL_SHOW --character-sets-dir=$MYSQL_SHAREDIR/charsets --default-character-set=auto ó +--exec LC_ALL=ru_RU.koi8r $MYSQL_CHECK --character-sets-dir=$MYSQL_SHAREDIR/charsets --default-character-set=auto "ó" # {"Shift_JIS", "sjis", my_cs_exact}, diff --git a/mysql-test/t/mysqlbinlog.test b/mysql-test/t/mysqlbinlog.test index 1e5ce4cb0e1..bcd03c1baac 100644 --- a/mysql-test/t/mysqlbinlog.test +++ b/mysql-test/t/mysqlbinlog.test @@ -71,7 +71,7 @@ select "--- --position --" as ""; --enable_query_log --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ ---exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --position=331 $MYSQLD_DATADIR/master-bin.000002 +--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --position=1072 $MYSQLD_DATADIR/master-bin.000002 # These are tests for remote binlog. # They should return the same as previous test. @@ -107,7 +107,8 @@ select "--- --position --" as ""; --enable_query_log --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ ---exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --read-from-remote-server --position=331 --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000002 +--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --read-from-remote-server --position=1072 --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000002 + # Bug#7853 mysqlbinlog does not accept input from stdin --disable_query_log @@ -250,7 +251,7 @@ eval LOAD DATA LOCAL INFILE '$MYSQLTEST_VARDIR/tmp/mysqlbinlog_tmp.dat' --echo The bug being tested was that 'Query' lines were not preceded by '#' --echo If the line is in the table, it had to have been preceded by a '#' --echo -SELECT COUNT(*) AS `BUG#28293_expect_1` FROM patch WHERE a LIKE '%Query%'; +SELECT COUNT(*) AS `BUG#28293_expect_3` FROM patch WHERE a LIKE '%Query%'; DROP TABLE patch; # @@ -262,7 +263,7 @@ INSERT INTO t1 VALUES(connection_id()); let $a= `SELECT a FROM t1`; FLUSH LOGS; let $outfile= $MYSQLTEST_VARDIR/tmp/bug29928.sql; ---exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000014 > $outfile +--exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000015 > $outfile DROP TABLE t1; connect (con1, localhost, root, , test); connection con1; @@ -286,8 +287,8 @@ exec $MYSQL_BINLOG $MYSQL_TEST_DIR/std_data/corrupt-relay-bin.000624 > $MYSQLTES # FLUSH LOGS; --error 1 ---exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000016 >/dev/null 2>/dev/null ---exec $MYSQL_BINLOG --force-if-open $MYSQLD_DATADIR/master-bin.000016 >/dev/null 2>/dev/null +--exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000017 >/dev/null 2>/dev/null +--exec $MYSQL_BINLOG --force-if-open $MYSQLD_DATADIR/master-bin.000017 >/dev/null 2>/dev/null --echo Bug#31611 Security risk with BINLOG statement @@ -302,8 +303,8 @@ CREATE TABLE t1 (a INT, b CHAR(64)); flush logs; INSERT INTO t1 VALUES (1,USER()); flush logs; -echo mysqlbinlog var/log/master-bin.000017 > var/tmp/bug31611.sql; -exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000017 > $MYSQLTEST_VARDIR/tmp/bug31611.sql; +echo mysqlbinlog var/log/master-bin.000018 > var/tmp/bug31611.sql; +exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000018 > $MYSQLTEST_VARDIR/tmp/bug31611.sql; connect (unsecure,localhost,untrusted,,mysqltest1); echo mysql mysqltest1 -uuntrusted < var/tmp/bug31611.sql; error 1; @@ -336,8 +337,8 @@ FLUSH LOGS; query_vertical SELECT * FROM t1; DROP TABLE t1; -echo >> mysqlbinlog var/log/master-bin.000019 > var/tmp/bug32580.sql; -exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000019 > $MYSQLTEST_VARDIR/tmp/bug32580.sql; +echo >> mysqlbinlog var/log/master-bin.000020 > var/tmp/bug32580.sql; +exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000020 > $MYSQLTEST_VARDIR/tmp/bug32580.sql; echo >> mysql test < var/tmp/bug32580.sql; exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/bug32580.sql; remove_file $MYSQLTEST_VARDIR/tmp/bug32580.sql; diff --git a/mysql-test/t/mysqlbinlog2.test b/mysql-test/t/mysqlbinlog2.test index 6089b83e42d..1f0da6bcf54 100644 --- a/mysql-test/t/mysqlbinlog2.test +++ b/mysql-test/t/mysqlbinlog2.test @@ -50,15 +50,15 @@ select "--- offset --" as ""; --disable_query_log select "--- start-position --" as ""; --enable_query_log ---exec $MYSQL_BINLOG --short-form --start-position=609 $MYSQLD_DATADIR/master-bin.000001 +--exec $MYSQL_BINLOG --short-form --start-position=760 $MYSQLD_DATADIR/master-bin.000001 --disable_query_log select "--- stop-position --" as ""; --enable_query_log ---exec $MYSQL_BINLOG --short-form --stop-position=609 $MYSQLD_DATADIR/master-bin.000001 +--exec $MYSQL_BINLOG --short-form --stop-position=760 $MYSQLD_DATADIR/master-bin.000001 --disable_query_log select "--- start and stop positions ---" as ""; --enable_query_log ---exec $MYSQL_BINLOG --short-form --start-position=609 --stop-position 726 $MYSQLD_DATADIR/master-bin.000001 +--exec $MYSQL_BINLOG --short-form --start-position=760 --stop-position 951 $MYSQLD_DATADIR/master-bin.000001 --disable_query_log select "--- start-datetime --" as ""; --enable_query_log @@ -84,11 +84,11 @@ select "--- offset --" as ""; --disable_query_log select "--- start-position --" as ""; --enable_query_log ---exec $MYSQL_BINLOG --short-form --start-position=609 $MYSQLD_DATADIR/master-bin.000001 $MYSQLD_DATADIR/master-bin.000002 +--exec $MYSQL_BINLOG --short-form --start-position=760 $MYSQLD_DATADIR/master-bin.000001 $MYSQLD_DATADIR/master-bin.000002 --disable_query_log select "--- stop-position --" as ""; --enable_query_log ---exec $MYSQL_BINLOG --short-form --stop-position=135 $MYSQLD_DATADIR/master-bin.000001 $MYSQLD_DATADIR/master-bin.000002 +--exec $MYSQL_BINLOG --short-form --stop-position=203 $MYSQLD_DATADIR/master-bin.000001 $MYSQLD_DATADIR/master-bin.000002 --disable_query_log select "--- start-datetime --" as ""; --enable_query_log @@ -111,15 +111,15 @@ select "--- offset --" as ""; --disable_query_log select "--- start-position --" as ""; --enable_query_log ---exec $MYSQL_BINLOG --short-form --start-position=609 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 +--exec $MYSQL_BINLOG --short-form --start-position=760 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 --disable_query_log select "--- stop-position --" as ""; --enable_query_log ---exec $MYSQL_BINLOG --short-form --stop-position=609 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 +--exec $MYSQL_BINLOG --short-form --stop-position=760 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 --disable_query_log select "--- start and stop positions ---" as ""; --enable_query_log ---exec $MYSQL_BINLOG --short-form --start-position=609 --stop-position 726 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 +--exec $MYSQL_BINLOG --short-form --start-position=760 --stop-position 951 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 --disable_query_log select "--- start-datetime --" as ""; --enable_query_log @@ -142,7 +142,7 @@ select "--- offset --" as ""; --disable_query_log select "--- start-position --" as ""; --enable_query_log ---exec $MYSQL_BINLOG --short-form --start-position=609 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 master-bin.000002 +--exec $MYSQL_BINLOG --short-form --start-position=760 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 master-bin.000002 --disable_query_log select "--- stop-position --" as ""; --enable_query_log diff --git a/mysql-test/t/mysqld--help-notwin.test b/mysql-test/t/mysqld--help-notwin.test new file mode 100644 index 00000000000..e3d1ca97128 --- /dev/null +++ b/mysql-test/t/mysqld--help-notwin.test @@ -0,0 +1,24 @@ +# Copyright (C) 2009-2010 Sun Microsystems, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +# +# mysqld --help +# +--source include/not_embedded.inc +--source include/not_windows.inc +--source include/have_perfschema.inc + +--source include/mysqld--help.inc + diff --git a/mysql-test/t/mysqld--help-win.test b/mysql-test/t/mysqld--help-win.test new file mode 100644 index 00000000000..56cfec8999b --- /dev/null +++ b/mysql-test/t/mysqld--help-win.test @@ -0,0 +1,24 @@ +# Copyright (C) 2009-2010 Sun Microsystems, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +# +# mysqld --help +# +--source include/not_embedded.inc +--source include/windows.inc +--source include/have_perfschema.inc + +--source include/mysqld--help.inc + diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test index 07ab9cecd28..7be8244a85b 100644 --- a/mysql-test/t/mysqldump.test +++ b/mysql-test/t/mysqldump.test @@ -7,6 +7,9 @@ # Save the initial number of concurrent sessions --source include/count_sessions.inc +disable_query_log; +call mtr.add_suppression("Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT"); +enable_query_log; --echo # Bug#37938 Test "mysqldump" lacks various insert statements --echo # Turn off concurrent inserts to avoid random errors @@ -46,9 +49,6 @@ DROP TABLE t1; CREATE TABLE t1 (a double); INSERT INTO t1 VALUES ('-9e999999'); -# The following replaces is here because some systems replaces the above -# double with '-inf' and others with MAX_DOUBLE ---replace_result (-1.79769313486232e+308) (RES) (NULL) (RES) --exec $MYSQL_DUMP --compact test t1 DROP TABLE t1; @@ -168,7 +168,7 @@ drop database mysqldump_test_db; CREATE TABLE t1 (a CHAR(10)); INSERT INTO t1 VALUES (_latin1 ''); ---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --skip-comments test t1 +--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --skip-comments test t1 --echo # --echo # Bug#8063 make test mysqldump [ fail ] @@ -178,10 +178,10 @@ INSERT INTO t1 VALUES (_latin1 ''); --echo # checking that "mysqldump" is compiled with "latin1" --echo # -#--exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --skip-comments --compatible=mysql323 test t1 ---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --skip-comments --compatible=mysql323 --default-character-set=cp850 test t1 ---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --skip-comments --default-character-set=cp850 --compatible=mysql323 test t1 ---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --skip-comments --default-character-set=utf8 --compatible=mysql323 test t1 +#--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --skip-comments --compatible=mysql323 test t1 +--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --skip-comments --compatible=mysql323 --default-character-set=cp850 test t1 +--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --skip-comments --default-character-set=cp850 --compatible=mysql323 test t1 +--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --skip-comments --default-character-set=utf8 --compatible=mysql323 test t1 DROP TABLE t1; --echo # @@ -875,8 +875,13 @@ select * from t1; create view v1 as select * from v3 where b in (1, 2, 3, 4, 5, 6, 7); +# Disable warnings since LIMIT warning for unsafe statement if +# binlog_format = STATEMENT. Note: after BUG#45832, the warning should +# not be issued. +--disable_warnings create view v2 as select v3.a from v3, v1 where v1.a=v3.a and v3.b=3 limit 1; +--enable_warnings --exec $MYSQL_DUMP --skip-comments test @@ -1673,14 +1678,14 @@ drop database db42635; SET NAMES utf8; CREATE TABLE `straße` ( f1 INT ); ---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --skip-comments --default-character-set=utf8 --compatible=mysql323 test ---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --skip-comments --default-character-set=latin1 --compatible=mysql323 test +--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --skip-comments --default-character-set=utf8 --compatible=mysql323 test +--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --skip-comments --default-character-set=latin1 --compatible=mysql323 test DROP TABLE `straße`; CREATE TABLE `כדשגכחךלדגכחשךדגחכךלדגכ` ( f1 INT ); ---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --skip-comments --default-character-set=utf8 --compatible=mysql323 test +--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --skip-comments --default-character-set=utf8 --compatible=mysql323 test --error 2 ---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --skip-comments --default-character-set=latin1 --compatible=mysql323 test +--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --skip-comments --default-character-set=latin1 --compatible=mysql323 test DROP TABLE `כדשגכחךלדגכחשךדגחכךלדגכ`; SET NAMES latin1; @@ -1837,7 +1842,7 @@ set names latin1; --echo --echo # Dump mysqldump_test_db to bug30027.sql. ---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --default-character-set=latin1 --databases mysqldump_test_db > $MYSQLTEST_VARDIR/tmp/bug30027.sql +--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --default-character-set=latin1 --databases mysqldump_test_db > $MYSQLTEST_VARDIR/tmp/bug30027.sql --echo --echo # Drop mysqldump_test_db. @@ -1923,7 +1928,7 @@ WHERE table_schema = 'mysqldump_test_db' AND table_name = 'v1'; --echo --echo ---> Dumping mysqldump_test_db to bug30217.sql ---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --databases mysqldump_test_db > $MYSQLTEST_VARDIR/tmp/bug30217.sql +--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --databases mysqldump_test_db > $MYSQLTEST_VARDIR/tmp/bug30217.sql --echo @@ -2079,7 +2084,7 @@ INSERT INTO t1 VALUES (1, 'ABC-АБВ', 'DEF-ÂÃÄ'), (2, NULL, NULL); --echo # default '--default-charset' (binary): ---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --tab=$MYSQLTEST_VARDIR/tmp/ test t1 +--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --tab=$MYSQLTEST_VARDIR/tmp/ test t1 --echo ################################################## --cat_file $file --echo ################################################## @@ -2092,7 +2097,7 @@ SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c; --echo # utf8: ---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --default-character-set=utf8 --tab=$MYSQLTEST_VARDIR/tmp/ test t1 +--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --default-character-set=utf8 --tab=$MYSQLTEST_VARDIR/tmp/ test t1 --echo ################################################## --cat_file $file --echo ################################################## @@ -2105,7 +2110,7 @@ SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c; --echo # latin1 (data corruption is expected): ---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --default-character-set=latin1 --tab=$MYSQLTEST_VARDIR/tmp/ test t1 +--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --default-character-set=latin1 --tab=$MYSQLTEST_VARDIR/tmp/ test t1 --echo ################################################## --cat_file $file --echo ################################################## @@ -2118,7 +2123,7 @@ SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c; --echo # koi8r (data corruption is expected): ---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --default-character-set=koi8r --tab=$MYSQLTEST_VARDIR/tmp/ test t1 +--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --default-character-set=koi8r --tab=$MYSQLTEST_VARDIR/tmp/ test t1 --echo ################################################## --cat_file $file --echo ################################################## diff --git a/mysql-test/t/not_partition.test b/mysql-test/t/not_partition.test index 63892845de8..78ca44acf18 100644 --- a/mysql-test/t/not_partition.test +++ b/mysql-test/t/not_partition.test @@ -31,7 +31,7 @@ ALTER TABLE t1 ENGINE Memory; ALTER TABLE t1 ADD (new INT); DROP TABLE t1; ---error ER_FEATURE_DISABLED,ER_OPTION_PREVENTS_STATEMENT +--error ER_FEATURE_DISABLED CREATE TABLE t1 ( firstname VARCHAR(25) NOT NULL, lastname VARCHAR(25) NOT NULL, @@ -42,13 +42,13 @@ CREATE TABLE t1 ( PARTITION BY KEY(joined) PARTITIONS 6; ---error ER_FEATURE_DISABLED,ER_OPTION_PREVENTS_STATEMENT +--error ER_FEATURE_DISABLED ALTER TABLE t1 PARTITION BY KEY(joined) PARTITIONS 2; --error ER_BAD_TABLE_ERROR drop table t1; ---error ER_FEATURE_DISABLED,ER_OPTION_PREVENTS_STATEMENT +--error ER_FEATURE_DISABLED CREATE TABLE t1 ( firstname VARCHAR(25) NOT NULL, lastname VARCHAR(25) NOT NULL, @@ -66,7 +66,7 @@ PARTITION BY RANGE( YEAR(joined) ) ( --error ER_BAD_TABLE_ERROR drop table t1; ---error ER_FEATURE_DISABLED,ER_OPTION_PREVENTS_STATEMENT +--error ER_FEATURE_DISABLED CREATE TABLE t1 (id INT, purchased DATE) PARTITION BY RANGE( YEAR(purchased) ) SUBPARTITION BY HASH( TO_DAYS(purchased) ) diff --git a/mysql-test/t/optimizer_switch_eng_cond_pushdown1-master.opt b/mysql-test/t/optimizer_switch_eng_cond_pushdown1-master.opt new file mode 100644 index 00000000000..89aa07976ac --- /dev/null +++ b/mysql-test/t/optimizer_switch_eng_cond_pushdown1-master.opt @@ -0,0 +1 @@ +--optimizer-switch=engine_condition_pushdown=off --engine-condition-pushdown=1 diff --git a/mysql-test/t/optimizer_switch_eng_cond_pushdown1.test b/mysql-test/t/optimizer_switch_eng_cond_pushdown1.test new file mode 100644 index 00000000000..187aa145408 --- /dev/null +++ b/mysql-test/t/optimizer_switch_eng_cond_pushdown1.test @@ -0,0 +1,5 @@ +# check how --engine-condition-pushdown and --optimizer-switch +# influence each other when used together (last wins). +select @@session.engine_condition_pushdown, +@@global.engine_condition_pushdown, +@@session.optimizer_switch, @@global.optimizer_switch; diff --git a/mysql-test/t/optimizer_switch_eng_cond_pushdown2-master.opt b/mysql-test/t/optimizer_switch_eng_cond_pushdown2-master.opt new file mode 100644 index 00000000000..f48ab5b963b --- /dev/null +++ b/mysql-test/t/optimizer_switch_eng_cond_pushdown2-master.opt @@ -0,0 +1 @@ +--engine-condition-pushdown=1 --optimizer-switch=engine_condition_pushdown=off diff --git a/mysql-test/t/optimizer_switch_eng_cond_pushdown2.test b/mysql-test/t/optimizer_switch_eng_cond_pushdown2.test new file mode 100644 index 00000000000..187aa145408 --- /dev/null +++ b/mysql-test/t/optimizer_switch_eng_cond_pushdown2.test @@ -0,0 +1,5 @@ +# check how --engine-condition-pushdown and --optimizer-switch +# influence each other when used together (last wins). +select @@session.engine_condition_pushdown, +@@global.engine_condition_pushdown, +@@session.optimizer_switch, @@global.optimizer_switch; diff --git a/mysql-test/t/parser.test b/mysql-test/t/parser.test index e579e371184..e6c9c8b423f 100644 --- a/mysql-test/t/parser.test +++ b/mysql-test/t/parser.test @@ -646,6 +646,10 @@ select conv(255 AS p1, 10 AS p2, 16 AS p3); # Native function with a variable number of arguments +# Bug in libm.so on Solaris: +# atan(10) from 32-bit version returns 1.4711276743037347 +# atan(10) from 64-bit version returns 1.4711276743037345 +--replace_result 1.4711276743037345 1.4711276743037347 select atan(10); -- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT select atan(10 AS p1); diff --git a/mysql-test/t/partition_innodb_stmt.test b/mysql-test/t/partition_innodb_stmt.test index d6181ce068e..c6f30f41969 100644 --- a/mysql-test/t/partition_innodb_stmt.test +++ b/mysql-test/t/partition_innodb_stmt.test @@ -50,7 +50,7 @@ connection con1; --echo # connection con1 SET TRANSACTION ISOLATION LEVEL READ COMMITTED; BEGIN; ---error ER_BINLOG_LOGGING_IMPOSSIBLE +--error ER_BINLOG_STMT_MODE_AND_ROW_ENGINE INSERT INTO t1 VALUES(9); COMMIT; diff --git a/mysql-test/t/partition_key_cache.test b/mysql-test/t/partition_key_cache.test index f6ea974ba96..4beb9506b05 100644 --- a/mysql-test/t/partition_key_cache.test +++ b/mysql-test/t/partition_key_cache.test @@ -9,7 +9,7 @@ DROP TABLE IF EXISTS t1, t2, v, x; --echo # Verifing that reads/writes use the key cache correctly SELECT @org_key_cache_buffer_size:= @@global.default.key_buffer_size; --echo # Minimize default key cache (almost disabled). -SET @@global.default.key_buffer_size = 1; +SET @@global.default.key_buffer_size = 4096; CREATE TABLE t1 ( a INT, b INT, diff --git a/mysql-test/t/profiling.test b/mysql-test/t/profiling.test index afbce04b966..1e1aada7c15 100644 --- a/mysql-test/t/profiling.test +++ b/mysql-test/t/profiling.test @@ -9,10 +9,6 @@ show profile all; show session variables like 'profil%'; select @@profiling; -# setting global variable is an error ---error ER_LOCAL_VARIABLE -set global profiling = ON; - # But size is okay set @start_value= @@global.profiling_history_size; set global profiling_history_size=100; diff --git a/mysql-test/t/ps_not_windows.test b/mysql-test/t/ps_not_windows.test index 0ab08b59f1e..2003251dc55 100644 --- a/mysql-test/t/ps_not_windows.test +++ b/mysql-test/t/ps_not_windows.test @@ -3,7 +3,9 @@ # Non-windows specific ps tests. --source include/not_windows.inc # requires dynamic loading ---source include/have_dynamic_loading.inc +if (`SELECT @@have_dynamic_loading != 'YES'`) { + --skip ps_not_windows requires dynamic loading +} # # Bug #20665: All commands supported in Stored Procedures should work in diff --git a/mysql-test/t/query_cache.test b/mysql-test/t/query_cache.test index d6e73cbc88d..993f231759b 100644 --- a/mysql-test/t/query_cache.test +++ b/mysql-test/t/query_cache.test @@ -940,9 +940,9 @@ set global query_cache_size=0; create table t1 (a int); insert into t1 values (1),(2),(3); set GLOBAL query_cache_type=1; -set GLOBAL query_cache_limit=10000; +set GLOBAL query_cache_limit=10240; set GLOBAL query_cache_min_res_unit=0; -set GLOBAL query_cache_size= 100000; +set GLOBAL query_cache_size= 102400; # default_week_format reset query cache; @@ -1010,7 +1010,7 @@ set GLOBAL query_cache_size= default; # Bug#28897 UUID() returns non-unique values when query cache is enabled # -set GLOBAL query_cache_size=1000000; +set GLOBAL query_cache_size=1024000; create table t1 (a char); insert into t1 values ('c'); @@ -1179,7 +1179,7 @@ SET GLOBAL query_cache_size= default; --echo # --echo # Bug#25132 disabled query cache: Qcache_free_blocks = 1 --echo # -set global query_cache_size=100000; +set global query_cache_size=102400; set global query_cache_size=0; set global query_cache_type=0; show status like 'Qcache_free_blocks'; diff --git a/mysql-test/t/select_safe.test b/mysql-test/t/select_safe.test index 481779e76d7..cca736d4c1d 100644 --- a/mysql-test/t/select_safe.test +++ b/mysql-test/t/select_safe.test @@ -6,7 +6,7 @@ drop table if exists t1; --enable_warnings -SET SQL_SAFE_UPDATES=1,SQL_SELECT_LIMIT=4, SQL_MAX_JOIN_SIZE=9; +SET SQL_SAFE_UPDATES=1,SQL_SELECT_LIMIT=4, MAX_JOIN_SIZE=9; create table t1 (a int auto_increment primary key, b char(20)); insert into t1 values(1,"test"); SELECT SQL_BUFFER_RESULT * from t1; @@ -85,6 +85,6 @@ set local max_join_size=1; select * from (select 1 union select 2 union select 3) x; drop table t1; -SET SQL_SAFE_UPDATES=0,SQL_SELECT_LIMIT=DEFAULT, SQL_MAX_JOIN_SIZE=DEFAULT; +SET SQL_SAFE_UPDATES=0,SQL_SELECT_LIMIT=DEFAULT, MAX_JOIN_SIZE=DEFAULT; # End of 4.1 tests diff --git a/mysql-test/t/show_check.test b/mysql-test/t/show_check.test index 9d80650da2f..4f98b8b5128 100644 --- a/mysql-test/t/show_check.test +++ b/mysql-test/t/show_check.test @@ -903,7 +903,7 @@ CREATE TABLE t1(1 INT); --echo --echo ---> Dumping mysqltest1 to outfile1 ---exec $MYSQL_DUMP --default-character-set=latin1 --character-sets-dir=$CHARSETSDIR --databases mysqltest1 > $outfile1 +--exec $MYSQL_DUMP --default-character-set=latin1 --character-sets-dir=$MYSQL_SHAREDIR/charsets --databases mysqltest1 > $outfile1 # - Clean mysqltest1; diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test index e314e2419be..db4d57649d8 100644 --- a/mysql-test/t/sp.test +++ b/mysql-test/t/sp.test @@ -3748,7 +3748,7 @@ begin end| set @qcs1 = @@query_cache_size| -set global query_cache_size = 100000| +set global query_cache_size = 102400| set @x = 1| insert into t1 values ("qc", 42)| select bug9902() from t1| @@ -8204,14 +8204,13 @@ DROP FUNCTION f1; drop procedure if exists p; --enable_warnings set @old_mode= @@sql_mode; -set @@sql_mode= pow(2,32)-1; +set @@sql_mode= cast(pow(2,32)-1 as unsigned integer); select @@sql_mode into @full_mode; create procedure p() begin end; call p(); -select @@sql_mode; set @@sql_mode= @old_mode; # Rename SQL modes that differ in name between the server and the table definition. -select replace(@full_mode, '?', 'NOT_USED') into @full_mode; +select replace(@full_mode, ',,,', ',NOT_USED,') into @full_mode; select replace(@full_mode, 'ALLOW_INVALID_DATES', 'INVALID_DATES') into @full_mode; select name from mysql.proc where name = 'p' and sql_mode = @full_mode; drop procedure p; diff --git a/mysql-test/t/sp_trans.test b/mysql-test/t/sp_trans.test index bd465a1a09b..db04f96154d 100644 --- a/mysql-test/t/sp_trans.test +++ b/mysql-test/t/sp_trans.test @@ -5,6 +5,10 @@ -- source include/have_log_bin.inc -- source include/have_innodb.inc +disable_query_log; +call mtr.add_suppression("Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT"); +enable_query_log; + --disable_warnings drop table if exists t1, t2, t3; --enable_warnings @@ -527,7 +531,9 @@ begin select count(*)*255 from t3 into table_size; until table_size > max_table_size*2 end repeat; end| +--disable_warnings call bug14210_fill_table()| +--enable_warnings drop procedure bug14210_fill_table| create table t4 like t3| diff --git a/mysql-test/t/subselect3.test b/mysql-test/t/subselect3.test index fab0a462157..39c97941031 100644 --- a/mysql-test/t/subselect3.test +++ b/mysql-test/t/subselect3.test @@ -794,3 +794,50 @@ SHOW STATUS LIKE '%Handler_read_rnd_next'; DROP TABLE t1,t2; --echo End of 5.1 tests + +--echo # +--echo # BUG#48920: COUNT DISTINCT returns 1 for NULL values when in a subquery +--echo # in the select list +--echo # + +--echo +CREATE TABLE t1 ( + i int(11) DEFAULT NULL, + v varchar(1) DEFAULT NULL +); + +--echo +INSERT INTO t1 VALUES (8,'v'); +INSERT INTO t1 VALUES (9,'r'); +INSERT INTO t1 VALUES (NULL,'y'); + +--echo +CREATE TABLE t2 ( + i int(11) DEFAULT NULL, + v varchar(1) DEFAULT NULL, + KEY i_key (i) +); + +--echo +INSERT INTO t2 VALUES (NULL,'r'); +INSERT INTO t2 VALUES (0,'c'); +INSERT INTO t2 VALUES (0,'o'); +INSERT INTO t2 VALUES (2,'v'); +INSERT INTO t2 VALUES (7,'c'); + +--echo +SELECT i, v, (SELECT COUNT(DISTINCT i) + FROM t1 + WHERE v = t2.v) as subsel +FROM t2; + +--echo +EXPLAIN EXTENDED +SELECT i, v, (SELECT COUNT(DISTINCT i) + FROM t1 + WHERE v = t2.v) as subsel +FROM t2; + +DROP TABLE t1,t2; + +--echo End of 5.6 tests diff --git a/mysql-test/t/type_decimal.test b/mysql-test/t/type_decimal.test index dfe36ed0905..5d9a2aaa5f4 100644 --- a/mysql-test/t/type_decimal.test +++ b/mysql-test/t/type_decimal.test @@ -410,6 +410,18 @@ SELECT ROUND(qty,3), dps, ROUND(qty,dps) FROM t1; DROP TABLE t1; # +# Bug #24541: "Data truncated..." on decimal type columns without any good reason +# + +create table t1 (c1 decimal(10,6)); +insert into t1 (c1) values (9.99e-4); +insert into t1 (c1) values (9.98e-4); +insert into t1 (c1) values (0.000999); +insert into t1 (c1) values (cast(9.99e-4 as decimal(10,6))); +select * from t1; +drop table t1; + +# # Bug#31019: MOD() function and operator crashes MySQL when # divisor is very long and < 1 # diff --git a/mysql-test/t/type_float.test b/mysql-test/t/type_float.test index 3b7b30db6f8..45cf80aab5c 100644 --- a/mysql-test/t/type_float.test +++ b/mysql-test/t/type_float.test @@ -7,7 +7,7 @@ drop table if exists t1,t2; --enable_warnings SELECT 10,10.0,10.,.1e+2,100.0e-1; -SELECT 6e-05, -6e-05, --6e-05, -6e-05+1.000000; +SELECT 6e-16, -6e-16, --6e-16, -6e-16+1.000000; SELECT 1e1,1.e1,1.0e1,1e+1,1.e+1,1.0e+1,1e-1,1.e-1,1.0e-1; SELECT 0.001e+1,0.001e-1, -0.001e+01,-0.001e-01; SELECT 123.23E+02,-123.23E-02,"123.23E+02"+0.0,"-123.23E-02"+0.0; @@ -252,6 +252,37 @@ insert into t1 values (2e30), (-2e30); select f1 + 0e0 from t1; drop table t1; +# +# Bug #12860 "Difference in zero padding of exponent between Unix and Windows" +# + +create table t1 (c char(6)); +insert into t1 values (2e6),(2e-5); +select * from t1; +drop table t1; + +# +# Bug #21497 "DOUBLE truncated to unusable value" +# + +CREATE TABLE d1 (d DOUBLE); +INSERT INTO d1 VALUES (1.7976931348623157E+308); +SELECT * FROM d1; +--error ER_ILLEGAL_VALUE_FOR_TYPE +INSERT INTO d1 VALUES (1.79769313486232e+308); +SELECT * FROM d1; +DROP TABLE d1; + +# +# Bug #26788 "mysqld (debug) aborts when inserting specific numbers into char +# fields" +# + +create table t1 (a char(20)); +insert into t1 values (1.225e-05); +select a+0 from t1; +drop table t1; + # # Bug #27483: Casting 'scientific notation type' to 'unsigned bigint' fails on # windows. diff --git a/mysql-test/t/type_newdecimal.test b/mysql-test/t/type_newdecimal.test index 2cf7ab8fbdf..8af9d4c263e 100644 --- a/mysql-test/t/type_newdecimal.test +++ b/mysql-test/t/type_newdecimal.test @@ -1054,10 +1054,8 @@ while ($max_power) } SELECT my_float, my_double, my_varchar FROM t1; -# Expected result 0.000000000011754943372854760000 -# On windows we get 0.000000000011754943372854770000 -# use replace_result to correct it ---replace_result 0.000000000011754943372854770000 0.000000000011754943372854760000 +# The following statement produces results with garbage past +# the significant digits. Improving it is a part of the WL#3977. SELECT CAST(my_float AS DECIMAL(65,30)), my_float FROM t1; SELECT CAST(my_double AS DECIMAL(65,30)), my_double FROM t1; SELECT CAST(my_varchar AS DECIMAL(65,30)), my_varchar FROM t1; diff --git a/mysql-test/t/user_limits.test b/mysql-test/t/user_limits.test index 41af032b97e..1bf3f9a3103 100644 --- a/mysql-test/t/user_limits.test +++ b/mysql-test/t/user_limits.test @@ -132,7 +132,7 @@ drop user mysqltest_1@localhost; select @@session.max_user_connections, @@global.max_user_connections; # Local max_user_connections variable can't be set directly # since this limit is per-account ---error ER_GLOBAL_VARIABLE +--error ER_VARIABLE_IS_READONLY set session max_user_connections= 2; # But it is ok to set global max_user_connections set global max_user_connections= 2; diff --git a/mysql-test/t/user_var.test b/mysql-test/t/user_var.test index c0740458a88..19c70c76139 100644 --- a/mysql-test/t/user_var.test +++ b/mysql-test/t/user_var.test @@ -122,8 +122,6 @@ select coercibility(@v1),coercibility(@v2),coercibility(@v3),coercibility(@v4); # --error 1064 set session @honk=99; ---error 1382 -set one_shot @honk=99; # # Bug #10724 @@local not preserved in column name of select diff --git a/mysql-test/t/variables.test b/mysql-test/t/variables.test index 2252577926c..d4b88fc6f9c 100644 --- a/mysql-test/t/variables.test +++ b/mysql-test/t/variables.test @@ -33,7 +33,7 @@ set @my_query_cache_type =@@global.query_cache_type; set @my_rpl_recovery_rank =@@global.rpl_recovery_rank; set @my_server_id =@@global.server_id; set @my_slow_launch_time =@@global.slow_launch_time; -set @my_storage_engine =@@global.storage_engine; +set @my_storage_engine =@@global.default_storage_engine; set @my_thread_cache_size =@@global.thread_cache_size; set @my_max_allowed_packet =@@global.max_allowed_packet; set @my_join_buffer_size =@@global.join_buffer_size; @@ -132,12 +132,12 @@ set global timed_mutexes=0; show variables like 'timed_mutexes'; select * from information_schema.session_variables where variable_name like 'timed_mutexes'; -set storage_engine=MYISAM, storage_engine="HEAP", global storage_engine="MERGE"; -show local variables like 'storage_engine'; -select * from information_schema.session_variables where variable_name like 'storage_engine'; -show global variables like 'storage_engine'; -select * from information_schema.global_variables where variable_name like 'storage_engine'; -set GLOBAL query_cache_size=100000; +set default_storage_engine=MYISAM, default_storage_engine="HEAP", global default_storage_engine="MERGE"; +show local variables like 'default_storage_engine'; +select * from information_schema.session_variables where variable_name like 'default_storage_engine'; +show global variables like 'default_storage_engine'; +select * from information_schema.global_variables where variable_name like 'default_storage_engine'; +set GLOBAL query_cache_size=102400; set GLOBAL myisam_max_sort_file_size=2000000; show global variables like 'myisam_max_sort_file_size'; @@ -213,7 +213,6 @@ set @@query_alloc_block_size=1024*17+2; set @@query_prealloc_size=1024*18-1023; set @@transaction_alloc_block_size=1024*20-1; set @@transaction_prealloc_size=1024*21-1; -select @@query_alloc_block_size; --echo ==+ Check manipulated values ==+ SHOW VARIABLES WHERE variable_name IN ('range_alloc_block_size', 'query_alloc_block_size', 'query_prealloc_size', @@ -250,14 +249,12 @@ set unknown_variable=1; --error ER_WRONG_TYPE_FOR_VAR set max_join_size="hello"; --error ER_UNKNOWN_STORAGE_ENGINE -set storage_engine=UNKNOWN_TABLE_TYPE; +set default_storage_engine=UNKNOWN_TABLE_TYPE; --error ER_WRONG_VALUE_FOR_VAR -set storage_engine=MERGE, big_tables=2; -show local variables like 'storage_engine'; +set default_storage_engine=MERGE, big_tables=2; +show local variables like 'default_storage_engine'; --error ER_GLOBAL_VARIABLE set SESSION query_cache_size=10000; ---error ER_NO_DEFAULT -set GLOBAL storage_engine=DEFAULT; --error ER_UNKNOWN_CHARACTER_SET set character_set_client=UNKNOWN_CHARACTER_SET; --error ER_UNKNOWN_COLLATION @@ -266,18 +263,12 @@ set collation_connection=UNKNOWN_COLLATION; set character_set_client=NULL; --error ER_WRONG_VALUE_FOR_VAR set collation_connection=NULL; ---error ER_LOCAL_VARIABLE -set global autocommit=1; --error ER_INCORRECT_GLOBAL_LOCAL_VAR select @@global.timestamp; --error ER_INCORRECT_GLOBAL_LOCAL_VAR set @@version=''; --error ER_GLOBAL_VARIABLE set @@concurrent_insert=1; ---error ER_LOCAL_VARIABLE -set @@global.sql_auto_is_null=1; ---error ER_INCORRECT_GLOBAL_LOCAL_VAR -select @@global.sql_auto_is_null; --error ER_GLOBAL_VARIABLE set myisam_max_sort_file_size=100; --error ER_WRONG_VALUE_FOR_VAR @@ -357,8 +348,6 @@ set sql_log_bin=1; set sql_log_off=1; set sql_log_update=1; set sql_low_priority_updates=1; -set sql_max_join_size=200; -select @@sql_max_join_size,@@max_join_size; set sql_quote_show_create=1; set sql_safe_updates=1; set sql_select_limit=1; @@ -366,7 +355,7 @@ set sql_select_limit=1; set sql_select_limit=default; set sql_warnings=1; set global table_open_cache=100; -set storage_engine=myisam; +set default_storage_engine=myisam; set global thread_cache_size=100; set timestamp=1, timestamp=default; set tmp_table_size=100; @@ -832,7 +821,7 @@ set global query_cache_type =@my_query_cache_type; set global rpl_recovery_rank =@my_rpl_recovery_rank; set global server_id =@my_server_id; set global slow_launch_time =@my_slow_launch_time; -set global storage_engine =@my_storage_engine; +set global default_storage_engine =@my_storage_engine; set global thread_cache_size =@my_thread_cache_size; set global max_allowed_packet =@my_max_allowed_packet; set global join_buffer_size =@my_join_buffer_size; @@ -1187,7 +1176,7 @@ SET GLOBAL auto_increment_offset=0; # --enable_metadata -select @@storage_engine; +select @@default_storage_engine; --disable_metadata # |