diff options
Diffstat (limited to 'mysql-test/t')
36 files changed, 242 insertions, 211 deletions
diff --git a/mysql-test/t/archive.test b/mysql-test/t/archive.test index 50668392aa9..5de34ec6db8 100644 --- a/mysql-test/t/archive.test +++ b/mysql-test/t/archive.test @@ -1617,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..edcc54fa428 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 +--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/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, TR蹺, TR蹺 # 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='TR蹺'; --error ER_WRONG_VALUE_FOR_VAR -SET sql_quote_show_create=TR.E; +SET sql_quote_show_create=TR蹺; 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/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/mysqld--help-notwin.test b/mysql-test/t/mysqld--help-notwin.test new file mode 100644 index 00000000000..6db5dd830a6 --- /dev/null +++ b/mysql-test/t/mysqld--help-notwin.test @@ -0,0 +1,8 @@ +# +# mysqld --help +# +--source include/not_embedded.inc +--source include/not_windows.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..416beb1d34c --- /dev/null +++ b/mysql-test/t/mysqld--help-win.test @@ -0,0 +1,8 @@ +# +# mysqld --help +# +--source include/not_embedded.inc +--source include/windows.inc + +--source include/mysqld--help.inc + diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test index 83bace15305..7be8244a85b 100644 --- a/mysql-test/t/mysqldump.test +++ b/mysql-test/t/mysqldump.test @@ -49,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; @@ -171,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 ] @@ -181,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 # @@ -1681,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; @@ -1845,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. @@ -1931,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 @@ -2087,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 ################################################## @@ -2100,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 ################################################## @@ -2113,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 ################################################## @@ -2126,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/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_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/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/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 # |