diff options
author | Luis Soares <luis.soares@sun.com> | 2009-01-23 13:22:05 +0100 |
---|---|---|
committer | Luis Soares <luis.soares@sun.com> | 2009-01-23 13:22:05 +0100 |
commit | df8543868db346fcddad5dad356fb70bdaa679d7 (patch) | |
tree | 62fe82ffb4b2f249d2e0c6686acb8c060ed5f0bd /mysql-test | |
parent | bb42e1ab05f9ebe166524d7d8a25c55a69e65dfa (diff) | |
parent | aec81abb3b127e9a6c68bfe9562fd3d7cd385e0b (diff) | |
download | mariadb-git-df8543868db346fcddad5dad356fb70bdaa679d7.tar.gz |
merge: 5.1 -> 5.1-rpl
conflicts:
Text conflict in client/mysqltest.cc
Text conflict in mysql-test/include/wait_until_connected_again.inc
Text conflict in mysql-test/lib/mtr_report.pm
Text conflict in mysql-test/mysql-test-run.pl
Text conflict in mysql-test/r/events_bugs.result
Text conflict in mysql-test/r/log_state.result
Text conflict in mysql-test/r/myisam_data_pointer_size_func.result
Text conflict in mysql-test/r/mysqlcheck.result
Text conflict in mysql-test/r/query_cache.result
Text conflict in mysql-test/r/status.result
Text conflict in mysql-test/suite/binlog/r/binlog_index.result
Text conflict in mysql-test/suite/binlog/r/binlog_innodb.result
Text conflict in mysql-test/suite/rpl/r/rpl_packet.result
Text conflict in mysql-test/suite/rpl/t/rpl_packet.test
Text conflict in mysql-test/t/disabled.def
Text conflict in mysql-test/t/events_bugs.test
Text conflict in mysql-test/t/log_state.test
Text conflict in mysql-test/t/myisam_data_pointer_size_func.test
Text conflict in mysql-test/t/mysqlcheck.test
Text conflict in mysql-test/t/query_cache.test
Text conflict in mysql-test/t/rpl_init_slave_func.test
Text conflict in mysql-test/t/status.test
Diffstat (limited to 'mysql-test')
169 files changed, 4495 insertions, 3002 deletions
diff --git a/mysql-test/extra/binlog_tests/database.test b/mysql-test/extra/binlog_tests/database.test index 2e445f98adf..326ecedb60e 100644 --- a/mysql-test/extra/binlog_tests/database.test +++ b/mysql-test/extra/binlog_tests/database.test @@ -28,3 +28,5 @@ enable_warnings; insert into t1 values (1); drop table tt1, t1; source include/show_binlog_events.inc; + +FLUSH STATUS; diff --git a/mysql-test/extra/rpl_tests/rpl_auto_increment.test b/mysql-test/extra/rpl_tests/rpl_auto_increment.test index 1fa3cf034f6..24448a38408 100644 --- a/mysql-test/extra/rpl_tests/rpl_auto_increment.test +++ b/mysql-test/extra/rpl_tests/rpl_auto_increment.test @@ -145,6 +145,23 @@ select * from t3 order by a; connection master; drop table t1,t2,t3; +sync_slave_with_master; + +# +# BUG#41986 Replication slave does not pick up proper AUTO_INCREMENT value for Innodb tables +# +connection master; +set auto_increment_increment=1; +set auto_increment_offset=1; +CREATE TABLE t1 (id MEDIUMINT NOT NULL AUTO_INCREMENT PRIMARY KEY) ENGINE=innodb; +INSERT INTO t1 VALUES (NULL), (NULL), (NULL); +show create table t1; + +sync_slave_with_master; +show create table t1; + +connection master; +drop table t1; # End cleanup sync_slave_with_master; diff --git a/mysql-test/include/check_events_off.inc b/mysql-test/include/check_events_off.inc new file mode 100644 index 00000000000..599a4b9e504 --- /dev/null +++ b/mysql-test/include/check_events_off.inc @@ -0,0 +1,31 @@ +########## include/check_events_off.inc #################################### +# # +# Purpose: # +# Wait till we can expect that we have no event activity till the scheduler is # +# switched on again. # +# = There will be no modifications of user tables by existing events # +# except they use "INSERT DELAYED" or the server system variable # +# "concurrent_inserts" is not switched off. # +# Only some storage engines support concurrent_inserts" or "INSERT DELAYED". # +# # +# Creation: # +# 2008-12-19 mleich Implement this check needed for bug fixes in tests # +# # +################################################################################ + +# 1. Check that the server system variable shows the state needed +if (`SELECT @@global.event_scheduler <> 'OFF'`) +{ + --echo # Error: We expect here that the event scheduler is switched off. + SELECT @@global.event_scheduler; + --echo # Thinkable reasons: + --echo # 1. SET GLOBAL event_scheduler = OFF had not the expected effect. + --echo # 2. Use of the current routine (include/check_events_off.inc) + --echo # within the wrong situation + --die +} +# 2. Wait till we have no event_scheduler session within the processlist +--source include/no_running_event_scheduler.inc +# 3. Wait till we have no event executor sessions within the processlist +--source include/no_running_events.inc + diff --git a/mysql-test/include/cleanup_fake_relay_log.inc b/mysql-test/include/cleanup_fake_relay_log.inc new file mode 100644 index 00000000000..43aa46cb657 --- /dev/null +++ b/mysql-test/include/cleanup_fake_relay_log.inc @@ -0,0 +1,16 @@ +# ==== Purpose ==== +# +# Clean up files create by setup_fake_relay_log.inc. +# +# ==== Usage ==== +# +# See setup_fake_relay_log.inc + +--echo Cleaning up after setup_fake_relay_log.inc + +# Remove files. +remove_file $_fake_relay_log; +remove_file $_fake_relay_index; +--disable_query_log +eval SET @@global.relay_log_purge= $_fake_relay_log_purge; +--enable_query_log diff --git a/mysql-test/include/commit.inc b/mysql-test/include/commit.inc index a7af3bf574f..a4e7d9ae601 100644 --- a/mysql-test/include/commit.inc +++ b/mysql-test/include/commit.inc @@ -617,10 +617,10 @@ call p_verify_status_increment(0, 0, 0, 0); --echo --echo # No test because of Bug#8729 "rename table fails on temporary table" ---echo # 24. DDL: TRUNCATE TEMPORARY TABLE, does not start a transaction +--echo # 24. DDL: TRUNCATE TEMPORARY TABLE --echo truncate table t2; -call p_verify_status_increment(2, 0, 2, 0); +call p_verify_status_increment(4, 0, 4, 0); commit; --echo # There is nothing left to commit call p_verify_status_increment(0, 0, 0, 0); @@ -671,8 +671,11 @@ call p_verify_status_increment(2, 2, 2, 2); savepoint a; call p_verify_status_increment(0, 0, 0, 0); insert t1 set a=4; ---echo # Sic: a bug. Binlog did not register itself this time. -call p_verify_status_increment(1, 0, 1, 0); +--echo # Binlog does not register itself this time for other than the 1st +--echo # statement of the transaction with MIXED/STATEMENT binlog_format. +--echo # It needs registering with the ROW format. Therefore 1,0,2,2 are +--echo # the correct arguments to this test after bug#40221 fixed. +call p_verify_status_increment(1, 0, 2, 2); release savepoint a; rollback; call p_verify_status_increment(0, 0, 0, 0); @@ -730,7 +733,7 @@ call p_verify_status_increment(1, 0, 1, 0); rename table t4 to t3; call p_verify_status_increment(1, 0, 1, 0); truncate table t3; -call p_verify_status_increment(2, 2, 2, 2); +call p_verify_status_increment(4, 4, 4, 4); create view v1 as select * from t2; call p_verify_status_increment(1, 0, 1, 0); check table t1; diff --git a/mysql-test/include/have_32bit.inc b/mysql-test/include/have_32bit.inc index b09a813967d..66684fb5325 100644 --- a/mysql-test/include/have_32bit.inc +++ b/mysql-test/include/have_32bit.inc @@ -11,6 +11,6 @@ eval SET @@global.sort_buffer_size = $save; --enable_query_log if (!$mach32) { - skip Need a 32 bit machine; + skip Need a 32 bit machine/binary; } diff --git a/mysql-test/include/have_64bit.inc b/mysql-test/include/have_64bit.inc index 31529a0c9d4..cbba5e1d338 100644 --- a/mysql-test/include/have_64bit.inc +++ b/mysql-test/include/have_64bit.inc @@ -9,6 +9,6 @@ eval SET @@session.sort_buffer_size = $save; --enable_query_log if (!$mach64) { - skip Need a 64 bit machine; + skip Need a 64 binary ; } diff --git a/mysql-test/include/have_simple_parser.inc b/mysql-test/include/have_simple_parser.inc new file mode 100644 index 00000000000..c85786bd524 --- /dev/null +++ b/mysql-test/include/have_simple_parser.inc @@ -0,0 +1,16 @@ +# +# Check if server has support for loading udf's +# i.e it will support dlopen +# +--require r/have_dynamic_loading.require +disable_query_log; +show variables like 'have_dynamic_loading'; +enable_query_log; + +# +# Check if the variable SIMPLE_PARSER is set +# +--require r/have_simple_parser.require +disable_query_log; +eval select LENGTH('$SIMPLE_PARSER') > 0 as 'have_simple_parser'; +enable_query_log; diff --git a/mysql-test/include/index_merge1.inc b/mysql-test/include/index_merge1.inc index 023d582065e..5837df67a75 100644 --- a/mysql-test/include/index_merge1.inc +++ b/mysql-test/include/index_merge1.inc @@ -501,4 +501,30 @@ SELECT b,a from t1 WHERE (b!='c' AND b!='f' && b!='h') OR DROP TABLE t1; +--echo # +--echo # BUG#40974: Incorrect query results when using clause evaluated using range check +--echo # +create table t0 (a int); +insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); + +create table t1 (a int); +insert into t1 values (1),(2); +create table t2(a int, b int); +insert into t2 values (1,1), (2, 1000); +create table t3 (a int, b int, filler char(100), key(a), key(b)); + +insert into t3 select 1000, 1000,'filler' from t0 A, t0 B, t0 C; +insert into t3 values (1,1,'data'); +insert into t3 values (1,1,'data'); +-- echo The plan should be ALL/ALL/ALL(Range checked for each record (index map: 0x3) +explain select * from t1 +where exists (select 1 from t2, t3 + where t2.a=t1.a and (t3.a=t2.b or t3.b=t2.b or t3.b=t2.b+1)); + +select * from t1 +where exists (select 1 from t2, t3 + where t2.a=t1.a and (t3.a=t2.b or t3.b=t2.b or t3.b=t2.b+1)); + +drop table t0, t1, t2, t3; + --echo End of 5.0 tests diff --git a/mysql-test/include/linux_sys_vars.inc b/mysql-test/include/linux_sys_vars.inc index 4401a1e057a..85d7c6df7dc 100644 --- a/mysql-test/include/linux_sys_vars.inc +++ b/mysql-test/include/linux_sys_vars.inc @@ -9,7 +9,6 @@ SET @min_flush_time = 0; #SET @max_flush_time = 0; SET @default_key_buffer_size = 131072; -SET @min_key_buffer_size = 36; #SET @default_join_buffer_size = 131072; #SET @min_join_buffer_size = 8200; diff --git a/mysql-test/include/no_running_event_scheduler.inc b/mysql-test/include/no_running_event_scheduler.inc new file mode 100644 index 00000000000..92813df9f96 --- /dev/null +++ b/mysql-test/include/no_running_event_scheduler.inc @@ -0,0 +1,23 @@ +########## include/no_running_event_scheduler.inc ########################## +# # +# Wait till the event scheduler disappeared from processlist. # +# # +# The characteristics of the event_scheduler entry within the processlist is # +# user = 'event_scheduler' and command = 'Daemon'. I am not 100% sure if # +# ther is no short phase with command <> 'Daemon'. # +# A query with WHERE user = 'event_scheduler' only will also catch events in # +# startup phase. This is no problem since this phase is very short. # +# # +# A wait_timeout of >= 3 seconds was within experiments sufficient even on a # +# testing box with heavy parallel load. Therefore 5 seconds should be enough. # +# # +# Creation: # +# 2008-12-19 mleich Implement this check needed for test bug fixes # +# # +################################################################################ + +let $wait_timeout= 5; +let $wait_condition= + SELECT COUNT(*) = 0 FROM information_schema.processlist + WHERE user = 'event_scheduler'; +--source include/wait_condition.inc diff --git a/mysql-test/include/no_running_events.inc b/mysql-test/include/no_running_events.inc new file mode 100644 index 00000000000..8090b2706b8 --- /dev/null +++ b/mysql-test/include/no_running_events.inc @@ -0,0 +1,25 @@ +########## include/no_running_events.inc ################################### +# # +# Wait till all event executors have finished their work. # +# # +# Different event executors share the characteristics that their entry within # +# processlist contains command = 'Connect'. # +# Of course the corresponding query will also catch other connections being # +# within the connect phase. This is no problem since the connect phase is # +# usually very short. # +# # +# A wait_timeout of >= 3 seconds was during experiments in case of "simple" # +# SQL commands sufficient even on a testing box with heavy parallel load. # +# "simple" = no sleeps, no long running commands, no waiting for lock ... # +# We use here the default of 30 seconds because this wastes some time only in # +# case of unexpected situations. # +# # +# Creation: # +# 2008-12-19 mleich Implement this check needed for test bug fixes # +# # +################################################################################ + +let $wait_condition= + SELECT COUNT(*) = 0 FROM information_schema.processlist + WHERE command = 'Connect'; +--source include/wait_condition.inc diff --git a/mysql-test/include/running_event_scheduler.inc b/mysql-test/include/running_event_scheduler.inc new file mode 100644 index 00000000000..296bf842e82 --- /dev/null +++ b/mysql-test/include/running_event_scheduler.inc @@ -0,0 +1,30 @@ +############# include/running_event_scheduler.inc ########################## +# # +# Wait till the event scheduler reached its final state within the processlist.# +# # +# The characteristics of the event_scheduler entry within the processlist is # +# user = 'event_scheduler' and command = 'Daemon'. I am not 100% sure if # +# ther is no short phase with command <> 'Daemon'. # +# A query with WHERE user = 'event_scheduler' only will also catch events in # +# startup phase. # +# # +# Creation: # +# 2008-12-19 mleich Implement this check needed for test bug fixes # +# # +################################################################################ + +# 1. Check that the server system variable shows the state needed +if (`SELECT @@global.event_scheduler <> 'ON'`) +{ + --echo # Error: We expect here that the event scheduler is switched on. + SELECT @@global.event_scheduler; + --echo # Thinkable reasons: + --echo # 1. SET GLOBAL event_scheduler = ON had not the expected effect. + --echo # 2. Use of the current routine (include/running_event_scheduler.inc) + --echo # within the wrong situation + --die +} +let $wait_condition= + SELECT COUNT(*) = 1 FROM information_schema.processlist + WHERE user = 'event_scheduler' AND command = 'Daemon'; +--source include/wait_condition.inc diff --git a/mysql-test/include/setup_fake_relay_log.inc b/mysql-test/include/setup_fake_relay_log.inc new file mode 100644 index 00000000000..8113ed6dc10 --- /dev/null +++ b/mysql-test/include/setup_fake_relay_log.inc @@ -0,0 +1,78 @@ +# ==== Purpose ==== +# +# Setup replication from an existing relay log in the current +# connection. +# +# ==== Usage ==== +# +# Make sure the slave is not running and issue: +# +# let $fake_relay_log= /path/to/fake-relay-log-file.000001 +# source include/setup_fake_relay_log.inc; +# START SLAVE SQL_THREAD; # setup_fake_relay_log doesn't start slave +# ... +# source include/cleanup_fake_relay_log.inc +# +# You must run the server with --relay-log=FILE. You probably want to +# run with --replicate-same-server-id too. +# +# ==== Implementation ==== +# +# First makes a sanity check, ensuring that the slave threads are not +# running. Then copies the $fake_relay_log to RELAY_BIN-fake.000001, +# where RELAY_BIN is the basename of the relay log, and updates +# RELAY_BIN.index. Finally issues CHANGE MASTER so that it uses the +# given files. +# +# ==== Side effects ==== +# +# Creates a binlog file and a binlog index file, and sets +# @@global.relay_log_purge=1. All this is restored when you call +# cleanup_fake_relay_log.inc. +# +# Enables the query log. + + +--disable_query_log + +# Print message. +let $_fake_relay_log_printable= `SELECT REPLACE('$fake_relay_log', '$MYSQL_TEST_DIR', 'MYSQL_TEST_DIR')`; +--echo Setting up fake replication from $_fake_relay_log_printable + +# Sanity check. +let $_sql_running= query_get_value(SHOW SLAVE STATUS, Slave_SQL_Running, 1); +let $_io_running= query_get_value(SHOW SLAVE STATUS, Slave_IO_Running, 1); +if (`SELECT "$_sql_running" = "Yes" OR "$_io_running" = "Yes"`) { + --echo Error: Slave was running when test case sourced + --echo include/setup_fake_replication.inc + --echo Slave_IO_Running = $_io_running; Slave_SQL_Running = $_sql_running + --echo Printing some debug info: + SHOW SLAVE STATUS; + SHOW MASTER STATUS; + SHOW BINLOG EVENTS; + SHOW PROCESSLIST; +} + +# Read server variables. +let $MYSQLD_DATADIR= `SELECT @@datadir`; +let $_fake_filename= query_get_value(SHOW VARIABLES LIKE 'relay_log', Value, 1); +if (`SELECT '$_fake_filename' = ''`) { + --echo Badly written test case: relay_log variable is empty. Please use the + --echo server option --relay-log=FILE. +} +let $_fake_relay_log= $MYSQLD_DATADIR/$_fake_filename-fake.000001; +let $_fake_relay_index= $MYSQLD_DATADIR/$_fake_filename.index; +# Need to restore relay_log_purge in cleanup_fake_relay_log.inc, since +# CHANGE MASTER modifies it (see the manual for CHANGE MASTER). +let $_fake_relay_log_purge= `SELECT @@global.relay_log_purge`; + +# Create relay log file. +copy_file $fake_relay_log $_fake_relay_log; + +# Create relay log index. +eval SELECT '$_fake_relay_log' INTO OUTFILE '$_fake_relay_index'; + +# Setup replication from existing relay log. +eval CHANGE MASTER TO MASTER_HOST='dummy.localdomain', RELAY_LOG_FILE='$_fake_relay_log', RELAY_LOG_POS=4; + +--enable_query_log diff --git a/mysql-test/include/wait_condition_sp.inc b/mysql-test/include/wait_condition_sp.inc new file mode 100644 index 00000000000..66301da557c --- /dev/null +++ b/mysql-test/include/wait_condition_sp.inc @@ -0,0 +1,62 @@ +# include/wait_condition.inc +# +# SUMMARY +# +# Waits until the passed statement returns true, or the operation +# times out. +# +# USAGE +# +# let $wait_condition= +# SELECT c = 3 FROM t; +# --source include/wait_condition.inc +# +# OR +# +# let $wait_timeout= 60; # Override default 30 seconds with 60. +# let $wait_condition= +# SELECT c = 3 FROM t; +# --source include/wait_condition.inc +# --echo Executed the test condition $wait_condition_reps times +# +# EXAMPLE +# events_bugs.test, events_time_zone.test +# + +--disable_query_log + +let $wait_counter= 300; +if ($wait_timeout) +{ + let $wait_counter= `SELECT $wait_timeout * 10`; +} +# Reset $wait_timeout so that its value won't be used on subsequent +# calls, and default will be used instead. +let $wait_timeout= 0; + +# Keep track of how many times the wait condition is tested +# This is used by some tests (e.g., main.status) +let $wait_condition_reps= 0; +while ($wait_counter) +{ + let $success= `$wait_condition`; + inc $wait_condition_reps; + if ($success) + { + let $wait_counter= 0; + } + if (!$success) + { + real_sleep 0.1; + dec $wait_counter; + } +} +if (!$success) +{ + echo Timeout in wait_condition.inc for $wait_condition; + show master status; + show slave status; +} + +--enable_query_log + diff --git a/mysql-test/include/windows_sys_vars.inc b/mysql-test/include/windows_sys_vars.inc index 90ff86fefd1..1d51ddb52f9 100644 --- a/mysql-test/include/windows_sys_vars.inc +++ b/mysql-test/include/windows_sys_vars.inc @@ -9,7 +9,6 @@ SET @min_flush_time = 0; #SET @max_flush_time = 0; SET @default_key_buffer_size= 131072; -SET @min_key_buffer_size= 8; #SET @default_join_buffer_size = 131072; #SET @min_join_buffer_size = 8200; diff --git a/mysql-test/lib/mtr_report.pm b/mysql-test/lib/mtr_report.pm index 3e2ef4e09ef..5ed56a23446 100644 --- a/mysql-test/lib/mtr_report.pm +++ b/mysql-test/lib/mtr_report.pm @@ -260,7 +260,7 @@ sub mtr_report_stats ($) { { mtr_warning("Got errors/warnings while running tests, please examine", "'$warnlog' for details."); - } + } print "\n"; diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index cdb1352e7f6..9880dd19f65 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -119,7 +119,6 @@ my $DEFAULT_SUITES= "main,binlog,federated,rpl,rpl_ndb,ndb"; my $opt_suites; our $opt_verbose= 0; # Verbose output, enable with --verbose - our $exe_mysql; our $exe_mysqladmin; our $exe_mysqltest; @@ -1665,6 +1664,18 @@ sub environment_setup { } + # ---------------------------------------------------- + # Add the path where mysqld will find mypluglib.so + # ---------------------------------------------------- + my $lib_simple_parser= + mtr_file_exists(vs_config_dirs('plugin/fulltext', 'mypluglib.dll'), + "$basedir/plugin/fulltext/.libs/mypluglib.so",); + + $ENV{'SIMPLE_PARSER'}= + ($lib_simple_parser ? basename($lib_simple_parser) : ""); + $ENV{'SIMPLE_PARSER_OPT'}= + ($lib_simple_parser ? "--plugin_dir=" . dirname($lib_simple_parser) : ""); + # -------------------------------------------------------------------------- # Valgrind need to be run with debug libraries otherwise it's almost # impossible to add correct supressions, that means if "/usr/lib/debug" @@ -1802,7 +1813,6 @@ sub environment_setup { "$basedir/extra/my_print_defaults"); $ENV{'MYSQL_MY_PRINT_DEFAULTS'}= native_path($exe_my_print_defaults); - # ---------------------------------------------------- # Setup env so childs can execute myisampack and myisamchk # ---------------------------------------------------- @@ -1917,6 +1927,9 @@ sub remove_stale_vardir () { mtr_verbose("Removing $opt_vardir/"); rmtree("$opt_vardir/"); } + # Remove the "tmp" dir + mtr_verbose("Removing $opt_tmpdir/"); + rmtree("$opt_tmpdir/"); } diff --git a/mysql-test/r/alter_table.result b/mysql-test/r/alter_table.result index f0edfc9bb59..5a115e9ea99 100644 --- a/mysql-test/r/alter_table.result +++ b/mysql-test/r/alter_table.result @@ -996,6 +996,22 @@ SELECT * FROM t1; v b abc 5 DROP TABLE t1; +create table t1 (a tinytext character set latin1); +alter table t1 convert to character set utf8; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` text +) ENGINE=MyISAM DEFAULT CHARSET=utf8 +drop table t1; +create table t1 (a mediumtext character set latin1); +alter table t1 convert to character set utf8; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` longtext +) ENGINE=MyISAM DEFAULT CHARSET=utf8 +drop table t1; End of 5.0 tests drop table if exists t1, t2, t3; create table t1 (i int); diff --git a/mysql-test/r/commit_1innodb.result b/mysql-test/r/commit_1innodb.result index f226543c665..a31a881051f 100644 --- a/mysql-test/r/commit_1innodb.result +++ b/mysql-test/r/commit_1innodb.result @@ -683,10 +683,10 @@ SUCCESS # 23. DDL: RENAME TEMPORARY TABLE, does not start a transaction # No test because of Bug#8729 "rename table fails on temporary table" -# 24. DDL: TRUNCATE TEMPORARY TABLE, does not start a transaction +# 24. DDL: TRUNCATE TEMPORARY TABLE truncate table t2; -call p_verify_status_increment(2, 0, 2, 0); +call p_verify_status_increment(4, 0, 4, 0); SUCCESS commit; @@ -770,8 +770,11 @@ call p_verify_status_increment(0, 0, 0, 0); SUCCESS insert t1 set a=4; -# Sic: a bug. Binlog did not register itself this time. -call p_verify_status_increment(1, 0, 1, 0); +# Binlog does not register itself this time for other than the 1st +# statement of the transaction with MIXED/STATEMENT binlog_format. +# It needs registering with the ROW format. Therefore 1,0,2,2 are +# the correct arguments to this test after bug#40221 fixed. +call p_verify_status_increment(1, 0, 2, 2); SUCCESS release savepoint a; @@ -850,7 +853,7 @@ call p_verify_status_increment(1, 0, 1, 0); SUCCESS truncate table t3; -call p_verify_status_increment(2, 2, 2, 2); +call p_verify_status_increment(4, 4, 4, 4); SUCCESS create view v1 as select * from t2; diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result index 1842fb8b1dd..057a8600ca2 100644 --- a/mysql-test/r/create.result +++ b/mysql-test/r/create.result @@ -1891,5 +1891,7 @@ c1 c2 DROP TABLE t1; # -- End of Bug#34274 +create table `me:i`(id int); +drop table `me:i`; End of 5.1 tests diff --git a/mysql-test/r/csv.result b/mysql-test/r/csv.result index 3bd5869775b..4b96f5a5ed0 100644 --- a/mysql-test/r/csv.result +++ b/mysql-test/r/csv.result @@ -5394,4 +5394,17 @@ select * from t1; ERROR HY000: File 'MYSQLD_DATADIR/test/t1.CSV' not found (Errcode: 2) unlock tables; drop table t1; +create table t1(a enum ('a') not null) engine=csv; +insert into t1 values (2); +Warnings: +Warning 1265 Data truncated for column 'a' at row 1 +select * from t1 limit 1; +ERROR HY000: Table 't1' is marked as crashed and should be repaired +repair table t1; +Table Op Msg_type Msg_text +test.t1 repair Warning Data truncated for column 'a' at row 1 +test.t1 repair status OK +select * from t1 limit 1; +a +drop table t1; End of 5.1 tests diff --git a/mysql-test/r/ctype_ucs.result b/mysql-test/r/ctype_ucs.result index ec2182a3304..428629e7e9e 100644 --- a/mysql-test/r/ctype_ucs.result +++ b/mysql-test/r/ctype_ucs.result @@ -1157,4 +1157,57 @@ set names latin1; select hex(char(0x41 using ucs2)); hex(char(0x41 using ucs2)) 0041 +SET character_set_connection=ucs2; +SELECT CHARSET(DAYNAME(19700101)); +CHARSET(DAYNAME(19700101)) +ucs2 +SELECT CHARSET(MONTHNAME(19700101)); +CHARSET(MONTHNAME(19700101)) +ucs2 +SELECT LOWER(DAYNAME(19700101)); +LOWER(DAYNAME(19700101)) +thursday +SELECT LOWER(MONTHNAME(19700101)); +LOWER(MONTHNAME(19700101)) +january +SELECT UPPER(DAYNAME(19700101)); +UPPER(DAYNAME(19700101)) +THURSDAY +SELECT UPPER(MONTHNAME(19700101)); +UPPER(MONTHNAME(19700101)) +JANUARY +SELECT HEX(MONTHNAME(19700101)); +HEX(MONTHNAME(19700101)) +004A0061006E0075006100720079 +SELECT HEX(DAYNAME(19700101)); +HEX(DAYNAME(19700101)) +00540068007500720073006400610079 +SET LC_TIME_NAMES=ru_RU; +SET NAMES utf8; +SET character_set_connection=ucs2; +SELECT CHARSET(DAYNAME(19700101)); +CHARSET(DAYNAME(19700101)) +ucs2 +SELECT CHARSET(MONTHNAME(19700101)); +CHARSET(MONTHNAME(19700101)) +ucs2 +SELECT LOWER(DAYNAME(19700101)); +LOWER(DAYNAME(19700101)) +четверг +SELECT LOWER(MONTHNAME(19700101)); +LOWER(MONTHNAME(19700101)) +ÑÐ½Ð²Ð°Ñ€Ñ +SELECT UPPER(DAYNAME(19700101)); +UPPER(DAYNAME(19700101)) +ЧЕТВЕРГ +SELECT UPPER(MONTHNAME(19700101)); +UPPER(MONTHNAME(19700101)) +ЯÐÐ’ÐРЯ +SELECT HEX(MONTHNAME(19700101)); +HEX(MONTHNAME(19700101)) +042F043D043204300440044F +SELECT HEX(DAYNAME(19700101)); +HEX(DAYNAME(19700101)) +0427043504420432043504400433 +SET character_set_connection=latin1; End of 5.0 tests diff --git a/mysql-test/r/date_formats.result b/mysql-test/r/date_formats.result index dfd8244ef77..99ae6d85fee 100644 --- a/mysql-test/r/date_formats.result +++ b/mysql-test/r/date_formats.result @@ -590,3 +590,13 @@ select str_to_date('04/30/2004 ', '%m/%d/%Y '); str_to_date('04/30/2004 ', '%m/%d/%Y ') 2004-04-30 "End of 4.1 tests" +SELECT DATE_FORMAT("0000-01-01",'%W %d %M %Y') as valid_date; +valid_date +Sunday 01 January 0000 +SELECT DATE_FORMAT("0000-02-28",'%W %d %M %Y') as valid_date; +valid_date +Tuesday 28 February 0000 +SELECT DATE_FORMAT("2009-01-01",'%W %d %M %Y') as valid_date; +valid_date +Thursday 01 January 2009 +"End of 5.0 tests" diff --git a/mysql-test/r/events_bugs.result b/mysql-test/r/events_bugs.result index ba4645b827e..83030a00179 100644 --- a/mysql-test/r/events_bugs.result +++ b/mysql-test/r/events_bugs.result @@ -3,6 +3,8 @@ drop database if exists mysqltest_db1; drop database if exists mysqltest_db2; create database events_test; use events_test; +set @concurrent_insert= @@global.concurrent_insert; +set @@global.concurrent_insert = 0; select * from information_schema.global_variables where variable_name like 'event_scheduler'; VARIABLE_NAME VARIABLE_VALUE EVENT_SCHEDULER ON @@ -60,7 +62,7 @@ select get_lock('test_bug16407', 60); end| "Now if everything is fine the event has compiled and is locked" select /*1*/ user, host, db, info from information_schema.processlist -where info = 'select get_lock(\'test_bug16407\', 60)'; +where state = 'User lock' and info = 'select get_lock(\'test_bug16407\', 60)'; user host db info root localhost events_test select get_lock('test_bug16407', 60) select release_lock('test_bug16407'); @@ -84,7 +86,7 @@ get_lock('ee_16407_2', 60) set global event_scheduler= 1; "Another sql_mode test" set sql_mode="traditional"; -create table events_smode_test(ev_name char(10), a date) engine=myisam; +create table events_smode_test(ev_name char(10), a date); "This should never insert something" create event ee_16407_2 on schedule every 60 second do begin @@ -92,7 +94,7 @@ select get_lock('ee_16407_2', 60) /*ee_16407_2*/; select release_lock('ee_16407_2'); insert into events_test.events_smode_test values('ee_16407_2','1980-19-02'); end| -insert into events_smode_test values ('test','1980-19-02')| +insert into events_test.events_smode_test values ('test','1980-19-02')| ERROR 22007: Incorrect date value: '1980-19-02' for column 'a' at row 1 "This is ok" create event ee_16407_3 on schedule every 60 second do @@ -116,7 +118,7 @@ events_test ee_16407_2 STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ events_test ee_16407_3 STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER events_test ee_16407_4 select /*2*/ user, host, db, info from information_schema.processlist -where info = 'select get_lock(\'ee_16407_2\', 60)'; +where state = 'User lock' and info = 'select get_lock(\'ee_16407_2\', 60)'; user host db info root localhost events_test select get_lock('ee_16407_2', 60) root localhost events_test select get_lock('ee_16407_2', 60) @@ -125,10 +127,10 @@ select release_lock('ee_16407_2'); release_lock('ee_16407_2') 1 select /*3*/ user, host, db, info from information_schema.processlist -where info = 'select get_lock(\'ee_16407_2\', 60)'; +where state = 'User lock' and info = 'select get_lock(\'ee_16407_2\', 60)'; user host db info set global event_scheduler= off; -select * from events_smode_test order by ev_name, a; +select * from events_test.events_smode_test order by ev_name, a; ev_name a ee_16407_3 1980-02-19 ee_16407_3 1980-02-29 @@ -143,7 +145,7 @@ drop event ee_16407_2; drop event ee_16407_3; drop event ee_16407_4; "And now one last test regarding sql_mode and call of SP from an event" -delete from events_smode_test; +delete from events_test.events_smode_test; set sql_mode='ansi'; select get_lock('ee_16407_5', 60); get_lock('ee_16407_5', 60) @@ -166,10 +168,8 @@ call events_test.ee_16407_6_pendant(); end| "Should have 2 locked processes" select /*4*/ user, host, db, info from information_schema.processlist -where (command!='Daemon' || user='event_scheduler') and (info is null or info not like '%processlist%') -order by info; +where state = 'User lock' and info = 'select get_lock(\'ee_16407_5\', 60)'; user host db info -event_scheduler localhost NULL NULL root localhost events_test select get_lock('ee_16407_5', 60) root localhost events_test select get_lock('ee_16407_5', 60) select release_lock('ee_16407_5'); @@ -177,11 +177,9 @@ release_lock('ee_16407_5') 1 "Should have 0 processes locked" select /*5*/ user, host, db, info from information_schema.processlist -where (command!='Daemon' || user='event_scheduler') and (info is null or info not like '%processlist%') -order by info; +where state = 'User lock' and info = 'select get_lock(\'ee_16407_5\', 60)'; user host db info -event_scheduler localhost NULL NULL -select * from events_smode_test order by ev_name, a; +select * from events_test.events_smode_test order by ev_name, a; ev_name a ee_16407_6 2004-02-29 "And here we check one more time before we drop the events" @@ -740,3 +738,4 @@ name drop event e1; DROP DATABASE events_test; SET GLOBAL event_scheduler= 'ON'; +SET @@global.concurrent_insert= @concurrent_insert; diff --git a/mysql-test/r/events_scheduling.result b/mysql-test/r/events_scheduling.result index 63140bffaa4..7dfd10a53f8 100644 --- a/mysql-test/r/events_scheduling.result +++ b/mysql-test/r/events_scheduling.result @@ -62,18 +62,6 @@ CREATE EVENT event_4 ON SCHEDULE EVERY 1 SECOND ENDS NOW() + INTERVAL 1 SECOND ON COMPLETION PRESERVE DO INSERT INTO table_4 VALUES (1); -SELECT IF(SUM(a) >= 4, 'OK', 'ERROR') FROM table_1; -IF(SUM(a) >= 4, 'OK', 'ERROR') -OK -SELECT IF(SUM(a) >= 4, 'OK', 'ERROR') FROM table_2; -IF(SUM(a) >= 4, 'OK', 'ERROR') -OK -SELECT IF(SUM(a) >= 1, 'OK', 'ERROR') FROM table_3; -IF(SUM(a) >= 1, 'OK', 'ERROR') -OK -SELECT IF(SUM(a) >= 1, 'OK', 'ERROR') FROM table_4; -IF(SUM(a) >= 1, 'OK', 'ERROR') -OK SELECT IF(TIME_TO_SEC(TIMEDIFF(ENDS,STARTS))=6, 'OK', 'ERROR') FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_SCHEMA=DATABASE() AND EVENT_NAME='event_2'; diff --git a/mysql-test/r/fulltext.result b/mysql-test/r/fulltext.result index 0124ced40ce..8633bd61681 100644 --- a/mysql-test/r/fulltext.result +++ b/mysql-test/r/fulltext.result @@ -522,3 +522,12 @@ WHERE MATCH(a) AGAINST('test' IN BOOLEAN MODE) AND b=1; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref b b 5 const 4 Using where DROP TABLE t1; +CREATE TABLE t1(a CHAR(10)); +INSERT INTO t1 VALUES('aaa15'); +SELECT MATCH(a) AGAINST('aaa1* aaa14 aaa16' IN BOOLEAN MODE) FROM t1; +MATCH(a) AGAINST('aaa1* aaa14 aaa16' IN BOOLEAN MODE) +1 +SELECT MATCH(a) AGAINST('aaa1* aaa14 aaa15 aaa16' IN BOOLEAN MODE) FROM t1; +MATCH(a) AGAINST('aaa1* aaa14 aaa15 aaa16' IN BOOLEAN MODE) +2 +DROP TABLE t1; diff --git a/mysql-test/r/fulltext_plugin.result b/mysql-test/r/fulltext_plugin.result new file mode 100644 index 00000000000..69ebbe07e9e --- /dev/null +++ b/mysql-test/r/fulltext_plugin.result @@ -0,0 +1,5 @@ +INSTALL PLUGIN simple_parser SONAME 'mypluglib.so'; +CREATE TABLE t1(a TEXT, b TEXT, FULLTEXT(a) WITH PARSER simple_parser); +ALTER TABLE t1 ADD FULLTEXT(b) WITH PARSER simple_parser; +DROP TABLE t1; +UNINSTALL PLUGIN simple_parser; diff --git a/mysql-test/r/func_if.result b/mysql-test/r/func_if.result index 62d34c5ce8f..955a784f04c 100644 --- a/mysql-test/r/func_if.result +++ b/mysql-test/r/func_if.result @@ -176,4 +176,13 @@ IF((ROUND(t1.a,2)=1), 2, IF((ROUND(t1.a,2)=1), 2, IF((R DROP TABLE t1; +CREATE TABLE t1 (c LONGTEXT); +INSERT INTO t1 VALUES(1), (2), (3), (4), ('12345678901234567890'); +SELECT * FROM (SELECT MAX(IF(1, CAST(c AS UNSIGNED), 0)) FROM t1) AS te; +MAX(IF(1, CAST(c AS UNSIGNED), 0)) +12345678901234567890 +SELECT * FROM (SELECT MAX(IFNULL(CAST(c AS UNSIGNED), 0)) FROM t1) AS te; +MAX(IFNULL(CAST(c AS UNSIGNED), 0)) +12345678901234567890 +DROP TABLE t1; End of 5.0 tests diff --git a/mysql-test/r/func_in.result b/mysql-test/r/func_in.result index e761fb851fb..1e967b668c5 100644 --- a/mysql-test/r/func_in.result +++ b/mysql-test/r/func_in.result @@ -575,4 +575,16 @@ id select * from t1 where NOT id in (null, 1); id drop table t1; +CREATE TABLE t1(c0 INTEGER, c1 INTEGER, c2 INTEGER); +INSERT INTO t1 VALUES(1, 1, 1), (1, 1, 1); +SELECT CASE AVG (c0) WHEN c1 * c2 THEN 1 END FROM t1; +CASE AVG (c0) WHEN c1 * c2 THEN 1 END +1 +SELECT CASE c1 * c2 WHEN SUM(c0) THEN 1 WHEN AVG(c0) THEN 2 END FROM t1; +CASE c1 * c2 WHEN SUM(c0) THEN 1 WHEN AVG(c0) THEN 2 END +2 +SELECT CASE c1 WHEN c1 + 1 THEN 1 END, ABS(AVG(c0)) FROM t1; +CASE c1 WHEN c1 + 1 THEN 1 END ABS(AVG(c0)) +NULL 1.0000 +DROP TABLE t1; End of 5.1 tests diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result index 78748a4622f..0824f13cafc 100644 --- a/mysql-test/r/func_str.result +++ b/mysql-test/r/func_str.result @@ -717,8 +717,6 @@ insert(_latin2'abcd',2,3,_latin2'ef'), replace(_latin2'abcd',_latin2'b',_latin2'B'), encode('abcd','ab') ; -Warnings: -Warning 1265 Data truncated for column 'format(130,10)' at row 1 show create table t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -727,7 +725,7 @@ t1 CREATE TABLE `t1` ( `conv(130,16,10)` varchar(64) DEFAULT NULL, `hex(130)` varchar(6) NOT NULL DEFAULT '', `char(130)` varbinary(4) NOT NULL DEFAULT '', - `format(130,10)` varchar(4) NOT NULL DEFAULT '', + `format(130,10)` varchar(37) NOT NULL DEFAULT '', `left(_latin2'a',1)` varchar(1) CHARACTER SET latin2 NOT NULL DEFAULT '', `right(_latin2'a',1)` varchar(1) CHARACTER SET latin2 NOT NULL DEFAULT '', `lcase(_latin2'a')` varchar(1) CHARACTER SET latin2 NOT NULL DEFAULT '', @@ -2513,4 +2511,12 @@ SELECT HEX(c1) from v1; HEX(c1) 414243 DROP VIEW v1; +create table t1(a float); +insert into t1 values (1.33); +select format(a, 2) from t1; +Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr +def format(a, 2) 253 49 4 Y 0 31 8 +format(a, 2) +1.33 +drop table t1; End of 5.0 tests diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result index 559ed003fb2..0fa143d95bc 100644 --- a/mysql-test/r/func_time.result +++ b/mysql-test/r/func_time.result @@ -592,6 +592,21 @@ unix_timestamp('1970-01-01 03:00:01') select unix_timestamp('2038-01-19 07:14:07'); unix_timestamp('2038-01-19 07:14:07') 0 +SELECT CHARSET(DAYNAME(19700101)); +CHARSET(DAYNAME(19700101)) +latin1 +SELECT CHARSET(MONTHNAME(19700101)); +CHARSET(MONTHNAME(19700101)) +latin1 +SELECT LOWER(DAYNAME(19700101)); +LOWER(DAYNAME(19700101)) +thursday +SELECT LOWER(MONTHNAME(19700101)); +LOWER(MONTHNAME(19700101)) +january +SELECT COERCIBILITY(MONTHNAME('1970-01-01')),COERCIBILITY(DAYNAME('1970-01-01')); +COERCIBILITY(MONTHNAME('1970-01-01')) COERCIBILITY(DAYNAME('1970-01-01')) +4 4 CREATE TABLE t1 (datetime datetime, timestamp timestamp, date date, time time); INSERT INTO t1 values ("2001-01-02 03:04:05", "2002-01-02 03:04:05", "2003-01-02", "06:07:08"); SELECT * from t1; diff --git a/mysql-test/r/grant.result b/mysql-test/r/grant.result index 397f51fbd49..18f11ebcc71 100644 --- a/mysql-test/r/grant.result +++ b/mysql-test/r/grant.result @@ -1247,6 +1247,11 @@ drop user 'greg'@'localhost'; drop view v1; drop table test; drop function test_function; +SELECT CURRENT_USER(); +CURRENT_USER() +root@localhost +SET PASSWORD FOR CURRENT_USER() = PASSWORD("admin"); +SET PASSWORD FOR CURRENT_USER() = PASSWORD(""); End of 5.0 tests set names utf8; grant select on test.* to юзер_юзер@localhost; diff --git a/mysql-test/r/have_simple_parser.require b/mysql-test/r/have_simple_parser.require new file mode 100644 index 00000000000..0e023bd6983 --- /dev/null +++ b/mysql-test/r/have_simple_parser.require @@ -0,0 +1,2 @@ +have_simple_parser +1 diff --git a/mysql-test/r/index_merge_myisam.result b/mysql-test/r/index_merge_myisam.result index 45d335bba9e..19826aca43a 100644 --- a/mysql-test/r/index_merge_myisam.result +++ b/mysql-test/r/index_merge_myisam.result @@ -529,6 +529,34 @@ b a y z DROP TABLE t1; +# +# BUG#40974: Incorrect query results when using clause evaluated using range check +# +create table t0 (a int); +insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table t1 (a int); +insert into t1 values (1),(2); +create table t2(a int, b int); +insert into t2 values (1,1), (2, 1000); +create table t3 (a int, b int, filler char(100), key(a), key(b)); +insert into t3 select 1000, 1000,'filler' from t0 A, t0 B, t0 C; +insert into t3 values (1,1,'data'); +insert into t3 values (1,1,'data'); +The plan should be ALL/ALL/ALL(Range checked for each record (index map: 0x3) +explain select * from t1 +where exists (select 1 from t2, t3 +where t2.a=t1.a and (t3.a=t2.b or t3.b=t2.b or t3.b=t2.b+1)); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 2 Using where +2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where +2 DEPENDENT SUBQUERY t3 ALL a,b NULL NULL NULL 1002 Range checked for each record (index map: 0x3) +select * from t1 +where exists (select 1 from t2, t3 +where t2.a=t1.a and (t3.a=t2.b or t3.b=t2.b or t3.b=t2.b+1)); +a +1 +2 +drop table t0, t1, t2, t3; End of 5.0 tests #---------------- ROR-index_merge tests ----------------------- SET SESSION STORAGE_ENGINE = MyISAM; diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result index bbcae78f5e3..f8deef15819 100644 --- a/mysql-test/r/information_schema.result +++ b/mysql-test/r/information_schema.result @@ -1715,4 +1715,9 @@ where a.VARIABLE_NAME = b.VARIABLE_NAME; a.VARIABLE_VALUE - b.VARIABLE_VALUE 2 drop table t0; +CREATE TABLE t1(a INT) KEY_BLOCK_SIZE=1; +SELECT CREATE_OPTIONS FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='t1'; +CREATE_OPTIONS +KEY_BLOCK_SIZE=1 +DROP TABLE t1; End of 5.1 tests. diff --git a/mysql-test/r/innodb-autoinc.result b/mysql-test/r/innodb-autoinc.result index e000f910772..1e4b088c6cd 100644 --- a/mysql-test/r/innodb-autoinc.result +++ b/mysql-test/r/innodb-autoinc.result @@ -169,3 +169,413 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`c1`) ) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=latin1 DROP TABLE t1; +DROP TABLE IF EXISTS t1; +Warnings: +Note 1051 Unknown table 't1' +CREATE TABLE t1 (c1 INT AUTO_INCREMENT, c2 INT, PRIMARY KEY(c1)) ENGINE=InnoDB; +INSERT INTO t1 VALUES (NULL, 1); +DELETE FROM t1 WHERE c1 = 1; +INSERT INTO t1 VALUES (2,1); +INSERT INTO t1 VALUES (NULL,8); +SELECT * FROM t1; +c1 c2 +2 1 +3 8 +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +Warnings: +Note 1051 Unknown table 't1' +CREATE TABLE t1 (c1 INT AUTO_INCREMENT, c2 INT, PRIMARY KEY(c1)) ENGINE=InnoDB; +INSERT INTO t1 VALUES (NULL, 1); +DELETE FROM t1 WHERE c1 = 1; +INSERT INTO t1 VALUES (2,1), (NULL, 8); +INSERT INTO t1 VALUES (NULL,9); +SELECT * FROM t1; +c1 c2 +2 1 +3 8 +5 9 +DROP TABLE t1; +SET @@SESSION.AUTO_INCREMENT_INCREMENT=100, @@SESSION.AUTO_INCREMENT_OFFSET=10; +SHOW VARIABLES LIKE "%auto_inc%"; +Variable_name Value +auto_increment_increment 100 +auto_increment_offset 10 +DROP TABLE IF EXISTS t1; +Warnings: +Note 1051 Unknown table 't1' +CREATE TABLE t1 (c1 INT AUTO_INCREMENT, PRIMARY KEY(c1)) ENGINE=InnoDB; +INSERT INTO t1 VALUES (NULL),(5),(NULL); +INSERT INTO t1 VALUES (250),(NULL); +SELECT * FROM t1; +c1 +5 +10 +110 +250 +310 +INSERT INTO t1 VALUES (1000); +SET @@INSERT_ID=400; +INSERT INTO t1 VALUES(NULL),(NULL); +SELECT * FROM t1; +c1 +5 +10 +110 +250 +310 +400 +410 +1000 +DROP TABLE t1; +SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; +SET @@INSERT_ID=1; +SHOW VARIABLES LIKE "%auto_inc%"; +Variable_name Value +auto_increment_increment 1 +auto_increment_offset 1 +DROP TABLE IF EXISTS t1; +Warnings: +Note 1051 Unknown table 't1' +CREATE TABLE t1 (c1 INT AUTO_INCREMENT, PRIMARY KEY(c1)) ENGINE=InnoDB; +INSERT INTO t1 VALUES(0); +SELECT * FROM t1; +c1 +1 +SET @@SESSION.AUTO_INCREMENT_INCREMENT=100, @@SESSION.AUTO_INCREMENT_OFFSET=10; +INSERT INTO t1 VALUES (-1), (NULL),(2),(NULL); +INSERT INTO t1 VALUES (250),(NULL); +SELECT * FROM t1; +c1 +-1 +1 +2 +10 +110 +250 +410 +SET @@INSERT_ID=400; +INSERT INTO t1 VALUES(NULL),(NULL); +Got one of the listed errors +SELECT * FROM t1; +c1 +-1 +1 +2 +10 +110 +250 +410 +DROP TABLE t1; +SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; +SET @@INSERT_ID=1; +SHOW VARIABLES LIKE "%auto_inc%"; +Variable_name Value +auto_increment_increment 1 +auto_increment_offset 1 +DROP TABLE IF EXISTS t1; +Warnings: +Note 1051 Unknown table 't1' +CREATE TABLE t1 (c1 INT AUTO_INCREMENT, PRIMARY KEY(c1)) ENGINE=InnoDB; +INSERT INTO t1 VALUES(-1); +SELECT * FROM t1; +c1 +-1 +SET @@SESSION.AUTO_INCREMENT_INCREMENT=100, @@SESSION.AUTO_INCREMENT_OFFSET=10; +SHOW VARIABLES LIKE "%auto_inc%"; +Variable_name Value +auto_increment_increment 100 +auto_increment_offset 10 +INSERT INTO t1 VALUES (-2), (NULL),(2),(NULL); +INSERT INTO t1 VALUES (250),(NULL); +SELECT * FROM t1; +c1 +-2 +-1 +1 +2 +10 +250 +310 +INSERT INTO t1 VALUES (1000); +SET @@INSERT_ID=400; +INSERT INTO t1 VALUES(NULL),(NULL); +SELECT * FROM t1; +c1 +-2 +-1 +1 +2 +10 +250 +310 +400 +410 +1000 +DROP TABLE t1; +SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; +SET @@INSERT_ID=1; +SHOW VARIABLES LIKE "%auto_inc%"; +Variable_name Value +auto_increment_increment 1 +auto_increment_offset 1 +DROP TABLE IF EXISTS t1; +Warnings: +Note 1051 Unknown table 't1' +CREATE TABLE t1 (c1 INT UNSIGNED AUTO_INCREMENT, PRIMARY KEY(c1)) ENGINE=InnoDB; +INSERT INTO t1 VALUES(-1); +Warnings: +Warning 1264 Out of range value for column 'c1' at row 1 +SELECT * FROM t1; +c1 +1 +SET @@SESSION.AUTO_INCREMENT_INCREMENT=100, @@SESSION.AUTO_INCREMENT_OFFSET=10; +SHOW VARIABLES LIKE "%auto_inc%"; +Variable_name Value +auto_increment_increment 100 +auto_increment_offset 10 +INSERT INTO t1 VALUES (-2); +Warnings: +Warning 1264 Out of range value for column 'c1' at row 1 +INSERT INTO t1 VALUES (NULL); +INSERT INTO t1 VALUES (2); +INSERT INTO t1 VALUES (NULL); +INSERT INTO t1 VALUES (250); +INSERT INTO t1 VALUES (NULL); +SELECT * FROM t1; +c1 +1 +2 +10 +110 +210 +250 +310 +INSERT INTO t1 VALUES (1000); +SET @@INSERT_ID=400; +INSERT INTO t1 VALUES(NULL); +INSERT INTO t1 VALUES(NULL); +SELECT * FROM t1; +c1 +1 +2 +10 +110 +210 +250 +310 +400 +1000 +1010 +DROP TABLE t1; +SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; +SET @@INSERT_ID=1; +SHOW VARIABLES LIKE "%auto_inc%"; +Variable_name Value +auto_increment_increment 1 +auto_increment_offset 1 +DROP TABLE IF EXISTS t1; +Warnings: +Note 1051 Unknown table 't1' +CREATE TABLE t1 (c1 INT UNSIGNED AUTO_INCREMENT, PRIMARY KEY(c1)) ENGINE=InnoDB; +INSERT INTO t1 VALUES(-1); +Warnings: +Warning 1264 Out of range value for column 'c1' at row 1 +SELECT * FROM t1; +c1 +1 +SET @@SESSION.AUTO_INCREMENT_INCREMENT=100, @@SESSION.AUTO_INCREMENT_OFFSET=10; +SHOW VARIABLES LIKE "%auto_inc%"; +Variable_name Value +auto_increment_increment 100 +auto_increment_offset 10 +INSERT INTO t1 VALUES (-2),(NULL),(2),(NULL); +Warnings: +Warning 1264 Out of range value for column 'c1' at row 1 +INSERT INTO t1 VALUES (250),(NULL); +SELECT * FROM t1; +c1 +1 +2 +10 +110 +210 +250 +410 +INSERT INTO t1 VALUES (1000); +SET @@INSERT_ID=400; +INSERT INTO t1 VALUES(NULL),(NULL); +Got one of the listed errors +SELECT * FROM t1; +c1 +1 +2 +10 +110 +210 +250 +410 +1000 +DROP TABLE t1; +SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; +SET @@INSERT_ID=1; +SHOW VARIABLES LIKE "%auto_inc%"; +Variable_name Value +auto_increment_increment 1 +auto_increment_offset 1 +DROP TABLE IF EXISTS t1; +Warnings: +Note 1051 Unknown table 't1' +CREATE TABLE t1 (c1 BIGINT AUTO_INCREMENT, PRIMARY KEY(c1)) ENGINE=InnoDB; +INSERT INTO t1 VALUES(NULL); +INSERT INTO t1 VALUES (9223372036854775794); +SELECT * FROM t1; +c1 +1 +9223372036854775794 +SET @@SESSION.AUTO_INCREMENT_INCREMENT=2, @@SESSION.AUTO_INCREMENT_OFFSET=10; +SHOW VARIABLES LIKE "%auto_inc%"; +Variable_name Value +auto_increment_increment 2 +auto_increment_offset 10 +INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL); +SELECT * FROM t1; +c1 +1 +9223372036854775794 +9223372036854775796 +9223372036854775798 +9223372036854775800 +9223372036854775802 +9223372036854775804 +9223372036854775806 +DROP TABLE t1; +SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; +SET @@INSERT_ID=1; +SHOW VARIABLES LIKE "%auto_inc%"; +Variable_name Value +auto_increment_increment 1 +auto_increment_offset 1 +DROP TABLE IF EXISTS t1; +Warnings: +Note 1051 Unknown table 't1' +CREATE TABLE t1 (c1 BIGINT UNSIGNED AUTO_INCREMENT, PRIMARY KEY(c1)) ENGINE=InnoDB; +INSERT INTO t1 VALUES(NULL); +INSERT INTO t1 VALUES (18446744073709551603); +SELECT * FROM t1; +c1 +1 +18446744073709551603 +SET @@SESSION.AUTO_INCREMENT_INCREMENT=2, @@SESSION.AUTO_INCREMENT_OFFSET=10; +SHOW VARIABLES LIKE "%auto_inc%"; +Variable_name Value +auto_increment_increment 2 +auto_increment_offset 10 +INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL); +SELECT * FROM t1; +c1 +1 +18446744073709551603 +18446744073709551604 +18446744073709551606 +18446744073709551608 +18446744073709551610 +18446744073709551612 +18446744073709551614 +DROP TABLE t1; +SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; +SET @@INSERT_ID=1; +SHOW VARIABLES LIKE "%auto_inc%"; +Variable_name Value +auto_increment_increment 1 +auto_increment_offset 1 +DROP TABLE IF EXISTS t1; +Warnings: +Note 1051 Unknown table 't1' +CREATE TABLE t1 (c1 BIGINT UNSIGNED AUTO_INCREMENT, PRIMARY KEY(c1)) ENGINE=InnoDB; +INSERT INTO t1 VALUES(NULL); +INSERT INTO t1 VALUES (18446744073709551603); +SELECT * FROM t1; +c1 +1 +18446744073709551603 +SET @@SESSION.AUTO_INCREMENT_INCREMENT=5, @@SESSION.AUTO_INCREMENT_OFFSET=7; +SHOW VARIABLES LIKE "%auto_inc%"; +Variable_name Value +auto_increment_increment 5 +auto_increment_offset 7 +INSERT INTO t1 VALUES (NULL),(NULL); +SELECT * FROM t1; +c1 +1 +18446744073709551603 +18446744073709551607 +18446744073709551612 +DROP TABLE t1; +SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; +SET @@INSERT_ID=1; +SHOW VARIABLES LIKE "%auto_inc%"; +Variable_name Value +auto_increment_increment 1 +auto_increment_offset 1 +DROP TABLE IF EXISTS t1; +Warnings: +Note 1051 Unknown table 't1' +CREATE TABLE t1 (c1 BIGINT AUTO_INCREMENT, PRIMARY KEY(c1)) ENGINE=InnoDB; +INSERT INTO t1 VALUES(NULL); +INSERT INTO t1 VALUES(-9223372036854775806); +INSERT INTO t1 VALUES(-9223372036854775807); +INSERT INTO t1 VALUES(-9223372036854775808); +SELECT * FROM t1; +c1 +-9223372036854775808 +-9223372036854775807 +-9223372036854775806 +1 +SET @@SESSION.AUTO_INCREMENT_INCREMENT=3, @@SESSION.AUTO_INCREMENT_OFFSET=3; +SHOW VARIABLES LIKE "%auto_inc%"; +Variable_name Value +auto_increment_increment 3 +auto_increment_offset 3 +INSERT INTO t1 VALUES (NULL),(NULL), (NULL); +SELECT * FROM t1; +c1 +-9223372036854775808 +-9223372036854775807 +-9223372036854775806 +1 +3 +6 +9 +DROP TABLE t1; +SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; +SET @@INSERT_ID=1; +SHOW VARIABLES LIKE "%auto_inc%"; +Variable_name Value +auto_increment_increment 1 +auto_increment_offset 1 +DROP TABLE IF EXISTS t1; +Warnings: +Note 1051 Unknown table 't1' +CREATE TABLE t1 (c1 BIGINT UNSIGNED AUTO_INCREMENT, PRIMARY KEY(c1)) ENGINE=InnoDB; +INSERT INTO t1 VALUES(NULL); +INSERT INTO t1 VALUES (18446744073709551610); +SELECT * FROM t1; +c1 +1 +18446744073709551610 +SET @@SESSION.AUTO_INCREMENT_INCREMENT=1152921504606846976, @@SESSION.AUTO_INCREMENT_OFFSET=1152921504606846976; +Warnings: +Warning 1292 Truncated incorrect auto_increment_increment value: '1152921504606846976' +Warning 1292 Truncated incorrect auto_increment_offset value: '1152921504606846976' +SHOW VARIABLES LIKE "%auto_inc%"; +Variable_name Value +auto_increment_increment 65535 +auto_increment_offset 65535 +INSERT INTO t1 VALUES (NULL); +SELECT * FROM t1; +c1 +1 +18446744073709551610 +18446744073709551615 +DROP TABLE t1; diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result index 27a79a18493..2ce9587ef1a 100644 --- a/mysql-test/r/innodb.result +++ b/mysql-test/r/innodb.result @@ -3297,3 +3297,11 @@ info: Records: 5 Duplicates: 0 Warnings: 0 TRUNCATE TABLE t1; affected rows: 0 DROP TABLE t1; +Variable_name Value +Handler_update 0 +Variable_name Value +Handler_delete 0 +Variable_name Value +Handler_update 1 +Variable_name Value +Handler_delete 1 diff --git a/mysql-test/r/innodb_bug38231.result b/mysql-test/r/innodb_bug38231.result new file mode 100644 index 00000000000..2f909779755 --- /dev/null +++ b/mysql-test/r/innodb_bug38231.result @@ -0,0 +1,11 @@ +SET storage_engine=InnoDB; +INSERT INTO bug38231 VALUES (1), (10), (300); +SET autocommit=0; +SELECT * FROM bug38231 FOR UPDATE; +a +1 +10 +300 +TRUNCATE TABLE bug38231; +COMMIT; +DROP TABLE bug38231; diff --git a/mysql-test/r/innodb_bug39438.result b/mysql-test/r/innodb_bug39438.result new file mode 100644 index 00000000000..195775f74c8 --- /dev/null +++ b/mysql-test/r/innodb_bug39438.result @@ -0,0 +1 @@ +SET storage_engine=InnoDB; diff --git a/mysql-test/r/innodb_mysql.result b/mysql-test/r/innodb_mysql.result index aeacd054511..6fcc9415d12 100644 --- a/mysql-test/r/innodb_mysql.result +++ b/mysql-test/r/innodb_mysql.result @@ -1683,3 +1683,167 @@ CREATE INDEX i1 on t1 (a(3)); SELECT * FROM t1 WHERE a = 'abcde'; a DROP TABLE t1; +CREATE TABLE foo (a int, b int, c char(10), +PRIMARY KEY (c(3)), +KEY b (b) +) engine=innodb; +CREATE TABLE foo2 (a int, b int, c char(10), +PRIMARY KEY (c), +KEY b (b) +) engine=innodb; +CREATE TABLE bar (a int, b int, c char(10), +PRIMARY KEY (c(3)), +KEY b (b) +) engine=myisam; +INSERT INTO foo VALUES +(1,2,'abcdefghij'), (2,3,''), (3,4,'klmnopqrst'), +(4,5,'uvwxyz'), (5,6,'meotnsyglt'), (4,5,'asfdewe'); +INSERT INTO bar SELECT * FROM foo; +INSERT INTO foo2 SELECT * FROM foo; +EXPLAIN SELECT c FROM bar WHERE b>2;; +id 1 +select_type SIMPLE +table bar +type ALL +possible_keys b +key NULL +key_len NULL +ref NULL +rows 6 +Extra Using where +EXPLAIN SELECT c FROM foo WHERE b>2;; +id 1 +select_type SIMPLE +table foo +type ALL +possible_keys b +key NULL +key_len NULL +ref NULL +rows 6 +Extra Using where +EXPLAIN SELECT c FROM foo2 WHERE b>2;; +id 1 +select_type SIMPLE +table foo2 +type range +possible_keys b +key b +key_len 5 +ref NULL +rows 3 +Extra Using where; Using index +EXPLAIN SELECT c FROM bar WHERE c>2;; +id 1 +select_type SIMPLE +table bar +type ALL +possible_keys PRIMARY +key NULL +key_len NULL +ref NULL +rows 6 +Extra Using where +EXPLAIN SELECT c FROM foo WHERE c>2;; +id 1 +select_type SIMPLE +table foo +type ALL +possible_keys PRIMARY +key NULL +key_len NULL +ref NULL +rows 6 +Extra Using where +EXPLAIN SELECT c FROM foo2 WHERE c>2;; +id 1 +select_type SIMPLE +table foo2 +type index +possible_keys PRIMARY +key b +key_len 5 +ref NULL +rows 6 +Extra Using where; Using index +DROP TABLE foo, bar, foo2; +DROP TABLE IF EXISTS t1,t3,t2; +DROP FUNCTION IF EXISTS f1; +CREATE FUNCTION f1() RETURNS VARCHAR(250) +BEGIN +return 'hhhhhhh' ; +END| +CREATE TABLE t1 (a VARCHAR(20), b VARCHAR(20), c VARCHAR(20)) ENGINE=INNODB; +BEGIN WORK; +CREATE TEMPORARY TABLE t2 (a VARCHAR(20), b VARCHAR(20), c varchar(20)) ENGINE=INNODB; +CREATE TEMPORARY TABLE t3 LIKE t2; +INSERT INTO t1 VALUES ('a','b',NULL),('c','d',NULL),('e','f',NULL); +SET @stmt := CONCAT('INSERT INTO t2 SELECT tbl.a, tbl.b, f1()',' FROM t1 tbl'); +PREPARE stmt1 FROM @stmt; +SET @stmt := CONCAT('INSERT INTO t3', ' SELECT * FROM t2'); +PREPARE stmt3 FROM @stmt; +EXECUTE stmt1; +COMMIT; +DEALLOCATE PREPARE stmt1; +DEALLOCATE PREPARE stmt3; +DROP TABLE t1,t3,t2; +DROP FUNCTION f1; +DROP TABLE IF EXISTS t1,t2; +CREATE TABLE t1 (id INT NOT NULL, PRIMARY KEY (id)) ENGINE=INNODB; +CREATE TABLE t2 (id INT PRIMARY KEY, +t1_id INT, INDEX par_ind (t1_id), +FOREIGN KEY (t1_id) REFERENCES t1(id)) ENGINE=INNODB; +INSERT INTO t1 VALUES (1),(2); +INSERT INTO t2 VALUES (3,2); +SET AUTOCOMMIT = 0; +START TRANSACTION; +TRUNCATE TABLE t1; +ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`t1_id`) REFERENCES `t1` (`id`)) +SELECT * FROM t1; +id +1 +2 +COMMIT; +SELECT * FROM t1; +id +1 +2 +START TRANSACTION; +TRUNCATE TABLE t1; +ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`t1_id`) REFERENCES `t1` (`id`)) +SELECT * FROM t1; +id +1 +2 +ROLLBACK; +SELECT * FROM t1; +id +1 +2 +SET AUTOCOMMIT = 1; +START TRANSACTION; +SELECT * FROM t1; +id +1 +2 +COMMIT; +TRUNCATE TABLE t1; +ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`t1_id`) REFERENCES `t1` (`id`)) +SELECT * FROM t1; +id +1 +2 +DELETE FROM t2 WHERE id = 3; +START TRANSACTION; +SELECT * FROM t1; +id +1 +2 +TRUNCATE TABLE t1; +ROLLBACK; +SELECT * FROM t1; +id +TRUNCATE TABLE t2; +DROP TABLE t2; +DROP TABLE t1; +End of 5.1 tests diff --git a/mysql-test/r/innodb_mysql_rbk.result b/mysql-test/r/innodb_mysql_rbk.result new file mode 100644 index 00000000000..21ac4295325 --- /dev/null +++ b/mysql-test/r/innodb_mysql_rbk.result @@ -0,0 +1,21 @@ +CREATE TABLE t1(a INT, b INT NOT NULL, PRIMARY KEY (a)) ENGINE=innodb +DEFAULT CHARSET=latin1; +INSERT INTO t1 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7); +START TRANSACTION; +SELECT * FROM t1 WHERE b=3 LIMIT 1 FOR UPDATE; +a b +3 3 +START TRANSACTION; +UPDATE t1 SET b=b+12 WHERE a > 2 ORDER BY a; +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +ROLLBACK; +START TRANSACTION; +SELECT * FROM t1 WHERE b=3 LIMIT 1 FOR UPDATE; +a b +3 3 +START TRANSACTION; +UPDATE t1 SET b=10 WHERE a > 1 ORDER BY a; +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +SELECT * FROM t1 WHERE b = 10; +a b +DROP TABLE t1; diff --git a/mysql-test/r/log_bin_trust_function_creators_func.result b/mysql-test/r/log_bin_trust_function_creators_func.result index 30ba316eb31..33443df5ae4 100644 --- a/mysql-test/r/log_bin_trust_function_creators_func.result +++ b/mysql-test/r/log_bin_trust_function_creators_func.result @@ -11,10 +11,7 @@ CREATE TABLE t2 (a INT); SELECT @@log_bin_trust_function_creators; @@log_bin_trust_function_creators 0 -SELECT @@sql_log_bin; -@@sql_log_bin -1 -## Creating new function f1 ## +## Creating new function f1 fails because no DETERMINISTIC ### CREATE FUNCTION f1(a INT) RETURNS INT BEGIN IF (a < 3) THEN @@ -22,8 +19,24 @@ INSERT INTO t2 VALUES (a); END IF; RETURN 1; END| -'Bug: Create Function should give error here because non-super user'; -'is creating function here'; +ERROR HY000: This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable) +## Creating new function f1 fails because non-super user ## +CREATE FUNCTION f1(a INT) RETURNS INT DETERMINISTIC +BEGIN +IF (a < 3) THEN +INSERT INTO t2 VALUES (a); +END IF; +RETURN 1; +END| +ERROR HY000: You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable) +## Creating new function f1 succeeds ## +CREATE FUNCTION f1(a INT) RETURNS INT DETERMINISTIC +BEGIN +IF (a < 3) THEN +INSERT INTO t2 VALUES (a); +END IF; +RETURN 1; +END| ## Creating new table t1 ## CREATE TABLE t1 (a INT); ## Inserting some records in t1 ## diff --git a/mysql-test/r/log_state.result b/mysql-test/r/log_state.result index 35fb59671b8..5c3e3d789a1 100644 --- a/mysql-test/r/log_state.result +++ b/mysql-test/r/log_state.result @@ -1,6 +1,7 @@ -set @start_general_log= @@global.general_log; -set @start_slow_query_log= @@global.slow_query_log; -set @start_general_log_file= @@global.general_log_file; +SET @old_general_log= @@global.general_log; +SET @old_general_log_file= @@global.general_log_file; +SET @old_slow_query_log= @@global.slow_query_log; +SET @old_slow_query_log_file= @@global.slow_query_log_file; set global general_log= OFF; truncate table mysql.general_log; truncate table mysql.slow_log; @@ -36,20 +37,26 @@ general_log ON log ON log_slow_queries OFF slow_query_log OFF -set session long_query_time=1; -select sleep(2); -sleep(2) +# Establish connection con1 (user=root) +# Switch to connection con1 +set @long_query_time = <long_query_time>; +set session long_query_time = @long_query_time; +select sleep(@long_query_time + 1); +sleep(@long_query_time + 1) 0 select * from mysql.slow_log where sql_text NOT LIKE '%slow_log%'; start_time user_host query_time lock_time rows_sent rows_examined db last_insert_id insert_id server_id sql_text +# Switch to connection default set global slow_query_log= ON; -set session long_query_time=1; -select sleep(2); -sleep(2) +# Switch to connection con1 +set session long_query_time = @long_query_time; +select sleep(@long_query_time + 1); +sleep(@long_query_time + 1) 0 select * from mysql.slow_log where sql_text NOT LIKE '%slow_log%'; start_time user_host query_time lock_time rows_sent rows_examined db last_insert_id insert_id server_id sql_text -TIMESTAMP USER_HOST QUERY_TIME 00:00:00 1 0 test 0 0 1 select sleep(2) +TIMESTAMP USER_HOST QUERY_TIME 00:00:00 1 0 test 0 0 1 select sleep(@long_query_time + 1) +# Switch to connection default show global variables where Variable_name = 'log' or Variable_name = 'log_slow_queries' or Variable_name = 'general_log' or Variable_name = 'slow_query_log'; @@ -95,8 +102,8 @@ slow_query_log_file # show variables like 'log_output'; Variable_name Value log_output FILE,TABLE -set global general_log_file='/not exiting path/log.master'; -ERROR 42000: Variable 'general_log_file' can't be set to the value of '/not exiting path/log.master' +set global general_log_file='/not existing path/log.master'; +ERROR 42000: Variable 'general_log_file' can't be set to the value of '/not existing path/log.master' set global general_log_file='MYSQLTEST_VARDIR'; ERROR 42000: Variable 'general_log_file' can't be set to the value of 'MYSQLTEST_VARDIR' set global general_log_file=''; @@ -156,8 +163,10 @@ select * from mysql.general_log; event_time user_host thread_id server_id command_type argument TIMESTAMP USER_HOST # 1 Query drop table t1 TIMESTAMP USER_HOST # 1 Query select * from mysql.general_log -SET @old_general_log_state = @@global.general_log; -SET @old_slow_log_state = @@global.slow_query_log; +SET @@global.general_log = @old_general_log; +SET @@global.general_log_file = @old_general_log_file; +SET @@global.slow_query_log = @old_slow_query_log; +SET @@global.slow_query_log_file = @old_slow_query_log_file; SET GLOBAL general_log = ON; SET GLOBAL slow_query_log = ON; FLUSH TABLES WITH READ LOCK; @@ -176,10 +185,9 @@ SET GLOBAL READ_ONLY = ON; SET GLOBAL general_log = ON; SET GLOBAL slow_query_log = ON; SET GLOBAL READ_ONLY = OFF; -SET GLOBAL general_log = @old_general_log_state; -SET GLOBAL slow_query_log = @old_slow_log_state; -SET @old_general_log_state = @@global.general_log; -SET @old_slow_log_state = @@global.slow_query_log; +SET GLOBAL general_log = @old_general_log; +SET GLOBAL slow_query_log = @old_slow_query_log; +SET GLOBAL general_log = ON; SHOW VARIABLES LIKE 'general_log'; Variable_name Value general_log ON @@ -242,29 +250,24 @@ log_slow_queries ON SELECT @@slow_query_log, @@log_slow_queries; @@slow_query_log @@log_slow_queries 1 1 -SET GLOBAL general_log = @old_general_log_state; -SET GLOBAL slow_query_log = @old_slow_log_state; -set @old_general_log_file= @@global.general_log_file; -set @old_slow_query_log_file= @@global.slow_query_log_file; -set global general_log_file= concat('/not exiting path/log.maste', 'r'); -ERROR 42000: Variable 'general_log_file' can't be set to the value of '/not exiting path/log.master' -set global general_log_file= NULL; +SET GLOBAL general_log = @old_general_log; +SET GLOBAL slow_query_log = @old_slow_query_log; +SET GLOBAL general_log_file= CONCAT('/not existing path/log.maste', 'r'); +ERROR 42000: Variable 'general_log_file' can't be set to the value of '/not existing path/log.master' +SET GLOBAL general_log_file= NULL; ERROR 42000: Variable 'general_log_file' can't be set to the value of 'NULL' -set global slow_query_log_file= concat('/not exiting path/log.maste', 'r'); -ERROR 42000: Variable 'slow_query_log_file' can't be set to the value of '/not exiting path/log.master' -set global slow_query_log_file= NULL; +SET GLOBAL slow_query_log_file= CONCAT('/not existing path/log.maste', 'r'); +ERROR 42000: Variable 'slow_query_log_file' can't be set to the value of '/not existing path/log.master' +SET GLOBAL slow_query_log_file= NULL; ERROR 42000: Variable 'slow_query_log_file' can't be set to the value of 'NULL' -set global general_log_file= @old_general_log_file; -set global slow_query_log_file= @old_slow_query_log_file; +SET GLOBAL general_log_file= @old_general_log_file; +SET GLOBAL slow_query_log_file= @old_slow_query_log_file; # -- # -- Bug#32748: Inconsistent handling of assignments to -# -- general_log_file/slow_query_log_file. +# -- general_log_file/slow_query_log_file. # -- -SET @general_log_file_saved = @@global.general_log_file; -SET @slow_query_log_file_saved = @@global.slow_query_log_file; - SET GLOBAL general_log_file = 'bug32748.query.log'; SET GLOBAL slow_query_log_file = 'bug32748.slow.log'; @@ -273,8 +276,8 @@ Variable_name Value general_log_file bug32748.query.log slow_query_log_file bug32748.slow.log -SET GLOBAL general_log_file = @general_log_file_saved; -SET GLOBAL slow_query_log_file = @slow_query_log_file_saved; +SET GLOBAL general_log_file = @old_general_log_file; +SET GLOBAL slow_query_log_file = @old_slow_query_log_file; # -- End of Bug#32748. deprecated: @@ -301,7 +304,13 @@ SET GLOBAL general_log_file = @my_glf; SET GLOBAL slow_query_log_file = @my_sqlf; SET GLOBAL general_log = DEFAULT; SET GLOBAL slow_query_log = DEFAULT; +SET @@global.general_log = @old_general_log; +SET @@global.general_log_file = @old_general_log_file; +SET @@global.slow_query_log = @old_slow_query_log; +SET @@global.slow_query_log_file = @old_slow_query_log_file; End of 5.1 tests -set @@global.general_log= @start_general_log; -set @@global.slow_query_log= @start_slow_query_log; -set @@global.general_log_file= @start_general_log_file; +# Close connection con1 +SET global general_log = @old_general_log; +SET global general_log_file = @old_general_log_file; +SET global slow_query_log = @old_slow_query_log; +SET global slow_query_log_file = @old_slow_query_log_file; diff --git a/mysql-test/r/myisampack.result b/mysql-test/r/myisampack.result index 5f39d318234..7ed9b86d887 100644 --- a/mysql-test/r/myisampack.result +++ b/mysql-test/r/myisampack.result @@ -27,3 +27,25 @@ CHECK TABLE t1 EXTENDED; Table Op Msg_type Msg_text test.t1 check status OK DROP TABLE t1; +drop table if exists t1; +create table t1(f1 int, f2 char(255)); +insert into t1 values(1, 'foo'), (2, 'bar'); +insert into t1 select * from t1; +insert into t1 select * from t1; +insert into t1 select * from t1; +insert into t1 select * from t1; +insert into t1 select * from t1; +insert into t1 select * from t1; +insert into t1 select * from t1; +insert into t1 select * from t1; +insert into t1 select * from t1; +insert into t1 select * from t1; +insert into t1 select * from t1; +insert into t1 select * from t1; +flush tables; +optimize table t1; +Table Op Msg_type Msg_text +test.t1 optimize error Table 'test.t1' is read only +Warnings: +Error 1036 Table 't1' is read only +drop table t1; diff --git a/mysql-test/r/mysql.result b/mysql-test/r/mysql.result index a4d96c1c243..25b66fe7fc6 100644 --- a/mysql-test/r/mysql.result +++ b/mysql-test/r/mysql.result @@ -180,6 +180,14 @@ ERROR at line 1: DELIMITER cannot contain a backslash character 1 This is a file starting with UTF8 BOM 0xEFBBBF This is a file starting with UTF8 BOM 0xEFBBBF +delimiter +1 +2 +2 +2 +2 +@z:='1' @z=database() +1 NULL End of 5.0 tests WARNING: --server-arg option not supported in this configuration. Warning (Code 1286): Unknown table engine 'nonexistent' diff --git a/mysql-test/r/mysqlcheck.result b/mysql-test/r/mysqlcheck.result index b98a800fb36..ac582930a6e 100644 --- a/mysql-test/r/mysqlcheck.result +++ b/mysql-test/r/mysqlcheck.result @@ -133,4 +133,58 @@ v1 v-1 drop view v1, `v-1`; drop table t1; +SET NAMES utf8; +CREATE TABLE `#mysql50#@` (a INT); +SHOW TABLES; +Tables_in_test +#mysql50#@ +SET NAMES DEFAULT; +mysqlcheck --fix-table-names --databases test +SET NAMES utf8; +SHOW TABLES; +Tables_in_test +@ +DROP TABLE `@`; +CREATE TABLE `Ñ` (a INT); +SET NAMES DEFAULT; +mysqlcheck --default-character-set="latin1" --databases test +test.? +Error : Table doesn't exist +error : Corrupt +mysqlcheck --default-character-set="utf8" --databases test +test.Ñ OK +SET NAMES utf8; +DROP TABLE `Ñ`; +SET NAMES DEFAULT; +CREATE DATABASE `#mysql50#a@b`; +USE `#mysql50#a@b`; +CREATE TABLE `#mysql50#c@d` (a INT); +CREATE TABLE t1 (a INT); +SELECT * FROM INFORMATION_SCHEMA.TRIGGERS +WHERE TRIGGER_SCHEMA="#mysql50#a@b" ORDER BY trigger_name; +TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION +NULL #mysql50#a@b tr1 INSERT NULL #mysql50#a@b #mysql50#c@d 0 NULL SET NEW.a = 10 * NEW.a ROW BEFORE NULL NULL OLD NEW NULL root@localhost latin1 latin1_swedish_ci latin1_swedish_ci +NULL #mysql50#a@b tr2 INSERT NULL #mysql50#a@b t1 0 NULL SET NEW.a = 100 * NEW.a ROW BEFORE NULL NULL OLD NEW NULL root@localhost latin1 latin1_swedish_ci latin1_swedish_ci +Warnings: +Warning 1603 Triggers for table `#mysql50#a@b`.`#mysql50#c@d` have no creation context +Warning 1603 Triggers for table `#mysql50#a@b`.`t1` have no creation context +mysqlcheck --fix-db-names --fix-table-names --all-databases +USE `a@b`; +SELECT * FROM INFORMATION_SCHEMA.TRIGGERS +WHERE TRIGGER_SCHEMA="a@b" ORDER BY trigger_name; +TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION +NULL a@b tr1 INSERT NULL a@b c@d 0 NULL SET NEW.a = 10 * NEW.a ROW BEFORE NULL NULL OLD NEW NULL root@localhost utf8 utf8_general_ci latin1_swedish_ci +NULL a@b tr2 INSERT NULL a@b t1 0 NULL SET NEW.a = 100 * NEW.a ROW BEFORE NULL NULL OLD NEW NULL root@localhost utf8 utf8_general_ci latin1_swedish_ci +INSERT INTO `c@d` VALUES (2), (1); +SELECT * FROM `c@d`; +a +20 +10 +INSERT INTO t1 VALUES (3), (5); +SELECT * FROM t1; +a +300 +500 +DROP DATABASE `a@b`; +USE test; End of 5.1 tests diff --git a/mysql-test/r/partition_datatype.result b/mysql-test/r/partition_datatype.result index 3e4acfdee12..607afb71da5 100644 --- a/mysql-test/r/partition_datatype.result +++ b/mysql-test/r/partition_datatype.result @@ -324,7 +324,7 @@ partition by hash (a) show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` bit(27) NOT NULL DEFAULT '\0\0\0\0', + `a` bit(27) NOT NULL DEFAULT b'0', PRIMARY KEY (`a`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (a) diff --git a/mysql-test/r/partition_innodb_semi_consistent.result b/mysql-test/r/partition_innodb_semi_consistent.result new file mode 100644 index 00000000000..1bb39af043a --- /dev/null +++ b/mysql-test/r/partition_innodb_semi_consistent.result @@ -0,0 +1,128 @@ +drop table if exists t1; +set binlog_format=mixed; +set session transaction isolation level read committed; +create table t1(a int not null) +engine=innodb +DEFAULT CHARSET=latin1 +PARTITION BY RANGE(a) +(PARTITION p0 VALUES LESS THAN (20), +PARTITION p1 VALUES LESS THAN MAXVALUE); +insert into t1 values (1),(2),(3),(4),(5),(6),(7); +set autocommit=0; +select * from t1 where a=3 lock in share mode; +a +3 +set binlog_format=mixed; +set session transaction isolation level read committed; +set autocommit=0; +update t1 set a=10 where a=5; +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +commit; +update t1 set a=10 where a=5; +select * from t1 where a=2 for update; +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +select * from t1 where a=2 limit 1 for update; +a +2 +update t1 set a=11 where a=6; +update t1 set a=12 where a=2; +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +update t1 set a=13 where a=1; +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +commit; +update t1 set a=14 where a=1; +commit; +select * from t1; +a +10 +11 +14 +2 +3 +4 +7 +drop table t1; +SET SESSION AUTOCOMMIT = 0; +SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; +set binlog_format=mixed; +# Switch to connection con1 +CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(256)) +ENGINE = InnoDB +PARTITION BY RANGE (a) +(PARTITION p0 VALUES LESS THAN (300), +PARTITION p1 VALUES LESS THAN MAXVALUE); +INSERT INTO t1 VALUES (1,2); +# 1. test for locking: +BEGIN; +UPDATE t1 SET b = 12 WHERE a = 1; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +a b +1 12 +# Switch to connection con2 +UPDATE t1 SET b = 21 WHERE a = 1; +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +# Switch to connection con1 +SELECT * FROM t1; +a b +1 12 +ROLLBACK; +# 2. test for serialized update: +CREATE TABLE t2 (a INT); +TRUNCATE t1; +INSERT INTO t1 VALUES (1,'init'); +CREATE PROCEDURE p1() +BEGIN +UPDATE t1 SET b = CONCAT(b, '+con2') WHERE a = 1; +INSERT INTO t2 VALUES (); +END| +BEGIN; +UPDATE t1 SET b = CONCAT(b, '+con1') WHERE a = 1; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +a b +1 init+con1 +# Switch to connection con2 +CALL p1;; +# Switch to connection con1 +SELECT * FROM t1; +a b +1 init+con1 +COMMIT; +SELECT * FROM t1; +a b +1 init+con1 +# Switch to connection con2 +SELECT * FROM t1; +a b +1 init+con1+con2 +# Switch to connection con1 +# 3. test for updated key column: +TRUNCATE t1; +TRUNCATE t2; +INSERT INTO t1 VALUES (1,'init'); +BEGIN; +UPDATE t1 SET a = 2, b = CONCAT(b, '+con1') WHERE a = 1; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +a b +2 init+con1 +# Switch to connection con2 +CALL p1;; +# Switch to connection con1 +SELECT * FROM t1; +a b +2 init+con1 +COMMIT; +SELECT * FROM t1; +a b +2 init+con1 +# Switch to connection con2 +SELECT * FROM t1; +a b +2 init+con1 +DROP PROCEDURE p1; +DROP TABLE t1, t2; diff --git a/mysql-test/r/partition_mgm.result b/mysql-test/r/partition_mgm.result index 465bddcb3fb..a1f35756e21 100644 --- a/mysql-test/r/partition_mgm.result +++ b/mysql-test/r/partition_mgm.result @@ -1,4 +1,11 @@ DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (a INT PRIMARY KEY) +ENGINE MYISAM +PARTITION BY HASH (a) +PARTITIONS 1; +INSERT INTO t1 VALUES (1),(2),(3),(4),(5); +ALTER TABLE t1 REORGANIZE PARTITION; +DROP TABLE t1; create table t1 (a int) partition by range (a) subpartition by key (a) diff --git a/mysql-test/r/partition_pruning.result b/mysql-test/r/partition_pruning.result index b153ad9ad47..26ddc92e97b 100644 --- a/mysql-test/r/partition_pruning.result +++ b/mysql-test/r/partition_pruning.result @@ -1,4 +1,16 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +CREATE TABLE t1 +(a INT NOT NULL AUTO_INCREMENT, +b DATETIME, +PRIMARY KEY (a,b), +KEY (b)) +PARTITION BY RANGE (to_days(b)) +(PARTITION p0 VALUES LESS THAN (733681) COMMENT = 'LESS THAN 2008-10-01', +PARTITION p1 VALUES LESS THAN (733712) COMMENT = 'LESS THAN 2008-11-01', +PARTITION pX VALUES LESS THAN MAXVALUE); +SELECT a,b FROM t1 WHERE b >= '2008-12-01' AND b < '2009-12-00'; +a b +DROP TABLE t1; create table t1 ( a int not null) partition by hash(a) partitions 2; insert into t1 values (1),(2),(3); explain select * from t1 where a=5 and a=6; diff --git a/mysql-test/r/query_cache.result b/mysql-test/r/query_cache.result index 2df70624ac2..2cedeec145f 100644 --- a/mysql-test/r/query_cache.result +++ b/mysql-test/r/query_cache.result @@ -1616,41 +1616,6 @@ id DROP PROCEDURE proc29856; DROP TABLE t1; SET GLOBAL query_cache_size= default; -Bug#28249 Query Cache returns wrong result with concurrent insert/ certain lock -set GLOBAL query_cache_type=1; -set GLOBAL query_cache_limit=10000; -set GLOBAL query_cache_min_res_unit=0; -set GLOBAL query_cache_size= 100000; -flush tables; -drop table if exists t1, t2; -create table t1 (a int); -create table t2 (a int); -insert into t1 values (1),(2),(3); -Locking table T2 with a write lock. -lock table t2 write; -Select blocked by write lock. -select *, (select count(*) from t2) from t1;; -Sleeing is ok, because selecting should be done very fast. -Inserting into table T1. -insert into t1 values (4); -Unlocking the tables. -unlock tables; -Collecting result from previously blocked select. -Next select should contain 4 rows, as the insert is long finished. -select *, (select count(*) from t2) from t1; -a (select count(*) from t2) -1 0 -2 0 -3 0 -4 0 -reset query cache; -select *, (select count(*) from t2) from t1; -a (select count(*) from t2) -1 0 -2 0 -3 0 -4 0 -drop table t1,t2; # # Bug#25132 disabled query cache: Qcache_free_blocks = 1 # diff --git a/mysql-test/r/query_cache_28249.result b/mysql-test/r/query_cache_28249.result new file mode 100644 index 00000000000..aed84911032 --- /dev/null +++ b/mysql-test/r/query_cache_28249.result @@ -0,0 +1,62 @@ +SET @query_cache_type= @@global.query_cache_type; +SET @query_cache_limit= @@global.query_cache_limit; +SET @query_cache_min_res_unit= @@global.query_cache_min_res_unit; +SET @query_cache_size= @@global.query_cache_size; +# Bug#28249 Query Cache returns wrong result with concurrent insert/ certain lock +# Establish connections user1,user2,user3 (user=root) +# Switch to connection user1 +SET GLOBAL query_cache_type=1; +SET GLOBAL query_cache_limit=10000; +SET GLOBAL query_cache_min_res_unit=0; +SET GLOBAL query_cache_size= 100000; +FLUSH TABLES; +DROP TABLE IF EXISTS t1, t2; +CREATE TABLE t1 (a INT); +CREATE TABLE t2 (a INT); +INSERT INTO t1 VALUES (1),(2),(3); +# Switch to connection user2 +LOCK TABLE t2 WRITE; +# Switch to connection user1 +# "send" the next select, "reap" the result later. +# The select will be blocked by the write lock on the t1. +SELECT *, (SELECT COUNT(*) FROM t2) FROM t1; +# Switch to connection user3 +# Poll till the select of connection user1 is blocked by the write lock on t1. +SELECT user,command,state,info FROM information_schema.processlist +WHERE state = 'Locked' + AND info = 'SELECT *, (SELECT COUNT(*) FROM t2) FROM t1'; +user command state info +root Query Locked SELECT *, (SELECT COUNT(*) FROM t2) FROM t1 +INSERT INTO t1 VALUES (4); +# Switch to connection user2 +UNLOCK TABLES; +# Switch to connection user1 +# Collecting ("reap") the result from the previously blocked select. +# The printing of the result (varies between 3 and 4 rows) set has to be suppressed. +# Switch to connection user3 +# The next select enforces that effects of "concurrent_inserts" like the +# record with a = 4 is missing in result sets can no more happen. +SELECT 1 FROM t1 WHERE a = 4; +1 +1 +# Switch to connection user1 +# The next result set must contain 4 rows. +SELECT *, (SELECT COUNT(*) FROM t2) FROM t1; +a (SELECT COUNT(*) FROM t2) +1 0 +2 0 +3 0 +4 0 +RESET QUERY CACHE; +SELECT *, (SELECT COUNT(*) FROM t2) FROM t1; +a (SELECT COUNT(*) FROM t2) +1 0 +2 0 +3 0 +4 0 +DROP TABLE t1,t2; +# Switch to connection default + close connections user1,user2,user3 +SET GLOBAL query_cache_type= @query_cache_type; +SET GLOBAL query_cache_limit= @query_cache_limit; +SET GLOBAL query_cache_min_res_unit= @query_cache_min_res_unit; +SET GLOBAL query_cache_size= @query_cache_size; diff --git a/mysql-test/r/read_buffer_size_basic.result b/mysql-test/r/read_buffer_size_basic.result index 799f7b56235..3c007dc1515 100644 --- a/mysql-test/r/read_buffer_size_basic.result +++ b/mysql-test/r/read_buffer_size_basic.result @@ -86,6 +86,8 @@ SELECT @@global.read_buffer_size= 8200 OR @@global.read_buffer_size= 8228 ; @@global.read_buffer_size= 8200 OR @@global.read_buffer_size= 8228 1 SET @@global.read_buffer_size = 2147479553; +Warnings: +Warning 1292 Truncated incorrect read_buffer_size value: '2147479553' SELECT @@global.read_buffer_size; @@global.read_buffer_size 2147479552 @@ -114,6 +116,8 @@ SELECT @@session.read_buffer_size= 8200 OR @@session.read_buffer_size= 8228 ; SET @@session.read_buffer_size = 65530.34.; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1 SET @@session.read_buffer_size = 2147479553; +Warnings: +Warning 1292 Truncated incorrect read_buffer_size value: '2147479553' SELECT @@session.read_buffer_size; @@session.read_buffer_size 2147479552 diff --git a/mysql-test/r/read_rnd_buffer_size_basic.result b/mysql-test/r/read_rnd_buffer_size_basic.result index c51b0591054..c6440ac032e 100644 --- a/mysql-test/r/read_rnd_buffer_size_basic.result +++ b/mysql-test/r/read_rnd_buffer_size_basic.result @@ -88,6 +88,8 @@ SELECT @@global.read_rnd_buffer_size= 8200 OR @@global.read_rnd_buffer_size= 822 @@global.read_rnd_buffer_size= 8200 OR @@global.read_rnd_buffer_size= 8228 1 SET @@global.read_rnd_buffer_size = 2147479553; +Warnings: +Warning 1292 Truncated incorrect read_rnd_buffer_size value: '2147479553' SELECT @@global.read_rnd_buffer_size; @@global.read_rnd_buffer_size 2147479552 @@ -116,6 +118,8 @@ SELECT @@session.read_rnd_buffer_size= 8200 OR @@session.read_rnd_buffer_size= 8 SET @@session.read_rnd_buffer_size = 65530.34.; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1 SET @@session.read_rnd_buffer_size = 2147479553; +Warnings: +Warning 1292 Truncated incorrect read_rnd_buffer_size value: '2147479553' SELECT @@session.read_rnd_buffer_size; @@session.read_rnd_buffer_size 2147479552 diff --git a/mysql-test/r/rpl_init_slave_func.result b/mysql-test/r/rpl_init_slave_func.result index 3861f40e7d9..0d1f4d483d8 100644 --- a/mysql-test/r/rpl_init_slave_func.result +++ b/mysql-test/r/rpl_init_slave_func.result @@ -4,44 +4,43 @@ reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; -'#--------------------FN_DYNVARS_037_01-------------------------#' -SET @@global.init_slave = "SET @a = 10"; -'connect (con1,localhost,root,,)' -'connection con1' -SELECT @@global.init_slave; -@@global.init_slave -SET @a = 10 -'connection master' -'#--------------------FN_DYNVARS_037_02-------------------------#' -'check if value in slave opt file is executed' -'connection slave' -show variables like 'init_slave'; -Variable_name Value -init_slave set global max_connections=500 -show variables like 'max_connections'; -Variable_name Value -max_connections 500 -reset master; -'check if value in slave opt file doesnt apply to master' -'connection master' -show variables like 'init_slave'; -Variable_name Value -init_slave SET @a = 10 -show variables like 'max_connections'; -Variable_name Value -max_connections 151 -'connection slave' -'try creating a temporary variable in init_slave' +connection slave +SET @start_max_connections= @@global.max_connections; +SET @start_init_slave= @@global.init_slave; +SET @@global.init_slave = 'SET @@global.max_connections = @@global.max_connections + 1'; +DROP TABLE IF EXISTS t1; +CREATE TEMPORARY TABLE t1 AS SELECT @@global.init_slave AS my_column; +DESCRIBE t1; +Field Type Null Key Default Extra +my_column longtext NO NULL +DROP TABLE t1; +SELECT @@global.init_slave = 'SET @@global.max_connections = @@global.max_connections + 1'; +@@global.init_slave = 'SET @@global.max_connections = @@global.max_connections + 1' +1 +Expect 1 +SELECT @@global.max_connections= @start_max_connections; +@@global.max_connections= @start_max_connections +1 +Expect 1 +STOP SLAVE; +RESET MASTER; +RESET SLAVE; +START SLAVE; +SELECT @@global.max_connections = @start_max_connections + 1; +@@global.max_connections = @start_max_connections + 1 +1 +Expect 1 SET @@global.init_slave = "SET @a=5"; -stop slave; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +STOP SLAVE; +RESET MASTER; +RESET SLAVE; +START SLAVE; SHOW VARIABLES LIKE 'init_slave'; Variable_name Value init_slave SET @a=5 SELECT @a; @a NULL -'Bug#35365 SET statement in init_slave not execute if slave is restarted' -set global max_connections= default; +Expect NULL +SET @@global.max_connections= @start_max_connections; +SET @@global.init_slave= @start_init_slave; diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result index 4b2464af688..0519489b715 100644 --- a/mysql-test/r/select.result +++ b/mysql-test/r/select.result @@ -4340,6 +4340,39 @@ Handler_read_prev 0 Handler_read_rnd 0 Handler_read_rnd_next 6 DROP TABLE t1, t2; +CREATE TABLE t1 (f1 bigint(20) NOT NULL default '0', +f2 int(11) NOT NULL default '0', +f3 bigint(20) NOT NULL default '0', +f4 varchar(255) NOT NULL default '', +PRIMARY KEY (f1), +KEY key1 (f4), +KEY key2 (f2)); +CREATE TABLE t2 (f1 int(11) NOT NULL default '0', +f2 enum('A1','A2','A3') NOT NULL default 'A1', +f3 int(11) NOT NULL default '0', +PRIMARY KEY (f1), +KEY key1 (f3)); +CREATE TABLE t3 (f1 bigint(20) NOT NULL default '0', +f2 datetime NOT NULL default '1980-01-01 00:00:00', +PRIMARY KEY (f1)); +insert into t1 values (1, 1, 1, 'abc'); +insert into t1 values (2, 1, 2, 'def'); +insert into t1 values (3, 1, 2, 'def'); +insert into t2 values (1, 'A1', 1); +insert into t3 values (1, '1980-01-01'); +SELECT a.f3, cr.f4, count(*) count +FROM t2 a +STRAIGHT_JOIN t1 cr ON cr.f2 = a.f1 +LEFT JOIN +(t1 cr2 +JOIN t3 ae2 ON cr2.f3 = ae2.f1 +) ON a.f1 = cr2.f2 AND ae2.f2 < now() - INTERVAL 7 DAY AND +cr.f4 = cr2.f4 +GROUP BY a.f3, cr.f4; +f3 f4 count +1 abc 1 +1 def 2 +drop table t1, t2, t3; End of 5.0 tests create table t1(a INT, KEY (a)); INSERT INTO t1 VALUES (1),(2),(3),(4),(5); @@ -4358,3 +4391,29 @@ a 4 5 DROP TABLE t1; +CREATE TABLE A (date_key date); +CREATE TABLE C ( +pk int, +int_nokey int, +int_key int, +date_key date NOT NULL, +date_nokey date, +varchar_key varchar(1) +); +INSERT INTO C VALUES +(1,1,1,'0000-00-00',NULL,NULL), +(1,1,1,'0000-00-00',NULL,NULL); +SELECT 1 FROM C WHERE pk > ANY (SELECT 1 FROM C); +1 +SELECT COUNT(DISTINCT 1) FROM C +WHERE date_key = (SELECT 1 FROM A WHERE C.date_key IS NULL) GROUP BY pk; +COUNT(DISTINCT 1) +SELECT date_nokey FROM C +WHERE int_key IN (SELECT 1 FROM A) +HAVING date_nokey = '10:41:7' +ORDER BY date_key; +date_nokey +Warnings: +Warning 1292 Incorrect date value: '10:41:7' for column 'date_nokey' at row 1 +DROP TABLE A,C; +End of 5.1 tests diff --git a/mysql-test/r/status.result b/mysql-test/r/status.result index b6ac5f34f00..b76109a3d0e 100644 --- a/mysql-test/r/status.result +++ b/mysql-test/r/status.result @@ -211,4 +211,29 @@ drop procedure proc37908; drop function func37908; REVOKE ALL PRIVILEGES, GRANT OPTION FROM mysqltest_1@localhost; DROP USER mysqltest_1@localhost; +DROP PROCEDURE IF EXISTS p1; +DROP FUNCTION IF EXISTS f1; +CREATE FUNCTION f1() RETURNS INTEGER +BEGIN +DECLARE foo INTEGER; +DECLARE bar INTEGER; +SET foo=1; +SET bar=2; +RETURN foo; +END $$ +CREATE PROCEDURE p1() +BEGIN +SELECT 1; +END $$ +SELECT f1(); +f1() +1 +CALL p1(); +1 +1 +SELECT 9; +9 +9 +DROP PROCEDURE p1; +DROP FUNCTION f1; set @@global.concurrent_insert= @old_concurrent_insert; diff --git a/mysql-test/r/status2.result b/mysql-test/r/status2.result new file mode 100644 index 00000000000..146fb2adbaf --- /dev/null +++ b/mysql-test/r/status2.result @@ -0,0 +1,73 @@ +# +# Bug#24289 Status Variable "Questions" gets wrong values with Stored Routines +# +FLUSH STATUS; +CREATE FUNCTION testQuestion() RETURNS INTEGER +BEGIN +DECLARE foo INTEGER; +DECLARE bar INTEGER; +SET foo=1; +SET bar=2; +RETURN foo; +END $$ +CREATE PROCEDURE testQuestion2() +BEGIN +SELECT 1; +END $$ +DROP TABLE IF EXISTS t1,t2; +CREATE TABLE t1 (c1 INT); +CREATE TABLE t2 (c1 INT); +CREATE EVENT ev1 ON SCHEDULE EVERY 1 SECOND +DO INSERT INTO t1 VALUES(1); +Assert Questions == 7 +SHOW STATUS LIKE 'Questions'; +Variable_name Value +Questions 7 +SELECT testQuestion(); +testQuestion() +1 +Assert Questions == 9 +SHOW STATUS LIKE 'Questions'; +Variable_name Value +Questions 9 +CALL testQuestion2(); +1 +1 +Assert Questions == 11 +SHOW STATUS LIKE 'Questions'; +Variable_name Value +Questions 11 +SELECT 1; +1 +1 +Assert Questions == 13 +SHOW STATUS LIKE 'Questions'; +Variable_name Value +Questions 13 +SELECT 1; +1 +1 +Assert Questions == 14 +SHOW STATUS LIKE 'Questions'; +Variable_name Value +Questions 14 +CREATE TRIGGER trigg1 AFTER INSERT ON t1 +FOR EACH ROW BEGIN +INSERT INTO t2 VALUES (1); +END; +$$ +Assert Questions == 16 +SHOW STATUS LIKE 'Questions'; +Variable_name Value +Questions 16 +INSERT INTO t1 VALUES (1); +Assert Questions == 18 +SHOW STATUS LIKE 'Questions'; +Variable_name Value +Questions 18 +DROP PROCEDURE testQuestion2; +DROP TRIGGER trigg1; +DROP FUNCTION testQuestion; +DROP EVENT ev1; +DROP TABLE t1,t2; +End of 6.0 tests diff --git a/mysql-test/r/strict.result b/mysql-test/r/strict.result index a257d0a8648..1255284f4fe 100644 --- a/mysql-test/r/strict.result +++ b/mysql-test/r/strict.result @@ -1347,6 +1347,13 @@ t1 CREATE TABLE `t1` ( `i` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='123456789*123456789*123456789*123456789*123456789*123456789*' drop table t1; +CREATE TABLE t3 (f1 INT) COMMENT 'כקבהחןכקבהחןכקבהחןכקבהחןכקבהחןכקבהחןכקבהחןכקבהחןכקבהחןכקבהחן'; +SHOW CREATE TABLE t3; +Table Create Table +t3 CREATE TABLE `t3` ( + `f1` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='כקבהחןכקבהחןכקבהחןכקבהחןכקבהחןכקבהחןכקבהחןכקבהחןכקבהחןכקבהחן' +DROP TABLE t3; set sql_mode= 'traditional'; create table t1(col1 tinyint, col2 tinyint unsigned, col3 smallint, col4 smallint unsigned, diff --git a/mysql-test/r/temp_table.result b/mysql-test/r/temp_table.result index 6df09463d02..ba6b9f81a2d 100644 --- a/mysql-test/r/temp_table.result +++ b/mysql-test/r/temp_table.result @@ -194,4 +194,20 @@ DELETE FROM t1; SELECT * FROM t1; a b DROP TABLE t1; +DROP TABLE IF EXISTS t1,t2; +DROP FUNCTION IF EXISTS f1; +CREATE TEMPORARY TABLE t1 (a INT); +CREATE TEMPORARY TABLE t2 LIKE t1; +CREATE FUNCTION f1() RETURNS INT +BEGIN +return 1; +END| +INSERT INTO t2 SELECT * FROM t1; +INSERT INTO t1 SELECT f1(); +CREATE TABLE t3 SELECT * FROM t1; +INSERT INTO t1 SELECT f1(); +UPDATE t1,t2 SET t1.a = t2.a; +INSERT INTO t2 SELECT f1(); +DROP TABLE t1,t2,t3; +DROP FUNCTION f1; End of 5.1 tests diff --git a/mysql-test/r/type_bit.result b/mysql-test/r/type_bit.result index 782cddaeff7..b831771d9c5 100644 --- a/mysql-test/r/type_bit.result +++ b/mysql-test/r/type_bit.result @@ -708,6 +708,47 @@ HEX(b1) HEX(b2) i2 1 0 100 1 0 200 DROP TABLE t1, t2; +CREATE TABLE IF NOT EXISTS t1 ( +f1 bit(2) NOT NULL default b'10', +f2 bit(14) NOT NULL default b'11110000111100' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `f1` bit(2) NOT NULL DEFAULT b'10', + `f2` bit(14) NOT NULL DEFAULT b'11110000111100' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci +DROP TABLE t1; +CREATE TABLE IF NOT EXISTS t1 ( +f1 bit(2) NOT NULL default b'' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; +ERROR 42000: Invalid default value for 'f1' +create table t1bit7 (a1 bit(7) not null) engine=MyISAM; +create table t2bit7 (b1 bit(7)) engine=MyISAM; +insert into t1bit7 values (b'1100000'); +insert into t1bit7 values (b'1100001'); +insert into t1bit7 values (b'1100010'); +insert into t2bit7 values (b'1100001'); +insert into t2bit7 values (b'1100010'); +insert into t2bit7 values (b'1100110'); +select bin(a1) from t1bit7, t2bit7 where t1bit7.a1=t2bit7.b1; +bin(a1) +1100001 +1100010 +drop table t1bit7, t2bit7; +create table t1bit7 (a1 bit(15) not null) engine=MyISAM; +create table t2bit7 (b1 bit(15)) engine=MyISAM; +insert into t1bit7 values (b'110000011111111'); +insert into t1bit7 values (b'110000111111111'); +insert into t1bit7 values (b'110001011111111'); +insert into t2bit7 values (b'110000111111111'); +insert into t2bit7 values (b'110001011111111'); +insert into t2bit7 values (b'110011011111111'); +select bin(a1) from t1bit7, t2bit7 where t1bit7.a1=t2bit7.b1; +bin(a1) +110000111111111 +110001011111111 +drop table t1bit7, t2bit7; End of 5.0 tests create table t1(a bit(7)); insert into t1 values(0x40); diff --git a/mysql-test/r/type_date.result b/mysql-test/r/type_date.result index 7cb71831bce..f96e07b0c5e 100644 --- a/mysql-test/r/type_date.result +++ b/mysql-test/r/type_date.result @@ -65,12 +65,15 @@ CREATE TABLE t1(AFIELD INT); INSERT INTO t1 VALUES(1); CREATE TABLE t2(GMT VARCHAR(32)); INSERT INTO t2 VALUES('GMT-0800'); -SELECT DATE_FORMAT("2002-03-06 10:11:12", CONCAT('%a, %d %M %Y %H:%i:%s ' , t2.GMT)) FROM t1, t2 GROUP BY t1.AFIELD; -DATE_FORMAT("2002-03-06 10:11:12", CONCAT('%a, %d %M %Y %H:%i:%s ' , t2.GMT)) +SELECT DATE_FORMAT("2002-03-06 10:11:12", CONCAT('%a, %d %M %Y %H:%i:%s ', t2.GMT)) +FROM t1, t2 GROUP BY t1.AFIELD; +DATE_FORMAT("2002-03-06 10:11:12", CONCAT('%a, %d %M %Y %H:%i:%s ', t2.GMT)) Wed, 06 March 2002 10:11:12 GMT-0800 INSERT INTO t1 VALUES(1); -SELECT DATE_FORMAT("2002-03-06 10:11:12", CONCAT('%a, %d %M %Y %H:%i:%s ' , t2.GMT)), DATE_FORMAT("2002-03-06 10:11:12", CONCAT('%a, %d %M %Y %H:%i:%s ' , t2.GMT)) FROM t1,t2 GROUP BY t1.AFIELD; -DATE_FORMAT("2002-03-06 10:11:12", CONCAT('%a, %d %M %Y %H:%i:%s ' , t2.GMT)) DATE_FORMAT("2002-03-06 10:11:12", CONCAT('%a, %d %M %Y %H:%i:%s ' , t2.GMT)) +SELECT DATE_FORMAT("2002-03-06 10:11:12", CONCAT('%a, %d %M %Y %H:%i:%s ', t2.GMT)), +DATE_FORMAT("2002-03-06 10:11:12", CONCAT('%a, %d %M %Y %H:%i:%s ', t2.GMT)) +FROM t1,t2 GROUP BY t1.AFIELD; +DATE_FORMAT("2002-03-06 10:11:12", CONCAT('%a, %d %M %Y %H:%i:%s ', t2.GMT)) DATE_FORMAT("2002-03-06 10:11:12", CONCAT('%a, %d %M %Y %H:%i:%s ', t2.GMT)) Wed, 06 March 2002 10:11:12 GMT-0800 Wed, 06 March 2002 10:11:12 GMT-0800 drop table t1,t2; CREATE TABLE t1 (f1 time default NULL, f2 time default NULL); @@ -155,7 +158,7 @@ str_to_date( '', a ) 0000-00-00 00:00:00 NULL DROP TABLE t1; -CREATE TABLE t1 (a DATE, b int, PRIMARY KEY (a,b)); +CREATE TABLE t1 (a DATE, b INT, PRIMARY KEY (a,b)); INSERT INTO t1 VALUES (DATE(NOW()), 1); SELECT COUNT(*) FROM t1 WHERE a = NOW(); COUNT(*) diff --git a/mysql-test/r/type_float.result b/mysql-test/r/type_float.result index 6fbc8268a64..d4cfd1c04ed 100644 --- a/mysql-test/r/type_float.result +++ b/mysql-test/r/type_float.result @@ -392,4 +392,13 @@ f1 + 0e0 1.0000000150475e+30 -1.0000000150475e+30 drop table t1; +create table t1(d double, u bigint unsigned); +insert into t1(d) values (9.22337203685479e18), +(1.84e19); +update t1 set u = d; +select u from t1; +u +9223372036854790144 +18400000000000000000 +drop table t1; End of 5.0 tests diff --git a/mysql-test/r/warnings_engine_disabled.result b/mysql-test/r/warnings_engine_disabled.result index aa6170a60a7..e5d35fdaa5f 100644 --- a/mysql-test/r/warnings_engine_disabled.result +++ b/mysql-test/r/warnings_engine_disabled.result @@ -1,7 +1,15 @@ create table t1 (id int) engine=NDB; Warnings: +Warning 1286 Unknown table engine 'NDB' Warning 1266 Using storage engine MyISAM for table 't1' alter table t1 engine=NDB; Warnings: -Warning 1266 Using storage engine MyISAM for table 't1' +Warning 1286 Unknown table engine 'NDB' drop table t1; +SELECT ENGINE, SUPPORT FROM INFORMATION_SCHEMA.ENGINES WHERE ENGINE='ndbcluster'; +ENGINE SUPPORT +ndbcluster NO +SELECT PLUGIN_NAME, PLUGIN_STATUS FROM INFORMATION_SCHEMA.PLUGINS WHERE +PLUGIN_NAME='ndbcluster'; +PLUGIN_NAME PLUGIN_STATUS +ndbcluster DISABLED diff --git a/mysql-test/r/xml.result b/mysql-test/r/xml.result index 56c884343e3..41c0d6bee21 100644 --- a/mysql-test/r/xml.result +++ b/mysql-test/r/xml.result @@ -1029,4 +1029,28 @@ SELECT 1 FROM t1 ORDER BY(UPDATEXML(a, '1', '1')); 1 1 DROP TABLE t1; +SET @xml= +'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> + <head> + <title> Title - document with document declaration</title> + </head> + <body> Hi, Im a webpage with document a declaration </body> +</html>'; +SELECT ExtractValue(@xml, 'html/head/title'); +ExtractValue(@xml, 'html/head/title') + Title - document with document declaration +SELECT ExtractValue(@xml, 'html/body'); +ExtractValue(@xml, 'html/body') + Hi, Im a webpage with document a declaration +SELECT ExtractValue('<xml "xxx" "yyy">CharData</xml>', '/xml'); +ExtractValue('<xml "xxx" "yyy">CharData</xml>', '/xml') +NULL +Warnings: +Warning 1525 Incorrect XML value: 'parse error at line 1 pos 11: STRING unexpected ('>' wanted)' +SELECT ExtractValue('<xml xxx "yyy">CharData</xml>', '/xml'); +ExtractValue('<xml xxx "yyy">CharData</xml>', '/xml') +NULL +Warnings: +Warning 1525 Incorrect XML value: 'parse error at line 1 pos 17: STRING unexpected ('>' wanted)' End of 5.1 tests diff --git a/mysql-test/std_data/bug40482-bin.000001 b/mysql-test/std_data/bug40482-bin.000001 Binary files differnew file mode 100644 index 00000000000..d001bf664c7 --- /dev/null +++ b/mysql-test/std_data/bug40482-bin.000001 diff --git a/mysql-test/suite/binlog/r/binlog_database.result b/mysql-test/suite/binlog/r/binlog_database.result index d64d902217b..8dbe0f21852 100644 --- a/mysql-test/suite/binlog/r/binlog_database.result +++ b/mysql-test/suite/binlog/r/binlog_database.result @@ -33,6 +33,7 @@ master-bin.000001 # Query # # use `test`; insert into t1 values (1) master-bin.000001 # Query # # drop database if exists mysqltest1 master-bin.000001 # Query # # use `test`; insert into t1 values (1) master-bin.000001 # Query # # use `test`; drop table tt1, t1 +FLUSH STATUS; set binlog_format=mixed; reset master; create database testing_1; @@ -68,6 +69,7 @@ master-bin.000001 # Query # # use `test`; insert into t1 values (1) master-bin.000001 # Query # # drop database if exists mysqltest1 master-bin.000001 # Query # # use `test`; insert into t1 values (1) master-bin.000001 # Query # # use `test`; drop table tt1, t1 +FLUSH STATUS; set binlog_format=row; reset master; create database testing_1; @@ -108,6 +110,7 @@ master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # use `test`; COMMIT master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ +FLUSH STATUS; show databases; Database information_schema diff --git a/mysql-test/suite/binlog/r/binlog_index.result b/mysql-test/suite/binlog/r/binlog_index.result index c3eabb14f59..d49ceb00501 100644 --- a/mysql-test/suite/binlog/r/binlog_index.result +++ b/mysql-test/suite/binlog/r/binlog_index.result @@ -21,6 +21,7 @@ flush logs; *** must be a warning master-bin.000001 was not found *** Warnings: Warning 1612 Being purged log master-bin.000001 was not found +Warning 1612 Being purged log master-bin.000001 was not found *** must show one record, of the active binlog, left in the index file after PURGE *** show binary logs; Log_name File_size diff --git a/mysql-test/suite/binlog/r/binlog_innodb.result b/mysql-test/suite/binlog/r/binlog_innodb.result index 896d8f734fc..919ac33ef35 100644 --- a/mysql-test/suite/binlog/r/binlog_innodb.result +++ b/mysql-test/suite/binlog/r/binlog_innodb.result @@ -113,16 +113,17 @@ master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ DROP TABLE t1; +flush status; show status like "binlog_cache_use"; Variable_name Value -Binlog_cache_use 13 +Binlog_cache_use 0 show status like "binlog_cache_disk_use"; Variable_name Value Binlog_cache_disk_use 0 create table t1 (a int) engine=innodb; show status like "binlog_cache_use"; Variable_name Value -Binlog_cache_use 14 +Binlog_cache_use 1 show status like "binlog_cache_disk_use"; Variable_name Value Binlog_cache_disk_use 1 @@ -131,7 +132,7 @@ delete from t1; commit; show status like "binlog_cache_use"; Variable_name Value -Binlog_cache_use 15 +Binlog_cache_use 2 show status like "binlog_cache_disk_use"; Variable_name Value Binlog_cache_disk_use 1 diff --git a/mysql-test/suite/binlog/r/binlog_innodb_row.result b/mysql-test/suite/binlog/r/binlog_innodb_row.result new file mode 100644 index 00000000000..fab79c4bc2f --- /dev/null +++ b/mysql-test/suite/binlog/r/binlog_innodb_row.result @@ -0,0 +1,31 @@ +CREATE TABLE t1 (i int unique) ENGINE=innodb; +reset master; +begin; +insert into t1 values (1),(2); +*** the following UPDATE query wont generate any updates for the binlog *** +update t1 set i = 3 where i < 3; +ERROR 23000: Duplicate entry '3' for key 'i' +commit; +*** Results of the test: the binlog must have only Write_rows events not any Update_rows *** +show binlog events from <binlog_start>; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Xid # # COMMIT /* XID */ +delete from t1; +reset master; +begin; +insert into t1 values (1),(2); +*** the following UPDATE query wont generate any updates for the binlog *** +insert into t1 values (3),(4),(1),(2); +ERROR 23000: Duplicate entry '1' for key 'i' +commit; +*** Results of the test: the binlog must have only one Write_rows event not two *** +show binlog events from <binlog_start>; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Xid # # COMMIT /* XID */ +drop table t1; diff --git a/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result b/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result index 48b682160af..0606c223126 100644 --- a/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result +++ b/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result @@ -133,10 +133,6 @@ master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; BEGIN -master-bin.000001 # Table_map # # table_id: # (test.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; COMMIT insert into t1 values(11); commit; show binlog events from <binlog_start>; @@ -148,8 +144,6 @@ master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; COMMIT -master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -278,10 +272,6 @@ master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; BEGIN -master-bin.000001 # Table_map # # table_id: # (test.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; COMMIT master-bin.000001 # Query # # use `test`; drop table t1,t2 master-bin.000001 # Query # # use `test`; create table t0 (n int) master-bin.000001 # Query # # use `test`; BEGIN @@ -382,7 +372,7 @@ master-bin.000001 # Query # # use `test`; DROP TABLE if exists t2 master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; COMMIT +master-bin.000001 # Query # # use `test`; ROLLBACK master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS t2 master-bin.000001 # Query # # use `test`; CREATE TABLE t2 (a int, b int, primary key (a)) engine=innodb master-bin.000001 # Query # # use `test`; BEGIN @@ -400,11 +390,9 @@ master-bin.000001 # Query # # use `test`; DROP TABLE t2 master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; COMMIT -master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; COMMIT +master-bin.000001 # Query # # use `test`; ROLLBACK master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F @@ -412,7 +400,7 @@ master-bin.000001 # Query # # use `test`; COMMIT master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; COMMIT +master-bin.000001 # Query # # use `test`; ROLLBACK master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # use `test`; TRUNCATE table t2 master-bin.000001 # Query # # use `test`; COMMIT diff --git a/mysql-test/suite/binlog/t/binlog_innodb.test b/mysql-test/suite/binlog/t/binlog_innodb.test index df99e3786ee..f84fd65226a 100644 --- a/mysql-test/suite/binlog/t/binlog_innodb.test +++ b/mysql-test/suite/binlog/t/binlog_innodb.test @@ -101,6 +101,7 @@ DROP TABLE t1; # Actually this test has nothing to do with innodb per se, it just requires # transactional table. # +flush status; show status like "binlog_cache_use"; show status like "binlog_cache_disk_use"; diff --git a/mysql-test/suite/binlog/t/binlog_innodb_row.test b/mysql-test/suite/binlog/t/binlog_innodb_row.test new file mode 100644 index 00000000000..aaba98e3284 --- /dev/null +++ b/mysql-test/suite/binlog/t/binlog_innodb_row.test @@ -0,0 +1,42 @@ +# +# Tests of innodb/binlog with the row binlog format +# +source include/have_innodb.inc; +source include/have_log_bin.inc; +source include/have_binlog_format_row.inc; + +# +# Bug #40221 Replication failure on RBR + UPDATE the primary key +# + +CREATE TABLE t1 (i int unique) ENGINE=innodb; +reset master; + +# part 1: update can cause the dup key + +begin; +insert into t1 values (1),(2); +--echo *** the following UPDATE query wont generate any updates for the binlog *** +--error ER_DUP_ENTRY +update t1 set i = 3 where i < 3; +commit; + +--echo *** Results of the test: the binlog must have only Write_rows events not any Update_rows *** +source include/show_binlog_events.inc; + +# part 2: insert can cause the dup key + +delete from t1; +reset master; + +begin; +insert into t1 values (1),(2); +--echo *** the following UPDATE query wont generate any updates for the binlog *** +--error ER_DUP_ENTRY +insert into t1 values (3),(4),(1),(2); +commit; + +--echo *** Results of the test: the binlog must have only one Write_rows event not two *** +source include/show_binlog_events.inc; + +drop table t1; diff --git a/mysql-test/suite/funcs_1/r/is_collation_character_set_applicability.result b/mysql-test/suite/funcs_1/r/is_coll_char_set_appl.result index 7eba964bdf6..7eba964bdf6 100644 --- a/mysql-test/suite/funcs_1/r/is_collation_character_set_applicability.result +++ b/mysql-test/suite/funcs_1/r/is_coll_char_set_appl.result diff --git a/mysql-test/suite/funcs_1/r/is_columns_is.result b/mysql-test/suite/funcs_1/r/is_columns_is.result index 15466887ecc..94aa75c6db2 100644 --- a/mysql-test/suite/funcs_1/r/is_columns_is.result +++ b/mysql-test/suite/funcs_1/r/is_columns_is.result @@ -43,10 +43,10 @@ NULL information_schema COLUMN_PRIVILEGES TABLE_NAME 4 NO varchar 64 192 NULL N NULL information_schema COLUMN_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema ENGINES COMMENT 3 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select NULL information_schema ENGINES ENGINE 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ENGINES SAVEPOINTS 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select +NULL information_schema ENGINES SAVEPOINTS 6 NULL YES varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select NULL information_schema ENGINES SUPPORT 2 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema ENGINES TRANSACTIONS 4 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema ENGINES XA 5 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select +NULL information_schema ENGINES TRANSACTIONS 4 NULL YES varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select +NULL information_schema ENGINES XA 5 NULL YES varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select NULL information_schema EVENTS CHARACTER_SET_CLIENT 22 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select NULL information_schema EVENTS COLLATION_CONNECTION 23 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select NULL information_schema EVENTS CREATED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select diff --git a/mysql-test/suite/funcs_1/r/is_engines.result b/mysql-test/suite/funcs_1/r/is_engines.result index ba98ddd8f1e..9965fc5ad73 100644 --- a/mysql-test/suite/funcs_1/r/is_engines.result +++ b/mysql-test/suite/funcs_1/r/is_engines.result @@ -31,27 +31,27 @@ Field Type Null Key Default Extra ENGINE varchar(64) NO SUPPORT varchar(8) NO COMMENT varchar(80) NO -TRANSACTIONS varchar(3) NO -XA varchar(3) NO -SAVEPOINTS varchar(3) NO +TRANSACTIONS varchar(3) YES NULL +XA varchar(3) YES NULL +SAVEPOINTS varchar(3) YES NULL SHOW CREATE TABLE information_schema.ENGINES; Table Create Table ENGINES CREATE TEMPORARY TABLE `ENGINES` ( `ENGINE` varchar(64) NOT NULL DEFAULT '', `SUPPORT` varchar(8) NOT NULL DEFAULT '', `COMMENT` varchar(80) NOT NULL DEFAULT '', - `TRANSACTIONS` varchar(3) NOT NULL DEFAULT '', - `XA` varchar(3) NOT NULL DEFAULT '', - `SAVEPOINTS` varchar(3) NOT NULL DEFAULT '' + `TRANSACTIONS` varchar(3) DEFAULT NULL, + `XA` varchar(3) DEFAULT NULL, + `SAVEPOINTS` varchar(3) DEFAULT NULL ) ENGINE=MEMORY DEFAULT CHARSET=utf8 SHOW COLUMNS FROM information_schema.ENGINES; Field Type Null Key Default Extra ENGINE varchar(64) NO SUPPORT varchar(8) NO COMMENT varchar(80) NO -TRANSACTIONS varchar(3) NO -XA varchar(3) NO -SAVEPOINTS varchar(3) NO +TRANSACTIONS varchar(3) YES NULL +XA varchar(3) YES NULL +SAVEPOINTS varchar(3) YES NULL ######################################################################## # Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and # DDL on INFORMATION_SCHEMA tables are not supported diff --git a/mysql-test/suite/funcs_1/r/storedproc.result b/mysql-test/suite/funcs_1/r/storedproc.result index 38fa933e13f..0c414df0c57 100644 --- a/mysql-test/suite/funcs_1/r/storedproc.result +++ b/mysql-test/suite/funcs_1/r/storedproc.result @@ -191,2427 +191,1215 @@ ERROR 22007: Illegal double '1.7976931348623157493578e+308' value found during p UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+100; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+100, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+100); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+99; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+99, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+99); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+98; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+98, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+98); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+97; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+97, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+97); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+96; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+96, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+96); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+95; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+95, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+95); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+94; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+94, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+94); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+93; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+93, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+93); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+92; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+92, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+92); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+91; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+91, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+91); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+90; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+90, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+90); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+89; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+89, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+89); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+88; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+88, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+88); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+87; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+87, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+87); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+86; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+86, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+86); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+85; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+85, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+85); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+84; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+84, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+84); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+83; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+83, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+83); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+82; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+82, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+82); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+81; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+81, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+81); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+80; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+80, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+80); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+79; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+79, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+79); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+78; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+78, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+78); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+77; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+77, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+77); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+76; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+76, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+76); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+75; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+75, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+75); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+74; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+74, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+74); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+73; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+73, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+73); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+72; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+72, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+72); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+71; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+71, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+71); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+70; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+70, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+70); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+69; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+69, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+69); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+68; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+68, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+68); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+67; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+67, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+67); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+66; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+66, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+66); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+65; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+65, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+65); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+64; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+64, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+64); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+63; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+63, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+63); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+62; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+62, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+62); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+61; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+61, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+61); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+60; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+60, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+60); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+59; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+59, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+59); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+58; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+58, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+58); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+57; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+57, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+57); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+56; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+56, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+56); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+55; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+55, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+55); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+54; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+54, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+54); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+53; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+53, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+53); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+52; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+52, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+52); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+51; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+51, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+51); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+50; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+50, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+50); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+49; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+49, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+49); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+48; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+48, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+48); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+47; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+47, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+47); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+46; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+46, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+46); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+45; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+45, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+45); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+44; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+44, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+44); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+43; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+43, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+43); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+42; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+42, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+42); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+41; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+41, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+41); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+40; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+40, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+40); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+39; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+39, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+39); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+38; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+38, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+38); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+37; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+37, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+37); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+36; -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+36, @v1_proc); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+36); -Warnings: -Warning 1264 Out of range value for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+35; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+35, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+35); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+34; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+34, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+34); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+33; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+33, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+33); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+32; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+32, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+32); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+31; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+31, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+31); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+30; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+30, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+30); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+29; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+29, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+29); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+28; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+28, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+28); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+27; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+27, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+27); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+26; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+26, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+26); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+25; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+25, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+25); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+24; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+24, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+24); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+23; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+23, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+23); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+22; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+22, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+22); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+21; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+21, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+21); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+20; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+20, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+20); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+19; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+19, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+19); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+18; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+18, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+18); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+17; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+17, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+17); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+16; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+16, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+16); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+15; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+15, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+15); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+14; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+14, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+14); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+13; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+13, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+13); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+12; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+12, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+12); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+11; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+11, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+11); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+10; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+10, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+10); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+9; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+9, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+9); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+8; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+8, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+8); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+7; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+7, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+7); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+6; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+6, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+6); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+5; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+5, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+5); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+4; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+4, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+4); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+3; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+3, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+3); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+2; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+2, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+2); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+1; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+1, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+1); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e+0; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e+0, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e+0); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-100; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-100, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-100); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-99; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-99, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-99); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-98; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-98, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-98); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-97; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-97, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-97); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-96; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-96, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-96); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-95; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-95, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-95); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-94; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-94, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-94); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-93; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-93, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-93); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-92; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-92, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-92); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-91; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-91, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-91); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-90; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-90, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-90); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-89; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-89, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-89); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-88; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-88, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-88); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-87; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-87, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-87); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-86; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-86, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-86); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-85; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-85, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-85); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-84; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-84, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-84); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-83; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-83, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-83); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-82; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-82, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-82); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-81; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-81, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-81); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-80; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-80, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-80); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-79; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-79, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-79); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-78; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-78, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-78); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-77; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-77, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-77); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-76; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-76, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-76); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-75; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-75, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-75); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-74; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-74, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-74); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-73; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-73, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-73); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-72; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-72, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-72); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-71; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-71, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-71); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-70; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-70, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-70); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-69; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-69, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-69); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-68; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-68, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-68); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-67; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-67, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-67); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-66; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-66, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-66); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-65; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-65, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-65); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-64; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-64, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-64); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-63; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-63, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-63); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-62; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-62, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-62); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-61; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-61, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-61); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-60; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-60, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-60); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-59; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-59, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-59); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-58; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-58, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-58); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-57; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-57, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-57); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-56; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-56, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-56); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-55; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-55, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-55); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-54; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-54, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-54); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-53; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-53, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-53); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-52; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-52, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-52); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-51; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-51, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-51); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-50; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-50, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-50); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-49; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-49, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-49); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-48; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-48, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-48); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-47; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-47, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-47); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-46; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-46, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-46); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-45; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-45, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-45); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-44; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-44, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-44); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-43; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-43, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-43); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-42; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-42, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-42); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-41; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-41, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-41); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-40; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-40, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-40); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-39; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-39, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-39); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-38; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-38, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-38); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-37; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-37, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-37); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-36; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-36, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-36); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-35; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-35, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-35); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-34; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-34, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-34); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-33; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-33, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-33); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-32; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-32, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-32); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-31; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-31, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-31); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-30; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-30, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-30); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-29; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-29, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-29); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-28; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-28, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-28); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-27; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-27, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-27); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-26; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-26, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-26); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-25; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-25, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-25); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-24; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-24, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-24); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-23; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-23, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-23); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-22; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-22, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-22); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-21; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-21, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-21); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-20; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-20, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-20); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-19; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-19, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-19); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-18; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-18, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-18); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-17; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-17, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-17); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-16; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-16, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-16); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-15; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-15, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-15); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-14; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-14, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-14); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-13; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-13, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-13); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-12; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-12, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-12); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-11; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-11, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-11); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-10; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-10, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-10); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-9; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-9, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-9); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-8; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-8, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-8); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-7; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-7, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-7); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-6; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-6, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-6); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-5; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-5, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-5); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-4; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-4, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-4); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-3; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-3, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-3); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-2; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-2, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-2); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-1; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-1, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-1); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 UPDATE t1_aux SET f1 = NULL; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; UPDATE t1_aux SET f1 = 0.1234567890987654321e-0; -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SELECT f1 INTO @v1_tab FROM t1_aux; CALL sproc_1(0.1234567890987654321e-0, @v1_proc); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 SET @v1_func = func_1(0.1234567890987654321e-0); -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 DROP PROCEDURE sproc_1; DROP FUNCTION func_1; DROP TABLE t1_aux; diff --git a/mysql-test/suite/funcs_1/storedproc/param_check.inc b/mysql-test/suite/funcs_1/storedproc/param_check.inc index f6c0b30ab8b..203187f92b1 100644 --- a/mysql-test/suite/funcs_1/storedproc/param_check.inc +++ b/mysql-test/suite/funcs_1/storedproc/param_check.inc @@ -16,15 +16,32 @@ # Created: # 2008-08-27 mleich # - +# Modified: +# 2008-11-17 pcrews +# added --disable / --enable_warning statements to minimize differences +# between platforms (Bug#40177 Test funcs_1.storedproc failing on Pushbuild) +# +# TODO: (After 5.1 GA) +# 1) Examine reordering statements in this file to minimize the number of +# --disable / --enable_warning statements. Unsure if performance gains +# warrant the working time +# 2) We could probably add a comparison of the # of warnings before the +# assignment of @v1_proc and @v1_func to the # of warnings after assignment +# The difference of these values should be zero +# Refer to Bug#40177 - http://bugs.mysql.com/bug.php?id=40177 for notes as well + eval UPDATE t1_aux SET f1 = NULL; # Enforce that all user variables have the same data type and initial value. SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; +--disable_warnings eval UPDATE t1_aux SET f1 = $test_value; +--enable_warnings SELECT f1 INTO @v1_tab FROM t1_aux; +--disable_warnings eval CALL sproc_1($test_value, @v1_proc); eval SET @v1_func = func_1($test_value); +--enable_warnings if (`SELECT @v1_tab <> @v1_proc OR @v1_tab <> @v2_proc OR @v1_tab <> @v1_func`) { diff --git a/mysql-test/suite/funcs_1/t/is_collation_character_set_applicability.test b/mysql-test/suite/funcs_1/t/is_coll_char_set_appl.test index cda7b578aae..84690b0647c 100644 --- a/mysql-test/suite/funcs_1/t/is_collation_character_set_applicability.test +++ b/mysql-test/suite/funcs_1/t/is_coll_char_set_appl.test @@ -1,7 +1,7 @@ -# suite/funcs_1/t/is_collation_character_set_applicability.test +# suite/funcs_1/t/is_coll_char_set_appl.test # # Check the layout of information_schema.collation_character_set_applicability -# and some functionality realted tests. +# and some functionality related tests. # # Author: # 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of diff --git a/mysql-test/suite/funcs_2/t/disabled.def b/mysql-test/suite/funcs_2/t/disabled.def index c903662e052..da6230bd7ed 100644 --- a/mysql-test/suite/funcs_2/t/disabled.def +++ b/mysql-test/suite/funcs_2/t/disabled.def @@ -1,6 +1,6 @@ # Disabled by hhunger (2008-03-03) due to WL4204 -innodb_charset : Due to bug#20447 -myisam_charset : Due to bug#20477 -memory_charset : Due to bug#20447 -ndb_charset : Due to bug#20447 +innodb_charset : Bug#20447 Problem with prefix keys with contractions and expansions +myisam_charset : Bug#20447 Problem with prefix keys with contractions and expansions +memory_charset : Bug#20447 Problem with prefix keys with contractions and expansions +ndb_charset : Bug#20447 Problem with prefix keys with contractions and expansions diff --git a/mysql-test/suite/ndb/t/disabled.def b/mysql-test/suite/ndb/t/disabled.def index c638c7b4774..0fc9a5d3ad6 100644 --- a/mysql-test/suite/ndb/t/disabled.def +++ b/mysql-test/suite/ndb/t/disabled.def @@ -9,8 +9,7 @@ # Do not use any TAB characters for whitespace. # ############################################################################## -partition_03ndb : BUG#16385 2006-03-24 mikael Partitions: crash when updating a range partitioned NDB table -ndb_partition_error2 : HF is not sure if the test can work as internded on all the platforms +ndb_partition_error2 : Bug#40989 ndb_partition_error2 needs maintenance # the below testcase have been reworked to avoid the bug, test contains comment, keep bug open diff --git a/mysql-test/suite/parts/r/partition_bit_innodb.result b/mysql-test/suite/parts/r/partition_bit_innodb.result index 2ea66592679..a9ae917f13d 100644 --- a/mysql-test/suite/parts/r/partition_bit_innodb.result +++ b/mysql-test/suite/parts/r/partition_bit_innodb.result @@ -6,7 +6,7 @@ create table t1 (a bit(0), primary key (a)) engine='INNODB' partition by key (a) show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` bit(1) NOT NULL DEFAULT '\0', + `a` bit(1) NOT NULL DEFAULT b'0', PRIMARY KEY (`a`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) */ @@ -18,7 +18,7 @@ partition pa2); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` bit(1) NOT NULL DEFAULT '\0', + `a` bit(1) NOT NULL DEFAULT b'0', PRIMARY KEY (`a`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) @@ -30,7 +30,7 @@ partition by key (a) partitions 2; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` bit(64) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0', + `a` bit(64) NOT NULL DEFAULT b'0', PRIMARY KEY (`a`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) @@ -58,7 +58,7 @@ partition pa4 max_rows=40 min_rows=2); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` bit(64) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0', + `a` bit(64) NOT NULL DEFAULT b'0', PRIMARY KEY (`a`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) @@ -88,7 +88,7 @@ partition by key (a) partitions 4; show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` bit(1) NOT NULL DEFAULT '\0', + `a` bit(1) NOT NULL DEFAULT b'0', PRIMARY KEY (`a`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) @@ -102,7 +102,7 @@ alter table t2 drop primary key; show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` bit(1) NOT NULL DEFAULT '\0' + `a` bit(1) NOT NULL DEFAULT b'0' ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 4 */ @@ -114,7 +114,7 @@ alter table t2 add primary key (a); show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` bit(1) NOT NULL DEFAULT '\0', + `a` bit(1) NOT NULL DEFAULT b'0', PRIMARY KEY (`a`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) @@ -133,7 +133,7 @@ partition pa4 values less than (256)); show create table t3; Table Create Table t3 CREATE TABLE `t3` ( - `a` bit(8) NOT NULL DEFAULT '\0', + `a` bit(8) NOT NULL DEFAULT b'0', PRIMARY KEY (`a`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (a) @@ -416,7 +416,7 @@ partition pa3 values in (17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32)); show create table t4; Table Create Table t4 CREATE TABLE `t4` ( - `a` bit(8) NOT NULL DEFAULT '\0', + `a` bit(8) NOT NULL DEFAULT b'0', PRIMARY KEY (`a`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (a) diff --git a/mysql-test/suite/parts/r/partition_bit_myisam.result b/mysql-test/suite/parts/r/partition_bit_myisam.result index c1f067d80d1..680845c9971 100644 --- a/mysql-test/suite/parts/r/partition_bit_myisam.result +++ b/mysql-test/suite/parts/r/partition_bit_myisam.result @@ -6,7 +6,7 @@ create table t1 (a bit(0), primary key (a)) engine='MyISAM' partition by key (a) show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` bit(1) NOT NULL DEFAULT '\0', + `a` bit(1) NOT NULL DEFAULT b'0', PRIMARY KEY (`a`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) */ @@ -18,7 +18,7 @@ partition pa2); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` bit(1) NOT NULL DEFAULT '\0', + `a` bit(1) NOT NULL DEFAULT b'0', PRIMARY KEY (`a`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) @@ -30,7 +30,7 @@ partition by key (a) partitions 2; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` bit(64) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0', + `a` bit(64) NOT NULL DEFAULT b'0', PRIMARY KEY (`a`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) @@ -58,7 +58,7 @@ partition pa4 max_rows=40 min_rows=2); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` bit(64) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0', + `a` bit(64) NOT NULL DEFAULT b'0', PRIMARY KEY (`a`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) @@ -88,7 +88,7 @@ partition by key (a) partitions 4; show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` bit(1) NOT NULL DEFAULT '\0', + `a` bit(1) NOT NULL DEFAULT b'0', PRIMARY KEY (`a`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) @@ -102,7 +102,7 @@ alter table t2 drop primary key; show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` bit(1) NOT NULL DEFAULT '\0' + `a` bit(1) NOT NULL DEFAULT b'0' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 4 */ @@ -114,7 +114,7 @@ alter table t2 add primary key (a); show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` bit(1) NOT NULL DEFAULT '\0', + `a` bit(1) NOT NULL DEFAULT b'0', PRIMARY KEY (`a`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) @@ -133,7 +133,7 @@ partition pa4 values less than (256)); show create table t3; Table Create Table t3 CREATE TABLE `t3` ( - `a` bit(8) NOT NULL DEFAULT '\0', + `a` bit(8) NOT NULL DEFAULT b'0', PRIMARY KEY (`a`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (a) @@ -416,7 +416,7 @@ partition pa3 values in (17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32)); show create table t4; Table Create Table t4 CREATE TABLE `t4` ( - `a` bit(8) NOT NULL DEFAULT '\0', + `a` bit(8) NOT NULL DEFAULT b'0', PRIMARY KEY (`a`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (a) diff --git a/mysql-test/suite/parts/r/partition_bit_ndb.result b/mysql-test/suite/parts/r/partition_bit_ndb.result deleted file mode 100644 index add3ed394ad..00000000000 --- a/mysql-test/suite/parts/r/partition_bit_ndb.result +++ /dev/null @@ -1,126 +0,0 @@ -SET @max_row = 20; -create table t1 (a bit(65), primary key (a)) partition by key (a); -ERROR 42000: Display width out of range for column 'a' (max = 64) -create table t1 (a bit(0), primary key (a)) partition by key (a); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` bit(1) NOT NULL DEFAULT '\0', - PRIMARY KEY (`a`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) */ -drop table t1; -create table t1 (a bit(0), primary key (a)) partition by key (a) ( -partition pa1 DATA DIRECTORY = -'/tmp' INDEX DIRECTORY = -'/tmp', -partition pa2 DATA DIRECTORY = -'/tmp' INDEX DIRECTORY = -'/tmp'); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` bit(1) NOT NULL DEFAULT '\0', - PRIMARY KEY (`a`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/' -/*!50100 PARTITION BY KEY (a) -(PARTITION pa1 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, - PARTITION pa2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */ -drop table t1; -create table t1 (a bit(64), primary key (a)) partition by key (a); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` bit(64) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0', - PRIMARY KEY (`a`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) */ -insert into t1 values -(b'1111111111111111111111111111111111111111111111111111111111111111'), -(b'1000000000000000000000000000000000000000000000000000000000000000'), -(b'0000000000000000000000000000000000000000000000000000000000000001'), -(b'1010101010101010101010101010101010101010101010101010101010101010'), -(b'0101010101010101010101010101010101010101010101010101010101010101'); -select hex(a) from t1; -hex(a) -1 -5555555555555555 -8000000000000000 -AAAAAAAAAAAAAAAA -FFFFFFFFFFFFFFFF -drop table t1; -create table t1 (a bit(64), primary key (a)) partition by key (a)( -partition pa1 DATA DIRECTORY = -'/tmp' INDEX DIRECTORY = -'/tmp' max_rows=20 min_rows=2, -partition pa2 DATA DIRECTORY = -'/tmp' INDEX DIRECTORY = -'/tmp' max_rows=30 min_rows=3, -partition pa3 DATA DIRECTORY = -'/tmp' INDEX DIRECTORY = -'/tmp' max_rows=30 min_rows=4, -partition pa4 DATA DIRECTORY = -'/tmp' INDEX DIRECTORY = -'/tmp' max_rows=40 min_rows=2); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` bit(64) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0', - PRIMARY KEY (`a`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/' -/*!50100 PARTITION BY KEY (a) -(PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, - PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, - PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, - PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */ -insert into t1 values -(b'1111111111111111111111111111111111111111111111111111111111111111'), -(b'1000000000000000000000000000000000000000000000000000000000000000'), -(b'0000000000000000000000000000000000000000000000000000000000000001'), -(b'1010101010101010101010101010101010101010101010101010101010101010'), -(b'0101010101010101010101010101010101010101010101010101010101010101'); -select hex(a) from t1; -hex(a) -1 -5555555555555555 -8000000000000000 -AAAAAAAAAAAAAAAA -FFFFFFFFFFFFFFFF -drop table t1; -create table t1 (a bit, primary key (a)) partition by key (a); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` bit(1) NOT NULL DEFAULT '\0', - PRIMARY KEY (`a`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) */ -insert into t1 values (b'0'), (b'1'); -select hex(a) from t1; -hex(a) -0 -1 -alter table t1 drop primary key; -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` bit(1) NOT NULL DEFAULT '\0' -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) */ -select hex(a) from t1; -hex(a) -0 -1 -alter table t1 add primary key (a); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` bit(1) NOT NULL DEFAULT '\0', - PRIMARY KEY (`a`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) */ -select hex(a) from t1; -hex(a) -0 -1 -drop table t1; diff --git a/mysql-test/suite/parts/r/partition_special_innodb.result b/mysql-test/suite/parts/r/partition_special_innodb.result index 5eab78de8c2..8869f6d450c 100644 --- a/mysql-test/suite/parts/r/partition_special_innodb.result +++ b/mysql-test/suite/parts/r/partition_special_innodb.result @@ -213,5 +213,10 @@ START TRANSACTION; INSERT INTO t1 VALUES (NULL, 'first row t2'); SET autocommit=OFF; ALTER TABLE t1 AUTO_INCREMENT = 10; +ERROR HY000: Lock wait timeout exceeded; try restarting transaction INSERT INTO t1 VALUES (NULL, 'second row t2'); +SELECT a,b FROM t1 ORDER BY a; +a b +1 first row t2 +2 second row t2 DROP TABLE t1; diff --git a/mysql-test/suite/parts/t/disabled.def b/mysql-test/suite/parts/t/disabled.def index b9cd3462635..518a3c90422 100644 --- a/mysql-test/suite/parts/t/disabled.def +++ b/mysql-test/suite/parts/t/disabled.def @@ -1,8 +1,3 @@ partition_basic_ndb : Bug#19899 Crashing the server # http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-limitations-syntax.html -partition_bit_ndb : NDB does not support bit column in index -partition_sessions : needs system_3_init.inc partition_syntax_ndb : Bug#36735 Not supported -partition_value_innodb : Bug#30581 partition_value tests use disallowed CAST() function -partition_value_myisam : Bug#30581 partition_value tests use disallowed CAST() function -partition_value_ndb : Bug#30581 partition_value tests use disallowed CAST() function diff --git a/mysql-test/suite/parts/t/partition_bit_ndb.test b/mysql-test/suite/parts/t/partition_bit_ndb.test deleted file mode 100644 index 227d3d53401..00000000000 --- a/mysql-test/suite/parts/t/partition_bit_ndb.test +++ /dev/null @@ -1,60 +0,0 @@ -################################################################################ -# t/partition_bit_ndb.test # -# # -# Purpose: # -# Tests around bit type # -# NDB branch # -# # -#------------------------------------------------------------------------------# -# Original Author: HH # -# Original Date: 2006-08-01 # -# Change Author: # -# Change Date: # -# Change: # -################################################################################ - -# -# NOTE: PLEASE DO NOT ADD NOT MYISAM SPECIFIC TESTCASES HERE ! -# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN -# THE SOURCED FILES ONLY. -# -# Please read the README at the end of inc/partition.pre before changing -# any of the variables. -# - -#------------------------------------------------------------------------------# -# General not engine specific settings and requirements - -##### Options, for debugging support ##### -let $debug= 0; -let $with_partitioning= 1; - -##### Option, for displaying files ##### -let $ls= 1; - -##### Number of rows for the INSERT/UPDATE/DELETE/SELECT experiments ##### -# on partioned tables -SET @max_row = 20; - -# The server must support partitioning. ---source include/have_partition.inc - -#------------------------------------------------------------------------------# -# Engine specific settings and requirements - -##### Storage engine to be tested ---source include/have_ndb.inc -let $engine= 'NDB'; -connection default; - -# range, list and hash partitioning in ndb requires new_mode ---disable_query_log -set new=on; ---enable_query_log -##### Assign a big number smaller than the maximum value for partitions ##### -# and smaller than the maximum value of SIGNED INTEGER -let $MAX_VALUE= (2147483646); - -#------------------------------------------------------------------------------# -# Execute the tests to be applied to all storage engines ---source suite/parts/inc/partition_bit.inc diff --git a/mysql-test/suite/parts/t/partition_sessions.test b/mysql-test/suite/parts/t/partition_sessions.test deleted file mode 100644 index 3d59292bee5..00000000000 --- a/mysql-test/suite/parts/t/partition_sessions.test +++ /dev/null @@ -1,391 +0,0 @@ - -#-------------------------------------------------- -# Initialize system_3 test variables -#-------------------------------------------------- - ---source suite/system_3/include/system_3_init.inc - -let $NUM_VAL=`SELECT @NUM_VAL`; -let $LOAD_LINES=`SELECT @LOAD_LINES`; -let $LOG_UPPER=`SELECT @LOG_UPPER`; -let $LOG_LOWER=`SELECT @LOG_LOWER`; -#let $ENG1=`SELECT @ENG1`; -let $ENG2=`SELECT @ENG2`; -let $ENG_LOG=`SELECT @ENG_LOG`; -let $CLIENT_HOST=`SELECT @CLIENT_HOST`; -let $ENG=innodb; -let $ENG1=innodb; -#--------------------------------------------------------- -# Column list with definition for all tables to be checked -#--------------------------------------------------------- - -let $column_list= f1 int, -f2 char (15), -f3 decimal (5,3), -f4 datetime; - -let $col_access_list = f1,f2,f3,f4 ; -let $col_new_list = new.f1,new.f2,new.f3 new.f4 ; - -#--------------------------------------------------- -# Setting the parameters to use during testing -#--------------------------------------------------- -# Set number of variations of the f1 variable (used to segment the rows -# being updated/deleted by a user at a time. The higher the number, the -# more smaller segments used with each query. ---replace_result $NUM_VAL NUM_VAL -eval set @f1_nums=$NUM_VAL; - -# The following sets the number controls the size of the log table. -# Once a size of '@threshold' is reached, the first rows are removed -# sunch that the table is down to '@shrink_to' lines ---replace_result $LOG_LOWER LOG_LOWER -eval set @shrink_to=$LOG_LOWER; ---replace_result $LOG_UPPER LOG_UPPER -eval set @threshold=$LOG_UPPER; - -#--------------------------------------------------- -# Creating the database tables and loading the data -#--------------------------------------------------- - ---disable_warnings -drop database if exists systest1; ---enable_warnings - -create database systest1; - ---disable_abort_on_error ---replace_result $CLIENT_HOST CLIENT_HOST -eval create user systuser@'$CLIENT_HOST'; ---enable_abort_on_error ---replace_result $CLIENT_HOST CLIENT_HOST -eval set password for systuser@'$CLIENT_HOST' = password('systpass'); ---replace_result $CLIENT_HOST CLIENT_HOST -eval grant ALL on systest1.* to systuser@'$CLIENT_HOST'; -use systest1; ---replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK -connect (systuser,localhost,systuser,systpass,systest1,$MASTER_MYPORT,$MASTER_MYSOCK); - -create table tb1_master ( - f1 int, - f2 char(15), - f3 decimal (5,3), - f4 datetime -); - -#--replace_result $ENG_LOG ENG_LOG -eval create table tb1_logs ( - i1 int NOT NULL auto_increment, primary key (i1), - dt1 datetime NOT NULL, - entry_dsc char(100), - f4 int -) engine=$ENG_LOG -; -#PARTITION BY HASH (i1) PARTITIONS 8; - -if ($debug) -{ -SHOW CREATE TABLE tb1_logs; -} - -#--replace_result $ENG_LOG ENG_LOG -eval create table ddl_logs ( - i1 int NOT NULL auto_increment, primary key (i1), - dt1 datetime NOT NULL, - entry_dsc char(100), - errno int -) engine=$ENG_LOG; -#PARTITION BY HASH (i1) PARTITIONS 8; - -if ($debug) -{ -SHOW CREATE TABLE tb1_logs; -} -create table test_stat ( - dt1 datetime, - table_name char(20), - row_count int, - start_row int, - end_row int -); - -#---------------------------------------------------------------------- -# tb3_eng1: key partitioning -#---------------------------------------------------------------------- - -#--replace_result $ENG1 ENG1 -eval create table tb3_eng1 ( - i1 int NOT NULL auto_increment, primary key (i1), - $column_list -) engine=$ENG1 -PARTITION BY KEY (i1) PARTITIONS 4 -(PARTITION part1, -PARTITION part2, -PARTITION part3, -PARTITION part4); - -#--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR -eval load data local infile '$MYSQL_TEST_DIR/suite/system_3/data/tb1.txt' - into table tb3_eng1 ($col_access_list); - -if ($WITH_TRIGGERS) -{ -delimiter //; - -Create trigger tb3_eng1_ins after insert on tb3_eng1 for each row -BEGIN - insert into tb1_logs (dt1, entry_dsc, f4) - values (now(), concat('Insert row ', new.f1,' ', - new.f2, ' ', new.f3, ' (tb3_eng1)'), new.f1); -END// - -Create trigger tb3_eng1_upd after update on tb3_eng1 for each row -BEGIN - insert into tb1_logs (dt1, entry_dsc, f4) - values (now(), concat('Update row ', old.f1,' ', old.f2, '->', - new.f2, ' ', old.f3, '->', new.f3, ' (tb3_eng1)'), new.f1); -END// - -Create trigger tb3_eng1_del after delete on tb3_eng1 for each row -BEGIN - insert into tb1_logs (dt1, entry_dsc, f4) - values (now(), concat('Delete row ', old.f1,' ', old.f2, ' ', - old.f3, ' (tb3_eng1)'), old.f1); -END// - -delimiter ;// -} -delimiter //; - -# This functions returns a random integer number -# between zero and 'num' -#----------------------------------------------- -create function int_rand(num int) returns int -BEGIN - return round(num*rand()+0.5); -END// - -# This function returns a string in the length 'len' of -# random letters (ascii range of 65-122) -#------------------------------------------------------ -create function str_rand (len int) returns char(12) -BEGIN - declare tmp_letter char(1); - declare tmp_word char(12); - declare word_str char(12) default ''; - wl_loop: WHILE len DO - set tmp_letter=char(round(57*rand()+65)); - set tmp_word=concat(word_str,tmp_letter); - set word_str=tmp_word; - set len=len-1; - END WHILE wl_loop; - return word_str; -END// - - -# This procedure scans 'tb1_master' table for rows where f1='num_pr' -# and for each row inserts a row in 'tb3_eng1' -#------------------------------------------------------------------ -eval create procedure ins_tb3_eng1 (num_pr int, str_pr char(15)) -BEGIN - declare done int default 0; - declare v3 decimal(5,3); - declare cur1 cursor for - select f3 from tb1_master where f1=num_pr; - declare continue handler for sqlstate '01000' set done = 1; - declare continue handler for sqlstate '02000' set done = 1; - open cur1; - fetch cur1 into v3; - wl_loop: WHILE NOT done DO - insert into tb3_eng1 ($col_access_list) values - (int_rand(@f1_nums), concat('I:',str_pr,'-',num_pr), v3, now()); - fetch cur1 into v3; - END WHILE wl_loop; - close cur1; -END// - - -# This procedure does selects from the 'tb1_logs' and inserts the -# count into the table -#------------------------------------------------------------------ -create procedure slct_tb1_logs () -BEGIN - declare done int default 0; - declare v4 int; - declare v_count int default 0; - declare str_val char(15) default ELT(int_rand(3), - 'Insert', 'Update', 'Delete'); - declare cur1 cursor for - select f4 from tb1_logs where entry_dsc like concat('%',str_val,'%'); - declare continue handler for sqlstate '01000' set done = 1; - declare continue handler for sqlstate '02000' set done = 1; - open cur1; - fetch cur1 into v4; - wl_loop: WHILE NOT done DO - set v_count=v_count+1; - fetch cur1 into v4; - END WHILE wl_loop; - close cur1; - insert into tb1_logs (dt1, entry_dsc, f4) - values (now(), concat('Number of \'', str_val, '\' rows is: ', - v_count, ' (tb1_log)'),0); -END// - -delimiter ;// - ---disable_abort_on_error -insert into systest1.tb3_eng1 values (NULL,50,'init_val',12.345,'2005-01-01 00:00:00'); -insert into systest1.tb3_eng1 values (NULL,70,'init_val',12.345,'2005-01-01 00:00:00'); ---enable_abort_on_error - -connection default;0. ---disable_abort_on_error ---replace_result $CLIENT_HOST CLIENT_HOST -eval create user syst1user@'$CLIENT_HOST'; ---enable_abort_on_error ---replace_result $CLIENT_HOST CLIENT_HOST -eval set password for syst1user@'$CLIENT_HOST' = password('systpass'); ---replace_result $CLIENT_HOST CLIENT_HOST -eval grant ALL on systest1.* to syst1user@'$CLIENT_HOST'; -use systest1; ---replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK -connect (syst1user,localhost,syst1user,systpass,systest1,$MASTER_MYPORT,$MASTER_MYSOCK); - ---source suite/system_3/include/system_3_init.inc -use systest1; -let $NUM_VAL=`SELECT @NUM_VAL`; -eval SET @f1_nums=$NUM_VAL; -SET @tmp_num=int_rand(@f1_nums); -SET @tmp_word=str_rand(4); - -# DEBUG select @tmp_num, @tmp_word; - -# Insert rows replacing the deleted rows using a strored procedure -# that reads the rows from a master table -CALL ins_tb3_eng1 (@tmp_num, @tmp_word); - -connection syst1user; ---source suite/system_3/include/system_3_init.inc -use systest1; -let $NUM_VAL=`SELECT @NUM_VAL`; -eval SET @f1_nums=$NUM_VAL; -SET @tmp_num=int_rand(@f1_nums); -SET @tmp_word=str_rand(4); - -# DEBUG select @tmp_num, @tmp_word; - -# Insert rows replacing the deleted rows using a strored procedure -# that reads the rows from a master table -CALL ins_tb3_eng1 (@tmp_num, @tmp_word); - -connection systuser; ---source suite/system_3/include/system_3_init.inc -use systest1; -call slct_tb1_logs(); - -connection syst1user; ---source suite/system_3/include/system_3_init.inc -use systest1; -let $NUM_VAL=`SELECT @NUM_VAL`; -eval set @f1_nums=$NUM_VAL; -set @tmp_num=int_rand(@f1_nums); -set @tmp_word=str_rand(4); - -select @tmp_num, @tmp_word; - -# Update all rows in the table where f1 is one less the random number -update tb3_eng1 - set f2=concat('U:',@tmp_word,'-',@tmp_num), f3=f3+1 - where f1=@tmp_num-1; - -connection systuser; ---source suite/system_3/include/system_3_init.inc -use systest1; -let $NUM_VAL=`SELECT @NUM_VAL`; -eval set @f1_nums=$NUM_VAL; -set @tmp_num=int_rand(@f1_nums); -set @tmp_word=str_rand(4); - -select @tmp_num, @tmp_word; - -# Update all rows in the table where f1 is one less the random number -update tb3_eng1 - set f2=concat('U:',@tmp_word,'-',@tmp_num), f3=f3+1 - where f1=@tmp_num-1; - -connection syst1user; ---source suite/system_3/include/system_3_init.inc -use systest1; -call slct_tb1_logs(); - -connection systuser; ---source suite/system_3/include/system_3_init.inc -use systest1; -let $NUM_VAL=`SELECT @NUM_VAL`; -eval set @f1_nums=$NUM_VAL; -set @tmp_num=int_rand(@f1_nums); -set @tmp_word=str_rand(4); - -select @tmp_num, @tmp_word; - -# Update all rows in the table where f1 is one less the random number -update tb3_eng1 - set f2=concat('U:',@tmp_word,'-',@tmp_num), f3=f3+1 - where f1=@tmp_num-1; - - -connection syst1user; ---source suite/system_3/include/system_3_init.inc -use systest1; -#--replace_result $NUM_VAL <NUM_VAL> -let $NUM_VAL=`SELECT @NUM_VAL`; -eval set @f1_nums=$NUM_VAL; -set @tmp_num=int_rand(@f1_nums); -select @tmp_num; - -# DEBUG select @tmp_num, @tmp_word; - -# Delete all rows from the table where f1 is equal to the above number -delete from tb3_eng1 where f1=@tmp_num; - -connection systuser; ---source suite/system_3/include/system_3_init.inc -use systest1; -select * from tb3_eng1 where f1>40; - - -connection syst1user; ---source suite/system_3/include/system_3_init.inc -use systest1; -let $NUM_VAL=`SELECT @NUM_VAL`; -eval set @f1_nums=$NUM_VAL; -set @tmp_num=int_rand(@f1_nums); -select @tmp_num; - -# DEBUG select @tmp_num, @tmp_word; - -# Delete all rows from the table where f1 is equal to the above number -delete from tb3_eng1 where f1=@tmp_num; - -connection systuser; ---source suite/system_3/include/system_3_init.inc -use systest1; -select * from tb3_eng1 where f1>40; - -connection syst1user; ---source suite/system_3/include/system_3_init.inc -use systest1; -let $NUM_VAL=`SELECT @NUM_VAL`; -eval set @f1_nums=$NUM_VAL; -set @tmp_num=int_rand(@f1_nums); -select @tmp_num; - -select @tmp_num, @tmp_word; - -# Delete all rows from the table where f1 is equal to the above number -delete from tb3_eng1 where f1=@tmp_num; - -connection systuser; ---source suite/system_3/include/system_3_init.inc -use systest1; -select * from tb3_eng1 where f1>40; diff --git a/mysql-test/suite/parts/t/partition_special_innodb.test b/mysql-test/suite/parts/t/partition_special_innodb.test index b9fc8bdcd56..eac19f6d588 100644 --- a/mysql-test/suite/parts/t/partition_special_innodb.test +++ b/mysql-test/suite/parts/t/partition_special_innodb.test @@ -68,10 +68,12 @@ INSERT INTO t1 VALUES (NULL, 'first row t2'); --connection con2 SET autocommit=OFF; +--error ER_LOCK_WAIT_TIMEOUT ALTER TABLE t1 AUTO_INCREMENT = 10; --connection con1 INSERT INTO t1 VALUES (NULL, 'second row t2'); +SELECT a,b FROM t1 ORDER BY a; --disconnect con2 --disconnect con1 --connection default diff --git a/mysql-test/suite/parts/t/partition_value_innodb.test b/mysql-test/suite/parts/t/partition_value_innodb.test index 9d59533a54e..fe47f533107 100644 --- a/mysql-test/suite/parts/t/partition_value_innodb.test +++ b/mysql-test/suite/parts/t/partition_value_innodb.test @@ -8,9 +8,9 @@ #------------------------------------------------------------------------------# # Original Author: mleich # # Original Date: 2006-04-11 # -# Change Author: # -# Change Date: # -# Change: # +# Change Author: mleich # +# Change Date: 2008-12-08 # +# Change: Remove test from disabled.def + change test that it gets skipped # ################################################################################ # @@ -22,6 +22,12 @@ # any of the variables. # +# +# CAST() within the partitioning function si no more supported, but we get +# this functionality probably soon again. Therefor we do not delete this test. +--skip # CAST() in partitioning function is currently not supported. + + #------------------------------------------------------------------------------# # General not engine specific settings and requirements diff --git a/mysql-test/suite/parts/t/partition_value_myisam.test b/mysql-test/suite/parts/t/partition_value_myisam.test index d6020669509..026ad57f0b2 100644 --- a/mysql-test/suite/parts/t/partition_value_myisam.test +++ b/mysql-test/suite/parts/t/partition_value_myisam.test @@ -8,9 +8,9 @@ #------------------------------------------------------------------------------# # Original Author: mleich # # Original Date: 2006-04-11 # -# Change Author: # -# Change Date: # -# Change: # +# Change Author: mleich # +# Change Date: 2008-12-08 # +# Change: Remove test from disabled.def + change test that it gets skipped # ################################################################################ # @@ -22,6 +22,12 @@ # any of the variables. # +# +# CAST() within the partitioning function si no more supported, but we get +# this functionality probably soon again. Therefor we do not delete this test. +--skip # CAST() in partitioning function is currently not supported. + + #------------------------------------------------------------------------------# # General not engine specific settings and requirements diff --git a/mysql-test/suite/parts/t/partition_value_ndb.test b/mysql-test/suite/parts/t/partition_value_ndb.test index 2f948b95727..80b4ba6fb64 100644 --- a/mysql-test/suite/parts/t/partition_value_ndb.test +++ b/mysql-test/suite/parts/t/partition_value_ndb.test @@ -8,9 +8,9 @@ #------------------------------------------------------------------------------# # Original Author: mleich # # Original Date: 2006-04-11 # -# Change Author: # -# Change Date: # -# Change: # +# Change Author: mleich # +# Change Date: 2008-12-08 # +# Change: Remove test from disabled.def + change test that it gets skipped # ################################################################################ # @@ -22,6 +22,12 @@ # any of the variables. # +# +# CAST() within the partitioning function si no more supported, but we get +# this functionality probably soon again. Therefor we do not delete this test. +--skip # CAST() in partitioning function is currently not supported. + + #------------------------------------------------------------------------------# # General not engine specific settings and requirements diff --git a/mysql-test/suite/rpl/r/rpl_auto_increment.result b/mysql-test/suite/rpl/r/rpl_auto_increment.result index 083f3a4e901..2a4c3a09361 100644 --- a/mysql-test/suite/rpl/r/rpl_auto_increment.result +++ b/mysql-test/suite/rpl/r/rpl_auto_increment.result @@ -227,3 +227,20 @@ select * from t3 order by a; a 127 drop table t1,t2,t3; +set auto_increment_increment=1; +set auto_increment_offset=1; +CREATE TABLE t1 (id MEDIUMINT NOT NULL AUTO_INCREMENT PRIMARY KEY) ENGINE=innodb; +INSERT INTO t1 VALUES (NULL), (NULL), (NULL); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1 +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1 +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_binlog_corruption.result b/mysql-test/suite/rpl/r/rpl_binlog_corruption.result new file mode 100644 index 00000000000..f94d2833603 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_binlog_corruption.result @@ -0,0 +1,8 @@ +call mtr.add_suppression('Found invalid event in binary log'); +==== Initialize ==== +Setting up fake replication from MYSQL_TEST_DIR/std_data/bug40482-bin.000001 +==== Test ==== +START SLAVE SQL_THREAD; +Last_SQL_Error = Relay log read failure: Could not parse relay log event entry. The possible reasons are: the master's binary log is corrupted (you can check this by running 'mysqlbinlog' on the binary log), the slave's relay log is corrupted (you can check this by running 'mysqlbinlog' on the relay log), a network problem, or a bug in the master's or slave's MySQL code. If you want to check the master's binary log or slave's relay log, you will be able to know their names by issuing 'SHOW SLAVE STATUS' on this slave. +==== Clean up ==== +Cleaning up after setup_fake_relay_log.inc diff --git a/mysql-test/suite/rpl/r/rpl_packet.result b/mysql-test/suite/rpl/r/rpl_packet.result index 816e0f3df62..4c64054e348 100644 --- a/mysql-test/suite/rpl/r/rpl_packet.result +++ b/mysql-test/suite/rpl/r/rpl_packet.result @@ -29,7 +29,7 @@ SET @@global.max_allowed_packet=4096; SET @@global.net_buffer_length=4096; include/stop_slave.inc include/start_slave.inc -CREATE TABLe `t1` (`f1` LONGTEXT) ENGINE=MyISAM; +CREATE TABLE `t1` (`f1` LONGTEXT) ENGINE=MyISAM; INSERT INTO `t1`(`f1`) VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa2048'); Slave_IO_Running = No (expect No) ==== clean up ==== diff --git a/mysql-test/suite/rpl/r/rpl_row_create_table.result b/mysql-test/suite/rpl/r/rpl_row_create_table.result index b6dede79b9d..29f58632fde 100644 --- a/mysql-test/suite/rpl/r/rpl_row_create_table.result +++ b/mysql-test/suite/rpl/r/rpl_row_create_table.result @@ -4,34 +4,39 @@ reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; +**** Resetting master and slave **** +include/stop_slave.inc +RESET SLAVE; +RESET MASTER; +include/start_slave.inc CREATE TABLE t1 (a INT, b INT); CREATE TABLE t2 (a INT, b INT) ENGINE=Merge; CREATE TABLE t3 (a INT, b INT) CHARSET=utf8; CREATE TABLE t4 (a INT, b INT) ENGINE=Merge CHARSET=utf8; -SHOW BINLOG EVENTS FROM 216; +SHOW BINLOG EVENTS FROM 106; Log_name # -Pos 216 +Pos 106 Event_type Query Server_id # -End_log_pos 309 +End_log_pos 199 Info use `test`; CREATE TABLE t1 (a INT, b INT) Log_name # -Pos 309 +Pos 199 Event_type Query Server_id # -End_log_pos 415 +End_log_pos 305 Info use `test`; CREATE TABLE t2 (a INT, b INT) ENGINE=Merge Log_name # -Pos 415 +Pos 305 Event_type Query Server_id # -End_log_pos 521 +End_log_pos 411 Info use `test`; CREATE TABLE t3 (a INT, b INT) CHARSET=utf8 Log_name # -Pos 521 +Pos 411 Event_type Query Server_id # -End_log_pos 640 +End_log_pos 530 Info use `test`; CREATE TABLE t4 (a INT, b INT) ENGINE=Merge CHARSET=utf8 **** On Master **** SHOW CREATE TABLE t1; @@ -125,9 +130,14 @@ NULL 3 6 NULL 4 2 NULL 5 10 NULL 6 12 +**** Resetting master and slave **** +include/stop_slave.inc +RESET SLAVE; +RESET MASTER; +include/start_slave.inc CREATE TABLE t7 (UNIQUE(b)) SELECT a,b FROM tt3; ERROR 23000: Duplicate entry '2' for key 'b' -SHOW BINLOG EVENTS FROM 1374; +SHOW BINLOG EVENTS FROM 106; Log_name Pos Event_type Server_id End_log_pos Info CREATE TABLE t7 (a INT, b INT UNIQUE); INSERT INTO t7 SELECT a,b FROM tt3; @@ -137,18 +147,23 @@ a b 1 2 2 4 3 6 -SHOW BINLOG EVENTS FROM 1374; +SHOW BINLOG EVENTS FROM 106; Log_name Pos Event_type Server_id End_log_pos Info -# 1374 Query # 1474 use `test`; CREATE TABLE t7 (a INT, b INT UNIQUE) -# 1474 Query # 1542 use `test`; BEGIN -# 1542 Table_map # 1584 table_id: # (test.t7) -# 1584 Write_rows # 1640 table_id: # flags: STMT_END_F -# 1640 Query # 1711 use `test`; ROLLBACK +# 106 Query # 206 use `test`; CREATE TABLE t7 (a INT, b INT UNIQUE) +# 206 Query # 274 use `test`; BEGIN +# 274 Table_map # 316 table_id: # (test.t7) +# 316 Write_rows # 372 table_id: # flags: STMT_END_F +# 372 Query # 443 use `test`; ROLLBACK SELECT * FROM t7 ORDER BY a,b; a b 1 2 2 4 3 6 +**** Resetting master and slave **** +include/stop_slave.inc +RESET SLAVE; +RESET MASTER; +include/start_slave.inc CREATE TEMPORARY TABLE tt4 (a INT, b INT); INSERT INTO tt4 VALUES (4,8), (5,10), (6,12); BEGIN; @@ -156,12 +171,12 @@ INSERT INTO t7 SELECT a,b FROM tt4; ROLLBACK; Warnings: Warning 1196 Some non-transactional changed tables couldn't be rolled back -SHOW BINLOG EVENTS FROM 1711; +SHOW BINLOG EVENTS FROM 106; Log_name Pos Event_type Server_id End_log_pos Info -# 1711 Query # 1779 use `test`; BEGIN -# 1779 Table_map # 1821 table_id: # (test.t7) -# 1821 Write_rows # 1877 table_id: # flags: STMT_END_F -# 1877 Query # 1946 use `test`; COMMIT +# 106 Query # 174 use `test`; BEGIN +# 174 Table_map # 216 table_id: # (test.t7) +# 216 Write_rows # 272 table_id: # flags: STMT_END_F +# 272 Query # 343 use `test`; ROLLBACK SELECT * FROM t7 ORDER BY a,b; a b 1 2 @@ -178,6 +193,11 @@ a b 4 8 5 10 6 12 +**** Resetting master and slave **** +include/stop_slave.inc +RESET SLAVE; +RESET MASTER; +include/start_slave.inc CREATE TABLE t8 LIKE t4; CREATE TABLE t9 LIKE tt4; CREATE TEMPORARY TABLE tt5 LIKE t4; @@ -196,10 +216,10 @@ Create Table CREATE TABLE `t9` ( `a` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -SHOW BINLOG EVENTS FROM 1946; +SHOW BINLOG EVENTS FROM 106; Log_name Pos Event_type Server_id End_log_pos Info -# 1946 Query # 2032 use `test`; CREATE TABLE t8 LIKE t4 -# 2032 Query # 2171 use `test`; CREATE TABLE `t9` ( +# 106 Query # 192 use `test`; CREATE TABLE t8 LIKE t4 +# 192 Query # 331 use `test`; CREATE TABLE `t9` ( `a` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL ) @@ -276,9 +296,8 @@ a 1 2 3 -SHOW BINLOG EVENTS; +SHOW BINLOG EVENTS FROM 106; Log_name Pos Event_type Server_id End_log_pos Info -# 4 Format_desc # 106 Server ver: #, Binlog ver: # # 106 Query # 192 use `test`; CREATE TABLE t1 (a INT) # 192 Query # 260 use `test`; BEGIN # 260 Table_map # 301 table_id: # (test.t1) @@ -308,7 +327,7 @@ Log_name Pos Event_type Server_id End_log_pos Info # 1329 Query # 1397 use `test`; BEGIN # 1397 Table_map # 1438 table_id: # (test.t1) # 1438 Write_rows # 1482 table_id: # flags: STMT_END_F -# 1482 Query # 1551 use `test`; COMMIT +# 1482 Query # 1553 use `test`; ROLLBACK SHOW TABLES; Tables_in_test t1 @@ -371,9 +390,8 @@ a 4 6 9 -SHOW BINLOG EVENTS; +SHOW BINLOG EVENTS FROM 106; Log_name Pos Event_type Server_id End_log_pos Info -# 4 Format_desc # 106 Server ver: #, Binlog ver: # # 106 Query # 192 use `test`; CREATE TABLE t1 (a INT) # 192 Query # 260 use `test`; BEGIN # 260 Table_map # 301 table_id: # (test.t1) @@ -394,6 +412,11 @@ a 6 9 TRUNCATE TABLE t2; +**** Resetting master and slave **** +include/stop_slave.inc +RESET SLAVE; +RESET MASTER; +include/start_slave.inc BEGIN; INSERT INTO t2 SELECT a*a FROM t1; CREATE TEMPORARY TABLE tt2 @@ -406,14 +429,14 @@ Warnings: Warning 1196 Some non-transactional changed tables couldn't be rolled back SELECT * FROM t2 ORDER BY a; a -SHOW BINLOG EVENTS FROM 949; +SHOW BINLOG EVENTS FROM 106; Log_name Pos Event_type Server_id End_log_pos Info -# 949 Query # 1017 use `test`; BEGIN -# 1017 Table_map # 1058 table_id: # (test.t2) -# 1058 Write_rows # 1102 table_id: # flags: STMT_END_F -# 1102 Table_map # 1143 table_id: # (test.t2) -# 1143 Write_rows # 1182 table_id: # flags: STMT_END_F -# 1182 Query # 1253 use `test`; ROLLBACK +# 106 Query # 174 use `test`; BEGIN +# 174 Table_map # 215 table_id: # (test.t2) +# 215 Write_rows # 259 table_id: # flags: STMT_END_F +# 259 Table_map # 300 table_id: # (test.t2) +# 300 Write_rows # 339 table_id: # flags: STMT_END_F +# 339 Query # 410 use `test`; ROLLBACK SELECT * FROM t2 ORDER BY a; a DROP TABLE t1,t2; diff --git a/mysql-test/suite/rpl/r/rpl_slave_skip.result b/mysql-test/suite/rpl/r/rpl_slave_skip.result index 75d1c019098..747e8f235a8 100644 --- a/mysql-test/suite/rpl/r/rpl_slave_skip.result +++ b/mysql-test/suite/rpl/r/rpl_slave_skip.result @@ -174,6 +174,7 @@ DROP TRIGGER tr2; INSERT INTO t1 VALUES (3,'master/slave'); INSERT INTO t2 VALUES (3,'master/slave'); INSERT INTO t3 VALUES (3,'master/slave'); +COMMIT; SELECT * FROM t1 ORDER BY a; a b 2 master only diff --git a/mysql-test/suite/rpl/r/rpl_trigger.result b/mysql-test/suite/rpl/r/rpl_trigger.result index 68c82ed037f..b68af8f4afe 100644 --- a/mysql-test/suite/rpl/r/rpl_trigger.result +++ b/mysql-test/suite/rpl/r/rpl_trigger.result @@ -975,3 +975,22 @@ a b 2 b 3 c drop table t1; +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +create table t1 ( f int ) engine = innodb; +create table log ( r int ) engine = myisam; +create trigger tr +after insert on t1 +for each row insert into log values ( new.f ); +set autocommit = 0; +insert into t1 values ( 1 ); +rollback; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +Comparing tables master:test.t1 and slave:test.t1 +Comparing tables master:test.log and slave:test.log +drop table t1, log; diff --git a/mysql-test/suite/rpl/t/disabled.def b/mysql-test/suite/rpl/t/disabled.def index 8cae44a3607..f3f329c4b5b 100644 --- a/mysql-test/suite/rpl/t/disabled.def +++ b/mysql-test/suite/rpl/t/disabled.def @@ -10,3 +10,4 @@ # ############################################################################## +rpl_binlog_corruption : BUG#41793 2008-12-30 sven rpl_binlog_corruption disabled in main (needs new mtr) diff --git a/mysql-test/suite/rpl/t/rpl_binlog_corruption-master.opt b/mysql-test/suite/rpl/t/rpl_binlog_corruption-master.opt new file mode 100644 index 00000000000..815a8f81d32 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_binlog_corruption-master.opt @@ -0,0 +1 @@ +--replicate-same-server-id --relay-log=slave-relay-bin diff --git a/mysql-test/suite/rpl/t/rpl_binlog_corruption.test b/mysql-test/suite/rpl/t/rpl_binlog_corruption.test new file mode 100644 index 00000000000..39799180f8b --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_binlog_corruption.test @@ -0,0 +1,42 @@ +# ==== Purpose ==== +# +# Verify that the slave stops gracefully when reading a relay log with +# corrupted data. +# +# ==== Implementation ==== +# +# Setup "fake replication" where the slave only starts the SQL thread, +# not the IO thread, and reads from an existing relay log that has +# been prepared so that it contains the error. This requires some +# extra server options: see the -master.opt file. +# +# ==== Related bugs ==== +# +# BUG#31793: log event corruption causes crash +# BUG#40482: server/mysqlbinlog crashes when reading invalid Incident_log_event + +source include/have_log_bin.inc; +# BUG#40482 only manifested itself in debug-compiled binaries. +source include/have_debug.inc; + +call mtr.add_suppression('Found invalid event in binary log'); + + +# +# BUG#40482: server/mysqlbinlog crashes when reading invalid Incident_log_event +# +# The relay log contains an Incident_log_event with a non-existing +# incident number. + +--echo ==== Initialize ==== +let $fake_relay_log= $MYSQL_TEST_DIR/std_data/bug40482-bin.000001; +source include/setup_fake_relay_log.inc; + +--echo ==== Test ==== +START SLAVE SQL_THREAD; +source include/wait_for_slave_sql_error.inc; +let $error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Error, 1); +--echo Last_SQL_Error = $error + +--echo ==== Clean up ==== +source include/cleanup_fake_relay_log.inc; diff --git a/mysql-test/suite/rpl/t/rpl_packet.test b/mysql-test/suite/rpl/t/rpl_packet.test index aefae7563d4..79cb2d9d735 100644 --- a/mysql-test/suite/rpl/t/rpl_packet.test +++ b/mysql-test/suite/rpl/t/rpl_packet.test @@ -73,7 +73,11 @@ disconnect master; connect (master, localhost, root); connection master; -CREATE TABLe `t1` (`f1` LONGTEXT) ENGINE=MyISAM; +CREATE TABLE `t1` (`f1` LONGTEXT) ENGINE=MyISAM; + +sync_slave_with_master; + +connection master; INSERT INTO `t1`(`f1`) VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa2048'); @@ -83,7 +87,6 @@ connection slave; let $slave_io_running= query_get_value(SHOW SLAVE STATUS, Slave_IO_Running, 1); --echo Slave_IO_Running = $slave_io_running (expect No) - --echo ==== clean up ==== connection master; DROP TABLE t1; diff --git a/mysql-test/suite/rpl/t/rpl_row_create_table.test b/mysql-test/suite/rpl/t/rpl_row_create_table.test index e4825a4abfd..319f9546a81 100644 --- a/mysql-test/suite/rpl/t/rpl_row_create_table.test +++ b/mysql-test/suite/rpl/t/rpl_row_create_table.test @@ -29,6 +29,8 @@ SET GLOBAL storage_engine=memory; START SLAVE; --enable_query_log +--source include/reset_master_and_slave.inc + connection master; CREATE TABLE t1 (a INT, b INT); CREATE TABLE t2 (a INT, b INT) ENGINE=Merge; @@ -36,7 +38,7 @@ CREATE TABLE t3 (a INT, b INT) CHARSET=utf8; CREATE TABLE t4 (a INT, b INT) ENGINE=Merge CHARSET=utf8; --replace_column 1 # 4 # --replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ ---query_vertical SHOW BINLOG EVENTS FROM 216 +--query_vertical SHOW BINLOG EVENTS FROM 106 --echo **** On Master **** --query_vertical SHOW CREATE TABLE t1 --query_vertical SHOW CREATE TABLE t2 @@ -65,6 +67,8 @@ SELECT * FROM t5 ORDER BY a,b,c; --query_vertical SHOW CREATE TABLE t6 SELECT * FROM t6 ORDER BY a,b,c; +--source include/reset_master_and_slave.inc + connection master; # Test for erroneous constructions --error ER_DUP_ENTRY @@ -72,7 +76,7 @@ CREATE TABLE t7 (UNIQUE(b)) SELECT a,b FROM tt3; # Shouldn't be written to the binary log --replace_column 1 # 4 # --replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ -SHOW BINLOG EVENTS FROM 1374; +SHOW BINLOG EVENTS FROM 106; # Test that INSERT-SELECT works the same way as for SBR. CREATE TABLE t7 (a INT, b INT UNIQUE); @@ -82,10 +86,12 @@ SELECT * FROM t7 ORDER BY a,b; # Should be written to the binary log --replace_column 1 # 4 # --replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ -SHOW BINLOG EVENTS FROM 1374; +SHOW BINLOG EVENTS FROM 106; sync_slave_with_master; SELECT * FROM t7 ORDER BY a,b; +--source include/reset_master_and_slave.inc + connection master; CREATE TEMPORARY TABLE tt4 (a INT, b INT); INSERT INTO tt4 VALUES (4,8), (5,10), (6,12); @@ -94,11 +100,13 @@ INSERT INTO t7 SELECT a,b FROM tt4; ROLLBACK; --replace_column 1 # 4 # --replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ -SHOW BINLOG EVENTS FROM 1711; +SHOW BINLOG EVENTS FROM 106; SELECT * FROM t7 ORDER BY a,b; sync_slave_with_master; SELECT * FROM t7 ORDER BY a,b; +--source include/reset_master_and_slave.inc + connection master; CREATE TABLE t8 LIKE t4; CREATE TABLE t9 LIKE tt4; @@ -110,7 +118,7 @@ CREATE TEMPORARY TABLE tt7 SELECT 1; --query_vertical SHOW CREATE TABLE t9 --replace_column 1 # 4 # --replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ -SHOW BINLOG EVENTS FROM 1946; +SHOW BINLOG EVENTS FROM 106; sync_slave_with_master; --echo **** On Slave **** --query_vertical SHOW CREATE TABLE t8 @@ -162,7 +170,7 @@ SELECT * FROM t3 ORDER BY a; SELECT * FROM t4 ORDER BY a; --replace_column 1 # 4 # --replace_regex /\/\* xid=.* \*\//\/* XID *\// /Server ver: .*, Binlog ver: .*/Server ver: #, Binlog ver: #/ /table_id: [0-9]+/table_id: #/ -SHOW BINLOG EVENTS; +SHOW BINLOG EVENTS FROM 106; sync_slave_with_master; SHOW TABLES; SELECT TABLE_NAME,ENGINE @@ -208,13 +216,17 @@ COMMIT; SELECT * FROM t2 ORDER BY a; --replace_column 1 # 4 # --replace_regex /\/\* xid=.* \*\//\/* XID *\// /Server ver: .*, Binlog ver: .*/Server ver: #, Binlog ver: #/ /table_id: [0-9]+/table_id: #/ -SHOW BINLOG EVENTS; +SHOW BINLOG EVENTS FROM 106; sync_slave_with_master; SELECT * FROM t2 ORDER BY a; connection master; TRUNCATE TABLE t2; +sync_slave_with_master; + +--source include/reset_master_and_slave.inc +connection master; BEGIN; INSERT INTO t2 SELECT a*a FROM t1; CREATE TEMPORARY TABLE tt2 @@ -227,7 +239,7 @@ ROLLBACK; SELECT * FROM t2 ORDER BY a; --replace_column 1 # 4 # --replace_regex /\/\* xid=.* \*\//\/* XID *\// /Server ver: .*, Binlog ver: .*/Server ver: #, Binlog ver: #/ /table_id: [0-9]+/table_id: #/ -SHOW BINLOG EVENTS FROM 949; +SHOW BINLOG EVENTS FROM 106; sync_slave_with_master; SELECT * FROM t2 ORDER BY a; diff --git a/mysql-test/suite/rpl/t/rpl_slave_skip.test b/mysql-test/suite/rpl/t/rpl_slave_skip.test index e87fa251c80..f4cb0f69e93 100644 --- a/mysql-test/suite/rpl/t/rpl_slave_skip.test +++ b/mysql-test/suite/rpl/t/rpl_slave_skip.test @@ -120,6 +120,7 @@ DROP TRIGGER tr2; INSERT INTO t1 VALUES (3,'master/slave'); INSERT INTO t2 VALUES (3,'master/slave'); INSERT INTO t3 VALUES (3,'master/slave'); +COMMIT; SELECT * FROM t1 ORDER BY a; SELECT * FROM t2 ORDER BY a; diff --git a/mysql-test/suite/rpl/t/rpl_trigger.test b/mysql-test/suite/rpl/t/rpl_trigger.test index c16abc98c0d..f3e7841ce9f 100644 --- a/mysql-test/suite/rpl/t/rpl_trigger.test +++ b/mysql-test/suite/rpl/t/rpl_trigger.test @@ -469,20 +469,48 @@ drop trigger if exists t1_bi; insert into t1 values (3, "c"); select * from t1; - -save_master_pos; -connection slave; -sync_with_master; - +sync_slave_with_master; select * from t1; connection master; drop table t1; +sync_slave_with_master; # -# End of tests +# Bug#40116: Uncommited changes are replicated and stay on slave after +# rollback on master # -save_master_pos; + +connection master; +source include/master-slave-reset.inc; +source include/have_innodb.inc; connection slave; -sync_with_master; +source include/have_innodb.inc; + +connection master; +create table t1 ( f int ) engine = innodb; +create table log ( r int ) engine = myisam; +create trigger tr + after insert on t1 + for each row insert into log values ( new.f ); + +set autocommit = 0; +insert into t1 values ( 1 ); +rollback; + +let $diff_table_1=master:test.t1; +let $diff_table_2=slave:test.t1; +--source include/diff_tables.inc + +let $diff_table_1=master:test.log; +let $diff_table_2=slave:test.log; +--source include/diff_tables.inc + +connection master; +drop table t1, log; +sync_slave_with_master; + +# +# End of tests +# diff --git a/mysql-test/suite/rpl_ndb/t/disabled.def b/mysql-test/suite/rpl_ndb/t/disabled.def index ebc99feeac6..694f7098980 100644 --- a/mysql-test/suite/rpl_ndb/t/disabled.def +++ b/mysql-test/suite/rpl_ndb/t/disabled.def @@ -10,7 +10,7 @@ # ############################################################################## -rpl_ndb_circular : Bug#33849 COMMIT event missing in cluster circular replication. -rpl_ndb_circular_simplex : Bug#33849 COMMIT event missing in cluster circular replication. +rpl_ndb_circular : Bug#41183 rpl_ndb_circular, rpl_ndb_circular_simplex need maintenance, crash +rpl_ndb_circular_simplex : Bug#41183 rpl_ndb_circular, rpl_ndb_circular_simplex need maintenance, crash # the below testcase have been reworked to avoid the bug, test contains comment, keep bug open diff --git a/mysql-test/suite/sys_vars/inc/key_buffer_size_basic.inc b/mysql-test/suite/sys_vars/inc/key_buffer_size_basic.inc index 996a9e712f9..a8fa50a6a23 100644 --- a/mysql-test/suite/sys_vars/inc/key_buffer_size_basic.inc +++ b/mysql-test/suite/sys_vars/inc/key_buffer_size_basic.inc @@ -17,14 +17,14 @@ # * Valid & Invalid values # # * Scope & Access method # # * Data Integrity # +# Modified: Horst Hunger 2008-11-27 # +# Due to OS depending values the check has been changed # +# from concrete values to ranges. # # # -# Reference: http://dev.mysql.com/doc/refman/5.1/en/ # -# server-system-variables.html # +# Reference: # +# http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html # # # ############################################################################### -# Changes: # -# 2008-03-06 hhunger Got "lost connections with 5.1.24 # -######################################################################## --source include/load_sysvars.inc @@ -38,8 +38,6 @@ ######################################################################## SET @start_value = @@global.key_buffer_size; -SELECT @start_value; - --echo '#--------------------FN_DYNVARS_055_01------------------------#' ######################################################################## @@ -49,9 +47,7 @@ SELECT @start_value; SET @@global.key_buffer_size = 99; --Error ER_NO_DEFAULT SET @@global.key_buffer_size = DEFAULT; ---echo 'Bug# 34878: This variable has default value according to documentation'; -SELECT @@global.key_buffer_size = @min_key_buffer_size; - +SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; --echo '#---------------------FN_DYNVARS_055_02-------------------------#' ############################################### @@ -66,26 +62,25 @@ SELECT @@global.key_buffer_size = @start_value; # Change the value of key_buffer_size to a valid value # ######################################################################## -SET @@global.key_buffer_size = @min_key_buffer_size; -SELECT @@global.key_buffer_size= @min_key_buffer_size; +SET @@global.key_buffer_size = 8 ; +SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; --disable_warnings -#Due to "lost connection" +#Due to increasing the runtime significantly and allocating the buffer instantly. #SET @@global.key_buffer_size = 4294967295; --enable_warnings #SELECT @@global.key_buffer_size; SET @@global.key_buffer_size = 1800; -SELECT @@global.key_buffer_size = @min_key_buffer_size; +SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; SET @@global.key_buffer_size = 65535; SELECT @@global.key_buffer_size; -echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable'; - --echo '#--------------------FN_DYNVARS_055_04-------------------------#' ########################################################################### # Change the value of key_buffer_size to invalid value # ########################################################################### -# Due to "lost connection" +# Due to increasing the runtime significantly and allocating the buffer instantly +# with a size of 18446744073709551615 bytes with 32bit exec. #SET @@global.key_buffer_size = -1; #SELECT @@global.key_buffer_size; #SET @@global.key_buffer_size = 100000000000; @@ -96,16 +91,14 @@ SELECT @@global.key_buffer_size; #SET @@global.key_buffer_size = -1024; #SELECT @@global.key_buffer_size; SET @@global.key_buffer_size = 4; -SELECT @@global.key_buffer_size = @min_key_buffer_size; ---echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable'; +SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; --Error ER_WRONG_TYPE_FOR_VAR SET @@global.key_buffer_size = ON; -SELECT @@global.key_buffer_size = @min_key_buffer_size; +SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; --Error ER_WRONG_TYPE_FOR_VAR SET @@global.key_buffer_size = 'test'; -SELECT @@global.key_buffer_size = @min_key_buffer_size; - +SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; --echo '#-------------------FN_DYNVARS_055_05----------------------------#' ########################################################################### @@ -114,8 +107,7 @@ SELECT @@global.key_buffer_size = @min_key_buffer_size; --Error ER_GLOBAL_VARIABLE SET @@session.key_buffer_size = 0; -SELECT @@key_buffer_size = @min_key_buffer_size; - +SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; --echo '#----------------------FN_DYNVARS_055_06------------------------#' ############################################################################## @@ -130,17 +122,15 @@ SELECT @@key_buffer_size = VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='key_buffer_size'; - --echo '#---------------------FN_DYNVARS_055_07----------------------#' ################################################################### # Check if TRUE and FALSE values can be used on variable # ################################################################### SET @@global.key_buffer_size = TRUE; -SELECT @@global.key_buffer_size = @min_key_buffer_size; +SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; SET @@global.key_buffer_size = FALSE; -SELECT @@global.key_buffer_size = @min_key_buffer_size; - +SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; --echo '#---------------------FN_DYNVARS_055_08----------------------#' ##################################################################### @@ -150,7 +140,7 @@ SELECT @@global.key_buffer_size = @min_key_buffer_size; # due to differences in contents of the warnings --disable_warnings -SET @@global.key_buffer_size = @min_key_buffer_size; +SET @@global.key_buffer_size = 8 ; SELECT @@key_buffer_size = @@global.key_buffer_size; --enable_warnings @@ -160,8 +150,8 @@ SELECT @@key_buffer_size = @@global.key_buffer_size; ########################################################################## --Error ER_GLOBAL_VARIABLE -SET key_buffer_size = @min_key_buffer_size; -SELECT @@key_buffer_size = @min_key_buffer_size; +SET key_buffer_size = 8 ; +SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; --Error ER_PARSE_ERROR SET local.key_buffer_size = 10; --Error ER_UNKNOWN_TABLE @@ -179,9 +169,9 @@ SELECT key_buffer_size = @@session.key_buffer_size; ############################## SET @@global.key_buffer_size = @start_value; -SELECT @@global.key_buffer_size; --enable_warnings ####################################################################### # END OF key_buffer_size TESTS # ####################################################################### + diff --git a/mysql-test/suite/sys_vars/inc/sort_buffer_size_basic.inc b/mysql-test/suite/sys_vars/inc/sort_buffer_size_basic.inc index 4dbae7c8847..19d8b442c2c 100644 --- a/mysql-test/suite/sys_vars/inc/sort_buffer_size_basic.inc +++ b/mysql-test/suite/sys_vars/inc/sort_buffer_size_basic.inc @@ -17,9 +17,12 @@ # * Valid & Invalid values # # * Scope & Access method # # * Data Integrity # +# Modified: Horst Hunger, 2008-11-28 # +# disabled warnings as they contain the values of this variable, # +# modified the check of the value only checking a range. # # # -# Reference: http://dev.mysql.com/doc/refman/5.1/en/ # -# server-system-variables.html # +# Reference: # +# http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html # # # ############################################################################### @@ -29,7 +32,7 @@ ###################################################################### -# START OF sort_buffer_size TESTS # +# START OF sort_buffer_size TESTS # ###################################################################### @@ -37,65 +40,74 @@ # Save initial value # ############################################################# -# due to difference when running on Windows (bug filed) +# due to differences when running on Windows (Bug#36695) --source include/not_windows.inc +let $kbrange32 = BETWEEN 32776 AND 32999; +let $mbrange2 = BETWEEN 2097116 AND 2100000; + +--disable_warnings + SET @start_global_value = @@global.sort_buffer_size; -SELECT @start_global_value; SET @start_session_value = @@session.sort_buffer_size; -SELECT @start_session_value; - --echo '#--------------------FN_DYNVARS_151_01-------------------------#' ###################################################################### -# Display the DEFAULT value of sort_buffer_size # +# Display the DEFAULT value of sort_buffer_size # ###################################################################### SET @@global.sort_buffer_size = 1000; SET @@global.sort_buffer_size = DEFAULT; -SELECT @@global.sort_buffer_size= 2097144 OR @@global.sort_buffer_size= 2097116; +eval +SELECT @@global.sort_buffer_size $mbrange2; SET @@session.sort_buffer_size = 2000; SET @@session.sort_buffer_size = DEFAULT; -SELECT @@session.sort_buffer_size= 2097144 OR @@session.sort_buffer_size= 2097116; +eval +SELECT @@session.sort_buffer_size $mbrange2; --echo '#--------------------FN_DYNVARS_151_02-------------------------#' ###################################################################### -# Check the DEFAULT value of sort_buffer_size # +# Check the DEFAULT value of sort_buffer_size # ###################################################################### SET @@global.sort_buffer_size = DEFAULT; -SELECT @@global.sort_buffer_size = 2097144 OR @@global.sort_buffer_size= 2097116; +eval +SELECT @@global.sort_buffer_size $mbrange2; SET @@session.sort_buffer_size = DEFAULT; -SELECT @@session.sort_buffer_size = 2097144 OR @@session.sort_buffer_size= 2097116; +eval +SELECT @@session.sort_buffer_size $mbrange2; --echo '#--------------------FN_DYNVARS_151_03-------------------------#' ################################################################################ -# Change the value of sort_buffer_size to a valid value for GLOBAL Scope # +# Change the value of sort_buffer_size to a valid value for GLOBAL Scope # ################################################################################ SET @@global.sort_buffer_size = 32776; -SELECT @@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804; +eval +SELECT @@global.sort_buffer_size $kbrange32; SET @@global.sort_buffer_size = 32777; -SELECT @@global.sort_buffer_size= 32777 OR @@global.sort_buffer_size= 32804; +eval +SELECT @@global.sort_buffer_size $kbrange32; SET @@global.sort_buffer_size = 4294967295; SELECT @@global.sort_buffer_size; SET @@global.sort_buffer_size = 4294967294; SELECT @@global.sort_buffer_size; ---echo 'Bug# 34877: Invalid Values are showing in variable on assigning valid values.'; --echo '#--------------------FN_DYNVARS_151_04-------------------------#' ################################################################################### -# Change the value of sort_buffer_size to a valid value for SESSION Scope # +# Change the value of sort_buffer_size to a valid value for SESSION Scope # ################################################################################### SET @@session.sort_buffer_size = 32776; -SELECT @@session.sort_buffer_size= 32776 OR @@session.sort_buffer_size= 32804; +eval +SELECT @@session.sort_buffer_size $kbrange32; SET @@session.sort_buffer_size = 32777; -SELECT @@session.sort_buffer_size= 32777 OR @@session.sort_buffer_size= 32804; +eval +SELECT @@session.sort_buffer_size $kbrange32; SET @@session.sort_buffer_size = 4294967295; SELECT @@session.sort_buffer_size; SET @@session.sort_buffer_size = 4294967294; @@ -104,13 +116,15 @@ SELECT @@session.sort_buffer_size; --echo '#------------------FN_DYNVARS_151_05-----------------------#' ################################################################## -# Change the value of sort_buffer_size to an invalid value # +# Change the value of sort_buffer_size to an invalid value # ################################################################## SET @@global.sort_buffer_size = 32775; -SELECT @@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804; +eval +SELECT @@global.sort_buffer_size $kbrange32; SET @@global.sort_buffer_size = -1024; -SELECT @@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804; +eval +SELECT @@global.sort_buffer_size $kbrange32; SET @@global.sort_buffer_size = 4294967296; SELECT @@global.sort_buffer_size; --Error ER_PARSE_ERROR @@ -121,19 +135,18 @@ SET @@global.sort_buffer_size = test; SELECT @@global.sort_buffer_size; SET @@session.sort_buffer_size = 32775; -SELECT @@session.sort_buffer_size= 32776 OR @@session.sort_buffer_size= 32804; +eval +SELECT @@session.sort_buffer_size $kbrange32; SET @@session.sort_buffer_size = -2; -SELECT @@session.sort_buffer_size= 32776 OR @@session.sort_buffer_size= 32804; +eval +SELECT @@session.sort_buffer_size $kbrange32; --Error ER_PARSE_ERROR SET @@session.sort_buffer_size = 65530.34.; SET @@session.sort_buffer_size = 4294967296; SELECT @@session.sort_buffer_size; ---echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable'; --Error ER_WRONG_TYPE_FOR_VAR SET @@session.sort_buffer_size = test; -SELECT @@session.sort_buffer_size; - --echo '#------------------FN_DYNVARS_151_06-----------------------#' #################################################################### @@ -141,14 +154,16 @@ SELECT @@session.sort_buffer_size; #################################################################### -SELECT @@global.sort_buffer_size = VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='sort_buffer_size'; +SELECT @@global.sort_buffer_size = VARIABLE_VALUE FROM + INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='sort_buffer_size'; --echo '#------------------FN_DYNVARS_151_07-----------------------#' #################################################################### # Check if the value in SESSION Table matches value in variable # #################################################################### -SELECT @@session.sort_buffer_size = VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='sort_buffer_size'; +SELECT @@session.sort_buffer_size = VARIABLE_VALUE FROM +INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='sort_buffer_size'; --echo '#------------------FN_DYNVARS_151_08-----------------------#' @@ -157,25 +172,24 @@ SELECT @@session.sort_buffer_size = VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSI #################################################################### SET @@global.sort_buffer_size = TRUE; -SELECT @@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804; +eval +SELECT @@global.sort_buffer_size $kbrange32; SET @@global.sort_buffer_size = FALSE; -SELECT @@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804; -echo 'Bug: Errors should be displayed on assigning TRUE/FALSE to variable'; - +eval +SELECT @@global.sort_buffer_size $kbrange32; --echo '#---------------------FN_DYNVARS_151_09----------------------#' #################################################################################### -# Check if accessing variable with and without GLOBAL point to same variable # +# Check if accessing variable with and without GLOBAL point to same variable # #################################################################################### SET @@global.sort_buffer_size = 9000; SELECT @@sort_buffer_size = @@global.sort_buffer_size; - --echo '#---------------------FN_DYNVARS_151_10----------------------#' -######################################################################################################## -# Check if accessing variable with SESSION,LOCAL and without SCOPE points to same session variable # -######################################################################################################## +################################################################################################### +# Check if accessing variable with SESSION,LOCAL and without SCOPE points to same session variable# +################################################################################################### SET @@sort_buffer_size = 9000; SELECT @@sort_buffer_size = @@local.sort_buffer_size; @@ -184,12 +198,12 @@ SELECT @@local.sort_buffer_size = @@session.sort_buffer_size; --echo '#---------------------FN_DYNVARS_151_11----------------------#' ################################################################################### -# Check if sort_buffer_size can be accessed with and without @@ sign # +# Check if sort_buffer_size can be accessed with and without @@ sign # ################################################################################### SET sort_buffer_size = 9100; -SELECT @sort_buffer_size= 32776 OR @@sort_buffer_size= 32804; -SELECT @@sort_buffer_size; +eval +SELECT @@sort_buffer_size $kbrange32; --Error ER_UNKNOWN_TABLE SELECT local.sort_buffer_size; --Error ER_UNKNOWN_TABLE @@ -203,11 +217,11 @@ SELECT sort_buffer_size = @@session.sort_buffer_size; #################################### SET @@global.sort_buffer_size = @start_global_value; -SELECT @@global.sort_buffer_size; SET @@session.sort_buffer_size = @start_session_value; -SELECT @@session.sort_buffer_size; +--enable_warnings ############################################################# -# END OF sort_buffer_size TESTS # +# END OF sort_buffer_size TESTS # ############################################################# + diff --git a/mysql-test/suite/sys_vars/r/key_buffer_size_basic_32.result b/mysql-test/suite/sys_vars/r/key_buffer_size_basic_32.result index 981988a1d4d..51c4f841205 100644 --- a/mysql-test/suite/sys_vars/r/key_buffer_size_basic_32.result +++ b/mysql-test/suite/sys_vars/r/key_buffer_size_basic_32.result @@ -1,14 +1,10 @@ SET @start_value = @@global.key_buffer_size; -SELECT @start_value; -@start_value -1048576 '#--------------------FN_DYNVARS_055_01------------------------#' SET @@global.key_buffer_size = 99; SET @@global.key_buffer_size = DEFAULT; ERROR 42000: Variable 'key_buffer_size' doesn't have a default value -'Bug# 34878: This variable has default value according to documentation'; -SELECT @@global.key_buffer_size = @min_key_buffer_size; -@@global.key_buffer_size = @min_key_buffer_size +SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; +@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36 1 '#---------------------FN_DYNVARS_055_02-------------------------#' SET @@global.key_buffer_size = @start_value; @@ -16,21 +12,20 @@ SELECT @@global.key_buffer_size = @start_value; @@global.key_buffer_size = @start_value 1 '#--------------------FN_DYNVARS_055_03------------------------#' -SET @@global.key_buffer_size = @min_key_buffer_size; -SELECT @@global.key_buffer_size= @min_key_buffer_size; -@@global.key_buffer_size= @min_key_buffer_size +SET @@global.key_buffer_size = 8 ; +SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; +@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36 1 SET @@global.key_buffer_size = 1800; Warnings: Warning 1292 Truncated incorrect key_buffer_size value: '1800' -SELECT @@global.key_buffer_size = @min_key_buffer_size; -@@global.key_buffer_size = @min_key_buffer_size +SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; +@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36 1 SET @@global.key_buffer_size = 65535; SELECT @@global.key_buffer_size; @@global.key_buffer_size 61440 -'Bug # 34837: Errors are not coming on assigning invalid values to variable' '#--------------------FN_DYNVARS_055_04-------------------------#' SET @@global.key_buffer_size = 10000.01; ERROR 42000: Incorrect argument type to variable 'key_buffer_size' @@ -40,25 +35,24 @@ SELECT @@global.key_buffer_size; SET @@global.key_buffer_size = 4; Warnings: Warning 1292 Truncated incorrect key_buffer_size value: '4' -SELECT @@global.key_buffer_size = @min_key_buffer_size; -@@global.key_buffer_size = @min_key_buffer_size +SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; +@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36 1 -'Bug # 34837: Errors are not coming on assigning invalid values to variable'; SET @@global.key_buffer_size = ON; ERROR 42000: Incorrect argument type to variable 'key_buffer_size' -SELECT @@global.key_buffer_size = @min_key_buffer_size; -@@global.key_buffer_size = @min_key_buffer_size +SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; +@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36 1 SET @@global.key_buffer_size = 'test'; ERROR 42000: Incorrect argument type to variable 'key_buffer_size' -SELECT @@global.key_buffer_size = @min_key_buffer_size; -@@global.key_buffer_size = @min_key_buffer_size +SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; +@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36 1 '#-------------------FN_DYNVARS_055_05----------------------------#' SET @@session.key_buffer_size = 0; ERROR HY000: Variable 'key_buffer_size' is a GLOBAL variable and should be set with SET GLOBAL -SELECT @@key_buffer_size = @min_key_buffer_size; -@@key_buffer_size = @min_key_buffer_size +SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; +@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36 1 '#----------------------FN_DYNVARS_055_06------------------------#' SELECT @@global.key_buffer_size = VARIABLE_VALUE @@ -75,25 +69,25 @@ WHERE VARIABLE_NAME='key_buffer_size'; SET @@global.key_buffer_size = TRUE; Warnings: Warning 1292 Truncated incorrect key_buffer_size value: '1' -SELECT @@global.key_buffer_size = @min_key_buffer_size; -@@global.key_buffer_size = @min_key_buffer_size +SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; +@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36 1 SET @@global.key_buffer_size = FALSE; Warnings: Warning 1438 Cannot drop default keycache -SELECT @@global.key_buffer_size = @min_key_buffer_size; -@@global.key_buffer_size = @min_key_buffer_size +SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; +@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36 1 '#---------------------FN_DYNVARS_055_08----------------------#' -SET @@global.key_buffer_size = @min_key_buffer_size; +SET @@global.key_buffer_size = 8 ; SELECT @@key_buffer_size = @@global.key_buffer_size; @@key_buffer_size = @@global.key_buffer_size 1 '#---------------------FN_DYNVARS_055_09----------------------#' -SET key_buffer_size = @min_key_buffer_size; +SET key_buffer_size = 8 ; ERROR HY000: Variable 'key_buffer_size' is a GLOBAL variable and should be set with SET GLOBAL -SELECT @@key_buffer_size = @min_key_buffer_size; -@@key_buffer_size = @min_key_buffer_size +SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; +@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36 1 SET local.key_buffer_size = 10; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key_buffer_size = 10' at line 1 @@ -106,6 +100,3 @@ ERROR 42S02: Unknown table 'global' in field list SELECT key_buffer_size = @@session.key_buffer_size; ERROR 42S22: Unknown column 'key_buffer_size' in 'field list' SET @@global.key_buffer_size = @start_value; -SELECT @@global.key_buffer_size; -@@global.key_buffer_size -1048576 diff --git a/mysql-test/suite/sys_vars/r/key_buffer_size_basic_64.result b/mysql-test/suite/sys_vars/r/key_buffer_size_basic_64.result index 981988a1d4d..51c4f841205 100644 --- a/mysql-test/suite/sys_vars/r/key_buffer_size_basic_64.result +++ b/mysql-test/suite/sys_vars/r/key_buffer_size_basic_64.result @@ -1,14 +1,10 @@ SET @start_value = @@global.key_buffer_size; -SELECT @start_value; -@start_value -1048576 '#--------------------FN_DYNVARS_055_01------------------------#' SET @@global.key_buffer_size = 99; SET @@global.key_buffer_size = DEFAULT; ERROR 42000: Variable 'key_buffer_size' doesn't have a default value -'Bug# 34878: This variable has default value according to documentation'; -SELECT @@global.key_buffer_size = @min_key_buffer_size; -@@global.key_buffer_size = @min_key_buffer_size +SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; +@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36 1 '#---------------------FN_DYNVARS_055_02-------------------------#' SET @@global.key_buffer_size = @start_value; @@ -16,21 +12,20 @@ SELECT @@global.key_buffer_size = @start_value; @@global.key_buffer_size = @start_value 1 '#--------------------FN_DYNVARS_055_03------------------------#' -SET @@global.key_buffer_size = @min_key_buffer_size; -SELECT @@global.key_buffer_size= @min_key_buffer_size; -@@global.key_buffer_size= @min_key_buffer_size +SET @@global.key_buffer_size = 8 ; +SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; +@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36 1 SET @@global.key_buffer_size = 1800; Warnings: Warning 1292 Truncated incorrect key_buffer_size value: '1800' -SELECT @@global.key_buffer_size = @min_key_buffer_size; -@@global.key_buffer_size = @min_key_buffer_size +SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; +@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36 1 SET @@global.key_buffer_size = 65535; SELECT @@global.key_buffer_size; @@global.key_buffer_size 61440 -'Bug # 34837: Errors are not coming on assigning invalid values to variable' '#--------------------FN_DYNVARS_055_04-------------------------#' SET @@global.key_buffer_size = 10000.01; ERROR 42000: Incorrect argument type to variable 'key_buffer_size' @@ -40,25 +35,24 @@ SELECT @@global.key_buffer_size; SET @@global.key_buffer_size = 4; Warnings: Warning 1292 Truncated incorrect key_buffer_size value: '4' -SELECT @@global.key_buffer_size = @min_key_buffer_size; -@@global.key_buffer_size = @min_key_buffer_size +SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; +@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36 1 -'Bug # 34837: Errors are not coming on assigning invalid values to variable'; SET @@global.key_buffer_size = ON; ERROR 42000: Incorrect argument type to variable 'key_buffer_size' -SELECT @@global.key_buffer_size = @min_key_buffer_size; -@@global.key_buffer_size = @min_key_buffer_size +SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; +@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36 1 SET @@global.key_buffer_size = 'test'; ERROR 42000: Incorrect argument type to variable 'key_buffer_size' -SELECT @@global.key_buffer_size = @min_key_buffer_size; -@@global.key_buffer_size = @min_key_buffer_size +SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; +@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36 1 '#-------------------FN_DYNVARS_055_05----------------------------#' SET @@session.key_buffer_size = 0; ERROR HY000: Variable 'key_buffer_size' is a GLOBAL variable and should be set with SET GLOBAL -SELECT @@key_buffer_size = @min_key_buffer_size; -@@key_buffer_size = @min_key_buffer_size +SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; +@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36 1 '#----------------------FN_DYNVARS_055_06------------------------#' SELECT @@global.key_buffer_size = VARIABLE_VALUE @@ -75,25 +69,25 @@ WHERE VARIABLE_NAME='key_buffer_size'; SET @@global.key_buffer_size = TRUE; Warnings: Warning 1292 Truncated incorrect key_buffer_size value: '1' -SELECT @@global.key_buffer_size = @min_key_buffer_size; -@@global.key_buffer_size = @min_key_buffer_size +SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; +@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36 1 SET @@global.key_buffer_size = FALSE; Warnings: Warning 1438 Cannot drop default keycache -SELECT @@global.key_buffer_size = @min_key_buffer_size; -@@global.key_buffer_size = @min_key_buffer_size +SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; +@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36 1 '#---------------------FN_DYNVARS_055_08----------------------#' -SET @@global.key_buffer_size = @min_key_buffer_size; +SET @@global.key_buffer_size = 8 ; SELECT @@key_buffer_size = @@global.key_buffer_size; @@key_buffer_size = @@global.key_buffer_size 1 '#---------------------FN_DYNVARS_055_09----------------------#' -SET key_buffer_size = @min_key_buffer_size; +SET key_buffer_size = 8 ; ERROR HY000: Variable 'key_buffer_size' is a GLOBAL variable and should be set with SET GLOBAL -SELECT @@key_buffer_size = @min_key_buffer_size; -@@key_buffer_size = @min_key_buffer_size +SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; +@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36 1 SET local.key_buffer_size = 10; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key_buffer_size = 10' at line 1 @@ -106,6 +100,3 @@ ERROR 42S02: Unknown table 'global' in field list SELECT key_buffer_size = @@session.key_buffer_size; ERROR 42S22: Unknown column 'key_buffer_size' in 'field list' SET @@global.key_buffer_size = @start_value; -SELECT @@global.key_buffer_size; -@@global.key_buffer_size -1048576 diff --git a/mysql-test/suite/sys_vars/r/sort_buffer_size_basic_32.result b/mysql-test/suite/sys_vars/r/sort_buffer_size_basic_32.result index 09a1fe59046..9d3eadcc26f 100644 --- a/mysql-test/suite/sys_vars/r/sort_buffer_size_basic_32.result +++ b/mysql-test/suite/sys_vars/r/sort_buffer_size_basic_32.result @@ -1,47 +1,33 @@ SET @start_global_value = @@global.sort_buffer_size; -SELECT @start_global_value; -@start_global_value -262144 SET @start_session_value = @@session.sort_buffer_size; -SELECT @start_session_value; -@start_session_value -262144 '#--------------------FN_DYNVARS_151_01-------------------------#' SET @@global.sort_buffer_size = 1000; -Warnings: -Warning 1292 Truncated incorrect sort_buffer_size value: '1000' SET @@global.sort_buffer_size = DEFAULT; -SELECT @@global.sort_buffer_size= 2097144 OR @@global.sort_buffer_size= 2097116; -@@global.sort_buffer_size= 2097144 OR @@global.sort_buffer_size= 2097116 +SELECT @@global.sort_buffer_size BETWEEN 2097116 AND 2100000; +@@global.sort_buffer_size BETWEEN 2097116 AND 2100000 1 SET @@session.sort_buffer_size = 2000; -Warnings: -Warning 1292 Truncated incorrect sort_buffer_size value: '2000' SET @@session.sort_buffer_size = DEFAULT; -SELECT @@session.sort_buffer_size= 2097144 OR @@session.sort_buffer_size= 2097116; -@@session.sort_buffer_size= 2097144 OR @@session.sort_buffer_size= 2097116 +SELECT @@session.sort_buffer_size BETWEEN 2097116 AND 2100000; +@@session.sort_buffer_size BETWEEN 2097116 AND 2100000 1 '#--------------------FN_DYNVARS_151_02-------------------------#' SET @@global.sort_buffer_size = DEFAULT; -SELECT @@global.sort_buffer_size = 2097144 OR @@global.sort_buffer_size= 2097116; -@@global.sort_buffer_size = 2097144 OR @@global.sort_buffer_size= 2097116 +SELECT @@global.sort_buffer_size BETWEEN 2097116 AND 2100000; +@@global.sort_buffer_size BETWEEN 2097116 AND 2100000 1 SET @@session.sort_buffer_size = DEFAULT; -SELECT @@session.sort_buffer_size = 2097144 OR @@session.sort_buffer_size= 2097116; -@@session.sort_buffer_size = 2097144 OR @@session.sort_buffer_size= 2097116 +SELECT @@session.sort_buffer_size BETWEEN 2097116 AND 2100000; +@@session.sort_buffer_size BETWEEN 2097116 AND 2100000 1 '#--------------------FN_DYNVARS_151_03-------------------------#' SET @@global.sort_buffer_size = 32776; -Warnings: -Warning 1292 Truncated incorrect sort_buffer_size value: '32776' -SELECT @@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804; -@@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804 +SELECT @@global.sort_buffer_size BETWEEN 32776 AND 32999; +@@global.sort_buffer_size BETWEEN 32776 AND 32999 1 SET @@global.sort_buffer_size = 32777; -Warnings: -Warning 1292 Truncated incorrect sort_buffer_size value: '32777' -SELECT @@global.sort_buffer_size= 32777 OR @@global.sort_buffer_size= 32804; -@@global.sort_buffer_size= 32777 OR @@global.sort_buffer_size= 32804 +SELECT @@global.sort_buffer_size BETWEEN 32776 AND 32999; +@@global.sort_buffer_size BETWEEN 32776 AND 32999 1 SET @@global.sort_buffer_size = 4294967295; SELECT @@global.sort_buffer_size; @@ -51,19 +37,14 @@ SET @@global.sort_buffer_size = 4294967294; SELECT @@global.sort_buffer_size; @@global.sort_buffer_size 4294967294 -'Bug# 34877: Invalid Values are showing in variable on assigning valid values.'; '#--------------------FN_DYNVARS_151_04-------------------------#' SET @@session.sort_buffer_size = 32776; -Warnings: -Warning 1292 Truncated incorrect sort_buffer_size value: '32776' -SELECT @@session.sort_buffer_size= 32776 OR @@session.sort_buffer_size= 32804; -@@session.sort_buffer_size= 32776 OR @@session.sort_buffer_size= 32804 +SELECT @@session.sort_buffer_size BETWEEN 32776 AND 32999; +@@session.sort_buffer_size BETWEEN 32776 AND 32999 1 SET @@session.sort_buffer_size = 32777; -Warnings: -Warning 1292 Truncated incorrect sort_buffer_size value: '32777' -SELECT @@session.sort_buffer_size= 32777 OR @@session.sort_buffer_size= 32804; -@@session.sort_buffer_size= 32777 OR @@session.sort_buffer_size= 32804 +SELECT @@session.sort_buffer_size BETWEEN 32776 AND 32999; +@@session.sort_buffer_size BETWEEN 32776 AND 32999 1 SET @@session.sort_buffer_size = 4294967295; SELECT @@session.sort_buffer_size; @@ -75,20 +56,14 @@ SELECT @@session.sort_buffer_size; 4294967294 '#------------------FN_DYNVARS_151_05-----------------------#' SET @@global.sort_buffer_size = 32775; -Warnings: -Warning 1292 Truncated incorrect sort_buffer_size value: '32775' -SELECT @@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804; -@@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804 +SELECT @@global.sort_buffer_size BETWEEN 32776 AND 32999; +@@global.sort_buffer_size BETWEEN 32776 AND 32999 1 SET @@global.sort_buffer_size = -1024; -Warnings: -Warning 1292 Truncated incorrect sort_buffer_size value: '0' -SELECT @@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804; -@@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804 +SELECT @@global.sort_buffer_size BETWEEN 32776 AND 32999; +@@global.sort_buffer_size BETWEEN 32776 AND 32999 1 SET @@global.sort_buffer_size = 4294967296; -Warnings: -Warning 1292 Truncated incorrect sort_buffer_size value: '4294967296' SELECT @@global.sort_buffer_size; @@global.sort_buffer_size 4294967295 @@ -103,64 +78,47 @@ SELECT @@global.sort_buffer_size; @@global.sort_buffer_size 4294967295 SET @@session.sort_buffer_size = 32775; -Warnings: -Warning 1292 Truncated incorrect sort_buffer_size value: '32775' -SELECT @@session.sort_buffer_size= 32776 OR @@session.sort_buffer_size= 32804; -@@session.sort_buffer_size= 32776 OR @@session.sort_buffer_size= 32804 +SELECT @@session.sort_buffer_size BETWEEN 32776 AND 32999; +@@session.sort_buffer_size BETWEEN 32776 AND 32999 1 SET @@session.sort_buffer_size = -2; -Warnings: -Warning 1292 Truncated incorrect sort_buffer_size value: '0' -SELECT @@session.sort_buffer_size= 32776 OR @@session.sort_buffer_size= 32804; -@@session.sort_buffer_size= 32776 OR @@session.sort_buffer_size= 32804 +SELECT @@session.sort_buffer_size BETWEEN 32776 AND 32999; +@@session.sort_buffer_size BETWEEN 32776 AND 32999 1 SET @@session.sort_buffer_size = 65530.34.; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1 SET @@session.sort_buffer_size = 4294967296; -Warnings: -Warning 1292 Truncated incorrect sort_buffer_size value: '4294967296' SELECT @@session.sort_buffer_size; @@session.sort_buffer_size 4294967295 -'Bug # 34837: Errors are not coming on assigning invalid values to variable'; SET @@session.sort_buffer_size = test; ERROR 42000: Incorrect argument type to variable 'sort_buffer_size' -SELECT @@session.sort_buffer_size; -@@session.sort_buffer_size -4294967295 '#------------------FN_DYNVARS_151_06-----------------------#' -SELECT @@global.sort_buffer_size = VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='sort_buffer_size'; +SELECT @@global.sort_buffer_size = VARIABLE_VALUE FROM +INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='sort_buffer_size'; @@global.sort_buffer_size = VARIABLE_VALUE 1 '#------------------FN_DYNVARS_151_07-----------------------#' -SELECT @@session.sort_buffer_size = VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='sort_buffer_size'; +SELECT @@session.sort_buffer_size = VARIABLE_VALUE FROM +INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='sort_buffer_size'; @@session.sort_buffer_size = VARIABLE_VALUE 1 '#------------------FN_DYNVARS_151_08-----------------------#' SET @@global.sort_buffer_size = TRUE; -Warnings: -Warning 1292 Truncated incorrect sort_buffer_size value: '1' -SELECT @@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804; -@@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804 +SELECT @@global.sort_buffer_size BETWEEN 32776 AND 32999; +@@global.sort_buffer_size BETWEEN 32776 AND 32999 1 SET @@global.sort_buffer_size = FALSE; -Warnings: -Warning 1292 Truncated incorrect sort_buffer_size value: '0' -SELECT @@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804; -@@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804 +SELECT @@global.sort_buffer_size BETWEEN 32776 AND 32999; +@@global.sort_buffer_size BETWEEN 32776 AND 32999 1 -'Bug: Errors should be displayed on assigning TRUE/FALSE to variable' '#---------------------FN_DYNVARS_151_09----------------------#' SET @@global.sort_buffer_size = 9000; -Warnings: -Warning 1292 Truncated incorrect sort_buffer_size value: '9000' SELECT @@sort_buffer_size = @@global.sort_buffer_size; @@sort_buffer_size = @@global.sort_buffer_size 0 '#---------------------FN_DYNVARS_151_10----------------------#' SET @@sort_buffer_size = 9000; -Warnings: -Warning 1292 Truncated incorrect sort_buffer_size value: '9000' SELECT @@sort_buffer_size = @@local.sort_buffer_size; @@sort_buffer_size = @@local.sort_buffer_size 1 @@ -169,14 +127,9 @@ SELECT @@local.sort_buffer_size = @@session.sort_buffer_size; 1 '#---------------------FN_DYNVARS_151_11----------------------#' SET sort_buffer_size = 9100; -Warnings: -Warning 1292 Truncated incorrect sort_buffer_size value: '9100' -SELECT @sort_buffer_size= 32776 OR @@sort_buffer_size= 32804; -@sort_buffer_size= 32776 OR @@sort_buffer_size= 32804 -1 -SELECT @@sort_buffer_size; -@@sort_buffer_size -32804 +SELECT @@sort_buffer_size BETWEEN 32776 AND 32999; +@@sort_buffer_size BETWEEN 32776 AND 32999 +1 SELECT local.sort_buffer_size; ERROR 42S02: Unknown table 'local' in field list SELECT session.sort_buffer_size; @@ -184,10 +137,4 @@ ERROR 42S02: Unknown table 'session' in field list SELECT sort_buffer_size = @@session.sort_buffer_size; ERROR 42S22: Unknown column 'sort_buffer_size' in 'field list' SET @@global.sort_buffer_size = @start_global_value; -SELECT @@global.sort_buffer_size; -@@global.sort_buffer_size -262144 SET @@session.sort_buffer_size = @start_session_value; -SELECT @@session.sort_buffer_size; -@@session.sort_buffer_size -262144 diff --git a/mysql-test/suite/sys_vars/r/sort_buffer_size_basic_64.result b/mysql-test/suite/sys_vars/r/sort_buffer_size_basic_64.result index e9bd14abc67..c993c8a0a88 100644 --- a/mysql-test/suite/sys_vars/r/sort_buffer_size_basic_64.result +++ b/mysql-test/suite/sys_vars/r/sort_buffer_size_basic_64.result @@ -1,47 +1,33 @@ SET @start_global_value = @@global.sort_buffer_size; -SELECT @start_global_value; -@start_global_value -262144 SET @start_session_value = @@session.sort_buffer_size; -SELECT @start_session_value; -@start_session_value -262144 '#--------------------FN_DYNVARS_151_01-------------------------#' SET @@global.sort_buffer_size = 1000; -Warnings: -Warning 1292 Truncated incorrect sort_buffer_size value: '1000' SET @@global.sort_buffer_size = DEFAULT; -SELECT @@global.sort_buffer_size= 2097144 OR @@global.sort_buffer_size= 2097116; -@@global.sort_buffer_size= 2097144 OR @@global.sort_buffer_size= 2097116 +SELECT @@global.sort_buffer_size BETWEEN 2097116 AND 2100000; +@@global.sort_buffer_size BETWEEN 2097116 AND 2100000 1 SET @@session.sort_buffer_size = 2000; -Warnings: -Warning 1292 Truncated incorrect sort_buffer_size value: '2000' SET @@session.sort_buffer_size = DEFAULT; -SELECT @@session.sort_buffer_size= 2097144 OR @@session.sort_buffer_size= 2097116; -@@session.sort_buffer_size= 2097144 OR @@session.sort_buffer_size= 2097116 +SELECT @@session.sort_buffer_size BETWEEN 2097116 AND 2100000; +@@session.sort_buffer_size BETWEEN 2097116 AND 2100000 1 '#--------------------FN_DYNVARS_151_02-------------------------#' SET @@global.sort_buffer_size = DEFAULT; -SELECT @@global.sort_buffer_size = 2097144 OR @@global.sort_buffer_size= 2097116; -@@global.sort_buffer_size = 2097144 OR @@global.sort_buffer_size= 2097116 +SELECT @@global.sort_buffer_size BETWEEN 2097116 AND 2100000; +@@global.sort_buffer_size BETWEEN 2097116 AND 2100000 1 SET @@session.sort_buffer_size = DEFAULT; -SELECT @@session.sort_buffer_size = 2097144 OR @@session.sort_buffer_size= 2097116; -@@session.sort_buffer_size = 2097144 OR @@session.sort_buffer_size= 2097116 +SELECT @@session.sort_buffer_size BETWEEN 2097116 AND 2100000; +@@session.sort_buffer_size BETWEEN 2097116 AND 2100000 1 '#--------------------FN_DYNVARS_151_03-------------------------#' SET @@global.sort_buffer_size = 32776; -Warnings: -Warning 1292 Truncated incorrect sort_buffer_size value: '32776' -SELECT @@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804; -@@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804 +SELECT @@global.sort_buffer_size BETWEEN 32776 AND 32999; +@@global.sort_buffer_size BETWEEN 32776 AND 32999 1 SET @@global.sort_buffer_size = 32777; -Warnings: -Warning 1292 Truncated incorrect sort_buffer_size value: '32777' -SELECT @@global.sort_buffer_size= 32777 OR @@global.sort_buffer_size= 32804; -@@global.sort_buffer_size= 32777 OR @@global.sort_buffer_size= 32804 +SELECT @@global.sort_buffer_size BETWEEN 32776 AND 32999; +@@global.sort_buffer_size BETWEEN 32776 AND 32999 1 SET @@global.sort_buffer_size = 4294967295; SELECT @@global.sort_buffer_size; @@ -51,19 +37,14 @@ SET @@global.sort_buffer_size = 4294967294; SELECT @@global.sort_buffer_size; @@global.sort_buffer_size 4294967294 -'Bug# 34877: Invalid Values are showing in variable on assigning valid values.'; '#--------------------FN_DYNVARS_151_04-------------------------#' SET @@session.sort_buffer_size = 32776; -Warnings: -Warning 1292 Truncated incorrect sort_buffer_size value: '32776' -SELECT @@session.sort_buffer_size= 32776 OR @@session.sort_buffer_size= 32804; -@@session.sort_buffer_size= 32776 OR @@session.sort_buffer_size= 32804 +SELECT @@session.sort_buffer_size BETWEEN 32776 AND 32999; +@@session.sort_buffer_size BETWEEN 32776 AND 32999 1 SET @@session.sort_buffer_size = 32777; -Warnings: -Warning 1292 Truncated incorrect sort_buffer_size value: '32777' -SELECT @@session.sort_buffer_size= 32777 OR @@session.sort_buffer_size= 32804; -@@session.sort_buffer_size= 32777 OR @@session.sort_buffer_size= 32804 +SELECT @@session.sort_buffer_size BETWEEN 32776 AND 32999; +@@session.sort_buffer_size BETWEEN 32776 AND 32999 1 SET @@session.sort_buffer_size = 4294967295; SELECT @@session.sort_buffer_size; @@ -75,16 +56,12 @@ SELECT @@session.sort_buffer_size; 4294967294 '#------------------FN_DYNVARS_151_05-----------------------#' SET @@global.sort_buffer_size = 32775; -Warnings: -Warning 1292 Truncated incorrect sort_buffer_size value: '32775' -SELECT @@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804; -@@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804 +SELECT @@global.sort_buffer_size BETWEEN 32776 AND 32999; +@@global.sort_buffer_size BETWEEN 32776 AND 32999 1 SET @@global.sort_buffer_size = -1024; -Warnings: -Warning 1292 Truncated incorrect sort_buffer_size value: '0' -SELECT @@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804; -@@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804 +SELECT @@global.sort_buffer_size BETWEEN 32776 AND 32999; +@@global.sort_buffer_size BETWEEN 32776 AND 32999 1 SET @@global.sort_buffer_size = 4294967296; SELECT @@global.sort_buffer_size; @@ -101,16 +78,12 @@ SELECT @@global.sort_buffer_size; @@global.sort_buffer_size 4294967296 SET @@session.sort_buffer_size = 32775; -Warnings: -Warning 1292 Truncated incorrect sort_buffer_size value: '32775' -SELECT @@session.sort_buffer_size= 32776 OR @@session.sort_buffer_size= 32804; -@@session.sort_buffer_size= 32776 OR @@session.sort_buffer_size= 32804 +SELECT @@session.sort_buffer_size BETWEEN 32776 AND 32999; +@@session.sort_buffer_size BETWEEN 32776 AND 32999 1 SET @@session.sort_buffer_size = -2; -Warnings: -Warning 1292 Truncated incorrect sort_buffer_size value: '0' -SELECT @@session.sort_buffer_size= 32776 OR @@session.sort_buffer_size= 32804; -@@session.sort_buffer_size= 32776 OR @@session.sort_buffer_size= 32804 +SELECT @@session.sort_buffer_size BETWEEN 32776 AND 32999; +@@session.sort_buffer_size BETWEEN 32776 AND 32999 1 SET @@session.sort_buffer_size = 65530.34.; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1 @@ -118,45 +91,34 @@ SET @@session.sort_buffer_size = 4294967296; SELECT @@session.sort_buffer_size; @@session.sort_buffer_size 4294967296 -'Bug # 34837: Errors are not coming on assigning invalid values to variable'; SET @@session.sort_buffer_size = test; ERROR 42000: Incorrect argument type to variable 'sort_buffer_size' -SELECT @@session.sort_buffer_size; -@@session.sort_buffer_size -4294967296 '#------------------FN_DYNVARS_151_06-----------------------#' -SELECT @@global.sort_buffer_size = VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='sort_buffer_size'; +SELECT @@global.sort_buffer_size = VARIABLE_VALUE FROM +INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='sort_buffer_size'; @@global.sort_buffer_size = VARIABLE_VALUE 1 '#------------------FN_DYNVARS_151_07-----------------------#' -SELECT @@session.sort_buffer_size = VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='sort_buffer_size'; +SELECT @@session.sort_buffer_size = VARIABLE_VALUE FROM +INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='sort_buffer_size'; @@session.sort_buffer_size = VARIABLE_VALUE 1 '#------------------FN_DYNVARS_151_08-----------------------#' SET @@global.sort_buffer_size = TRUE; -Warnings: -Warning 1292 Truncated incorrect sort_buffer_size value: '1' -SELECT @@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804; -@@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804 +SELECT @@global.sort_buffer_size BETWEEN 32776 AND 32999; +@@global.sort_buffer_size BETWEEN 32776 AND 32999 1 SET @@global.sort_buffer_size = FALSE; -Warnings: -Warning 1292 Truncated incorrect sort_buffer_size value: '0' -SELECT @@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804; -@@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804 +SELECT @@global.sort_buffer_size BETWEEN 32776 AND 32999; +@@global.sort_buffer_size BETWEEN 32776 AND 32999 1 -'Bug: Errors should be displayed on assigning TRUE/FALSE to variable' '#---------------------FN_DYNVARS_151_09----------------------#' SET @@global.sort_buffer_size = 9000; -Warnings: -Warning 1292 Truncated incorrect sort_buffer_size value: '9000' SELECT @@sort_buffer_size = @@global.sort_buffer_size; @@sort_buffer_size = @@global.sort_buffer_size 0 '#---------------------FN_DYNVARS_151_10----------------------#' SET @@sort_buffer_size = 9000; -Warnings: -Warning 1292 Truncated incorrect sort_buffer_size value: '9000' SELECT @@sort_buffer_size = @@local.sort_buffer_size; @@sort_buffer_size = @@local.sort_buffer_size 1 @@ -165,14 +127,9 @@ SELECT @@local.sort_buffer_size = @@session.sort_buffer_size; 1 '#---------------------FN_DYNVARS_151_11----------------------#' SET sort_buffer_size = 9100; -Warnings: -Warning 1292 Truncated incorrect sort_buffer_size value: '9100' -SELECT @sort_buffer_size= 32776 OR @@sort_buffer_size= 32804; -@sort_buffer_size= 32776 OR @@sort_buffer_size= 32804 -1 -SELECT @@sort_buffer_size; -@@sort_buffer_size -32804 +SELECT @@sort_buffer_size BETWEEN 32776 AND 32999; +@@sort_buffer_size BETWEEN 32776 AND 32999 +1 SELECT local.sort_buffer_size; ERROR 42S02: Unknown table 'local' in field list SELECT session.sort_buffer_size; @@ -180,10 +137,4 @@ ERROR 42S02: Unknown table 'session' in field list SELECT sort_buffer_size = @@session.sort_buffer_size; ERROR 42S22: Unknown column 'sort_buffer_size' in 'field list' SET @@global.sort_buffer_size = @start_global_value; -SELECT @@global.sort_buffer_size; -@@global.sort_buffer_size -262144 SET @@session.sort_buffer_size = @start_session_value; -SELECT @@session.sort_buffer_size; -@@session.sort_buffer_size -262144 diff --git a/mysql-test/suite/sys_vars/r/tmp_table_size_basic_32.result b/mysql-test/suite/sys_vars/r/tmp_table_size_basic.result index aeafd95ed55..3b4099d30ae 100644 --- a/mysql-test/suite/sys_vars/r/tmp_table_size_basic_32.result +++ b/mysql-test/suite/sys_vars/r/tmp_table_size_basic.result @@ -1,39 +1,21 @@ SET @start_global_value = @@global.tmp_table_size; -SELECT @start_global_value; -@start_global_value -16777216 SET @start_session_value = @@session.tmp_table_size; -SELECT @start_session_value; -@start_session_value -16777216 -'Bug# 34876: This variable has invalid default value as compared to documentation'; '#--------------------FN_DYNVARS_005_01-------------------------#' SET @@global.tmp_table_size = 100; Warnings: Warning 1292 Truncated incorrect tmp_table_size value: '100' SET @@global.tmp_table_size = DEFAULT; -SELECT @@global.tmp_table_size; -@@global.tmp_table_size -16777216 -'Bug# 34876: This variable has invalid default value as compared to documentation'; SET @@session.tmp_table_size = 200; Warnings: Warning 1292 Truncated incorrect tmp_table_size value: '200' SET @@session.tmp_table_size = DEFAULT; -SELECT @@session.tmp_table_size; -@@session.tmp_table_size -16777216 -'Bug# 34876: This variable has invalid default value as compared to documentation'; '#--------------------FN_DYNVARS_005_02-------------------------#' -SET @@global.tmp_table_size = DEFAULT; -SELECT @@global.tmp_table_size = 33554432; -@@global.tmp_table_size = 33554432 -0 -SET @@session.tmp_table_size = DEFAULT; -SELECT @@session.tmp_table_size = 33554432; -@@session.tmp_table_size = 33554432 -0 -'Bug# 34876: This variable has invalid default value as compared to documentation'; +SELECT @@global.tmp_table_size >= 16777216; +@@global.tmp_table_size >= 16777216 +1 +SELECT @@session.tmp_table_size >= 16777216; +@@session.tmp_table_size >= 16777216 +1 '#--------------------FN_DYNVARS_005_03-------------------------#' SET @@global.tmp_table_size = 1024; SELECT @@global.tmp_table_size; @@ -52,7 +34,7 @@ SET @@session.tmp_table_size = 1024; SELECT @@session.tmp_table_size; @@session.tmp_table_size 1024 -SET @@session.tmp_table_size =4294967295; +SET @@session.tmp_table_size = 4294967295; SELECT @@session.tmp_table_size; @@session.tmp_table_size 4294967295 @@ -79,7 +61,6 @@ Warning 1292 Truncated incorrect tmp_table_size value: '1000' SELECT @@global.tmp_table_size; @@global.tmp_table_size 1024 -'Bug # 34837: Errors are not coming on assigning invalid values to variable'; SET @@global.tmp_table_size = ON; ERROR 42000: Incorrect argument type to variable 'tmp_table_size' SET @@global.tmp_table_size = OFF; @@ -96,7 +77,6 @@ Warning 1292 Truncated incorrect tmp_table_size value: '0' SELECT @@global.tmp_table_size; @@global.tmp_table_size 1024 -'Bug:Error should be shown that variable is numeric and can not assigned boolean value'; SET @@global.tmp_table_size = 65530.34; ERROR 42000: Incorrect argument type to variable 'tmp_table_size' SET @@global.tmp_table_size ="Test"; @@ -120,18 +100,18 @@ SELECT @@session.tmp_table_size; SET @@session.tmp_table_size = "Test"; ERROR 42000: Incorrect argument type to variable 'tmp_table_size' SET @@session.tmp_table_size = 12345678901; -SELECT @@session.tmp_table_size; -@@session.tmp_table_size -4294967295 +SELECT @@session.tmp_table_size IN (12345678901,4294967295); +@@session.tmp_table_size IN (12345678901,4294967295) +1 '#------------------FN_DYNVARS_005_06-----------------------#' -SELECT @@global.tmp_table_size = VARIABLE_VALUE -FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES +SELECT @@global.tmp_table_size = VARIABLE_VALUE +FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='tmp_table_size'; @@global.tmp_table_size = VARIABLE_VALUE 1 '#------------------FN_DYNVARS_005_07-----------------------#' -SELECT @@session.tmp_table_size = VARIABLE_VALUE -FROM INFORMATION_SCHEMA.SESSION_VARIABLES +SELECT @@session.tmp_table_size = VARIABLE_VALUE +FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='tmp_table_size'; @@session.tmp_table_size = VARIABLE_VALUE 1 @@ -163,10 +143,4 @@ ERROR 42S02: Unknown table 'global' in field list SELECT tmp_table_size = @@session.tmp_table_size; ERROR 42S22: Unknown column 'tmp_table_size' in 'field list' SET @@global.tmp_table_size = @start_global_value; -SELECT @@global.tmp_table_size; -@@global.tmp_table_size -16777216 SET @@session.tmp_table_size = @start_session_value; -SELECT @@session.tmp_table_size; -@@session.tmp_table_size -16777216 diff --git a/mysql-test/suite/sys_vars/r/tmp_table_size_basic_64.result b/mysql-test/suite/sys_vars/r/tmp_table_size_basic_64.result deleted file mode 100644 index 837b90fc143..00000000000 --- a/mysql-test/suite/sys_vars/r/tmp_table_size_basic_64.result +++ /dev/null @@ -1,172 +0,0 @@ -SET @start_global_value = @@global.tmp_table_size; -SELECT @start_global_value; -@start_global_value -16777216 -SET @start_session_value = @@session.tmp_table_size; -SELECT @start_session_value; -@start_session_value -16777216 -'Bug# 34876: This variable has invalid default value as compared to documentation'; -'#--------------------FN_DYNVARS_005_01-------------------------#' -SET @@global.tmp_table_size = 100; -Warnings: -Warning 1292 Truncated incorrect tmp_table_size value: '100' -SET @@global.tmp_table_size = DEFAULT; -SELECT @@global.tmp_table_size; -@@global.tmp_table_size -16777216 -'Bug# 34876: This variable has invalid default value as compared to documentation'; -SET @@session.tmp_table_size = 200; -Warnings: -Warning 1292 Truncated incorrect tmp_table_size value: '200' -SET @@session.tmp_table_size = DEFAULT; -SELECT @@session.tmp_table_size; -@@session.tmp_table_size -16777216 -'Bug# 34876: This variable has invalid default value as compared to documentation'; -'#--------------------FN_DYNVARS_005_02-------------------------#' -SET @@global.tmp_table_size = DEFAULT; -SELECT @@global.tmp_table_size = 33554432; -@@global.tmp_table_size = 33554432 -0 -SET @@session.tmp_table_size = DEFAULT; -SELECT @@session.tmp_table_size = 33554432; -@@session.tmp_table_size = 33554432 -0 -'Bug# 34876: This variable has invalid default value as compared to documentation'; -'#--------------------FN_DYNVARS_005_03-------------------------#' -SET @@global.tmp_table_size = 1024; -SELECT @@global.tmp_table_size; -@@global.tmp_table_size -1024 -SET @@global.tmp_table_size = 60020; -SELECT @@global.tmp_table_size; -@@global.tmp_table_size -60020 -SET @@global.tmp_table_size = 4294967295; -SELECT @@global.tmp_table_size; -@@global.tmp_table_size -4294967295 -'#--------------------FN_DYNVARS_005_04-------------------------#' -SET @@session.tmp_table_size = 1024; -SELECT @@session.tmp_table_size; -@@session.tmp_table_size -1024 -SET @@session.tmp_table_size =4294967295; -SELECT @@session.tmp_table_size; -@@session.tmp_table_size -4294967295 -SET @@session.tmp_table_size = 65535; -SELECT @@session.tmp_table_size; -@@session.tmp_table_size -65535 -'#------------------FN_DYNVARS_005_05-----------------------#' -SET @@global.tmp_table_size = 0; -Warnings: -Warning 1292 Truncated incorrect tmp_table_size value: '0' -SELECT @@global.tmp_table_size; -@@global.tmp_table_size -1024 -SET @@global.tmp_table_size = -1024; -Warnings: -Warning 1292 Truncated incorrect tmp_table_size value: '0' -SELECT @@global.tmp_table_size; -@@global.tmp_table_size -1024 -SET @@global.tmp_table_size = 1000; -Warnings: -Warning 1292 Truncated incorrect tmp_table_size value: '1000' -SELECT @@global.tmp_table_size; -@@global.tmp_table_size -1024 -'Bug # 34837: Errors are not coming on assigning invalid values to variable'; -SET @@global.tmp_table_size = ON; -ERROR 42000: Incorrect argument type to variable 'tmp_table_size' -SET @@global.tmp_table_size = OFF; -ERROR 42000: Incorrect argument type to variable 'tmp_table_size' -SET @@global.tmp_table_size = True; -Warnings: -Warning 1292 Truncated incorrect tmp_table_size value: '1' -SELECT @@global.tmp_table_size; -@@global.tmp_table_size -1024 -SET @@global.tmp_table_size = False; -Warnings: -Warning 1292 Truncated incorrect tmp_table_size value: '0' -SELECT @@global.tmp_table_size; -@@global.tmp_table_size -1024 -'Bug:Error should be shown that variable is numeric and can not assigned boolean value'; -SET @@global.tmp_table_size = 65530.34; -ERROR 42000: Incorrect argument type to variable 'tmp_table_size' -SET @@global.tmp_table_size ="Test"; -ERROR 42000: Incorrect argument type to variable 'tmp_table_size' -SET @@session.tmp_table_size = ON; -ERROR 42000: Incorrect argument type to variable 'tmp_table_size' -SET @@session.tmp_table_size = OFF; -ERROR 42000: Incorrect argument type to variable 'tmp_table_size' -SET @@session.tmp_table_size = True; -Warnings: -Warning 1292 Truncated incorrect tmp_table_size value: '1' -SELECT @@session.tmp_table_size; -@@session.tmp_table_size -1024 -SET @@session.tmp_table_size = False; -Warnings: -Warning 1292 Truncated incorrect tmp_table_size value: '0' -SELECT @@session.tmp_table_size; -@@session.tmp_table_size -1024 -SET @@session.tmp_table_size = "Test"; -ERROR 42000: Incorrect argument type to variable 'tmp_table_size' -SET @@session.tmp_table_size = 12345678901; -SELECT @@session.tmp_table_size; -@@session.tmp_table_size -12345678901 -'#------------------FN_DYNVARS_005_06-----------------------#' -SELECT @@global.tmp_table_size = VARIABLE_VALUE -FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES -WHERE VARIABLE_NAME='tmp_table_size'; -@@global.tmp_table_size = VARIABLE_VALUE -1 -'#------------------FN_DYNVARS_005_07-----------------------#' -SELECT @@session.tmp_table_size = VARIABLE_VALUE -FROM INFORMATION_SCHEMA.SESSION_VARIABLES -WHERE VARIABLE_NAME='tmp_table_size'; -@@session.tmp_table_size = VARIABLE_VALUE -1 -'#---------------------FN_DYNVARS_001_09----------------------#' -SET @@global.tmp_table_size = 1024; -SET @@tmp_table_size = 4294967295; -SELECT @@tmp_table_size = @@global.tmp_table_size; -@@tmp_table_size = @@global.tmp_table_size -0 -'#---------------------FN_DYNVARS_001_10----------------------#' -SET @@tmp_table_size = 100; -Warnings: -Warning 1292 Truncated incorrect tmp_table_size value: '100' -SELECT @@tmp_table_size = @@local.tmp_table_size; -@@tmp_table_size = @@local.tmp_table_size -1 -SELECT @@local.tmp_table_size = @@session.tmp_table_size; -@@local.tmp_table_size = @@session.tmp_table_size -1 -'#---------------------FN_DYNVARS_001_11----------------------#' -SET tmp_table_size = 1027; -SELECT @@tmp_table_size; -@@tmp_table_size -1027 -SELECT local.tmp_table_size; -ERROR 42S02: Unknown table 'local' in field list -SELECT global.tmp_table_size; -ERROR 42S02: Unknown table 'global' in field list -SELECT tmp_table_size = @@session.tmp_table_size; -ERROR 42S22: Unknown column 'tmp_table_size' in 'field list' -SET @@global.tmp_table_size = @start_global_value; -SELECT @@global.tmp_table_size; -@@global.tmp_table_size -16777216 -SET @@session.tmp_table_size = @start_session_value; -SELECT @@session.tmp_table_size; -@@session.tmp_table_size -16777216 diff --git a/mysql-test/suite/sys_vars/inc/tmp_table_size_basic.inc b/mysql-test/suite/sys_vars/t/tmp_table_size_basic.test index 7f69bcd1f8c..c2ff51d50ca 100644 --- a/mysql-test/suite/sys_vars/inc/tmp_table_size_basic.inc +++ b/mysql-test/suite/sys_vars/t/tmp_table_size_basic.test @@ -1,27 +1,29 @@ -############## mysql-test\t\tmp_table_size_basic.test ######################### -# # -# Variable Name: tmp_table_size # -# Scope: GLOBAL | SESSION # -# Access Type: Dynamic # -# Data Type: numeric # -# Default Value: 33554432 # -# Range: 1024-4294967295 # -# # -# # -# Creation Date: 2008-02-13 # -# Author: Salman # -# # -# Description: Test Cases of Dynamic System Variable tmp_table_size # -# that checks the behavior of this variable in the following ways# -# * Default Value # -# * Valid & Invalid values # -# * Scope & Access method # -# * Data Integrity # -# # -# Reference: http://dev.mysql.com/doc/refman/5.1/en/ # -# server-system-variables.html#option_mysqld_tmp_table_size # -# # -############################################################################### +########################### tmp_table_size_basic.test ########################## +# # +# Variable Name: tmp_table_size # +# Scope: GLOBAL | SESSION # +# Access Type: Dynamic # +# Data Type: numeric # +# Default Value: system dependend # +# Range: 1024-system dependend # +# # +# # +# Creation Date: 2008-02-13 # +# Author: Salman # +# # +# Description: Test Cases of Dynamic System Variable tmp_table_size # +# that checks the behavior of this variable in the following ways # +# * Default Value # +# * Valid & Invalid values # +# * Scope & Access method # +# * Data Integrity # +# Modified: 2008-12-04 HHunger # +# removed the differences between 64 and 32 bit platforms # +# # +# Reference: # +# http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html # +# # +################################################################################ --source include/load_sysvars.inc @@ -29,17 +31,12 @@ # START OF tmp_table_size TESTS # ############################################################## - ############################################################# # Save initial value # ############################################################# SET @start_global_value = @@global.tmp_table_size; -SELECT @start_global_value; SET @start_session_value = @@session.tmp_table_size; -SELECT @start_session_value; - ---echo 'Bug# 34876: This variable has invalid default value as compared to documentation'; --echo '#--------------------FN_DYNVARS_005_01-------------------------#' ############################################################## @@ -48,27 +45,19 @@ SELECT @start_session_value; SET @@global.tmp_table_size = 100; SET @@global.tmp_table_size = DEFAULT; -SELECT @@global.tmp_table_size; ---echo 'Bug# 34876: This variable has invalid default value as compared to documentation'; SET @@session.tmp_table_size = 200; SET @@session.tmp_table_size = DEFAULT; -SELECT @@session.tmp_table_size; ---echo 'Bug# 34876: This variable has invalid default value as compared to documentation'; - --echo '#--------------------FN_DYNVARS_005_02-------------------------#' ######################################################################## -# Check the DEFAULT value of tmp_table_size # +# Check the DEFAULT value of tmp_table_size # ######################################################################## +# The DEFAULT value is system dependend. +# Therefore we have only a plausibility check here +SELECT @@global.tmp_table_size >= 16777216; -SET @@global.tmp_table_size = DEFAULT; -SELECT @@global.tmp_table_size = 33554432; - -SET @@session.tmp_table_size = DEFAULT; -SELECT @@session.tmp_table_size = 33554432; - ---echo 'Bug# 34876: This variable has invalid default value as compared to documentation'; +SELECT @@session.tmp_table_size >= 16777216; --echo '#--------------------FN_DYNVARS_005_03-------------------------#' ######################################################################## @@ -87,11 +76,11 @@ SELECT @@global.tmp_table_size; ######################################################################### # Change the value of tmp_table_size to a valid value for SESSION Scope # ######################################################################### - + SET @@session.tmp_table_size = 1024; SELECT @@session.tmp_table_size; -SET @@session.tmp_table_size =4294967295; +SET @@session.tmp_table_size = 4294967295; SELECT @@session.tmp_table_size; SET @@session.tmp_table_size = 65535; SELECT @@session.tmp_table_size; @@ -111,37 +100,28 @@ SELECT @@global.tmp_table_size; SET @@global.tmp_table_size = 1000; SELECT @@global.tmp_table_size; ---echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable'; - - --- Error ER_WRONG_TYPE_FOR_VAR +--Error ER_WRONG_TYPE_FOR_VAR SET @@global.tmp_table_size = ON; - --- Error ER_WRONG_TYPE_FOR_VAR +--Error ER_WRONG_TYPE_FOR_VAR SET @@global.tmp_table_size = OFF; - SET @@global.tmp_table_size = True; SELECT @@global.tmp_table_size; SET @@global.tmp_table_size = False; SELECT @@global.tmp_table_size; ---echo 'Bug:Error should be shown that variable is numeric and can not assigned boolean value'; - --- Error ER_WRONG_TYPE_FOR_VAR +--Error ER_WRONG_TYPE_FOR_VAR SET @@global.tmp_table_size = 65530.34; --- Error ER_WRONG_TYPE_FOR_VAR +--Error ER_WRONG_TYPE_FOR_VAR SET @@global.tmp_table_size ="Test"; - --- Error ER_WRONG_TYPE_FOR_VAR +--Error ER_WRONG_TYPE_FOR_VAR SET @@session.tmp_table_size = ON; - --- Error ER_WRONG_TYPE_FOR_VAR +--Error ER_WRONG_TYPE_FOR_VAR SET @@session.tmp_table_size = OFF; SET @@session.tmp_table_size = True; @@ -150,21 +130,21 @@ SELECT @@session.tmp_table_size; SET @@session.tmp_table_size = False; SELECT @@session.tmp_table_size; --- Error ER_WRONG_TYPE_FOR_VAR +--Error ER_WRONG_TYPE_FOR_VAR SET @@session.tmp_table_size = "Test"; SET @@session.tmp_table_size = 12345678901; -SELECT @@session.tmp_table_size; +# With a 64 bit mysqld:12345678901,with a 32 bit mysqld: 4294967295 +SELECT @@session.tmp_table_size IN (12345678901,4294967295); --echo '#------------------FN_DYNVARS_005_06-----------------------#' #################################################################### # Check if the value in GLOBAL Table matches value in variable # #################################################################### - -SELECT @@global.tmp_table_size = VARIABLE_VALUE -FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES +SELECT @@global.tmp_table_size = VARIABLE_VALUE +FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='tmp_table_size'; --echo '#------------------FN_DYNVARS_005_07-----------------------#' @@ -172,13 +152,10 @@ WHERE VARIABLE_NAME='tmp_table_size'; # Check if the value in SESSION Table matches value in variable # #################################################################### -SELECT @@session.tmp_table_size = VARIABLE_VALUE -FROM INFORMATION_SCHEMA.SESSION_VARIABLES +SELECT @@session.tmp_table_size = VARIABLE_VALUE +FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='tmp_table_size'; - - - --echo '#---------------------FN_DYNVARS_001_09----------------------#' ######################################################################## # Check if global and session variables are independent of each other # @@ -216,16 +193,12 @@ SELECT global.tmp_table_size; --Error ER_BAD_FIELD_ERROR SELECT tmp_table_size = @@session.tmp_table_size; - #################################### # Restore initial value # #################################### SET @@global.tmp_table_size = @start_global_value; -SELECT @@global.tmp_table_size; SET @@session.tmp_table_size = @start_session_value; -SELECT @@session.tmp_table_size; - ################################################### # END OF tmp_table_size TESTS # diff --git a/mysql-test/suite/sys_vars/t/tmp_table_size_basic_32.test b/mysql-test/suite/sys_vars/t/tmp_table_size_basic_32.test deleted file mode 100644 index c772b5c896c..00000000000 --- a/mysql-test/suite/sys_vars/t/tmp_table_size_basic_32.test +++ /dev/null @@ -1,9 +0,0 @@ -################################################################################ -# Created by Horst Hunger 2008-05-07 # -# # -# Wrapper for 32 bit machines # -################################################################################ - ---source include/have_32bit.inc ---source suite/sys_vars/inc/tmp_table_size_basic.inc - diff --git a/mysql-test/suite/sys_vars/t/tmp_table_size_basic_64.test b/mysql-test/suite/sys_vars/t/tmp_table_size_basic_64.test deleted file mode 100644 index 46b3f65be9a..00000000000 --- a/mysql-test/suite/sys_vars/t/tmp_table_size_basic_64.test +++ /dev/null @@ -1,9 +0,0 @@ -################################################################################ -# Created by Horst Hunger 2008-05-07 # -# # -# Wrapper for 64 bit machines # -################################################################################ - ---source include/have_64bit.inc ---source suite/sys_vars/inc/tmp_table_size_basic.inc - diff --git a/mysql-test/t/alter_table.test b/mysql-test/t/alter_table.test index 76d57e76491..ae48d5a8736 100644 --- a/mysql-test/t/alter_table.test +++ b/mysql-test/t/alter_table.test @@ -751,6 +751,19 @@ ALTER TABLE t1 MODIFY COLUMN v VARCHAR(4); SELECT * FROM t1; DROP TABLE t1; + +# +# Bug#31291 ALTER TABLE CONVERT TO CHARACTER SET does not change some data types +# +create table t1 (a tinytext character set latin1); +alter table t1 convert to character set utf8; +show create table t1; +drop table t1; +create table t1 (a mediumtext character set latin1); +alter table t1 convert to character set utf8; +show create table t1; +drop table t1; + --echo End of 5.0 tests # diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test index 6dbed2e0b60..f9708002ee6 100644 --- a/mysql-test/t/create.test +++ b/mysql-test/t/create.test @@ -1533,5 +1533,11 @@ DROP TABLE t1; ########################################################################### +# +# Bug#40104 regression with table names? +# +create table `me:i`(id int); +drop table `me:i`; + --echo --echo End of 5.1 tests diff --git a/mysql-test/t/csv.test b/mysql-test/t/csv.test index eb93288b0aa..abc161d014c 100644 --- a/mysql-test/t/csv.test +++ b/mysql-test/t/csv.test @@ -1805,4 +1805,17 @@ unlock tables; drop table t1; --disconnect con1 +# +# Bug#41441 repair csv table crashes debug server +# +# Note: The test should be removed after Bug#33717 is fixed + +create table t1(a enum ('a') not null) engine=csv; +insert into t1 values (2); +--error ER_CRASHED_ON_USAGE +select * from t1 limit 1; +repair table t1; +select * from t1 limit 1; +drop table t1; + --echo End of 5.1 tests diff --git a/mysql-test/t/ctype_ucs.test b/mysql-test/t/ctype_ucs.test index cb371bc0ca6..e247110658b 100644 --- a/mysql-test/t/ctype_ucs.test +++ b/mysql-test/t/ctype_ucs.test @@ -697,4 +697,29 @@ set names latin1; # select hex(char(0x41 using ucs2)); +# +# Bug#37575: UCASE fails on monthname +# +SET character_set_connection=ucs2; +SELECT CHARSET(DAYNAME(19700101)); +SELECT CHARSET(MONTHNAME(19700101)); +SELECT LOWER(DAYNAME(19700101)); +SELECT LOWER(MONTHNAME(19700101)); +SELECT UPPER(DAYNAME(19700101)); +SELECT UPPER(MONTHNAME(19700101)); +SELECT HEX(MONTHNAME(19700101)); +SELECT HEX(DAYNAME(19700101)); +SET LC_TIME_NAMES=ru_RU; +SET NAMES utf8; +SET character_set_connection=ucs2; +SELECT CHARSET(DAYNAME(19700101)); +SELECT CHARSET(MONTHNAME(19700101)); +SELECT LOWER(DAYNAME(19700101)); +SELECT LOWER(MONTHNAME(19700101)); +SELECT UPPER(DAYNAME(19700101)); +SELECT UPPER(MONTHNAME(19700101)); +SELECT HEX(MONTHNAME(19700101)); +SELECT HEX(DAYNAME(19700101)); +SET character_set_connection=latin1; + --echo End of 5.0 tests diff --git a/mysql-test/t/date_formats.test b/mysql-test/t/date_formats.test index abf09942d1c..e474fac8a2a 100644 --- a/mysql-test/t/date_formats.test +++ b/mysql-test/t/date_formats.test @@ -340,3 +340,15 @@ select str_to_date('04/30 /2004', '%m /%d /%Y'); select str_to_date('04/30/2004 ', '%m/%d/%Y '); --echo "End of 4.1 tests" + +# +# Bug #41470: DATE_FORMAT() crashes the complete server with a valid date +# + +# show that these two do not crash the server: +SELECT DATE_FORMAT("0000-01-01",'%W %d %M %Y') as valid_date; +SELECT DATE_FORMAT("0000-02-28",'%W %d %M %Y') as valid_date; +# show that date within the Gregorian range render correct results: (THU) +SELECT DATE_FORMAT("2009-01-01",'%W %d %M %Y') as valid_date; + +--echo "End of 5.0 tests" diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index 71b7def1319..1c461ab47bb 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -18,6 +18,9 @@ rpl_max_binlog_size_func : BUG#37962 2008-07-08 sven *_func tests c slow_query_log_func : BUG#37962 2008-07-08 sven *_func tests containing sleeps/race conditions sql_low_priority_updates_func : BUG#37962 2008-07-08 sven *_func tests containing sleeps/race conditions timestamp_func : BUG#37962 2008-07-08 sven *_func tests containing sleeps/race conditions -slow_query_log_func.test : Bug #37962: *_func tests containing sleeps/race conditions log_bin_trust_function_creators_func : Bug#41003 Dec-12-2008 andrei todo:re-enable after merging the bug fixes from the main trees. innodb_max_dirty_pages_pct_func : BUG#41018 BUG#39382 2008-12-02 sven test fails often. some failures fill up the disk, causing subsequent failures in many other tests +federated_transactions : Bug#29523 Transactions do not work +wait_timeout_func : Bug #41225 joro wait_timeout_func fails +kill : Bug#37780 2008-12-03 HHunger need some changes to be robust enough for pushbuild. +query_cache_28249 : Bug#41098 Query Cache returns wrong result with concurrent insert diff --git a/mysql-test/t/events_bugs.test b/mysql-test/t/events_bugs.test index 2e782cdd52c..69e2f681aa2 100644 --- a/mysql-test/t/events_bugs.test +++ b/mysql-test/t/events_bugs.test @@ -1,40 +1,133 @@ #### t/events_bugs.test # # Last change: -# 2008-10-16 mleich +# 2009-01-08 mleich # - Fix for -# Bug#39848 events_bugs fails sporadically on pushbuild -# (missing rows in table event_log) -# Bug#39863 events_bugs fails sporadically on pushbuild (extra processes -# in I_S.PROCESSLIST) -# Bug#39978 main.events_bugs does not clean up -# Bug#39569 events_bugs fails sporadically on pushbuild (should have -# failed with errno 1539) -# - Minor improvements of formatting -# -# -# Outcome of some experiments (mleich): -# 1. SET GLOBAL event_scheduler = 'ON'; -# Immediate observation of the processlist. -# Effects: -# 1. There is no guarantee to find immediate the user 'event_scheduler' -# within information_schema.processlist. -# 2. Some states of the user 'event_scheduler' found in PROCESSLIST: -# USER HOST DB COMMAND TIME STATE INFO -# event_scheduler localhost NULL Daemon 0 Waiting on empty queue NULL -# event_scheduler localhost NULL Daemon 0 Initialized NULL +# Bug#41111 events_bugs fails sporadically on pushbuild +# - Avoid effects of +# Bug#41925 Warning 1366 Incorrect string value: ... for column processlist.info +# +# Please set $ +let $fixed_bug41925= 0; +# +# Dear maintainer of this test. Please do NOT remove the next big comment. +# The tests for events were quite unstable over a significant time because the +# effects of events in general and their representation within the processlist +# were partially not known. Therefore I had to make excessive experiments. +# The comment with the outcome of these experiments will be moved into a README +# file as soon as the tests for events get their own testsuite. +# +# Outcome of some experiments (mleich, mysql-5.1 2008-12): +# -------------------------------------------------------- +# 0. Most time used setup: +# High parallel I/O load +# set global event_scheduler= off; +# sleep 3; +# use events_test; +# create event e_16407 on schedule every 2 second do +# begin +# select 'FIRST COMMAND', sleep(0.5); +# select 'SECOND COMMAND'; +# end| +# set global event_scheduler= on; +# Start observation of the processlist +# +# +# 1. SET GLOBAL event_scheduler = 'ON' and immediate observation of the processlist. +# 1.1 Effects around event scheduler: +# 1.1.1 First phase (very short) +# No user 'event_scheduler' within information_schema.processlist. +# 1.1.2 Second phase observed (independend of probably existing events and very short) was +# USER HOST DB COMMAND TIME STATE INFO +# event_scheduler localhost NULL Daemon 0 Initialized NULL +# 1.1.3 Third phase observed: +# 1.1.3.1 Case we do not have existing events (rather long) +# USER HOST DB COMMAND TIME STATE INFO +# event_scheduler localhost NULL Daemon 0 Waiting on empty queue NULL +# 1.1.3.2 Case there exists already an event +# 1.1.3.2.1 Event executor is not visible in processlist but comes up soon +# USER HOST DB COMMAND TIME STATE INFO +# event_scheduler localhost NULL Daemon 0 NULL +# or +# event_scheduler localhost NULL Daemon 0 NULL NULL +# 1.1.3.2.2 A bit later, at least one event executor is or was visible in processlist +# The states mentioned in 3.2.1 or a bit later +# USER HOST DB COMMAND TIME STATE INFO +# event_scheduler localhost NULL Daemon 0 Waiting for next activation NULL +# 1.2 Effects around event executor: +# Typical processlist content: +# USER evtest1 -- Definer of event +# DB events_test -- DB during time of event creation (use DB is not allowed in events) +# COMMAND Connect +# STATE NULL +# INFO SET @evname = 'ev_sched_1823' -- Part of the event code +# +# State before "User sleep select 'FIRST COMMAND', sleep(0.5);" +# ID USER HOST DB COMMAND TIME STATE INFO +# 7 event_scheduler localhost NULL Connect 0 NULL NULL +# !! The user is not the event creator and the DB is different. !! +# !! This means that we must get later a change of the identity. !! +# or +# USER HOST DB COMMAND TIME STATE INFO +# root localhost events_test Connect 0 checking permissions +# or +# USER HOST DB COMMAND TIME STATE INFO +# root localhost events_test Connect 0 checking permissions CREATE PROCEDURE .... +# or +# USER HOST DB COMMAND TIME STATE INFO +# root localhost events_test Connect 0 NULL select 'FIRST COMMAND', sleep(0.5) +# or +# USER HOST DB COMMAND TIME STATE INFO +# root localhost events_test Connect 0 checking permissions select 'FIRST COMMAND'... +# or +# USER HOST DB COMMAND TIME STATE INFO +# root localhost events_test Connect 0 Opening table select 'FIRST COMMAND', sleep(0.5) +# or +# USER HOST DB COMMAND TIME STATE INFO +# root localhost events_test Connect 0 Locked select 'FIRST COMMAND', sleep(0.5) +# or +# USER HOST DB COMMAND TIME STATE INFO +# root localhost events_test Connect 0 executing select 'FIRST COMMAND', sleep(0.5) +# +# State "User sleep select 'FIRST COMMAND', sleep(0.5);" reached +# USER HOST DB COMMAND TIME STATE INFO +# root localhost events_test Connect 0 User sleep select 'FIRST COMMAND', sleep(0.5) +# +# State at end (! It looks like a slow CREATE PROC !) of event code execution was sometimes +# USER HOST DB COMMAND TIME STATE INFO +# root localhost events_test Connect 0 logging slow query CREATE PROCEDURE `e_16407`... +# +# State after running some event code was sometimes +# USER HOST DB COMMAND TIME STATE INFO +# root localhost events_test Connect 0 logging slow query select 'SECOND COMMAND' +# +# State somewhere (I guess just before the event executor disappears) +# USER HOST DB COMMAND TIME STATE INFO +# Event thread fin <empty> events_test Connect 0 Clearing NULL +# +# # 2. SET GLOBAL event_scheduler = 'OFF'; # Immediate observation of the processlist. # Effects: # 1. I never found the user 'event_scheduler' within the processlist. # 2. Events just during execution could be found within the processlist # = It does not look like "SET GLOBAL event_scheduler = 'OFF'" stops them. -# 3. An event gets executed -# USER evtest1 (Definer of event) -# DB events_test (DB during time of event creation) -# COMMAND Connect -# STATE NULL -# INFO SET @evname = 'ev_sched_1823' (Part of the event code) +# ==> Everything mentioned in 1.2 above could be observed. +# +# Several subtests were weak because they showed random result set differences after issuing +# "SET GLOBAL EVENT_SCHEDULER= off;". +# 1. Reason one: There were already event executors +# Fix: Wait till there is no event executor active ==> no session WHERE +# - command IN ('Connect') +# There must be no parallel session being just in "Connect" phase! +# or +# - user = <who created the maybe current running events> +# There must be no parallel session of this person. +# or user = 'event_scheduler' with command = 'Connect' +# The session which will soon change its identity to event creator. +# +# 2. Reason two: If an event modifies a MyISAM table than a delayed visibilty of changes +# might occur (concurrent_inserts=on or delayed inserts ...). # # Can't test with embedded server that doesn't support grants @@ -47,6 +140,10 @@ drop database if exists mysqltest_db2; --enable_warnings create database events_test; use events_test; +# We use MyISAM tables and must avoid effects (visibility of changes might be +# delayed) caused by concurrent_insert on (default). +set @concurrent_insert= @@global.concurrent_insert; +set @@global.concurrent_insert = 0; # # START: Bug #31332 --event-scheduler option misbehaving @@ -56,8 +153,11 @@ use events_test; # option with no argument in events_bugs-master.opt turns the scheduler on. select * from information_schema.global_variables where variable_name like 'event_scheduler'; +# Check that the event_scheduler is really running +--source include/running_event_scheduler.inc SET GLOBAL event_scheduler = 'OFF'; +--source include/check_events_off.inc # # END: Bug #31332 @@ -132,8 +232,10 @@ create event e_55 on schedule every 10 hour starts 10000101000000 do drop table # Start - 16407: Events: Changes in sql_mode won't be taken into account # set global event_scheduler=off; +--source include/check_events_off.inc delete from mysql.event; set global event_scheduler= on; +--source include/running_event_scheduler.inc set @old_sql_mode:=@@sql_mode; set sql_mode=ansi; select get_lock('test_bug16407', 60); @@ -148,13 +250,13 @@ delimiter ;| # We wait till one event runs and hangs when trying to get the user lock. let $wait_condition= select count(*) > 0 from information_schema.processlist - where info = 'select get_lock(\'test_bug16407\', 60)'; + where state = 'User lock' and info = 'select get_lock(\'test_bug16407\', 60)'; --source include/wait_condition.inc --echo "Now if everything is fine the event has compiled and is locked" # Expect to see one session in events_test waiting for the user lock. select /*1*/ user, host, db, info from information_schema.processlist -where info = 'select get_lock(\'test_bug16407\', 60)'; +where state = 'User lock' and info = 'select get_lock(\'test_bug16407\', 60)'; select release_lock('test_bug16407'); # Try to avoid # Bug#39863 events_bugs fails sporadically on pushbuild (extra processes in I_S.PROCESSLIST) @@ -162,23 +264,27 @@ select release_lock('test_bug16407'); # Bug#32782 User lock hash fails to find lock # "various issues related to missing or incorrect return results # from release_lock()." -# Therefore we check here if the event executing session disappeared or +# Therefore we check here if the event executor is no more locked or # we waited >= 5 seconds for this to happen. let $wait_timeout= 5; let $wait_condition= select count(*) = 0 from information_schema.processlist - where info = 'select get_lock(\'test_bug16407\', 60)'; + where state = 'User lock' and info = 'select get_lock(\'test_bug16407\', 60)'; --source include/wait_condition.inc if (!`$wait_condition`) { - --echo ERROR: There must be no session with info = 'select get_lock('test_bug16407', 60) within the processlist. + --echo ERROR: There must be no session with + --echo state = 'User lock' and info = 'select get_lock('test_bug16407', 60) + --echo within the processlist. --echo We probably hit Bug#32782 User lock hash fails to find lock - eval select * from information_schema.processlist; + SELECT * FROM information_schema.processlist; --echo Abort exit; } set global event_scheduler= off; +# Wait till the event scheduler and all event executors have finished their work. +--source include/check_events_off.inc select event_schema, event_name, sql_mode from information_schema.events order by event_schema, event_name; --echo "Let's check whether we change the sql_mode on ALTER EVENT" @@ -191,9 +297,10 @@ set sql_mode="ansi"; select get_lock('ee_16407_2', 60); set global event_scheduler= 1; +--source include/running_event_scheduler.inc --echo "Another sql_mode test" set sql_mode="traditional"; -create table events_smode_test(ev_name char(10), a date) engine=myisam; +create table events_smode_test(ev_name char(10), a date); --echo "This should never insert something" delimiter |; create event ee_16407_2 on schedule every 60 second do @@ -203,7 +310,7 @@ begin insert into events_test.events_smode_test values('ee_16407_2','1980-19-02'); end| --error ER_TRUNCATED_WRONG_VALUE -insert into events_smode_test values ('test','1980-19-02')| +insert into events_test.events_smode_test values ('test','1980-19-02')| --echo "This is ok" create event ee_16407_3 on schedule every 60 second do begin @@ -223,13 +330,20 @@ end| delimiter ;| select event_schema, event_name, sql_mode from information_schema.events order by event_schema, event_name; +# We wait till we have three event executors waiting for the removal of the lock. let $wait_condition= select count(*) = 3 from information_schema.processlist - where info = 'select get_lock(\'ee_16407_2\', 60)'; + where state = 'User lock' and info = 'select get_lock(\'ee_16407_2\', 60)'; --source include/wait_condition.inc +# There is an extreme low risk that an additional event execution is just coming +# up because +# - the events have to be started every 60 seconds. +# - we are just after event creation + waiting for seeing 3 locked +# We expect to see three event executors in state 'User lock'. select /*2*/ user, host, db, info from information_schema.processlist -where info = 'select get_lock(\'ee_16407_2\', 60)'; +where state = 'User lock' and info = 'select get_lock(\'ee_16407_2\', 60)'; + select release_lock('ee_16407_2'); # Try to avoid @@ -244,13 +358,37 @@ let $wait_timeout= 5; let $wait_condition= select count(*) = 0 from information_schema.processlist - where info = 'select get_lock(\'ee_16407_2\', 60)'; + where state = 'User lock' and info = 'select get_lock(\'ee_16407_2\', 60)'; --source include/wait_condition.inc +if (!`$wait_condition`) +{ + --echo ERROR: There must be no session with + --echo state = 'User lock' and info = 'select get_lock('test_bug16407_2', 60) + --echo within the processlist. + --echo We probably hit Bug#32782 User lock hash fails to find lock + SELECT * FROM information_schema.processlist; + --echo Abort + exit; +} +# We expect to see no event executors in state 'User lock'. +if(!$fixed_bug41925) +{ + --disable_warnings +} select /*3*/ user, host, db, info from information_schema.processlist -where info = 'select get_lock(\'ee_16407_2\', 60)'; +where state = 'User lock' and info = 'select get_lock(\'ee_16407_2\', 60)'; +if(!$fixed_bug41925) +{ + --enable_warnings +} + set global event_scheduler= off; -select * from events_smode_test order by ev_name, a; +# Wait till the event scheduler and all event executors have finished their work. +# Without this the next queries will give unstable results. +--source include/check_events_off.inc + +select * from events_test.events_smode_test order by ev_name, a; --echo "OK, last check before we drop them" select event_schema, event_name, sql_mode from information_schema.events order by event_schema, event_name; drop event ee_16407_2; @@ -259,11 +397,12 @@ drop event ee_16407_4; --echo "And now one last test regarding sql_mode and call of SP from an event" -delete from events_smode_test; +delete from events_test.events_smode_test; set sql_mode='ansi'; select get_lock('ee_16407_5', 60); set global event_scheduler= on; +--source include/running_event_scheduler.inc set sql_mode='traditional'; delimiter |; @@ -286,34 +425,46 @@ delimiter ;| let $wait_condition= select count(*) = 2 from information_schema.processlist - where info = 'select get_lock(\'ee_16407_5\', 60)'; + where state = 'User lock' and info = 'select get_lock(\'ee_16407_5\', 60)'; --source include/wait_condition.inc --echo "Should have 2 locked processes" select /*4*/ user, host, db, info from information_schema.processlist -where (command!='Daemon' || user='event_scheduler') and (info is null or info not like '%processlist%') -order by info; +where state = 'User lock' and info = 'select get_lock(\'ee_16407_5\', 60)'; + select release_lock('ee_16407_5'); let $wait_condition= - select count(*) = 1 and user = 'event_scheduler' and info is null - from information_schema.processlist - where (command!='Daemon' || user='event_scheduler') - and (info is null or info not like '%processlist%'); + select count(*) = 0 from information_schema.processlist + where state = 'User lock' and info = 'select get_lock(\'ee_16407_5\', 60)'; --source include/wait_condition.inc --echo "Should have 0 processes locked" +if(!$fixed_bug41925) +{ + --disable_warnings +} select /*5*/ user, host, db, info from information_schema.processlist -where (command!='Daemon' || user='event_scheduler') and (info is null or info not like '%processlist%') -order by info; -select * from events_smode_test order by ev_name, a; +where state = 'User lock' and info = 'select get_lock(\'ee_16407_5\', 60)'; +if(!$fixed_bug41925) +{ + --enable_warnings +} + +# Wait till all event executors have finished their work, so that we can be sure +# that their changes to events_smode_test are done. +--source include/no_running_events.inc + +select * from events_test.events_smode_test order by ev_name, a; --echo "And here we check one more time before we drop the events" select event_schema, event_name, sql_mode from information_schema.events order by event_schema, event_name; + drop event ee_16407_5; drop event ee_16407_6; drop procedure ee_16407_5_pendant; drop procedure ee_16407_6_pendant; set global event_scheduler= off; +--source include/check_events_off.inc drop table events_smode_test; set sql_mode=@old_sql_mode; # @@ -324,6 +475,7 @@ set sql_mode=@old_sql_mode; # START - 18897: Events: unauthorized action possible with alter event rename # set global event_scheduler=off; +--source include/check_events_off.inc --disable_warnings delete from mysql.user where User like 'mysqltest_%'; delete from mysql.db where User like 'mysqltest_%'; @@ -409,6 +561,7 @@ create function f22830 () returns int return 5; select get_lock('ee_22830', 60); set global event_scheduler=on; +--source include/running_event_scheduler.inc delimiter |; create procedure p22830_wait() @@ -456,6 +609,7 @@ let $wait_condition= --source include/wait_condition.inc set global event_scheduler=off; +--source include/check_events_off.inc select event_name, event_definition, interval_value, interval_field from information_schema.events order by event_name; drop procedure p22830_wait; drop function f22830; @@ -537,6 +691,7 @@ DROP USER mysqltest_u1@localhost; # For the actual tests of time zones please see events_time_zone.test # SET GLOBAL EVENT_SCHEDULER= OFF; +--source include/check_events_off.inc SET @save_time_zone= @@TIME_ZONE; #---------------------------------------------------------------------- @@ -749,6 +904,7 @@ let $engine=MyISAM; USE test; SHOW GRANTS FOR CURRENT_USER; SET GLOBAL event_scheduler = ON; +--source include/running_event_scheduler.inc eval CREATE TABLE events_test.event_log (id int KEY AUTO_INCREMENT, ev_nm char(40), ev_cnt int, ev_tm timestamp) @@ -817,12 +973,14 @@ disconnect e1; DROP EVENT events_test.ev_sched_1823; DROP TABLE events_test.event_log; SET GLOBAL event_scheduler = OFF; +--source include/check_events_off.inc # # Bug#28641 CREATE EVENT with '2038.01.18 03:00:00' let server crash. # SET GLOBAL event_scheduler= ON; +--source include/running_event_scheduler.inc DELIMITER |; CREATE EVENT bug28641 ON SCHEDULE AT '2038.01.18 03:00:00' DO BEGIN @@ -831,6 +989,7 @@ END;| DELIMITER ;| SET GLOBAL event_scheduler= OFF; +--source include/check_events_off.inc DROP EVENT bug28641; ########################################################################### @@ -955,6 +1114,7 @@ SET GLOBAL READ_ONLY = 1; --echo SET GLOBAL EVENT_SCHEDULER = ON; +--source include/running_event_scheduler.inc --echo @@ -980,6 +1140,7 @@ let $wait_condition = --echo SET GLOBAL EVENT_SCHEDULER = OFF; +--source include/check_events_off.inc --echo @@ -1056,15 +1217,15 @@ drop event e1; # ########################################################################### -let $wait_condition= - select count(*) = 0 from information_schema.processlist - where db='events_test' and command = 'Connect' and user=current_user(); ---source include/wait_condition.inc +# Ensure that all event executors have finished their work and cannot harm +# the next test. +--source include/no_running_events.inc DROP DATABASE events_test; # Restore the original state i.e to how it was when test started # (option with no argument in events_bugs-master.opt turns the scheduler on). - SET GLOBAL event_scheduler= 'ON'; +--source include/running_event_scheduler.inc +SET @@global.concurrent_insert= @concurrent_insert; # THIS MUST BE THE LAST LINE in this file. diff --git a/mysql-test/t/events_scheduling.test b/mysql-test/t/events_scheduling.test index 87cfa42e283..041a2def490 100644 --- a/mysql-test/t/events_scheduling.test +++ b/mysql-test/t/events_scheduling.test @@ -58,8 +58,6 @@ ON COMPLETION PRESERVE DO INSERT INTO table_4 VALUES (1); -# Wait for the events to fire and check the data afterwards - # Let event_1 insert at least 4 records into the table let $wait_condition=select count(*) >= 4 from table_1; --source include/wait_condition.inc @@ -85,25 +83,13 @@ let $wait_condition=select count(*) = 0 from information_schema.events where event_name='event_4' and status='enabled'; --source include/wait_condition.inc -let $wait_condition=SELECT SUM(a) >= 4 FROM table_1; -source include/wait_condition.inc; -SELECT IF(SUM(a) >= 4, 'OK', 'ERROR') FROM table_1; - -# In case of a testing box under heavy load it cannot be guaranteed that -# it is really often enough checked if event_2 has to be executed. -# -> Bug#39854 events_scheduling fails sporadically on pushbuild -# Therefore we lowered here the original expectation of 5 to 4. -let $wait_condition=SELECT SUM(a) >= 4 FROM table_2; -source include/wait_condition.inc; -SELECT IF(SUM(a) >= 4, 'OK', 'ERROR') FROM table_2; - -let $wait_condition=SELECT SUM(a) >= 1 FROM table_3; -source include/wait_condition.inc; -SELECT IF(SUM(a) >= 1, 'OK', 'ERROR') FROM table_3; - -let $wait_condition=SELECT SUM(a) >= 1 FROM table_4; -source include/wait_condition.inc; -SELECT IF(SUM(a) >= 1, 'OK', 'ERROR') FROM table_4; +# +# On a busy system the scheduler may skip execution of events, +# we can't reliably expect that the data in a table to be modified +# by an event will be exact. Thus we do not SELECT from the tables +# in this test. See also +# Bug#39854 events_scheduling fails sporadically on pushbuild +# SELECT IF(TIME_TO_SEC(TIMEDIFF(ENDS,STARTS))=6, 'OK', 'ERROR') FROM INFORMATION_SCHEMA.EVENTS diff --git a/mysql-test/t/fulltext.test b/mysql-test/t/fulltext.test index 21b06ca0882..852369fd568 100644 --- a/mysql-test/t/fulltext.test +++ b/mysql-test/t/fulltext.test @@ -445,3 +445,12 @@ EXPLAIN SELECT * FROM t1 FORCE INDEX(b) WHERE MATCH(a) AGAINST('test' IN BOOLEAN MODE) AND b=1; DROP TABLE t1; + +# +# BUG#37245 - Full text search problem +# +CREATE TABLE t1(a CHAR(10)); +INSERT INTO t1 VALUES('aaa15'); +SELECT MATCH(a) AGAINST('aaa1* aaa14 aaa16' IN BOOLEAN MODE) FROM t1; +SELECT MATCH(a) AGAINST('aaa1* aaa14 aaa15 aaa16' IN BOOLEAN MODE) FROM t1; +DROP TABLE t1; diff --git a/mysql-test/t/fulltext_plugin-master.opt b/mysql-test/t/fulltext_plugin-master.opt new file mode 100644 index 00000000000..a2554caa20b --- /dev/null +++ b/mysql-test/t/fulltext_plugin-master.opt @@ -0,0 +1 @@ +$SIMPLE_PARSER_OPT diff --git a/mysql-test/t/fulltext_plugin.test b/mysql-test/t/fulltext_plugin.test new file mode 100644 index 00000000000..31978dadc51 --- /dev/null +++ b/mysql-test/t/fulltext_plugin.test @@ -0,0 +1,10 @@ +--source include/have_simple_parser.inc + +# +# BUG#39746 - Debug flag breaks struct definition (server crash) +# +INSTALL PLUGIN simple_parser SONAME 'mypluglib.so'; +CREATE TABLE t1(a TEXT, b TEXT, FULLTEXT(a) WITH PARSER simple_parser); +ALTER TABLE t1 ADD FULLTEXT(b) WITH PARSER simple_parser; +DROP TABLE t1; +UNINSTALL PLUGIN simple_parser; diff --git a/mysql-test/t/func_if.test b/mysql-test/t/func_if.test index 8da10f36cbe..4efea8e195e 100644 --- a/mysql-test/t/func_if.test +++ b/mysql-test/t/func_if.test @@ -150,4 +150,18 @@ FROM t1; DROP TABLE t1; +# +# Bug #40761: Assert on sum func on IF(..., CAST(longtext AS UNSIGNED), signed) +# (was: LEFT JOIN on inline view crashes server) +# + +CREATE TABLE t1 (c LONGTEXT); +INSERT INTO t1 VALUES(1), (2), (3), (4), ('12345678901234567890'); + +SELECT * FROM (SELECT MAX(IF(1, CAST(c AS UNSIGNED), 0)) FROM t1) AS te; +SELECT * FROM (SELECT MAX(IFNULL(CAST(c AS UNSIGNED), 0)) FROM t1) AS te; + +DROP TABLE t1; + + --echo End of 5.0 tests diff --git a/mysql-test/t/func_in.test b/mysql-test/t/func_in.test index d0d4dea0713..3fc1697f146 100644 --- a/mysql-test/t/func_in.test +++ b/mysql-test/t/func_in.test @@ -426,4 +426,17 @@ select * from t1 where NOT id in (select null union all select 1); select * from t1 where NOT id in (null, 1); drop table t1; +# +# Bug #41363: crash of mysqld on windows with aggregate in case +# + +CREATE TABLE t1(c0 INTEGER, c1 INTEGER, c2 INTEGER); +INSERT INTO t1 VALUES(1, 1, 1), (1, 1, 1); + +SELECT CASE AVG (c0) WHEN c1 * c2 THEN 1 END FROM t1; +SELECT CASE c1 * c2 WHEN SUM(c0) THEN 1 WHEN AVG(c0) THEN 2 END FROM t1; +SELECT CASE c1 WHEN c1 + 1 THEN 1 END, ABS(AVG(c0)) FROM t1; + +DROP TABLE t1; + --echo End of 5.1 tests diff --git a/mysql-test/t/func_str.test b/mysql-test/t/func_str.test index 5a5f4024bc4..5d77c678d52 100644 --- a/mysql-test/t/func_str.test +++ b/mysql-test/t/func_str.test @@ -1263,4 +1263,14 @@ CREATE VIEW v1 AS SELECT CHAR(0x414243) as c1; SELECT HEX(c1) from v1; DROP VIEW v1; +# +# Bug #35558 Wrong server metadata blows up the client +# +create table t1(a float); +insert into t1 values (1.33); +--enable_metadata +select format(a, 2) from t1; +--disable_metadata +drop table t1; + --echo End of 5.0 tests diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test index 3e5923157fe..b9da946a55f 100644 --- a/mysql-test/t/func_time.test +++ b/mysql-test/t/func_time.test @@ -304,6 +304,15 @@ select unix_timestamp('1970-01-01 03:00:01'); # check bad date, close to the boundary (we cut them off in the very end) select unix_timestamp('2038-01-19 07:14:07'); +# +# Bug #28759: DAYNAME() and MONTHNAME() return binary string +# + +SELECT CHARSET(DAYNAME(19700101)); +SELECT CHARSET(MONTHNAME(19700101)); +SELECT LOWER(DAYNAME(19700101)); +SELECT LOWER(MONTHNAME(19700101)); +SELECT COERCIBILITY(MONTHNAME('1970-01-01')),COERCIBILITY(DAYNAME('1970-01-01')); # # Test types from + INTERVAL diff --git a/mysql-test/t/grant.test b/mysql-test/t/grant.test index 853fd43028e..a9491dc2736 100644 --- a/mysql-test/t/grant.test +++ b/mysql-test/t/grant.test @@ -1295,6 +1295,13 @@ drop view v1; drop table test; drop function test_function; +# +# Bug#41456 SET PASSWORD hates CURRENT_USER() +# +SELECT CURRENT_USER(); +SET PASSWORD FOR CURRENT_USER() = PASSWORD("admin"); +SET PASSWORD FOR CURRENT_USER() = PASSWORD(""); + --echo End of 5.0 tests # diff --git a/mysql-test/t/information_schema.test b/mysql-test/t/information_schema.test index d475fb2adb9..7105d7e04f0 100644 --- a/mysql-test/t/information_schema.test +++ b/mysql-test/t/information_schema.test @@ -1387,4 +1387,11 @@ select a.VARIABLE_VALUE - b.VARIABLE_VALUE from t0 b, information_schema.global_ where a.VARIABLE_NAME = b.VARIABLE_NAME; drop table t0; +# +# Bug#35275 INFORMATION_SCHEMA.TABLES.CREATE_OPTIONS omits KEY_BLOCK_SIZE +# +CREATE TABLE t1(a INT) KEY_BLOCK_SIZE=1; +SELECT CREATE_OPTIONS FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='t1'; +DROP TABLE t1; + --echo End of 5.1 tests. diff --git a/mysql-test/t/innodb-autoinc.test b/mysql-test/t/innodb-autoinc.test index b51e8422fff..e6b804c4fff 100644 --- a/mysql-test/t/innodb-autoinc.test +++ b/mysql-test/t/innodb-autoinc.test @@ -131,3 +131,262 @@ SELECT c1 FROM t1; SHOW CREATE TABLE t1; DROP TABLE t1; +# +# Bug 38839 +# Reset the last value generated at end of statement +# +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c1 INT AUTO_INCREMENT, c2 INT, PRIMARY KEY(c1)) ENGINE=InnoDB; +INSERT INTO t1 VALUES (NULL, 1); +DELETE FROM t1 WHERE c1 = 1; +INSERT INTO t1 VALUES (2,1); +INSERT INTO t1 VALUES (NULL,8); +SELECT * FROM t1; +DROP TABLE t1; +# Bug 38839 -- same as above but for multi value insert +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c1 INT AUTO_INCREMENT, c2 INT, PRIMARY KEY(c1)) ENGINE=InnoDB; +INSERT INTO t1 VALUES (NULL, 1); +DELETE FROM t1 WHERE c1 = 1; +INSERT INTO t1 VALUES (2,1), (NULL, 8); +INSERT INTO t1 VALUES (NULL,9); +SELECT * FROM t1; +DROP TABLE t1; + +# +# Test changes to AUTOINC next value calculation +SET @@SESSION.AUTO_INCREMENT_INCREMENT=100, @@SESSION.AUTO_INCREMENT_OFFSET=10; +SHOW VARIABLES LIKE "%auto_inc%"; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c1 INT AUTO_INCREMENT, PRIMARY KEY(c1)) ENGINE=InnoDB; +INSERT INTO t1 VALUES (NULL),(5),(NULL); +INSERT INTO t1 VALUES (250),(NULL); +SELECT * FROM t1; +INSERT INTO t1 VALUES (1000); +SET @@INSERT_ID=400; +INSERT INTO t1 VALUES(NULL),(NULL); +SELECT * FROM t1; +DROP TABLE t1; + +# Test with SIGNED INT column, by inserting a 0 for the first column value +# 0 is treated in the same was NULL. +# Reset the AUTOINC session variables +SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; +SET @@INSERT_ID=1; +SHOW VARIABLES LIKE "%auto_inc%"; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c1 INT AUTO_INCREMENT, PRIMARY KEY(c1)) ENGINE=InnoDB; +INSERT INTO t1 VALUES(0); +SELECT * FROM t1; +SET @@SESSION.AUTO_INCREMENT_INCREMENT=100, @@SESSION.AUTO_INCREMENT_OFFSET=10; +INSERT INTO t1 VALUES (-1), (NULL),(2),(NULL); +INSERT INTO t1 VALUES (250),(NULL); +SELECT * FROM t1; +SET @@INSERT_ID=400; +# Duplicate error expected here for autoinc_lock_mode != TRADITIONAL +-- error ER_DUP_ENTRY,1062 +INSERT INTO t1 VALUES(NULL),(NULL); +SELECT * FROM t1; +DROP TABLE t1; + +# Test with SIGNED INT column +# Reset the AUTOINC session variables +SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; +SET @@INSERT_ID=1; +SHOW VARIABLES LIKE "%auto_inc%"; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c1 INT AUTO_INCREMENT, PRIMARY KEY(c1)) ENGINE=InnoDB; +INSERT INTO t1 VALUES(-1); +SELECT * FROM t1; +SET @@SESSION.AUTO_INCREMENT_INCREMENT=100, @@SESSION.AUTO_INCREMENT_OFFSET=10; +SHOW VARIABLES LIKE "%auto_inc%"; +INSERT INTO t1 VALUES (-2), (NULL),(2),(NULL); +INSERT INTO t1 VALUES (250),(NULL); +SELECT * FROM t1; +INSERT INTO t1 VALUES (1000); +SET @@INSERT_ID=400; +INSERT INTO t1 VALUES(NULL),(NULL); +SELECT * FROM t1; +DROP TABLE t1; + +# Test with UNSIGNED INT column, single insert +# The sign in the value is ignored and a new column value is generated +# Reset the AUTOINC session variables +SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; +SET @@INSERT_ID=1; +SHOW VARIABLES LIKE "%auto_inc%"; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c1 INT UNSIGNED AUTO_INCREMENT, PRIMARY KEY(c1)) ENGINE=InnoDB; +INSERT INTO t1 VALUES(-1); +SELECT * FROM t1; +SET @@SESSION.AUTO_INCREMENT_INCREMENT=100, @@SESSION.AUTO_INCREMENT_OFFSET=10; +SHOW VARIABLES LIKE "%auto_inc%"; +INSERT INTO t1 VALUES (-2); +INSERT INTO t1 VALUES (NULL); +INSERT INTO t1 VALUES (2); +INSERT INTO t1 VALUES (NULL); +INSERT INTO t1 VALUES (250); +INSERT INTO t1 VALUES (NULL); +SELECT * FROM t1; +INSERT INTO t1 VALUES (1000); +SET @@INSERT_ID=400; +INSERT INTO t1 VALUES(NULL); +INSERT INTO t1 VALUES(NULL); +SELECT * FROM t1; +DROP TABLE t1; + +# Test with UNSIGNED INT column, multi-value inserts +# The sign in the value is ignored and a new column value is generated +# Reset the AUTOINC session variables +SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; +SET @@INSERT_ID=1; +SHOW VARIABLES LIKE "%auto_inc%"; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c1 INT UNSIGNED AUTO_INCREMENT, PRIMARY KEY(c1)) ENGINE=InnoDB; +INSERT INTO t1 VALUES(-1); +SELECT * FROM t1; +SET @@SESSION.AUTO_INCREMENT_INCREMENT=100, @@SESSION.AUTO_INCREMENT_OFFSET=10; +SHOW VARIABLES LIKE "%auto_inc%"; +INSERT INTO t1 VALUES (-2),(NULL),(2),(NULL); +INSERT INTO t1 VALUES (250),(NULL); +SELECT * FROM t1; +INSERT INTO t1 VALUES (1000); +SET @@INSERT_ID=400; +# Duplicate error expected here for autoinc_lock_mode != TRADITIONAL +-- error ER_DUP_ENTRY,1062 +INSERT INTO t1 VALUES(NULL),(NULL); +SELECT * FROM t1; +DROP TABLE t1; + +# +# Check for overflow handling when increment is > 1 +SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; +SET @@INSERT_ID=1; +SHOW VARIABLES LIKE "%auto_inc%"; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c1 BIGINT AUTO_INCREMENT, PRIMARY KEY(c1)) ENGINE=InnoDB; +# TODO: Fix the autoinc init code +# We have to do this because of a bug in the AUTOINC init code. +INSERT INTO t1 VALUES(NULL); +INSERT INTO t1 VALUES (9223372036854775794); #-- 2^63 - 14 +SELECT * FROM t1; +SET @@SESSION.AUTO_INCREMENT_INCREMENT=2, @@SESSION.AUTO_INCREMENT_OFFSET=10; +SHOW VARIABLES LIKE "%auto_inc%"; +# This should just fit +INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL); +SELECT * FROM t1; +DROP TABLE t1; + +# +# Check for overflow handling when increment and offser are > 1 +SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; +SET @@INSERT_ID=1; +SHOW VARIABLES LIKE "%auto_inc%"; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c1 BIGINT UNSIGNED AUTO_INCREMENT, PRIMARY KEY(c1)) ENGINE=InnoDB; +# TODO: Fix the autoinc init code +# We have to do this because of a bug in the AUTOINC init code. +INSERT INTO t1 VALUES(NULL); +INSERT INTO t1 VALUES (18446744073709551603); #-- 2^64 - 13 +SELECT * FROM t1; +SET @@SESSION.AUTO_INCREMENT_INCREMENT=2, @@SESSION.AUTO_INCREMENT_OFFSET=10; +SHOW VARIABLES LIKE "%auto_inc%"; +# This should fail because of overflow but it doesn't, it seems to be +# a MySQL server bug. It wraps around to 0 for the last value. +# See MySQL Bug# 39828 +# +# Instead of wrapping around, it asserts when MySQL is compiled --with-debug +# (see sql/handler.cc:handler::update_auto_increment()). Don't test for +# overflow until Bug #39828 is fixed. +# +# Since this asserts when compiled --with-debug, we can't properly test this +# until Bug #39828 is fixed. For now, this test is meaningless. +#if Bug #39828 is fixed +#INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL); +#else +INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL); +#endif +SELECT * FROM t1; +DROP TABLE t1; + +# +# Check for overflow handling when increment and offset are odd numbers +SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; +SET @@INSERT_ID=1; +SHOW VARIABLES LIKE "%auto_inc%"; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c1 BIGINT UNSIGNED AUTO_INCREMENT, PRIMARY KEY(c1)) ENGINE=InnoDB; +# TODO: Fix the autoinc init code +# We have to do this because of a bug in the AUTOINC init code. +INSERT INTO t1 VALUES(NULL); +INSERT INTO t1 VALUES (18446744073709551603); #-- 2^64 - 13 +SELECT * FROM t1; +SET @@SESSION.AUTO_INCREMENT_INCREMENT=5, @@SESSION.AUTO_INCREMENT_OFFSET=7; +SHOW VARIABLES LIKE "%auto_inc%"; +# This should fail because of overflow but it doesn't. It fails with +# a duplicate entry message because of a MySQL server bug, it wraps +# around. See MySQL Bug# 39828, once MySQL fix the bug we can replace +# the ER_DUP_ENTRY, 1062 below with the appropriate error message +# +# Since this asserts when compiled --with-debug, we can't properly test this +# until Bug #39828 is fixed. For now, this test is meaningless. +#if Bug #39828 is fixed +# Still need to fix this error code, error should mention overflow +#-- error ER_DUP_ENTRY,1062 +#INSERT INTO t1 VALUES (NULL),(NULL), (NULL); +#else +INSERT INTO t1 VALUES (NULL),(NULL); +#endif +SELECT * FROM t1; +DROP TABLE t1; + +# Check for overflow handling when increment and offset are odd numbers +# and check for large -ve numbers +SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; +SET @@INSERT_ID=1; +SHOW VARIABLES LIKE "%auto_inc%"; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c1 BIGINT AUTO_INCREMENT, PRIMARY KEY(c1)) ENGINE=InnoDB; +# TODO: Fix the autoinc init code +# We have to do this because of a bug in the AUTOINC init code. +INSERT INTO t1 VALUES(NULL); +INSERT INTO t1 VALUES(-9223372036854775806); #-- -2^63 + 2 +INSERT INTO t1 VALUES(-9223372036854775807); #-- -2^63 + 1 +INSERT INTO t1 VALUES(-9223372036854775808); #-- -2^63 +SELECT * FROM t1; +SET @@SESSION.AUTO_INCREMENT_INCREMENT=3, @@SESSION.AUTO_INCREMENT_OFFSET=3; +SHOW VARIABLES LIKE "%auto_inc%"; +INSERT INTO t1 VALUES (NULL),(NULL), (NULL); +SELECT * FROM t1; +DROP TABLE t1; +# +# Check for overflow handling when increment and offset are very +# large numbers 2^60 +SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; +SET @@INSERT_ID=1; +SHOW VARIABLES LIKE "%auto_inc%"; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c1 BIGINT UNSIGNED AUTO_INCREMENT, PRIMARY KEY(c1)) ENGINE=InnoDB; +# TODO: Fix the autoinc init code +# We have to do this because of a bug in the AUTOINC init code. +INSERT INTO t1 VALUES(NULL); +INSERT INTO t1 VALUES (18446744073709551610); #-- 2^64 - 2 +SELECT * FROM t1; +SET @@SESSION.AUTO_INCREMENT_INCREMENT=1152921504606846976, @@SESSION.AUTO_INCREMENT_OFFSET=1152921504606846976; +SHOW VARIABLES LIKE "%auto_inc%"; +# This should fail because of overflow but it doesn't. It wraps around +# and the autoinc values look bogus too. +# See MySQL Bug# 39828, once MySQL fix the bug we can enable the error +# code expected test. +# -- error ER_AUTOINC_READ_FAILED,1467 +# +# Since this asserts when compiled --with-debug, we can't properly test this +# until Bug #39828 is fixed. For now, this test is meaningless. +#if Bug #39828 is fixed +#-- error ER_AUTOINC_READ_FAILED,1467 +#INSERT INTO t1 VALUES (NULL),(NULL); +#else +INSERT INTO t1 VALUES (NULL); +#endif +SELECT * FROM t1; +DROP TABLE t1; diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test index 53a210e9972..b0353ed5268 100644 --- a/mysql-test/t/innodb.test +++ b/mysql-test/t/innodb.test @@ -2477,6 +2477,7 @@ SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE table_name = 't2'; DROP TABLE t2; DROP TABLE t1; # End 34920 test +# # Bug #29507 TRUNCATE shows to many rows effected # CONNECTION default; @@ -2493,6 +2494,36 @@ TRUNCATE TABLE t1; --disable_info DROP TABLE t1; # +# Bug#35537 Innodb doesn't increment handler_update and handler_delete. +# +-- disable_query_log +-- disable_result_log + +CONNECT (c1,localhost,root,,); + +DROP TABLE IF EXISTS bug35537; +CREATE TABLE bug35537 ( + c1 int +) ENGINE=InnoDB; + +INSERT INTO bug35537 VALUES (1); + +-- enable_result_log + +SHOW SESSION STATUS LIKE 'Handler_update%'; +SHOW SESSION STATUS LIKE 'Handler_delete%'; + +UPDATE bug35537 SET c1 = 2 WHERE c1 = 1; +DELETE FROM bug35537 WHERE c1 = 2; + +SHOW SESSION STATUS LIKE 'Handler_update%'; +SHOW SESSION STATUS LIKE 'Handler_delete%'; + +DROP TABLE bug35537; + +DISCONNECT c1; +CONNECTION default; + ####################################################################### # # # Please, DO NOT TOUCH this file as well as the innodb.result file. # diff --git a/mysql-test/t/innodb_bug38231.test b/mysql-test/t/innodb_bug38231.test new file mode 100644 index 00000000000..b3fcd89f371 --- /dev/null +++ b/mysql-test/t/innodb_bug38231.test @@ -0,0 +1,75 @@ +# +# Bug#38231 Innodb crash in lock_reset_all_on_table() on TRUNCATE + LOCK / UNLOCK +# http://bugs.mysql.com/38231 +# + +-- source include/have_innodb.inc + +SET storage_engine=InnoDB; + +# we care only that the following SQL commands do not crash the server +-- disable_query_log +-- disable_result_log + +DROP TABLE IF EXISTS bug38231; +CREATE TABLE bug38231 (a INT); + +-- connect (con1,localhost,root,,) +-- connect (con2,localhost,root,,) + +-- connection con1 +SET autocommit=0; +LOCK TABLE bug38231 WRITE; + +-- connection con2 +SET autocommit=0; +-- send +LOCK TABLE bug38231 WRITE; + +-- connection default +-- send +TRUNCATE TABLE bug38231; + +-- connection con1 +# give time to TRUNCATE and others to be executed; without sleep, sometimes +# UNLOCK executes before TRUNCATE +# TODO: Replace with wait_condition once possible under embedded server. +-- sleep 0.2 +# this crashes the server if the bug is present +UNLOCK TABLES; + +# clean up + +-- connection con2 +-- reap +UNLOCK TABLES; + +-- connection default +-- reap +-- disconnect con1 +-- disconnect con2 + +# test that TRUNCATE works with with row-level locks + +-- enable_query_log +-- enable_result_log + +INSERT INTO bug38231 VALUES (1), (10), (300); + +-- connect (con4,localhost,root,,) + +-- connection con4 +SET autocommit=0; +SELECT * FROM bug38231 FOR UPDATE; + +-- connection default +TRUNCATE TABLE bug38231; + +-- connection con4 +COMMIT; + +-- connection default + +-- disconnect con4 + +DROP TABLE bug38231; diff --git a/mysql-test/t/innodb_bug39438-master.opt b/mysql-test/t/innodb_bug39438-master.opt new file mode 100644 index 00000000000..43fac202fd4 --- /dev/null +++ b/mysql-test/t/innodb_bug39438-master.opt @@ -0,0 +1 @@ +--innodb-file-per-table=1 diff --git a/mysql-test/t/innodb_bug39438.test b/mysql-test/t/innodb_bug39438.test new file mode 100644 index 00000000000..4dc3d957c39 --- /dev/null +++ b/mysql-test/t/innodb_bug39438.test @@ -0,0 +1,27 @@ +# +# Bug#39438 Testcase for Bug#39436 crashes on 5.1 in fil_space_get_latch +# http://bugs.mysql.com/39438 +# +# This test must be run with innodb_file_per_table=1 because the crash +# only occurs if that option is turned on and DISCARD TABLESPACE only +# works with innodb_file_per_table. +# + +-- source include/have_innodb.inc + +SET storage_engine=InnoDB; + +# we care only that the following SQL commands do not crash the server +-- disable_query_log +-- disable_result_log + +DROP TABLE IF EXISTS bug39438; + +CREATE TABLE bug39438 (id INT) ENGINE=INNODB; + +ALTER TABLE bug39438 DISCARD TABLESPACE; + +# this crashes the server if the bug is present +SHOW TABLE STATUS; + +DROP TABLE bug39438; diff --git a/mysql-test/t/innodb_mysql.test b/mysql-test/t/innodb_mysql.test index d47406697f8..21ee440f10b 100644 --- a/mysql-test/t/innodb_mysql.test +++ b/mysql-test/t/innodb_mysql.test @@ -53,3 +53,135 @@ CREATE TABLE t1 (a char(50)) ENGINE=InnoDB; CREATE INDEX i1 on t1 (a(3)); SELECT * FROM t1 WHERE a = 'abcde'; DROP TABLE t1; + +# +# Bug #37742: HA_EXTRA_KEYREAD flag is set when key contains only prefix of +# requested column +# + +CREATE TABLE foo (a int, b int, c char(10), + PRIMARY KEY (c(3)), + KEY b (b) +) engine=innodb; + +CREATE TABLE foo2 (a int, b int, c char(10), + PRIMARY KEY (c), + KEY b (b) +) engine=innodb; + +CREATE TABLE bar (a int, b int, c char(10), + PRIMARY KEY (c(3)), + KEY b (b) +) engine=myisam; + +INSERT INTO foo VALUES + (1,2,'abcdefghij'), (2,3,''), (3,4,'klmnopqrst'), + (4,5,'uvwxyz'), (5,6,'meotnsyglt'), (4,5,'asfdewe'); + +INSERT INTO bar SELECT * FROM foo; +INSERT INTO foo2 SELECT * FROM foo; + +--query_vertical EXPLAIN SELECT c FROM bar WHERE b>2; +--query_vertical EXPLAIN SELECT c FROM foo WHERE b>2; +--query_vertical EXPLAIN SELECT c FROM foo2 WHERE b>2; + +--query_vertical EXPLAIN SELECT c FROM bar WHERE c>2; +--query_vertical EXPLAIN SELECT c FROM foo WHERE c>2; +--query_vertical EXPLAIN SELECT c FROM foo2 WHERE c>2; + +DROP TABLE foo, bar, foo2; + +# +# Bug#41348: INSERT INTO tbl SELECT * FROM temp_tbl overwrites locking type of temp table +# + +--disable_warnings +DROP TABLE IF EXISTS t1,t3,t2; +DROP FUNCTION IF EXISTS f1; +--enable_warnings + +DELIMITER |; +CREATE FUNCTION f1() RETURNS VARCHAR(250) + BEGIN + return 'hhhhhhh' ; + END| +DELIMITER ;| + +CREATE TABLE t1 (a VARCHAR(20), b VARCHAR(20), c VARCHAR(20)) ENGINE=INNODB; + +BEGIN WORK; + +CREATE TEMPORARY TABLE t2 (a VARCHAR(20), b VARCHAR(20), c varchar(20)) ENGINE=INNODB; +CREATE TEMPORARY TABLE t3 LIKE t2; + +INSERT INTO t1 VALUES ('a','b',NULL),('c','d',NULL),('e','f',NULL); + +SET @stmt := CONCAT('INSERT INTO t2 SELECT tbl.a, tbl.b, f1()',' FROM t1 tbl'); +PREPARE stmt1 FROM @stmt; + +SET @stmt := CONCAT('INSERT INTO t3', ' SELECT * FROM t2'); +PREPARE stmt3 FROM @stmt; + +EXECUTE stmt1; + +COMMIT; + +DEALLOCATE PREPARE stmt1; +DEALLOCATE PREPARE stmt3; + +DROP TABLE t1,t3,t2; +DROP FUNCTION f1; + +# +# Bug#37016: TRUNCATE TABLE removes some rows but not all +# + +--disable_warnings +DROP TABLE IF EXISTS t1,t2; +--enable_warnings + +CREATE TABLE t1 (id INT NOT NULL, PRIMARY KEY (id)) ENGINE=INNODB; +CREATE TABLE t2 (id INT PRIMARY KEY, + t1_id INT, INDEX par_ind (t1_id), + FOREIGN KEY (t1_id) REFERENCES t1(id)) ENGINE=INNODB; +INSERT INTO t1 VALUES (1),(2); +INSERT INTO t2 VALUES (3,2); + +SET AUTOCOMMIT = 0; + +START TRANSACTION; +--error ER_ROW_IS_REFERENCED_2 +TRUNCATE TABLE t1; +SELECT * FROM t1; +COMMIT; +SELECT * FROM t1; + +START TRANSACTION; +--error ER_ROW_IS_REFERENCED_2 +TRUNCATE TABLE t1; +SELECT * FROM t1; +ROLLBACK; +SELECT * FROM t1; + +SET AUTOCOMMIT = 1; + +START TRANSACTION; +SELECT * FROM t1; +COMMIT; + +--error ER_ROW_IS_REFERENCED_2 +TRUNCATE TABLE t1; +SELECT * FROM t1; +DELETE FROM t2 WHERE id = 3; + +START TRANSACTION; +SELECT * FROM t1; +TRUNCATE TABLE t1; +ROLLBACK; +SELECT * FROM t1; +TRUNCATE TABLE t2; + +DROP TABLE t2; +DROP TABLE t1; + +--echo End of 5.1 tests diff --git a/mysql-test/t/innodb_mysql_rbk-master.opt b/mysql-test/t/innodb_mysql_rbk-master.opt new file mode 100644 index 00000000000..0e400f9c36b --- /dev/null +++ b/mysql-test/t/innodb_mysql_rbk-master.opt @@ -0,0 +1 @@ +--innodb_lock_wait_timeout=1 --innodb_rollback_on_timeout=1 diff --git a/mysql-test/t/innodb_mysql_rbk.test b/mysql-test/t/innodb_mysql_rbk.test new file mode 100644 index 00000000000..d2368c81f95 --- /dev/null +++ b/mysql-test/t/innodb_mysql_rbk.test @@ -0,0 +1,35 @@ +-- source include/have_innodb.inc + +# +# Bug #41453: Assertion `m_status == DA_ERROR' failed in +# Diagnostics_area::sql_errno +# + +CREATE TABLE t1(a INT, b INT NOT NULL, PRIMARY KEY (a)) ENGINE=innodb +DEFAULT CHARSET=latin1; +INSERT INTO t1 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7); +CONNECT (con1,localhost,root,,); +CONNECT (con2,localhost,root,,); + +CONNECTION con1; +START TRANSACTION; +SELECT * FROM t1 WHERE b=3 LIMIT 1 FOR UPDATE; +CONNECTION con2; +START TRANSACTION; +--error ER_LOCK_WAIT_TIMEOUT +UPDATE t1 SET b=b+12 WHERE a > 2 ORDER BY a; +ROLLBACK; + +CONNECTION con1; +START TRANSACTION; +SELECT * FROM t1 WHERE b=3 LIMIT 1 FOR UPDATE; +CONNECTION con2; +START TRANSACTION; +--error ER_LOCK_WAIT_TIMEOUT +UPDATE t1 SET b=10 WHERE a > 1 ORDER BY a; +SELECT * FROM t1 WHERE b = 10; + +CONNECTION default; +DISCONNECT con1; +DISCONNECT con2; +DROP TABLE t1; diff --git a/mysql-test/t/log_bin_trust_function_creators_func-master.opt b/mysql-test/t/log_bin_trust_function_creators_func-master.opt deleted file mode 100644 index 2dd562ea1aa..00000000000 --- a/mysql-test/t/log_bin_trust_function_creators_func-master.opt +++ /dev/null @@ -1 +0,0 @@ ---log-bin=test.log diff --git a/mysql-test/t/log_bin_trust_function_creators_func.test b/mysql-test/t/log_bin_trust_function_creators_func.test index 265911a0207..0168114b11b 100644 --- a/mysql-test/t/log_bin_trust_function_creators_func.test +++ b/mysql-test/t/log_bin_trust_function_creators_func.test @@ -20,6 +20,8 @@ # # ############################################################################### +source include/have_log_bin.inc; + --disable_warnings drop table if exists t1; --enable_warnings @@ -46,10 +48,10 @@ connect (test_con1,localhost,tt,,); connection test_con1; SELECT @@log_bin_trust_function_creators; -SELECT @@sql_log_bin; ---echo ## Creating new function f1 ## +--echo ## Creating new function f1 fails because no DETERMINISTIC ### delimiter |; +--error ER_BINLOG_UNSAFE_ROUTINE CREATE FUNCTION f1(a INT) RETURNS INT BEGIN IF (a < 3) THEN @@ -59,8 +61,30 @@ BEGIN END| delimiter ;| ---echo 'Bug: Create Function should give error here because non-super user'; ---echo 'is creating function here'; +--echo ## Creating new function f1 fails because non-super user ## +delimiter |; +--error ER_BINLOG_CREATE_ROUTINE_NEED_SUPER +CREATE FUNCTION f1(a INT) RETURNS INT DETERMINISTIC +BEGIN + IF (a < 3) THEN + INSERT INTO t2 VALUES (a); + END IF; + RETURN 1; +END| +delimiter ;| + +connection default; + +--echo ## Creating new function f1 succeeds ## +delimiter |; +CREATE FUNCTION f1(a INT) RETURNS INT DETERMINISTIC +BEGIN + IF (a < 3) THEN + INSERT INTO t2 VALUES (a); + END IF; + RETURN 1; +END| +delimiter ;| --echo ## Creating new table t1 ## CREATE TABLE t1 (a INT); diff --git a/mysql-test/t/log_state.test b/mysql-test/t/log_state.test index c1249985eba..e40dd1e3491 100644 --- a/mysql-test/t/log_state.test +++ b/mysql-test/t/log_state.test @@ -1,14 +1,29 @@ -# hhunger 08.22.2008: with check-testcases differences due to bug#38889 using -# slow_query_log_file or general_log_file - --- source include/not_embedded.inc +### t/log_state.test ### +# +# This test suffers from server +# Bug#38124 "general_log_file" variable silently unset when using expression +# In short: +# SET GLOBAL general_log_file = @<whatever> +# SET GLOBAL slow_query_log = @<whatever> +# cause that the value of these server system variables is set to default +# instead of the assigned values. There comes no error message or warning. +# If this bug is fixed please +# 1. try this test with "let $fixed_bug38124 = 0;" +# 2. remove all workarounds if 1. was successful. +let $fixed_bug38124 = 0; + +--source include/not_embedded.inc --source include/have_csv.inc +# Several subtests modify global variables. Save the initial values only here, +# but reset to the initial values per subtest. +SET @old_general_log= @@global.general_log; +SET @old_general_log_file= @@global.general_log_file; +SET @old_slow_query_log= @@global.slow_query_log; +SET @old_slow_query_log_file= @@global.slow_query_log_file; + + --disable_ps_protocol -# save default value to set them back at the end of the test -set @start_general_log= @@global.general_log; -set @start_slow_query_log= @@global.slow_query_log; -set @start_general_log_file= @@global.general_log_file; set global general_log= OFF; truncate table mysql.general_log; @@ -31,20 +46,32 @@ show global variables where Variable_name = 'log' or Variable_name = 'log_slow_queries' or Variable_name = 'general_log' or Variable_name = 'slow_query_log'; +--echo # Establish connection con1 (user=root) connect (con1,localhost,root,,); +--echo # Switch to connection con1 connection con1; -set session long_query_time=1; -select sleep(2); +# Please increase @long_query_time if the corresponding selects show an +# additional unexpected entry like +# start_time ... sql_text +# TIMESTAMP ... set session long_query_time=... +# (Bug#40377 sporadic pushbuild failure in log_state: result mismatch) +--replace_result 2 <long_query_time> +set @long_query_time = 2; +set session long_query_time = @long_query_time; +select sleep(@long_query_time + 1); --replace_column 1 TIMESTAMP 2 USER_HOST 3 QUERY_TIME select * from mysql.slow_log where sql_text NOT LIKE '%slow_log%'; +--echo # Switch to connection default connection default; set global slow_query_log= ON; +--echo # Switch to connection con1 connection con1; -set session long_query_time=1; -select sleep(2); +set session long_query_time = @long_query_time; +select sleep(@long_query_time + 1); --replace_column 1 TIMESTAMP 2 USER_HOST 3 QUERY_TIME select * from mysql.slow_log where sql_text NOT LIKE '%slow_log%'; +--echo # Switch to connection default connection default; show global variables where Variable_name = 'log' or Variable_name = 'log_slow_queries' or @@ -80,7 +107,7 @@ show variables like 'log_output'; # Can't set general_log_file to a non existing file --error ER_WRONG_VALUE_FOR_VAR -set global general_log_file='/not exiting path/log.master'; +set global general_log_file='/not existing path/log.master'; # Can't set general_log_file to a directory --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR @@ -134,17 +161,30 @@ drop table t1; --replace_column 1 TIMESTAMP 2 USER_HOST 3 # select * from mysql.general_log; -# -# Bug#29129 (Resetting general_log while the GLOBAL READ LOCK is set causes -# a deadlock) +# Reset to initial values +SET @@global.general_log = @old_general_log; +SET @@global.general_log_file = @old_general_log_file; +SET @@global.slow_query_log = @old_slow_query_log; +SET @@global.slow_query_log_file = @old_slow_query_log_file; +if(!$fixed_bug38124) +{ + --disable_query_log + let $my_var = `SELECT @old_general_log_file`; + eval SET @@global.general_log_file = '$my_var'; + let $my_var = `SELECT @old_slow_query_log_file`; + eval SET @@global.slow_query_log_file = '$my_var'; + --enable_query_log +} -# save state -SET @old_general_log_state = @@global.general_log; -SET @old_slow_log_state = @@global.slow_query_log; +########################################################################### -# Test ON->OFF transition under a GLOBAL READ LOCK +# +# Bug#29129 (Resetting general_log while the GLOBAL READ LOCK is set causes +# a deadlock) +# +# Test ON->OFF transition under a GLOBAL READ LOCK SET GLOBAL general_log = ON; SET GLOBAL slow_query_log = ON; @@ -156,7 +196,6 @@ SET GLOBAL slow_query_log = OFF; UNLOCK TABLES; # Test OFF->ON transition under a GLOBAL READ LOCK - FLUSH TABLES WITH READ LOCK; SET GLOBAL general_log = ON; @@ -165,7 +204,6 @@ SET GLOBAL slow_query_log = ON; UNLOCK TABLES; # Test ON->OFF transition under a GLOBAL READ_ONLY - SET GLOBAL READ_ONLY = ON; SET GLOBAL general_log = OFF; @@ -174,7 +212,6 @@ SET GLOBAL slow_query_log = OFF; SET GLOBAL READ_ONLY = OFF; # Test OFF->ON transition under a GLOBAL READ_ONLY - SET GLOBAL READ_ONLY = ON; SET GLOBAL general_log = ON; @@ -182,17 +219,18 @@ SET GLOBAL slow_query_log = ON; SET GLOBAL READ_ONLY = OFF; -# Restore state +# Reset to initial values +SET GLOBAL general_log = @old_general_log; +SET GLOBAL slow_query_log = @old_slow_query_log; -SET GLOBAL general_log = @old_general_log_state; -SET GLOBAL slow_query_log = @old_slow_log_state; + +########################################################################### # -# Bug #29131: SHOW VARIABLES reports variable 'log' but SET doesn't recognize it +# Bug#29131: SHOW VARIABLES reports variable 'log' but SET doesn't recognize it # -SET @old_general_log_state = @@global.general_log; -SET @old_slow_log_state = @@global.slow_query_log; +SET GLOBAL general_log = ON; SHOW VARIABLES LIKE 'general_log'; SHOW VARIABLES LIKE 'log'; @@ -218,67 +256,84 @@ SHOW VARIABLES LIKE 'slow_query_log'; SHOW VARIABLES LIKE 'log_slow_queries'; SELECT @@slow_query_log, @@log_slow_queries; -SET GLOBAL general_log = @old_general_log_state; -SET GLOBAL slow_query_log = @old_slow_log_state; +SET GLOBAL general_log = @old_general_log; +SET GLOBAL slow_query_log = @old_slow_query_log; + + +########################################################################### # -# Bug #31604: server crash when setting slow_query_log_file/general_log_file +# Bug#31604: server crash when setting slow_query_log_file/general_log_file # -set @old_general_log_file= @@global.general_log_file; -set @old_slow_query_log_file= @@global.slow_query_log_file; --error ER_WRONG_VALUE_FOR_VAR -set global general_log_file= concat('/not exiting path/log.maste', 'r'); +SET GLOBAL general_log_file= CONCAT('/not existing path/log.maste', 'r'); --error ER_WRONG_VALUE_FOR_VAR -set global general_log_file= NULL; +SET GLOBAL general_log_file= NULL; --error ER_WRONG_VALUE_FOR_VAR -set global slow_query_log_file= concat('/not exiting path/log.maste', 'r'); +SET GLOBAL slow_query_log_file= CONCAT('/not existing path/log.maste', 'r'); --error ER_WRONG_VALUE_FOR_VAR -set global slow_query_log_file= NULL; - -set global general_log_file= @old_general_log_file; -set global slow_query_log_file= @old_slow_query_log_file; +SET GLOBAL slow_query_log_file= NULL; + +# Reset to initial values in case a setting above was successful. +SET GLOBAL general_log_file= @old_general_log_file; +SET GLOBAL slow_query_log_file= @old_slow_query_log_file; +if(!$fixed_bug38124) +{ + --disable_query_log + let $my_var = `SELECT @old_general_log_file`; + eval SET @@global.general_log_file = '$my_var'; + let $my_var = `SELECT @old_slow_query_log_file`; + eval SET @@global.slow_query_log_file = '$my_var'; + --enable_query_log +} ########################################################################### --echo --echo # -- --echo # -- Bug#32748: Inconsistent handling of assignments to ---echo # -- general_log_file/slow_query_log_file. +--echo # -- general_log_file/slow_query_log_file. --echo # -- --echo -SET @general_log_file_saved = @@global.general_log_file; -SET @slow_query_log_file_saved = @@global.slow_query_log_file; - ---echo SET GLOBAL general_log_file = 'bug32748.query.log'; SET GLOBAL slow_query_log_file = 'bug32748.slow.log'; --echo SHOW VARIABLES LIKE '%log_file'; +# Reset to initial values --echo -SET GLOBAL general_log_file = @general_log_file_saved; -SET GLOBAL slow_query_log_file = @slow_query_log_file_saved; +SET GLOBAL general_log_file = @old_general_log_file; +SET GLOBAL slow_query_log_file = @old_slow_query_log_file; +if(!$fixed_bug38124) +{ + --disable_query_log + let $my_var = `SELECT @old_general_log_file`; + eval SET @@global.general_log_file = '$my_var'; + let $my_var = `SELECT @old_slow_query_log_file`; + eval SET @@global.slow_query_log_file = '$my_var'; + --enable_query_log +} --echo --echo # -- End of Bug#32748. -########################################################################### - +########################################################################### -## WL#4403 - deprecate @log and @slow_log_queries variables +# WL#4403 - deprecate @log and @slow_log_queries variables -## these are all deprecated -- show for command-line as well! +# These server system variables are all deprecated +# -- show for command-line as well! --echo deprecated: SET GLOBAL log = 0; SET GLOBAL log_slow_queries = 0; SET GLOBAL log = DEFAULT; SET GLOBAL log_slow_queries = DEFAULT; -## these are NOT deprecated +# These server system variables are NOT deprecated. --echo not deprecated: SELECT @@global.general_log_file INTO @my_glf; SELECT @@global.slow_query_log_file INTO @my_sqlf; @@ -291,6 +346,20 @@ SET GLOBAL slow_query_log_file = @my_sqlf; SET GLOBAL general_log = DEFAULT; SET GLOBAL slow_query_log = DEFAULT; +## Reset to initial values +SET @@global.general_log = @old_general_log; +SET @@global.general_log_file = @old_general_log_file; +SET @@global.slow_query_log = @old_slow_query_log; +SET @@global.slow_query_log_file = @old_slow_query_log_file; +if(!$fixed_bug38124) +{ + --disable_query_log + let $my_var = `SELECT @old_general_log_file`; + eval SET @@global.general_log_file = '$my_var'; + let $my_var = `SELECT @old_slow_query_log_file`; + eval SET @@global.slow_query_log_file = '$my_var'; + --enable_query_log +} --echo End of 5.1 tests @@ -298,17 +367,30 @@ SET GLOBAL slow_query_log = DEFAULT; --enable_ps_protocol # -# Cleanup (must be done last to avoid delayed 'Quit' message in general log) +# Cleanup # +# Disconnect must be done last to avoid delayed 'Quit' message in general log +--echo # Close connection con1 disconnect con1; # set back the saved default values connection default; -set @@global.general_log= @start_general_log; -set @@global.slow_query_log= @start_slow_query_log; -set @@global.general_log_file= @start_general_log_file; + +# Reset global system variables to initial values if forgotten somewhere above. +SET global general_log = @old_general_log; +SET global general_log_file = @old_general_log_file; +SET global slow_query_log = @old_slow_query_log; +SET global slow_query_log_file = @old_slow_query_log_file; +if(!$fixed_bug38124) +{ + --disable_query_log + let $my_var = `SELECT @old_general_log_file`; + eval SET @@global.general_log_file = '$my_var'; + let $my_var = `SELECT @old_slow_query_log_file`; + eval SET @@global.slow_query_log_file = '$my_var'; + --enable_query_log +} # Remove the log files that was created in the "default location" # i.e var/run --remove_file $MYSQLTEST_VARDIR/run/mysqld.log ---remove_file $MYSQLTEST_VARDIR/run/mysqld-slow.log - +--remove_file $MYSQLTEST_VARDIR/tmp/log.master diff --git a/mysql-test/t/myisam_data_pointer_size_func.test b/mysql-test/t/myisam_data_pointer_size_func.test index 854209834d9..37dd3a5a297 100644 --- a/mysql-test/t/myisam_data_pointer_size_func.test +++ b/mysql-test/t/myisam_data_pointer_size_func.test @@ -103,7 +103,6 @@ DROP TABLE t1; connection default; SET @@global.myisam_data_pointer_size= @start_value; - ################################################################ # End of functionality Testing for myisam_data_pointer_size # ################################################################ diff --git a/mysql-test/t/myisampack.test b/mysql-test/t/myisampack.test index 89bd8b02bd1..2650c0d2cc3 100644 --- a/mysql-test/t/myisampack.test +++ b/mysql-test/t/myisampack.test @@ -32,3 +32,29 @@ let $MYSQLD_DATADIR= `select @@datadir`; --exec $MYISAMCHK -s --unpack $MYSQLD_DATADIR/test/t1 CHECK TABLE t1 EXTENDED; DROP TABLE t1; + +# +# Bug#40949 Debug version of MySQL server crashes when run OPTIMIZE on compressed table. +# +--disable_warnings +drop table if exists t1; +--enable_warnings +create table t1(f1 int, f2 char(255)); +insert into t1 values(1, 'foo'), (2, 'bar'); +insert into t1 select * from t1; +insert into t1 select * from t1; +insert into t1 select * from t1; +insert into t1 select * from t1; +insert into t1 select * from t1; +insert into t1 select * from t1; +insert into t1 select * from t1; +insert into t1 select * from t1; +insert into t1 select * from t1; +insert into t1 select * from t1; +insert into t1 select * from t1; +insert into t1 select * from t1; +flush tables; +let $MYSQLD_DATADIR= `select @@datadir`; +--exec $MYISAMPACK $MYSQLD_DATADIR/test/t1 +optimize table t1; +drop table t1; diff --git a/mysql-test/t/mysql.test b/mysql-test/t/mysql.test index 528337da77b..a182da5fbea 100644 --- a/mysql-test/t/mysql.test +++ b/mysql-test/t/mysql.test @@ -291,6 +291,30 @@ EOF --exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug29323.sql 2>&1 remove_file $MYSQLTEST_VARDIR/tmp/bug29323.sql; +# +# Bug #33812: mysql client incorrectly parsing DELIMITER +# +# The space and ; after delimiter are important +--exec $MYSQL -e "select 1 delimiter ;" + +# +# Bug #38158: mysql client regression, can't read dump files +# +--write_file $MYSQLTEST_VARDIR/tmp/bug38158.sql +-- Testing +-- +delimiter || +select 2 || +EOF +--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug38158.sql 2>&1 +--exec $MYSQL -c < $MYSQLTEST_VARDIR/tmp/bug38158.sql 2>&1 +remove_file $MYSQLTEST_VARDIR/tmp/bug38158.sql; + +# +# Bug #41437: Value stored in 'case' lacks charset, causees segfault +# +--exec $MYSQL -e "select @z:='1',@z=database()" + --echo End of 5.0 tests # diff --git a/mysql-test/t/mysqlcheck.test b/mysql-test/t/mysqlcheck.test index 4d196cb86ad..e834c60dcb5 100644 --- a/mysql-test/t/mysqlcheck.test +++ b/mysql-test/t/mysqlcheck.test @@ -119,4 +119,79 @@ drop view v1, `v-1`; drop table t1; +# +# Bug #33094: Error in upgrading from 5.0 to 5.1 when table contains triggers +# Bug #41385: Crash when attempting to repair a #mysql50# upgraded table with +# triggers +# +SET NAMES utf8; +CREATE TABLE `#mysql50#@` (a INT); +SHOW TABLES; +SET NAMES DEFAULT; +--echo mysqlcheck --fix-table-names --databases test +--exec $MYSQL_CHECK --fix-table-names --databases test +SET NAMES utf8; +SHOW TABLES; +DROP TABLE `@`; + +CREATE TABLE `Ñ` (a INT); +SET NAMES DEFAULT; +--echo mysqlcheck --default-character-set="latin1" --databases test +# Error returned depends on platform, replace it with "Table doesn't exist" +--replace_result "Can't find file: './test/@003f.frm' (errno: 22)" "Table doesn't exist" "Table 'test.?' doesn't exist" "Table doesn't exist" +--exec $MYSQL_CHECK --default-character-set="latin1" --databases test +--echo mysqlcheck --default-character-set="utf8" --databases test +--exec $MYSQL_CHECK --default-character-set="utf8" --databases test +SET NAMES utf8; +DROP TABLE `Ñ`; +SET NAMES DEFAULT; + +CREATE DATABASE `#mysql50#a@b`; +USE `#mysql50#a@b`; +CREATE TABLE `#mysql50#c@d` (a INT); +CREATE TABLE t1 (a INT); + +# Create 5.0 like triggers +let $MYSQLTEST_VARDIR= `select @@datadir`; +--write_file $MYSQLTEST_VARDIR/a@b/c@d.TRG +TYPE=TRIGGERS +triggers='CREATE DEFINER=`root`@`localhost` TRIGGER tr1 BEFORE INSERT ON `c@d` FOR EACH ROW SET NEW.a = 10 * NEW.a' +sql_modes=0 +definers='root@localhost' +EOF +--write_file $MYSQLTEST_VARDIR/a@b/tr1.TRN +TYPE=TRIGGERNAME +trigger_table=c@d +EOF +--write_file $MYSQLTEST_VARDIR/a@b/t1.TRG +TYPE=TRIGGERS +triggers='CREATE DEFINER=`root`@`localhost` TRIGGER tr2 BEFORE INSERT ON `a@b`.t1 FOR EACH ROW SET NEW.a = 100 * NEW.a' +sql_modes=0 +definers='root@localhost' +EOF +--write_file $MYSQLTEST_VARDIR/a@b/tr2.TRN +TYPE=TRIGGERNAME +trigger_table=t1 +EOF + +SELECT * FROM INFORMATION_SCHEMA.TRIGGERS + WHERE TRIGGER_SCHEMA="#mysql50#a@b" ORDER BY trigger_name; + +--echo mysqlcheck --fix-db-names --fix-table-names --all-databases +--exec $MYSQL_CHECK --fix-db-names --fix-table-names --all-databases + +USE `a@b`; +SELECT * FROM INFORMATION_SCHEMA.TRIGGERS + WHERE TRIGGER_SCHEMA="a@b" ORDER BY trigger_name; + +INSERT INTO `c@d` VALUES (2), (1); +SELECT * FROM `c@d`; +INSERT INTO t1 VALUES (3), (5); +SELECT * FROM t1; + +DROP DATABASE `a@b`; + +USE test; + + --echo End of 5.1 tests diff --git a/mysql-test/t/partition_innodb_semi_consistent-master.opt b/mysql-test/t/partition_innodb_semi_consistent-master.opt new file mode 100644 index 00000000000..e76299453d3 --- /dev/null +++ b/mysql-test/t/partition_innodb_semi_consistent-master.opt @@ -0,0 +1 @@ +--innodb_lock_wait_timeout=2 diff --git a/mysql-test/t/partition_innodb_semi_consistent.test b/mysql-test/t/partition_innodb_semi_consistent.test new file mode 100644 index 00000000000..cfa170f575b --- /dev/null +++ b/mysql-test/t/partition_innodb_semi_consistent.test @@ -0,0 +1,194 @@ +-- source include/have_partition.inc +-- source include/not_embedded.inc +-- source include/have_innodb.inc + +--disable_warnings +drop table if exists t1; +--enable_warnings + +# basic tests of semi-consistent reads +# for verifying Bug#40595: Non-matching rows not released with READ-COMMITTED +# on tables with partitions + +connect (a,localhost,root,,); +connect (b,localhost,root,,); +connection a; +set binlog_format=mixed; +set session transaction isolation level read committed; +create table t1(a int not null) +engine=innodb +DEFAULT CHARSET=latin1 +PARTITION BY RANGE(a) +(PARTITION p0 VALUES LESS THAN (20), + PARTITION p1 VALUES LESS THAN MAXVALUE); +insert into t1 values (1),(2),(3),(4),(5),(6),(7); +set autocommit=0; +# this should lock the entire table +select * from t1 where a=3 lock in share mode; +connection b; +set binlog_format=mixed; +set session transaction isolation level read committed; +set autocommit=0; +-- error ER_LOCK_WAIT_TIMEOUT +update t1 set a=10 where a=5; +connection a; +#DELETE FROM t1 WHERE a=5; +commit; +connection b; +update t1 set a=10 where a=5; +connection a; +-- error ER_LOCK_WAIT_TIMEOUT +select * from t1 where a=2 for update; +# this should lock the records (1),(2) +select * from t1 where a=2 limit 1 for update; +connection b; +update t1 set a=11 where a=6; +-- error ER_LOCK_WAIT_TIMEOUT +update t1 set a=12 where a=2; +-- error ER_LOCK_WAIT_TIMEOUT +update t1 set a=13 where a=1; +connection a; +commit; +connection b; +update t1 set a=14 where a=1; +commit; +connection a; +--sorted_result +select * from t1; +drop table t1; + +connection default; +disconnect a; +disconnect b; + +# +# Bug #31310: Locked rows silently skipped in read-committed isolation level. +# (This also tests the '*_semi_consistent*' functions in partitioning) +# Copied from include/mix1.inc + +connect (con1,localhost,root,,); +connect (con2,localhost,root,,); +SET SESSION AUTOCOMMIT = 0; +SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; +set binlog_format=mixed; +--echo # Switch to connection con1 +connection con1; + +eval +CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(256)) +ENGINE = InnoDB +PARTITION BY RANGE (a) +(PARTITION p0 VALUES LESS THAN (300), + PARTITION p1 VALUES LESS THAN MAXVALUE); +INSERT INTO t1 VALUES (1,2); + +--echo # 1. test for locking: + +BEGIN; +--enable_info +UPDATE t1 SET b = 12 WHERE a = 1; +--disable_info +SELECT * FROM t1; + +--echo # Switch to connection con2 +connection con2; + +--enable_info +--disable_abort_on_error +--error ER_LOCK_WAIT_TIMEOUT +UPDATE t1 SET b = 21 WHERE a = 1; +--disable_info + +--echo # Switch to connection con1 +connection con1; +SELECT * FROM t1; +ROLLBACK; + +--echo # 2. test for serialized update: + +CREATE TABLE t2 (a INT); + +TRUNCATE t1; +INSERT INTO t1 VALUES (1,'init'); + +DELIMITER |; +CREATE PROCEDURE p1() +BEGIN + UPDATE t1 SET b = CONCAT(b, '+con2') WHERE a = 1; + INSERT INTO t2 VALUES (); +END| +DELIMITER ;| + +BEGIN; +--enable_info +UPDATE t1 SET b = CONCAT(b, '+con1') WHERE a = 1; +--disable_info +SELECT * FROM t1; + +--echo # Switch to connection con2 +connection con2; + +--send CALL p1; + +--echo # Switch to connection con1 +connection con1; +SELECT * FROM t1; +COMMIT; + +let $bug31310 = 1; +while ($bug31310) +{ + let $bug31310= `SELECT 1 - COUNT(*) FROM t2`; +} + +SELECT * FROM t1; + +--echo # Switch to connection con2 +connection con2; +--reap +SELECT * FROM t1; + +--echo # Switch to connection con1 +connection con1; + +--echo # 3. test for updated key column: + +TRUNCATE t1; +TRUNCATE t2; + +INSERT INTO t1 VALUES (1,'init'); + +BEGIN; +--enable_info +UPDATE t1 SET a = 2, b = CONCAT(b, '+con1') WHERE a = 1; +--disable_info +SELECT * FROM t1; + +--echo # Switch to connection con2 +connection con2; + +--send CALL p1; + +--echo # Switch to connection con1 +connection con1; +SELECT * FROM t1; +COMMIT; + +let $bug31310 = 1; +while ($bug31310) +{ + let $bug31310= `SELECT 1 - COUNT(*) FROM t2`; +} + +SELECT * FROM t1; + +--echo # Switch to connection con2 +connection con2; +SELECT * FROM t1; + +connection default; +disconnect con1; +disconnect con2; +DROP PROCEDURE p1; +DROP TABLE t1, t2; + diff --git a/mysql-test/t/partition_innodb_stmt.test b/mysql-test/t/partition_innodb_stmt.test index 2ed5baee0ac..d6181ce068e 100644 --- a/mysql-test/t/partition_innodb_stmt.test +++ b/mysql-test/t/partition_innodb_stmt.test @@ -1,3 +1,4 @@ +--source include/have_partition.inc --source include/have_binlog_format_statement.inc --source include/have_innodb.inc diff --git a/mysql-test/t/partition_mgm.test b/mysql-test/t/partition_mgm.test index ffb0ad0970e..e17edf0a4e5 100644 --- a/mysql-test/t/partition_mgm.test +++ b/mysql-test/t/partition_mgm.test @@ -4,6 +4,17 @@ DROP TABLE IF EXISTS t1; --enable_warnings # +# Bug 40389: REORGANIZE PARTITION crashes when only using one partition +# +CREATE TABLE t1 (a INT PRIMARY KEY) +ENGINE MYISAM +PARTITION BY HASH (a) +PARTITIONS 1; +INSERT INTO t1 VALUES (1),(2),(3),(4),(5); +ALTER TABLE t1 REORGANIZE PARTITION; +DROP TABLE t1; + +# # Bug 21143: mysqld hang when error in number of subparts in # REORGANIZE command # diff --git a/mysql-test/t/partition_pruning.test b/mysql-test/t/partition_pruning.test index 31008d2b011..ad102062ef8 100644 --- a/mysql-test/t/partition_pruning.test +++ b/mysql-test/t/partition_pruning.test @@ -8,6 +8,22 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; --enable_warnings +# +# Bug#40972: some sql execution lead the whole database crashing +# +# Setup so the start is at partition pX and end is at p1 +# Pruning does handle 'bad' dates differently. +CREATE TABLE t1 +(a INT NOT NULL AUTO_INCREMENT, + b DATETIME, + PRIMARY KEY (a,b), + KEY (b)) +PARTITION BY RANGE (to_days(b)) +(PARTITION p0 VALUES LESS THAN (733681) COMMENT = 'LESS THAN 2008-10-01', + PARTITION p1 VALUES LESS THAN (733712) COMMENT = 'LESS THAN 2008-11-01', + PARTITION pX VALUES LESS THAN MAXVALUE); +SELECT a,b FROM t1 WHERE b >= '2008-12-01' AND b < '2009-12-00'; +DROP TABLE t1; # Check if we can infer from condition on partition fields that # no records will match. diff --git a/mysql-test/t/query_cache.test b/mysql-test/t/query_cache.test index 52e872c2b38..d4669abe0e4 100644 --- a/mysql-test/t/query_cache.test +++ b/mysql-test/t/query_cache.test @@ -300,7 +300,7 @@ select * from t1; select * from t1; show status like "Qcache_queries_in_cache"; insert delayed into t1 values (4); ---sleep 5 # Wait for insert delayed to be executed. +--sleep 5 # Wait for insert delayed to be executed. select a from t1; show status like "Qcache_queries_in_cache"; drop table t1; @@ -410,10 +410,10 @@ create table t1(id int auto_increment primary key); insert into t1 values (NULL), (NULL), (NULL); select * from t1 where id=2; alter table t1 rename to t2; --- error 1146 +--error ER_NO_SUCH_TABLE select * from t1 where id=2; drop table t2; --- error 1146 +--error ER_NO_SUCH_TABLE select * from t1 where id=2; # @@ -435,11 +435,14 @@ create table t1 (a int); insert into t1 values (1),(2),(3); show status like "Qcache_queries_in_cache"; select * from t1 into outfile "query_cache.out.file"; ---error 1086 +--error ER_FILE_EXISTS_ERROR select * from t1 into outfile "query_cache.out.file"; select * from t1 limit 1 into dumpfile "query_cache.dump.file"; show status like "Qcache_queries_in_cache"; drop table t1; +let $datadir=`select @@datadir`; +--remove_file $datadir/test/query_cache.dump.file +--remove_file $datadir/test/query_cache.out.file # # test of SQL_SELECT_LIMIT @@ -537,7 +540,7 @@ drop table t1; # If at least one of the above variables has changed, # the cached query can't be reused. In the below test # absolutely the same query is used several times, -# SELECT should fetch different results for every instance. +# SELECT should fetch different results for every instance. # No hits should be produced. # New cache entry should appear for every SELECT. # @@ -554,21 +557,21 @@ show status like "Qcache_queries_in_cache"; # Change collation_connection and run the same query again # set collation_connection=koi8r_bin; -SELECT a,'Â','â'='Â' FROM t1; +SELECT a,'Â','â'='Â' FROM t1; show status like "Qcache_hits"; show status like "Qcache_queries_in_cache"; # # Now change character_set_client and run the same query again # set character_set_client=cp1251; -SELECT a,'Â','â'='Â' FROM t1; +SELECT a,'Â','â'='Â' FROM t1; show status like "Qcache_hits"; show status like "Qcache_queries_in_cache"; # # And finally change character_set_results and run the same query again # set character_set_results=cp1251; -SELECT a,'Â','â'='Â' FROM t1; +SELECT a,'Â','â'='Â' FROM t1; show status like "Qcache_hits"; show status like "Qcache_queries_in_cache"; SET NAMES default; @@ -602,12 +605,12 @@ insert into t1 set c = repeat('x',24); insert into t1 set c = concat(repeat('x',24),'x'); insert into t1 set c = concat(repeat('x',24),'w'); insert into t1 set c = concat(repeat('x',24),'y'); -set max_sort_length=200; +set max_sort_length=200; select c from t1 order by c, id; reset query cache; set max_sort_length=20; select c from t1 order by c, id; -set max_sort_length=200; +set max_sort_length=200; select c from t1 order by c, id; set max_sort_length=default; # sql_mode @@ -1017,7 +1020,7 @@ set GLOBAL query_cache_size= default; # -# Bug #28897 UUID() returns non-unique values when query cache is enabled +# Bug#28897 UUID() returns non-unique values when query cache is enabled # set GLOBAL query_cache_size=1000000; @@ -1026,7 +1029,7 @@ create table t1 (a char); insert into t1 values ('c'); let $q1= `select UUID(), a from t1`; -let $q2= `select UUID(), a from t1`; +let $q2= `select UUID(), a from t1`; # disabling the logging of the query because the UUIDs are different each run. --disable_query_log @@ -1047,7 +1050,7 @@ create table t1 (a char); insert into t1 values ('c'); let $q1= `select RAND() from t1 union select sql_cache 1 from t1;`; -let $q2= `select RAND() from t1 union select sql_cache 1 from t1;`; +let $q2= `select RAND() from t1 union select sql_cache 1 from t1;`; # disabling the logging of the query because the times are different each run. --disable_query_log @@ -1183,75 +1186,6 @@ DROP TABLE t1; SET GLOBAL query_cache_size= default; # -# Bug #28249 Query Cache returns wrong result with concurrent insert / certain lock -# ---echo Bug#28249 Query Cache returns wrong result with concurrent insert/ certain lock -connect (user1,localhost,root,,test,,); -connect (user2,localhost,root,,test,,); -connect (user3,localhost,root,,test,,); - -connection user1; - -set GLOBAL query_cache_type=1; -set GLOBAL query_cache_limit=10000; -set GLOBAL query_cache_min_res_unit=0; -set GLOBAL query_cache_size= 100000; - -flush tables; ---disable_warnings -drop table if exists t1, t2; ---enable_warnings -create table t1 (a int); -create table t2 (a int); -insert into t1 values (1),(2),(3); -connection user2; ---echo Locking table T2 with a write lock. -lock table t2 write; - -connection user1; ---echo Select blocked by write lock. ---send select *, (select count(*) from t2) from t1; ---echo Sleeing is ok, because selecting should be done very fast. -sleep 5; - -connection user3; ---echo Inserting into table T1. -insert into t1 values (4); - -connection user2; ---echo Unlocking the tables. -unlock tables; - -connection user1; ---echo Collecting result from previously blocked select. -# -# Since the lock ordering rule in thr_multi_lock depends on -# pointer values, from execution to execution we might have -# different lock order, and therefore, sometimes lock t1 and block -# on t2, and sometimes block on t2 right away. In the second case, -# the following insert succeeds, and only then this select can -# proceed, and we actually test nothing, as the very first select -# returns 4 rows right away. -# It's fine to have a test case that covers the problematic area -# at least once in a while. -# We, however, need to disable the result log here to make the -# test repeatable. ---disable_result_log ---reap ---enable_result_log ---echo Next select should contain 4 rows, as the insert is long finished. -select *, (select count(*) from t2) from t1; -reset query cache; -select *, (select count(*) from t2) from t1; - -drop table t1,t2; - -connection default; -disconnect user1; -disconnect user2; -disconnect user3; - -# --echo # --echo # Bug#25132 disabled query cache: Qcache_free_blocks = 1 --echo # @@ -1261,7 +1195,7 @@ set global query_cache_type=0; show status like 'Qcache_free_blocks'; --echo Restore default values. -# Bug #28211 RENAME DATABASE and query cache don't play nicely together +# Bug#28211 RENAME DATABASE and query cache don't play nicely together # # TODO: enable these tests when RENAME DATABASE is implemented. # --disable_warnings @@ -1279,7 +1213,7 @@ show status like 'Qcache_free_blocks'; # show status like 'Qcache_queries_in_cache'; # drop database db2; # set global query_cache_size=default; -# +# # --disable_warnings # drop database if exists db1; # drop database if exists db3; diff --git a/mysql-test/t/query_cache_28249.test b/mysql-test/t/query_cache_28249.test new file mode 100644 index 00000000000..3cf6c89369e --- /dev/null +++ b/mysql-test/t/query_cache_28249.test @@ -0,0 +1,123 @@ +### t/query_cache_28249.test ### +# +# Test for +# Bug#28249 Query Cache returns wrong result with concurrent insert / certain lock +# +# Last modification: +# 2008-11-27 mleich - Move this test out of query_cache.test +# - Fix Bug#40179 Test main.query_cache failing randomly on Pushbuild, +# test weakness +# - Minor improvements (comments,formatting etc.) +# + +--source include/have_query_cache.inc + +SET @query_cache_type= @@global.query_cache_type; +SET @query_cache_limit= @@global.query_cache_limit; +SET @query_cache_min_res_unit= @@global.query_cache_min_res_unit; +SET @query_cache_size= @@global.query_cache_size; + +--echo # Bug#28249 Query Cache returns wrong result with concurrent insert/ certain lock +--echo # Establish connections user1,user2,user3 (user=root) +connect (user1,localhost,root,,test,,); +connect (user2,localhost,root,,test,,); +connect (user3,localhost,root,,test,,); + +--echo # Switch to connection user1 +connection user1; + +SET GLOBAL query_cache_type=1; +SET GLOBAL query_cache_limit=10000; +SET GLOBAL query_cache_min_res_unit=0; +SET GLOBAL query_cache_size= 100000; + +FLUSH TABLES; +--disable_warnings +DROP TABLE IF EXISTS t1, t2; +--enable_warnings +CREATE TABLE t1 (a INT); +CREATE TABLE t2 (a INT); +INSERT INTO t1 VALUES (1),(2),(3); + +--echo # Switch to connection user2 +connection user2; +LOCK TABLE t2 WRITE; + +--echo # Switch to connection user1 +connection user1; +--echo # "send" the next select, "reap" the result later. +--echo # The select will be blocked by the write lock on the t1. +let $select_for_qc = +SELECT *, (SELECT COUNT(*) FROM t2) FROM t1; +send; +eval $select_for_qc; + +--echo # Switch to connection user3 +connection user3; +# Typical information_schema.processlist content after sufficient sleep time +# ID USER COMMAND TIME STATE INFO +# .... +# 2 root Query 5 Locked SELECT *, (SELECT COUNT(*) FROM t2) FROM t1 +# .... +# XXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +# The values marked with 'X' must be reached. +--echo # Poll till the select of connection user1 is blocked by the write lock on t1. +let $wait_condition= SELECT COUNT(*) = 1 FROM information_schema.processlist +WHERE state = 'Locked' + AND info = '$select_for_qc'; +--source include/wait_condition.inc +eval +SELECT user,command,state,info FROM information_schema.processlist +WHERE state = 'Locked' + AND info = '$select_for_qc'; +INSERT INTO t1 VALUES (4); + +--echo # Switch to connection user2 +connection user2; +UNLOCK TABLES; + +--echo # Switch to connection user1 +connection user1; +# +# Since the lock ordering rule in thr_multi_lock depends on +# pointer values, from execution to execution we might have +# different lock order, and therefore, sometimes lock t1 and block +# on t2, and sometimes block on t2 right away. In the second case, +# the following insert succeeds, and only then this select can +# proceed, and we actually test nothing, as the very first select +# returns 4 rows right away. +# It's fine to have a test case that covers the problematic area +# at least once in a while. +--echo # Collecting ("reap") the result from the previously blocked select. +--echo # The printing of the result (varies between 3 and 4 rows) set has to be suppressed. +--disable_result_log +--reap +--enable_result_log + +--echo # Switch to connection user3 +connection user3; +--echo # The next select enforces that effects of "concurrent_inserts" like the +--echo # record with a = 4 is missing in result sets can no more happen. +SELECT 1 FROM t1 WHERE a = 4; + +--echo # Switch to connection user1 +connection user1; +--echo # The next result set must contain 4 rows. +# If not, we have a regression of Bug#28249 +eval $select_for_qc; +RESET QUERY CACHE; +eval $select_for_qc; + +DROP TABLE t1,t2; + +--echo # Switch to connection default + close connections user1,user2,user3 +connection default; +disconnect user1; +disconnect user2; +disconnect user3; + +SET GLOBAL query_cache_type= @query_cache_type; +SET GLOBAL query_cache_limit= @query_cache_limit; +SET GLOBAL query_cache_min_res_unit= @query_cache_min_res_unit; +SET GLOBAL query_cache_size= @query_cache_size; + diff --git a/mysql-test/t/rpl_init_slave_func-slave.opt b/mysql-test/t/rpl_init_slave_func-slave.opt deleted file mode 100644 index 337e8a60d97..00000000000 --- a/mysql-test/t/rpl_init_slave_func-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---init-slave="set global max_connections=500" diff --git a/mysql-test/t/rpl_init_slave_func.test b/mysql-test/t/rpl_init_slave_func.test index f080a2b6814..f17cc1289b1 100644 --- a/mysql-test/t/rpl_init_slave_func.test +++ b/mysql-test/t/rpl_init_slave_func.test @@ -10,85 +10,92 @@ # # # Creation Date: 2008-03-08 # # Author: Rizwan # +# Modified: HHunger 2008-09-29 Fixed the bug by inserting the usual wait and # +# SQL-Satements to control master and slave, # +# deleted the sleep and made improvements like: # +# - Replaced the opt file by dynamic variables, # +# - Made the tests independant of the initial # +# values of the global variables, # +# - Reduced the test to the needed test case to # +# save run time, # +# - Beautification. # # # # Description: Test Cases of Dynamic System Variable init_slave # # that checks the behavior of this variable # # # -# Reference: http://dev.mysql.com/doc/refman/5.1/en/ # -# server-system-variables.html # +# Reference: # +# http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html # # # ############################################################################### source include/master-slave.inc; - ---echo '#--------------------FN_DYNVARS_037_01-------------------------#' -################################################################## -# Check if setting init_slave is changed in every new connection # -################################################################## - -SET @@global.init_slave = "SET @a = 10"; - ---echo 'connect (con1,localhost,root,,)' -connect (con1,localhost,root,,); ---echo 'connection con1' -connection con1; -SELECT @@global.init_slave; -disconnect con1; ---echo 'connection master' -connection master; - ---echo '#--------------------FN_DYNVARS_037_02-------------------------#' -#################################################### -# Begin the functionality Testing of init_slave # -#################################################### - -#==================================================== ---echo 'check if value in slave opt file is executed' -#==================================================== -save_master_pos; ---echo 'connection slave' -connection slave; -sleep 1; -show variables like 'init_slave'; -show variables like 'max_connections'; -sync_with_master; -reset master; - -#=============================================================== ---echo 'check if value in slave opt file doesnt apply to master' -#=============================================================== - ---echo 'connection master' -connection master; -show variables like 'init_slave'; -show variables like 'max_connections'; -save_master_pos; ---echo 'connection slave' +--echo connection slave connection slave; -sync_with_master; +# +# save the current values -#======================================================= ---echo 'try creating a temporary variable in init_slave' -#======================================================= +SET @start_max_connections= @@global.max_connections; +SET @start_init_slave= @@global.init_slave; -SET @@global.init_slave = "SET @a=5"; +# setting of a global value with an effect on the next start of the slave server +# check that @@global.init_slave could be set +let $my_init_slave= + 'SET @@global.max_connections = @@global.max_connections + 1'; +eval SET @@global.init_slave = $my_init_slave; -source include/stop_slave.inc; -reset slave; -# Clean up old test tables +# show the data type of the variable --disable_warnings -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +DROP TABLE IF EXISTS t1; +CREATE TEMPORARY TABLE t1 AS SELECT @@global.init_slave AS my_column; --enable_warnings -start slave; - +DESCRIBE t1; +DROP TABLE t1; +# +# check that the new setting of @@global.init_slave becomes immediately visible +eval SELECT @@global.init_slave = $my_init_slave; +--echo Expect 1 +# wait for the slave threads have set the global variable. +let $wait_timeout= 90; +let $wait_condition= SELECT @@global.max_connections = @start_max_connections; +--source include/wait_condition_sp.inc +# check that the action in init_slave does not happen immediately +SELECT @@global.max_connections= @start_max_connections; +--echo Expect 1 +# +# reset of the server +STOP SLAVE; +--wait_for_slave_to_stop +RESET MASTER; +RESET SLAVE; +START SLAVE; +source include/wait_for_slave_to_start.inc; +# +# wait for the slave threads have set the global variable. +let $wait_timeout= 90; +let $wait_condition= SELECT @@global.max_connections = @start_max_connections + 1; +--source include/wait_condition_sp.inc +# check that the action in init_slave was executed and had the intended effect +SELECT @@global.max_connections = @start_max_connections + 1; +--echo Expect 1 +# +# Setting a variable(which is local to a session) and must not be visible +SET @@global.init_slave = "SET @a=5"; +# +STOP SLAVE; +--wait_for_slave_to_stop +RESET MASTER; +RESET SLAVE; +START SLAVE; +source include/wait_for_slave_to_start.inc; +# SHOW VARIABLES LIKE 'init_slave'; +# expect NULL SELECT @a; - ---echo 'Bug#35365 SET statement in init_slave not execute if slave is restarted' - -# Restore value -set global max_connections= default; - +--echo Expect NULL +# +# Clean up +SET @@global.max_connections= @start_max_connections; +SET @@global.init_slave= @start_init_slave; ################################################## # End of functionality Testing for init_slave # ################################################## diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test index 30abb797e83..ccdb53ec11f 100644 --- a/mysql-test/t/select.test +++ b/mysql-test/t/select.test @@ -3690,6 +3690,42 @@ SELECT DISTINCT b FROM t1 LEFT JOIN t2 USING(a) WHERE c <= 3; SHOW STATUS LIKE 'Handler_read%'; DROP TABLE t1, t2; +# +# Bug#40953 SELECT query throws "ERROR 1062 (23000): Duplicate entry..." error +# +CREATE TABLE t1 (f1 bigint(20) NOT NULL default '0', + f2 int(11) NOT NULL default '0', + f3 bigint(20) NOT NULL default '0', + f4 varchar(255) NOT NULL default '', + PRIMARY KEY (f1), + KEY key1 (f4), + KEY key2 (f2)); +CREATE TABLE t2 (f1 int(11) NOT NULL default '0', + f2 enum('A1','A2','A3') NOT NULL default 'A1', + f3 int(11) NOT NULL default '0', + PRIMARY KEY (f1), + KEY key1 (f3)); +CREATE TABLE t3 (f1 bigint(20) NOT NULL default '0', + f2 datetime NOT NULL default '1980-01-01 00:00:00', + PRIMARY KEY (f1)); + +insert into t1 values (1, 1, 1, 'abc'); +insert into t1 values (2, 1, 2, 'def'); +insert into t1 values (3, 1, 2, 'def'); +insert into t2 values (1, 'A1', 1); +insert into t3 values (1, '1980-01-01'); + +SELECT a.f3, cr.f4, count(*) count +FROM t2 a +STRAIGHT_JOIN t1 cr ON cr.f2 = a.f1 +LEFT JOIN +(t1 cr2 + JOIN t3 ae2 ON cr2.f3 = ae2.f1 +) ON a.f1 = cr2.f2 AND ae2.f2 < now() - INTERVAL 7 DAY AND +cr.f4 = cr2.f4 +GROUP BY a.f3, cr.f4; + +drop table t1, t2, t3; --echo End of 5.0 tests # @@ -3701,3 +3737,36 @@ SELECT a FROM t1 ORDER BY a LIMIT 2; SELECT a FROM t1 ORDER BY a LIMIT 2,4294967296; SELECT a FROM t1 ORDER BY a LIMIT 2,4294967297; DROP TABLE t1; + +# +# Bug #37936: ASSERT_COLUMN_MARKED_FOR_WRITE in Field_datetime::store , +# Field_varstring::store +# + +CREATE TABLE A (date_key date); + +CREATE TABLE C ( + pk int, + int_nokey int, + int_key int, + date_key date NOT NULL, + date_nokey date, + varchar_key varchar(1) +); + +INSERT INTO C VALUES +(1,1,1,'0000-00-00',NULL,NULL), +(1,1,1,'0000-00-00',NULL,NULL); + +SELECT 1 FROM C WHERE pk > ANY (SELECT 1 FROM C); + +SELECT COUNT(DISTINCT 1) FROM C + WHERE date_key = (SELECT 1 FROM A WHERE C.date_key IS NULL) GROUP BY pk; +SELECT date_nokey FROM C + WHERE int_key IN (SELECT 1 FROM A) + HAVING date_nokey = '10:41:7' + ORDER BY date_key; + +DROP TABLE A,C; + +--echo End of 5.1 tests diff --git a/mysql-test/t/status.test b/mysql-test/t/status.test index 1d1531f8076..f487f0695a3 100644 --- a/mysql-test/t/status.test +++ b/mysql-test/t/status.test @@ -238,6 +238,8 @@ let $tmp_table2 = `show global status like 'Created_tmp_tables'`; --disable_query_log eval select substring_index('$rnd_next2',0x9,-1)-substring_index('$rnd_next',0x9,-1) as rnd_diff, substring_index('$tmp_table2',0x9,-1)-substring_index('$tmp_table',0x9,-1) as tmp_table_diff; --enable_query_log +disconnect con1; +connection default; # # Bug#30252 Com_create_function is not incremented. @@ -288,7 +290,6 @@ show procedure status where name ='proc37908' and 1 in (select f1 from db37908.t show function status where name ='func37908' and 1 in (select func37908()); connection default; -disconnect con1; disconnect user1; disconnect root; drop database db37908; @@ -296,6 +297,43 @@ drop procedure proc37908; drop function func37908; REVOKE ALL PRIVILEGES, GRANT OPTION FROM mysqltest_1@localhost; DROP USER mysqltest_1@localhost; + +# +# Bug#41131 "Questions" fails to increment - ignores statements instead stored procs +# +connect (con1,localhost,root,,); +connection con1; +--disable_warnings +DROP PROCEDURE IF EXISTS p1; +DROP FUNCTION IF EXISTS f1; +--enable_warnings +DELIMITER $$; +CREATE FUNCTION f1() RETURNS INTEGER +BEGIN + DECLARE foo INTEGER; + DECLARE bar INTEGER; + SET foo=1; + SET bar=2; + RETURN foo; +END $$ +CREATE PROCEDURE p1() + BEGIN + SELECT 1; +END $$ +DELIMITER ;$$ +let $org_queries= `SHOW STATUS LIKE 'Queries'`; +SELECT f1(); +CALL p1(); +let $new_queries= `SHOW STATUS LIKE 'Queries'`; +--disable_query_log +let $diff= `SELECT SUBSTRING('$new_queries',9)-SUBSTRING('$org_queries',9)`; +--enable_query_log +eval SELECT $diff; +disconnect con1; +connection default; +DROP PROCEDURE p1; +DROP FUNCTION f1; + # End of 5.1 tests # Restore global concurrent_insert value. Keep in the end of the test file. diff --git a/mysql-test/t/status2.test b/mysql-test/t/status2.test new file mode 100644 index 00000000000..2d1541c54f2 --- /dev/null +++ b/mysql-test/t/status2.test @@ -0,0 +1,68 @@ +--source include/not_embedded.inc + +--echo # +--echo # Bug#24289 Status Variable "Questions" gets wrong values with Stored Routines +--echo # +FLUSH STATUS; +DELIMITER $$; +CREATE FUNCTION testQuestion() RETURNS INTEGER +BEGIN + DECLARE foo INTEGER; + DECLARE bar INTEGER; + SET foo=1; + SET bar=2; + RETURN foo; +END $$ +CREATE PROCEDURE testQuestion2() +BEGIN + SELECT 1; +END $$ +DELIMITER ;$$ +--disable_warnings +DROP TABLE IF EXISTS t1,t2; +--enable_warnings +CREATE TABLE t1 (c1 INT); +CREATE TABLE t2 (c1 INT); +CREATE EVENT ev1 ON SCHEDULE EVERY 1 SECOND + DO INSERT INTO t1 VALUES(1); + +--echo Assert Questions == 7 +SHOW STATUS LIKE 'Questions'; +SELECT testQuestion(); +--echo Assert Questions == 9 +SHOW STATUS LIKE 'Questions'; +CALL testQuestion2(); +--echo Assert Questions == 11 +SHOW STATUS LIKE 'Questions'; +SELECT 1; +--echo Assert Questions == 13 +SHOW STATUS LIKE 'Questions'; +connect (con1,localhost,root,,); +connection con1; +SELECT 1; +connection default; +disconnect con1; +--echo Assert Questions == 14 +SHOW STATUS LIKE 'Questions'; +DELIMITER $$; +CREATE TRIGGER trigg1 AFTER INSERT ON t1 + FOR EACH ROW BEGIN + INSERT INTO t2 VALUES (1); + END; +$$ +DELIMITER ;$$ +--echo Assert Questions == 16 +SHOW STATUS LIKE 'Questions'; +INSERT INTO t1 VALUES (1); +--echo Assert Questions == 18 +SHOW STATUS LIKE 'Questions'; +# TODO: Uncomment the lines below when FLUSH GLOBAL STATUS is implemented. +# FLUSH STATUS; +# SHOW GLOBAL STATUS LIKE 'Questions'; +DROP PROCEDURE testQuestion2; +DROP TRIGGER trigg1; +DROP FUNCTION testQuestion; +DROP EVENT ev1; +DROP TABLE t1,t2; +--echo End of 6.0 tests + diff --git a/mysql-test/t/strict.test b/mysql-test/t/strict.test index 486f7ce7897..f2ce045840c 100644 --- a/mysql-test/t/strict.test +++ b/mysql-test/t/strict.test @@ -1199,6 +1199,15 @@ show create table t1; drop table t1; # +# Bug #39591: Crash if table comment is longer than 62 characters +# + +#60 chars, 120 (+1) bytes (UTF-8 with 2-byte chars) +CREATE TABLE t3 (f1 INT) COMMENT 'כקבהחןכקבהחןכקבהחןכקבהחןכקבהחןכקבהחןכקבהחןכקבהחןכקבהחןכקבהחן'; +SHOW CREATE TABLE t3; +DROP TABLE t3; + +# # Bug #26359: Strings becoming truncated and converted to numbers under STRICT mode # set sql_mode= 'traditional'; diff --git a/mysql-test/t/temp_table.test b/mysql-test/t/temp_table.test index 4ab8a982e63..2bfa4936c91 100644 --- a/mysql-test/t/temp_table.test +++ b/mysql-test/t/temp_table.test @@ -204,4 +204,35 @@ DELETE FROM t1; SELECT * FROM t1; DROP TABLE t1; +# +# Bug#41348: INSERT INTO tbl SELECT * FROM temp_tbl overwrites locking type of temp table +# + +--disable_warnings +DROP TABLE IF EXISTS t1,t2; +DROP FUNCTION IF EXISTS f1; +--enable_warnings + +CREATE TEMPORARY TABLE t1 (a INT); +CREATE TEMPORARY TABLE t2 LIKE t1; + +DELIMITER |; +CREATE FUNCTION f1() RETURNS INT + BEGIN + return 1; + END| +DELIMITER ;| + +INSERT INTO t2 SELECT * FROM t1; +INSERT INTO t1 SELECT f1(); + +CREATE TABLE t3 SELECT * FROM t1; +INSERT INTO t1 SELECT f1(); + +UPDATE t1,t2 SET t1.a = t2.a; +INSERT INTO t2 SELECT f1(); + +DROP TABLE t1,t2,t3; +DROP FUNCTION f1; + --echo End of 5.1 tests diff --git a/mysql-test/t/type_bit.test b/mysql-test/t/type_bit.test index 5793846a0b2..dc5120db430 100644 --- a/mysql-test/t/type_bit.test +++ b/mysql-test/t/type_bit.test @@ -352,6 +352,51 @@ SELECT HEX(b1), HEX(b2), i2 FROM t2 DROP TABLE t1, t2; +# +# Bug #35796 SHOW CREATE TABLE and default value for BIT field +# +CREATE TABLE IF NOT EXISTS t1 ( +f1 bit(2) NOT NULL default b'10', +f2 bit(14) NOT NULL default b'11110000111100' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; +SHOW CREATE TABLE t1; +DROP TABLE t1; + +--error ER_INVALID_DEFAULT +CREATE TABLE IF NOT EXISTS t1 ( +f1 bit(2) NOT NULL default b'' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; + + +# +# Bug#31399 Wrong query result when doing join buffering over BIT fields +# +create table t1bit7 (a1 bit(7) not null) engine=MyISAM; +create table t2bit7 (b1 bit(7)) engine=MyISAM; + +insert into t1bit7 values (b'1100000'); +insert into t1bit7 values (b'1100001'); +insert into t1bit7 values (b'1100010'); +insert into t2bit7 values (b'1100001'); +insert into t2bit7 values (b'1100010'); +insert into t2bit7 values (b'1100110'); + +select bin(a1) from t1bit7, t2bit7 where t1bit7.a1=t2bit7.b1; +drop table t1bit7, t2bit7; + +create table t1bit7 (a1 bit(15) not null) engine=MyISAM; +create table t2bit7 (b1 bit(15)) engine=MyISAM; + +insert into t1bit7 values (b'110000011111111'); +insert into t1bit7 values (b'110000111111111'); +insert into t1bit7 values (b'110001011111111'); +insert into t2bit7 values (b'110000111111111'); +insert into t2bit7 values (b'110001011111111'); +insert into t2bit7 values (b'110011011111111'); + +select bin(a1) from t1bit7, t2bit7 where t1bit7.a1=t2bit7.b1; +drop table t1bit7, t2bit7; + --echo End of 5.0 tests # diff --git a/mysql-test/t/type_date.test b/mysql-test/t/type_date.test index 9bc428c3715..aec60bc2dee 100644 --- a/mysql-test/t/type_date.test +++ b/mysql-test/t/type_date.test @@ -62,7 +62,7 @@ drop table t1; # Test of date and not null # -create table t1 (date date); +create table t1 (date date); insert into t1 values ("2000-08-10"),("2000-08-11"); select date_add(date,INTERVAL 1 DAY),date_add(date,INTERVAL 1 SECOND) from t1; drop table t1; @@ -75,9 +75,12 @@ CREATE TABLE t1(AFIELD INT); INSERT INTO t1 VALUES(1); CREATE TABLE t2(GMT VARCHAR(32)); INSERT INTO t2 VALUES('GMT-0800'); -SELECT DATE_FORMAT("2002-03-06 10:11:12", CONCAT('%a, %d %M %Y %H:%i:%s ' , t2.GMT)) FROM t1, t2 GROUP BY t1.AFIELD; +SELECT DATE_FORMAT("2002-03-06 10:11:12", CONCAT('%a, %d %M %Y %H:%i:%s ', t2.GMT)) +FROM t1, t2 GROUP BY t1.AFIELD; INSERT INTO t1 VALUES(1); -SELECT DATE_FORMAT("2002-03-06 10:11:12", CONCAT('%a, %d %M %Y %H:%i:%s ' , t2.GMT)), DATE_FORMAT("2002-03-06 10:11:12", CONCAT('%a, %d %M %Y %H:%i:%s ' , t2.GMT)) FROM t1,t2 GROUP BY t1.AFIELD; +SELECT DATE_FORMAT("2002-03-06 10:11:12", CONCAT('%a, %d %M %Y %H:%i:%s ', t2.GMT)), + DATE_FORMAT("2002-03-06 10:11:12", CONCAT('%a, %d %M %Y %H:%i:%s ', t2.GMT)) +FROM t1,t2 GROUP BY t1.AFIELD; drop table t1,t2; # @@ -90,7 +93,7 @@ SELECT DATE_FORMAT(f1, "%l.%i %p") , DATE_FORMAT(f2, "%l.%i %p") FROM t1; DROP TABLE t1; # -# Bug 4937: different date -> string conversion when using SELECT ... UNION +# Bug#4937: different date -> string conversion when using SELECT ... UNION # and INSERT ... SELECT ... UNION # @@ -141,7 +144,7 @@ select * from t1; drop table t1; # -# Bug #30942: select str_to_date from derived table returns varying results +# Bug#30942: select str_to_date from derived table returns varying results # CREATE TABLE t1 ( a INT @@ -155,10 +158,22 @@ DROP TABLE t1; # -# Bug #31221: Optimizer incorrectly identifies impossible WHERE clause +# Bug#31221: Optimizer incorrectly identifies impossible WHERE clause # -CREATE TABLE t1 (a DATE, b int, PRIMARY KEY (a,b)); +CREATE TABLE t1 (a DATE, b INT, PRIMARY KEY (a,b)); +## The current sub test could fail (difference to expected result) if we +## have just reached midnight. +## (Bug#41776 type_date.test may fail if run around midnight) +## Therefore we sleep a bit if we are too close to midnight. +## The complete test itself needs in average less than 1 second. +## Therefore a time_distance to midnight of 5 seconds should be sufficient. +if (`SELECT CURTIME() > SEC_TO_TIME(24 * 3600 - 5)`) +{ + # We are here when CURTIME() is between '23:59:56' and '23:59:59'. + # So a sleep time of 5 seconds brings us between '00:00:01' and '00:00:04'. + --real_sleep 5 +} INSERT INTO t1 VALUES (DATE(NOW()), 1); SELECT COUNT(*) FROM t1 WHERE a = NOW(); EXPLAIN SELECT COUNT(*) FROM t1 WHERE a = NOW(); @@ -174,7 +189,7 @@ EXPLAIN SELECT COUNT(*) FROM t1 WHERE a = NOW(); DROP TABLE t1; # -# Bug #28687: Search fails on '0000-00-00' date after sql_mode change +# Bug#28687: Search fails on '0000-00-00' date after sql_mode change # CREATE TABLE t1 (a DATE); diff --git a/mysql-test/t/type_float.test b/mysql-test/t/type_float.test index 9aa8c00d24a..53bcf44061d 100644 --- a/mysql-test/t/type_float.test +++ b/mysql-test/t/type_float.test @@ -252,4 +252,19 @@ insert into t1 values (2e30), (-2e30); select f1 + 0e0 from t1; drop table t1; +# +# Bug #27483: Casting 'scientific notation type' to 'unsigned bigint' fails on +# windows. +# + +create table t1(d double, u bigint unsigned); + +insert into t1(d) values (9.22337203685479e18), + (1.84e19); + +update t1 set u = d; +select u from t1; + +drop table t1; + --echo End of 5.0 tests diff --git a/mysql-test/t/warnings_engine_disabled.test b/mysql-test/t/warnings_engine_disabled.test index 0b09cff7b1e..b8751a062b7 100644 --- a/mysql-test/t/warnings_engine_disabled.test +++ b/mysql-test/t/warnings_engine_disabled.test @@ -4,7 +4,7 @@ # disable_query_log; --require r/true.require -select support = 'Disabled' as `TRUE` from information_schema.engines where engine = 'ndbcluster'; +select support = 'NO' as `TRUE` from information_schema.engines where engine = 'ndbcluster'; enable_query_log; @@ -16,4 +16,9 @@ create table t1 (id int) engine=NDB; alter table t1 engine=NDB; drop table t1; - +# +# Bug#29263 disabled storage engines omitted in SHOW ENGINES +# +SELECT ENGINE, SUPPORT FROM INFORMATION_SCHEMA.ENGINES WHERE ENGINE='ndbcluster'; +SELECT PLUGIN_NAME, PLUGIN_STATUS FROM INFORMATION_SCHEMA.PLUGINS WHERE +PLUGIN_NAME='ndbcluster'; diff --git a/mysql-test/t/xml.test b/mysql-test/t/xml.test index 5ca9c7afd76..d840e14ba5f 100644 --- a/mysql-test/t/xml.test +++ b/mysql-test/t/xml.test @@ -551,4 +551,29 @@ INSERT INTO t1 VALUES (0), (0); SELECT 1 FROM t1 ORDER BY(UPDATEXML(a, '1', '1')); DROP TABLE t1; +# +# BUG#38227 EXTRACTVALUE doesn't work with DTD declarations +# +# Check that quoted strings work fine in DOCTYPE declaration. +# + +SET @xml= +'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> + <head> + <title> Title - document with document declaration</title> + </head> + <body> Hi, Im a webpage with document a declaration </body> +</html>'; + +SELECT ExtractValue(@xml, 'html/head/title'); +SELECT ExtractValue(@xml, 'html/body'); + +# These two documents will fail. +# Quoted strings are not allowed in regular tags +# +SELECT ExtractValue('<xml "xxx" "yyy">CharData</xml>', '/xml'); +SELECT ExtractValue('<xml xxx "yyy">CharData</xml>', '/xml'); + + --echo End of 5.1 tests |