From 6153c248cfd509a62d3c5136df3f904914bf963b Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 3 Mar 2008 12:47:05 +0100 Subject: [PATCH 01/46] Bug#34995 mysql-test-run doesn't allow client lib/binary selection mysql-test/mysql-test-run.pl: Add support for spcifying --client-libdir=s and --client-bindir=s --- mysql-test/mysql-test-run.pl | 47 +++++++++++++++++++++++++----------- 1 file changed, 33 insertions(+), 14 deletions(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 7c4677b8274..83024710ce6 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -110,6 +110,7 @@ our $glob_basedir; our $path_charsetsdir; our $path_client_bindir; +our $path_client_libdir; our $path_language; our $path_timefile; our $path_snapshot; @@ -623,6 +624,8 @@ sub command_line_setup () { 'vardir=s' => \$opt_vardir, 'benchdir=s' => \$glob_mysql_bench_dir, 'mem' => \$opt_mem, + 'client-bindir=s' => \$path_client_bindir, + 'client-libdir=s' => \$path_client_libdir, # Misc 'report-features' => \$opt_report_features, @@ -717,11 +720,19 @@ sub command_line_setup () { # # Look for the client binaries directory - $path_client_bindir= mtr_path_exists("$glob_basedir/client_release", - "$glob_basedir/client_debug", - vs_config_dirs('client', ''), - "$glob_basedir/client", - "$glob_basedir/bin"); + if ($path_client_bindir) + { + # --client-bindir=path set on command line, check that the path exists + $path_client_bindir= mtr_path_exists($path_client_bindir); + } + else + { + $path_client_bindir= mtr_path_exists("$glob_basedir/client_release", + "$glob_basedir/client_debug", + vs_config_dirs('client', ''), + "$glob_basedir/client", + "$glob_basedir/bin"); + } if (!$opt_extern) { @@ -1755,19 +1766,25 @@ sub environment_setup () { my @ld_library_paths; - # -------------------------------------------------------------------------- - # Setup LD_LIBRARY_PATH so the libraries from this distro/clone - # are used in favor of the system installed ones - # -------------------------------------------------------------------------- - if ( $source_dist ) + if ($path_client_libdir) { - push(@ld_library_paths, "$glob_basedir/libmysql/.libs/", - "$glob_basedir/libmysql_r/.libs/", - "$glob_basedir/zlib.libs/"); + # Use the --client-libdir passed on commandline + push(@ld_library_paths, "$path_client_libdir"); } else { - push(@ld_library_paths, "$glob_basedir/lib"); + # Setup LD_LIBRARY_PATH so the libraries from this distro/clone + # are used in favor of the system installed ones + if ( $source_dist ) + { + push(@ld_library_paths, "$glob_basedir/libmysql/.libs/", + "$glob_basedir/libmysql_r/.libs/", + "$glob_basedir/zlib.libs/"); + } + else + { + push(@ld_library_paths, "$glob_basedir/lib"); + } } # -------------------------------------------------------------------------- @@ -5235,6 +5252,8 @@ Misc options warnings | log-warnings Pass --log-warnings to mysqld sleep=SECONDS Passed to mysqltest, will be used as fixed sleep time + client-bindir=PATH Path to the directory where client binaries are located + client-libdir=PATH Path to the directory where client libraries are located Deprecated options with-openssl Deprecated option for ssl From a4c98407c5b3a03cbc6df0aba5abbb0324025ad1 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 9 May 2008 15:17:10 +0200 Subject: [PATCH 02/46] BUG#35543 mysqlbinlog.cc does not properly work with tmp files - Backport to 5.0, use --local-load to instruct myqlbinlog where to put the files it generate mysql-test/mysql-test-run.pl: Make mysqlbinlog use the designated tmpdir for it's LOAD DATA files --- mysql-test/mysql-test-run.pl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 95fae4c1491..7b9206f0dfd 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -2045,6 +2045,9 @@ sub environment_setup () { { $cmdline_mysqlbinlog .=" --character-sets-dir=$path_charsetsdir"; } + # Always use the given tmpdir for the LOAD files created + # by mysqlbinlog + $cmdline_mysqlbinlog .=" --local-load=$opt_tmpdir"; if ( $opt_debug ) { From 78cda882ae33e25487767553ca48529fde072cc0 Mon Sep 17 00:00:00 2001 From: Chad MILLER Date: Tue, 20 May 2008 11:14:03 -0400 Subject: [PATCH 03/46] Bug#36818: rpl_server_id1 fails expecting slave has stopped The test is vulnerable because it does not check if slave has stopped at time of the new session is requested `start slave;' Fixed with deploying explicitly wait_for_slave_to_stop synchronization macro. --- mysql-test/suite/rpl/t/rpl_server_id1.test | 1 + 1 file changed, 1 insertion(+) diff --git a/mysql-test/suite/rpl/t/rpl_server_id1.test b/mysql-test/suite/rpl/t/rpl_server_id1.test index b412f303b7e..5838fe98de4 100644 --- a/mysql-test/suite/rpl/t/rpl_server_id1.test +++ b/mysql-test/suite/rpl/t/rpl_server_id1.test @@ -10,6 +10,7 @@ reset master; # replicate ourselves stop slave; +source include/wait_for_slave_to_stop.inc; --replace_result $SLAVE_MYPORT SLAVE_PORT eval change master to master_port=$SLAVE_MYPORT; start slave; From 5b7566a1d311c0326d1e276680d03743011db549 Mon Sep 17 00:00:00 2001 From: Kristofer Pettersson Date: Wed, 21 May 2008 14:44:30 +0200 Subject: [PATCH 04/46] Bug#34417 Assertion failure in Diagnostics_area::set_error_status() The Diagnostic_area caused an assertion failure in debug mode when the disk was full. By setting the internal error handler to ignore errors caused by underlying logging methods, the error is avoided. sql/log.cc: MYSQL_QUERY_LOG::write uses IOCACHE for writing data. If writing fails an error is pushed by the procedure my_error which in turn invokes the default error handler my_message_sql. When the error is set the Diagnostic_area status changes and later trigger an assertion on the next consecutive status change which happens by for example the function my_ok(). By intercepting the error handler from the logger interface this error can be silenced. --- sql/log.cc | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/sql/log.cc b/sql/log.cc index 46efc68fc38..fc58b90366a 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -741,10 +741,14 @@ bool Log_to_file_event_handler:: ulonglong query_utime, ulonglong lock_utime, bool is_command, const char *sql_text, uint sql_text_len) { - return mysql_slow_log.write(thd, current_time, query_start_arg, - user_host, user_host_len, - query_utime, lock_utime, is_command, - sql_text, sql_text_len); + Silence_log_table_errors error_handler; + thd->push_internal_handler(&error_handler); + bool retval= mysql_slow_log.write(thd, current_time, query_start_arg, + user_host, user_host_len, + query_utime, lock_utime, is_command, + sql_text, sql_text_len); + thd->pop_internal_handler(); + return retval; } @@ -760,9 +764,13 @@ bool Log_to_file_event_handler:: const char *sql_text, uint sql_text_len, CHARSET_INFO *client_cs) { - return mysql_log.write(event_time, user_host, user_host_len, - thread_id, command_type, command_type_len, - sql_text, sql_text_len); + Silence_log_table_errors error_handler; + thd->push_internal_handler(&error_handler); + bool retval= mysql_log.write(event_time, user_host, user_host_len, + thread_id, command_type, command_type_len, + sql_text, sql_text_len); + thd->pop_internal_handler(); + return retval; } From f6b7e7e411209163917d1e32d05be3a886d4e2ff Mon Sep 17 00:00:00 2001 From: Kristofer Pettersson Date: Wed, 21 May 2008 17:34:14 +0200 Subject: [PATCH 05/46] Reverted merging misstake. mysql-test/r/status.result: reverted merging misstake mysql-test/t/status.test: reverted merging misstake --- mysql-test/r/status.result | 4 ++-- mysql-test/t/status.test | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mysql-test/r/status.result b/mysql-test/r/status.result index fd2a5b3d6bc..b6f855d96cb 100644 --- a/mysql-test/r/status.result +++ b/mysql-test/r/status.result @@ -163,7 +163,7 @@ Com_show_status 8 rnd_diff tmp_table_diff 20 8 flush status; -show global status like 'Com%function'; +show status like 'Com%function'; Variable_name Value Com_alter_function 0 Com_create_function 0 @@ -175,7 +175,7 @@ set ret = x * 10; return ret; end // drop function f1; -show global status like 'Com%function'; +show status like 'Com%function'; Variable_name Value Com_alter_function 0 Com_create_function 1 diff --git a/mysql-test/t/status.test b/mysql-test/t/status.test index 3d200a9b4ea..bc629e9c86d 100644 --- a/mysql-test/t/status.test +++ b/mysql-test/t/status.test @@ -246,7 +246,7 @@ eval select substring_index('$rnd_next2',0x9,-1)-substring_index('$rnd_next',0x9 # Bug#30252 Com_create_function is not incremented. # flush status; -show global status like 'Com%function'; +show status like 'Com%function'; DELIMITER //; create function f1 (x INTEGER) returns integer @@ -259,6 +259,6 @@ DELIMITER ;// drop function f1; -show global status like 'Com%function'; +show status like 'Com%function'; # End of 5.1 tests From 8bd3bcf5a164d5b6c04baff31c45133f58292eb6 Mon Sep 17 00:00:00 2001 From: "First_name Last_name mleich@mysql.com" Date: Fri, 23 May 2008 17:23:55 +0200 Subject: [PATCH 06/46] Fix for Bug#36345 Test 'func_misc' fails on RHAS3 x86_64 and a second similar problem within this test found during experimenting. --- mysql-test/r/func_misc.result | 89 +++++++--- mysql-test/t/func_misc.test | 303 +++++++++++++++++++++++++++++++--- 2 files changed, 343 insertions(+), 49 deletions(-) diff --git a/mysql-test/r/func_misc.result b/mysql-test/r/func_misc.result index a6b912b4e0a..d53bb92bbc0 100644 --- a/mysql-test/r/func_misc.result +++ b/mysql-test/r/func_misc.result @@ -104,41 +104,76 @@ t1 CREATE TABLE `t1` ( `length(uuid())` int(10) NOT NULL DEFAULT '0' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; -create table t1 (a timestamp default '2005-05-05 01:01:01', +create table t1 (id int, +a timestamp default '2005-05-05 01:01:01', b timestamp default '2005-05-05 01:01:01'); -insert into t1 set a = now(); +insert into t1 set id = 1,a = now(); select sleep(3); sleep(3) 0 -update t1 set b = now(); -select timediff(b, a) >= '00:00:03' from t1; -timediff(b, a) >= '00:00:03' +update t1 set b = now() where id = 1; +insert into t1 set id = 2,a = now(); +select sleep(3); +sleep(3) +0 +update t1 set b = now() where id = 2; +select count(*) >= 1 from t1 +where timediff(b, a) between '00:00:03' and '00:00:07'; +count(*) >= 1 1 drop table t1; -set global query_cache_size=1355776; -create table t1 (a int); -insert into t1 values (1),(1),(1); -create table t2 (a datetime default null, b datetime default null); -insert into t2 set a = now(); -select a from t1 where sleep(1); -a -update t2 set b = now() where b is null; -insert into t2 set a = now(); -select a from t1 where sleep(a); -a -update t2 set b = now() where b is null; -insert into t2 set a = now(); -select a from t1 where sleep(1); -a -update t2 set b = now() where b is null; -select timediff(b, a) >= '00:00:03' from t2; -timediff(b, a) >= '00:00:03' +SET @@global.query_cache_size = 1024 * 64; +SELECT 1 as some_value, sleep(1); +some_value sleep(1) +1 0 +SELECT = +AS "Was the query not cached (= expectation)?"; +Was the query not cached (= expectation)? 1 +DROP TEMPORARY TABLE IF EXISTS proclist_history; +DROP TABLE IF EXISTS t1; +CREATE TEMPORARY TABLE proclist_history AS +SELECT 'Bug 1' AS test, 0 AS attempt, NOW() AS observation_time, state, time +FROM information_schema.processlist WHERE 1 = 0; +CREATE TABLE t1 (f1 BIGINT); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +SET @sleep_time_per_result_row = 1; +----- establish connection con1 (user = root) ----- +SET @sleep_time_per_result_row = 1; +Qcache_queries_in_cache: 0 +# Send query with send, pull server responses later +SELECT sleep(@sleep_time_per_result_row) FROM t1; +----- switch to connection default (user = root) ----- +----- switch to connection con1 (user = root) ----- +# Pull server responses of last query +sleep(@sleep_time_per_result_row) +0 +0 +0 +0 +----- switch to connection con1 (user = root) ----- +# Send query with send, pull server responses later +SELECT sleep(@sleep_time_per_result_row) FROM t1; +----- switch to connection default (user = root) ----- +SELECT COUNT(*) FROM information_schema.processlist +WHERE info = 'SELECT sleep(@sleep_time_per_result_row) FROM t1' + AND state = 'User sleep'; +COUNT(*) 1 -1 -drop table t2; -drop table t1; -set global query_cache_size=default; +----- switch to connection con1 (user = root) ----- +# Pull server responses of last query +sleep(@sleep_time_per_result_row) +0 +0 +0 +0 +----- switch to connection default and close connection con1 ----- +SET @@global.query_cache_size = default; +DROP TABLE t1; +DROP TEMPORARY TABLE proclist_history; create table t1 select INET_ATON('255.255.0.1') as `a`; show create table t1; Table Create Table diff --git a/mysql-test/t/func_misc.test b/mysql-test/t/func_misc.test index d33dd9b0d14..46f434c9d44 100644 --- a/mysql-test/t/func_misc.test +++ b/mysql-test/t/func_misc.test @@ -105,34 +105,293 @@ drop table t1; # # Bug #6760: Add SLEEP() function # -create table t1 (a timestamp default '2005-05-05 01:01:01', +# Note (mleich): +# -------------- +# The experiments around +# Bug#36345 Test 'func_misc' fails on RHAS3 x86_64 +# showed that the original test for Bug#6760 produced false alarms in case +# of parallel system time decreases. It was therefore modified. +# Solution: +# We run the test two times and assume a pass if at least one attempt +# is successful. The disadvantage is that a parallel "unnatural" increase of +# system time (set time via ntpd etc.) is able to hide a wrong working SLEEP +# function. This is no problem because +# - such changes of the system are rare +# - there is an extreme high probability that either the following test +# or the frequent runs of the current test on the current testing box or +# other boxes catch a wrong working SLEEP function. +create table t1 (id int, + a timestamp default '2005-05-05 01:01:01', b timestamp default '2005-05-05 01:01:01'); -insert into t1 set a = now(); +insert into t1 set id = 1,a = now(); select sleep(3); -update t1 set b = now(); -select timediff(b, a) >= '00:00:03' from t1; +update t1 set b = now() where id = 1; +insert into t1 set id = 2,a = now(); +select sleep(3); +update t1 set b = now() where id = 2; +# Check that the timediff caused by the length of the sleep is not plain wrong. +# We can have delays in statement processing of 1 - 2 seconds on +# an overloaded testing box. +# Minimum (= ideal) real timediff = '00:00:03' +# Maximum acceptable real timediff = '00:00:07' +select count(*) >= 1 from t1 +where timediff(b, a) between '00:00:03' and '00:00:07'; drop table t1; -# +################################################################################ # Bug #12689: SLEEP() gets incorrectly cached/optimized-away # -set global query_cache_size=1355776; -create table t1 (a int); -insert into t1 values (1),(1),(1); -create table t2 (a datetime default null, b datetime default null); -insert into t2 set a = now(); -select a from t1 where sleep(1); -update t2 set b = now() where b is null; -insert into t2 set a = now(); -select a from t1 where sleep(a); -update t2 set b = now() where b is null; -insert into t2 set a = now(); -select a from t1 where sleep(1); -update t2 set b = now() where b is null; -select timediff(b, a) >= '00:00:03' from t2; -drop table t2; -drop table t1; -set global query_cache_size=default; +# Description from bug report (slightly modified) +# =============================================== +# Bug 1 (happened all time): +# SELECT * FROM t1 WHERE SLEEP(1) will only result in a sleep of 1 +# second, regardless of the number of rows in t1. +# Bug 2 (happened all time): +# Such a query will also get cached by the query cache, but should not. +# +# Notes (mleich, May 2008) +# ======================== +# 1. The testcase for this bug had to be reimplemented because of +# Bug#36345 Test 'func_misc' fails on RHAS3 x86_64 +# - Bad effect: We did not reach the expected time differences. +# - Experiments showed that for example a parallel change of the system +# time (decrease of time value) like via ntpd provokes this effect. +# +# It is a clear error within the setup of the testing environment if +# tests relying on derivates of the system time can meet parallel +# manipulations of this time. Covering these weaknesses by workarounds +# within the tests is often not perfect doable at all and costs +# significant development and/or runtime per test. +# +# Results of experiments with/without manipulation of system time: +# ---------------------------------------------------------------- +# Definition: Predicted_cumulative_sleep_time = +# #_of_result_rows * sleep_time_per_result_row +# processlist.time refers to the session in state 'User sleep' +# +# 1. Total (real sleep time) ~= predicted_cumulative_sleep_time !! +# 2. processlist.time behaves "synchronous" to system time and NOW() and +# shows also the "jumps" caused by system time manipulations +# 3. processlist.time is unsigned, the next value below 0 is ~ 4G +# 4. Current processlist.time ~= current real sleep time +# if the system time was not manipulated +# +# 2. How to reveal the absence of Bug 1: +# +# The state of a session within the PROCESSLIST changes to 'User sleep' +# if the sessions runs a statement containing the sleep function and the +# processing of the statement is just within the phase where the sleep +# is done. +# +# As soon as the "Real" time where the session is in state 'User sleep' +# exceeds the sleep_time_per_result_row we can be sure that the execution +# of the query slept more time than needed for just one row. +# +# "Real" time in state 'User sleep' > sleep_time_per_result_row +# +# Estimation 1: +# ------------- +# n = how often we observed the session is in state 'User sleep' +# +# "Real" time in state 'User sleep' +# = (n - 1) * sleep_time_in_loop +# + time needed for the execution of the statements within the loop +# (includes the time waiting for getting resources like CPU etc. +# which si significant in case of high load on testing box) +# +# (n - 1) * sleep_time_in_loop >= sleep_time_per_result_row +# +# n >= sleep_time_per_result_row / sleep_time_in_loop + 1 +# +# Simplification taking truncation of values etc. into account: +# n >= sleep_time_per_result_row / sleep_time_in_loop + 2 +# +# We cannot have met Bug 1 if +# n >= sleep_time_per_result_row / sleep_time_in_loop + 2 +# is fulfilled. +# But there is a significant risk that a run on an overloaded box +# does not reach the estimated limit. +# +# Estimation 2: +# ------------- +# processlist.time should show how long a session is within the current +# state. I verified by experimenting that this value is not reset per +# row of the the result set. +# +# "Real" time in state 'User sleep' +# >= highest observed value of processlist.time +# +# We cannot have met Bug 1 if +# highest observed value of processlist.time > sleep_time_per_result_row +# is fulfilled. +# Unfortunately processlist.time is no more reliable in case of parallel +# changes of the system time. +# +# Final solution: +# --------------- +# Run a subtest with "judging" based on estimation 1. If the limit is not +# reached, assume that we suffered from high load and try estimation 2. +# If estimation 2 gets cheated by parallel increase of system time +# assume that later runs on the same box or other boxes will show if +# Bug#12689 occured again. +# +# 3. How to reveal the absence of Bug 2: +# - By checking the behaviour during second execution: +# We run the same statement again and meet the session at least once in +# state 'User sleep'. +# - By checking secondary information (query cache statistics) +# The first execution of the statment must not cause that +# Qcache_queries_in_cache is incremented. +# +# 4. We do not run +# --source include/have_query_cache.inc +# at the beginning of this script because we want that this script is not +# skipped if the query cache is disabled. This means the detection of wrongly +# cached queries is in such cases without real effect. +# +# 5. Thanks to Davi for excellent hints and ideas. +# +################################################################################ + +# 1. For Bug 2: Qcache_queries_in_cache must be not incremented if a query with +# sleep was first time executed. +SET @@global.query_cache_size = 1024 * 64; +let $Qcache_queries_in_cache_before = + query_get_value(SHOW STATUS LIKE 'Qcache_queries_in_cache', Value, 1); +SELECT 1 as some_value, sleep(1); +let $Qcache_queries_in_cache_after = + query_get_value(SHOW STATUS LIKE 'Qcache_queries_in_cache', Value, 1); +# Show that the query with sleep was not cached via query cache statistics. +--replace_result $Qcache_queries_in_cache_before $Qcache_queries_in_cache_after +eval SELECT $Qcache_queries_in_cache_before = $Qcache_queries_in_cache_after + AS "Was the query not cached (= expectation)?"; +# +# 2. For Bug 1: Estimation 1 +# Real sleep time must exceed the sleep time for just one row. +# +let $sleep_time_per_result_row = 1; +let $row_count = 4; + +--disable_warnings +DROP TEMPORARY TABLE IF EXISTS proclist_history; +DROP TABLE IF EXISTS t1; +--enable_warnings +CREATE TEMPORARY TABLE proclist_history AS +SELECT 'Bug 1' AS test, 0 AS attempt, NOW() AS observation_time, state, time +FROM information_schema.processlist WHERE 1 = 0; +CREATE TABLE t1 (f1 BIGINT); +let $num = $row_count; +while ($num) +{ + INSERT INTO t1 VALUES (1); + dec $num; +} + +eval SET @sleep_time_per_result_row = $sleep_time_per_result_row; +let $sleep_command = SELECT sleep(@sleep_time_per_result_row) FROM t1; + +# Set wait_timeout to a useful small value. +let $wait_timeout= `SELECT $row_count * $sleep_time_per_result_row + 5`; +let $wait_condition = + SELECT COUNT(*) >= @sleep_time_per_result_row / 0.1 + 2 + FROM proclist_history WHERE test = 'Bug 1'; + +--echo ----- establish connection con1 (user = root) ----- +connect (con1,localhost,root,,); +eval SET @sleep_time_per_result_row = $sleep_time_per_result_row; +let $Qcache_queries_in_cache_before = + query_get_value(SHOW STATUS LIKE 'Qcache_queries_in_cache', Value, 1); +--echo Qcache_queries_in_cache: $Qcache_queries_in_cache_before +--echo # Send query with send, pull server responses later +send; +eval $sleep_command; +# +--echo ----- switch to connection default (user = root) ----- +connection default; +# +--disable_query_log +let $wait_counter= `SELECT $wait_timeout * 10`; +let $wait_condition_reps= 0; +while ($wait_counter) +{ + let $success= `$wait_condition`; + inc $wait_condition_reps; + eval + INSERT INTO proclist_history + ( test, attempt, observation_time, state, time) + SELECT 'Bug 1', $wait_condition_reps, NOW(), state, time + FROM information_schema.processlist + WHERE info = '$sleep_command'; + if ($success) + { + let $wait_counter= 0; + } + if (!$success) + { + real_sleep 0.1; + dec $wait_counter; + } +} +--enable_query_log +if (!$success) +{ + # Estimation 1 had no success - We are most probably on a testing box + # running under high load. + # Try Estimation 2: + let $success = `SELECT MAX(time) > @sleep_time_per_result_row + FROM proclist_history WHERE test = 'Bug 1'`; +} +if (!$success) +{ + --echo # ------------------------------------------------------------ + --echo # The check for + --echo # Bug#12689: SLEEP() gets incorrectly cached/optimized-away + --echo # failed. None of both estimations are fulfilled. + --echo # + --echo # Dumping debug information + --echo # + --echo # Estimation 1: + eval $wait_condition; + --echo # ------------------------------------------------------------ + --echo # Estimation 2: + SELECT MAX(time) > @sleep_time_per_result_row + FROM proclist_history WHERE test = 'Bug 1'; + --echo # ------------------------------------------------------------ + SELECT attempt, observation_time, state, time FROM proclist_history + WHERE test = 'Bug 1' ORDER BY attempt; + --echo # ------------------------------------------------------------ +} +--echo ----- switch to connection con1 (user = root) ----- +connection con1; +--echo # Pull server responses of last query +reap; +# +# 3. For Bug 2: A second execution of the same statement must again show +# the session in state 'User sleep'. +--echo ----- switch to connection con1 (user = root) ----- +connection con1; +--echo # Send query with send, pull server responses later +send; +eval $sleep_command; +# +--echo ----- switch to connection default (user = root) ----- +connection default; +let $wait_condition = SELECT COUNT(*) FROM information_schema.processlist + WHERE info = '$sleep_command' + AND state = 'User sleep'; +--source include/wait_condition.inc +# Simply show that we reached the expected state. +eval $wait_condition; +--echo ----- switch to connection con1 (user = root) ----- +connection con1; +--echo # Pull server responses of last query +reap; +--echo ----- switch to connection default and close connection con1 ----- +connection default; +disconnect con1; +SET @@global.query_cache_size = default; +DROP TABLE t1; +DROP TEMPORARY TABLE proclist_history; # # Bug #21466: INET_ATON() returns signed, not unsigned From 605ba6867f15190a18fa3645ccfb9b91e6487bc2 Mon Sep 17 00:00:00 2001 From: Sven Sandberg Date: Mon, 26 May 2008 15:06:49 +0200 Subject: [PATCH 07/46] BUG#36826: rpl_slave_status fails sporadically in pushbuild rpl_slave_status failed on pushbuild. The slave stopped with an error. Adding sync_slave_with_master fixes the problem. Updated test case. mysql-test/suite/rpl/r/rpl_slave_status.result: Updated result file. mysql-test/suite/rpl/t/rpl_slave_status.test: - Added comment explaining what the test does. - Added sync_slave_with_master in two places where it was missing. This caused sporadic pushbuild errors. - Added wait_for_slave_to_{start,stop} after {START,STOP} SLAVE queries. - Removed 'drop table if exists' from setup code. - Replaced save_master_pos;connection slave;sync_with_master by sync_slave_with_master. - Replaced 'delete from mysql.user' by 'drop user'. - Wrapped 'show slave status' inside query_get_value(), so that only what we test is in the output. --- .../suite/rpl/r/rpl_slave_status.result | 56 ++++----------- mysql-test/suite/rpl/t/rpl_slave_status.test | 71 +++++++++++-------- 2 files changed, 57 insertions(+), 70 deletions(-) diff --git a/mysql-test/suite/rpl/r/rpl_slave_status.result b/mysql-test/suite/rpl/r/rpl_slave_status.result index 08f79d01e7a..b435af499df 100644 --- a/mysql-test/suite/rpl/r/rpl_slave_status.result +++ b/mysql-test/suite/rpl/r/rpl_slave_status.result @@ -4,59 +4,33 @@ reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; +==== Create new replication user ==== +[on master] grant replication slave on *.* to rpl@127.0.0.1 identified by 'rpl'; +[on slave] stop slave; change master to master_user='rpl',master_password='rpl'; start slave; -drop table if exists t1; +==== Do replication as new user ==== +[on master] create table t1 (n int); insert into t1 values (1); +[on slave] select * from t1; n 1 -delete from mysql.user where user='rpl'; +==== Delete new replication user ==== +[on master] +drop user rpl@127.0.0.1; flush privileges; +[on slave] +==== Restart slave without privileges ===== stop slave; start slave; -show slave status; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User rpl -Master_Port MASTER_MYPORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running No -Slave_SQL_Running Yes -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 0 -Last_Error -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master NULL -Master_SSL_Verify_Server_Cert No -Last_IO_Errno # -Last_IO_Error # -Last_SQL_Errno 0 -Last_SQL_Error +==== Verify that Slave_IO_Running = No ==== +Slave_IO_Running = No (should be No) +==== Cleanup (Note that slave IO thread is not running) ==== drop table t1; delete from mysql.user where user='rpl'; +[on master] drop table t1; diff --git a/mysql-test/suite/rpl/t/rpl_slave_status.test b/mysql-test/suite/rpl/t/rpl_slave_status.test index 10da6733c39..46836382ac4 100644 --- a/mysql-test/suite/rpl/t/rpl_slave_status.test +++ b/mysql-test/suite/rpl/t/rpl_slave_status.test @@ -1,60 +1,73 @@ +# ==== Purpose ==== +# +# Verify that a slave without replication privileges has +# Slave_IO_Running = No +# +# ==== Method ==== +# +# We do the following steps: +# - Create a new replication user on master +# - Connect to slave and start replication as this user. +# - Verify that slave can replicate well, by creating a table and +# inserting a row into it. +# - Delete the user from the master. +# - Stop and start the slave (this should fail). +# - Check the Slave_IO_Running column of SHOW SLAVE STATUS. +# +# ==== Related bugs ==== +# +# BUG#10780: slave can't connect to master - IO and SQL threads running + --source include/master-slave.inc -############################################################################ -# Test case for BUG#10780 -# -# REQUIREMENT -# A slave without replication privileges should have Slave_IO_Running = No - -# 1. Create new replication user +--echo ==== Create new replication user ==== +--echo [on master] connection master; grant replication slave on *.* to rpl@127.0.0.1 identified by 'rpl'; -connection slave; +--echo [on slave] +sync_slave_with_master; stop slave; +source include/wait_for_slave_to_stop.inc; change master to master_user='rpl',master_password='rpl'; start slave; +source include/wait_for_slave_to_start.inc; -# 2. Do replication as new user +--echo ==== Do replication as new user ==== +--echo [on master] connection master; ---disable_warnings -drop table if exists t1; ---enable_warnings create table t1 (n int); insert into t1 values (1); -save_master_pos; -connection slave; -sync_with_master; +--echo [on slave] +sync_slave_with_master; select * from t1; -# 3. Delete new replication user +--echo ==== Delete new replication user ==== +--echo [on master] connection master; -delete from mysql.user where user='rpl'; +drop user rpl@127.0.0.1; flush privileges; -connection slave; -# 4. Restart slave without privileges +--echo [on slave] +sync_slave_with_master; + +--echo ==== Restart slave without privileges ===== # (slave.err will contain access denied error for this START SLAVE command) stop slave; source include/wait_for_slave_to_stop.inc; start slave; source include/wait_for_slave_sql_to_start.inc; -# 5. Make sure Slave_IO_Running = No ---replace_result $MASTER_MYPORT MASTER_MYPORT -# Column 1 is replaced, since the output can be either -# "Connecting to master" or "Waiting for master update" ---replace_column 1 # 7 # 8 # 9 # 22 # 23 # 35 # 36 # -query_vertical show slave status; +--echo ==== Verify that Slave_IO_Running = No ==== +let $result= query_get_value("SHOW SLAVE STATUS", Slave_IO_Running, 1); +--echo Slave_IO_Running = $result (should be No) -# Cleanup (Note that slave IO thread is not running) -connection slave; +--echo ==== Cleanup (Note that slave IO thread is not running) ==== drop table t1; delete from mysql.user where user='rpl'; # cleanup: slave io thread has been stopped "irrecoverably" # so we clean up mess manually +--echo [on master] connection master; drop table t1; - -# end of 4.1 tests From ed78639805fbbf18c61716f7d4d9c5f4ce96d630 Mon Sep 17 00:00:00 2001 From: Georgi Kodinov Date: Tue, 27 May 2008 14:33:08 +0300 Subject: [PATCH 08/46] Bug #36887: Typo in mysql_client_test.c uses bind instead of my_bind There was a typo in a error check causing wrong thing to be ckecked and a possible error not being caught. Fixed by using the correct variable to test for malloc() errors. tests/mysql_client_test.c: Bug #36887: fixed a typo --- tests/mysql_client_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index c3c6ebf7637..5e1c2afe84a 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -11675,7 +11675,7 @@ static void test_bug5194() MAX_PARAM_COUNT * CHARS_PER_PARAM + 1); param_str= (char*) malloc(COLUMN_COUNT * CHARS_PER_PARAM); - if (bind == 0 || query == 0 || param_str == 0) + if (my_bind == 0 || query == 0 || param_str == 0) { fprintf(stderr, "Can't allocate enough memory for query structs\n"); if (my_bind) From f972dce2a22525fa041f7df46af222235d03a7cb Mon Sep 17 00:00:00 2001 From: Davi Arnaut Date: Tue, 27 May 2008 12:35:35 -0300 Subject: [PATCH 09/46] Add variation of compile-pentium-valgrind-max which does not build ndb. BUILD/compile-pentium-valgrind-max-no-ndb: Disable ndb. --- BUILD/compile-pentium-valgrind-max-no-ndb | 24 +++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 BUILD/compile-pentium-valgrind-max-no-ndb diff --git a/BUILD/compile-pentium-valgrind-max-no-ndb b/BUILD/compile-pentium-valgrind-max-no-ndb new file mode 100755 index 00000000000..66f6ae08a7f --- /dev/null +++ b/BUILD/compile-pentium-valgrind-max-no-ndb @@ -0,0 +1,24 @@ +#! /bin/sh + +path=`dirname $0` +. "$path/SETUP.sh" + +extra_flags="$pentium_cflags $debug_cflags $valgrind_flags" +extra_configs="$pentium_configs $debug_configs $max_no_ndb_configs" + +. "$path/FINISH.sh" + +if test -z "$just_print" +then + set +v +x + echo "\ +****************************************************************************** +Note that by default BUILD/compile-pentium-valgrind-max calls 'configure' with +--enable-assembler. When Valgrind detects an error involving an assembly +function (for example an uninitialized value used as an argument of an +assembly function), Valgrind will not print the stacktrace and 'valgrind +--gdb-attach=yes' will not work either. If you need a stacktrace in those +cases, you have to run BUILD/compile-pentium-valgrind-max with the +--disable-assembler argument. +******************************************************************************" +fi From 914bb34b38a79262de1b90c25e01bacd152768dd Mon Sep 17 00:00:00 2001 From: Patrick Crews Date: Tue, 27 May 2008 19:30:07 -0400 Subject: [PATCH 10/46] Bug#36721 - Test funcs1._func_view failing for multiple engines Bug#36724 - Test funcs_1._storedproc_02 needs to be updated Bug#36726 - Test funcs_1._storedproc failing - Needs to be updated on 5.1+ func_view bug: re-records .result files to account for addition of charset and collation data to SHOW CREATE VIEW output storedproc bugs: Added expected errors for those storedprocs that use SQLSTATE:00000 in their handlers. re-recorded .result files to account for these expected errors. mysql-test/suite/funcs_1/r/innodb_func_view.result: Update result set for changes to SHOW CREATE VIEW output mysql-test/suite/funcs_1/r/memory_func_view.result: Updated result set due to changes in SHOW CREATE VIEW output mysql-test/suite/funcs_1/r/myisam_func_view.result: Updated result set due to changes in SHOW CREATE VIEW output --- .../suite/funcs_1/r/innodb_func_view.result | 1044 ++++++++--------- .../suite/funcs_1/r/innodb_storedproc.result | 23 +- .../funcs_1/r/innodb_storedproc_02.result | 10 +- .../suite/funcs_1/r/memory_func_view.result | 1044 ++++++++--------- .../suite/funcs_1/r/memory_storedproc.result | 23 +- .../funcs_1/r/memory_storedproc_02.result | 10 +- .../suite/funcs_1/r/myisam_func_view.result | 1044 ++++++++--------- .../suite/funcs_1/r/myisam_storedproc.result | 23 +- .../funcs_1/r/myisam_storedproc_02.result | 10 +- .../suite/funcs_1/r/ndb_storedproc.result | 23 +- .../suite/funcs_1/r/ndb_storedproc_02.result | 10 +- .../funcs_1/storedproc/storedproc_02.inc | 9 +- .../funcs_1/storedproc/storedproc_master.inc | 19 +- 13 files changed, 1668 insertions(+), 1624 deletions(-) diff --git a/mysql-test/suite/funcs_1/r/innodb_func_view.result b/mysql-test/suite/funcs_1/r/innodb_func_view.result index c2689a36801..96e4f23976b 100644 --- a/mysql-test/suite/funcs_1/r/innodb_func_view.result +++ b/mysql-test/suite/funcs_1/r/innodb_func_view.result @@ -289,8 +289,8 @@ CREATE VIEW v1 AS SELECT my_char_30, id FROM t1_values; SELECT my_char_30, id FROM t1_values WHERE select_id = 193 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 193 OR select_id IS NULL) order by id; @@ -307,8 +307,8 @@ A<--------30 characters-------> <--------30 characters-------> 3 A ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 A-1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select concat(_latin1'A',`t1_values`.`my_char_30`) AS `CONCAT('A',my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select concat('A',`t1_values`.`my_char_30`) AS `CONCAT('A',my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 192 OR select_id IS NULL) order by id; @@ -327,8 +327,8 @@ SELECT LTRIM(my_varbinary_1000), my_varbinary_1000, id FROM t1_values WHERE select_id = 191 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ltrim(`t1_values`.`my_varbinary_1000`) AS `LTRIM(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ltrim(`t1_values`.`my_varbinary_1000`) AS `LTRIM(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 191 OR select_id IS NULL) order by id; @@ -341,8 +341,8 @@ SELECT LTRIM(my_binary_30), my_binary_30, id FROM t1_values WHERE select_id = 190 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ltrim(`t1_values`.`my_binary_30`) AS `LTRIM(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ltrim(`t1_values`.`my_binary_30`) AS `LTRIM(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 190 OR select_id IS NULL) order by id; @@ -355,8 +355,8 @@ SELECT LTRIM(my_varchar_1000), my_varchar_1000, id FROM t1_values WHERE select_id = 189 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ltrim(`t1_values`.`my_varchar_1000`) AS `LTRIM(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ltrim(`t1_values`.`my_varchar_1000`) AS `LTRIM(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 189 OR select_id IS NULL) order by id; @@ -369,8 +369,8 @@ SELECT LTRIM(my_char_30), my_char_30, id FROM t1_values WHERE select_id = 188 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ltrim(`t1_values`.`my_char_30`) AS `LTRIM(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ltrim(`t1_values`.`my_char_30`) AS `LTRIM(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 188 OR select_id IS NULL) order by id; @@ -383,8 +383,8 @@ SELECT LOWER(my_varbinary_1000), my_varbinary_1000, id FROM t1_values WHERE select_id = 187 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_varbinary_1000`) AS `LOWER(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_varbinary_1000`) AS `LOWER(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 187 OR select_id IS NULL) order by id; @@ -397,8 +397,8 @@ SELECT LOWER(my_binary_30), my_binary_30, id FROM t1_values WHERE select_id = 186 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_binary_30`) AS `LOWER(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_binary_30`) AS `LOWER(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 186 OR select_id IS NULL) order by id; @@ -411,8 +411,8 @@ SELECT LOWER(my_varchar_1000), my_varchar_1000, id FROM t1_values WHERE select_id = 185 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_varchar_1000`) AS `LOWER(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_varchar_1000`) AS `LOWER(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 185 OR select_id IS NULL) order by id; @@ -425,8 +425,8 @@ SELECT LOWER(my_char_30), my_char_30, id FROM t1_values WHERE select_id = 184 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_char_30`) AS `LOWER(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_char_30`) AS `LOWER(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 184 OR select_id IS NULL) order by id; @@ -439,8 +439,8 @@ SELECT LOCATE('-', ' - -ABC', my_decimal), my_decimal, id FROM t1_values WHERE select_id = 183 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'-',_latin1' - -ABC',`t1_values`.`my_decimal`) AS `LOCATE('-', ' - -ABC', my_decimal)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',' - -ABC',`t1_values`.`my_decimal`) AS `LOCATE('-', ' - -ABC', my_decimal)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 183 OR select_id IS NULL) order by id; @@ -453,8 +453,8 @@ SELECT LOCATE('-', ' - -ABC', my_double), my_double, id FROM t1_values WHERE select_id = 182 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'-',_latin1' - -ABC',`t1_values`.`my_double`) AS `LOCATE('-', ' - -ABC', my_double)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',' - -ABC',`t1_values`.`my_double`) AS `LOCATE('-', ' - -ABC', my_double)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 182 OR select_id IS NULL) order by id; @@ -467,8 +467,8 @@ SELECT LOCATE('-', ' - -ABC', my_bigint), my_bigint, id FROM t1_values WHERE select_id = 181 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'-',_latin1' - -ABC',`t1_values`.`my_bigint`) AS `LOCATE('-', ' - -ABC', my_bigint)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',' - -ABC',`t1_values`.`my_bigint`) AS `LOCATE('-', ' - -ABC', my_bigint)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 181 OR select_id IS NULL) order by id; @@ -481,8 +481,8 @@ SELECT LOCATE('-', my_varbinary_1000, 3), my_varbinary_1000, id FROM t1_values WHERE select_id = 180 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'-',`t1_values`.`my_varbinary_1000`,3) AS `LOCATE('-', my_varbinary_1000, 3)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',`t1_values`.`my_varbinary_1000`,3) AS `LOCATE('-', my_varbinary_1000, 3)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 180 OR select_id IS NULL) order by id; @@ -495,8 +495,8 @@ SELECT LOCATE('-', my_binary_30, 3), my_binary_30, id FROM t1_values WHERE select_id = 179 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'-',`t1_values`.`my_binary_30`,3) AS `LOCATE('-', my_binary_30, 3)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',`t1_values`.`my_binary_30`,3) AS `LOCATE('-', my_binary_30, 3)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 179 OR select_id IS NULL) order by id; @@ -509,8 +509,8 @@ SELECT LOCATE('-', my_varchar_1000, 3), my_varchar_1000, id FROM t1_values WHERE select_id = 178 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'-',`t1_values`.`my_varchar_1000`,3) AS `LOCATE('-', my_varchar_1000, 3)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',`t1_values`.`my_varchar_1000`,3) AS `LOCATE('-', my_varchar_1000, 3)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 178 OR select_id IS NULL) order by id; @@ -523,8 +523,8 @@ SELECT LOCATE('-', my_char_30, 3), my_char_30, id FROM t1_values WHERE select_id = 177 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'-',`t1_values`.`my_char_30`,3) AS `LOCATE('-', my_char_30, 3)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',`t1_values`.`my_char_30`,3) AS `LOCATE('-', my_char_30, 3)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 177 OR select_id IS NULL) order by id; @@ -537,8 +537,8 @@ SELECT LOCATE(my_varbinary_1000, my_binary_30 ), my_varbinary_1000, my_binary_30 id FROM t1_values WHERE select_id = 176 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_binary_30`) AS `LOCATE(my_varbinary_1000, my_binary_30 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`my_binary_30` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_binary_30`) AS `LOCATE(my_varbinary_1000, my_binary_30 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`my_binary_30` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 176 OR select_id IS NULL) order by id; @@ -551,8 +551,8 @@ SELECT LOCATE(my_varbinary_1000, my_varchar_1000 ), my_varbinary_1000, my_varchar_1000 id FROM t1_values WHERE select_id = 175 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_varbinary_1000, my_varchar_1000 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`my_varchar_1000` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_varbinary_1000, my_varchar_1000 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`my_varchar_1000` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 175 OR select_id IS NULL) order by id; @@ -565,8 +565,8 @@ SELECT LOCATE(my_varbinary_1000, my_char_30 ), my_varbinary_1000, my_char_30 id FROM t1_values WHERE select_id = 174 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_char_30`) AS `LOCATE(my_varbinary_1000, my_char_30 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`my_char_30` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_char_30`) AS `LOCATE(my_varbinary_1000, my_char_30 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`my_char_30` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 174 OR select_id IS NULL) order by id; @@ -579,8 +579,8 @@ SELECT LOCATE(my_varbinary_1000, my_varbinary_1000 ), my_varbinary_1000, id FROM t1_values WHERE select_id = 173 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_varbinary_1000, my_varbinary_1000 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_varbinary_1000, my_varbinary_1000 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 173 OR select_id IS NULL) order by id; @@ -593,8 +593,8 @@ SELECT LOCATE(my_binary_30, my_varbinary_1000 ), my_binary_30, my_varbinary_1000 id FROM t1_values WHERE select_id = 172 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_binary_30`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_binary_30, my_varbinary_1000 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`my_varbinary_1000` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_binary_30`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_binary_30, my_varbinary_1000 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`my_varbinary_1000` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 172 OR select_id IS NULL) order by id; @@ -607,8 +607,8 @@ SELECT LOCATE(my_binary_30, my_varchar_1000 ), my_binary_30, my_varchar_1000 id FROM t1_values WHERE select_id = 171 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_binary_30`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_binary_30, my_varchar_1000 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`my_varchar_1000` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_binary_30`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_binary_30, my_varchar_1000 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`my_varchar_1000` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 171 OR select_id IS NULL) order by id; @@ -621,8 +621,8 @@ SELECT LOCATE(my_binary_30, my_char_30 ), my_binary_30, my_char_30 id FROM t1_values WHERE select_id = 170 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_binary_30`,`t1_values`.`my_char_30`) AS `LOCATE(my_binary_30, my_char_30 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`my_char_30` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_binary_30`,`t1_values`.`my_char_30`) AS `LOCATE(my_binary_30, my_char_30 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`my_char_30` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 170 OR select_id IS NULL) order by id; @@ -635,8 +635,8 @@ SELECT LOCATE(my_binary_30, my_binary_30 ), my_binary_30, id FROM t1_values WHERE select_id = 169 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_binary_30`,`t1_values`.`my_binary_30`) AS `LOCATE(my_binary_30, my_binary_30 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_binary_30`,`t1_values`.`my_binary_30`) AS `LOCATE(my_binary_30, my_binary_30 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 169 OR select_id IS NULL) order by id; @@ -649,8 +649,8 @@ SELECT LOCATE(my_varchar_1000, my_varbinary_1000 ), my_varchar_1000, my_varbinary_1000 id FROM t1_values WHERE select_id = 168 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_varchar_1000, my_varbinary_1000 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`my_varbinary_1000` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_varchar_1000, my_varbinary_1000 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`my_varbinary_1000` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 168 OR select_id IS NULL) order by id; @@ -663,8 +663,8 @@ SELECT LOCATE(my_varchar_1000, my_binary_30 ), my_varchar_1000, my_binary_30 id FROM t1_values WHERE select_id = 167 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_binary_30`) AS `LOCATE(my_varchar_1000, my_binary_30 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`my_binary_30` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_binary_30`) AS `LOCATE(my_varchar_1000, my_binary_30 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`my_binary_30` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 167 OR select_id IS NULL) order by id; @@ -677,8 +677,8 @@ SELECT LOCATE(my_varchar_1000, my_char_30 ), my_varchar_1000, my_char_30 id FROM t1_values WHERE select_id = 166 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_char_30`) AS `LOCATE(my_varchar_1000, my_char_30 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`my_char_30` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_char_30`) AS `LOCATE(my_varchar_1000, my_char_30 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`my_char_30` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 166 OR select_id IS NULL) order by id; @@ -691,8 +691,8 @@ SELECT LOCATE(my_varchar_1000, my_varchar_1000 ), my_varchar_1000, id FROM t1_values WHERE select_id = 165 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_varchar_1000, my_varchar_1000 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_varchar_1000, my_varchar_1000 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 165 OR select_id IS NULL) order by id; @@ -705,8 +705,8 @@ SELECT LOCATE(my_char_30, my_varbinary_1000 ), my_char_30, my_varbinary_1000 id FROM t1_values WHERE select_id = 164 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_char_30`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_char_30, my_varbinary_1000 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`my_varbinary_1000` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_char_30`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_char_30, my_varbinary_1000 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`my_varbinary_1000` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 164 OR select_id IS NULL) order by id; @@ -719,8 +719,8 @@ SELECT LOCATE(my_char_30, my_binary_30 ), my_char_30, my_binary_30 id FROM t1_values WHERE select_id = 163 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_char_30`,`t1_values`.`my_binary_30`) AS `LOCATE(my_char_30, my_binary_30 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`my_binary_30` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_char_30`,`t1_values`.`my_binary_30`) AS `LOCATE(my_char_30, my_binary_30 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`my_binary_30` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 163 OR select_id IS NULL) order by id; @@ -733,8 +733,8 @@ SELECT LOCATE(my_char_30, my_varchar_1000 ), my_char_30, my_varchar_1000 id FROM t1_values WHERE select_id = 162 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_char_30`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_char_30, my_varchar_1000 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`my_varchar_1000` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_char_30`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_char_30, my_varchar_1000 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`my_varchar_1000` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 162 OR select_id IS NULL) order by id; @@ -747,8 +747,8 @@ SELECT LOCATE(my_char_30, my_char_30 ), my_char_30, id FROM t1_values WHERE select_id = 161 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_char_30`,`t1_values`.`my_char_30`) AS `LOCATE(my_char_30, my_char_30 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_char_30`,`t1_values`.`my_char_30`) AS `LOCATE(my_char_30, my_char_30 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 161 OR select_id IS NULL) order by id; @@ -761,8 +761,8 @@ SELECT LOCATE('char', my_varbinary_1000), my_varbinary_1000, id FROM t1_values WHERE select_id = 160 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'char',`t1_values`.`my_varbinary_1000`) AS `LOCATE('char', my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('char',`t1_values`.`my_varbinary_1000`) AS `LOCATE('char', my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 160 OR select_id IS NULL) order by id; @@ -775,8 +775,8 @@ SELECT LOCATE('char', my_binary_30), my_binary_30, id FROM t1_values WHERE select_id = 159 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'char',`t1_values`.`my_binary_30`) AS `LOCATE('char', my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('char',`t1_values`.`my_binary_30`) AS `LOCATE('char', my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 159 OR select_id IS NULL) order by id; @@ -789,8 +789,8 @@ SELECT LOCATE('char', my_varchar_1000), my_varchar_1000, id FROM t1_values WHERE select_id = 158 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'char',`t1_values`.`my_varchar_1000`) AS `LOCATE('char', my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('char',`t1_values`.`my_varchar_1000`) AS `LOCATE('char', my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 158 OR select_id IS NULL) order by id; @@ -803,8 +803,8 @@ SELECT LOCATE('char', my_char_30), my_char_30, id FROM t1_values WHERE select_id = 157 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'char',`t1_values`.`my_char_30`) AS `LOCATE('char', my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('char',`t1_values`.`my_char_30`) AS `LOCATE('char', my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 157 OR select_id IS NULL) order by id; @@ -830,8 +830,8 @@ Here is content from load_file Here is content from load_file 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select load_file(_latin1'/std_data_ln/funcs_1/load_file.txt') AS `my_col`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select load_file('/std_data_ln/funcs_1/load_file.txt') AS `my_col`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 156 OR select_id IS NULL) order by id; @@ -855,8 +855,8 @@ SELECT LENGTH(my_varbinary_1000), my_varbinary_1000, id FROM t1_values WHERE select_id = 155 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select length(`t1_values`.`my_varbinary_1000`) AS `LENGTH(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select length(`t1_values`.`my_varbinary_1000`) AS `LENGTH(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 155 OR select_id IS NULL) order by id; @@ -869,8 +869,8 @@ SELECT LENGTH(my_binary_30), my_binary_30, id FROM t1_values WHERE select_id = 154 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select length(`t1_values`.`my_binary_30`) AS `LENGTH(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select length(`t1_values`.`my_binary_30`) AS `LENGTH(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 154 OR select_id IS NULL) order by id; @@ -883,8 +883,8 @@ SELECT LENGTH(my_varchar_1000), my_varchar_1000, id FROM t1_values WHERE select_id = 153 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select length(`t1_values`.`my_varchar_1000`) AS `LENGTH(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select length(`t1_values`.`my_varchar_1000`) AS `LENGTH(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 153 OR select_id IS NULL) order by id; @@ -897,8 +897,8 @@ SELECT LENGTH(my_char_30), my_char_30, id FROM t1_values WHERE select_id = 152 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select length(`t1_values`.`my_char_30`) AS `LENGTH(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select length(`t1_values`.`my_char_30`) AS `LENGTH(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 152 OR select_id IS NULL) order by id; @@ -918,8 +918,8 @@ Warnings: Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e+308' Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e+308' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(_latin1'AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_double`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_double)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_double`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_double)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 151 OR select_id IS NULL) order by id; @@ -948,8 +948,8 @@ Warnings: Error 1292 Truncated incorrect DECIMAL value: '' Error 1292 Truncated incorrect DECIMAL value: '' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(_latin1'AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_decimal`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_decimal`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 150 OR select_id IS NULL) order by id; @@ -975,8 +975,8 @@ AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 9223372036854775807 3 0 4 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(_latin1'AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_bigint`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_bigint)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_bigint`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_bigint)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 149 OR select_id IS NULL) order by id; @@ -999,8 +999,8 @@ NULL NULL 1 - ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_varbinary_1000`,2) AS `LEFT(my_varbinary_1000, 2)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_varbinary_1000`,2) AS `LEFT(my_varbinary_1000, 2)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 148 OR select_id IS NULL) order by id; @@ -1023,8 +1023,8 @@ NULL NULL 1 - ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_binary_30`,2) AS `LEFT(my_binary_30, 2)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_binary_30`,2) AS `LEFT(my_binary_30, 2)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 147 OR select_id IS NULL) order by id; @@ -1047,8 +1047,8 @@ NULL NULL 1 - ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_varchar_1000`,2) AS `LEFT(my_varchar_1000, 2)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_varchar_1000`,2) AS `LEFT(my_varchar_1000, 2)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 146 OR select_id IS NULL) order by id; @@ -1071,8 +1071,8 @@ NULL NULL 1 - ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_char_30`,2) AS `LEFT(my_char_30, 2)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_char_30`,2) AS `LEFT(my_char_30, 2)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 145 OR select_id IS NULL) order by id; @@ -1091,8 +1091,8 @@ SELECT LCASE(my_varchar_1000), my_varchar_1000, id FROM t1_values WHERE select_id = 144 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_varchar_1000`) AS `LCASE(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_varchar_1000`) AS `LCASE(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 144 OR select_id IS NULL) order by id; @@ -1105,8 +1105,8 @@ SELECT INSTR(my_char_30, 'char'), my_char_30, id FROM t1_values WHERE select_id = 143 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'char',`t1_values`.`my_char_30`) AS `INSTR(my_char_30, 'char')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('char',`t1_values`.`my_char_30`) AS `INSTR(my_char_30, 'char')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 143 OR select_id IS NULL) order by id; @@ -1125,8 +1125,8 @@ NULL NULL 1 160 ---äÖüß@µ*$-- 4 16 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_varbinary_1000`) AS `BIT_LENGTH(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_varbinary_1000`) AS `BIT_LENGTH(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 142 OR select_id IS NULL) order by id; @@ -1151,8 +1151,8 @@ NULL NULL 1 240 ---äÖüß@µ*$-- 4 240 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_binary_30`) AS `BIT_LENGTH(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_binary_30`) AS `BIT_LENGTH(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 141 OR select_id IS NULL) order by id; @@ -1177,8 +1177,8 @@ NULL NULL 1 160 ---äÖüß@µ*$-- 4 16 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_varchar_1000`) AS `BIT_LENGTH(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_varchar_1000`) AS `BIT_LENGTH(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 140 OR select_id IS NULL) order by id; @@ -1203,8 +1203,8 @@ NULL NULL 1 152 ---äÖüß@µ*$-- 4 16 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_char_30`) AS `BIT_LENGTH(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_char_30`) AS `BIT_LENGTH(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 139 OR select_id IS NULL) order by id; @@ -1229,8 +1229,8 @@ IS_NULL NULL 1 2000 2000 4 2005 2005 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_year`,_latin1'IS_NULL') AS `IFNULL(my_year,'IS_NULL')`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_year`,'IS_NULL') AS `IFNULL(my_year,'IS_NULL')`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 138 OR select_id IS NULL) order by id; @@ -1255,8 +1255,8 @@ IS_NULL NULL 1 13:00:00 13:00:00 4 10:00:00 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_time`,_latin1'IS_NULL') AS `IFNULL(my_time,'IS_NULL')`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_time`,'IS_NULL') AS `IFNULL(my_time,'IS_NULL')`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 137 OR select_id IS NULL) order by id; @@ -1281,8 +1281,8 @@ IFNULL(my_timestamp,'IS_NULL') my_timestamp id 2004-02-29 23:59:59 2004-02-29 23:59:59 4 2005-06-28 10:00:00 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_timestamp`,_latin1'IS_NULL') AS `IFNULL(my_timestamp,'IS_NULL')`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_timestamp`,'IS_NULL') AS `IFNULL(my_timestamp,'IS_NULL')`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 136 OR select_id IS NULL) order by id; @@ -1307,8 +1307,8 @@ IS_NULL NULL 1 2004-02-29 2004-02-29 4 2005-06-28 2005-06-28 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_date`,_latin1'IS_NULL') AS `IFNULL(my_date,'IS_NULL')`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_date`,'IS_NULL') AS `IFNULL(my_date,'IS_NULL')`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 135 OR select_id IS NULL) order by id; @@ -1333,8 +1333,8 @@ IS_NULL NULL 1 2004-02-29 23:59:59 2004-02-29 23:59:59 4 2005-06-28 10:00:00 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_datetime`,_latin1'IS_NULL') AS `IFNULL(my_datetime,'IS_NULL')`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_datetime`,'IS_NULL') AS `IFNULL(my_datetime,'IS_NULL')`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 134 OR select_id IS NULL) order by id; @@ -1359,8 +1359,8 @@ IS_NULL NULL 1 0 0 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_double`,_latin1'IS_NULL') AS `IFNULL(my_double,'IS_NULL')`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_double`,'IS_NULL') AS `IFNULL(my_double,'IS_NULL')`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 133 OR select_id IS NULL) order by id; @@ -1385,8 +1385,8 @@ IS_NULL NULL 1 0.000000000000000000000000000000 0.000000000000000000000000000000 4 -1.000000000000000000000000000000 -1.000000000000000000000000000000 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_decimal`,_latin1'IS_NULL') AS `IFNULL(my_decimal,'IS_NULL')`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_decimal`,'IS_NULL') AS `IFNULL(my_decimal,'IS_NULL')`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 132 OR select_id IS NULL) order by id; @@ -1411,8 +1411,8 @@ IS_NULL NULL 1 0 0 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_bigint`,_latin1'IS_NULL') AS `IFNULL(my_bigint,'IS_NULL')`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_bigint`,'IS_NULL') AS `IFNULL(my_bigint,'IS_NULL')`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 131 OR select_id IS NULL) order by id; @@ -1437,8 +1437,8 @@ IS_NULL NULL 1 ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_varbinary_1000`,_latin1'IS_NULL') AS `IFNULL(my_varbinary_1000,'IS_NULL')`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_varbinary_1000`,'IS_NULL') AS `IFNULL(my_varbinary_1000,'IS_NULL')`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 130 OR select_id IS NULL) order by id; @@ -1463,8 +1463,8 @@ IS_NULL NULL 1 ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_binary_30`,_latin1'IS_NULL') AS `IFNULL(my_binary_30,'IS_NULL')`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_binary_30`,'IS_NULL') AS `IFNULL(my_binary_30,'IS_NULL')`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 129 OR select_id IS NULL) order by id; @@ -1489,8 +1489,8 @@ IS_NULL NULL 1 ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_varchar_1000`,_latin1'IS_NULL') AS `IFNULL(my_varchar_1000,'IS_NULL')`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_varchar_1000`,'IS_NULL') AS `IFNULL(my_varchar_1000,'IS_NULL')`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 128 OR select_id IS NULL) order by id; @@ -1515,8 +1515,8 @@ IS_NULL NULL 1 ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_char_30`,_latin1'IS_NULL') AS `IFNULL(my_char_30,'IS_NULL')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_char_30`,'IS_NULL') AS `IFNULL(my_char_30,'IS_NULL')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 127 OR select_id IS NULL) order by id; @@ -1542,9 +1542,9 @@ IS NOT NULL 2155 3 IS NOT NULL 2000 4 IS NOT NULL 2005 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_year`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_year IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_year`),'IS NULL','IS NOT NULL') AS `IF(my_year IS NULL, 'IS NULL', +'IS NOT NULL')`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 126 OR select_id IS NULL) order by id; @@ -1571,9 +1571,9 @@ IS NOT NULL 838:59:59 3 IS NOT NULL 13:00:00 4 IS NOT NULL 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_time`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_time IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_time`),'IS NULL','IS NOT NULL') AS `IF(my_time IS NULL, 'IS NULL', +'IS NOT NULL')`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 125 OR select_id IS NULL) order by id; @@ -1600,9 +1600,9 @@ IS NOT NULL 2038-01-01 02:59:59 3 IS NOT NULL 2004-02-29 23:59:59 4 IS NOT NULL 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_timestamp`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_timestamp IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_timestamp`),'IS NULL','IS NOT NULL') AS `IF(my_timestamp IS NULL, 'IS NULL', +'IS NOT NULL')`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 124 OR select_id IS NULL) order by id; @@ -1629,9 +1629,9 @@ IS NOT NULL 9999-12-31 3 IS NOT NULL 2004-02-29 4 IS NOT NULL 2005-06-28 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_date`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_date IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_date`),'IS NULL','IS NOT NULL') AS `IF(my_date IS NULL, 'IS NULL', +'IS NOT NULL')`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 123 OR select_id IS NULL) order by id; @@ -1658,9 +1658,9 @@ IS NOT NULL 9999-12-31 23:59:59 3 IS NOT NULL 2004-02-29 23:59:59 4 IS NOT NULL 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_datetime`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_datetime IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_datetime`),'IS NULL','IS NOT NULL') AS `IF(my_datetime IS NULL, 'IS NULL', +'IS NOT NULL')`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 122 OR select_id IS NULL) order by id; @@ -1687,9 +1687,9 @@ IS NOT NULL 1.7976931348623e+308 3 IS NOT NULL 0 4 IS NOT NULL -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_double`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_double IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_double`),'IS NULL','IS NOT NULL') AS `IF(my_double IS NULL, 'IS NULL', +'IS NOT NULL')`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 121 OR select_id IS NULL) order by id; @@ -1716,9 +1716,9 @@ IS NOT NULL 9999999999999999999999999999999999.999999999999999999999999999999 3 IS NOT NULL 0.000000000000000000000000000000 4 IS NOT NULL -1.000000000000000000000000000000 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_decimal`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_decimal IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_decimal`),'IS NULL','IS NOT NULL') AS `IF(my_decimal IS NULL, 'IS NULL', +'IS NOT NULL')`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 120 OR select_id IS NULL) order by id; @@ -1745,9 +1745,9 @@ IS NOT NULL 9223372036854775807 3 IS NOT NULL 0 4 IS NOT NULL -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_bigint`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_bigint IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_bigint`),'IS NULL','IS NOT NULL') AS `IF(my_bigint IS NULL, 'IS NULL', +'IS NOT NULL')`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 119 OR select_id IS NULL) order by id; @@ -1774,9 +1774,9 @@ IS NOT NULL <---------1000 characters------------------------------------------- IS NOT NULL ---äÖüß@µ*$-- 4 IS NOT NULL -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_varbinary_1000`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_varbinary_1000 IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_varbinary_1000`),'IS NULL','IS NOT NULL') AS `IF(my_varbinary_1000 IS NULL, 'IS NULL', +'IS NOT NULL')`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 118 OR select_id IS NULL) order by id; @@ -1803,9 +1803,9 @@ IS NOT NULL <--------30 characters-------> 3 IS NOT NULL ---äÖüß@µ*$-- 4 IS NOT NULL -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_binary_30`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_binary_30 IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_binary_30`),'IS NULL','IS NOT NULL') AS `IF(my_binary_30 IS NULL, 'IS NULL', +'IS NOT NULL')`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 117 OR select_id IS NULL) order by id; @@ -1832,9 +1832,9 @@ IS NOT NULL <---------1000 characters------------------------------------------- IS NOT NULL ---äÖüß@µ*$-- 4 IS NOT NULL -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_varchar_1000`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_varchar_1000 IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_varchar_1000`),'IS NULL','IS NOT NULL') AS `IF(my_varchar_1000 IS NULL, 'IS NULL', +'IS NOT NULL')`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 116 OR select_id IS NULL) order by id; @@ -1861,9 +1861,9 @@ IS NOT NULL <--------30 characters-------> 3 IS NOT NULL ---äÖüß@µ*$-- 4 IS NOT NULL -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_char_30`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_char_30 IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_char_30`),'IS NULL','IS NOT NULL') AS `IF(my_char_30 IS NULL, 'IS NULL', +'IS NOT NULL')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 115 OR select_id IS NULL) order by id; @@ -1889,8 +1889,8 @@ IS TRUE 2155 3 IS TRUE 2000 4 IS TRUE 2005 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_year`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_year, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_year`,'IS TRUE','IS NOT TRUE') AS `IF(my_year, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 114 OR select_id IS NULL) order by id; @@ -1915,8 +1915,8 @@ IS TRUE 838:59:59 3 IS TRUE 13:00:00 4 IS TRUE 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_time`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_time, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_time`,'IS TRUE','IS NOT TRUE') AS `IF(my_time, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 113 OR select_id IS NULL) order by id; @@ -1941,8 +1941,8 @@ IS TRUE 2038-01-01 02:59:59 3 IS TRUE 2004-02-29 23:59:59 4 IS TRUE 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_timestamp`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_timestamp, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_timestamp`,'IS TRUE','IS NOT TRUE') AS `IF(my_timestamp, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 112 OR select_id IS NULL) order by id; @@ -1967,8 +1967,8 @@ IS TRUE 9999-12-31 3 IS TRUE 2004-02-29 4 IS TRUE 2005-06-28 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_date`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_date, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_date`,'IS TRUE','IS NOT TRUE') AS `IF(my_date, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 111 OR select_id IS NULL) order by id; @@ -1993,8 +1993,8 @@ IS TRUE 9999-12-31 23:59:59 3 IS TRUE 2004-02-29 23:59:59 4 IS TRUE 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_datetime`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_datetime, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_datetime`,'IS TRUE','IS NOT TRUE') AS `IF(my_datetime, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 110 OR select_id IS NULL) order by id; @@ -2019,8 +2019,8 @@ IS TRUE 1.7976931348623e+308 3 IS NOT TRUE 0 4 IS TRUE -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_double`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_double, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_double`,'IS TRUE','IS NOT TRUE') AS `IF(my_double, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 109 OR select_id IS NULL) order by id; @@ -2045,8 +2045,8 @@ IS TRUE 9999999999999999999999999999999999.999999999999999999999999999999 3 IS NOT TRUE 0.000000000000000000000000000000 4 IS TRUE -1.000000000000000000000000000000 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_decimal`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_decimal, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_decimal`,'IS TRUE','IS NOT TRUE') AS `IF(my_decimal, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 108 OR select_id IS NULL) order by id; @@ -2071,8 +2071,8 @@ IS TRUE 9223372036854775807 3 IS NOT TRUE 0 4 IS TRUE -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_bigint`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_bigint, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_bigint`,'IS TRUE','IS NOT TRUE') AS `IF(my_bigint, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 107 OR select_id IS NULL) order by id; @@ -2097,8 +2097,8 @@ IS NOT TRUE <---------1000 characters------------------------------------------- IS NOT TRUE ---äÖüß@µ*$-- 4 IS TRUE -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_varbinary_1000`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_varbinary_1000, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_varbinary_1000`,'IS TRUE','IS NOT TRUE') AS `IF(my_varbinary_1000, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 106 OR select_id IS NULL) order by id; @@ -2128,8 +2128,8 @@ Warning 1292 Truncated incorrect DOUBLE value: '<--------30 characters------->' Warning 1292 Truncated incorrect DOUBLE value: ' ---äÖüß@µ*$-- ' Warning 1292 Truncated incorrect DOUBLE value: '-1' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_binary_30`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_binary_30, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_binary_30`,'IS TRUE','IS NOT TRUE') AS `IF(my_binary_30, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 105 OR select_id IS NULL) order by id; @@ -2159,8 +2159,8 @@ IS NOT TRUE <---------1000 characters------------------------------------------- IS NOT TRUE ---äÖüß@µ*$-- 4 IS TRUE -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_varchar_1000`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_varchar_1000, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_varchar_1000`,'IS TRUE','IS NOT TRUE') AS `IF(my_varchar_1000, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 104 OR select_id IS NULL) order by id; @@ -2188,8 +2188,8 @@ Warnings: Warning 1292 Truncated incorrect DOUBLE value: '<--------30 characters------->' Warning 1292 Truncated incorrect DOUBLE value: ' ---äÖüß@µ*$-- ' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_char_30`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_char_30, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_char_30`,'IS TRUE','IS NOT TRUE') AS `IF(my_char_30, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 103 OR select_id IS NULL) order by id; @@ -2217,8 +2217,8 @@ NULL NULL 1 ---???????÷@??*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_varbinary_1000` using koi8r) AS `CONVERT(my_varbinary_1000 USING koi8r)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_varbinary_1000` using koi8r) AS `CONVERT(my_varbinary_1000 USING koi8r)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 102 OR select_id IS NULL) order by id; @@ -2243,8 +2243,8 @@ NULL NULL 1 ---???????÷@??*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_binary_30` using koi8r) AS `CONVERT(my_binary_30 USING koi8r)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_binary_30` using koi8r) AS `CONVERT(my_binary_30 USING koi8r)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 101 OR select_id IS NULL) order by id; @@ -2269,8 +2269,8 @@ NULL NULL 1 ---????????@??*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_varchar_1000` using koi8r) AS `CONVERT(my_varchar_1000 USING koi8r)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_varchar_1000` using koi8r) AS `CONVERT(my_varchar_1000 USING koi8r)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 100 OR select_id IS NULL) order by id; @@ -2295,8 +2295,8 @@ NULL NULL 1 ---????????@??*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_char_30` using koi8r) AS `CONVERT(my_char_30 USING koi8r)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_char_30` using koi8r) AS `CONVERT(my_char_30 USING koi8r)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 99 OR select_id IS NULL) order by id; @@ -2321,8 +2321,8 @@ NULL NULL 1 ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_varbinary_1000` using utf8) AS `CONVERT(my_varbinary_1000 USING utf8)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_varbinary_1000` using utf8) AS `CONVERT(my_varbinary_1000 USING utf8)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 98 OR select_id IS NULL) order by id; @@ -2347,8 +2347,8 @@ NULL NULL 1 ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_binary_30` using utf8) AS `CONVERT(my_binary_30 USING utf8)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_binary_30` using utf8) AS `CONVERT(my_binary_30 USING utf8)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 97 OR select_id IS NULL) order by id; @@ -2373,8 +2373,8 @@ NULL NULL 1 ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_varchar_1000` using utf8) AS `CONVERT(my_varchar_1000 USING utf8)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_varchar_1000` using utf8) AS `CONVERT(my_varchar_1000 USING utf8)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 96 OR select_id IS NULL) order by id; @@ -2399,8 +2399,8 @@ NULL NULL 1 ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_char_30` using utf8) AS `CONVERT(my_char_30 USING utf8)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_char_30` using utf8) AS `CONVERT(my_char_30 USING utf8)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 95 OR select_id IS NULL) order by id; @@ -2425,8 +2425,8 @@ NULL NULL 1 2000 2000 4 2005 2005 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as unsigned) AS `CAST(my_year AS UNSIGNED INTEGER)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as unsigned) AS `CAST(my_year AS UNSIGNED INTEGER)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 94 OR select_id IS NULL) order by id; @@ -2451,8 +2451,8 @@ NULL NULL 1 130000 13:00:00 4 100000 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as unsigned) AS `CAST(my_time AS UNSIGNED INTEGER)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as unsigned) AS `CAST(my_time AS UNSIGNED INTEGER)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 93 OR select_id IS NULL) order by id; @@ -2477,8 +2477,8 @@ CAST(my_timestamp AS UNSIGNED INTEGER) my_timestamp id 20040229235959 2004-02-29 23:59:59 4 20050628100000 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as unsigned) AS `CAST(my_timestamp AS UNSIGNED INTEGER)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as unsigned) AS `CAST(my_timestamp AS UNSIGNED INTEGER)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 92 OR select_id IS NULL) order by id; @@ -2503,8 +2503,8 @@ NULL NULL 1 20040229 2004-02-29 4 20050628 2005-06-28 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as unsigned) AS `CAST(my_date AS UNSIGNED INTEGER)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as unsigned) AS `CAST(my_date AS UNSIGNED INTEGER)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 91 OR select_id IS NULL) order by id; @@ -2529,8 +2529,8 @@ NULL NULL 1 20040229235959 2004-02-29 23:59:59 4 20050628100000 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as unsigned) AS `CAST(my_datetime AS UNSIGNED INTEGER)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as unsigned) AS `CAST(my_datetime AS UNSIGNED INTEGER)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 90 OR select_id IS NULL) order by id; @@ -2558,8 +2558,8 @@ Warnings: Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e+308' Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e+308' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as unsigned) AS `CAST(my_double AS UNSIGNED INTEGER)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as unsigned) AS `CAST(my_double AS UNSIGNED INTEGER)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 89 OR select_id IS NULL) order by id; @@ -2591,8 +2591,8 @@ Error 1292 Truncated incorrect DECIMAL value: '' Error 1292 Truncated incorrect DECIMAL value: '' Error 1292 Truncated incorrect DECIMAL value: '' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as unsigned) AS `CAST(my_decimal AS UNSIGNED INTEGER)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as unsigned) AS `CAST(my_decimal AS UNSIGNED INTEGER)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 88 OR select_id IS NULL) order by id; @@ -2621,8 +2621,8 @@ NULL NULL 1 0 0 4 18446744073709551615 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as unsigned) AS `CAST(my_bigint AS UNSIGNED INTEGER)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as unsigned) AS `CAST(my_bigint AS UNSIGNED INTEGER)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 87 OR select_id IS NULL) order by id; @@ -2652,8 +2652,8 @@ Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters------ Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- ' Warning 1105 Cast to unsigned converted negative integer to it's positive complement SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as unsigned) AS `CAST(my_varbinary_1000 AS UNSIGNED INTEGER)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as unsigned) AS `CAST(my_varbinary_1000 AS UNSIGNED INTEGER)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 86 OR select_id IS NULL) order by id; @@ -2689,8 +2689,8 @@ Warning 1292 Truncated incorrect INTEGER value: ' --- Warning 1292 Truncated incorrect INTEGER value: '-1' Warning 1105 Cast to unsigned converted negative integer to it's positive complement SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as unsigned) AS `CAST(my_binary_30 AS UNSIGNED INTEGER)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as unsigned) AS `CAST(my_binary_30 AS UNSIGNED INTEGER)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 85 OR select_id IS NULL) order by id; @@ -2726,8 +2726,8 @@ Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters------ Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- ' Warning 1105 Cast to unsigned converted negative integer to it's positive complement SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as unsigned) AS `CAST(my_varchar_1000 AS UNSIGNED INTEGER)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as unsigned) AS `CAST(my_varchar_1000 AS UNSIGNED INTEGER)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 84 OR select_id IS NULL) order by id; @@ -2762,8 +2762,8 @@ Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->' Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$--' Warning 1105 Cast to unsigned converted negative integer to it's positive complement SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as unsigned) AS `CAST(my_char_30 AS UNSIGNED INTEGER)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as unsigned) AS `CAST(my_char_30 AS UNSIGNED INTEGER)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 83 OR select_id IS NULL) order by id; @@ -2793,8 +2793,8 @@ NULL NULL 1 2000 2000 4 2005 2005 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as signed) AS `CAST(my_year AS SIGNED INTEGER)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as signed) AS `CAST(my_year AS SIGNED INTEGER)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 82 OR select_id IS NULL) order by id; @@ -2819,8 +2819,8 @@ NULL NULL 1 130000 13:00:00 4 100000 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as signed) AS `CAST(my_time AS SIGNED INTEGER)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as signed) AS `CAST(my_time AS SIGNED INTEGER)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 81 OR select_id IS NULL) order by id; @@ -2845,8 +2845,8 @@ CAST(my_timestamp AS SIGNED INTEGER) my_timestamp id 20040229235959 2004-02-29 23:59:59 4 20050628100000 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as signed) AS `CAST(my_timestamp AS SIGNED INTEGER)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as signed) AS `CAST(my_timestamp AS SIGNED INTEGER)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 80 OR select_id IS NULL) order by id; @@ -2871,8 +2871,8 @@ NULL NULL 1 20040229 2004-02-29 4 20050628 2005-06-28 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as signed) AS `CAST(my_date AS SIGNED INTEGER)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as signed) AS `CAST(my_date AS SIGNED INTEGER)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 79 OR select_id IS NULL) order by id; @@ -2897,8 +2897,8 @@ NULL NULL 1 20040229235959 2004-02-29 23:59:59 4 20050628100000 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as signed) AS `CAST(my_datetime AS SIGNED INTEGER)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as signed) AS `CAST(my_datetime AS SIGNED INTEGER)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 78 OR select_id IS NULL) order by id; @@ -2926,8 +2926,8 @@ Warnings: Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e+308' Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e+308' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as signed) AS `CAST(my_double AS SIGNED INTEGER)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as signed) AS `CAST(my_double AS SIGNED INTEGER)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 77 OR select_id IS NULL) order by id; @@ -2958,8 +2958,8 @@ Warnings: Error 1292 Truncated incorrect DECIMAL value: '' Error 1292 Truncated incorrect DECIMAL value: '' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as signed) AS `CAST(my_decimal AS SIGNED INTEGER)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as signed) AS `CAST(my_decimal AS SIGNED INTEGER)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 76 OR select_id IS NULL) order by id; @@ -2987,8 +2987,8 @@ NULL NULL 1 0 0 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as signed) AS `CAST(my_bigint AS SIGNED INTEGER)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as signed) AS `CAST(my_bigint AS SIGNED INTEGER)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 75 OR select_id IS NULL) order by id; @@ -3017,8 +3017,8 @@ Warning 1292 Truncated incorrect INTEGER value: '' Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- ' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as signed) AS `CAST(my_varbinary_1000 AS SIGNED INTEGER)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as signed) AS `CAST(my_varbinary_1000 AS SIGNED INTEGER)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 74 OR select_id IS NULL) order by id; @@ -3052,8 +3052,8 @@ Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->' Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- ' Warning 1292 Truncated incorrect INTEGER value: '-1' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as signed) AS `CAST(my_binary_30 AS SIGNED INTEGER)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as signed) AS `CAST(my_binary_30 AS SIGNED INTEGER)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 73 OR select_id IS NULL) order by id; @@ -3087,8 +3087,8 @@ Warning 1292 Truncated incorrect INTEGER value: '' Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- ' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as signed) AS `CAST(my_varchar_1000 AS SIGNED INTEGER)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as signed) AS `CAST(my_varchar_1000 AS SIGNED INTEGER)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 72 OR select_id IS NULL) order by id; @@ -3121,8 +3121,8 @@ Warning 1292 Truncated incorrect INTEGER value: '' Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->' Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$--' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as signed) AS `CAST(my_char_30 AS SIGNED INTEGER)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as signed) AS `CAST(my_char_30 AS SIGNED INTEGER)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 71 OR select_id IS NULL) order by id; @@ -3151,8 +3151,8 @@ NULL NULL 1 2000.00 2000 4 2005.00 2005 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as decimal(37,2)) AS `CAST(my_year AS DECIMAL(37,2))`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as decimal(37,2)) AS `CAST(my_year AS DECIMAL(37,2))`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 70 OR select_id IS NULL) order by id; @@ -3177,8 +3177,8 @@ NULL NULL 1 130000.00 13:00:00 4 100000.00 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as decimal(37,2)) AS `CAST(my_time AS DECIMAL(37,2))`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as decimal(37,2)) AS `CAST(my_time AS DECIMAL(37,2))`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 69 OR select_id IS NULL) order by id; @@ -3203,8 +3203,8 @@ CAST(my_timestamp AS DECIMAL(37,2)) my_timestamp id 20040229235959.00 2004-02-29 23:59:59 4 20050628100000.00 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as decimal(37,2)) AS `CAST(my_timestamp AS DECIMAL(37,2))`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as decimal(37,2)) AS `CAST(my_timestamp AS DECIMAL(37,2))`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 68 OR select_id IS NULL) order by id; @@ -3229,8 +3229,8 @@ NULL NULL 1 20040229.00 2004-02-29 4 20050628.00 2005-06-28 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as decimal(37,2)) AS `CAST(my_date AS DECIMAL(37,2))`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as decimal(37,2)) AS `CAST(my_date AS DECIMAL(37,2))`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 67 OR select_id IS NULL) order by id; @@ -3255,8 +3255,8 @@ NULL NULL 1 20040229235959.00 2004-02-29 23:59:59 4 20050628100000.00 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as decimal(37,2)) AS `CAST(my_datetime AS DECIMAL(37,2))`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as decimal(37,2)) AS `CAST(my_datetime AS DECIMAL(37,2))`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 66 OR select_id IS NULL) order by id; @@ -3283,12 +3283,12 @@ NULL NULL 1 -3333.33 -3333.3333 30 Warnings: Error 1292 Truncated incorrect DECIMAL value: '' -Error 1264 Out of range value adjusted for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 +Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 Error 1292 Truncated incorrect DECIMAL value: '' -Error 1264 Out of range value adjusted for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 +Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as decimal(37,2)) AS `CAST(my_double AS DECIMAL(37,2))`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as decimal(37,2)) AS `CAST(my_double AS DECIMAL(37,2))`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 65 OR select_id IS NULL) order by id; @@ -3301,9 +3301,9 @@ NULL NULL 1 -3333.33 -3333.3333 30 Warnings: Error 1292 Truncated incorrect DECIMAL value: '' -Error 1264 Out of range value adjusted for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 +Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 Error 1292 Truncated incorrect DECIMAL value: '' -Error 1264 Out of range value adjusted for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 +Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 DROP VIEW v1; @@ -3319,8 +3319,8 @@ NULL NULL 1 0.00 0.000000000000000000000000000000 4 -1.00 -1.000000000000000000000000000000 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as decimal(37,2)) AS `CAST(my_decimal AS DECIMAL(37,2))`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as decimal(37,2)) AS `CAST(my_decimal AS DECIMAL(37,2))`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 64 OR select_id IS NULL) order by id; @@ -3345,8 +3345,8 @@ NULL NULL 1 0.00 0 4 -1.00 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as decimal(37,2)) AS `CAST(my_bigint AS DECIMAL(37,2))`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as decimal(37,2)) AS `CAST(my_bigint AS DECIMAL(37,2))`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 63 OR select_id IS NULL) order by id; @@ -3376,8 +3376,8 @@ Error 1366 Incorrect decimal value: '' for column '' at row -1 Error 1366 Incorrect decimal value: '' for column '' at row -1 Error 1366 Incorrect decimal value: '' for column '' at row -1 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as decimal(37,2)) AS `CAST(my_varbinary_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as decimal(37,2)) AS `CAST(my_varbinary_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 62 OR select_id IS NULL) order by id; @@ -3417,8 +3417,8 @@ Warning 1292 Truncated incorrect DECIMAL value: ' --- Warning 1292 Truncated incorrect DECIMAL value: '-1' Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as decimal(37,2)) AS `CAST(my_binary_30 AS DECIMAL(37,2))`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as decimal(37,2)) AS `CAST(my_binary_30 AS DECIMAL(37,2))`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 61 OR select_id IS NULL) order by id; @@ -3458,8 +3458,8 @@ Error 1366 Incorrect decimal value: '' for column '' at row -1 Error 1366 Incorrect decimal value: '' for column '' at row -1 Error 1366 Incorrect decimal value: '' for column '' at row -1 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as decimal(37,2)) AS `CAST(my_varchar_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as decimal(37,2)) AS `CAST(my_varchar_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 60 OR select_id IS NULL) order by id; @@ -3497,8 +3497,8 @@ Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->' Error 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as decimal(37,2)) AS `CAST(my_char_30 AS DECIMAL(37,2))`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as decimal(37,2)) AS `CAST(my_char_30 AS DECIMAL(37,2))`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 59 OR select_id IS NULL) order by id; @@ -3531,8 +3531,8 @@ NULL NULL 1 00:20:00 2000 4 00:20:05 2005 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as time) AS `CAST(my_year AS TIME)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as time) AS `CAST(my_year AS TIME)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 58 OR select_id IS NULL) order by id; @@ -3557,8 +3557,8 @@ NULL NULL 1 13:00:00 13:00:00 4 10:00:00 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as time) AS `CAST(my_time AS TIME)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as time) AS `CAST(my_time AS TIME)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 57 OR select_id IS NULL) order by id; @@ -3583,8 +3583,8 @@ CAST(my_timestamp AS TIME) my_timestamp id 23:59:59 2004-02-29 23:59:59 4 10:00:00 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as time) AS `CAST(my_timestamp AS TIME)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as time) AS `CAST(my_timestamp AS TIME)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 56 OR select_id IS NULL) order by id; @@ -3609,8 +3609,8 @@ NULL NULL 1 00:00:00 2004-02-29 4 00:00:00 2005-06-28 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as time) AS `CAST(my_date AS TIME)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as time) AS `CAST(my_date AS TIME)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 55 OR select_id IS NULL) order by id; @@ -3635,8 +3635,8 @@ NULL NULL 1 23:59:59 2004-02-29 23:59:59 4 10:00:00 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as time) AS `CAST(my_datetime AS TIME)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as time) AS `CAST(my_datetime AS TIME)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 54 OR select_id IS NULL) order by id; @@ -3665,8 +3665,8 @@ Warnings: Warning 1292 Truncated incorrect time value: '-1.7976931348623e+308' Warning 1292 Truncated incorrect time value: '1.7976931348623e+308' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as time) AS `CAST(my_double AS TIME)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as time) AS `CAST(my_double AS TIME)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 53 OR select_id IS NULL) order by id; @@ -3699,8 +3699,8 @@ Warnings: Warning 1292 Truncated incorrect time value: '-9223372036854775808' Warning 1292 Truncated incorrect time value: '9223372036854775807' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as time) AS `CAST(my_bigint AS TIME)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as time) AS `CAST(my_bigint AS TIME)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 52 OR select_id IS NULL) order by id; @@ -3734,8 +3734,8 @@ Warning 1292 Truncated incorrect time value: '' Warning 1292 Truncated incorrect time value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' Warning 1292 Truncated incorrect time value: ' ---äÖüß@µ*$-- ' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as time) AS `CAST(my_varbinary_1000 AS TIME)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as time) AS `CAST(my_varbinary_1000 AS TIME)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 51 OR select_id IS NULL) order by id; @@ -3772,8 +3772,8 @@ Warning 1292 Truncated incorrect time value: ' --- Warning 1292 Truncated incorrect time value: '-1' Warning 1292 Truncated incorrect time value: '1 17:58' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as time) AS `CAST(my_binary_30 AS TIME)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as time) AS `CAST(my_binary_30 AS TIME)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 50 OR select_id IS NULL) order by id; @@ -3810,8 +3810,8 @@ Warning 1292 Truncated incorrect time value: '' Warning 1292 Truncated incorrect time value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' Warning 1292 Truncated incorrect time value: ' ---äÖüß@µ*$-- ' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as time) AS `CAST(my_varchar_1000 AS TIME)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as time) AS `CAST(my_varchar_1000 AS TIME)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 49 OR select_id IS NULL) order by id; @@ -3846,8 +3846,8 @@ Warning 1292 Truncated incorrect time value: '' Warning 1292 Truncated incorrect time value: '<--------30 characters------->' Warning 1292 Truncated incorrect time value: ' ---äÖüß@µ*$--' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as time) AS `CAST(my_char_30 AS TIME)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as time) AS `CAST(my_char_30 AS TIME)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 48 OR select_id IS NULL) order by id; @@ -3877,13 +3877,13 @@ NULL 2155 3 NULL 2000 4 NULL 2005 5 Warnings: -Warning 1292 Truncated incorrect datetime value: '1901' -Warning 1292 Truncated incorrect datetime value: '2155' -Warning 1292 Truncated incorrect datetime value: '2000' -Warning 1292 Truncated incorrect datetime value: '2005' +Warning 1292 Incorrect datetime value: '1901' +Warning 1292 Incorrect datetime value: '2155' +Warning 1292 Incorrect datetime value: '2000' +Warning 1292 Incorrect datetime value: '2005' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as datetime) AS `CAST(my_year AS DATETIME)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as datetime) AS `CAST(my_year AS DATETIME)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 47 OR select_id IS NULL) order by id; @@ -3894,10 +3894,10 @@ NULL 2155 3 NULL 2000 4 NULL 2005 5 Warnings: -Warning 1292 Truncated incorrect datetime value: '1901' -Warning 1292 Truncated incorrect datetime value: '2155' -Warning 1292 Truncated incorrect datetime value: '2000' -Warning 1292 Truncated incorrect datetime value: '2005' +Warning 1292 Incorrect datetime value: '1901' +Warning 1292 Incorrect datetime value: '2155' +Warning 1292 Incorrect datetime value: '2000' +Warning 1292 Incorrect datetime value: '2005' DROP VIEW v1; @@ -3913,11 +3913,11 @@ NULL NULL 1 0000-00-00 13:00:00 13:00:00 4 0000-00-00 10:00:00 10:00:00 5 Warnings: -Warning 1292 Truncated incorrect datetime value: '0000-00-00 838:59:59' -Warning 1292 Truncated incorrect datetime value: '0000-00-00 838:59:59' +Warning 1292 Incorrect datetime value: '0000-00-00 838:59:59' +Warning 1292 Incorrect datetime value: '0000-00-00 838:59:59' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as datetime) AS `CAST(my_time AS DATETIME)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as datetime) AS `CAST(my_time AS DATETIME)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 46 OR select_id IS NULL) order by id; @@ -3928,8 +3928,8 @@ NULL NULL 1 0000-00-00 13:00:00 13:00:00 4 0000-00-00 10:00:00 10:00:00 5 Warnings: -Warning 1292 Truncated incorrect datetime value: '0000-00-00 838:59:59' -Warning 1292 Truncated incorrect datetime value: '0000-00-00 838:59:59' +Warning 1292 Incorrect datetime value: '0000-00-00 838:59:59' +Warning 1292 Incorrect datetime value: '0000-00-00 838:59:59' DROP VIEW v1; @@ -3945,8 +3945,8 @@ CAST(my_timestamp AS DATETIME) my_timestamp id 2004-02-29 23:59:59 2004-02-29 23:59:59 4 2005-06-28 10:00:00 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as datetime) AS `CAST(my_timestamp AS DATETIME)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as datetime) AS `CAST(my_timestamp AS DATETIME)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 45 OR select_id IS NULL) order by id; @@ -3971,8 +3971,8 @@ NULL NULL 1 2004-02-29 00:00:00 2004-02-29 4 2005-06-28 00:00:00 2005-06-28 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as datetime) AS `CAST(my_date AS DATETIME)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as datetime) AS `CAST(my_date AS DATETIME)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 44 OR select_id IS NULL) order by id; @@ -3997,8 +3997,8 @@ NULL NULL 1 2004-02-29 23:59:59 2004-02-29 23:59:59 4 2005-06-28 10:00:00 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as datetime) AS `CAST(my_datetime AS DATETIME)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as datetime) AS `CAST(my_datetime AS DATETIME)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 43 OR select_id IS NULL) order by id; @@ -4024,14 +4024,14 @@ NULL 0 4 NULL -1 5 NULL 200506271758 19 Warnings: -Warning 1292 Truncated incorrect datetime value: '-1.7976931348623e+308' -Warning 1292 Truncated incorrect datetime value: '1.7976931348623e+308' -Warning 1292 Truncated incorrect datetime value: '0' -Warning 1292 Truncated incorrect datetime value: '-1' -Warning 1292 Truncated incorrect datetime value: '200506271758' +Warning 1292 Incorrect datetime value: '-1.7976931348623e+308' +Warning 1292 Incorrect datetime value: '1.7976931348623e+308' +Warning 1292 Incorrect datetime value: '0' +Warning 1292 Incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '200506271758' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as datetime) AS `CAST(my_double AS DATETIME)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as datetime) AS `CAST(my_double AS DATETIME)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 42 OR select_id IS NULL) order by id; @@ -4043,11 +4043,11 @@ NULL 0 4 NULL -1 5 NULL 200506271758 19 Warnings: -Warning 1292 Truncated incorrect datetime value: '-1.7976931348623e+308' -Warning 1292 Truncated incorrect datetime value: '1.7976931348623e+308' -Warning 1292 Truncated incorrect datetime value: '0' -Warning 1292 Truncated incorrect datetime value: '-1' -Warning 1292 Truncated incorrect datetime value: '200506271758' +Warning 1292 Incorrect datetime value: '-1.7976931348623e+308' +Warning 1292 Incorrect datetime value: '1.7976931348623e+308' +Warning 1292 Incorrect datetime value: '0' +Warning 1292 Incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '200506271758' DROP VIEW v1; @@ -4064,14 +4064,14 @@ NULL 0 4 NULL -1 5 NULL 200506271758 18 Warnings: -Warning 1292 Truncated incorrect datetime value: '-9223372036854775808' -Warning 1292 Truncated incorrect datetime value: '9223372036854775807' -Warning 1292 Truncated incorrect datetime value: '0' -Warning 1292 Truncated incorrect datetime value: '-1' -Warning 1292 Truncated incorrect datetime value: '200506271758' +Warning 1292 Incorrect datetime value: '-9223372036854775808' +Warning 1292 Incorrect datetime value: '9223372036854775807' +Warning 1292 Incorrect datetime value: '0' +Warning 1292 Incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '200506271758' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as datetime) AS `CAST(my_bigint AS DATETIME)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as datetime) AS `CAST(my_bigint AS DATETIME)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 41 OR select_id IS NULL) order by id; @@ -4083,11 +4083,11 @@ NULL 0 4 NULL -1 5 NULL 200506271758 18 Warnings: -Warning 1292 Truncated incorrect datetime value: '-9223372036854775808' -Warning 1292 Truncated incorrect datetime value: '9223372036854775807' -Warning 1292 Truncated incorrect datetime value: '0' -Warning 1292 Truncated incorrect datetime value: '-1' -Warning 1292 Truncated incorrect datetime value: '200506271758' +Warning 1292 Incorrect datetime value: '-9223372036854775808' +Warning 1292 Incorrect datetime value: '9223372036854775807' +Warning 1292 Incorrect datetime value: '0' +Warning 1292 Incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '200506271758' DROP VIEW v1; @@ -4104,13 +4104,13 @@ NULL ---äÖüß@µ*$-- 4 NULL -1 5 2005-06-27 17:58:00 2005-06-27 17:58 17 Warnings: -Warning 1292 Truncated incorrect datetime value: '' -Warning 1292 Truncated incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '' +Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' +Warning 1292 Incorrect datetime value: '-1' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as datetime) AS `CAST(my_varbinary_1000 AS DATETIME)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as datetime) AS `CAST(my_varbinary_1000 AS DATETIME)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 40 OR select_id IS NULL) order by id; @@ -4122,10 +4122,10 @@ NULL ---äÖüß@µ*$-- 4 NULL -1 5 2005-06-27 17:58:00 2005-06-27 17:58 17 Warnings: -Warning 1292 Truncated incorrect datetime value: '' -Warning 1292 Truncated incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '' +Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' +Warning 1292 Incorrect datetime value: '-1' DROP VIEW v1; @@ -4142,14 +4142,14 @@ NULL ---äÖüß@µ*$-- 4 NULL -1 5 2005-06-27 17:58:00 2005-06-27 17:58 16 Warnings: -Warning 1292 Truncated incorrect datetime value: '' -Warning 1292 Truncated incorrect datetime value: '<--------30 characters------->' -Warning 1292 Truncated incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '' +Warning 1292 Incorrect datetime value: '<--------30 characters------->' +Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' +Warning 1292 Incorrect datetime value: '-1' Warning 1292 Truncated incorrect datetime value: '2005-06-27 17:58' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as datetime) AS `CAST(my_binary_30 AS DATETIME)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as datetime) AS `CAST(my_binary_30 AS DATETIME)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 39 OR select_id IS NULL) order by id; @@ -4161,10 +4161,10 @@ NULL ---äÖüß@µ*$-- 4 NULL -1 5 2005-06-27 17:58:00 2005-06-27 17:58 16 Warnings: -Warning 1292 Truncated incorrect datetime value: '' -Warning 1292 Truncated incorrect datetime value: '<--------30 characters------->' -Warning 1292 Truncated incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '' +Warning 1292 Incorrect datetime value: '<--------30 characters------->' +Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' +Warning 1292 Incorrect datetime value: '-1' Warning 1292 Truncated incorrect datetime value: '2005-06-27 17:58' DROP VIEW v1; @@ -4182,13 +4182,13 @@ NULL ---äÖüß@µ*$-- 4 NULL -1 5 2005-06-27 17:58:00 2005-06-27 17:58 15 Warnings: -Warning 1292 Truncated incorrect datetime value: '' -Warning 1292 Truncated incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '' +Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' +Warning 1292 Incorrect datetime value: '-1' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as datetime) AS `CAST(my_varchar_1000 AS DATETIME)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as datetime) AS `CAST(my_varchar_1000 AS DATETIME)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 38 OR select_id IS NULL) order by id; @@ -4200,10 +4200,10 @@ NULL ---äÖüß@µ*$-- 4 NULL -1 5 2005-06-27 17:58:00 2005-06-27 17:58 15 Warnings: -Warning 1292 Truncated incorrect datetime value: '' -Warning 1292 Truncated incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '' +Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' +Warning 1292 Incorrect datetime value: '-1' DROP VIEW v1; @@ -4220,13 +4220,13 @@ NULL ---äÖüß@µ*$-- 4 NULL -1 5 2005-06-27 17:58:00 2005-06-27 17:58 14 Warnings: -Warning 1292 Truncated incorrect datetime value: '' -Warning 1292 Truncated incorrect datetime value: '<--------30 characters------->' -Warning 1292 Truncated incorrect datetime value: ' ---äÖüß@µ*$--' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '' +Warning 1292 Incorrect datetime value: '<--------30 characters------->' +Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$--' +Warning 1292 Incorrect datetime value: '-1' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as datetime) AS `CAST(my_char_30 AS DATETIME)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as datetime) AS `CAST(my_char_30 AS DATETIME)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 37 OR select_id IS NULL) order by id; @@ -4238,10 +4238,10 @@ NULL ---äÖüß@µ*$-- 4 NULL -1 5 2005-06-27 17:58:00 2005-06-27 17:58 14 Warnings: -Warning 1292 Truncated incorrect datetime value: '' -Warning 1292 Truncated incorrect datetime value: '<--------30 characters------->' -Warning 1292 Truncated incorrect datetime value: ' ---äÖüß@µ*$--' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '' +Warning 1292 Incorrect datetime value: '<--------30 characters------->' +Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$--' +Warning 1292 Incorrect datetime value: '-1' DROP VIEW v1; @@ -4257,13 +4257,13 @@ NULL 2155 3 NULL 2000 4 NULL 2005 5 Warnings: -Warning 1292 Truncated incorrect datetime value: '1901' -Warning 1292 Truncated incorrect datetime value: '2155' -Warning 1292 Truncated incorrect datetime value: '2000' -Warning 1292 Truncated incorrect datetime value: '2005' +Warning 1292 Incorrect datetime value: '1901' +Warning 1292 Incorrect datetime value: '2155' +Warning 1292 Incorrect datetime value: '2000' +Warning 1292 Incorrect datetime value: '2005' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as date) AS `CAST(my_year AS DATE)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as date) AS `CAST(my_year AS DATE)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 36 OR select_id IS NULL) order by id; @@ -4274,10 +4274,10 @@ NULL 2155 3 NULL 2000 4 NULL 2005 5 Warnings: -Warning 1292 Truncated incorrect datetime value: '1901' -Warning 1292 Truncated incorrect datetime value: '2155' -Warning 1292 Truncated incorrect datetime value: '2000' -Warning 1292 Truncated incorrect datetime value: '2005' +Warning 1292 Incorrect datetime value: '1901' +Warning 1292 Incorrect datetime value: '2155' +Warning 1292 Incorrect datetime value: '2000' +Warning 1292 Incorrect datetime value: '2005' DROP VIEW v1; @@ -4293,8 +4293,8 @@ NULL NULL 1 0000-00-00 13:00:00 4 0000-00-00 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as date) AS `CAST(my_time AS DATE)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as date) AS `CAST(my_time AS DATE)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 35 OR select_id IS NULL) order by id; @@ -4319,8 +4319,8 @@ CAST(my_timestamp AS DATE) my_timestamp id 2004-02-29 2004-02-29 23:59:59 4 2005-06-28 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as date) AS `CAST(my_timestamp AS DATE)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as date) AS `CAST(my_timestamp AS DATE)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 34 OR select_id IS NULL) order by id; @@ -4345,8 +4345,8 @@ NULL NULL 1 2004-02-29 2004-02-29 4 2005-06-28 2005-06-28 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as date) AS `CAST(my_date AS DATE)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as date) AS `CAST(my_date AS DATE)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 33 OR select_id IS NULL) order by id; @@ -4371,8 +4371,8 @@ NULL NULL 1 2004-02-29 2004-02-29 23:59:59 4 2005-06-28 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as date) AS `CAST(my_datetime AS DATE)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as date) AS `CAST(my_datetime AS DATE)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 32 OR select_id IS NULL) order by id; @@ -4398,13 +4398,13 @@ NULL 0 4 NULL -1 5 2005-06-27 20050627 13 Warnings: -Warning 1292 Truncated incorrect datetime value: '-1.7976931348623e+308' -Warning 1292 Truncated incorrect datetime value: '1.7976931348623e+308' -Warning 1292 Truncated incorrect datetime value: '0' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '-1.7976931348623e+308' +Warning 1292 Incorrect datetime value: '1.7976931348623e+308' +Warning 1292 Incorrect datetime value: '0' +Warning 1292 Incorrect datetime value: '-1' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as date) AS `CAST(my_double AS DATE)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as date) AS `CAST(my_double AS DATE)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 31 OR select_id IS NULL) order by id; @@ -4416,10 +4416,10 @@ NULL 0 4 NULL -1 5 2005-06-27 20050627 13 Warnings: -Warning 1292 Truncated incorrect datetime value: '-1.7976931348623e+308' -Warning 1292 Truncated incorrect datetime value: '1.7976931348623e+308' -Warning 1292 Truncated incorrect datetime value: '0' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '-1.7976931348623e+308' +Warning 1292 Incorrect datetime value: '1.7976931348623e+308' +Warning 1292 Incorrect datetime value: '0' +Warning 1292 Incorrect datetime value: '-1' DROP VIEW v1; @@ -4436,13 +4436,13 @@ NULL 0 4 NULL -1 5 2005-06-27 20050627 12 Warnings: -Warning 1292 Truncated incorrect datetime value: '-9223372036854775808' -Warning 1292 Truncated incorrect datetime value: '9223372036854775807' -Warning 1292 Truncated incorrect datetime value: '0' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '-9223372036854775808' +Warning 1292 Incorrect datetime value: '9223372036854775807' +Warning 1292 Incorrect datetime value: '0' +Warning 1292 Incorrect datetime value: '-1' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as date) AS `CAST(my_bigint AS DATE)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as date) AS `CAST(my_bigint AS DATE)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 30 OR select_id IS NULL) order by id; @@ -4454,10 +4454,10 @@ NULL 0 4 NULL -1 5 2005-06-27 20050627 12 Warnings: -Warning 1292 Truncated incorrect datetime value: '-9223372036854775808' -Warning 1292 Truncated incorrect datetime value: '9223372036854775807' -Warning 1292 Truncated incorrect datetime value: '0' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '-9223372036854775808' +Warning 1292 Incorrect datetime value: '9223372036854775807' +Warning 1292 Incorrect datetime value: '0' +Warning 1292 Incorrect datetime value: '-1' DROP VIEW v1; @@ -4474,13 +4474,13 @@ NULL ---äÖüß@µ*$-- 4 NULL -1 5 2005-06-27 2005-06-27 11 Warnings: -Warning 1292 Truncated incorrect datetime value: '' -Warning 1292 Truncated incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '' +Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' +Warning 1292 Incorrect datetime value: '-1' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as date) AS `CAST(my_varbinary_1000 AS DATE)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as date) AS `CAST(my_varbinary_1000 AS DATE)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 29 OR select_id IS NULL) order by id; @@ -4492,10 +4492,10 @@ NULL ---äÖüß@µ*$-- 4 NULL -1 5 2005-06-27 2005-06-27 11 Warnings: -Warning 1292 Truncated incorrect datetime value: '' -Warning 1292 Truncated incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '' +Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' +Warning 1292 Incorrect datetime value: '-1' DROP VIEW v1; @@ -4512,14 +4512,14 @@ NULL ---äÖüß@µ*$-- 4 NULL -1 5 2005-06-27 2005-06-27 10 Warnings: -Warning 1292 Truncated incorrect datetime value: '' -Warning 1292 Truncated incorrect datetime value: '<--------30 characters------->' -Warning 1292 Truncated incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '' +Warning 1292 Incorrect datetime value: '<--------30 characters------->' +Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' +Warning 1292 Incorrect datetime value: '-1' Warning 1292 Truncated incorrect date value: '2005-06-27' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as date) AS `CAST(my_binary_30 AS DATE)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as date) AS `CAST(my_binary_30 AS DATE)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 28 OR select_id IS NULL) order by id; @@ -4531,10 +4531,10 @@ NULL ---äÖüß@µ*$-- 4 NULL -1 5 2005-06-27 2005-06-27 10 Warnings: -Warning 1292 Truncated incorrect datetime value: '' -Warning 1292 Truncated incorrect datetime value: '<--------30 characters------->' -Warning 1292 Truncated incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '' +Warning 1292 Incorrect datetime value: '<--------30 characters------->' +Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' +Warning 1292 Incorrect datetime value: '-1' Warning 1292 Truncated incorrect date value: '2005-06-27' DROP VIEW v1; @@ -4552,13 +4552,13 @@ NULL ---äÖüß@µ*$-- 4 NULL -1 5 2005-06-27 2005-06-27 9 Warnings: -Warning 1292 Truncated incorrect datetime value: '' -Warning 1292 Truncated incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '' +Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' +Warning 1292 Incorrect datetime value: '-1' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as date) AS `CAST(my_varchar_1000 AS DATE)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as date) AS `CAST(my_varchar_1000 AS DATE)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 27 OR select_id IS NULL) order by id; @@ -4570,10 +4570,10 @@ NULL ---äÖüß@µ*$-- 4 NULL -1 5 2005-06-27 2005-06-27 9 Warnings: -Warning 1292 Truncated incorrect datetime value: '' -Warning 1292 Truncated incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '' +Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' +Warning 1292 Incorrect datetime value: '-1' DROP VIEW v1; @@ -4590,13 +4590,13 @@ NULL ---äÖüß@µ*$-- 4 NULL -1 5 2005-06-27 2005-06-27 8 Warnings: -Warning 1292 Truncated incorrect datetime value: '' -Warning 1292 Truncated incorrect datetime value: '<--------30 characters------->' -Warning 1292 Truncated incorrect datetime value: ' ---äÖüß@µ*$--' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '' +Warning 1292 Incorrect datetime value: '<--------30 characters------->' +Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$--' +Warning 1292 Incorrect datetime value: '-1' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as date) AS `CAST(my_char_30 AS DATE)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as date) AS `CAST(my_char_30 AS DATE)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 26 OR select_id IS NULL) order by id; @@ -4608,10 +4608,10 @@ NULL ---äÖüß@µ*$-- 4 NULL -1 5 2005-06-27 2005-06-27 8 Warnings: -Warning 1292 Truncated incorrect datetime value: '' -Warning 1292 Truncated incorrect datetime value: '<--------30 characters------->' -Warning 1292 Truncated incorrect datetime value: ' ---äÖüß@µ*$--' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '' +Warning 1292 Incorrect datetime value: '<--------30 characters------->' +Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$--' +Warning 1292 Incorrect datetime value: '-1' DROP VIEW v1; @@ -4627,8 +4627,8 @@ NULL NULL 1 2000 2000 4 2005 2005 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as char charset latin1) AS `CAST(my_year AS CHAR)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as char charset latin1) AS `CAST(my_year AS CHAR)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 25 OR select_id IS NULL) order by id; @@ -4653,8 +4653,8 @@ NULL NULL 1 13:00:00 13:00:00 4 10:00:00 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as char charset latin1) AS `CAST(my_time AS CHAR)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as char charset latin1) AS `CAST(my_time AS CHAR)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 24 OR select_id IS NULL) order by id; @@ -4679,8 +4679,8 @@ CAST(my_timestamp AS CHAR) my_timestamp id 2004-02-29 23:59:59 2004-02-29 23:59:59 4 2005-06-28 10:00:00 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as char charset latin1) AS `CAST(my_timestamp AS CHAR)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as char charset latin1) AS `CAST(my_timestamp AS CHAR)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 23 OR select_id IS NULL) order by id; @@ -4705,8 +4705,8 @@ NULL NULL 1 2004-02-29 2004-02-29 4 2005-06-28 2005-06-28 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as char charset latin1) AS `CAST(my_date AS CHAR)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as char charset latin1) AS `CAST(my_date AS CHAR)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 22 OR select_id IS NULL) order by id; @@ -4731,8 +4731,8 @@ NULL NULL 1 2004-02-29 23:59:59 2004-02-29 23:59:59 4 2005-06-28 10:00:00 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as char charset latin1) AS `CAST(my_datetime AS CHAR)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as char charset latin1) AS `CAST(my_datetime AS CHAR)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 21 OR select_id IS NULL) order by id; @@ -4757,8 +4757,8 @@ NULL NULL 1 0 0 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as char charset latin1) AS `CAST(my_double AS CHAR)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as char charset latin1) AS `CAST(my_double AS CHAR)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 20 OR select_id IS NULL) order by id; @@ -4783,8 +4783,8 @@ NULL NULL 1 0.000000000000000000000000000000 0.000000000000000000000000000000 4 -1.000000000000000000000000000000 -1.000000000000000000000000000000 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as char charset latin1) AS `CAST(my_decimal AS CHAR)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as char charset latin1) AS `CAST(my_decimal AS CHAR)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 19 OR select_id IS NULL) order by id; @@ -4809,8 +4809,8 @@ NULL NULL 1 0 0 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as char charset latin1) AS `CAST(my_bigint AS CHAR)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as char charset latin1) AS `CAST(my_bigint AS CHAR)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 18 OR select_id IS NULL) order by id; @@ -4835,8 +4835,8 @@ NULL NULL 1 ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as char charset latin1) AS `CAST(my_varbinary_1000 AS CHAR)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as char charset latin1) AS `CAST(my_varbinary_1000 AS CHAR)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 17 OR select_id IS NULL) order by id; @@ -4861,8 +4861,8 @@ NULL NULL 1 ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as char charset latin1) AS `CAST(my_binary_30 AS CHAR)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as char charset latin1) AS `CAST(my_binary_30 AS CHAR)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 16 OR select_id IS NULL) order by id; @@ -4887,8 +4887,8 @@ NULL NULL 1 ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as char charset latin1) AS `CAST(my_varchar_1000 AS CHAR)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as char charset latin1) AS `CAST(my_varchar_1000 AS CHAR)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 15 OR select_id IS NULL) order by id; @@ -4913,8 +4913,8 @@ NULL NULL 1 ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as char charset latin1) AS `CAST(my_char_30 AS CHAR)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as char charset latin1) AS `CAST(my_char_30 AS CHAR)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 14 OR select_id IS NULL) order by id; @@ -4939,8 +4939,8 @@ NULL NULL 1 2000 2000 4 2005 2005 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as char charset binary) AS `CAST(my_year AS BINARY)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as char charset binary) AS `CAST(my_year AS BINARY)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 13 OR select_id IS NULL) order by id; @@ -4965,8 +4965,8 @@ NULL NULL 1 13:00:00 13:00:00 4 10:00:00 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as char charset binary) AS `CAST(my_time AS BINARY)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as char charset binary) AS `CAST(my_time AS BINARY)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 12 OR select_id IS NULL) order by id; @@ -4991,8 +4991,8 @@ CAST(my_timestamp AS BINARY) my_timestamp id 2004-02-29 23:59:59 2004-02-29 23:59:59 4 2005-06-28 10:00:00 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as char charset binary) AS `CAST(my_timestamp AS BINARY)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as char charset binary) AS `CAST(my_timestamp AS BINARY)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 11 OR select_id IS NULL) order by id; @@ -5017,8 +5017,8 @@ NULL NULL 1 2004-02-29 2004-02-29 4 2005-06-28 2005-06-28 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as char charset binary) AS `CAST(my_date AS BINARY)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as char charset binary) AS `CAST(my_date AS BINARY)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 10 OR select_id IS NULL) order by id; @@ -5043,8 +5043,8 @@ NULL NULL 1 2004-02-29 23:59:59 2004-02-29 23:59:59 4 2005-06-28 10:00:00 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as char charset binary) AS `CAST(my_datetime AS BINARY)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as char charset binary) AS `CAST(my_datetime AS BINARY)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 9 OR select_id IS NULL) order by id; @@ -5069,8 +5069,8 @@ NULL NULL 1 0 0 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as char charset binary) AS `CAST(my_double AS BINARY)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as char charset binary) AS `CAST(my_double AS BINARY)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 8 OR select_id IS NULL) order by id; @@ -5095,8 +5095,8 @@ NULL NULL 1 0.000000000000000000000000000000 0.000000000000000000000000000000 4 -1.000000000000000000000000000000 -1.000000000000000000000000000000 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as char charset binary) AS `CAST(my_decimal AS BINARY)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as char charset binary) AS `CAST(my_decimal AS BINARY)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 7 OR select_id IS NULL) order by id; @@ -5121,8 +5121,8 @@ NULL NULL 1 0 0 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as char charset binary) AS `CAST(my_bigint AS BINARY)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as char charset binary) AS `CAST(my_bigint AS BINARY)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 6 OR select_id IS NULL) order by id; @@ -5147,8 +5147,8 @@ NULL NULL 1 ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as char charset binary) AS `CAST(my_varbinary_1000 AS BINARY)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as char charset binary) AS `CAST(my_varbinary_1000 AS BINARY)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 5 OR select_id IS NULL) order by id; @@ -5173,8 +5173,8 @@ NULL NULL 1 ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as char charset binary) AS `CAST(my_binary_30 AS BINARY)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as char charset binary) AS `CAST(my_binary_30 AS BINARY)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 4 OR select_id IS NULL) order by id; @@ -5199,8 +5199,8 @@ NULL NULL 1 ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as char charset binary) AS `CAST(my_varchar_1000 AS BINARY)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as char charset binary) AS `CAST(my_varchar_1000 AS BINARY)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 3 OR select_id IS NULL) order by id; @@ -5225,8 +5225,8 @@ NULL NULL 1 ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as char charset binary) AS `CAST(my_char_30 AS BINARY)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as char charset binary) AS `CAST(my_char_30 AS BINARY)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 2 OR select_id IS NULL) order by id; @@ -5251,8 +5251,8 @@ NULL -1 5 2 4 6 NULL -25 7 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select sqrt(`t1_values`.`my_bigint`) AS `sqrt(my_bigint)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select sqrt(`t1_values`.`my_bigint`) AS `sqrt(my_bigint)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 1 OR select_id IS NULL) order by id; diff --git a/mysql-test/suite/funcs_1/r/innodb_storedproc.result b/mysql-test/suite/funcs_1/r/innodb_storedproc.result index 1d75cf49bb7..3fd7020c114 100644 --- a/mysql-test/suite/funcs_1/r/innodb_storedproc.result +++ b/mysql-test/suite/funcs_1/r/innodb_storedproc.result @@ -14310,6 +14310,8 @@ ERROR 42000: Bad SQLSTATE: '2005-03-03' Testcase 4.2.43: -------------------------------------------------------------------------------- DROP PROCEDURE IF EXISTS sp1; +expect failure, SQLSTATE 00000 is not an acceptable value +for an SP's handler CREATE PROCEDURE sp1() BEGIN declare cond1 condition for sqlstate '00000'; @@ -14317,10 +14319,11 @@ declare continue handler for cond1 set @var2 = 1; set @x=1; SELECT @var2; END// +ERROR 42000: Bad SQLSTATE: '00000' +ensure SP doesn't exist CALL sp1(); -@var2 -NULL -DROP PROCEDURE sp1; +ERROR 42000: PROCEDURE db_storedproc.sp1 does not exist +DROP PROCEDURE IF EXISTS sp1; Testcase 4.2.45: -------------------------------------------------------------------------------- @@ -14389,16 +14392,19 @@ ERROR 42000: Bad SQLSTATE: '42s0200test' Testcase 4.2.48: -------------------------------------------------------------------------------- DROP PROCEDURE IF EXISTS sp1; +This creation should fail, SQLSTATE 00000 is unacceptable CREATE PROCEDURE sp1() BEGIN declare continue handler for sqlstate '00000' set @var2 = 1; set @x=1; SELECT @var2; END// +ERROR 42000: Bad SQLSTATE: '00000' +Verify SP wasn't created CALL sp1(); -@var2 -NULL -DROP PROCEDURE sp1; +ERROR 42000: PROCEDURE db_storedproc.sp1 does not exist +DROP PROCEDURE IF EXISTSsp1; +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 'EXISTSsp1' at line 1 Testcase 4.2.52: -------------------------------------------------------------------------------- @@ -23502,6 +23508,7 @@ set x1 = 2; END; SELECT @x, x1; END// +ERROR 42000: Bad SQLSTATE: '00000' DROP PROCEDURE IF EXISTS h1; Testcase 4.11.40: @@ -23539,9 +23546,9 @@ set x1 = 2; END; SELECT @x, x1; END// +ERROR 42000: Bad SQLSTATE: '00000' CALL h1(); -@x x1 -0 2 +ERROR 42000: PROCEDURE db_storedproc.h1 does not exist DROP PROCEDURE IF EXISTS h1; * Testcase 3.1.2.53 (4.11.42): diff --git a/mysql-test/suite/funcs_1/r/innodb_storedproc_02.result b/mysql-test/suite/funcs_1/r/innodb_storedproc_02.result index 7458e55007d..04fb7d29385 100644 --- a/mysql-test/suite/funcs_1/r/innodb_storedproc_02.result +++ b/mysql-test/suite/funcs_1/r/innodb_storedproc_02.result @@ -583,6 +583,7 @@ END// CALL h1(); x1 x2 x3 x4 x5 x6 1 1 1 1 1 1 +This will fail, SQLSTATE 00000 is not allowed CREATE PROCEDURE sp1() begin1_label:BEGIN declare exit handler for sqlstate '00000' set @var1 = 5; @@ -594,14 +595,13 @@ SELECT @var3, @var4; END begin2_label; SELECT @var1, @var2; END begin1_label// +ERROR 42000: Bad SQLSTATE: '00000' +Verify SP wasn't created CALL sp1(); -@var3 @var4 -NULL 8 -@var1 @var2 -NULL 6 +ERROR 42000: PROCEDURE db_storedproc.sp1 does not exist DROP PROCEDURE p1; DROP PROCEDURE h1; -DROP PROCEDURE sp1; +DROP PROCEDURE IF EXISTS sp1; DROP TABLE res_t1; Testcase 3.1.2.50: diff --git a/mysql-test/suite/funcs_1/r/memory_func_view.result b/mysql-test/suite/funcs_1/r/memory_func_view.result index c2689a36801..96e4f23976b 100644 --- a/mysql-test/suite/funcs_1/r/memory_func_view.result +++ b/mysql-test/suite/funcs_1/r/memory_func_view.result @@ -289,8 +289,8 @@ CREATE VIEW v1 AS SELECT my_char_30, id FROM t1_values; SELECT my_char_30, id FROM t1_values WHERE select_id = 193 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 193 OR select_id IS NULL) order by id; @@ -307,8 +307,8 @@ A<--------30 characters-------> <--------30 characters-------> 3 A ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 A-1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select concat(_latin1'A',`t1_values`.`my_char_30`) AS `CONCAT('A',my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select concat('A',`t1_values`.`my_char_30`) AS `CONCAT('A',my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 192 OR select_id IS NULL) order by id; @@ -327,8 +327,8 @@ SELECT LTRIM(my_varbinary_1000), my_varbinary_1000, id FROM t1_values WHERE select_id = 191 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ltrim(`t1_values`.`my_varbinary_1000`) AS `LTRIM(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ltrim(`t1_values`.`my_varbinary_1000`) AS `LTRIM(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 191 OR select_id IS NULL) order by id; @@ -341,8 +341,8 @@ SELECT LTRIM(my_binary_30), my_binary_30, id FROM t1_values WHERE select_id = 190 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ltrim(`t1_values`.`my_binary_30`) AS `LTRIM(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ltrim(`t1_values`.`my_binary_30`) AS `LTRIM(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 190 OR select_id IS NULL) order by id; @@ -355,8 +355,8 @@ SELECT LTRIM(my_varchar_1000), my_varchar_1000, id FROM t1_values WHERE select_id = 189 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ltrim(`t1_values`.`my_varchar_1000`) AS `LTRIM(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ltrim(`t1_values`.`my_varchar_1000`) AS `LTRIM(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 189 OR select_id IS NULL) order by id; @@ -369,8 +369,8 @@ SELECT LTRIM(my_char_30), my_char_30, id FROM t1_values WHERE select_id = 188 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ltrim(`t1_values`.`my_char_30`) AS `LTRIM(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ltrim(`t1_values`.`my_char_30`) AS `LTRIM(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 188 OR select_id IS NULL) order by id; @@ -383,8 +383,8 @@ SELECT LOWER(my_varbinary_1000), my_varbinary_1000, id FROM t1_values WHERE select_id = 187 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_varbinary_1000`) AS `LOWER(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_varbinary_1000`) AS `LOWER(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 187 OR select_id IS NULL) order by id; @@ -397,8 +397,8 @@ SELECT LOWER(my_binary_30), my_binary_30, id FROM t1_values WHERE select_id = 186 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_binary_30`) AS `LOWER(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_binary_30`) AS `LOWER(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 186 OR select_id IS NULL) order by id; @@ -411,8 +411,8 @@ SELECT LOWER(my_varchar_1000), my_varchar_1000, id FROM t1_values WHERE select_id = 185 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_varchar_1000`) AS `LOWER(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_varchar_1000`) AS `LOWER(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 185 OR select_id IS NULL) order by id; @@ -425,8 +425,8 @@ SELECT LOWER(my_char_30), my_char_30, id FROM t1_values WHERE select_id = 184 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_char_30`) AS `LOWER(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_char_30`) AS `LOWER(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 184 OR select_id IS NULL) order by id; @@ -439,8 +439,8 @@ SELECT LOCATE('-', ' - -ABC', my_decimal), my_decimal, id FROM t1_values WHERE select_id = 183 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'-',_latin1' - -ABC',`t1_values`.`my_decimal`) AS `LOCATE('-', ' - -ABC', my_decimal)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',' - -ABC',`t1_values`.`my_decimal`) AS `LOCATE('-', ' - -ABC', my_decimal)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 183 OR select_id IS NULL) order by id; @@ -453,8 +453,8 @@ SELECT LOCATE('-', ' - -ABC', my_double), my_double, id FROM t1_values WHERE select_id = 182 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'-',_latin1' - -ABC',`t1_values`.`my_double`) AS `LOCATE('-', ' - -ABC', my_double)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',' - -ABC',`t1_values`.`my_double`) AS `LOCATE('-', ' - -ABC', my_double)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 182 OR select_id IS NULL) order by id; @@ -467,8 +467,8 @@ SELECT LOCATE('-', ' - -ABC', my_bigint), my_bigint, id FROM t1_values WHERE select_id = 181 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'-',_latin1' - -ABC',`t1_values`.`my_bigint`) AS `LOCATE('-', ' - -ABC', my_bigint)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',' - -ABC',`t1_values`.`my_bigint`) AS `LOCATE('-', ' - -ABC', my_bigint)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 181 OR select_id IS NULL) order by id; @@ -481,8 +481,8 @@ SELECT LOCATE('-', my_varbinary_1000, 3), my_varbinary_1000, id FROM t1_values WHERE select_id = 180 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'-',`t1_values`.`my_varbinary_1000`,3) AS `LOCATE('-', my_varbinary_1000, 3)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',`t1_values`.`my_varbinary_1000`,3) AS `LOCATE('-', my_varbinary_1000, 3)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 180 OR select_id IS NULL) order by id; @@ -495,8 +495,8 @@ SELECT LOCATE('-', my_binary_30, 3), my_binary_30, id FROM t1_values WHERE select_id = 179 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'-',`t1_values`.`my_binary_30`,3) AS `LOCATE('-', my_binary_30, 3)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',`t1_values`.`my_binary_30`,3) AS `LOCATE('-', my_binary_30, 3)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 179 OR select_id IS NULL) order by id; @@ -509,8 +509,8 @@ SELECT LOCATE('-', my_varchar_1000, 3), my_varchar_1000, id FROM t1_values WHERE select_id = 178 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'-',`t1_values`.`my_varchar_1000`,3) AS `LOCATE('-', my_varchar_1000, 3)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',`t1_values`.`my_varchar_1000`,3) AS `LOCATE('-', my_varchar_1000, 3)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 178 OR select_id IS NULL) order by id; @@ -523,8 +523,8 @@ SELECT LOCATE('-', my_char_30, 3), my_char_30, id FROM t1_values WHERE select_id = 177 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'-',`t1_values`.`my_char_30`,3) AS `LOCATE('-', my_char_30, 3)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',`t1_values`.`my_char_30`,3) AS `LOCATE('-', my_char_30, 3)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 177 OR select_id IS NULL) order by id; @@ -537,8 +537,8 @@ SELECT LOCATE(my_varbinary_1000, my_binary_30 ), my_varbinary_1000, my_binary_30 id FROM t1_values WHERE select_id = 176 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_binary_30`) AS `LOCATE(my_varbinary_1000, my_binary_30 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`my_binary_30` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_binary_30`) AS `LOCATE(my_varbinary_1000, my_binary_30 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`my_binary_30` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 176 OR select_id IS NULL) order by id; @@ -551,8 +551,8 @@ SELECT LOCATE(my_varbinary_1000, my_varchar_1000 ), my_varbinary_1000, my_varchar_1000 id FROM t1_values WHERE select_id = 175 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_varbinary_1000, my_varchar_1000 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`my_varchar_1000` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_varbinary_1000, my_varchar_1000 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`my_varchar_1000` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 175 OR select_id IS NULL) order by id; @@ -565,8 +565,8 @@ SELECT LOCATE(my_varbinary_1000, my_char_30 ), my_varbinary_1000, my_char_30 id FROM t1_values WHERE select_id = 174 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_char_30`) AS `LOCATE(my_varbinary_1000, my_char_30 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`my_char_30` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_char_30`) AS `LOCATE(my_varbinary_1000, my_char_30 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`my_char_30` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 174 OR select_id IS NULL) order by id; @@ -579,8 +579,8 @@ SELECT LOCATE(my_varbinary_1000, my_varbinary_1000 ), my_varbinary_1000, id FROM t1_values WHERE select_id = 173 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_varbinary_1000, my_varbinary_1000 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_varbinary_1000, my_varbinary_1000 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 173 OR select_id IS NULL) order by id; @@ -593,8 +593,8 @@ SELECT LOCATE(my_binary_30, my_varbinary_1000 ), my_binary_30, my_varbinary_1000 id FROM t1_values WHERE select_id = 172 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_binary_30`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_binary_30, my_varbinary_1000 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`my_varbinary_1000` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_binary_30`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_binary_30, my_varbinary_1000 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`my_varbinary_1000` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 172 OR select_id IS NULL) order by id; @@ -607,8 +607,8 @@ SELECT LOCATE(my_binary_30, my_varchar_1000 ), my_binary_30, my_varchar_1000 id FROM t1_values WHERE select_id = 171 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_binary_30`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_binary_30, my_varchar_1000 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`my_varchar_1000` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_binary_30`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_binary_30, my_varchar_1000 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`my_varchar_1000` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 171 OR select_id IS NULL) order by id; @@ -621,8 +621,8 @@ SELECT LOCATE(my_binary_30, my_char_30 ), my_binary_30, my_char_30 id FROM t1_values WHERE select_id = 170 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_binary_30`,`t1_values`.`my_char_30`) AS `LOCATE(my_binary_30, my_char_30 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`my_char_30` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_binary_30`,`t1_values`.`my_char_30`) AS `LOCATE(my_binary_30, my_char_30 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`my_char_30` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 170 OR select_id IS NULL) order by id; @@ -635,8 +635,8 @@ SELECT LOCATE(my_binary_30, my_binary_30 ), my_binary_30, id FROM t1_values WHERE select_id = 169 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_binary_30`,`t1_values`.`my_binary_30`) AS `LOCATE(my_binary_30, my_binary_30 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_binary_30`,`t1_values`.`my_binary_30`) AS `LOCATE(my_binary_30, my_binary_30 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 169 OR select_id IS NULL) order by id; @@ -649,8 +649,8 @@ SELECT LOCATE(my_varchar_1000, my_varbinary_1000 ), my_varchar_1000, my_varbinary_1000 id FROM t1_values WHERE select_id = 168 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_varchar_1000, my_varbinary_1000 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`my_varbinary_1000` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_varchar_1000, my_varbinary_1000 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`my_varbinary_1000` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 168 OR select_id IS NULL) order by id; @@ -663,8 +663,8 @@ SELECT LOCATE(my_varchar_1000, my_binary_30 ), my_varchar_1000, my_binary_30 id FROM t1_values WHERE select_id = 167 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_binary_30`) AS `LOCATE(my_varchar_1000, my_binary_30 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`my_binary_30` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_binary_30`) AS `LOCATE(my_varchar_1000, my_binary_30 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`my_binary_30` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 167 OR select_id IS NULL) order by id; @@ -677,8 +677,8 @@ SELECT LOCATE(my_varchar_1000, my_char_30 ), my_varchar_1000, my_char_30 id FROM t1_values WHERE select_id = 166 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_char_30`) AS `LOCATE(my_varchar_1000, my_char_30 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`my_char_30` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_char_30`) AS `LOCATE(my_varchar_1000, my_char_30 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`my_char_30` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 166 OR select_id IS NULL) order by id; @@ -691,8 +691,8 @@ SELECT LOCATE(my_varchar_1000, my_varchar_1000 ), my_varchar_1000, id FROM t1_values WHERE select_id = 165 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_varchar_1000, my_varchar_1000 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_varchar_1000, my_varchar_1000 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 165 OR select_id IS NULL) order by id; @@ -705,8 +705,8 @@ SELECT LOCATE(my_char_30, my_varbinary_1000 ), my_char_30, my_varbinary_1000 id FROM t1_values WHERE select_id = 164 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_char_30`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_char_30, my_varbinary_1000 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`my_varbinary_1000` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_char_30`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_char_30, my_varbinary_1000 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`my_varbinary_1000` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 164 OR select_id IS NULL) order by id; @@ -719,8 +719,8 @@ SELECT LOCATE(my_char_30, my_binary_30 ), my_char_30, my_binary_30 id FROM t1_values WHERE select_id = 163 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_char_30`,`t1_values`.`my_binary_30`) AS `LOCATE(my_char_30, my_binary_30 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`my_binary_30` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_char_30`,`t1_values`.`my_binary_30`) AS `LOCATE(my_char_30, my_binary_30 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`my_binary_30` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 163 OR select_id IS NULL) order by id; @@ -733,8 +733,8 @@ SELECT LOCATE(my_char_30, my_varchar_1000 ), my_char_30, my_varchar_1000 id FROM t1_values WHERE select_id = 162 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_char_30`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_char_30, my_varchar_1000 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`my_varchar_1000` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_char_30`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_char_30, my_varchar_1000 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`my_varchar_1000` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 162 OR select_id IS NULL) order by id; @@ -747,8 +747,8 @@ SELECT LOCATE(my_char_30, my_char_30 ), my_char_30, id FROM t1_values WHERE select_id = 161 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_char_30`,`t1_values`.`my_char_30`) AS `LOCATE(my_char_30, my_char_30 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_char_30`,`t1_values`.`my_char_30`) AS `LOCATE(my_char_30, my_char_30 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 161 OR select_id IS NULL) order by id; @@ -761,8 +761,8 @@ SELECT LOCATE('char', my_varbinary_1000), my_varbinary_1000, id FROM t1_values WHERE select_id = 160 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'char',`t1_values`.`my_varbinary_1000`) AS `LOCATE('char', my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('char',`t1_values`.`my_varbinary_1000`) AS `LOCATE('char', my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 160 OR select_id IS NULL) order by id; @@ -775,8 +775,8 @@ SELECT LOCATE('char', my_binary_30), my_binary_30, id FROM t1_values WHERE select_id = 159 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'char',`t1_values`.`my_binary_30`) AS `LOCATE('char', my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('char',`t1_values`.`my_binary_30`) AS `LOCATE('char', my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 159 OR select_id IS NULL) order by id; @@ -789,8 +789,8 @@ SELECT LOCATE('char', my_varchar_1000), my_varchar_1000, id FROM t1_values WHERE select_id = 158 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'char',`t1_values`.`my_varchar_1000`) AS `LOCATE('char', my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('char',`t1_values`.`my_varchar_1000`) AS `LOCATE('char', my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 158 OR select_id IS NULL) order by id; @@ -803,8 +803,8 @@ SELECT LOCATE('char', my_char_30), my_char_30, id FROM t1_values WHERE select_id = 157 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'char',`t1_values`.`my_char_30`) AS `LOCATE('char', my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('char',`t1_values`.`my_char_30`) AS `LOCATE('char', my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 157 OR select_id IS NULL) order by id; @@ -830,8 +830,8 @@ Here is content from load_file Here is content from load_file 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select load_file(_latin1'/std_data_ln/funcs_1/load_file.txt') AS `my_col`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select load_file('/std_data_ln/funcs_1/load_file.txt') AS `my_col`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 156 OR select_id IS NULL) order by id; @@ -855,8 +855,8 @@ SELECT LENGTH(my_varbinary_1000), my_varbinary_1000, id FROM t1_values WHERE select_id = 155 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select length(`t1_values`.`my_varbinary_1000`) AS `LENGTH(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select length(`t1_values`.`my_varbinary_1000`) AS `LENGTH(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 155 OR select_id IS NULL) order by id; @@ -869,8 +869,8 @@ SELECT LENGTH(my_binary_30), my_binary_30, id FROM t1_values WHERE select_id = 154 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select length(`t1_values`.`my_binary_30`) AS `LENGTH(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select length(`t1_values`.`my_binary_30`) AS `LENGTH(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 154 OR select_id IS NULL) order by id; @@ -883,8 +883,8 @@ SELECT LENGTH(my_varchar_1000), my_varchar_1000, id FROM t1_values WHERE select_id = 153 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select length(`t1_values`.`my_varchar_1000`) AS `LENGTH(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select length(`t1_values`.`my_varchar_1000`) AS `LENGTH(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 153 OR select_id IS NULL) order by id; @@ -897,8 +897,8 @@ SELECT LENGTH(my_char_30), my_char_30, id FROM t1_values WHERE select_id = 152 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select length(`t1_values`.`my_char_30`) AS `LENGTH(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select length(`t1_values`.`my_char_30`) AS `LENGTH(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 152 OR select_id IS NULL) order by id; @@ -918,8 +918,8 @@ Warnings: Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e+308' Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e+308' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(_latin1'AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_double`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_double)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_double`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_double)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 151 OR select_id IS NULL) order by id; @@ -948,8 +948,8 @@ Warnings: Error 1292 Truncated incorrect DECIMAL value: '' Error 1292 Truncated incorrect DECIMAL value: '' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(_latin1'AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_decimal`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_decimal`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 150 OR select_id IS NULL) order by id; @@ -975,8 +975,8 @@ AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 9223372036854775807 3 0 4 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(_latin1'AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_bigint`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_bigint)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_bigint`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_bigint)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 149 OR select_id IS NULL) order by id; @@ -999,8 +999,8 @@ NULL NULL 1 - ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_varbinary_1000`,2) AS `LEFT(my_varbinary_1000, 2)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_varbinary_1000`,2) AS `LEFT(my_varbinary_1000, 2)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 148 OR select_id IS NULL) order by id; @@ -1023,8 +1023,8 @@ NULL NULL 1 - ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_binary_30`,2) AS `LEFT(my_binary_30, 2)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_binary_30`,2) AS `LEFT(my_binary_30, 2)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 147 OR select_id IS NULL) order by id; @@ -1047,8 +1047,8 @@ NULL NULL 1 - ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_varchar_1000`,2) AS `LEFT(my_varchar_1000, 2)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_varchar_1000`,2) AS `LEFT(my_varchar_1000, 2)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 146 OR select_id IS NULL) order by id; @@ -1071,8 +1071,8 @@ NULL NULL 1 - ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_char_30`,2) AS `LEFT(my_char_30, 2)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_char_30`,2) AS `LEFT(my_char_30, 2)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 145 OR select_id IS NULL) order by id; @@ -1091,8 +1091,8 @@ SELECT LCASE(my_varchar_1000), my_varchar_1000, id FROM t1_values WHERE select_id = 144 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_varchar_1000`) AS `LCASE(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_varchar_1000`) AS `LCASE(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 144 OR select_id IS NULL) order by id; @@ -1105,8 +1105,8 @@ SELECT INSTR(my_char_30, 'char'), my_char_30, id FROM t1_values WHERE select_id = 143 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'char',`t1_values`.`my_char_30`) AS `INSTR(my_char_30, 'char')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('char',`t1_values`.`my_char_30`) AS `INSTR(my_char_30, 'char')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 143 OR select_id IS NULL) order by id; @@ -1125,8 +1125,8 @@ NULL NULL 1 160 ---äÖüß@µ*$-- 4 16 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_varbinary_1000`) AS `BIT_LENGTH(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_varbinary_1000`) AS `BIT_LENGTH(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 142 OR select_id IS NULL) order by id; @@ -1151,8 +1151,8 @@ NULL NULL 1 240 ---äÖüß@µ*$-- 4 240 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_binary_30`) AS `BIT_LENGTH(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_binary_30`) AS `BIT_LENGTH(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 141 OR select_id IS NULL) order by id; @@ -1177,8 +1177,8 @@ NULL NULL 1 160 ---äÖüß@µ*$-- 4 16 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_varchar_1000`) AS `BIT_LENGTH(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_varchar_1000`) AS `BIT_LENGTH(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 140 OR select_id IS NULL) order by id; @@ -1203,8 +1203,8 @@ NULL NULL 1 152 ---äÖüß@µ*$-- 4 16 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_char_30`) AS `BIT_LENGTH(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_char_30`) AS `BIT_LENGTH(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 139 OR select_id IS NULL) order by id; @@ -1229,8 +1229,8 @@ IS_NULL NULL 1 2000 2000 4 2005 2005 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_year`,_latin1'IS_NULL') AS `IFNULL(my_year,'IS_NULL')`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_year`,'IS_NULL') AS `IFNULL(my_year,'IS_NULL')`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 138 OR select_id IS NULL) order by id; @@ -1255,8 +1255,8 @@ IS_NULL NULL 1 13:00:00 13:00:00 4 10:00:00 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_time`,_latin1'IS_NULL') AS `IFNULL(my_time,'IS_NULL')`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_time`,'IS_NULL') AS `IFNULL(my_time,'IS_NULL')`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 137 OR select_id IS NULL) order by id; @@ -1281,8 +1281,8 @@ IFNULL(my_timestamp,'IS_NULL') my_timestamp id 2004-02-29 23:59:59 2004-02-29 23:59:59 4 2005-06-28 10:00:00 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_timestamp`,_latin1'IS_NULL') AS `IFNULL(my_timestamp,'IS_NULL')`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_timestamp`,'IS_NULL') AS `IFNULL(my_timestamp,'IS_NULL')`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 136 OR select_id IS NULL) order by id; @@ -1307,8 +1307,8 @@ IS_NULL NULL 1 2004-02-29 2004-02-29 4 2005-06-28 2005-06-28 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_date`,_latin1'IS_NULL') AS `IFNULL(my_date,'IS_NULL')`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_date`,'IS_NULL') AS `IFNULL(my_date,'IS_NULL')`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 135 OR select_id IS NULL) order by id; @@ -1333,8 +1333,8 @@ IS_NULL NULL 1 2004-02-29 23:59:59 2004-02-29 23:59:59 4 2005-06-28 10:00:00 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_datetime`,_latin1'IS_NULL') AS `IFNULL(my_datetime,'IS_NULL')`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_datetime`,'IS_NULL') AS `IFNULL(my_datetime,'IS_NULL')`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 134 OR select_id IS NULL) order by id; @@ -1359,8 +1359,8 @@ IS_NULL NULL 1 0 0 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_double`,_latin1'IS_NULL') AS `IFNULL(my_double,'IS_NULL')`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_double`,'IS_NULL') AS `IFNULL(my_double,'IS_NULL')`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 133 OR select_id IS NULL) order by id; @@ -1385,8 +1385,8 @@ IS_NULL NULL 1 0.000000000000000000000000000000 0.000000000000000000000000000000 4 -1.000000000000000000000000000000 -1.000000000000000000000000000000 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_decimal`,_latin1'IS_NULL') AS `IFNULL(my_decimal,'IS_NULL')`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_decimal`,'IS_NULL') AS `IFNULL(my_decimal,'IS_NULL')`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 132 OR select_id IS NULL) order by id; @@ -1411,8 +1411,8 @@ IS_NULL NULL 1 0 0 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_bigint`,_latin1'IS_NULL') AS `IFNULL(my_bigint,'IS_NULL')`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_bigint`,'IS_NULL') AS `IFNULL(my_bigint,'IS_NULL')`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 131 OR select_id IS NULL) order by id; @@ -1437,8 +1437,8 @@ IS_NULL NULL 1 ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_varbinary_1000`,_latin1'IS_NULL') AS `IFNULL(my_varbinary_1000,'IS_NULL')`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_varbinary_1000`,'IS_NULL') AS `IFNULL(my_varbinary_1000,'IS_NULL')`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 130 OR select_id IS NULL) order by id; @@ -1463,8 +1463,8 @@ IS_NULL NULL 1 ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_binary_30`,_latin1'IS_NULL') AS `IFNULL(my_binary_30,'IS_NULL')`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_binary_30`,'IS_NULL') AS `IFNULL(my_binary_30,'IS_NULL')`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 129 OR select_id IS NULL) order by id; @@ -1489,8 +1489,8 @@ IS_NULL NULL 1 ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_varchar_1000`,_latin1'IS_NULL') AS `IFNULL(my_varchar_1000,'IS_NULL')`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_varchar_1000`,'IS_NULL') AS `IFNULL(my_varchar_1000,'IS_NULL')`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 128 OR select_id IS NULL) order by id; @@ -1515,8 +1515,8 @@ IS_NULL NULL 1 ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_char_30`,_latin1'IS_NULL') AS `IFNULL(my_char_30,'IS_NULL')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_char_30`,'IS_NULL') AS `IFNULL(my_char_30,'IS_NULL')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 127 OR select_id IS NULL) order by id; @@ -1542,9 +1542,9 @@ IS NOT NULL 2155 3 IS NOT NULL 2000 4 IS NOT NULL 2005 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_year`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_year IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_year`),'IS NULL','IS NOT NULL') AS `IF(my_year IS NULL, 'IS NULL', +'IS NOT NULL')`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 126 OR select_id IS NULL) order by id; @@ -1571,9 +1571,9 @@ IS NOT NULL 838:59:59 3 IS NOT NULL 13:00:00 4 IS NOT NULL 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_time`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_time IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_time`),'IS NULL','IS NOT NULL') AS `IF(my_time IS NULL, 'IS NULL', +'IS NOT NULL')`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 125 OR select_id IS NULL) order by id; @@ -1600,9 +1600,9 @@ IS NOT NULL 2038-01-01 02:59:59 3 IS NOT NULL 2004-02-29 23:59:59 4 IS NOT NULL 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_timestamp`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_timestamp IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_timestamp`),'IS NULL','IS NOT NULL') AS `IF(my_timestamp IS NULL, 'IS NULL', +'IS NOT NULL')`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 124 OR select_id IS NULL) order by id; @@ -1629,9 +1629,9 @@ IS NOT NULL 9999-12-31 3 IS NOT NULL 2004-02-29 4 IS NOT NULL 2005-06-28 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_date`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_date IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_date`),'IS NULL','IS NOT NULL') AS `IF(my_date IS NULL, 'IS NULL', +'IS NOT NULL')`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 123 OR select_id IS NULL) order by id; @@ -1658,9 +1658,9 @@ IS NOT NULL 9999-12-31 23:59:59 3 IS NOT NULL 2004-02-29 23:59:59 4 IS NOT NULL 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_datetime`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_datetime IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_datetime`),'IS NULL','IS NOT NULL') AS `IF(my_datetime IS NULL, 'IS NULL', +'IS NOT NULL')`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 122 OR select_id IS NULL) order by id; @@ -1687,9 +1687,9 @@ IS NOT NULL 1.7976931348623e+308 3 IS NOT NULL 0 4 IS NOT NULL -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_double`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_double IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_double`),'IS NULL','IS NOT NULL') AS `IF(my_double IS NULL, 'IS NULL', +'IS NOT NULL')`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 121 OR select_id IS NULL) order by id; @@ -1716,9 +1716,9 @@ IS NOT NULL 9999999999999999999999999999999999.999999999999999999999999999999 3 IS NOT NULL 0.000000000000000000000000000000 4 IS NOT NULL -1.000000000000000000000000000000 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_decimal`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_decimal IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_decimal`),'IS NULL','IS NOT NULL') AS `IF(my_decimal IS NULL, 'IS NULL', +'IS NOT NULL')`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 120 OR select_id IS NULL) order by id; @@ -1745,9 +1745,9 @@ IS NOT NULL 9223372036854775807 3 IS NOT NULL 0 4 IS NOT NULL -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_bigint`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_bigint IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_bigint`),'IS NULL','IS NOT NULL') AS `IF(my_bigint IS NULL, 'IS NULL', +'IS NOT NULL')`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 119 OR select_id IS NULL) order by id; @@ -1774,9 +1774,9 @@ IS NOT NULL <---------1000 characters------------------------------------------- IS NOT NULL ---äÖüß@µ*$-- 4 IS NOT NULL -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_varbinary_1000`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_varbinary_1000 IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_varbinary_1000`),'IS NULL','IS NOT NULL') AS `IF(my_varbinary_1000 IS NULL, 'IS NULL', +'IS NOT NULL')`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 118 OR select_id IS NULL) order by id; @@ -1803,9 +1803,9 @@ IS NOT NULL <--------30 characters-------> 3 IS NOT NULL ---äÖüß@µ*$-- 4 IS NOT NULL -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_binary_30`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_binary_30 IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_binary_30`),'IS NULL','IS NOT NULL') AS `IF(my_binary_30 IS NULL, 'IS NULL', +'IS NOT NULL')`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 117 OR select_id IS NULL) order by id; @@ -1832,9 +1832,9 @@ IS NOT NULL <---------1000 characters------------------------------------------- IS NOT NULL ---äÖüß@µ*$-- 4 IS NOT NULL -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_varchar_1000`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_varchar_1000 IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_varchar_1000`),'IS NULL','IS NOT NULL') AS `IF(my_varchar_1000 IS NULL, 'IS NULL', +'IS NOT NULL')`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 116 OR select_id IS NULL) order by id; @@ -1861,9 +1861,9 @@ IS NOT NULL <--------30 characters-------> 3 IS NOT NULL ---äÖüß@µ*$-- 4 IS NOT NULL -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_char_30`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_char_30 IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_char_30`),'IS NULL','IS NOT NULL') AS `IF(my_char_30 IS NULL, 'IS NULL', +'IS NOT NULL')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 115 OR select_id IS NULL) order by id; @@ -1889,8 +1889,8 @@ IS TRUE 2155 3 IS TRUE 2000 4 IS TRUE 2005 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_year`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_year, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_year`,'IS TRUE','IS NOT TRUE') AS `IF(my_year, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 114 OR select_id IS NULL) order by id; @@ -1915,8 +1915,8 @@ IS TRUE 838:59:59 3 IS TRUE 13:00:00 4 IS TRUE 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_time`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_time, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_time`,'IS TRUE','IS NOT TRUE') AS `IF(my_time, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 113 OR select_id IS NULL) order by id; @@ -1941,8 +1941,8 @@ IS TRUE 2038-01-01 02:59:59 3 IS TRUE 2004-02-29 23:59:59 4 IS TRUE 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_timestamp`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_timestamp, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_timestamp`,'IS TRUE','IS NOT TRUE') AS `IF(my_timestamp, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 112 OR select_id IS NULL) order by id; @@ -1967,8 +1967,8 @@ IS TRUE 9999-12-31 3 IS TRUE 2004-02-29 4 IS TRUE 2005-06-28 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_date`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_date, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_date`,'IS TRUE','IS NOT TRUE') AS `IF(my_date, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 111 OR select_id IS NULL) order by id; @@ -1993,8 +1993,8 @@ IS TRUE 9999-12-31 23:59:59 3 IS TRUE 2004-02-29 23:59:59 4 IS TRUE 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_datetime`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_datetime, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_datetime`,'IS TRUE','IS NOT TRUE') AS `IF(my_datetime, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 110 OR select_id IS NULL) order by id; @@ -2019,8 +2019,8 @@ IS TRUE 1.7976931348623e+308 3 IS NOT TRUE 0 4 IS TRUE -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_double`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_double, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_double`,'IS TRUE','IS NOT TRUE') AS `IF(my_double, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 109 OR select_id IS NULL) order by id; @@ -2045,8 +2045,8 @@ IS TRUE 9999999999999999999999999999999999.999999999999999999999999999999 3 IS NOT TRUE 0.000000000000000000000000000000 4 IS TRUE -1.000000000000000000000000000000 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_decimal`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_decimal, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_decimal`,'IS TRUE','IS NOT TRUE') AS `IF(my_decimal, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 108 OR select_id IS NULL) order by id; @@ -2071,8 +2071,8 @@ IS TRUE 9223372036854775807 3 IS NOT TRUE 0 4 IS TRUE -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_bigint`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_bigint, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_bigint`,'IS TRUE','IS NOT TRUE') AS `IF(my_bigint, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 107 OR select_id IS NULL) order by id; @@ -2097,8 +2097,8 @@ IS NOT TRUE <---------1000 characters------------------------------------------- IS NOT TRUE ---äÖüß@µ*$-- 4 IS TRUE -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_varbinary_1000`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_varbinary_1000, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_varbinary_1000`,'IS TRUE','IS NOT TRUE') AS `IF(my_varbinary_1000, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 106 OR select_id IS NULL) order by id; @@ -2128,8 +2128,8 @@ Warning 1292 Truncated incorrect DOUBLE value: '<--------30 characters------->' Warning 1292 Truncated incorrect DOUBLE value: ' ---äÖüß@µ*$-- ' Warning 1292 Truncated incorrect DOUBLE value: '-1' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_binary_30`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_binary_30, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_binary_30`,'IS TRUE','IS NOT TRUE') AS `IF(my_binary_30, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 105 OR select_id IS NULL) order by id; @@ -2159,8 +2159,8 @@ IS NOT TRUE <---------1000 characters------------------------------------------- IS NOT TRUE ---äÖüß@µ*$-- 4 IS TRUE -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_varchar_1000`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_varchar_1000, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_varchar_1000`,'IS TRUE','IS NOT TRUE') AS `IF(my_varchar_1000, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 104 OR select_id IS NULL) order by id; @@ -2188,8 +2188,8 @@ Warnings: Warning 1292 Truncated incorrect DOUBLE value: '<--------30 characters------->' Warning 1292 Truncated incorrect DOUBLE value: ' ---äÖüß@µ*$-- ' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_char_30`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_char_30, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_char_30`,'IS TRUE','IS NOT TRUE') AS `IF(my_char_30, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 103 OR select_id IS NULL) order by id; @@ -2217,8 +2217,8 @@ NULL NULL 1 ---???????÷@??*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_varbinary_1000` using koi8r) AS `CONVERT(my_varbinary_1000 USING koi8r)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_varbinary_1000` using koi8r) AS `CONVERT(my_varbinary_1000 USING koi8r)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 102 OR select_id IS NULL) order by id; @@ -2243,8 +2243,8 @@ NULL NULL 1 ---???????÷@??*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_binary_30` using koi8r) AS `CONVERT(my_binary_30 USING koi8r)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_binary_30` using koi8r) AS `CONVERT(my_binary_30 USING koi8r)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 101 OR select_id IS NULL) order by id; @@ -2269,8 +2269,8 @@ NULL NULL 1 ---????????@??*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_varchar_1000` using koi8r) AS `CONVERT(my_varchar_1000 USING koi8r)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_varchar_1000` using koi8r) AS `CONVERT(my_varchar_1000 USING koi8r)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 100 OR select_id IS NULL) order by id; @@ -2295,8 +2295,8 @@ NULL NULL 1 ---????????@??*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_char_30` using koi8r) AS `CONVERT(my_char_30 USING koi8r)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_char_30` using koi8r) AS `CONVERT(my_char_30 USING koi8r)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 99 OR select_id IS NULL) order by id; @@ -2321,8 +2321,8 @@ NULL NULL 1 ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_varbinary_1000` using utf8) AS `CONVERT(my_varbinary_1000 USING utf8)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_varbinary_1000` using utf8) AS `CONVERT(my_varbinary_1000 USING utf8)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 98 OR select_id IS NULL) order by id; @@ -2347,8 +2347,8 @@ NULL NULL 1 ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_binary_30` using utf8) AS `CONVERT(my_binary_30 USING utf8)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_binary_30` using utf8) AS `CONVERT(my_binary_30 USING utf8)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 97 OR select_id IS NULL) order by id; @@ -2373,8 +2373,8 @@ NULL NULL 1 ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_varchar_1000` using utf8) AS `CONVERT(my_varchar_1000 USING utf8)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_varchar_1000` using utf8) AS `CONVERT(my_varchar_1000 USING utf8)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 96 OR select_id IS NULL) order by id; @@ -2399,8 +2399,8 @@ NULL NULL 1 ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_char_30` using utf8) AS `CONVERT(my_char_30 USING utf8)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_char_30` using utf8) AS `CONVERT(my_char_30 USING utf8)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 95 OR select_id IS NULL) order by id; @@ -2425,8 +2425,8 @@ NULL NULL 1 2000 2000 4 2005 2005 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as unsigned) AS `CAST(my_year AS UNSIGNED INTEGER)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as unsigned) AS `CAST(my_year AS UNSIGNED INTEGER)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 94 OR select_id IS NULL) order by id; @@ -2451,8 +2451,8 @@ NULL NULL 1 130000 13:00:00 4 100000 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as unsigned) AS `CAST(my_time AS UNSIGNED INTEGER)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as unsigned) AS `CAST(my_time AS UNSIGNED INTEGER)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 93 OR select_id IS NULL) order by id; @@ -2477,8 +2477,8 @@ CAST(my_timestamp AS UNSIGNED INTEGER) my_timestamp id 20040229235959 2004-02-29 23:59:59 4 20050628100000 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as unsigned) AS `CAST(my_timestamp AS UNSIGNED INTEGER)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as unsigned) AS `CAST(my_timestamp AS UNSIGNED INTEGER)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 92 OR select_id IS NULL) order by id; @@ -2503,8 +2503,8 @@ NULL NULL 1 20040229 2004-02-29 4 20050628 2005-06-28 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as unsigned) AS `CAST(my_date AS UNSIGNED INTEGER)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as unsigned) AS `CAST(my_date AS UNSIGNED INTEGER)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 91 OR select_id IS NULL) order by id; @@ -2529,8 +2529,8 @@ NULL NULL 1 20040229235959 2004-02-29 23:59:59 4 20050628100000 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as unsigned) AS `CAST(my_datetime AS UNSIGNED INTEGER)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as unsigned) AS `CAST(my_datetime AS UNSIGNED INTEGER)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 90 OR select_id IS NULL) order by id; @@ -2558,8 +2558,8 @@ Warnings: Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e+308' Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e+308' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as unsigned) AS `CAST(my_double AS UNSIGNED INTEGER)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as unsigned) AS `CAST(my_double AS UNSIGNED INTEGER)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 89 OR select_id IS NULL) order by id; @@ -2591,8 +2591,8 @@ Error 1292 Truncated incorrect DECIMAL value: '' Error 1292 Truncated incorrect DECIMAL value: '' Error 1292 Truncated incorrect DECIMAL value: '' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as unsigned) AS `CAST(my_decimal AS UNSIGNED INTEGER)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as unsigned) AS `CAST(my_decimal AS UNSIGNED INTEGER)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 88 OR select_id IS NULL) order by id; @@ -2621,8 +2621,8 @@ NULL NULL 1 0 0 4 18446744073709551615 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as unsigned) AS `CAST(my_bigint AS UNSIGNED INTEGER)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as unsigned) AS `CAST(my_bigint AS UNSIGNED INTEGER)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 87 OR select_id IS NULL) order by id; @@ -2652,8 +2652,8 @@ Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters------ Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- ' Warning 1105 Cast to unsigned converted negative integer to it's positive complement SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as unsigned) AS `CAST(my_varbinary_1000 AS UNSIGNED INTEGER)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as unsigned) AS `CAST(my_varbinary_1000 AS UNSIGNED INTEGER)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 86 OR select_id IS NULL) order by id; @@ -2689,8 +2689,8 @@ Warning 1292 Truncated incorrect INTEGER value: ' --- Warning 1292 Truncated incorrect INTEGER value: '-1' Warning 1105 Cast to unsigned converted negative integer to it's positive complement SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as unsigned) AS `CAST(my_binary_30 AS UNSIGNED INTEGER)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as unsigned) AS `CAST(my_binary_30 AS UNSIGNED INTEGER)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 85 OR select_id IS NULL) order by id; @@ -2726,8 +2726,8 @@ Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters------ Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- ' Warning 1105 Cast to unsigned converted negative integer to it's positive complement SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as unsigned) AS `CAST(my_varchar_1000 AS UNSIGNED INTEGER)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as unsigned) AS `CAST(my_varchar_1000 AS UNSIGNED INTEGER)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 84 OR select_id IS NULL) order by id; @@ -2762,8 +2762,8 @@ Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->' Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$--' Warning 1105 Cast to unsigned converted negative integer to it's positive complement SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as unsigned) AS `CAST(my_char_30 AS UNSIGNED INTEGER)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as unsigned) AS `CAST(my_char_30 AS UNSIGNED INTEGER)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 83 OR select_id IS NULL) order by id; @@ -2793,8 +2793,8 @@ NULL NULL 1 2000 2000 4 2005 2005 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as signed) AS `CAST(my_year AS SIGNED INTEGER)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as signed) AS `CAST(my_year AS SIGNED INTEGER)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 82 OR select_id IS NULL) order by id; @@ -2819,8 +2819,8 @@ NULL NULL 1 130000 13:00:00 4 100000 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as signed) AS `CAST(my_time AS SIGNED INTEGER)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as signed) AS `CAST(my_time AS SIGNED INTEGER)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 81 OR select_id IS NULL) order by id; @@ -2845,8 +2845,8 @@ CAST(my_timestamp AS SIGNED INTEGER) my_timestamp id 20040229235959 2004-02-29 23:59:59 4 20050628100000 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as signed) AS `CAST(my_timestamp AS SIGNED INTEGER)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as signed) AS `CAST(my_timestamp AS SIGNED INTEGER)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 80 OR select_id IS NULL) order by id; @@ -2871,8 +2871,8 @@ NULL NULL 1 20040229 2004-02-29 4 20050628 2005-06-28 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as signed) AS `CAST(my_date AS SIGNED INTEGER)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as signed) AS `CAST(my_date AS SIGNED INTEGER)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 79 OR select_id IS NULL) order by id; @@ -2897,8 +2897,8 @@ NULL NULL 1 20040229235959 2004-02-29 23:59:59 4 20050628100000 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as signed) AS `CAST(my_datetime AS SIGNED INTEGER)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as signed) AS `CAST(my_datetime AS SIGNED INTEGER)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 78 OR select_id IS NULL) order by id; @@ -2926,8 +2926,8 @@ Warnings: Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e+308' Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e+308' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as signed) AS `CAST(my_double AS SIGNED INTEGER)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as signed) AS `CAST(my_double AS SIGNED INTEGER)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 77 OR select_id IS NULL) order by id; @@ -2958,8 +2958,8 @@ Warnings: Error 1292 Truncated incorrect DECIMAL value: '' Error 1292 Truncated incorrect DECIMAL value: '' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as signed) AS `CAST(my_decimal AS SIGNED INTEGER)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as signed) AS `CAST(my_decimal AS SIGNED INTEGER)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 76 OR select_id IS NULL) order by id; @@ -2987,8 +2987,8 @@ NULL NULL 1 0 0 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as signed) AS `CAST(my_bigint AS SIGNED INTEGER)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as signed) AS `CAST(my_bigint AS SIGNED INTEGER)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 75 OR select_id IS NULL) order by id; @@ -3017,8 +3017,8 @@ Warning 1292 Truncated incorrect INTEGER value: '' Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- ' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as signed) AS `CAST(my_varbinary_1000 AS SIGNED INTEGER)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as signed) AS `CAST(my_varbinary_1000 AS SIGNED INTEGER)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 74 OR select_id IS NULL) order by id; @@ -3052,8 +3052,8 @@ Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->' Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- ' Warning 1292 Truncated incorrect INTEGER value: '-1' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as signed) AS `CAST(my_binary_30 AS SIGNED INTEGER)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as signed) AS `CAST(my_binary_30 AS SIGNED INTEGER)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 73 OR select_id IS NULL) order by id; @@ -3087,8 +3087,8 @@ Warning 1292 Truncated incorrect INTEGER value: '' Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- ' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as signed) AS `CAST(my_varchar_1000 AS SIGNED INTEGER)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as signed) AS `CAST(my_varchar_1000 AS SIGNED INTEGER)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 72 OR select_id IS NULL) order by id; @@ -3121,8 +3121,8 @@ Warning 1292 Truncated incorrect INTEGER value: '' Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->' Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$--' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as signed) AS `CAST(my_char_30 AS SIGNED INTEGER)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as signed) AS `CAST(my_char_30 AS SIGNED INTEGER)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 71 OR select_id IS NULL) order by id; @@ -3151,8 +3151,8 @@ NULL NULL 1 2000.00 2000 4 2005.00 2005 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as decimal(37,2)) AS `CAST(my_year AS DECIMAL(37,2))`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as decimal(37,2)) AS `CAST(my_year AS DECIMAL(37,2))`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 70 OR select_id IS NULL) order by id; @@ -3177,8 +3177,8 @@ NULL NULL 1 130000.00 13:00:00 4 100000.00 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as decimal(37,2)) AS `CAST(my_time AS DECIMAL(37,2))`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as decimal(37,2)) AS `CAST(my_time AS DECIMAL(37,2))`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 69 OR select_id IS NULL) order by id; @@ -3203,8 +3203,8 @@ CAST(my_timestamp AS DECIMAL(37,2)) my_timestamp id 20040229235959.00 2004-02-29 23:59:59 4 20050628100000.00 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as decimal(37,2)) AS `CAST(my_timestamp AS DECIMAL(37,2))`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as decimal(37,2)) AS `CAST(my_timestamp AS DECIMAL(37,2))`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 68 OR select_id IS NULL) order by id; @@ -3229,8 +3229,8 @@ NULL NULL 1 20040229.00 2004-02-29 4 20050628.00 2005-06-28 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as decimal(37,2)) AS `CAST(my_date AS DECIMAL(37,2))`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as decimal(37,2)) AS `CAST(my_date AS DECIMAL(37,2))`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 67 OR select_id IS NULL) order by id; @@ -3255,8 +3255,8 @@ NULL NULL 1 20040229235959.00 2004-02-29 23:59:59 4 20050628100000.00 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as decimal(37,2)) AS `CAST(my_datetime AS DECIMAL(37,2))`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as decimal(37,2)) AS `CAST(my_datetime AS DECIMAL(37,2))`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 66 OR select_id IS NULL) order by id; @@ -3283,12 +3283,12 @@ NULL NULL 1 -3333.33 -3333.3333 30 Warnings: Error 1292 Truncated incorrect DECIMAL value: '' -Error 1264 Out of range value adjusted for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 +Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 Error 1292 Truncated incorrect DECIMAL value: '' -Error 1264 Out of range value adjusted for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 +Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as decimal(37,2)) AS `CAST(my_double AS DECIMAL(37,2))`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as decimal(37,2)) AS `CAST(my_double AS DECIMAL(37,2))`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 65 OR select_id IS NULL) order by id; @@ -3301,9 +3301,9 @@ NULL NULL 1 -3333.33 -3333.3333 30 Warnings: Error 1292 Truncated incorrect DECIMAL value: '' -Error 1264 Out of range value adjusted for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 +Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 Error 1292 Truncated incorrect DECIMAL value: '' -Error 1264 Out of range value adjusted for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 +Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 DROP VIEW v1; @@ -3319,8 +3319,8 @@ NULL NULL 1 0.00 0.000000000000000000000000000000 4 -1.00 -1.000000000000000000000000000000 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as decimal(37,2)) AS `CAST(my_decimal AS DECIMAL(37,2))`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as decimal(37,2)) AS `CAST(my_decimal AS DECIMAL(37,2))`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 64 OR select_id IS NULL) order by id; @@ -3345,8 +3345,8 @@ NULL NULL 1 0.00 0 4 -1.00 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as decimal(37,2)) AS `CAST(my_bigint AS DECIMAL(37,2))`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as decimal(37,2)) AS `CAST(my_bigint AS DECIMAL(37,2))`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 63 OR select_id IS NULL) order by id; @@ -3376,8 +3376,8 @@ Error 1366 Incorrect decimal value: '' for column '' at row -1 Error 1366 Incorrect decimal value: '' for column '' at row -1 Error 1366 Incorrect decimal value: '' for column '' at row -1 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as decimal(37,2)) AS `CAST(my_varbinary_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as decimal(37,2)) AS `CAST(my_varbinary_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 62 OR select_id IS NULL) order by id; @@ -3417,8 +3417,8 @@ Warning 1292 Truncated incorrect DECIMAL value: ' --- Warning 1292 Truncated incorrect DECIMAL value: '-1' Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as decimal(37,2)) AS `CAST(my_binary_30 AS DECIMAL(37,2))`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as decimal(37,2)) AS `CAST(my_binary_30 AS DECIMAL(37,2))`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 61 OR select_id IS NULL) order by id; @@ -3458,8 +3458,8 @@ Error 1366 Incorrect decimal value: '' for column '' at row -1 Error 1366 Incorrect decimal value: '' for column '' at row -1 Error 1366 Incorrect decimal value: '' for column '' at row -1 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as decimal(37,2)) AS `CAST(my_varchar_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as decimal(37,2)) AS `CAST(my_varchar_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 60 OR select_id IS NULL) order by id; @@ -3497,8 +3497,8 @@ Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->' Error 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as decimal(37,2)) AS `CAST(my_char_30 AS DECIMAL(37,2))`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as decimal(37,2)) AS `CAST(my_char_30 AS DECIMAL(37,2))`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 59 OR select_id IS NULL) order by id; @@ -3531,8 +3531,8 @@ NULL NULL 1 00:20:00 2000 4 00:20:05 2005 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as time) AS `CAST(my_year AS TIME)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as time) AS `CAST(my_year AS TIME)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 58 OR select_id IS NULL) order by id; @@ -3557,8 +3557,8 @@ NULL NULL 1 13:00:00 13:00:00 4 10:00:00 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as time) AS `CAST(my_time AS TIME)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as time) AS `CAST(my_time AS TIME)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 57 OR select_id IS NULL) order by id; @@ -3583,8 +3583,8 @@ CAST(my_timestamp AS TIME) my_timestamp id 23:59:59 2004-02-29 23:59:59 4 10:00:00 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as time) AS `CAST(my_timestamp AS TIME)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as time) AS `CAST(my_timestamp AS TIME)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 56 OR select_id IS NULL) order by id; @@ -3609,8 +3609,8 @@ NULL NULL 1 00:00:00 2004-02-29 4 00:00:00 2005-06-28 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as time) AS `CAST(my_date AS TIME)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as time) AS `CAST(my_date AS TIME)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 55 OR select_id IS NULL) order by id; @@ -3635,8 +3635,8 @@ NULL NULL 1 23:59:59 2004-02-29 23:59:59 4 10:00:00 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as time) AS `CAST(my_datetime AS TIME)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as time) AS `CAST(my_datetime AS TIME)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 54 OR select_id IS NULL) order by id; @@ -3665,8 +3665,8 @@ Warnings: Warning 1292 Truncated incorrect time value: '-1.7976931348623e+308' Warning 1292 Truncated incorrect time value: '1.7976931348623e+308' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as time) AS `CAST(my_double AS TIME)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as time) AS `CAST(my_double AS TIME)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 53 OR select_id IS NULL) order by id; @@ -3699,8 +3699,8 @@ Warnings: Warning 1292 Truncated incorrect time value: '-9223372036854775808' Warning 1292 Truncated incorrect time value: '9223372036854775807' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as time) AS `CAST(my_bigint AS TIME)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as time) AS `CAST(my_bigint AS TIME)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 52 OR select_id IS NULL) order by id; @@ -3734,8 +3734,8 @@ Warning 1292 Truncated incorrect time value: '' Warning 1292 Truncated incorrect time value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' Warning 1292 Truncated incorrect time value: ' ---äÖüß@µ*$-- ' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as time) AS `CAST(my_varbinary_1000 AS TIME)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as time) AS `CAST(my_varbinary_1000 AS TIME)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 51 OR select_id IS NULL) order by id; @@ -3772,8 +3772,8 @@ Warning 1292 Truncated incorrect time value: ' --- Warning 1292 Truncated incorrect time value: '-1' Warning 1292 Truncated incorrect time value: '1 17:58' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as time) AS `CAST(my_binary_30 AS TIME)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as time) AS `CAST(my_binary_30 AS TIME)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 50 OR select_id IS NULL) order by id; @@ -3810,8 +3810,8 @@ Warning 1292 Truncated incorrect time value: '' Warning 1292 Truncated incorrect time value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' Warning 1292 Truncated incorrect time value: ' ---äÖüß@µ*$-- ' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as time) AS `CAST(my_varchar_1000 AS TIME)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as time) AS `CAST(my_varchar_1000 AS TIME)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 49 OR select_id IS NULL) order by id; @@ -3846,8 +3846,8 @@ Warning 1292 Truncated incorrect time value: '' Warning 1292 Truncated incorrect time value: '<--------30 characters------->' Warning 1292 Truncated incorrect time value: ' ---äÖüß@µ*$--' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as time) AS `CAST(my_char_30 AS TIME)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as time) AS `CAST(my_char_30 AS TIME)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 48 OR select_id IS NULL) order by id; @@ -3877,13 +3877,13 @@ NULL 2155 3 NULL 2000 4 NULL 2005 5 Warnings: -Warning 1292 Truncated incorrect datetime value: '1901' -Warning 1292 Truncated incorrect datetime value: '2155' -Warning 1292 Truncated incorrect datetime value: '2000' -Warning 1292 Truncated incorrect datetime value: '2005' +Warning 1292 Incorrect datetime value: '1901' +Warning 1292 Incorrect datetime value: '2155' +Warning 1292 Incorrect datetime value: '2000' +Warning 1292 Incorrect datetime value: '2005' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as datetime) AS `CAST(my_year AS DATETIME)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as datetime) AS `CAST(my_year AS DATETIME)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 47 OR select_id IS NULL) order by id; @@ -3894,10 +3894,10 @@ NULL 2155 3 NULL 2000 4 NULL 2005 5 Warnings: -Warning 1292 Truncated incorrect datetime value: '1901' -Warning 1292 Truncated incorrect datetime value: '2155' -Warning 1292 Truncated incorrect datetime value: '2000' -Warning 1292 Truncated incorrect datetime value: '2005' +Warning 1292 Incorrect datetime value: '1901' +Warning 1292 Incorrect datetime value: '2155' +Warning 1292 Incorrect datetime value: '2000' +Warning 1292 Incorrect datetime value: '2005' DROP VIEW v1; @@ -3913,11 +3913,11 @@ NULL NULL 1 0000-00-00 13:00:00 13:00:00 4 0000-00-00 10:00:00 10:00:00 5 Warnings: -Warning 1292 Truncated incorrect datetime value: '0000-00-00 838:59:59' -Warning 1292 Truncated incorrect datetime value: '0000-00-00 838:59:59' +Warning 1292 Incorrect datetime value: '0000-00-00 838:59:59' +Warning 1292 Incorrect datetime value: '0000-00-00 838:59:59' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as datetime) AS `CAST(my_time AS DATETIME)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as datetime) AS `CAST(my_time AS DATETIME)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 46 OR select_id IS NULL) order by id; @@ -3928,8 +3928,8 @@ NULL NULL 1 0000-00-00 13:00:00 13:00:00 4 0000-00-00 10:00:00 10:00:00 5 Warnings: -Warning 1292 Truncated incorrect datetime value: '0000-00-00 838:59:59' -Warning 1292 Truncated incorrect datetime value: '0000-00-00 838:59:59' +Warning 1292 Incorrect datetime value: '0000-00-00 838:59:59' +Warning 1292 Incorrect datetime value: '0000-00-00 838:59:59' DROP VIEW v1; @@ -3945,8 +3945,8 @@ CAST(my_timestamp AS DATETIME) my_timestamp id 2004-02-29 23:59:59 2004-02-29 23:59:59 4 2005-06-28 10:00:00 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as datetime) AS `CAST(my_timestamp AS DATETIME)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as datetime) AS `CAST(my_timestamp AS DATETIME)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 45 OR select_id IS NULL) order by id; @@ -3971,8 +3971,8 @@ NULL NULL 1 2004-02-29 00:00:00 2004-02-29 4 2005-06-28 00:00:00 2005-06-28 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as datetime) AS `CAST(my_date AS DATETIME)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as datetime) AS `CAST(my_date AS DATETIME)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 44 OR select_id IS NULL) order by id; @@ -3997,8 +3997,8 @@ NULL NULL 1 2004-02-29 23:59:59 2004-02-29 23:59:59 4 2005-06-28 10:00:00 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as datetime) AS `CAST(my_datetime AS DATETIME)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as datetime) AS `CAST(my_datetime AS DATETIME)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 43 OR select_id IS NULL) order by id; @@ -4024,14 +4024,14 @@ NULL 0 4 NULL -1 5 NULL 200506271758 19 Warnings: -Warning 1292 Truncated incorrect datetime value: '-1.7976931348623e+308' -Warning 1292 Truncated incorrect datetime value: '1.7976931348623e+308' -Warning 1292 Truncated incorrect datetime value: '0' -Warning 1292 Truncated incorrect datetime value: '-1' -Warning 1292 Truncated incorrect datetime value: '200506271758' +Warning 1292 Incorrect datetime value: '-1.7976931348623e+308' +Warning 1292 Incorrect datetime value: '1.7976931348623e+308' +Warning 1292 Incorrect datetime value: '0' +Warning 1292 Incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '200506271758' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as datetime) AS `CAST(my_double AS DATETIME)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as datetime) AS `CAST(my_double AS DATETIME)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 42 OR select_id IS NULL) order by id; @@ -4043,11 +4043,11 @@ NULL 0 4 NULL -1 5 NULL 200506271758 19 Warnings: -Warning 1292 Truncated incorrect datetime value: '-1.7976931348623e+308' -Warning 1292 Truncated incorrect datetime value: '1.7976931348623e+308' -Warning 1292 Truncated incorrect datetime value: '0' -Warning 1292 Truncated incorrect datetime value: '-1' -Warning 1292 Truncated incorrect datetime value: '200506271758' +Warning 1292 Incorrect datetime value: '-1.7976931348623e+308' +Warning 1292 Incorrect datetime value: '1.7976931348623e+308' +Warning 1292 Incorrect datetime value: '0' +Warning 1292 Incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '200506271758' DROP VIEW v1; @@ -4064,14 +4064,14 @@ NULL 0 4 NULL -1 5 NULL 200506271758 18 Warnings: -Warning 1292 Truncated incorrect datetime value: '-9223372036854775808' -Warning 1292 Truncated incorrect datetime value: '9223372036854775807' -Warning 1292 Truncated incorrect datetime value: '0' -Warning 1292 Truncated incorrect datetime value: '-1' -Warning 1292 Truncated incorrect datetime value: '200506271758' +Warning 1292 Incorrect datetime value: '-9223372036854775808' +Warning 1292 Incorrect datetime value: '9223372036854775807' +Warning 1292 Incorrect datetime value: '0' +Warning 1292 Incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '200506271758' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as datetime) AS `CAST(my_bigint AS DATETIME)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as datetime) AS `CAST(my_bigint AS DATETIME)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 41 OR select_id IS NULL) order by id; @@ -4083,11 +4083,11 @@ NULL 0 4 NULL -1 5 NULL 200506271758 18 Warnings: -Warning 1292 Truncated incorrect datetime value: '-9223372036854775808' -Warning 1292 Truncated incorrect datetime value: '9223372036854775807' -Warning 1292 Truncated incorrect datetime value: '0' -Warning 1292 Truncated incorrect datetime value: '-1' -Warning 1292 Truncated incorrect datetime value: '200506271758' +Warning 1292 Incorrect datetime value: '-9223372036854775808' +Warning 1292 Incorrect datetime value: '9223372036854775807' +Warning 1292 Incorrect datetime value: '0' +Warning 1292 Incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '200506271758' DROP VIEW v1; @@ -4104,13 +4104,13 @@ NULL ---äÖüß@µ*$-- 4 NULL -1 5 2005-06-27 17:58:00 2005-06-27 17:58 17 Warnings: -Warning 1292 Truncated incorrect datetime value: '' -Warning 1292 Truncated incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '' +Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' +Warning 1292 Incorrect datetime value: '-1' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as datetime) AS `CAST(my_varbinary_1000 AS DATETIME)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as datetime) AS `CAST(my_varbinary_1000 AS DATETIME)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 40 OR select_id IS NULL) order by id; @@ -4122,10 +4122,10 @@ NULL ---äÖüß@µ*$-- 4 NULL -1 5 2005-06-27 17:58:00 2005-06-27 17:58 17 Warnings: -Warning 1292 Truncated incorrect datetime value: '' -Warning 1292 Truncated incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '' +Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' +Warning 1292 Incorrect datetime value: '-1' DROP VIEW v1; @@ -4142,14 +4142,14 @@ NULL ---äÖüß@µ*$-- 4 NULL -1 5 2005-06-27 17:58:00 2005-06-27 17:58 16 Warnings: -Warning 1292 Truncated incorrect datetime value: '' -Warning 1292 Truncated incorrect datetime value: '<--------30 characters------->' -Warning 1292 Truncated incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '' +Warning 1292 Incorrect datetime value: '<--------30 characters------->' +Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' +Warning 1292 Incorrect datetime value: '-1' Warning 1292 Truncated incorrect datetime value: '2005-06-27 17:58' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as datetime) AS `CAST(my_binary_30 AS DATETIME)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as datetime) AS `CAST(my_binary_30 AS DATETIME)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 39 OR select_id IS NULL) order by id; @@ -4161,10 +4161,10 @@ NULL ---äÖüß@µ*$-- 4 NULL -1 5 2005-06-27 17:58:00 2005-06-27 17:58 16 Warnings: -Warning 1292 Truncated incorrect datetime value: '' -Warning 1292 Truncated incorrect datetime value: '<--------30 characters------->' -Warning 1292 Truncated incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '' +Warning 1292 Incorrect datetime value: '<--------30 characters------->' +Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' +Warning 1292 Incorrect datetime value: '-1' Warning 1292 Truncated incorrect datetime value: '2005-06-27 17:58' DROP VIEW v1; @@ -4182,13 +4182,13 @@ NULL ---äÖüß@µ*$-- 4 NULL -1 5 2005-06-27 17:58:00 2005-06-27 17:58 15 Warnings: -Warning 1292 Truncated incorrect datetime value: '' -Warning 1292 Truncated incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '' +Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' +Warning 1292 Incorrect datetime value: '-1' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as datetime) AS `CAST(my_varchar_1000 AS DATETIME)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as datetime) AS `CAST(my_varchar_1000 AS DATETIME)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 38 OR select_id IS NULL) order by id; @@ -4200,10 +4200,10 @@ NULL ---äÖüß@µ*$-- 4 NULL -1 5 2005-06-27 17:58:00 2005-06-27 17:58 15 Warnings: -Warning 1292 Truncated incorrect datetime value: '' -Warning 1292 Truncated incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '' +Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' +Warning 1292 Incorrect datetime value: '-1' DROP VIEW v1; @@ -4220,13 +4220,13 @@ NULL ---äÖüß@µ*$-- 4 NULL -1 5 2005-06-27 17:58:00 2005-06-27 17:58 14 Warnings: -Warning 1292 Truncated incorrect datetime value: '' -Warning 1292 Truncated incorrect datetime value: '<--------30 characters------->' -Warning 1292 Truncated incorrect datetime value: ' ---äÖüß@µ*$--' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '' +Warning 1292 Incorrect datetime value: '<--------30 characters------->' +Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$--' +Warning 1292 Incorrect datetime value: '-1' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as datetime) AS `CAST(my_char_30 AS DATETIME)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as datetime) AS `CAST(my_char_30 AS DATETIME)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 37 OR select_id IS NULL) order by id; @@ -4238,10 +4238,10 @@ NULL ---äÖüß@µ*$-- 4 NULL -1 5 2005-06-27 17:58:00 2005-06-27 17:58 14 Warnings: -Warning 1292 Truncated incorrect datetime value: '' -Warning 1292 Truncated incorrect datetime value: '<--------30 characters------->' -Warning 1292 Truncated incorrect datetime value: ' ---äÖüß@µ*$--' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '' +Warning 1292 Incorrect datetime value: '<--------30 characters------->' +Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$--' +Warning 1292 Incorrect datetime value: '-1' DROP VIEW v1; @@ -4257,13 +4257,13 @@ NULL 2155 3 NULL 2000 4 NULL 2005 5 Warnings: -Warning 1292 Truncated incorrect datetime value: '1901' -Warning 1292 Truncated incorrect datetime value: '2155' -Warning 1292 Truncated incorrect datetime value: '2000' -Warning 1292 Truncated incorrect datetime value: '2005' +Warning 1292 Incorrect datetime value: '1901' +Warning 1292 Incorrect datetime value: '2155' +Warning 1292 Incorrect datetime value: '2000' +Warning 1292 Incorrect datetime value: '2005' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as date) AS `CAST(my_year AS DATE)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as date) AS `CAST(my_year AS DATE)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 36 OR select_id IS NULL) order by id; @@ -4274,10 +4274,10 @@ NULL 2155 3 NULL 2000 4 NULL 2005 5 Warnings: -Warning 1292 Truncated incorrect datetime value: '1901' -Warning 1292 Truncated incorrect datetime value: '2155' -Warning 1292 Truncated incorrect datetime value: '2000' -Warning 1292 Truncated incorrect datetime value: '2005' +Warning 1292 Incorrect datetime value: '1901' +Warning 1292 Incorrect datetime value: '2155' +Warning 1292 Incorrect datetime value: '2000' +Warning 1292 Incorrect datetime value: '2005' DROP VIEW v1; @@ -4293,8 +4293,8 @@ NULL NULL 1 0000-00-00 13:00:00 4 0000-00-00 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as date) AS `CAST(my_time AS DATE)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as date) AS `CAST(my_time AS DATE)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 35 OR select_id IS NULL) order by id; @@ -4319,8 +4319,8 @@ CAST(my_timestamp AS DATE) my_timestamp id 2004-02-29 2004-02-29 23:59:59 4 2005-06-28 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as date) AS `CAST(my_timestamp AS DATE)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as date) AS `CAST(my_timestamp AS DATE)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 34 OR select_id IS NULL) order by id; @@ -4345,8 +4345,8 @@ NULL NULL 1 2004-02-29 2004-02-29 4 2005-06-28 2005-06-28 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as date) AS `CAST(my_date AS DATE)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as date) AS `CAST(my_date AS DATE)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 33 OR select_id IS NULL) order by id; @@ -4371,8 +4371,8 @@ NULL NULL 1 2004-02-29 2004-02-29 23:59:59 4 2005-06-28 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as date) AS `CAST(my_datetime AS DATE)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as date) AS `CAST(my_datetime AS DATE)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 32 OR select_id IS NULL) order by id; @@ -4398,13 +4398,13 @@ NULL 0 4 NULL -1 5 2005-06-27 20050627 13 Warnings: -Warning 1292 Truncated incorrect datetime value: '-1.7976931348623e+308' -Warning 1292 Truncated incorrect datetime value: '1.7976931348623e+308' -Warning 1292 Truncated incorrect datetime value: '0' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '-1.7976931348623e+308' +Warning 1292 Incorrect datetime value: '1.7976931348623e+308' +Warning 1292 Incorrect datetime value: '0' +Warning 1292 Incorrect datetime value: '-1' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as date) AS `CAST(my_double AS DATE)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as date) AS `CAST(my_double AS DATE)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 31 OR select_id IS NULL) order by id; @@ -4416,10 +4416,10 @@ NULL 0 4 NULL -1 5 2005-06-27 20050627 13 Warnings: -Warning 1292 Truncated incorrect datetime value: '-1.7976931348623e+308' -Warning 1292 Truncated incorrect datetime value: '1.7976931348623e+308' -Warning 1292 Truncated incorrect datetime value: '0' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '-1.7976931348623e+308' +Warning 1292 Incorrect datetime value: '1.7976931348623e+308' +Warning 1292 Incorrect datetime value: '0' +Warning 1292 Incorrect datetime value: '-1' DROP VIEW v1; @@ -4436,13 +4436,13 @@ NULL 0 4 NULL -1 5 2005-06-27 20050627 12 Warnings: -Warning 1292 Truncated incorrect datetime value: '-9223372036854775808' -Warning 1292 Truncated incorrect datetime value: '9223372036854775807' -Warning 1292 Truncated incorrect datetime value: '0' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '-9223372036854775808' +Warning 1292 Incorrect datetime value: '9223372036854775807' +Warning 1292 Incorrect datetime value: '0' +Warning 1292 Incorrect datetime value: '-1' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as date) AS `CAST(my_bigint AS DATE)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as date) AS `CAST(my_bigint AS DATE)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 30 OR select_id IS NULL) order by id; @@ -4454,10 +4454,10 @@ NULL 0 4 NULL -1 5 2005-06-27 20050627 12 Warnings: -Warning 1292 Truncated incorrect datetime value: '-9223372036854775808' -Warning 1292 Truncated incorrect datetime value: '9223372036854775807' -Warning 1292 Truncated incorrect datetime value: '0' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '-9223372036854775808' +Warning 1292 Incorrect datetime value: '9223372036854775807' +Warning 1292 Incorrect datetime value: '0' +Warning 1292 Incorrect datetime value: '-1' DROP VIEW v1; @@ -4474,13 +4474,13 @@ NULL ---äÖüß@µ*$-- 4 NULL -1 5 2005-06-27 2005-06-27 11 Warnings: -Warning 1292 Truncated incorrect datetime value: '' -Warning 1292 Truncated incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '' +Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' +Warning 1292 Incorrect datetime value: '-1' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as date) AS `CAST(my_varbinary_1000 AS DATE)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as date) AS `CAST(my_varbinary_1000 AS DATE)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 29 OR select_id IS NULL) order by id; @@ -4492,10 +4492,10 @@ NULL ---äÖüß@µ*$-- 4 NULL -1 5 2005-06-27 2005-06-27 11 Warnings: -Warning 1292 Truncated incorrect datetime value: '' -Warning 1292 Truncated incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '' +Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' +Warning 1292 Incorrect datetime value: '-1' DROP VIEW v1; @@ -4512,14 +4512,14 @@ NULL ---äÖüß@µ*$-- 4 NULL -1 5 2005-06-27 2005-06-27 10 Warnings: -Warning 1292 Truncated incorrect datetime value: '' -Warning 1292 Truncated incorrect datetime value: '<--------30 characters------->' -Warning 1292 Truncated incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '' +Warning 1292 Incorrect datetime value: '<--------30 characters------->' +Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' +Warning 1292 Incorrect datetime value: '-1' Warning 1292 Truncated incorrect date value: '2005-06-27' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as date) AS `CAST(my_binary_30 AS DATE)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as date) AS `CAST(my_binary_30 AS DATE)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 28 OR select_id IS NULL) order by id; @@ -4531,10 +4531,10 @@ NULL ---äÖüß@µ*$-- 4 NULL -1 5 2005-06-27 2005-06-27 10 Warnings: -Warning 1292 Truncated incorrect datetime value: '' -Warning 1292 Truncated incorrect datetime value: '<--------30 characters------->' -Warning 1292 Truncated incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '' +Warning 1292 Incorrect datetime value: '<--------30 characters------->' +Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' +Warning 1292 Incorrect datetime value: '-1' Warning 1292 Truncated incorrect date value: '2005-06-27' DROP VIEW v1; @@ -4552,13 +4552,13 @@ NULL ---äÖüß@µ*$-- 4 NULL -1 5 2005-06-27 2005-06-27 9 Warnings: -Warning 1292 Truncated incorrect datetime value: '' -Warning 1292 Truncated incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '' +Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' +Warning 1292 Incorrect datetime value: '-1' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as date) AS `CAST(my_varchar_1000 AS DATE)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as date) AS `CAST(my_varchar_1000 AS DATE)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 27 OR select_id IS NULL) order by id; @@ -4570,10 +4570,10 @@ NULL ---äÖüß@µ*$-- 4 NULL -1 5 2005-06-27 2005-06-27 9 Warnings: -Warning 1292 Truncated incorrect datetime value: '' -Warning 1292 Truncated incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '' +Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' +Warning 1292 Incorrect datetime value: '-1' DROP VIEW v1; @@ -4590,13 +4590,13 @@ NULL ---äÖüß@µ*$-- 4 NULL -1 5 2005-06-27 2005-06-27 8 Warnings: -Warning 1292 Truncated incorrect datetime value: '' -Warning 1292 Truncated incorrect datetime value: '<--------30 characters------->' -Warning 1292 Truncated incorrect datetime value: ' ---äÖüß@µ*$--' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '' +Warning 1292 Incorrect datetime value: '<--------30 characters------->' +Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$--' +Warning 1292 Incorrect datetime value: '-1' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as date) AS `CAST(my_char_30 AS DATE)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as date) AS `CAST(my_char_30 AS DATE)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 26 OR select_id IS NULL) order by id; @@ -4608,10 +4608,10 @@ NULL ---äÖüß@µ*$-- 4 NULL -1 5 2005-06-27 2005-06-27 8 Warnings: -Warning 1292 Truncated incorrect datetime value: '' -Warning 1292 Truncated incorrect datetime value: '<--------30 characters------->' -Warning 1292 Truncated incorrect datetime value: ' ---äÖüß@µ*$--' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '' +Warning 1292 Incorrect datetime value: '<--------30 characters------->' +Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$--' +Warning 1292 Incorrect datetime value: '-1' DROP VIEW v1; @@ -4627,8 +4627,8 @@ NULL NULL 1 2000 2000 4 2005 2005 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as char charset latin1) AS `CAST(my_year AS CHAR)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as char charset latin1) AS `CAST(my_year AS CHAR)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 25 OR select_id IS NULL) order by id; @@ -4653,8 +4653,8 @@ NULL NULL 1 13:00:00 13:00:00 4 10:00:00 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as char charset latin1) AS `CAST(my_time AS CHAR)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as char charset latin1) AS `CAST(my_time AS CHAR)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 24 OR select_id IS NULL) order by id; @@ -4679,8 +4679,8 @@ CAST(my_timestamp AS CHAR) my_timestamp id 2004-02-29 23:59:59 2004-02-29 23:59:59 4 2005-06-28 10:00:00 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as char charset latin1) AS `CAST(my_timestamp AS CHAR)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as char charset latin1) AS `CAST(my_timestamp AS CHAR)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 23 OR select_id IS NULL) order by id; @@ -4705,8 +4705,8 @@ NULL NULL 1 2004-02-29 2004-02-29 4 2005-06-28 2005-06-28 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as char charset latin1) AS `CAST(my_date AS CHAR)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as char charset latin1) AS `CAST(my_date AS CHAR)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 22 OR select_id IS NULL) order by id; @@ -4731,8 +4731,8 @@ NULL NULL 1 2004-02-29 23:59:59 2004-02-29 23:59:59 4 2005-06-28 10:00:00 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as char charset latin1) AS `CAST(my_datetime AS CHAR)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as char charset latin1) AS `CAST(my_datetime AS CHAR)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 21 OR select_id IS NULL) order by id; @@ -4757,8 +4757,8 @@ NULL NULL 1 0 0 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as char charset latin1) AS `CAST(my_double AS CHAR)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as char charset latin1) AS `CAST(my_double AS CHAR)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 20 OR select_id IS NULL) order by id; @@ -4783,8 +4783,8 @@ NULL NULL 1 0.000000000000000000000000000000 0.000000000000000000000000000000 4 -1.000000000000000000000000000000 -1.000000000000000000000000000000 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as char charset latin1) AS `CAST(my_decimal AS CHAR)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as char charset latin1) AS `CAST(my_decimal AS CHAR)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 19 OR select_id IS NULL) order by id; @@ -4809,8 +4809,8 @@ NULL NULL 1 0 0 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as char charset latin1) AS `CAST(my_bigint AS CHAR)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as char charset latin1) AS `CAST(my_bigint AS CHAR)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 18 OR select_id IS NULL) order by id; @@ -4835,8 +4835,8 @@ NULL NULL 1 ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as char charset latin1) AS `CAST(my_varbinary_1000 AS CHAR)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as char charset latin1) AS `CAST(my_varbinary_1000 AS CHAR)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 17 OR select_id IS NULL) order by id; @@ -4861,8 +4861,8 @@ NULL NULL 1 ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as char charset latin1) AS `CAST(my_binary_30 AS CHAR)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as char charset latin1) AS `CAST(my_binary_30 AS CHAR)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 16 OR select_id IS NULL) order by id; @@ -4887,8 +4887,8 @@ NULL NULL 1 ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as char charset latin1) AS `CAST(my_varchar_1000 AS CHAR)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as char charset latin1) AS `CAST(my_varchar_1000 AS CHAR)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 15 OR select_id IS NULL) order by id; @@ -4913,8 +4913,8 @@ NULL NULL 1 ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as char charset latin1) AS `CAST(my_char_30 AS CHAR)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as char charset latin1) AS `CAST(my_char_30 AS CHAR)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 14 OR select_id IS NULL) order by id; @@ -4939,8 +4939,8 @@ NULL NULL 1 2000 2000 4 2005 2005 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as char charset binary) AS `CAST(my_year AS BINARY)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as char charset binary) AS `CAST(my_year AS BINARY)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 13 OR select_id IS NULL) order by id; @@ -4965,8 +4965,8 @@ NULL NULL 1 13:00:00 13:00:00 4 10:00:00 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as char charset binary) AS `CAST(my_time AS BINARY)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as char charset binary) AS `CAST(my_time AS BINARY)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 12 OR select_id IS NULL) order by id; @@ -4991,8 +4991,8 @@ CAST(my_timestamp AS BINARY) my_timestamp id 2004-02-29 23:59:59 2004-02-29 23:59:59 4 2005-06-28 10:00:00 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as char charset binary) AS `CAST(my_timestamp AS BINARY)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as char charset binary) AS `CAST(my_timestamp AS BINARY)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 11 OR select_id IS NULL) order by id; @@ -5017,8 +5017,8 @@ NULL NULL 1 2004-02-29 2004-02-29 4 2005-06-28 2005-06-28 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as char charset binary) AS `CAST(my_date AS BINARY)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as char charset binary) AS `CAST(my_date AS BINARY)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 10 OR select_id IS NULL) order by id; @@ -5043,8 +5043,8 @@ NULL NULL 1 2004-02-29 23:59:59 2004-02-29 23:59:59 4 2005-06-28 10:00:00 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as char charset binary) AS `CAST(my_datetime AS BINARY)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as char charset binary) AS `CAST(my_datetime AS BINARY)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 9 OR select_id IS NULL) order by id; @@ -5069,8 +5069,8 @@ NULL NULL 1 0 0 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as char charset binary) AS `CAST(my_double AS BINARY)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as char charset binary) AS `CAST(my_double AS BINARY)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 8 OR select_id IS NULL) order by id; @@ -5095,8 +5095,8 @@ NULL NULL 1 0.000000000000000000000000000000 0.000000000000000000000000000000 4 -1.000000000000000000000000000000 -1.000000000000000000000000000000 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as char charset binary) AS `CAST(my_decimal AS BINARY)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as char charset binary) AS `CAST(my_decimal AS BINARY)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 7 OR select_id IS NULL) order by id; @@ -5121,8 +5121,8 @@ NULL NULL 1 0 0 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as char charset binary) AS `CAST(my_bigint AS BINARY)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as char charset binary) AS `CAST(my_bigint AS BINARY)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 6 OR select_id IS NULL) order by id; @@ -5147,8 +5147,8 @@ NULL NULL 1 ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as char charset binary) AS `CAST(my_varbinary_1000 AS BINARY)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as char charset binary) AS `CAST(my_varbinary_1000 AS BINARY)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 5 OR select_id IS NULL) order by id; @@ -5173,8 +5173,8 @@ NULL NULL 1 ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as char charset binary) AS `CAST(my_binary_30 AS BINARY)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as char charset binary) AS `CAST(my_binary_30 AS BINARY)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 4 OR select_id IS NULL) order by id; @@ -5199,8 +5199,8 @@ NULL NULL 1 ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as char charset binary) AS `CAST(my_varchar_1000 AS BINARY)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as char charset binary) AS `CAST(my_varchar_1000 AS BINARY)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 3 OR select_id IS NULL) order by id; @@ -5225,8 +5225,8 @@ NULL NULL 1 ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as char charset binary) AS `CAST(my_char_30 AS BINARY)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as char charset binary) AS `CAST(my_char_30 AS BINARY)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 2 OR select_id IS NULL) order by id; @@ -5251,8 +5251,8 @@ NULL -1 5 2 4 6 NULL -25 7 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select sqrt(`t1_values`.`my_bigint`) AS `sqrt(my_bigint)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select sqrt(`t1_values`.`my_bigint`) AS `sqrt(my_bigint)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 1 OR select_id IS NULL) order by id; diff --git a/mysql-test/suite/funcs_1/r/memory_storedproc.result b/mysql-test/suite/funcs_1/r/memory_storedproc.result index 1d75cf49bb7..3fd7020c114 100644 --- a/mysql-test/suite/funcs_1/r/memory_storedproc.result +++ b/mysql-test/suite/funcs_1/r/memory_storedproc.result @@ -14310,6 +14310,8 @@ ERROR 42000: Bad SQLSTATE: '2005-03-03' Testcase 4.2.43: -------------------------------------------------------------------------------- DROP PROCEDURE IF EXISTS sp1; +expect failure, SQLSTATE 00000 is not an acceptable value +for an SP's handler CREATE PROCEDURE sp1() BEGIN declare cond1 condition for sqlstate '00000'; @@ -14317,10 +14319,11 @@ declare continue handler for cond1 set @var2 = 1; set @x=1; SELECT @var2; END// +ERROR 42000: Bad SQLSTATE: '00000' +ensure SP doesn't exist CALL sp1(); -@var2 -NULL -DROP PROCEDURE sp1; +ERROR 42000: PROCEDURE db_storedproc.sp1 does not exist +DROP PROCEDURE IF EXISTS sp1; Testcase 4.2.45: -------------------------------------------------------------------------------- @@ -14389,16 +14392,19 @@ ERROR 42000: Bad SQLSTATE: '42s0200test' Testcase 4.2.48: -------------------------------------------------------------------------------- DROP PROCEDURE IF EXISTS sp1; +This creation should fail, SQLSTATE 00000 is unacceptable CREATE PROCEDURE sp1() BEGIN declare continue handler for sqlstate '00000' set @var2 = 1; set @x=1; SELECT @var2; END// +ERROR 42000: Bad SQLSTATE: '00000' +Verify SP wasn't created CALL sp1(); -@var2 -NULL -DROP PROCEDURE sp1; +ERROR 42000: PROCEDURE db_storedproc.sp1 does not exist +DROP PROCEDURE IF EXISTSsp1; +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 'EXISTSsp1' at line 1 Testcase 4.2.52: -------------------------------------------------------------------------------- @@ -23502,6 +23508,7 @@ set x1 = 2; END; SELECT @x, x1; END// +ERROR 42000: Bad SQLSTATE: '00000' DROP PROCEDURE IF EXISTS h1; Testcase 4.11.40: @@ -23539,9 +23546,9 @@ set x1 = 2; END; SELECT @x, x1; END// +ERROR 42000: Bad SQLSTATE: '00000' CALL h1(); -@x x1 -0 2 +ERROR 42000: PROCEDURE db_storedproc.h1 does not exist DROP PROCEDURE IF EXISTS h1; * Testcase 3.1.2.53 (4.11.42): diff --git a/mysql-test/suite/funcs_1/r/memory_storedproc_02.result b/mysql-test/suite/funcs_1/r/memory_storedproc_02.result index 7458e55007d..04fb7d29385 100644 --- a/mysql-test/suite/funcs_1/r/memory_storedproc_02.result +++ b/mysql-test/suite/funcs_1/r/memory_storedproc_02.result @@ -583,6 +583,7 @@ END// CALL h1(); x1 x2 x3 x4 x5 x6 1 1 1 1 1 1 +This will fail, SQLSTATE 00000 is not allowed CREATE PROCEDURE sp1() begin1_label:BEGIN declare exit handler for sqlstate '00000' set @var1 = 5; @@ -594,14 +595,13 @@ SELECT @var3, @var4; END begin2_label; SELECT @var1, @var2; END begin1_label// +ERROR 42000: Bad SQLSTATE: '00000' +Verify SP wasn't created CALL sp1(); -@var3 @var4 -NULL 8 -@var1 @var2 -NULL 6 +ERROR 42000: PROCEDURE db_storedproc.sp1 does not exist DROP PROCEDURE p1; DROP PROCEDURE h1; -DROP PROCEDURE sp1; +DROP PROCEDURE IF EXISTS sp1; DROP TABLE res_t1; Testcase 3.1.2.50: diff --git a/mysql-test/suite/funcs_1/r/myisam_func_view.result b/mysql-test/suite/funcs_1/r/myisam_func_view.result index c2689a36801..96e4f23976b 100644 --- a/mysql-test/suite/funcs_1/r/myisam_func_view.result +++ b/mysql-test/suite/funcs_1/r/myisam_func_view.result @@ -289,8 +289,8 @@ CREATE VIEW v1 AS SELECT my_char_30, id FROM t1_values; SELECT my_char_30, id FROM t1_values WHERE select_id = 193 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 193 OR select_id IS NULL) order by id; @@ -307,8 +307,8 @@ A<--------30 characters-------> <--------30 characters-------> 3 A ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 A-1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select concat(_latin1'A',`t1_values`.`my_char_30`) AS `CONCAT('A',my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select concat('A',`t1_values`.`my_char_30`) AS `CONCAT('A',my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 192 OR select_id IS NULL) order by id; @@ -327,8 +327,8 @@ SELECT LTRIM(my_varbinary_1000), my_varbinary_1000, id FROM t1_values WHERE select_id = 191 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ltrim(`t1_values`.`my_varbinary_1000`) AS `LTRIM(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ltrim(`t1_values`.`my_varbinary_1000`) AS `LTRIM(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 191 OR select_id IS NULL) order by id; @@ -341,8 +341,8 @@ SELECT LTRIM(my_binary_30), my_binary_30, id FROM t1_values WHERE select_id = 190 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ltrim(`t1_values`.`my_binary_30`) AS `LTRIM(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ltrim(`t1_values`.`my_binary_30`) AS `LTRIM(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 190 OR select_id IS NULL) order by id; @@ -355,8 +355,8 @@ SELECT LTRIM(my_varchar_1000), my_varchar_1000, id FROM t1_values WHERE select_id = 189 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ltrim(`t1_values`.`my_varchar_1000`) AS `LTRIM(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ltrim(`t1_values`.`my_varchar_1000`) AS `LTRIM(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 189 OR select_id IS NULL) order by id; @@ -369,8 +369,8 @@ SELECT LTRIM(my_char_30), my_char_30, id FROM t1_values WHERE select_id = 188 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ltrim(`t1_values`.`my_char_30`) AS `LTRIM(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ltrim(`t1_values`.`my_char_30`) AS `LTRIM(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 188 OR select_id IS NULL) order by id; @@ -383,8 +383,8 @@ SELECT LOWER(my_varbinary_1000), my_varbinary_1000, id FROM t1_values WHERE select_id = 187 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_varbinary_1000`) AS `LOWER(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_varbinary_1000`) AS `LOWER(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 187 OR select_id IS NULL) order by id; @@ -397,8 +397,8 @@ SELECT LOWER(my_binary_30), my_binary_30, id FROM t1_values WHERE select_id = 186 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_binary_30`) AS `LOWER(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_binary_30`) AS `LOWER(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 186 OR select_id IS NULL) order by id; @@ -411,8 +411,8 @@ SELECT LOWER(my_varchar_1000), my_varchar_1000, id FROM t1_values WHERE select_id = 185 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_varchar_1000`) AS `LOWER(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_varchar_1000`) AS `LOWER(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 185 OR select_id IS NULL) order by id; @@ -425,8 +425,8 @@ SELECT LOWER(my_char_30), my_char_30, id FROM t1_values WHERE select_id = 184 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_char_30`) AS `LOWER(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_char_30`) AS `LOWER(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 184 OR select_id IS NULL) order by id; @@ -439,8 +439,8 @@ SELECT LOCATE('-', ' - -ABC', my_decimal), my_decimal, id FROM t1_values WHERE select_id = 183 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'-',_latin1' - -ABC',`t1_values`.`my_decimal`) AS `LOCATE('-', ' - -ABC', my_decimal)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',' - -ABC',`t1_values`.`my_decimal`) AS `LOCATE('-', ' - -ABC', my_decimal)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 183 OR select_id IS NULL) order by id; @@ -453,8 +453,8 @@ SELECT LOCATE('-', ' - -ABC', my_double), my_double, id FROM t1_values WHERE select_id = 182 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'-',_latin1' - -ABC',`t1_values`.`my_double`) AS `LOCATE('-', ' - -ABC', my_double)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',' - -ABC',`t1_values`.`my_double`) AS `LOCATE('-', ' - -ABC', my_double)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 182 OR select_id IS NULL) order by id; @@ -467,8 +467,8 @@ SELECT LOCATE('-', ' - -ABC', my_bigint), my_bigint, id FROM t1_values WHERE select_id = 181 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'-',_latin1' - -ABC',`t1_values`.`my_bigint`) AS `LOCATE('-', ' - -ABC', my_bigint)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',' - -ABC',`t1_values`.`my_bigint`) AS `LOCATE('-', ' - -ABC', my_bigint)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 181 OR select_id IS NULL) order by id; @@ -481,8 +481,8 @@ SELECT LOCATE('-', my_varbinary_1000, 3), my_varbinary_1000, id FROM t1_values WHERE select_id = 180 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'-',`t1_values`.`my_varbinary_1000`,3) AS `LOCATE('-', my_varbinary_1000, 3)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',`t1_values`.`my_varbinary_1000`,3) AS `LOCATE('-', my_varbinary_1000, 3)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 180 OR select_id IS NULL) order by id; @@ -495,8 +495,8 @@ SELECT LOCATE('-', my_binary_30, 3), my_binary_30, id FROM t1_values WHERE select_id = 179 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'-',`t1_values`.`my_binary_30`,3) AS `LOCATE('-', my_binary_30, 3)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',`t1_values`.`my_binary_30`,3) AS `LOCATE('-', my_binary_30, 3)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 179 OR select_id IS NULL) order by id; @@ -509,8 +509,8 @@ SELECT LOCATE('-', my_varchar_1000, 3), my_varchar_1000, id FROM t1_values WHERE select_id = 178 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'-',`t1_values`.`my_varchar_1000`,3) AS `LOCATE('-', my_varchar_1000, 3)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',`t1_values`.`my_varchar_1000`,3) AS `LOCATE('-', my_varchar_1000, 3)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 178 OR select_id IS NULL) order by id; @@ -523,8 +523,8 @@ SELECT LOCATE('-', my_char_30, 3), my_char_30, id FROM t1_values WHERE select_id = 177 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'-',`t1_values`.`my_char_30`,3) AS `LOCATE('-', my_char_30, 3)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',`t1_values`.`my_char_30`,3) AS `LOCATE('-', my_char_30, 3)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 177 OR select_id IS NULL) order by id; @@ -537,8 +537,8 @@ SELECT LOCATE(my_varbinary_1000, my_binary_30 ), my_varbinary_1000, my_binary_30 id FROM t1_values WHERE select_id = 176 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_binary_30`) AS `LOCATE(my_varbinary_1000, my_binary_30 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`my_binary_30` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_binary_30`) AS `LOCATE(my_varbinary_1000, my_binary_30 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`my_binary_30` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 176 OR select_id IS NULL) order by id; @@ -551,8 +551,8 @@ SELECT LOCATE(my_varbinary_1000, my_varchar_1000 ), my_varbinary_1000, my_varchar_1000 id FROM t1_values WHERE select_id = 175 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_varbinary_1000, my_varchar_1000 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`my_varchar_1000` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_varbinary_1000, my_varchar_1000 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`my_varchar_1000` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 175 OR select_id IS NULL) order by id; @@ -565,8 +565,8 @@ SELECT LOCATE(my_varbinary_1000, my_char_30 ), my_varbinary_1000, my_char_30 id FROM t1_values WHERE select_id = 174 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_char_30`) AS `LOCATE(my_varbinary_1000, my_char_30 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`my_char_30` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_char_30`) AS `LOCATE(my_varbinary_1000, my_char_30 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`my_char_30` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 174 OR select_id IS NULL) order by id; @@ -579,8 +579,8 @@ SELECT LOCATE(my_varbinary_1000, my_varbinary_1000 ), my_varbinary_1000, id FROM t1_values WHERE select_id = 173 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_varbinary_1000, my_varbinary_1000 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_varbinary_1000, my_varbinary_1000 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 173 OR select_id IS NULL) order by id; @@ -593,8 +593,8 @@ SELECT LOCATE(my_binary_30, my_varbinary_1000 ), my_binary_30, my_varbinary_1000 id FROM t1_values WHERE select_id = 172 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_binary_30`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_binary_30, my_varbinary_1000 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`my_varbinary_1000` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_binary_30`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_binary_30, my_varbinary_1000 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`my_varbinary_1000` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 172 OR select_id IS NULL) order by id; @@ -607,8 +607,8 @@ SELECT LOCATE(my_binary_30, my_varchar_1000 ), my_binary_30, my_varchar_1000 id FROM t1_values WHERE select_id = 171 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_binary_30`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_binary_30, my_varchar_1000 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`my_varchar_1000` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_binary_30`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_binary_30, my_varchar_1000 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`my_varchar_1000` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 171 OR select_id IS NULL) order by id; @@ -621,8 +621,8 @@ SELECT LOCATE(my_binary_30, my_char_30 ), my_binary_30, my_char_30 id FROM t1_values WHERE select_id = 170 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_binary_30`,`t1_values`.`my_char_30`) AS `LOCATE(my_binary_30, my_char_30 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`my_char_30` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_binary_30`,`t1_values`.`my_char_30`) AS `LOCATE(my_binary_30, my_char_30 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`my_char_30` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 170 OR select_id IS NULL) order by id; @@ -635,8 +635,8 @@ SELECT LOCATE(my_binary_30, my_binary_30 ), my_binary_30, id FROM t1_values WHERE select_id = 169 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_binary_30`,`t1_values`.`my_binary_30`) AS `LOCATE(my_binary_30, my_binary_30 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_binary_30`,`t1_values`.`my_binary_30`) AS `LOCATE(my_binary_30, my_binary_30 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 169 OR select_id IS NULL) order by id; @@ -649,8 +649,8 @@ SELECT LOCATE(my_varchar_1000, my_varbinary_1000 ), my_varchar_1000, my_varbinary_1000 id FROM t1_values WHERE select_id = 168 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_varchar_1000, my_varbinary_1000 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`my_varbinary_1000` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_varchar_1000, my_varbinary_1000 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`my_varbinary_1000` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 168 OR select_id IS NULL) order by id; @@ -663,8 +663,8 @@ SELECT LOCATE(my_varchar_1000, my_binary_30 ), my_varchar_1000, my_binary_30 id FROM t1_values WHERE select_id = 167 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_binary_30`) AS `LOCATE(my_varchar_1000, my_binary_30 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`my_binary_30` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_binary_30`) AS `LOCATE(my_varchar_1000, my_binary_30 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`my_binary_30` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 167 OR select_id IS NULL) order by id; @@ -677,8 +677,8 @@ SELECT LOCATE(my_varchar_1000, my_char_30 ), my_varchar_1000, my_char_30 id FROM t1_values WHERE select_id = 166 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_char_30`) AS `LOCATE(my_varchar_1000, my_char_30 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`my_char_30` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_char_30`) AS `LOCATE(my_varchar_1000, my_char_30 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`my_char_30` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 166 OR select_id IS NULL) order by id; @@ -691,8 +691,8 @@ SELECT LOCATE(my_varchar_1000, my_varchar_1000 ), my_varchar_1000, id FROM t1_values WHERE select_id = 165 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_varchar_1000, my_varchar_1000 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_varchar_1000, my_varchar_1000 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 165 OR select_id IS NULL) order by id; @@ -705,8 +705,8 @@ SELECT LOCATE(my_char_30, my_varbinary_1000 ), my_char_30, my_varbinary_1000 id FROM t1_values WHERE select_id = 164 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_char_30`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_char_30, my_varbinary_1000 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`my_varbinary_1000` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_char_30`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_char_30, my_varbinary_1000 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`my_varbinary_1000` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 164 OR select_id IS NULL) order by id; @@ -719,8 +719,8 @@ SELECT LOCATE(my_char_30, my_binary_30 ), my_char_30, my_binary_30 id FROM t1_values WHERE select_id = 163 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_char_30`,`t1_values`.`my_binary_30`) AS `LOCATE(my_char_30, my_binary_30 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`my_binary_30` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_char_30`,`t1_values`.`my_binary_30`) AS `LOCATE(my_char_30, my_binary_30 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`my_binary_30` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 163 OR select_id IS NULL) order by id; @@ -733,8 +733,8 @@ SELECT LOCATE(my_char_30, my_varchar_1000 ), my_char_30, my_varchar_1000 id FROM t1_values WHERE select_id = 162 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_char_30`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_char_30, my_varchar_1000 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`my_varchar_1000` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_char_30`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_char_30, my_varchar_1000 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`my_varchar_1000` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 162 OR select_id IS NULL) order by id; @@ -747,8 +747,8 @@ SELECT LOCATE(my_char_30, my_char_30 ), my_char_30, id FROM t1_values WHERE select_id = 161 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_char_30`,`t1_values`.`my_char_30`) AS `LOCATE(my_char_30, my_char_30 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_char_30`,`t1_values`.`my_char_30`) AS `LOCATE(my_char_30, my_char_30 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 161 OR select_id IS NULL) order by id; @@ -761,8 +761,8 @@ SELECT LOCATE('char', my_varbinary_1000), my_varbinary_1000, id FROM t1_values WHERE select_id = 160 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'char',`t1_values`.`my_varbinary_1000`) AS `LOCATE('char', my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('char',`t1_values`.`my_varbinary_1000`) AS `LOCATE('char', my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 160 OR select_id IS NULL) order by id; @@ -775,8 +775,8 @@ SELECT LOCATE('char', my_binary_30), my_binary_30, id FROM t1_values WHERE select_id = 159 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'char',`t1_values`.`my_binary_30`) AS `LOCATE('char', my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('char',`t1_values`.`my_binary_30`) AS `LOCATE('char', my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 159 OR select_id IS NULL) order by id; @@ -789,8 +789,8 @@ SELECT LOCATE('char', my_varchar_1000), my_varchar_1000, id FROM t1_values WHERE select_id = 158 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'char',`t1_values`.`my_varchar_1000`) AS `LOCATE('char', my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('char',`t1_values`.`my_varchar_1000`) AS `LOCATE('char', my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 158 OR select_id IS NULL) order by id; @@ -803,8 +803,8 @@ SELECT LOCATE('char', my_char_30), my_char_30, id FROM t1_values WHERE select_id = 157 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'char',`t1_values`.`my_char_30`) AS `LOCATE('char', my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('char',`t1_values`.`my_char_30`) AS `LOCATE('char', my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 157 OR select_id IS NULL) order by id; @@ -830,8 +830,8 @@ Here is content from load_file Here is content from load_file 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select load_file(_latin1'/std_data_ln/funcs_1/load_file.txt') AS `my_col`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select load_file('/std_data_ln/funcs_1/load_file.txt') AS `my_col`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 156 OR select_id IS NULL) order by id; @@ -855,8 +855,8 @@ SELECT LENGTH(my_varbinary_1000), my_varbinary_1000, id FROM t1_values WHERE select_id = 155 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select length(`t1_values`.`my_varbinary_1000`) AS `LENGTH(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select length(`t1_values`.`my_varbinary_1000`) AS `LENGTH(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 155 OR select_id IS NULL) order by id; @@ -869,8 +869,8 @@ SELECT LENGTH(my_binary_30), my_binary_30, id FROM t1_values WHERE select_id = 154 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select length(`t1_values`.`my_binary_30`) AS `LENGTH(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select length(`t1_values`.`my_binary_30`) AS `LENGTH(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 154 OR select_id IS NULL) order by id; @@ -883,8 +883,8 @@ SELECT LENGTH(my_varchar_1000), my_varchar_1000, id FROM t1_values WHERE select_id = 153 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select length(`t1_values`.`my_varchar_1000`) AS `LENGTH(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select length(`t1_values`.`my_varchar_1000`) AS `LENGTH(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 153 OR select_id IS NULL) order by id; @@ -897,8 +897,8 @@ SELECT LENGTH(my_char_30), my_char_30, id FROM t1_values WHERE select_id = 152 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select length(`t1_values`.`my_char_30`) AS `LENGTH(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select length(`t1_values`.`my_char_30`) AS `LENGTH(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 152 OR select_id IS NULL) order by id; @@ -918,8 +918,8 @@ Warnings: Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e+308' Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e+308' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(_latin1'AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_double`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_double)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_double`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_double)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 151 OR select_id IS NULL) order by id; @@ -948,8 +948,8 @@ Warnings: Error 1292 Truncated incorrect DECIMAL value: '' Error 1292 Truncated incorrect DECIMAL value: '' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(_latin1'AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_decimal`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_decimal`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 150 OR select_id IS NULL) order by id; @@ -975,8 +975,8 @@ AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 9223372036854775807 3 0 4 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(_latin1'AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_bigint`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_bigint)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_bigint`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_bigint)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 149 OR select_id IS NULL) order by id; @@ -999,8 +999,8 @@ NULL NULL 1 - ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_varbinary_1000`,2) AS `LEFT(my_varbinary_1000, 2)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_varbinary_1000`,2) AS `LEFT(my_varbinary_1000, 2)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 148 OR select_id IS NULL) order by id; @@ -1023,8 +1023,8 @@ NULL NULL 1 - ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_binary_30`,2) AS `LEFT(my_binary_30, 2)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_binary_30`,2) AS `LEFT(my_binary_30, 2)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 147 OR select_id IS NULL) order by id; @@ -1047,8 +1047,8 @@ NULL NULL 1 - ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_varchar_1000`,2) AS `LEFT(my_varchar_1000, 2)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_varchar_1000`,2) AS `LEFT(my_varchar_1000, 2)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 146 OR select_id IS NULL) order by id; @@ -1071,8 +1071,8 @@ NULL NULL 1 - ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_char_30`,2) AS `LEFT(my_char_30, 2)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_char_30`,2) AS `LEFT(my_char_30, 2)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 145 OR select_id IS NULL) order by id; @@ -1091,8 +1091,8 @@ SELECT LCASE(my_varchar_1000), my_varchar_1000, id FROM t1_values WHERE select_id = 144 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_varchar_1000`) AS `LCASE(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_varchar_1000`) AS `LCASE(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 144 OR select_id IS NULL) order by id; @@ -1105,8 +1105,8 @@ SELECT INSTR(my_char_30, 'char'), my_char_30, id FROM t1_values WHERE select_id = 143 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'char',`t1_values`.`my_char_30`) AS `INSTR(my_char_30, 'char')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('char',`t1_values`.`my_char_30`) AS `INSTR(my_char_30, 'char')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 143 OR select_id IS NULL) order by id; @@ -1125,8 +1125,8 @@ NULL NULL 1 160 ---äÖüß@µ*$-- 4 16 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_varbinary_1000`) AS `BIT_LENGTH(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_varbinary_1000`) AS `BIT_LENGTH(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 142 OR select_id IS NULL) order by id; @@ -1151,8 +1151,8 @@ NULL NULL 1 240 ---äÖüß@µ*$-- 4 240 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_binary_30`) AS `BIT_LENGTH(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_binary_30`) AS `BIT_LENGTH(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 141 OR select_id IS NULL) order by id; @@ -1177,8 +1177,8 @@ NULL NULL 1 160 ---äÖüß@µ*$-- 4 16 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_varchar_1000`) AS `BIT_LENGTH(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_varchar_1000`) AS `BIT_LENGTH(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 140 OR select_id IS NULL) order by id; @@ -1203,8 +1203,8 @@ NULL NULL 1 152 ---äÖüß@µ*$-- 4 16 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_char_30`) AS `BIT_LENGTH(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_char_30`) AS `BIT_LENGTH(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 139 OR select_id IS NULL) order by id; @@ -1229,8 +1229,8 @@ IS_NULL NULL 1 2000 2000 4 2005 2005 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_year`,_latin1'IS_NULL') AS `IFNULL(my_year,'IS_NULL')`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_year`,'IS_NULL') AS `IFNULL(my_year,'IS_NULL')`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 138 OR select_id IS NULL) order by id; @@ -1255,8 +1255,8 @@ IS_NULL NULL 1 13:00:00 13:00:00 4 10:00:00 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_time`,_latin1'IS_NULL') AS `IFNULL(my_time,'IS_NULL')`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_time`,'IS_NULL') AS `IFNULL(my_time,'IS_NULL')`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 137 OR select_id IS NULL) order by id; @@ -1281,8 +1281,8 @@ IFNULL(my_timestamp,'IS_NULL') my_timestamp id 2004-02-29 23:59:59 2004-02-29 23:59:59 4 2005-06-28 10:00:00 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_timestamp`,_latin1'IS_NULL') AS `IFNULL(my_timestamp,'IS_NULL')`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_timestamp`,'IS_NULL') AS `IFNULL(my_timestamp,'IS_NULL')`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 136 OR select_id IS NULL) order by id; @@ -1307,8 +1307,8 @@ IS_NULL NULL 1 2004-02-29 2004-02-29 4 2005-06-28 2005-06-28 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_date`,_latin1'IS_NULL') AS `IFNULL(my_date,'IS_NULL')`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_date`,'IS_NULL') AS `IFNULL(my_date,'IS_NULL')`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 135 OR select_id IS NULL) order by id; @@ -1333,8 +1333,8 @@ IS_NULL NULL 1 2004-02-29 23:59:59 2004-02-29 23:59:59 4 2005-06-28 10:00:00 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_datetime`,_latin1'IS_NULL') AS `IFNULL(my_datetime,'IS_NULL')`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_datetime`,'IS_NULL') AS `IFNULL(my_datetime,'IS_NULL')`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 134 OR select_id IS NULL) order by id; @@ -1359,8 +1359,8 @@ IS_NULL NULL 1 0 0 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_double`,_latin1'IS_NULL') AS `IFNULL(my_double,'IS_NULL')`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_double`,'IS_NULL') AS `IFNULL(my_double,'IS_NULL')`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 133 OR select_id IS NULL) order by id; @@ -1385,8 +1385,8 @@ IS_NULL NULL 1 0.000000000000000000000000000000 0.000000000000000000000000000000 4 -1.000000000000000000000000000000 -1.000000000000000000000000000000 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_decimal`,_latin1'IS_NULL') AS `IFNULL(my_decimal,'IS_NULL')`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_decimal`,'IS_NULL') AS `IFNULL(my_decimal,'IS_NULL')`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 132 OR select_id IS NULL) order by id; @@ -1411,8 +1411,8 @@ IS_NULL NULL 1 0 0 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_bigint`,_latin1'IS_NULL') AS `IFNULL(my_bigint,'IS_NULL')`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_bigint`,'IS_NULL') AS `IFNULL(my_bigint,'IS_NULL')`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 131 OR select_id IS NULL) order by id; @@ -1437,8 +1437,8 @@ IS_NULL NULL 1 ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_varbinary_1000`,_latin1'IS_NULL') AS `IFNULL(my_varbinary_1000,'IS_NULL')`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_varbinary_1000`,'IS_NULL') AS `IFNULL(my_varbinary_1000,'IS_NULL')`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 130 OR select_id IS NULL) order by id; @@ -1463,8 +1463,8 @@ IS_NULL NULL 1 ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_binary_30`,_latin1'IS_NULL') AS `IFNULL(my_binary_30,'IS_NULL')`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_binary_30`,'IS_NULL') AS `IFNULL(my_binary_30,'IS_NULL')`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 129 OR select_id IS NULL) order by id; @@ -1489,8 +1489,8 @@ IS_NULL NULL 1 ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_varchar_1000`,_latin1'IS_NULL') AS `IFNULL(my_varchar_1000,'IS_NULL')`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_varchar_1000`,'IS_NULL') AS `IFNULL(my_varchar_1000,'IS_NULL')`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 128 OR select_id IS NULL) order by id; @@ -1515,8 +1515,8 @@ IS_NULL NULL 1 ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_char_30`,_latin1'IS_NULL') AS `IFNULL(my_char_30,'IS_NULL')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_char_30`,'IS_NULL') AS `IFNULL(my_char_30,'IS_NULL')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 127 OR select_id IS NULL) order by id; @@ -1542,9 +1542,9 @@ IS NOT NULL 2155 3 IS NOT NULL 2000 4 IS NOT NULL 2005 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_year`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_year IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_year`),'IS NULL','IS NOT NULL') AS `IF(my_year IS NULL, 'IS NULL', +'IS NOT NULL')`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 126 OR select_id IS NULL) order by id; @@ -1571,9 +1571,9 @@ IS NOT NULL 838:59:59 3 IS NOT NULL 13:00:00 4 IS NOT NULL 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_time`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_time IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_time`),'IS NULL','IS NOT NULL') AS `IF(my_time IS NULL, 'IS NULL', +'IS NOT NULL')`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 125 OR select_id IS NULL) order by id; @@ -1600,9 +1600,9 @@ IS NOT NULL 2038-01-01 02:59:59 3 IS NOT NULL 2004-02-29 23:59:59 4 IS NOT NULL 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_timestamp`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_timestamp IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_timestamp`),'IS NULL','IS NOT NULL') AS `IF(my_timestamp IS NULL, 'IS NULL', +'IS NOT NULL')`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 124 OR select_id IS NULL) order by id; @@ -1629,9 +1629,9 @@ IS NOT NULL 9999-12-31 3 IS NOT NULL 2004-02-29 4 IS NOT NULL 2005-06-28 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_date`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_date IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_date`),'IS NULL','IS NOT NULL') AS `IF(my_date IS NULL, 'IS NULL', +'IS NOT NULL')`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 123 OR select_id IS NULL) order by id; @@ -1658,9 +1658,9 @@ IS NOT NULL 9999-12-31 23:59:59 3 IS NOT NULL 2004-02-29 23:59:59 4 IS NOT NULL 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_datetime`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_datetime IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_datetime`),'IS NULL','IS NOT NULL') AS `IF(my_datetime IS NULL, 'IS NULL', +'IS NOT NULL')`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 122 OR select_id IS NULL) order by id; @@ -1687,9 +1687,9 @@ IS NOT NULL 1.7976931348623e+308 3 IS NOT NULL 0 4 IS NOT NULL -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_double`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_double IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_double`),'IS NULL','IS NOT NULL') AS `IF(my_double IS NULL, 'IS NULL', +'IS NOT NULL')`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 121 OR select_id IS NULL) order by id; @@ -1716,9 +1716,9 @@ IS NOT NULL 9999999999999999999999999999999999.999999999999999999999999999999 3 IS NOT NULL 0.000000000000000000000000000000 4 IS NOT NULL -1.000000000000000000000000000000 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_decimal`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_decimal IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_decimal`),'IS NULL','IS NOT NULL') AS `IF(my_decimal IS NULL, 'IS NULL', +'IS NOT NULL')`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 120 OR select_id IS NULL) order by id; @@ -1745,9 +1745,9 @@ IS NOT NULL 9223372036854775807 3 IS NOT NULL 0 4 IS NOT NULL -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_bigint`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_bigint IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_bigint`),'IS NULL','IS NOT NULL') AS `IF(my_bigint IS NULL, 'IS NULL', +'IS NOT NULL')`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 119 OR select_id IS NULL) order by id; @@ -1774,9 +1774,9 @@ IS NOT NULL <---------1000 characters------------------------------------------- IS NOT NULL ---äÖüß@µ*$-- 4 IS NOT NULL -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_varbinary_1000`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_varbinary_1000 IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_varbinary_1000`),'IS NULL','IS NOT NULL') AS `IF(my_varbinary_1000 IS NULL, 'IS NULL', +'IS NOT NULL')`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 118 OR select_id IS NULL) order by id; @@ -1803,9 +1803,9 @@ IS NOT NULL <--------30 characters-------> 3 IS NOT NULL ---äÖüß@µ*$-- 4 IS NOT NULL -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_binary_30`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_binary_30 IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_binary_30`),'IS NULL','IS NOT NULL') AS `IF(my_binary_30 IS NULL, 'IS NULL', +'IS NOT NULL')`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 117 OR select_id IS NULL) order by id; @@ -1832,9 +1832,9 @@ IS NOT NULL <---------1000 characters------------------------------------------- IS NOT NULL ---äÖüß@µ*$-- 4 IS NOT NULL -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_varchar_1000`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_varchar_1000 IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_varchar_1000`),'IS NULL','IS NOT NULL') AS `IF(my_varchar_1000 IS NULL, 'IS NULL', +'IS NOT NULL')`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 116 OR select_id IS NULL) order by id; @@ -1861,9 +1861,9 @@ IS NOT NULL <--------30 characters-------> 3 IS NOT NULL ---äÖüß@µ*$-- 4 IS NOT NULL -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_char_30`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_char_30 IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_char_30`),'IS NULL','IS NOT NULL') AS `IF(my_char_30 IS NULL, 'IS NULL', +'IS NOT NULL')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 115 OR select_id IS NULL) order by id; @@ -1889,8 +1889,8 @@ IS TRUE 2155 3 IS TRUE 2000 4 IS TRUE 2005 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_year`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_year, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_year`,'IS TRUE','IS NOT TRUE') AS `IF(my_year, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 114 OR select_id IS NULL) order by id; @@ -1915,8 +1915,8 @@ IS TRUE 838:59:59 3 IS TRUE 13:00:00 4 IS TRUE 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_time`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_time, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_time`,'IS TRUE','IS NOT TRUE') AS `IF(my_time, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 113 OR select_id IS NULL) order by id; @@ -1941,8 +1941,8 @@ IS TRUE 2038-01-01 02:59:59 3 IS TRUE 2004-02-29 23:59:59 4 IS TRUE 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_timestamp`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_timestamp, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_timestamp`,'IS TRUE','IS NOT TRUE') AS `IF(my_timestamp, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 112 OR select_id IS NULL) order by id; @@ -1967,8 +1967,8 @@ IS TRUE 9999-12-31 3 IS TRUE 2004-02-29 4 IS TRUE 2005-06-28 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_date`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_date, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_date`,'IS TRUE','IS NOT TRUE') AS `IF(my_date, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 111 OR select_id IS NULL) order by id; @@ -1993,8 +1993,8 @@ IS TRUE 9999-12-31 23:59:59 3 IS TRUE 2004-02-29 23:59:59 4 IS TRUE 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_datetime`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_datetime, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_datetime`,'IS TRUE','IS NOT TRUE') AS `IF(my_datetime, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 110 OR select_id IS NULL) order by id; @@ -2019,8 +2019,8 @@ IS TRUE 1.7976931348623e+308 3 IS NOT TRUE 0 4 IS TRUE -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_double`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_double, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_double`,'IS TRUE','IS NOT TRUE') AS `IF(my_double, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 109 OR select_id IS NULL) order by id; @@ -2045,8 +2045,8 @@ IS TRUE 9999999999999999999999999999999999.999999999999999999999999999999 3 IS NOT TRUE 0.000000000000000000000000000000 4 IS TRUE -1.000000000000000000000000000000 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_decimal`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_decimal, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_decimal`,'IS TRUE','IS NOT TRUE') AS `IF(my_decimal, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 108 OR select_id IS NULL) order by id; @@ -2071,8 +2071,8 @@ IS TRUE 9223372036854775807 3 IS NOT TRUE 0 4 IS TRUE -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_bigint`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_bigint, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_bigint`,'IS TRUE','IS NOT TRUE') AS `IF(my_bigint, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 107 OR select_id IS NULL) order by id; @@ -2097,8 +2097,8 @@ IS NOT TRUE <---------1000 characters------------------------------------------- IS NOT TRUE ---äÖüß@µ*$-- 4 IS TRUE -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_varbinary_1000`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_varbinary_1000, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_varbinary_1000`,'IS TRUE','IS NOT TRUE') AS `IF(my_varbinary_1000, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 106 OR select_id IS NULL) order by id; @@ -2128,8 +2128,8 @@ Warning 1292 Truncated incorrect DOUBLE value: '<--------30 characters------->' Warning 1292 Truncated incorrect DOUBLE value: ' ---äÖüß@µ*$-- ' Warning 1292 Truncated incorrect DOUBLE value: '-1' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_binary_30`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_binary_30, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_binary_30`,'IS TRUE','IS NOT TRUE') AS `IF(my_binary_30, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 105 OR select_id IS NULL) order by id; @@ -2159,8 +2159,8 @@ IS NOT TRUE <---------1000 characters------------------------------------------- IS NOT TRUE ---äÖüß@µ*$-- 4 IS TRUE -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_varchar_1000`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_varchar_1000, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_varchar_1000`,'IS TRUE','IS NOT TRUE') AS `IF(my_varchar_1000, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 104 OR select_id IS NULL) order by id; @@ -2188,8 +2188,8 @@ Warnings: Warning 1292 Truncated incorrect DOUBLE value: '<--------30 characters------->' Warning 1292 Truncated incorrect DOUBLE value: ' ---äÖüß@µ*$-- ' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_char_30`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_char_30, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_char_30`,'IS TRUE','IS NOT TRUE') AS `IF(my_char_30, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 103 OR select_id IS NULL) order by id; @@ -2217,8 +2217,8 @@ NULL NULL 1 ---???????÷@??*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_varbinary_1000` using koi8r) AS `CONVERT(my_varbinary_1000 USING koi8r)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_varbinary_1000` using koi8r) AS `CONVERT(my_varbinary_1000 USING koi8r)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 102 OR select_id IS NULL) order by id; @@ -2243,8 +2243,8 @@ NULL NULL 1 ---???????÷@??*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_binary_30` using koi8r) AS `CONVERT(my_binary_30 USING koi8r)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_binary_30` using koi8r) AS `CONVERT(my_binary_30 USING koi8r)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 101 OR select_id IS NULL) order by id; @@ -2269,8 +2269,8 @@ NULL NULL 1 ---????????@??*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_varchar_1000` using koi8r) AS `CONVERT(my_varchar_1000 USING koi8r)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_varchar_1000` using koi8r) AS `CONVERT(my_varchar_1000 USING koi8r)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 100 OR select_id IS NULL) order by id; @@ -2295,8 +2295,8 @@ NULL NULL 1 ---????????@??*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_char_30` using koi8r) AS `CONVERT(my_char_30 USING koi8r)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_char_30` using koi8r) AS `CONVERT(my_char_30 USING koi8r)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 99 OR select_id IS NULL) order by id; @@ -2321,8 +2321,8 @@ NULL NULL 1 ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_varbinary_1000` using utf8) AS `CONVERT(my_varbinary_1000 USING utf8)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_varbinary_1000` using utf8) AS `CONVERT(my_varbinary_1000 USING utf8)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 98 OR select_id IS NULL) order by id; @@ -2347,8 +2347,8 @@ NULL NULL 1 ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_binary_30` using utf8) AS `CONVERT(my_binary_30 USING utf8)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_binary_30` using utf8) AS `CONVERT(my_binary_30 USING utf8)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 97 OR select_id IS NULL) order by id; @@ -2373,8 +2373,8 @@ NULL NULL 1 ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_varchar_1000` using utf8) AS `CONVERT(my_varchar_1000 USING utf8)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_varchar_1000` using utf8) AS `CONVERT(my_varchar_1000 USING utf8)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 96 OR select_id IS NULL) order by id; @@ -2399,8 +2399,8 @@ NULL NULL 1 ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_char_30` using utf8) AS `CONVERT(my_char_30 USING utf8)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_char_30` using utf8) AS `CONVERT(my_char_30 USING utf8)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 95 OR select_id IS NULL) order by id; @@ -2425,8 +2425,8 @@ NULL NULL 1 2000 2000 4 2005 2005 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as unsigned) AS `CAST(my_year AS UNSIGNED INTEGER)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as unsigned) AS `CAST(my_year AS UNSIGNED INTEGER)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 94 OR select_id IS NULL) order by id; @@ -2451,8 +2451,8 @@ NULL NULL 1 130000 13:00:00 4 100000 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as unsigned) AS `CAST(my_time AS UNSIGNED INTEGER)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as unsigned) AS `CAST(my_time AS UNSIGNED INTEGER)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 93 OR select_id IS NULL) order by id; @@ -2477,8 +2477,8 @@ CAST(my_timestamp AS UNSIGNED INTEGER) my_timestamp id 20040229235959 2004-02-29 23:59:59 4 20050628100000 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as unsigned) AS `CAST(my_timestamp AS UNSIGNED INTEGER)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as unsigned) AS `CAST(my_timestamp AS UNSIGNED INTEGER)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 92 OR select_id IS NULL) order by id; @@ -2503,8 +2503,8 @@ NULL NULL 1 20040229 2004-02-29 4 20050628 2005-06-28 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as unsigned) AS `CAST(my_date AS UNSIGNED INTEGER)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as unsigned) AS `CAST(my_date AS UNSIGNED INTEGER)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 91 OR select_id IS NULL) order by id; @@ -2529,8 +2529,8 @@ NULL NULL 1 20040229235959 2004-02-29 23:59:59 4 20050628100000 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as unsigned) AS `CAST(my_datetime AS UNSIGNED INTEGER)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as unsigned) AS `CAST(my_datetime AS UNSIGNED INTEGER)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 90 OR select_id IS NULL) order by id; @@ -2558,8 +2558,8 @@ Warnings: Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e+308' Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e+308' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as unsigned) AS `CAST(my_double AS UNSIGNED INTEGER)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as unsigned) AS `CAST(my_double AS UNSIGNED INTEGER)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 89 OR select_id IS NULL) order by id; @@ -2591,8 +2591,8 @@ Error 1292 Truncated incorrect DECIMAL value: '' Error 1292 Truncated incorrect DECIMAL value: '' Error 1292 Truncated incorrect DECIMAL value: '' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as unsigned) AS `CAST(my_decimal AS UNSIGNED INTEGER)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as unsigned) AS `CAST(my_decimal AS UNSIGNED INTEGER)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 88 OR select_id IS NULL) order by id; @@ -2621,8 +2621,8 @@ NULL NULL 1 0 0 4 18446744073709551615 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as unsigned) AS `CAST(my_bigint AS UNSIGNED INTEGER)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as unsigned) AS `CAST(my_bigint AS UNSIGNED INTEGER)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 87 OR select_id IS NULL) order by id; @@ -2652,8 +2652,8 @@ Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters------ Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- ' Warning 1105 Cast to unsigned converted negative integer to it's positive complement SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as unsigned) AS `CAST(my_varbinary_1000 AS UNSIGNED INTEGER)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as unsigned) AS `CAST(my_varbinary_1000 AS UNSIGNED INTEGER)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 86 OR select_id IS NULL) order by id; @@ -2689,8 +2689,8 @@ Warning 1292 Truncated incorrect INTEGER value: ' --- Warning 1292 Truncated incorrect INTEGER value: '-1' Warning 1105 Cast to unsigned converted negative integer to it's positive complement SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as unsigned) AS `CAST(my_binary_30 AS UNSIGNED INTEGER)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as unsigned) AS `CAST(my_binary_30 AS UNSIGNED INTEGER)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 85 OR select_id IS NULL) order by id; @@ -2726,8 +2726,8 @@ Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters------ Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- ' Warning 1105 Cast to unsigned converted negative integer to it's positive complement SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as unsigned) AS `CAST(my_varchar_1000 AS UNSIGNED INTEGER)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as unsigned) AS `CAST(my_varchar_1000 AS UNSIGNED INTEGER)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 84 OR select_id IS NULL) order by id; @@ -2762,8 +2762,8 @@ Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->' Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$--' Warning 1105 Cast to unsigned converted negative integer to it's positive complement SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as unsigned) AS `CAST(my_char_30 AS UNSIGNED INTEGER)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as unsigned) AS `CAST(my_char_30 AS UNSIGNED INTEGER)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 83 OR select_id IS NULL) order by id; @@ -2793,8 +2793,8 @@ NULL NULL 1 2000 2000 4 2005 2005 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as signed) AS `CAST(my_year AS SIGNED INTEGER)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as signed) AS `CAST(my_year AS SIGNED INTEGER)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 82 OR select_id IS NULL) order by id; @@ -2819,8 +2819,8 @@ NULL NULL 1 130000 13:00:00 4 100000 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as signed) AS `CAST(my_time AS SIGNED INTEGER)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as signed) AS `CAST(my_time AS SIGNED INTEGER)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 81 OR select_id IS NULL) order by id; @@ -2845,8 +2845,8 @@ CAST(my_timestamp AS SIGNED INTEGER) my_timestamp id 20040229235959 2004-02-29 23:59:59 4 20050628100000 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as signed) AS `CAST(my_timestamp AS SIGNED INTEGER)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as signed) AS `CAST(my_timestamp AS SIGNED INTEGER)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 80 OR select_id IS NULL) order by id; @@ -2871,8 +2871,8 @@ NULL NULL 1 20040229 2004-02-29 4 20050628 2005-06-28 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as signed) AS `CAST(my_date AS SIGNED INTEGER)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as signed) AS `CAST(my_date AS SIGNED INTEGER)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 79 OR select_id IS NULL) order by id; @@ -2897,8 +2897,8 @@ NULL NULL 1 20040229235959 2004-02-29 23:59:59 4 20050628100000 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as signed) AS `CAST(my_datetime AS SIGNED INTEGER)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as signed) AS `CAST(my_datetime AS SIGNED INTEGER)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 78 OR select_id IS NULL) order by id; @@ -2926,8 +2926,8 @@ Warnings: Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e+308' Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e+308' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as signed) AS `CAST(my_double AS SIGNED INTEGER)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as signed) AS `CAST(my_double AS SIGNED INTEGER)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 77 OR select_id IS NULL) order by id; @@ -2958,8 +2958,8 @@ Warnings: Error 1292 Truncated incorrect DECIMAL value: '' Error 1292 Truncated incorrect DECIMAL value: '' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as signed) AS `CAST(my_decimal AS SIGNED INTEGER)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as signed) AS `CAST(my_decimal AS SIGNED INTEGER)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 76 OR select_id IS NULL) order by id; @@ -2987,8 +2987,8 @@ NULL NULL 1 0 0 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as signed) AS `CAST(my_bigint AS SIGNED INTEGER)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as signed) AS `CAST(my_bigint AS SIGNED INTEGER)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 75 OR select_id IS NULL) order by id; @@ -3017,8 +3017,8 @@ Warning 1292 Truncated incorrect INTEGER value: '' Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- ' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as signed) AS `CAST(my_varbinary_1000 AS SIGNED INTEGER)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as signed) AS `CAST(my_varbinary_1000 AS SIGNED INTEGER)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 74 OR select_id IS NULL) order by id; @@ -3052,8 +3052,8 @@ Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->' Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- ' Warning 1292 Truncated incorrect INTEGER value: '-1' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as signed) AS `CAST(my_binary_30 AS SIGNED INTEGER)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as signed) AS `CAST(my_binary_30 AS SIGNED INTEGER)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 73 OR select_id IS NULL) order by id; @@ -3087,8 +3087,8 @@ Warning 1292 Truncated incorrect INTEGER value: '' Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- ' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as signed) AS `CAST(my_varchar_1000 AS SIGNED INTEGER)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as signed) AS `CAST(my_varchar_1000 AS SIGNED INTEGER)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 72 OR select_id IS NULL) order by id; @@ -3121,8 +3121,8 @@ Warning 1292 Truncated incorrect INTEGER value: '' Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->' Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$--' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as signed) AS `CAST(my_char_30 AS SIGNED INTEGER)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as signed) AS `CAST(my_char_30 AS SIGNED INTEGER)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 71 OR select_id IS NULL) order by id; @@ -3151,8 +3151,8 @@ NULL NULL 1 2000.00 2000 4 2005.00 2005 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as decimal(37,2)) AS `CAST(my_year AS DECIMAL(37,2))`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as decimal(37,2)) AS `CAST(my_year AS DECIMAL(37,2))`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 70 OR select_id IS NULL) order by id; @@ -3177,8 +3177,8 @@ NULL NULL 1 130000.00 13:00:00 4 100000.00 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as decimal(37,2)) AS `CAST(my_time AS DECIMAL(37,2))`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as decimal(37,2)) AS `CAST(my_time AS DECIMAL(37,2))`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 69 OR select_id IS NULL) order by id; @@ -3203,8 +3203,8 @@ CAST(my_timestamp AS DECIMAL(37,2)) my_timestamp id 20040229235959.00 2004-02-29 23:59:59 4 20050628100000.00 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as decimal(37,2)) AS `CAST(my_timestamp AS DECIMAL(37,2))`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as decimal(37,2)) AS `CAST(my_timestamp AS DECIMAL(37,2))`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 68 OR select_id IS NULL) order by id; @@ -3229,8 +3229,8 @@ NULL NULL 1 20040229.00 2004-02-29 4 20050628.00 2005-06-28 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as decimal(37,2)) AS `CAST(my_date AS DECIMAL(37,2))`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as decimal(37,2)) AS `CAST(my_date AS DECIMAL(37,2))`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 67 OR select_id IS NULL) order by id; @@ -3255,8 +3255,8 @@ NULL NULL 1 20040229235959.00 2004-02-29 23:59:59 4 20050628100000.00 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as decimal(37,2)) AS `CAST(my_datetime AS DECIMAL(37,2))`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as decimal(37,2)) AS `CAST(my_datetime AS DECIMAL(37,2))`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 66 OR select_id IS NULL) order by id; @@ -3283,12 +3283,12 @@ NULL NULL 1 -3333.33 -3333.3333 30 Warnings: Error 1292 Truncated incorrect DECIMAL value: '' -Error 1264 Out of range value adjusted for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 +Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 Error 1292 Truncated incorrect DECIMAL value: '' -Error 1264 Out of range value adjusted for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 +Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as decimal(37,2)) AS `CAST(my_double AS DECIMAL(37,2))`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as decimal(37,2)) AS `CAST(my_double AS DECIMAL(37,2))`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 65 OR select_id IS NULL) order by id; @@ -3301,9 +3301,9 @@ NULL NULL 1 -3333.33 -3333.3333 30 Warnings: Error 1292 Truncated incorrect DECIMAL value: '' -Error 1264 Out of range value adjusted for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 +Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 Error 1292 Truncated incorrect DECIMAL value: '' -Error 1264 Out of range value adjusted for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 +Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 DROP VIEW v1; @@ -3319,8 +3319,8 @@ NULL NULL 1 0.00 0.000000000000000000000000000000 4 -1.00 -1.000000000000000000000000000000 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as decimal(37,2)) AS `CAST(my_decimal AS DECIMAL(37,2))`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as decimal(37,2)) AS `CAST(my_decimal AS DECIMAL(37,2))`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 64 OR select_id IS NULL) order by id; @@ -3345,8 +3345,8 @@ NULL NULL 1 0.00 0 4 -1.00 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as decimal(37,2)) AS `CAST(my_bigint AS DECIMAL(37,2))`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as decimal(37,2)) AS `CAST(my_bigint AS DECIMAL(37,2))`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 63 OR select_id IS NULL) order by id; @@ -3376,8 +3376,8 @@ Error 1366 Incorrect decimal value: '' for column '' at row -1 Error 1366 Incorrect decimal value: '' for column '' at row -1 Error 1366 Incorrect decimal value: '' for column '' at row -1 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as decimal(37,2)) AS `CAST(my_varbinary_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as decimal(37,2)) AS `CAST(my_varbinary_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 62 OR select_id IS NULL) order by id; @@ -3417,8 +3417,8 @@ Warning 1292 Truncated incorrect DECIMAL value: ' --- Warning 1292 Truncated incorrect DECIMAL value: '-1' Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as decimal(37,2)) AS `CAST(my_binary_30 AS DECIMAL(37,2))`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as decimal(37,2)) AS `CAST(my_binary_30 AS DECIMAL(37,2))`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 61 OR select_id IS NULL) order by id; @@ -3458,8 +3458,8 @@ Error 1366 Incorrect decimal value: '' for column '' at row -1 Error 1366 Incorrect decimal value: '' for column '' at row -1 Error 1366 Incorrect decimal value: '' for column '' at row -1 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as decimal(37,2)) AS `CAST(my_varchar_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as decimal(37,2)) AS `CAST(my_varchar_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 60 OR select_id IS NULL) order by id; @@ -3497,8 +3497,8 @@ Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->' Error 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as decimal(37,2)) AS `CAST(my_char_30 AS DECIMAL(37,2))`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as decimal(37,2)) AS `CAST(my_char_30 AS DECIMAL(37,2))`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 59 OR select_id IS NULL) order by id; @@ -3531,8 +3531,8 @@ NULL NULL 1 00:20:00 2000 4 00:20:05 2005 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as time) AS `CAST(my_year AS TIME)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as time) AS `CAST(my_year AS TIME)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 58 OR select_id IS NULL) order by id; @@ -3557,8 +3557,8 @@ NULL NULL 1 13:00:00 13:00:00 4 10:00:00 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as time) AS `CAST(my_time AS TIME)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as time) AS `CAST(my_time AS TIME)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 57 OR select_id IS NULL) order by id; @@ -3583,8 +3583,8 @@ CAST(my_timestamp AS TIME) my_timestamp id 23:59:59 2004-02-29 23:59:59 4 10:00:00 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as time) AS `CAST(my_timestamp AS TIME)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as time) AS `CAST(my_timestamp AS TIME)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 56 OR select_id IS NULL) order by id; @@ -3609,8 +3609,8 @@ NULL NULL 1 00:00:00 2004-02-29 4 00:00:00 2005-06-28 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as time) AS `CAST(my_date AS TIME)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as time) AS `CAST(my_date AS TIME)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 55 OR select_id IS NULL) order by id; @@ -3635,8 +3635,8 @@ NULL NULL 1 23:59:59 2004-02-29 23:59:59 4 10:00:00 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as time) AS `CAST(my_datetime AS TIME)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as time) AS `CAST(my_datetime AS TIME)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 54 OR select_id IS NULL) order by id; @@ -3665,8 +3665,8 @@ Warnings: Warning 1292 Truncated incorrect time value: '-1.7976931348623e+308' Warning 1292 Truncated incorrect time value: '1.7976931348623e+308' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as time) AS `CAST(my_double AS TIME)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as time) AS `CAST(my_double AS TIME)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 53 OR select_id IS NULL) order by id; @@ -3699,8 +3699,8 @@ Warnings: Warning 1292 Truncated incorrect time value: '-9223372036854775808' Warning 1292 Truncated incorrect time value: '9223372036854775807' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as time) AS `CAST(my_bigint AS TIME)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as time) AS `CAST(my_bigint AS TIME)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 52 OR select_id IS NULL) order by id; @@ -3734,8 +3734,8 @@ Warning 1292 Truncated incorrect time value: '' Warning 1292 Truncated incorrect time value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' Warning 1292 Truncated incorrect time value: ' ---äÖüß@µ*$-- ' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as time) AS `CAST(my_varbinary_1000 AS TIME)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as time) AS `CAST(my_varbinary_1000 AS TIME)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 51 OR select_id IS NULL) order by id; @@ -3772,8 +3772,8 @@ Warning 1292 Truncated incorrect time value: ' --- Warning 1292 Truncated incorrect time value: '-1' Warning 1292 Truncated incorrect time value: '1 17:58' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as time) AS `CAST(my_binary_30 AS TIME)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as time) AS `CAST(my_binary_30 AS TIME)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 50 OR select_id IS NULL) order by id; @@ -3810,8 +3810,8 @@ Warning 1292 Truncated incorrect time value: '' Warning 1292 Truncated incorrect time value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' Warning 1292 Truncated incorrect time value: ' ---äÖüß@µ*$-- ' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as time) AS `CAST(my_varchar_1000 AS TIME)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as time) AS `CAST(my_varchar_1000 AS TIME)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 49 OR select_id IS NULL) order by id; @@ -3846,8 +3846,8 @@ Warning 1292 Truncated incorrect time value: '' Warning 1292 Truncated incorrect time value: '<--------30 characters------->' Warning 1292 Truncated incorrect time value: ' ---äÖüß@µ*$--' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as time) AS `CAST(my_char_30 AS TIME)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as time) AS `CAST(my_char_30 AS TIME)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 48 OR select_id IS NULL) order by id; @@ -3877,13 +3877,13 @@ NULL 2155 3 NULL 2000 4 NULL 2005 5 Warnings: -Warning 1292 Truncated incorrect datetime value: '1901' -Warning 1292 Truncated incorrect datetime value: '2155' -Warning 1292 Truncated incorrect datetime value: '2000' -Warning 1292 Truncated incorrect datetime value: '2005' +Warning 1292 Incorrect datetime value: '1901' +Warning 1292 Incorrect datetime value: '2155' +Warning 1292 Incorrect datetime value: '2000' +Warning 1292 Incorrect datetime value: '2005' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as datetime) AS `CAST(my_year AS DATETIME)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as datetime) AS `CAST(my_year AS DATETIME)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 47 OR select_id IS NULL) order by id; @@ -3894,10 +3894,10 @@ NULL 2155 3 NULL 2000 4 NULL 2005 5 Warnings: -Warning 1292 Truncated incorrect datetime value: '1901' -Warning 1292 Truncated incorrect datetime value: '2155' -Warning 1292 Truncated incorrect datetime value: '2000' -Warning 1292 Truncated incorrect datetime value: '2005' +Warning 1292 Incorrect datetime value: '1901' +Warning 1292 Incorrect datetime value: '2155' +Warning 1292 Incorrect datetime value: '2000' +Warning 1292 Incorrect datetime value: '2005' DROP VIEW v1; @@ -3913,11 +3913,11 @@ NULL NULL 1 0000-00-00 13:00:00 13:00:00 4 0000-00-00 10:00:00 10:00:00 5 Warnings: -Warning 1292 Truncated incorrect datetime value: '0000-00-00 838:59:59' -Warning 1292 Truncated incorrect datetime value: '0000-00-00 838:59:59' +Warning 1292 Incorrect datetime value: '0000-00-00 838:59:59' +Warning 1292 Incorrect datetime value: '0000-00-00 838:59:59' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as datetime) AS `CAST(my_time AS DATETIME)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as datetime) AS `CAST(my_time AS DATETIME)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 46 OR select_id IS NULL) order by id; @@ -3928,8 +3928,8 @@ NULL NULL 1 0000-00-00 13:00:00 13:00:00 4 0000-00-00 10:00:00 10:00:00 5 Warnings: -Warning 1292 Truncated incorrect datetime value: '0000-00-00 838:59:59' -Warning 1292 Truncated incorrect datetime value: '0000-00-00 838:59:59' +Warning 1292 Incorrect datetime value: '0000-00-00 838:59:59' +Warning 1292 Incorrect datetime value: '0000-00-00 838:59:59' DROP VIEW v1; @@ -3945,8 +3945,8 @@ CAST(my_timestamp AS DATETIME) my_timestamp id 2004-02-29 23:59:59 2004-02-29 23:59:59 4 2005-06-28 10:00:00 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as datetime) AS `CAST(my_timestamp AS DATETIME)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as datetime) AS `CAST(my_timestamp AS DATETIME)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 45 OR select_id IS NULL) order by id; @@ -3971,8 +3971,8 @@ NULL NULL 1 2004-02-29 00:00:00 2004-02-29 4 2005-06-28 00:00:00 2005-06-28 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as datetime) AS `CAST(my_date AS DATETIME)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as datetime) AS `CAST(my_date AS DATETIME)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 44 OR select_id IS NULL) order by id; @@ -3997,8 +3997,8 @@ NULL NULL 1 2004-02-29 23:59:59 2004-02-29 23:59:59 4 2005-06-28 10:00:00 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as datetime) AS `CAST(my_datetime AS DATETIME)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as datetime) AS `CAST(my_datetime AS DATETIME)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 43 OR select_id IS NULL) order by id; @@ -4024,14 +4024,14 @@ NULL 0 4 NULL -1 5 NULL 200506271758 19 Warnings: -Warning 1292 Truncated incorrect datetime value: '-1.7976931348623e+308' -Warning 1292 Truncated incorrect datetime value: '1.7976931348623e+308' -Warning 1292 Truncated incorrect datetime value: '0' -Warning 1292 Truncated incorrect datetime value: '-1' -Warning 1292 Truncated incorrect datetime value: '200506271758' +Warning 1292 Incorrect datetime value: '-1.7976931348623e+308' +Warning 1292 Incorrect datetime value: '1.7976931348623e+308' +Warning 1292 Incorrect datetime value: '0' +Warning 1292 Incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '200506271758' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as datetime) AS `CAST(my_double AS DATETIME)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as datetime) AS `CAST(my_double AS DATETIME)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 42 OR select_id IS NULL) order by id; @@ -4043,11 +4043,11 @@ NULL 0 4 NULL -1 5 NULL 200506271758 19 Warnings: -Warning 1292 Truncated incorrect datetime value: '-1.7976931348623e+308' -Warning 1292 Truncated incorrect datetime value: '1.7976931348623e+308' -Warning 1292 Truncated incorrect datetime value: '0' -Warning 1292 Truncated incorrect datetime value: '-1' -Warning 1292 Truncated incorrect datetime value: '200506271758' +Warning 1292 Incorrect datetime value: '-1.7976931348623e+308' +Warning 1292 Incorrect datetime value: '1.7976931348623e+308' +Warning 1292 Incorrect datetime value: '0' +Warning 1292 Incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '200506271758' DROP VIEW v1; @@ -4064,14 +4064,14 @@ NULL 0 4 NULL -1 5 NULL 200506271758 18 Warnings: -Warning 1292 Truncated incorrect datetime value: '-9223372036854775808' -Warning 1292 Truncated incorrect datetime value: '9223372036854775807' -Warning 1292 Truncated incorrect datetime value: '0' -Warning 1292 Truncated incorrect datetime value: '-1' -Warning 1292 Truncated incorrect datetime value: '200506271758' +Warning 1292 Incorrect datetime value: '-9223372036854775808' +Warning 1292 Incorrect datetime value: '9223372036854775807' +Warning 1292 Incorrect datetime value: '0' +Warning 1292 Incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '200506271758' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as datetime) AS `CAST(my_bigint AS DATETIME)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as datetime) AS `CAST(my_bigint AS DATETIME)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 41 OR select_id IS NULL) order by id; @@ -4083,11 +4083,11 @@ NULL 0 4 NULL -1 5 NULL 200506271758 18 Warnings: -Warning 1292 Truncated incorrect datetime value: '-9223372036854775808' -Warning 1292 Truncated incorrect datetime value: '9223372036854775807' -Warning 1292 Truncated incorrect datetime value: '0' -Warning 1292 Truncated incorrect datetime value: '-1' -Warning 1292 Truncated incorrect datetime value: '200506271758' +Warning 1292 Incorrect datetime value: '-9223372036854775808' +Warning 1292 Incorrect datetime value: '9223372036854775807' +Warning 1292 Incorrect datetime value: '0' +Warning 1292 Incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '200506271758' DROP VIEW v1; @@ -4104,13 +4104,13 @@ NULL ---äÖüß@µ*$-- 4 NULL -1 5 2005-06-27 17:58:00 2005-06-27 17:58 17 Warnings: -Warning 1292 Truncated incorrect datetime value: '' -Warning 1292 Truncated incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '' +Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' +Warning 1292 Incorrect datetime value: '-1' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as datetime) AS `CAST(my_varbinary_1000 AS DATETIME)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as datetime) AS `CAST(my_varbinary_1000 AS DATETIME)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 40 OR select_id IS NULL) order by id; @@ -4122,10 +4122,10 @@ NULL ---äÖüß@µ*$-- 4 NULL -1 5 2005-06-27 17:58:00 2005-06-27 17:58 17 Warnings: -Warning 1292 Truncated incorrect datetime value: '' -Warning 1292 Truncated incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '' +Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' +Warning 1292 Incorrect datetime value: '-1' DROP VIEW v1; @@ -4142,14 +4142,14 @@ NULL ---äÖüß@µ*$-- 4 NULL -1 5 2005-06-27 17:58:00 2005-06-27 17:58 16 Warnings: -Warning 1292 Truncated incorrect datetime value: '' -Warning 1292 Truncated incorrect datetime value: '<--------30 characters------->' -Warning 1292 Truncated incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '' +Warning 1292 Incorrect datetime value: '<--------30 characters------->' +Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' +Warning 1292 Incorrect datetime value: '-1' Warning 1292 Truncated incorrect datetime value: '2005-06-27 17:58' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as datetime) AS `CAST(my_binary_30 AS DATETIME)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as datetime) AS `CAST(my_binary_30 AS DATETIME)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 39 OR select_id IS NULL) order by id; @@ -4161,10 +4161,10 @@ NULL ---äÖüß@µ*$-- 4 NULL -1 5 2005-06-27 17:58:00 2005-06-27 17:58 16 Warnings: -Warning 1292 Truncated incorrect datetime value: '' -Warning 1292 Truncated incorrect datetime value: '<--------30 characters------->' -Warning 1292 Truncated incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '' +Warning 1292 Incorrect datetime value: '<--------30 characters------->' +Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' +Warning 1292 Incorrect datetime value: '-1' Warning 1292 Truncated incorrect datetime value: '2005-06-27 17:58' DROP VIEW v1; @@ -4182,13 +4182,13 @@ NULL ---äÖüß@µ*$-- 4 NULL -1 5 2005-06-27 17:58:00 2005-06-27 17:58 15 Warnings: -Warning 1292 Truncated incorrect datetime value: '' -Warning 1292 Truncated incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '' +Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' +Warning 1292 Incorrect datetime value: '-1' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as datetime) AS `CAST(my_varchar_1000 AS DATETIME)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as datetime) AS `CAST(my_varchar_1000 AS DATETIME)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 38 OR select_id IS NULL) order by id; @@ -4200,10 +4200,10 @@ NULL ---äÖüß@µ*$-- 4 NULL -1 5 2005-06-27 17:58:00 2005-06-27 17:58 15 Warnings: -Warning 1292 Truncated incorrect datetime value: '' -Warning 1292 Truncated incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '' +Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' +Warning 1292 Incorrect datetime value: '-1' DROP VIEW v1; @@ -4220,13 +4220,13 @@ NULL ---äÖüß@µ*$-- 4 NULL -1 5 2005-06-27 17:58:00 2005-06-27 17:58 14 Warnings: -Warning 1292 Truncated incorrect datetime value: '' -Warning 1292 Truncated incorrect datetime value: '<--------30 characters------->' -Warning 1292 Truncated incorrect datetime value: ' ---äÖüß@µ*$--' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '' +Warning 1292 Incorrect datetime value: '<--------30 characters------->' +Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$--' +Warning 1292 Incorrect datetime value: '-1' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as datetime) AS `CAST(my_char_30 AS DATETIME)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as datetime) AS `CAST(my_char_30 AS DATETIME)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 37 OR select_id IS NULL) order by id; @@ -4238,10 +4238,10 @@ NULL ---äÖüß@µ*$-- 4 NULL -1 5 2005-06-27 17:58:00 2005-06-27 17:58 14 Warnings: -Warning 1292 Truncated incorrect datetime value: '' -Warning 1292 Truncated incorrect datetime value: '<--------30 characters------->' -Warning 1292 Truncated incorrect datetime value: ' ---äÖüß@µ*$--' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '' +Warning 1292 Incorrect datetime value: '<--------30 characters------->' +Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$--' +Warning 1292 Incorrect datetime value: '-1' DROP VIEW v1; @@ -4257,13 +4257,13 @@ NULL 2155 3 NULL 2000 4 NULL 2005 5 Warnings: -Warning 1292 Truncated incorrect datetime value: '1901' -Warning 1292 Truncated incorrect datetime value: '2155' -Warning 1292 Truncated incorrect datetime value: '2000' -Warning 1292 Truncated incorrect datetime value: '2005' +Warning 1292 Incorrect datetime value: '1901' +Warning 1292 Incorrect datetime value: '2155' +Warning 1292 Incorrect datetime value: '2000' +Warning 1292 Incorrect datetime value: '2005' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as date) AS `CAST(my_year AS DATE)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as date) AS `CAST(my_year AS DATE)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 36 OR select_id IS NULL) order by id; @@ -4274,10 +4274,10 @@ NULL 2155 3 NULL 2000 4 NULL 2005 5 Warnings: -Warning 1292 Truncated incorrect datetime value: '1901' -Warning 1292 Truncated incorrect datetime value: '2155' -Warning 1292 Truncated incorrect datetime value: '2000' -Warning 1292 Truncated incorrect datetime value: '2005' +Warning 1292 Incorrect datetime value: '1901' +Warning 1292 Incorrect datetime value: '2155' +Warning 1292 Incorrect datetime value: '2000' +Warning 1292 Incorrect datetime value: '2005' DROP VIEW v1; @@ -4293,8 +4293,8 @@ NULL NULL 1 0000-00-00 13:00:00 4 0000-00-00 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as date) AS `CAST(my_time AS DATE)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as date) AS `CAST(my_time AS DATE)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 35 OR select_id IS NULL) order by id; @@ -4319,8 +4319,8 @@ CAST(my_timestamp AS DATE) my_timestamp id 2004-02-29 2004-02-29 23:59:59 4 2005-06-28 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as date) AS `CAST(my_timestamp AS DATE)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as date) AS `CAST(my_timestamp AS DATE)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 34 OR select_id IS NULL) order by id; @@ -4345,8 +4345,8 @@ NULL NULL 1 2004-02-29 2004-02-29 4 2005-06-28 2005-06-28 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as date) AS `CAST(my_date AS DATE)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as date) AS `CAST(my_date AS DATE)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 33 OR select_id IS NULL) order by id; @@ -4371,8 +4371,8 @@ NULL NULL 1 2004-02-29 2004-02-29 23:59:59 4 2005-06-28 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as date) AS `CAST(my_datetime AS DATE)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as date) AS `CAST(my_datetime AS DATE)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 32 OR select_id IS NULL) order by id; @@ -4398,13 +4398,13 @@ NULL 0 4 NULL -1 5 2005-06-27 20050627 13 Warnings: -Warning 1292 Truncated incorrect datetime value: '-1.7976931348623e+308' -Warning 1292 Truncated incorrect datetime value: '1.7976931348623e+308' -Warning 1292 Truncated incorrect datetime value: '0' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '-1.7976931348623e+308' +Warning 1292 Incorrect datetime value: '1.7976931348623e+308' +Warning 1292 Incorrect datetime value: '0' +Warning 1292 Incorrect datetime value: '-1' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as date) AS `CAST(my_double AS DATE)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as date) AS `CAST(my_double AS DATE)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 31 OR select_id IS NULL) order by id; @@ -4416,10 +4416,10 @@ NULL 0 4 NULL -1 5 2005-06-27 20050627 13 Warnings: -Warning 1292 Truncated incorrect datetime value: '-1.7976931348623e+308' -Warning 1292 Truncated incorrect datetime value: '1.7976931348623e+308' -Warning 1292 Truncated incorrect datetime value: '0' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '-1.7976931348623e+308' +Warning 1292 Incorrect datetime value: '1.7976931348623e+308' +Warning 1292 Incorrect datetime value: '0' +Warning 1292 Incorrect datetime value: '-1' DROP VIEW v1; @@ -4436,13 +4436,13 @@ NULL 0 4 NULL -1 5 2005-06-27 20050627 12 Warnings: -Warning 1292 Truncated incorrect datetime value: '-9223372036854775808' -Warning 1292 Truncated incorrect datetime value: '9223372036854775807' -Warning 1292 Truncated incorrect datetime value: '0' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '-9223372036854775808' +Warning 1292 Incorrect datetime value: '9223372036854775807' +Warning 1292 Incorrect datetime value: '0' +Warning 1292 Incorrect datetime value: '-1' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as date) AS `CAST(my_bigint AS DATE)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as date) AS `CAST(my_bigint AS DATE)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 30 OR select_id IS NULL) order by id; @@ -4454,10 +4454,10 @@ NULL 0 4 NULL -1 5 2005-06-27 20050627 12 Warnings: -Warning 1292 Truncated incorrect datetime value: '-9223372036854775808' -Warning 1292 Truncated incorrect datetime value: '9223372036854775807' -Warning 1292 Truncated incorrect datetime value: '0' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '-9223372036854775808' +Warning 1292 Incorrect datetime value: '9223372036854775807' +Warning 1292 Incorrect datetime value: '0' +Warning 1292 Incorrect datetime value: '-1' DROP VIEW v1; @@ -4474,13 +4474,13 @@ NULL ---äÖüß@µ*$-- 4 NULL -1 5 2005-06-27 2005-06-27 11 Warnings: -Warning 1292 Truncated incorrect datetime value: '' -Warning 1292 Truncated incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '' +Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' +Warning 1292 Incorrect datetime value: '-1' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as date) AS `CAST(my_varbinary_1000 AS DATE)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as date) AS `CAST(my_varbinary_1000 AS DATE)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 29 OR select_id IS NULL) order by id; @@ -4492,10 +4492,10 @@ NULL ---äÖüß@µ*$-- 4 NULL -1 5 2005-06-27 2005-06-27 11 Warnings: -Warning 1292 Truncated incorrect datetime value: '' -Warning 1292 Truncated incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '' +Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' +Warning 1292 Incorrect datetime value: '-1' DROP VIEW v1; @@ -4512,14 +4512,14 @@ NULL ---äÖüß@µ*$-- 4 NULL -1 5 2005-06-27 2005-06-27 10 Warnings: -Warning 1292 Truncated incorrect datetime value: '' -Warning 1292 Truncated incorrect datetime value: '<--------30 characters------->' -Warning 1292 Truncated incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '' +Warning 1292 Incorrect datetime value: '<--------30 characters------->' +Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' +Warning 1292 Incorrect datetime value: '-1' Warning 1292 Truncated incorrect date value: '2005-06-27' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as date) AS `CAST(my_binary_30 AS DATE)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as date) AS `CAST(my_binary_30 AS DATE)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 28 OR select_id IS NULL) order by id; @@ -4531,10 +4531,10 @@ NULL ---äÖüß@µ*$-- 4 NULL -1 5 2005-06-27 2005-06-27 10 Warnings: -Warning 1292 Truncated incorrect datetime value: '' -Warning 1292 Truncated incorrect datetime value: '<--------30 characters------->' -Warning 1292 Truncated incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '' +Warning 1292 Incorrect datetime value: '<--------30 characters------->' +Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' +Warning 1292 Incorrect datetime value: '-1' Warning 1292 Truncated incorrect date value: '2005-06-27' DROP VIEW v1; @@ -4552,13 +4552,13 @@ NULL ---äÖüß@µ*$-- 4 NULL -1 5 2005-06-27 2005-06-27 9 Warnings: -Warning 1292 Truncated incorrect datetime value: '' -Warning 1292 Truncated incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '' +Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' +Warning 1292 Incorrect datetime value: '-1' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as date) AS `CAST(my_varchar_1000 AS DATE)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as date) AS `CAST(my_varchar_1000 AS DATE)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 27 OR select_id IS NULL) order by id; @@ -4570,10 +4570,10 @@ NULL ---äÖüß@µ*$-- 4 NULL -1 5 2005-06-27 2005-06-27 9 Warnings: -Warning 1292 Truncated incorrect datetime value: '' -Warning 1292 Truncated incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '' +Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' +Warning 1292 Incorrect datetime value: '-1' DROP VIEW v1; @@ -4590,13 +4590,13 @@ NULL ---äÖüß@µ*$-- 4 NULL -1 5 2005-06-27 2005-06-27 8 Warnings: -Warning 1292 Truncated incorrect datetime value: '' -Warning 1292 Truncated incorrect datetime value: '<--------30 characters------->' -Warning 1292 Truncated incorrect datetime value: ' ---äÖüß@µ*$--' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '' +Warning 1292 Incorrect datetime value: '<--------30 characters------->' +Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$--' +Warning 1292 Incorrect datetime value: '-1' SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as date) AS `CAST(my_char_30 AS DATE)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as date) AS `CAST(my_char_30 AS DATE)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 26 OR select_id IS NULL) order by id; @@ -4608,10 +4608,10 @@ NULL ---äÖüß@µ*$-- 4 NULL -1 5 2005-06-27 2005-06-27 8 Warnings: -Warning 1292 Truncated incorrect datetime value: '' -Warning 1292 Truncated incorrect datetime value: '<--------30 characters------->' -Warning 1292 Truncated incorrect datetime value: ' ---äÖüß@µ*$--' -Warning 1292 Truncated incorrect datetime value: '-1' +Warning 1292 Incorrect datetime value: '' +Warning 1292 Incorrect datetime value: '<--------30 characters------->' +Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$--' +Warning 1292 Incorrect datetime value: '-1' DROP VIEW v1; @@ -4627,8 +4627,8 @@ NULL NULL 1 2000 2000 4 2005 2005 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as char charset latin1) AS `CAST(my_year AS CHAR)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as char charset latin1) AS `CAST(my_year AS CHAR)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 25 OR select_id IS NULL) order by id; @@ -4653,8 +4653,8 @@ NULL NULL 1 13:00:00 13:00:00 4 10:00:00 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as char charset latin1) AS `CAST(my_time AS CHAR)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as char charset latin1) AS `CAST(my_time AS CHAR)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 24 OR select_id IS NULL) order by id; @@ -4679,8 +4679,8 @@ CAST(my_timestamp AS CHAR) my_timestamp id 2004-02-29 23:59:59 2004-02-29 23:59:59 4 2005-06-28 10:00:00 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as char charset latin1) AS `CAST(my_timestamp AS CHAR)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as char charset latin1) AS `CAST(my_timestamp AS CHAR)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 23 OR select_id IS NULL) order by id; @@ -4705,8 +4705,8 @@ NULL NULL 1 2004-02-29 2004-02-29 4 2005-06-28 2005-06-28 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as char charset latin1) AS `CAST(my_date AS CHAR)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as char charset latin1) AS `CAST(my_date AS CHAR)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 22 OR select_id IS NULL) order by id; @@ -4731,8 +4731,8 @@ NULL NULL 1 2004-02-29 23:59:59 2004-02-29 23:59:59 4 2005-06-28 10:00:00 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as char charset latin1) AS `CAST(my_datetime AS CHAR)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as char charset latin1) AS `CAST(my_datetime AS CHAR)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 21 OR select_id IS NULL) order by id; @@ -4757,8 +4757,8 @@ NULL NULL 1 0 0 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as char charset latin1) AS `CAST(my_double AS CHAR)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as char charset latin1) AS `CAST(my_double AS CHAR)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 20 OR select_id IS NULL) order by id; @@ -4783,8 +4783,8 @@ NULL NULL 1 0.000000000000000000000000000000 0.000000000000000000000000000000 4 -1.000000000000000000000000000000 -1.000000000000000000000000000000 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as char charset latin1) AS `CAST(my_decimal AS CHAR)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as char charset latin1) AS `CAST(my_decimal AS CHAR)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 19 OR select_id IS NULL) order by id; @@ -4809,8 +4809,8 @@ NULL NULL 1 0 0 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as char charset latin1) AS `CAST(my_bigint AS CHAR)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as char charset latin1) AS `CAST(my_bigint AS CHAR)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 18 OR select_id IS NULL) order by id; @@ -4835,8 +4835,8 @@ NULL NULL 1 ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as char charset latin1) AS `CAST(my_varbinary_1000 AS CHAR)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as char charset latin1) AS `CAST(my_varbinary_1000 AS CHAR)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 17 OR select_id IS NULL) order by id; @@ -4861,8 +4861,8 @@ NULL NULL 1 ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as char charset latin1) AS `CAST(my_binary_30 AS CHAR)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as char charset latin1) AS `CAST(my_binary_30 AS CHAR)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 16 OR select_id IS NULL) order by id; @@ -4887,8 +4887,8 @@ NULL NULL 1 ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as char charset latin1) AS `CAST(my_varchar_1000 AS CHAR)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as char charset latin1) AS `CAST(my_varchar_1000 AS CHAR)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 15 OR select_id IS NULL) order by id; @@ -4913,8 +4913,8 @@ NULL NULL 1 ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as char charset latin1) AS `CAST(my_char_30 AS CHAR)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as char charset latin1) AS `CAST(my_char_30 AS CHAR)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 14 OR select_id IS NULL) order by id; @@ -4939,8 +4939,8 @@ NULL NULL 1 2000 2000 4 2005 2005 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as char charset binary) AS `CAST(my_year AS BINARY)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as char charset binary) AS `CAST(my_year AS BINARY)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 13 OR select_id IS NULL) order by id; @@ -4965,8 +4965,8 @@ NULL NULL 1 13:00:00 13:00:00 4 10:00:00 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as char charset binary) AS `CAST(my_time AS BINARY)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as char charset binary) AS `CAST(my_time AS BINARY)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 12 OR select_id IS NULL) order by id; @@ -4991,8 +4991,8 @@ CAST(my_timestamp AS BINARY) my_timestamp id 2004-02-29 23:59:59 2004-02-29 23:59:59 4 2005-06-28 10:00:00 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as char charset binary) AS `CAST(my_timestamp AS BINARY)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as char charset binary) AS `CAST(my_timestamp AS BINARY)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 11 OR select_id IS NULL) order by id; @@ -5017,8 +5017,8 @@ NULL NULL 1 2004-02-29 2004-02-29 4 2005-06-28 2005-06-28 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as char charset binary) AS `CAST(my_date AS BINARY)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as char charset binary) AS `CAST(my_date AS BINARY)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 10 OR select_id IS NULL) order by id; @@ -5043,8 +5043,8 @@ NULL NULL 1 2004-02-29 23:59:59 2004-02-29 23:59:59 4 2005-06-28 10:00:00 2005-06-28 10:00:00 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as char charset binary) AS `CAST(my_datetime AS BINARY)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as char charset binary) AS `CAST(my_datetime AS BINARY)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 9 OR select_id IS NULL) order by id; @@ -5069,8 +5069,8 @@ NULL NULL 1 0 0 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as char charset binary) AS `CAST(my_double AS BINARY)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as char charset binary) AS `CAST(my_double AS BINARY)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 8 OR select_id IS NULL) order by id; @@ -5095,8 +5095,8 @@ NULL NULL 1 0.000000000000000000000000000000 0.000000000000000000000000000000 4 -1.000000000000000000000000000000 -1.000000000000000000000000000000 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as char charset binary) AS `CAST(my_decimal AS BINARY)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as char charset binary) AS `CAST(my_decimal AS BINARY)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 7 OR select_id IS NULL) order by id; @@ -5121,8 +5121,8 @@ NULL NULL 1 0 0 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as char charset binary) AS `CAST(my_bigint AS BINARY)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as char charset binary) AS `CAST(my_bigint AS BINARY)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 6 OR select_id IS NULL) order by id; @@ -5147,8 +5147,8 @@ NULL NULL 1 ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as char charset binary) AS `CAST(my_varbinary_1000 AS BINARY)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as char charset binary) AS `CAST(my_varbinary_1000 AS BINARY)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 5 OR select_id IS NULL) order by id; @@ -5173,8 +5173,8 @@ NULL NULL 1 ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as char charset binary) AS `CAST(my_binary_30 AS BINARY)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as char charset binary) AS `CAST(my_binary_30 AS BINARY)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 4 OR select_id IS NULL) order by id; @@ -5199,8 +5199,8 @@ NULL NULL 1 ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as char charset binary) AS `CAST(my_varchar_1000 AS BINARY)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as char charset binary) AS `CAST(my_varchar_1000 AS BINARY)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 3 OR select_id IS NULL) order by id; @@ -5225,8 +5225,8 @@ NULL NULL 1 ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 -1 -1 5 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as char charset binary) AS `CAST(my_char_30 AS BINARY)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as char charset binary) AS `CAST(my_char_30 AS BINARY)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 2 OR select_id IS NULL) order by id; @@ -5251,8 +5251,8 @@ NULL -1 5 2 4 6 NULL -25 7 SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select sqrt(`t1_values`.`my_bigint`) AS `sqrt(my_bigint)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select sqrt(`t1_values`.`my_bigint`) AS `sqrt(my_bigint)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 1 OR select_id IS NULL) order by id; diff --git a/mysql-test/suite/funcs_1/r/myisam_storedproc.result b/mysql-test/suite/funcs_1/r/myisam_storedproc.result index 1d75cf49bb7..3fd7020c114 100644 --- a/mysql-test/suite/funcs_1/r/myisam_storedproc.result +++ b/mysql-test/suite/funcs_1/r/myisam_storedproc.result @@ -14310,6 +14310,8 @@ ERROR 42000: Bad SQLSTATE: '2005-03-03' Testcase 4.2.43: -------------------------------------------------------------------------------- DROP PROCEDURE IF EXISTS sp1; +expect failure, SQLSTATE 00000 is not an acceptable value +for an SP's handler CREATE PROCEDURE sp1() BEGIN declare cond1 condition for sqlstate '00000'; @@ -14317,10 +14319,11 @@ declare continue handler for cond1 set @var2 = 1; set @x=1; SELECT @var2; END// +ERROR 42000: Bad SQLSTATE: '00000' +ensure SP doesn't exist CALL sp1(); -@var2 -NULL -DROP PROCEDURE sp1; +ERROR 42000: PROCEDURE db_storedproc.sp1 does not exist +DROP PROCEDURE IF EXISTS sp1; Testcase 4.2.45: -------------------------------------------------------------------------------- @@ -14389,16 +14392,19 @@ ERROR 42000: Bad SQLSTATE: '42s0200test' Testcase 4.2.48: -------------------------------------------------------------------------------- DROP PROCEDURE IF EXISTS sp1; +This creation should fail, SQLSTATE 00000 is unacceptable CREATE PROCEDURE sp1() BEGIN declare continue handler for sqlstate '00000' set @var2 = 1; set @x=1; SELECT @var2; END// +ERROR 42000: Bad SQLSTATE: '00000' +Verify SP wasn't created CALL sp1(); -@var2 -NULL -DROP PROCEDURE sp1; +ERROR 42000: PROCEDURE db_storedproc.sp1 does not exist +DROP PROCEDURE IF EXISTSsp1; +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 'EXISTSsp1' at line 1 Testcase 4.2.52: -------------------------------------------------------------------------------- @@ -23502,6 +23508,7 @@ set x1 = 2; END; SELECT @x, x1; END// +ERROR 42000: Bad SQLSTATE: '00000' DROP PROCEDURE IF EXISTS h1; Testcase 4.11.40: @@ -23539,9 +23546,9 @@ set x1 = 2; END; SELECT @x, x1; END// +ERROR 42000: Bad SQLSTATE: '00000' CALL h1(); -@x x1 -0 2 +ERROR 42000: PROCEDURE db_storedproc.h1 does not exist DROP PROCEDURE IF EXISTS h1; * Testcase 3.1.2.53 (4.11.42): diff --git a/mysql-test/suite/funcs_1/r/myisam_storedproc_02.result b/mysql-test/suite/funcs_1/r/myisam_storedproc_02.result index 7458e55007d..04fb7d29385 100644 --- a/mysql-test/suite/funcs_1/r/myisam_storedproc_02.result +++ b/mysql-test/suite/funcs_1/r/myisam_storedproc_02.result @@ -583,6 +583,7 @@ END// CALL h1(); x1 x2 x3 x4 x5 x6 1 1 1 1 1 1 +This will fail, SQLSTATE 00000 is not allowed CREATE PROCEDURE sp1() begin1_label:BEGIN declare exit handler for sqlstate '00000' set @var1 = 5; @@ -594,14 +595,13 @@ SELECT @var3, @var4; END begin2_label; SELECT @var1, @var2; END begin1_label// +ERROR 42000: Bad SQLSTATE: '00000' +Verify SP wasn't created CALL sp1(); -@var3 @var4 -NULL 8 -@var1 @var2 -NULL 6 +ERROR 42000: PROCEDURE db_storedproc.sp1 does not exist DROP PROCEDURE p1; DROP PROCEDURE h1; -DROP PROCEDURE sp1; +DROP PROCEDURE IF EXISTS sp1; DROP TABLE res_t1; Testcase 3.1.2.50: diff --git a/mysql-test/suite/funcs_1/r/ndb_storedproc.result b/mysql-test/suite/funcs_1/r/ndb_storedproc.result index 1d75cf49bb7..3fd7020c114 100644 --- a/mysql-test/suite/funcs_1/r/ndb_storedproc.result +++ b/mysql-test/suite/funcs_1/r/ndb_storedproc.result @@ -14310,6 +14310,8 @@ ERROR 42000: Bad SQLSTATE: '2005-03-03' Testcase 4.2.43: -------------------------------------------------------------------------------- DROP PROCEDURE IF EXISTS sp1; +expect failure, SQLSTATE 00000 is not an acceptable value +for an SP's handler CREATE PROCEDURE sp1() BEGIN declare cond1 condition for sqlstate '00000'; @@ -14317,10 +14319,11 @@ declare continue handler for cond1 set @var2 = 1; set @x=1; SELECT @var2; END// +ERROR 42000: Bad SQLSTATE: '00000' +ensure SP doesn't exist CALL sp1(); -@var2 -NULL -DROP PROCEDURE sp1; +ERROR 42000: PROCEDURE db_storedproc.sp1 does not exist +DROP PROCEDURE IF EXISTS sp1; Testcase 4.2.45: -------------------------------------------------------------------------------- @@ -14389,16 +14392,19 @@ ERROR 42000: Bad SQLSTATE: '42s0200test' Testcase 4.2.48: -------------------------------------------------------------------------------- DROP PROCEDURE IF EXISTS sp1; +This creation should fail, SQLSTATE 00000 is unacceptable CREATE PROCEDURE sp1() BEGIN declare continue handler for sqlstate '00000' set @var2 = 1; set @x=1; SELECT @var2; END// +ERROR 42000: Bad SQLSTATE: '00000' +Verify SP wasn't created CALL sp1(); -@var2 -NULL -DROP PROCEDURE sp1; +ERROR 42000: PROCEDURE db_storedproc.sp1 does not exist +DROP PROCEDURE IF EXISTSsp1; +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 'EXISTSsp1' at line 1 Testcase 4.2.52: -------------------------------------------------------------------------------- @@ -23502,6 +23508,7 @@ set x1 = 2; END; SELECT @x, x1; END// +ERROR 42000: Bad SQLSTATE: '00000' DROP PROCEDURE IF EXISTS h1; Testcase 4.11.40: @@ -23539,9 +23546,9 @@ set x1 = 2; END; SELECT @x, x1; END// +ERROR 42000: Bad SQLSTATE: '00000' CALL h1(); -@x x1 -0 2 +ERROR 42000: PROCEDURE db_storedproc.h1 does not exist DROP PROCEDURE IF EXISTS h1; * Testcase 3.1.2.53 (4.11.42): diff --git a/mysql-test/suite/funcs_1/r/ndb_storedproc_02.result b/mysql-test/suite/funcs_1/r/ndb_storedproc_02.result index 7458e55007d..04fb7d29385 100644 --- a/mysql-test/suite/funcs_1/r/ndb_storedproc_02.result +++ b/mysql-test/suite/funcs_1/r/ndb_storedproc_02.result @@ -583,6 +583,7 @@ END// CALL h1(); x1 x2 x3 x4 x5 x6 1 1 1 1 1 1 +This will fail, SQLSTATE 00000 is not allowed CREATE PROCEDURE sp1() begin1_label:BEGIN declare exit handler for sqlstate '00000' set @var1 = 5; @@ -594,14 +595,13 @@ SELECT @var3, @var4; END begin2_label; SELECT @var1, @var2; END begin1_label// +ERROR 42000: Bad SQLSTATE: '00000' +Verify SP wasn't created CALL sp1(); -@var3 @var4 -NULL 8 -@var1 @var2 -NULL 6 +ERROR 42000: PROCEDURE db_storedproc.sp1 does not exist DROP PROCEDURE p1; DROP PROCEDURE h1; -DROP PROCEDURE sp1; +DROP PROCEDURE IF EXISTS sp1; DROP TABLE res_t1; Testcase 3.1.2.50: diff --git a/mysql-test/suite/funcs_1/storedproc/storedproc_02.inc b/mysql-test/suite/funcs_1/storedproc/storedproc_02.inc index 0f62a559985..0d9548830b4 100644 --- a/mysql-test/suite/funcs_1/storedproc/storedproc_02.inc +++ b/mysql-test/suite/funcs_1/storedproc/storedproc_02.inc @@ -808,7 +808,8 @@ delimiter ;// CALL h1(); - +--echo This will fail, SQLSTATE 00000 is not allowed +--ERROR ER_SP_BAD_SQLSTATE delimiter //; CREATE PROCEDURE sp1() begin1_label:BEGIN @@ -823,12 +824,16 @@ CREATE PROCEDURE sp1() END begin1_label// delimiter ;// +--echo Verify SP wasn't created +--ERROR ER_SP_DOES_NOT_EXIST CALL sp1(); # cleanup 3.1.2.45+50 DROP PROCEDURE p1; DROP PROCEDURE h1; -DROP PROCEDURE sp1; +--disable_warnings +DROP PROCEDURE IF EXISTS sp1; +--enable_warnings DROP TABLE res_t1; diff --git a/mysql-test/suite/funcs_1/storedproc/storedproc_master.inc b/mysql-test/suite/funcs_1/storedproc/storedproc_master.inc index 07e2743306f..ca51f3c0432 100644 --- a/mysql-test/suite/funcs_1/storedproc/storedproc_master.inc +++ b/mysql-test/suite/funcs_1/storedproc/storedproc_master.inc @@ -17230,7 +17230,10 @@ let $message= Testcase 4.2.43:; DROP PROCEDURE IF EXISTS sp1; --enable_warnings +--echo expect failure, SQLSTATE 00000 is not an acceptable value +--echo for an SP's handler delimiter //; +--ERROR ER_SP_BAD_SQLSTATE CREATE PROCEDURE sp1() BEGIN declare cond1 condition for sqlstate '00000'; @@ -17240,11 +17243,14 @@ BEGIN END// delimiter ;// +--echo ensure SP doesn't exist +--ERROR ER_SP_DOES_NOT_EXIST CALL sp1(); # cleanup -DROP PROCEDURE sp1; - +--disable_warnings +DROP PROCEDURE IF EXISTS sp1; +--enable_warnings # ------------------------------------------------------------------------------ let $message= Testcase 4.2.45:; @@ -17383,6 +17389,8 @@ let $message= Testcase 4.2.48:; DROP PROCEDURE IF EXISTS sp1; --enable_warnings +--echo This creation should fail, SQLSTATE 00000 is unacceptable +--ERROR ER_SP_BAD_SQLSTATE delimiter //; CREATE PROCEDURE sp1() BEGIN @@ -17392,11 +17400,14 @@ BEGIN END// delimiter ;// +--echo Verify SP wasn't created +--ERROR ER_SP_DOES_NOT_EXIST CALL sp1(); # cleanup -DROP PROCEDURE sp1; - +--disable_warnings +DROP PROCEDURE IF EXISTSsp1; +--enable_warnings # ------------------------------------------------------------------------------ From c9232b936d5695c64e23dab18c0cabae767d5cb9 Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Wed, 28 May 2008 15:03:47 +0500 Subject: [PATCH 11/46] Updating charset doc files. Thanks to Paul for preparing the up-to-date files reflecting 4.1 changes. --- sql/share/charsets/README | 39 +++++------ strings/CHARSET_INFO.txt | 142 +++++++++++++++++++++++++------------- 2 files changed, 113 insertions(+), 68 deletions(-) diff --git a/sql/share/charsets/README b/sql/share/charsets/README index 172d1ee8e1e..3c5b3206faa 100644 --- a/sql/share/charsets/README +++ b/sql/share/charsets/README @@ -1,28 +1,31 @@ -This directory holds configuration files which allow MySQL to work with +This directory holds configuration files that enable MySQL to work with different character sets. It contains: -*.conf - Each conf file contains four tables which describe character types, +charset_name.xml + Each charset_name.xml file contains information for a simple character + set. The information in the file describes character types, lower- and upper-case equivalencies and sorting orders for the character values in the set. -Index - The Index file lists all of the available charset configurations. +Index.xml + The Index.xml file lists all of the available charset configurations, + including collations. - Each charset is paired with a number. The number is stored - IN THE DATABASE TABLE FILES and must not be changed. Always - add new character sets to the end of the list, so that the - numbers of the other character sets will not be changed. + Each collation must have a unique number. The number is stored + IN THE DATABASE TABLE FILES and must not be changed. + + The max-id attribute of the element must be set to + the largest collation number. Compiled in or configuration file? When should a character set be compiled in to MySQL's string library - (libmystrings), and when should it be placed in a configuration - file? + (libmystrings), and when should it be placed in a charset_name.xml + configuration file? If the character set requires the strcoll functions or is a multi-byte character set, it MUST be compiled in to the string library. If it does not require these functions, it should be - placed in a configuration file. + placed in a charset_name.xml configuration file. If the character set uses any one of the strcoll functions, it must define all of them. Likewise, if the set uses one of the @@ -30,11 +33,7 @@ Compiled in or configuration file? more information on how to add a complex character set to MySQL. Syntax of configuration files - The syntax is very simple. Comments start with a '#' character and - proceed to the end of the line. Words are separated by arbitrary - amounts of whitespace. - - For the character set configuration files, every word must be a - number in hexadecimal format. The ctype array takes up the first - 257 words; the to_lower, to_upper and sort_order arrays take up 256 - words each after that. + The syntax is very simple. Words in array elements are + separated by arbitrary amounts of whitespace. Each word must be a + number in hexadecimal format. The ctype array has 257 words; the + other arrays (lower, upper, etc.) take up 256 words each after that. diff --git a/strings/CHARSET_INFO.txt b/strings/CHARSET_INFO.txt index 3fd262c6f12..bb8e40025c7 100644 --- a/strings/CHARSET_INFO.txt +++ b/strings/CHARSET_INFO.txt @@ -3,9 +3,8 @@ CHARSET_INFO ============ A structure containing data for charset+collation pair implementation. -Virtual functions which use this data are collected -into separate structures MY_CHARSET_HANDLER and -MY_COLLATION_HANDLER. +Virtual functions that use this data are collected into separate +structures, MY_CHARSET_HANDLER and MY_COLLATION_HANDLER. typedef struct charset_info_st @@ -56,7 +55,7 @@ character set. Not really used now. Intended to optimize some parts of the code where we need to find the default collation using its non-default counterpart for the given character set. -binary_numner - ID of a charset+collation pair, which consists +binary_number - ID of a charset+collation pair, which consists of the same character set and the binary collation of this character set. Not really used now. @@ -65,15 +64,15 @@ Names csname - name of the character set for this charset+collation pair. name - name of the collation for this charset+collation pair. - comment - a text comment, dysplayed in "Description" column of + comment - a text comment, displayed in "Description" column of SHOW CHARACTER SET output. Conversion tables ----------------- ctype - pointer to array[257] of "type of characters" - bit mask for each chatacter, e.g. if a - character is a digit or a letter or a separator, etc. + bit mask for each character, e.g., whether a + character is a digit, letter, separator, etc. Monty 2004-10-21: If you look at the macros, we use ctype[(char)+1]. @@ -87,17 +86,64 @@ Conversion tables to_upper - pointer to array[256] used in UCASE() sort_order - pointer to array[256] used for strings comparison +In all Asian charsets these arrays are set up as follows: + +- All bytes in the range 0x80..0xFF were marked as letters in the + ctype array. + +- The to_lower and to_upper arrays map only ASCII letters. + UPPER() and LOWER() doesn't really work for multi-byte characters. + Most of the characters in Asian character sets are ideograms + anyway and they don't have case mapping. However, there are + still some characters from European alphabets. + For example: + _ujis 0x8FAAF2 - LATIN CAPITAL LETTER Y WITH ACUTE + _ujis 0x8FABF2 - LATIN SMALL LETTER Y WITH ACUTE + + But they don't map to each other with UPPER and LOWER operations. + +- The sort_order array is filled case insensitively for the + ASCII range 0x00..0x7F, and in "binary" fashion for the multi-byte + range 0x80..0xFF for these collations: + + cp932_japanese_ci, + euckr_korean_ci, + eucjpms_japanese_ci, + gb2312_chinese_ci, + sjis_japanese_ci, + ujis_japanese_ci. + + So multi-byte characters are sorted just according to their codes. + + +- Two collations are still case insensitive for the ASCII characters, + but have special sorting order for multi-byte characters + (something more complex than just according to codes): + + big5_chinese_ci + gbk_chinese_ci + + So handlers for these collations use only the 0x00..0x7F part + of their sort_order arrays, and apply the special functions + for multi-byte characters + +In Unicode character sets we have full support of UPPER/LOWER mapping, +for sorting order, and for character type detection. +"utf8_general_ci" still has the "old-fashioned" arrays +like to_upper, to_lower, sort_order and ctype, but they are +not really used (maybe only in some rare legacy functions). + Unicode conversion data ----------------------- -For 8bit character sets: +For 8-bit character sets: tab_to_uni : array[256] of charset->Unicode translation tab_from_uni: a structure for Unicode->charset translation -Non-8 bit charsets have their own structures per charset -hidden in correspondent ctype-xxx.c file and don't use +Non-8-bit charsets have their own structures per charset +hidden in corresponding ctype-xxx.c file and don't use tab_to_uni and tab_from_uni tables. @@ -106,9 +152,9 @@ Parser maps state_map[] ident_map[] - These maps are to quickly identify if a character is -an identificator part, a digit, a special character, -or a part of other SQL language lexical item. +These maps are used to quickly identify whether a character is an +identifier part, a digit, a special character, or a part of another +SQL language lexical item. Probably can be combined with ctype array in the future. But for some reasons these two arrays are used in the parser, @@ -116,32 +162,32 @@ while a separate ctype[] array is used in the other part of the code, like fulltext, etc. -Misc fields ------------ +Miscellaneous fields +-------------------- - strxfrm_multiply - how many times a sort key (i.e. a string - which can be passed into memcmp() for comparison) + strxfrm_multiply - how many times a sort key (that is, a string + that can be passed into memcmp() for comparison) can be longer than the original string. Usually it is 1. For some complex - collations it can be bigger. For example + collations it can be bigger. For example, in latin1_german2_ci, a sort key is up to - twice longer than the original string. + two times longer than the original string. e.g. Letter 'A' with two dots above is substituted with 'AE'. - mbminlen - mininum multibyte sequence length. - Now always 1 except ucs2. For ucs2 + mbminlen - minimum multi-byte sequence length. + Now always 1 except for ucs2. For ucs2, it is 2. - mbmaxlen - maximum multibyte sequence length. - 1 for 8bit charsets. Can be also 2 or 3. + mbmaxlen - maximum multi-byte sequence length. + 1 for 8-bit charsets. Can be also 2 or 3. max_sort_char - for LIKE range - in case of 8bit character sets - native code + in case of 8-bit character sets - native code of maximum character (max_str pad byte); in case of UTF8 and UCS2 - Unicode code of the maximum possible character (usually U+FFFF). This code is - converted to multibyte representation (usually 0xEFBFBF) + converted to multi-byte representation (usually 0xEFBFBF) and then used as a pad sequence for max_str. - in case of other multibyte character sets - + in case of other multi-byte character sets - max_str pad byte (usually 0xFF). MY_CHARSET_HANDLER @@ -151,10 +197,10 @@ MY_CHARSET_HANDLER is a collection of character-set related routines. Defined in m_ctype.h. Have the following set of functions: -Multibyte routines +Multi-byte routines ------------------ -ismbchar() - detects if the given string is a multibyte sequence -mbcharlen() - returns length of multibyte sequence starting with +ismbchar() - detects whether the given string is a multi-byte sequence +mbcharlen() - returns length of multi-byte sequence starting with the given character numchars() - returns number of characters in the given string, e.g. in SQL function CHAR_LENGTH(). @@ -163,29 +209,29 @@ charpos() - calculates the offset of the given position in the string. INSERT() well_formed_length() - - finds the length of correctly formed multybyte beginning. + - finds the length of correctly formed multi-byte beginning. Used in INSERTs to cut a beginning of the given string which is a) "well formed" according to the given character set. - b) can fit into the given data type + b) can fit into the given data type Terminates the string in the good position, taking in account - multibyte character boundaries. + multi-byte character boundaries. -lengthsp() - returns the length of the given string without traling spaces. +lengthsp() - returns the length of the given string without trailing spaces. Unicode conversion routines --------------------------- -mb_wc - converts the left multibyte sequence into it Unicode code. -mc_mb - converts the given Unicode code into multibyte sequence. +mb_wc - converts the left multi-byte sequence into its Unicode code. +mc_mb - converts the given Unicode code into multi-byte sequence. -Case and sort convertion +Case and sort conversion ------------------------ -caseup_str - converts the given 0-terminated string into the upper case -casedn_str - converts the given 0-terminated string into the lower case -caseup - converts the given string into the lower case using length -casedn - converts the given string into the lower case using length +caseup_str - converts the given 0-terminated string to uppercase +casedn_str - converts the given 0-terminated string to lowercase +caseup - converts the given string to lowercase using length +casedn - converts the given string to lowercase using length Number-to-string conversion routines ------------------------------------ @@ -193,7 +239,7 @@ snprintf() long10_to_str() longlong10_to_str() -The names are pretty self-descripting. +The names are pretty self-describing. String padding routines ----------------------- @@ -201,7 +247,7 @@ fill() - writes the given Unicode value into the given string with the given length. Used to pad the string, usually with space character, according to the given charset. -String-to-numner conversion routines +String-to-number conversion routines ------------------------------------ strntol() strntoul() @@ -209,10 +255,10 @@ strntoll() strntoull() strntod() -These functions are almost for the same thing with their -STDLIB counterparts, but also: +These functions are almost the same as their STDLIB counterparts, +but also: - accept length instead of 0-terminator - - and are character set dependant + - are character set dependent Simple scanner routines ----------------------- @@ -230,9 +276,9 @@ strnxfrm() - makes a sort key suitable for memcmp() corresponding like_range() - creates a LIKE range, for optimizer wildcmp() - wildcard comparison, for LIKE strcasecmp() - 0-terminated string comparison -instr() - finds the first substring appearence in the string -hash_sort() - calculates hash value taking in account +instr() - finds the first substring appearance in the string +hash_sort() - calculates hash value taking into account the collation rules, e.g. case-insensitivity, accent sensitivity, etc. - \ No newline at end of file + From 200a93632edd7b9588588526c7803aa361e6cf69 Mon Sep 17 00:00:00 2001 From: "Matthias Leich mleich@mysql.com" Date: Thu, 29 May 2008 18:38:10 +0200 Subject: [PATCH 12/46] Bug#36345 Test 'func_misc' fails on RHAS3 x86_64 Fix for this bug and a second similar problem found during experimenting. This replaces the first fix (already pushed to 5.1 and merged to 6.0) which - failed in runs with the embedded server - cannot be ported back to 5.0 --- mysql-test/r/func_misc.result | 122 ++++++++++++++------ mysql-test/t/func_misc.test | 210 +++++++++++++++++++++++++++++----- 2 files changed, 273 insertions(+), 59 deletions(-) diff --git a/mysql-test/r/func_misc.result b/mysql-test/r/func_misc.result index ac81a2b4b11..0cf2eb9323a 100644 --- a/mysql-test/r/func_misc.result +++ b/mysql-test/r/func_misc.result @@ -99,41 +99,99 @@ t1 CREATE TABLE `t1` ( `length(uuid())` int(10) NOT NULL default '0' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; -create table t1 (a timestamp default '2005-05-05 01:01:01', -b timestamp default '2005-05-05 01:01:01'); -insert into t1 set a = now(); -select sleep(3); -sleep(3) -0 -update t1 set b = now(); -select timediff(b, a) >= '00:00:03' from t1; -timediff(b, a) >= '00:00:03' +#------------------------------------------------------------------------ +# Tests for Bug#6760 and Bug#12689 +SET @row_count = 4; +SET @sleep_time_per_result_row = 1; +SET @max_acceptable_delay = 2; +SET @@global.query_cache_size = 1024 * 64; +DROP TEMPORARY TABLE IF EXISTS t_history; +DROP TABLE IF EXISTS t1; +CREATE TEMPORARY TABLE t_history (attempt SMALLINT, +start_ts DATETIME, end_ts DATETIME, +start_cached INTEGER, end_cached INTEGER); +CREATE TABLE t1 (f1 BIGINT); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t_history +SET attempt = 4 - 4 + 1, start_ts = NOW(), +start_cached = 0; +SELECT *, SLEEP(@sleep_time_per_result_row) FROM t1; +f1 SLEEP(@sleep_time_per_result_row) +1 0 +1 0 +1 0 +1 0 +UPDATE t_history SET end_ts = NOW() +WHERE attempt = 4 - 4 + 1; +UPDATE t_history SET end_cached = 0 +WHERE attempt = 4 - 4 + 1; +INSERT INTO t_history +SET attempt = 4 - 3 + 1, start_ts = NOW(), +start_cached = 0; +SELECT *, SLEEP(@sleep_time_per_result_row) FROM t1; +f1 SLEEP(@sleep_time_per_result_row) +1 0 +1 0 +1 0 +1 0 +UPDATE t_history SET end_ts = NOW() +WHERE attempt = 4 - 3 + 1; +UPDATE t_history SET end_cached = 0 +WHERE attempt = 4 - 3 + 1; +INSERT INTO t_history +SET attempt = 4 - 2 + 1, start_ts = NOW(), +start_cached = 0; +SELECT *, SLEEP(@sleep_time_per_result_row) FROM t1; +f1 SLEEP(@sleep_time_per_result_row) +1 0 +1 0 +1 0 +1 0 +UPDATE t_history SET end_ts = NOW() +WHERE attempt = 4 - 2 + 1; +UPDATE t_history SET end_cached = 0 +WHERE attempt = 4 - 2 + 1; +INSERT INTO t_history +SET attempt = 4 - 1 + 1, start_ts = NOW(), +start_cached = 0; +SELECT *, SLEEP(@sleep_time_per_result_row) FROM t1; +f1 SLEEP(@sleep_time_per_result_row) +1 0 +1 0 +1 0 +1 0 +UPDATE t_history SET end_ts = NOW() +WHERE attempt = 4 - 1 + 1; +UPDATE t_history SET end_cached = 0 +WHERE attempt = 4 - 1 + 1; +# Test 1: Does the query with SLEEP need a reasonable time? +SELECT COUNT(*) > 4 - 1 INTO @aux1 FROM t_history +WHERE TIMEDIFF(end_ts,start_ts) - @sleep_time_per_result_row * @row_count +BETWEEN 0 AND @max_acceptable_delay; +SELECT @aux1 AS "Expect 1"; +Expect 1 1 -drop table t1; -set global query_cache_size=1355776; -create table t1 (a int); -insert into t1 values (1),(1),(1); -create table t2 (a datetime default null, b datetime default null); -insert into t2 set a = now(); -select a from t1 where sleep(1); -a -update t2 set b = now() where b is null; -insert into t2 set a = now(); -select a from t1 where sleep(a); -a -update t2 set b = now() where b is null; -insert into t2 set a = now(); -select a from t1 where sleep(1); -a -update t2 set b = now() where b is null; -select timediff(b, a) >= '00:00:03' from t2; -timediff(b, a) >= '00:00:03' +# Test 2: Does the query with SLEEP need a reasonable time even in case +# of the non first execution? +SELECT COUNT(*) > 4 - 1 - 1 INTO @aux2 FROM t_history +WHERE TIMEDIFF(end_ts,start_ts) - @sleep_time_per_result_row * @row_count +BETWEEN 0 AND @max_acceptable_delay +AND attempt > 1; +SELECT @aux2 AS "Expect 1"; +Expect 1 1 +# Test 3: The query with SLEEP must be not cached. +SELECT COUNT(*) = 4 INTO @aux3 FROM t_history +WHERE end_cached = start_cached; +SELECT @aux3 AS "Expect 1"; +Expect 1 1 -1 -drop table t2; -drop table t1; -set global query_cache_size=default; +DROP TABLE t1; +DROP TEMPORARY TABLE t_history; +SET @@global.query_cache_size = default; create table t1 select INET_ATON('255.255.0.1') as `a`; show create table t1; Table Create Table diff --git a/mysql-test/t/func_misc.test b/mysql-test/t/func_misc.test index 12824a9b39d..7415f3ef56a 100644 --- a/mysql-test/t/func_misc.test +++ b/mysql-test/t/func_misc.test @@ -94,36 +94,192 @@ show create table t1; drop table t1; # -# Bug #6760: Add SLEEP() function +# Bug#6760: Add SLEEP() function (feature request) +# +# Logics of original test: +# Reveal that a query with SLEEP does not need less time than estimated. +# +# Bug#12689: SLEEP() gets incorrectly cached/optimized-away +# +# Description from bug report (slightly modified) +# +# Bug 1 (happened all time): +# SELECT * FROM t1 WHERE SLEEP(1) will only result in a sleep of 1 +# second, regardless of the number of rows in t1. +# Bug 2 (happened all time): +# Such a query will also get cached by the query cache, but should not. +# +# Notes (mleich, 2008-05) +# ======================= +# +# Experiments around +# Bug#36345 Test 'func_misc' fails on RHAS3 x86_64 +# showed that the tests for both bugs could produce in case of parallel +# artificial system time (like via ntpd) +# - decreases false alarm +# - increases false success +# +# We try here to circumvent these issues by reimplementation of the tests +# and sophisticated scripting, although the cause of the problems is a massive +# error within the setup of the testing environment. +# Tests relying on or checking derivates of the system time must never meet +# parallel manipulations of system time. +# +# Results of experiments with/without manipulation of system time, +# information_schema.processlist content, high load on testing box +# ---------------------------------------------------------------- +# Definition: Predicted_cumulative_sleep_time = +# #_of_result_rows * sleep_time_per_result_row +# +# 1. Total (real sleep time) ~= predicted_cumulative_sleep_time !! +# 2. The state of a session within the PROCESSLIST changes to 'User sleep' +# if the sessions runs a statement containing the sleep function and the +# processing of the statement is just within the phase where the sleep +# is done. (*) +# 3. NOW() and processlist.time behave "synchronous" to system time and +# show also the "jumps" caused by system time manipulations. (*) +# 4. processlist.time is unsigned, the "next" value below 0 is ~ 4G (*) +# 5. Current processlist.time ~= current real sleep time if the system time +# was not manipulated. (*) +# 6. High system load can cause delays of <= 2 seconds. +# 7. Thanks to Davi for excellent hints and ideas. +# +# (*) +# - information_schema.processlist is not available before MySQL 5.1. +# - Observation of processlist content requires a +# - "worker" session sending the query with "send" and pulling results +# with "reap" +# - session observing the processlist parallel to the worker session +# "send" and "reap" do not work in case of an embedded server. +# Conclusion: Tests based on processlist have too many restrictions. +# +# Solutions for subtests based on TIMEDIFF of values filled via NOW() +# ------------------------------------------------------------------- +# Run the following sequence three times +# 1. SELECT +# 2. Query with SLEEP +# 3. SELECT +# If TIMEDIFF(,) is at least two times within a +# reasonable range assume that we did not met errors we were looking for. +# +# It is extreme unlikely that we have two system time changes within the +# < 30 seconds runtime. Even if the unlikely happens, there are so +# frequent runs of this test on this or another testing box which will +# catch the problem. # -create table t1 (a timestamp default '2005-05-05 01:01:01', - b timestamp default '2005-05-05 01:01:01'); -insert into t1 set a = now(); -select sleep(3); -update t1 set b = now(); -select timediff(b, a) >= '00:00:03' from t1; -drop table t1; +--echo #------------------------------------------------------------------------ +--echo # Tests for Bug#6760 and Bug#12689 +# Number of rows within the intended result set. +SET @row_count = 4; +# Parameter within SLEEP function +SET @sleep_time_per_result_row = 1; +# Maximum acceptable delay caused by high load on testing box +SET @max_acceptable_delay = 2; +# TIMEDIFF = time for query with sleep (mostly the time caused by SLEEP) +# + time for delays caused by high load on testing box +# Ensure that at least a reasonable fraction of TIMEDIFF is belongs to the SLEEP +# by appropriate setting of variables. +# Ensure that any "judging" has a base of minimum three attempts. +# (Test 2 uses all attempts except the first one.) +if (!` SELECT (@sleep_time_per_result_row * @row_count - @max_acceptable_delay > + @sleep_time_per_result_row) AND (@row_count - 1 >= 3)`) +{ + --echo # Have to abort because of error in plausibility check + --echo ###################################################### + --vertical_results + SELECT @sleep_time_per_result_row * @row_count - @max_acceptable_delay > + @sleep_time_per_result_row AS must_be_1, + @row_count - 1 >= 3 AS must_be_also_1, + @sleep_time_per_result_row, @row_count, @max_acceptable_delay; + exit; +} +SET @@global.query_cache_size = 1024 * 64; +--disable_warnings +DROP TEMPORARY TABLE IF EXISTS t_history; +DROP TABLE IF EXISTS t1; +--enable_warnings +CREATE TEMPORARY TABLE t_history (attempt SMALLINT, +start_ts DATETIME, end_ts DATETIME, +start_cached INTEGER, end_cached INTEGER); +CREATE TABLE t1 (f1 BIGINT); +let $num = `SELECT @row_count`; +while ($num) +{ + INSERT INTO t1 VALUES (1); + dec $num; +} + +let $loops = 4; +let $num = $loops; +while ($num) +{ + let $Qcache_queries_in_cache = + query_get_value(SHOW STATUS LIKE 'Qcache_queries_in_cache', Value, 1); + eval + INSERT INTO t_history + SET attempt = $loops - $num + 1, start_ts = NOW(), + start_cached = $Qcache_queries_in_cache; + SELECT *, SLEEP(@sleep_time_per_result_row) FROM t1; + # + # Do not determine Qcache_queries_in_cache before updating end_ts. The SHOW + # might cost too much time on an overloaded box. + eval + UPDATE t_history SET end_ts = NOW() + WHERE attempt = $loops - $num + 1; + let $Qcache_queries_in_cache = + query_get_value(SHOW STATUS LIKE 'Qcache_queries_in_cache', Value, 1); + eval + UPDATE t_history SET end_cached = $Qcache_queries_in_cache + WHERE attempt = $loops - $num + 1; + # DEBUG eval SELECT * FROM t_history WHERE attempt = $loops - $num + 1; + dec $num; +} + +# 1. The majority of queries with SLEEP must need a reasonable time +# -> SLEEP has an impact on runtime +# = Replacement for original Bug#6760 test +# -> total runtime is clear more needed than for one result row needed +# = Replacement for one of the original Bug#12689 tests +--echo # Test 1: Does the query with SLEEP need a reasonable time? +eval SELECT COUNT(*) > $loops - 1 INTO @aux1 FROM t_history +WHERE TIMEDIFF(end_ts,start_ts) - @sleep_time_per_result_row * @row_count + BETWEEN 0 AND @max_acceptable_delay; +SELECT @aux1 AS "Expect 1"; # -# Bug #12689: SLEEP() gets incorrectly cached/optimized-away +# 2. The majority of queries (the first one must be ignored) with SLEEP must +# need a reasonable time +# -> If we assume that the result of a cached query will be sent back +# immediate, without any sleep, than the query with SLEEP cannot be cached +# (current and intended behaviour for queries with SLEEP). +# -> It could be also not excluded that the query was cached but the server +# honoured somehow the SLEEP. Such a behaviour would be also acceptable. +# = Replacement for one of the original Bug#12689 tests +--echo # Test 2: Does the query with SLEEP need a reasonable time even in case +--echo # of the non first execution? +eval SELECT COUNT(*) > $loops - 1 - 1 INTO @aux2 FROM t_history +WHERE TIMEDIFF(end_ts,start_ts) - @sleep_time_per_result_row * @row_count + BETWEEN 0 AND @max_acceptable_delay + AND attempt > 1; +SELECT @aux2 AS "Expect 1"; # -set global query_cache_size=1355776; -create table t1 (a int); -insert into t1 values (1),(1),(1); -create table t2 (a datetime default null, b datetime default null); -insert into t2 set a = now(); -select a from t1 where sleep(1); -update t2 set b = now() where b is null; -insert into t2 set a = now(); -select a from t1 where sleep(a); -update t2 set b = now() where b is null; -insert into t2 set a = now(); -select a from t1 where sleep(1); -update t2 set b = now() where b is null; -select timediff(b, a) >= '00:00:03' from t2; -drop table t2; -drop table t1; -set global query_cache_size=default; +# 3. The query with SLEEP should be not cached. +# -> SHOW STATUS Qcache_queries_in_cache must be not incremented after +# the execution of the query with SLEEP +--echo # Test 3: The query with SLEEP must be not cached. +eval SELECT COUNT(*) = $loops INTO @aux3 FROM t_history +WHERE end_cached = start_cached; +SELECT @aux3 AS "Expect 1"; +# +# Dump the content of t_history if one of the tests failed. +if (`SELECT @aux1 + @aux2 + @aux3 <> 3`) +{ + --echo # Some tests failed, dumping the content of t_history + SELECT * FROM t_history; +} +DROP TABLE t1; +DROP TEMPORARY TABLE t_history; +SET @@global.query_cache_size = default; # # Bug #21466: INET_ATON() returns signed, not unsigned @@ -223,7 +379,7 @@ SELECT NAME_CONST('flag',-SQRT(4)) * MAX(a) FROM t1; DROP TABLE t1; # -# Bug #27545: erroneous usage of NAME_CONST with a name as the first parameter +# Bug #27545: erroneous usage of NAME_CONST with a name as the first parameter # resolved against a column name of a derived table hangs the client # From 15440264430b8dd7c10d950926a34f8f20f14427 Mon Sep 17 00:00:00 2001 From: "Matthias Leich mleich@mysql.com" Date: Mon, 2 Jun 2008 21:57:11 +0200 Subject: [PATCH 13/46] Bug#36788 Multiple funcs_1 'trig' tests are failing on vanilla builds Fix for this bug and additional improvements/fixes In detail: - Remove unicode attribute from several columns (unicode properties were nowhere needed/tested) of the table tb3 -> The runnability of these tests depends no more on the availibility of some optional collations. - Use a table tb3 with the same layout for all engines to be tested and unify the engine name within the protocols. -> _trig_.result have the same content - Do not load data into tb3 if these rows have no impact on result sets - Add tests for NDB (they exist already in 5.1) - "--replace_result" at various places because NDB variants of tests failed with "random" row order in results This fixes a till now unknown weakness within the funcs_1 NDB tests existing in 5.1 and 6.0 - Fix the expected result of ndb_trig_1011ext which suffered from Bug 32656 + disable this test - funcs_1 could be executed with the mysql-test-run.pl option "--reorder", which saves some runtime by optimizing server restarts. Runtimes on tmpfs (one attempt only): with reorder 132 seconds without reorder 183 seconds - Adjust two "check" statements within func_misc.test which were incorrect (We had one run with result set difference though the server worked good.) - minor fixes in comments --- Makefile.am | 4 +- mysql-test/r/func_misc.result | 4 +- mysql-test/suite/funcs_1/include/tb3.inc | 66 ++ .../suite/funcs_1/r/innodb_trig_0102.result | 34 +- .../suite/funcs_1/r/innodb_trig_03.result | 25 +- .../suite/funcs_1/r/innodb_trig_0407.result | 34 +- .../suite/funcs_1/r/innodb_trig_08.result | 22 +- .../suite/funcs_1/r/innodb_trig_09.result | 22 +- .../funcs_1/r/innodb_trig_1011ext.result | 52 +- .../suite/funcs_1/r/memory_trig_0102.result | 22 +- .../suite/funcs_1/r/memory_trig_03.result | 13 +- .../suite/funcs_1/r/memory_trig_0407.result | 22 +- .../suite/funcs_1/r/memory_trig_08.result | 10 +- .../suite/funcs_1/r/memory_trig_09.result | 2 +- .../funcs_1/r/memory_trig_1011ext.result | 38 +- .../suite/funcs_1/r/myisam_trig_0102.result | 34 +- .../suite/funcs_1/r/myisam_trig_03.result | 25 +- .../suite/funcs_1/r/myisam_trig_0407.result | 34 +- .../suite/funcs_1/r/myisam_trig_08.result | 22 +- .../suite/funcs_1/r/myisam_trig_09.result | 22 +- .../funcs_1/r/myisam_trig_1011ext.result | 52 +- .../suite/funcs_1/r/ndb_trig_0102.result | 357 +++++++++ mysql-test/suite/funcs_1/r/ndb_trig_03.result | 695 ++++++++++++++++++ .../suite/funcs_1/r/ndb_trig_0407.result | 473 ++++++++++++ mysql-test/suite/funcs_1/r/ndb_trig_08.result | 529 +++++++++++++ mysql-test/suite/funcs_1/r/ndb_trig_09.result | 267 +++++++ .../suite/funcs_1/r/ndb_trig_1011ext.result | 394 ++++++++++ mysql-test/suite/funcs_1/t/disabled.def | 1 + .../suite/funcs_1/t/innodb_trig_0102.test | 8 +- .../suite/funcs_1/t/innodb_trig_03.test | 8 +- .../suite/funcs_1/t/innodb_trig_0407.test | 8 +- .../suite/funcs_1/t/innodb_trig_08.test | 8 +- .../suite/funcs_1/t/innodb_trig_09.test | 8 +- .../suite/funcs_1/t/innodb_trig_1011ext.test | 8 +- .../suite/funcs_1/t/memory_trig_0102.test | 8 +- .../suite/funcs_1/t/memory_trig_03.test | 8 +- .../suite/funcs_1/t/memory_trig_0407.test | 8 +- .../suite/funcs_1/t/memory_trig_08.test | 8 +- .../suite/funcs_1/t/memory_trig_09.test | 8 +- .../suite/funcs_1/t/memory_trig_1011ext.test | 8 +- .../suite/funcs_1/t/myisam_trig_0102.test | 8 +- .../suite/funcs_1/t/myisam_trig_03.test | 8 +- .../suite/funcs_1/t/myisam_trig_0407.test | 8 +- .../suite/funcs_1/t/myisam_trig_08.test | 8 +- .../suite/funcs_1/t/myisam_trig_09.test | 8 +- .../suite/funcs_1/t/myisam_trig_1011ext.test | 8 +- mysql-test/suite/funcs_1/t/ndb_trig_0102.test | 10 + mysql-test/suite/funcs_1/t/ndb_trig_03.test | 10 + mysql-test/suite/funcs_1/t/ndb_trig_0407.test | 10 + mysql-test/suite/funcs_1/t/ndb_trig_08.test | 10 + mysql-test/suite/funcs_1/t/ndb_trig_09.test | 10 + .../suite/funcs_1/t/ndb_trig_1011ext.test | 10 + .../suite/funcs_1/triggers/triggers_0102.inc | 19 +- .../suite/funcs_1/triggers/triggers_03.inc | 9 + .../suite/funcs_1/triggers/triggers_0407.inc | 31 +- .../suite/funcs_1/triggers/triggers_08.inc | 8 +- .../suite/funcs_1/triggers/triggers_09.inc | 9 +- .../funcs_1/triggers/triggers_1011ext.inc | 58 +- mysql-test/t/func_misc.test | 6 +- 59 files changed, 3170 insertions(+), 449 deletions(-) create mode 100644 mysql-test/suite/funcs_1/include/tb3.inc create mode 100644 mysql-test/suite/funcs_1/r/ndb_trig_0102.result create mode 100644 mysql-test/suite/funcs_1/r/ndb_trig_03.result create mode 100644 mysql-test/suite/funcs_1/r/ndb_trig_0407.result create mode 100644 mysql-test/suite/funcs_1/r/ndb_trig_08.result create mode 100644 mysql-test/suite/funcs_1/r/ndb_trig_09.result create mode 100644 mysql-test/suite/funcs_1/r/ndb_trig_1011ext.result create mode 100644 mysql-test/suite/funcs_1/t/ndb_trig_0102.test create mode 100644 mysql-test/suite/funcs_1/t/ndb_trig_03.test create mode 100644 mysql-test/suite/funcs_1/t/ndb_trig_0407.test create mode 100644 mysql-test/suite/funcs_1/t/ndb_trig_08.test create mode 100644 mysql-test/suite/funcs_1/t/ndb_trig_09.test create mode 100644 mysql-test/suite/funcs_1/t/ndb_trig_1011ext.test diff --git a/Makefile.am b/Makefile.am index eb837b1fdd4..774239eaad2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -154,7 +154,7 @@ test-bt: -cd mysql-test ; MTR_BUILD_THREAD=auto \ @PERL@ ./mysql-test-run.pl --force --comment=ps --ps-protocol -cd mysql-test ; MTR_BUILD_THREAD=auto \ - @PERL@ ./mysql-test-run.pl --force --comment=funcs1_ps --ps-protocol --suite=funcs_1 + @PERL@ ./mysql-test-run.pl --force --comment=funcs1_ps --ps-protocol --reorder --suite=funcs_1 -cd mysql-test ; MTR_BUILD_THREAD=auto \ @PERL@ ./mysql-test-run.pl --force --comment=funcs2 --suite=funcs_2 -if [ -d mysql-test/suite/nist ] ; then \ @@ -179,7 +179,7 @@ test-force-full-pl: test-force-full test-ext-funcs: cd mysql-test ; \ - @PERL@ ./mysql-test-run.pl --force --suite=funcs_1 ; \ + @PERL@ ./mysql-test-run.pl --force --reorder --suite=funcs_1 ; \ @PERL@ ./mysql-test-run.pl --force --suite=funcs_2 test-ext: test-ext-funcs diff --git a/mysql-test/r/func_misc.result b/mysql-test/r/func_misc.result index 0cf2eb9323a..d50dda55bfb 100644 --- a/mysql-test/r/func_misc.result +++ b/mysql-test/r/func_misc.result @@ -168,7 +168,7 @@ WHERE attempt = 4 - 1 + 1; UPDATE t_history SET end_cached = 0 WHERE attempt = 4 - 1 + 1; # Test 1: Does the query with SLEEP need a reasonable time? -SELECT COUNT(*) > 4 - 1 INTO @aux1 FROM t_history +SELECT COUNT(*) >= 4 - 1 INTO @aux1 FROM t_history WHERE TIMEDIFF(end_ts,start_ts) - @sleep_time_per_result_row * @row_count BETWEEN 0 AND @max_acceptable_delay; SELECT @aux1 AS "Expect 1"; @@ -176,7 +176,7 @@ Expect 1 1 # Test 2: Does the query with SLEEP need a reasonable time even in case # of the non first execution? -SELECT COUNT(*) > 4 - 1 - 1 INTO @aux2 FROM t_history +SELECT COUNT(*) >= 4 - 1 - 1 INTO @aux2 FROM t_history WHERE TIMEDIFF(end_ts,start_ts) - @sleep_time_per_result_row * @row_count BETWEEN 0 AND @max_acceptable_delay AND attempt > 1; diff --git a/mysql-test/suite/funcs_1/include/tb3.inc b/mysql-test/suite/funcs_1/include/tb3.inc new file mode 100644 index 00000000000..5e7dc369ddb --- /dev/null +++ b/mysql-test/suite/funcs_1/include/tb3.inc @@ -0,0 +1,66 @@ +##### suite/funcs_1/include/tb3.inc +# +# This auxiliary script is used in several Trigger tests. +# +# If the table need data than the file std_data_ln/funcs_1/memory_tb3.txt +# could be used. +# + +--disable_warnings +drop table if exists tb3; +--enable_warnings +--replace_result $engine_type +eval create table tb3 ( +f118 char not null DEFAULT 'a', +f119 char binary not null DEFAULT b'101', +f120 char ascii not null DEFAULT b'101', +f121 char(50), +f122 char(50), +f129 binary not null DEFAULT b'101', +f130 tinyint not null DEFAULT 99, +f131 tinyint unsigned not null DEFAULT 99, +f132 tinyint zerofill not null DEFAULT 99, +f133 tinyint unsigned zerofill not null DEFAULT 99, +f134 smallint not null DEFAULT 999, +f135 smallint unsigned not null DEFAULT 999, +f136 smallint zerofill not null DEFAULT 999, +f137 smallint unsigned zerofill not null DEFAULT 999, +f138 mediumint not null DEFAULT 9999, +f139 mediumint unsigned not null DEFAULT 9999, +f140 mediumint zerofill not null DEFAULT 9999, +f141 mediumint unsigned zerofill not null DEFAULT 9999, +f142 int not null DEFAULT 99999, +f143 int unsigned not null DEFAULT 99999, +f144 int zerofill not null DEFAULT 99999, +f145 int unsigned zerofill not null DEFAULT 99999, +f146 bigint not null DEFAULT 999999, +f147 bigint unsigned not null DEFAULT 999999, +f148 bigint zerofill not null DEFAULT 999999, +f149 bigint unsigned zerofill not null DEFAULT 999999, +f150 decimal not null DEFAULT 999.999, +f151 decimal unsigned not null DEFAULT 999.17, +f152 decimal zerofill not null DEFAULT 999.999, +f153 decimal unsigned zerofill, +f154 decimal (0), +f155 decimal (64), +f156 decimal (0) unsigned, +f157 decimal (64) unsigned, +f158 decimal (0) zerofill, +f159 decimal (64) zerofill, +f160 decimal (0) unsigned zerofill, +f161 decimal (64) unsigned zerofill, +f162 decimal (0,0), +f163 decimal (63,30), +f164 decimal (0,0) unsigned, +f165 decimal (63,30) unsigned, +f166 decimal (0,0) zerofill, +f167 decimal (63,30) zerofill, +f168 decimal (0,0) unsigned zerofill, +f169 decimal (63,30) unsigned zerofill, +f170 numeric, +f171 numeric unsigned, +f172 numeric zerofill, +f173 numeric unsigned zerofill, +f174 numeric (0), +f175 numeric (64) +) engine = $engine_type; diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_0102.result b/mysql-test/suite/funcs_1/r/innodb_trig_0102.result index ff1836f1313..1ada907f9e6 100644 --- a/mysql-test/suite/funcs_1/r/innodb_trig_0102.result +++ b/mysql-test/suite/funcs_1/r/innodb_trig_0102.result @@ -1,17 +1,11 @@ USE test; -drop table if exists tb3 ; +drop table if exists tb3; create table tb3 ( f118 char not null DEFAULT 'a', f119 char binary not null DEFAULT b'101', f120 char ascii not null DEFAULT b'101', -f121 tinytext, -f122 text, -f123 mediumtext, -f124 longtext unicode, -f125 tinyblob, -f126 blob, -f127 mediumblob, -f128 longblob, +f121 char(50), +f122 char(50), f129 binary not null DEFAULT b'101', f130 tinyint not null DEFAULT 99, f131 tinyint unsigned not null DEFAULT 99, @@ -59,13 +53,11 @@ f172 numeric zerofill, f173 numeric unsigned zerofill, f174 numeric (0), f175 numeric (64) -) engine = innodb; +) engine = ; Warnings: Note 1265 Data truncated for column 'f150' at row 1 Note 1265 Data truncated for column 'f151' at row 1 Note 1265 Data truncated for column 'f152' at row 1 -load data infile '/std_data_ln/funcs_1/innodb_tb3.txt' -into table tb3; Testcase: 3.5.1.1: ------------------ @@ -194,7 +186,7 @@ Testcase 3.5.1.7: - need to fix drop table if exists t1; Warnings: Note 1051 Unknown table 't1' -create table t1 (f1 int, f2 char(25),f3 int) engine=innodb; +create table t1 (f1 int, f2 char(25),f3 int) engine = ; CREATE TRIGGER trg5_1 BEFORE INSERT on test.t1 for each row set new.f3 = '14'; CREATE TRIGGER trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ @@ -233,7 +225,7 @@ ERROR HY000: Trigger in wrong schema drop database if exists trig_db; create database trig_db; use trig_db; -create table t1 (f1 integer) engine = innodb; +create table t1 (f1 integer) engine = ; use test; CREATE TRIGGER trig_db.trg6_2 AFTER INSERT on tb3 for each row set @ret_trg6_2 = 5; @@ -261,8 +253,8 @@ Testcase 3.5.1.?: ----------------- drop table if exists t1; drop table if exists t2; -create table t1 (f1 char(50), f2 integer) engine = innodb; -create table t2 (f1 char(50), f2 integer) engine = innodb; +create table t1 (f1 char(50), f2 integer) engine = ; +create table t2 (f1 char(50), f2 integer) engine = ; create trigger trig before insert on t1 for each row set new.f1 ='trig t1'; create trigger trig before update on t2 @@ -294,15 +286,15 @@ create database trig_db1; create database trig_db2; create database trig_db3; use trig_db1; -create table t1 (f1 char(50), f2 integer) engine = innodb; +create table t1 (f1 char(50), f2 integer) engine = ; create trigger trig before insert on t1 for each row set new.f1 ='trig1', @test_var1='trig1'; use trig_db2; -create table t2 (f1 char(50), f2 integer) engine = innodb; +create table t2 (f1 char(50), f2 integer) engine = ; create trigger trig before insert on t2 for each row set new.f1 ='trig2', @test_var2='trig2'; use trig_db3; -create table t1 (f1 char(50), f2 integer) engine = innodb; +create table t1 (f1 char(50), f2 integer) engine = ; create trigger trig before insert on t1 for each row set new.f1 ='trig3', @test_var3='trig3'; set @test_var1= '', @test_var2= '', @test_var3= ''; @@ -340,8 +332,8 @@ drop database if exists trig_db2; create database trig_db1; create database trig_db2; use trig_db1; -create table t1 (f1 char(50), f2 integer) engine = innodb; -create table trig_db2.t1 (f1 char(50), f2 integer) engine = innodb; +create table t1 (f1 char(50), f2 integer) engine = ; +create table trig_db2.t1 (f1 char(50), f2 integer) engine = ; create trigger trig1_b before insert on t1 for each row set @test_var1='trig1_b'; create trigger trig_db1.trig1_a after insert on t1 diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_03.result b/mysql-test/suite/funcs_1/r/innodb_trig_03.result index e45115cdfab..0d29724fcb7 100644 --- a/mysql-test/suite/funcs_1/r/innodb_trig_03.result +++ b/mysql-test/suite/funcs_1/r/innodb_trig_03.result @@ -1,17 +1,11 @@ USE test; -drop table if exists tb3 ; +drop table if exists tb3; create table tb3 ( f118 char not null DEFAULT 'a', f119 char binary not null DEFAULT b'101', f120 char ascii not null DEFAULT b'101', -f121 tinytext, -f122 text, -f123 mediumtext, -f124 longtext unicode, -f125 tinyblob, -f126 blob, -f127 mediumblob, -f128 longblob, +f121 char(50), +f122 char(50), f129 binary not null DEFAULT b'101', f130 tinyint not null DEFAULT 99, f131 tinyint unsigned not null DEFAULT 99, @@ -59,20 +53,18 @@ f172 numeric zerofill, f173 numeric unsigned zerofill, f174 numeric (0), f175 numeric (64) -) engine = innodb; +) engine = ; Warnings: Note 1265 Data truncated for column 'f150' at row 1 Note 1265 Data truncated for column 'f151' at row 1 Note 1265 Data truncated for column 'f152' at row 1 -load data infile '/std_data_ln/funcs_1/innodb_tb3.txt' -into table tb3; Testcase 3.5.3: --------------- drop database if exists priv_db; create database priv_db; use priv_db; -create table t1 (f1 char(20)) engine= innodb; +create table t1 (f1 char(20)) engine= ; create User test_noprivs@localhost; set password for test_noprivs@localhost = password('PWD'); create User test_yesprivs@localhost; @@ -609,8 +601,8 @@ Testcase: 3.5.3.x: use priv_db; drop table if exists t1; drop table if exists t2; -create table t1 (f1 int) engine= innodb; -create table t2 (f2 int) engine= innodb; +create table t1 (f1 int) engine= ; +create table t2 (f2 int) engine= ; revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; grant SUPER on *.* to test_yesprivs@localhost; grant SELECT, UPDATE on priv_db.t1 to test_yesprivs@localhost; @@ -699,4 +691,5 @@ drop database if exists priv_db; drop user test_yesprivs@localhost; drop user test_noprivs@localhost; drop user test_noprivs; -DROP TABLE test.tb3; +use test; +drop table tb3; diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_0407.result b/mysql-test/suite/funcs_1/r/innodb_trig_0407.result index bd190c7ed2f..a4871065c04 100644 --- a/mysql-test/suite/funcs_1/r/innodb_trig_0407.result +++ b/mysql-test/suite/funcs_1/r/innodb_trig_0407.result @@ -1,17 +1,11 @@ USE test; -drop table if exists tb3 ; +drop table if exists tb3; create table tb3 ( f118 char not null DEFAULT 'a', f119 char binary not null DEFAULT b'101', f120 char ascii not null DEFAULT b'101', -f121 tinytext, -f122 text, -f123 mediumtext, -f124 longtext unicode, -f125 tinyblob, -f126 blob, -f127 mediumblob, -f128 longblob, +f121 char(50), +f122 char(50), f129 binary not null DEFAULT b'101', f130 tinyint not null DEFAULT 99, f131 tinyint unsigned not null DEFAULT 99, @@ -59,13 +53,11 @@ f172 numeric zerofill, f173 numeric unsigned zerofill, f174 numeric (0), f175 numeric (64) -) engine = innodb; +) engine = ; Warnings: Note 1265 Data truncated for column 'f150' at row 1 Note 1265 Data truncated for column 'f151' at row 1 Note 1265 Data truncated for column 'f152' at row 1 -load data infile '/std_data_ln/funcs_1/innodb_tb3.txt' -into table tb3; Testcase: 3.5: -------------- @@ -86,7 +78,7 @@ Testcase 3.5.4.1: ----------------- create database db_drop; Use db_drop; -create table t1 (f1 char(30)) engine=innodb; +create table t1 (f1 char(30)) engine = ; grant INSERT, SELECT on db_drop.t1 to test_general; Use db_drop; Create trigger trg1 BEFORE INSERT on t1 @@ -114,7 +106,7 @@ Testcase 3.5.4.2: create database db_drop2; Use db_drop2; drop table if exists t1_432 ; -create table t1_432 (f1 char (30)) engine=innodb; +create table t1_432 (f1 char (30)) engine = ; Drop trigger tr_does_not_exit; ERROR HY000: Trigger does not exist drop table if exists t1_432 ; @@ -126,8 +118,8 @@ create database db_drop3; Use db_drop3; drop table if exists t1_433 ; drop table if exists t1_433a ; -create table t1_433 (f1 char (30)) engine=innodb; -create table t1_433a (f1a char (5)) engine=innodb; +create table t1_433 (f1 char (30)) engine = ; +create table t1_433a (f1a char (5)) engine = ; CREATE TRIGGER trg3 BEFORE INSERT on t1_433 for each row set new.f1 = 'Trigger 3.5.4.3'; Drop trigger t1.433.trg3; @@ -147,7 +139,7 @@ Testcase 3.5.4.4: ----------------- create database db_drop4; Use db_drop4; -create table t1 (f1 char(30)) engine=innodb; +create table t1 (f1 char(30)) engine = ; grant INSERT, SELECT on db_drop4.t1 to test_general; Create trigger trg4 BEFORE INSERT on t1 for each row set new.f1='Trigger 3.5.4.4'; @@ -168,7 +160,7 @@ where information_schema.triggers.trigger_name='trg4'; trigger_schema trigger_name event_object_table create database db_drop4; Use db_drop4; -create table t1 (f1 char(30)) engine=innodb; +create table t1 (f1 char(30)) engine = ; grant INSERT, SELECT on db_drop4.t1 to test_general; Insert into t1 values ('2nd Insert 3.5.4.4'); Select * from t1; @@ -183,7 +175,7 @@ Testcase 3.5.4.5: ----------------- create database db_drop5; Use db_drop5; -create table t1 (f1 char(50)) engine=innodb; +create table t1 (f1 char(50)) engine = ; grant INSERT, SELECT on t1 to test_general; Create trigger trg5 BEFORE INSERT on t1 for each row set new.f1='Trigger 3.5.4.5'; @@ -199,7 +191,7 @@ select trigger_schema, trigger_name, event_object_table from information_schema.triggers where information_schema.triggers.trigger_name='trg5'; trigger_schema trigger_name event_object_table -create table t1 (f1 char(50)) engine=innodb; +create table t1 (f1 char(50)) engine = ; grant INSERT, SELECT on t1 to test_general; Insert into t1 values ('2nd Insert 3.5.4.5'); Select * from t1; @@ -240,7 +232,7 @@ Testcase 3.5.5.4: create database dbtest_one; create database dbtest_two; use dbtest_two; -create table t2 (f1 char(15)) engine=innodb; +create table t2 (f1 char(15)) engine = ; use dbtest_one; create trigger trg4 before INSERT on dbtest_two.t2 for each row set new.f1='trig 3.5.5.4'; diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_08.result b/mysql-test/suite/funcs_1/r/innodb_trig_08.result index 19e42143a5d..6ced07cef73 100644 --- a/mysql-test/suite/funcs_1/r/innodb_trig_08.result +++ b/mysql-test/suite/funcs_1/r/innodb_trig_08.result @@ -1,17 +1,11 @@ USE test; -drop table if exists tb3 ; +drop table if exists tb3; create table tb3 ( f118 char not null DEFAULT 'a', f119 char binary not null DEFAULT b'101', f120 char ascii not null DEFAULT b'101', -f121 tinytext, -f122 text, -f123 mediumtext, -f124 longtext unicode, -f125 tinyblob, -f126 blob, -f127 mediumblob, -f128 longblob, +f121 char(50), +f122 char(50), f129 binary not null DEFAULT b'101', f130 tinyint not null DEFAULT 99, f131 tinyint unsigned not null DEFAULT 99, @@ -59,13 +53,11 @@ f172 numeric zerofill, f173 numeric unsigned zerofill, f174 numeric (0), f175 numeric (64) -) engine = innodb; +) engine = ; Warnings: Note 1265 Data truncated for column 'f150' at row 1 Note 1265 Data truncated for column 'f151' at row 1 Note 1265 Data truncated for column 'f152' at row 1 -load data infile '/std_data_ln/funcs_1/innodb_tb3.txt' -into table tb3; Testcase: 3.5: -------------- @@ -94,17 +86,17 @@ create table t1_i ( i120 char ascii not null DEFAULT b'101', i136 smallint zerofill not null DEFAULT 999, i144 int zerofill not null DEFAULT 99999, -i163 decimal (63,30)) engine=innodb; +i163 decimal (63,30)) engine=; create table t1_u ( u120 char ascii not null DEFAULT b'101', u136 smallint zerofill not null DEFAULT 999, u144 int zerofill not null DEFAULT 99999, -u163 decimal (63,30)) engine=innodb; +u163 decimal (63,30)) engine=; create table t1_d ( d120 char ascii not null DEFAULT b'101', d136 smallint zerofill not null DEFAULT 999, d144 int zerofill not null DEFAULT 99999, -d163 decimal (63,30)) engine=innodb; +d163 decimal (63,30)) engine=; Insert into t1_u values ('a',111,99999,999.99); Insert into t1_u values ('b',222,99999,999.99); Insert into t1_u values ('c',333,99999,999.99); diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_09.result b/mysql-test/suite/funcs_1/r/innodb_trig_09.result index 321b988587e..b84f4f60583 100644 --- a/mysql-test/suite/funcs_1/r/innodb_trig_09.result +++ b/mysql-test/suite/funcs_1/r/innodb_trig_09.result @@ -1,17 +1,11 @@ USE test; -drop table if exists tb3 ; +drop table if exists tb3; create table tb3 ( f118 char not null DEFAULT 'a', f119 char binary not null DEFAULT b'101', f120 char ascii not null DEFAULT b'101', -f121 tinytext, -f122 text, -f123 mediumtext, -f124 longtext unicode, -f125 tinyblob, -f126 blob, -f127 mediumblob, -f128 longblob, +f121 char(50), +f122 char(50), f129 binary not null DEFAULT b'101', f130 tinyint not null DEFAULT 99, f131 tinyint unsigned not null DEFAULT 99, @@ -59,12 +53,12 @@ f172 numeric zerofill, f173 numeric unsigned zerofill, f174 numeric (0), f175 numeric (64) -) engine = innodb; +) engine = ; Warnings: Note 1265 Data truncated for column 'f150' at row 1 Note 1265 Data truncated for column 'f151' at row 1 Note 1265 Data truncated for column 'f152' at row 1 -load data infile '/std_data_ln/funcs_1/innodb_tb3.txt' +load data infile '/std_data_ln/funcs_1/memory_tb3.txt' into table tb3; Testcase 3.5.9.1/2: @@ -74,9 +68,9 @@ set new.f142 = 94087, @counter=@counter+1; TotalRows 10 Affected -8 +9 NotAffected -2 +1 NewValuew 0 set @counter=0; @@ -84,7 +78,7 @@ Update tb3 Set f142='1' where f130<100; select count(*) as ExpectedChanged, @counter as TrigCounter from tb3 where f142=94087; ExpectedChanged TrigCounter -8 8 +9 9 select count(*) as ExpectedNotChange from tb3 where f130<100 and f142<>94087; ExpectedNotChange diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_1011ext.result b/mysql-test/suite/funcs_1/r/innodb_trig_1011ext.result index 7412b8c8eff..5c5db60e622 100644 --- a/mysql-test/suite/funcs_1/r/innodb_trig_1011ext.result +++ b/mysql-test/suite/funcs_1/r/innodb_trig_1011ext.result @@ -1,17 +1,11 @@ USE test; -drop table if exists tb3 ; +drop table if exists tb3; create table tb3 ( f118 char not null DEFAULT 'a', f119 char binary not null DEFAULT b'101', f120 char ascii not null DEFAULT b'101', -f121 tinytext, -f122 text, -f123 mediumtext, -f124 longtext unicode, -f125 tinyblob, -f126 blob, -f127 mediumblob, -f128 longblob, +f121 char(50), +f122 char(50), f129 binary not null DEFAULT b'101', f130 tinyint not null DEFAULT 99, f131 tinyint unsigned not null DEFAULT 99, @@ -59,12 +53,12 @@ f172 numeric zerofill, f173 numeric unsigned zerofill, f174 numeric (0), f175 numeric (64) -) engine = innodb; +) engine = ; Warnings: Note 1265 Data truncated for column 'f150' at row 1 Note 1265 Data truncated for column 'f151' at row 1 Note 1265 Data truncated for column 'f152' at row 1 -load data infile '/std_data_ln/funcs_1/innodb_tb3.txt' +load data infile '/std_data_ln/funcs_1/memory_tb3.txt' into table tb3; Testcase 3.5.10.1/2/3: @@ -135,7 +129,7 @@ delete from tb3 where f122 like 'Test 3.5.10.1/2/3%'; Testcase 3.5.10.4: ------------------ -create table tb_load (f1 int, f2 char(25),f3 int) engine=innodb; +create table tb_load (f1 int, f2 char(25),f3 int) engine = ; Create trigger trg4 before insert on tb_load for each row set new.f3=-(new.f1 div 5), @counter= @counter+1; set @counter= 0; @@ -169,7 +163,7 @@ Testcase 3.5.10.6: (implemented in trig_frkey.test) Testcase 3.5.10.extra: ---------------------- -create table t1_sp (var136 tinyint, var151 decimal) engine=innodb; +create table t1_sp (var136 tinyint, var151 decimal) engine = ; create trigger trg before insert on t1_sp for each row set @counter=@counter+1; create procedure trig_sp() @@ -218,12 +212,12 @@ drop table if exists t2_2; drop table if exists t2_3; drop table if exists t2_4; drop table if exists t3; -create table t1 (f1 integer) engine=innodb; -create table t2_1 (f1 integer) engine=innodb; -create table t2_2 (f1 integer) engine=innodb; -create table t2_3 (f1 integer) engine=innodb; -create table t2_4 (f1 integer) engine=innodb; -create table t3 (f1 integer) engine=innodb; +create table t1 (f1 integer) engine = ; +create table t2_1 (f1 integer) engine = ; +create table t2_2 (f1 integer) engine = ; +create table t2_3 (f1 integer) engine = ; +create table t2_4 (f1 integer) engine = ; +create table t3 (f1 integer) engine = ; insert into t1 values (1); create trigger tr1 after insert on t1 for each row BEGIN @@ -261,10 +255,10 @@ drop table if exists t1; drop table if exists t2; drop table if exists t3; drop table if exists t4; -create table t1 (f1 integer) engine = innodb; -create table t2 (f2 integer) engine = innodb; -create table t3 (f3 integer) engine = innodb; -create table t4 (f4 integer) engine = innodb; +create table t1 (f1 integer) engine = ; +create table t2 (f2 integer) engine = ; +create table t3 (f3 integer) engine = ; +create table t4 (f4 integer) engine = ; insert into t1 values (0); create trigger tr1 after insert on t1 for each row insert into t2 (f2) values (new.f1+1); @@ -300,7 +294,7 @@ set @sql_mode='traditional'; create table t1_sp ( count integer, var136 tinyint, -var151 decimal) engine=innodb; +var151 decimal) engine = ; create procedure trig_sp() begin declare done int default 0; @@ -354,7 +348,7 @@ drop procedure trig_sp; drop trigger trg; drop table t1_sp; -Testcase y.y.y.5: Roleback of nested trigger references +Testcase y.y.y.5: Rollback of nested trigger references ------------------------------------------------------- set @@sql_mode='traditional'; use test; @@ -362,10 +356,10 @@ drop table if exists t1; drop table if exists t2; drop table if exists t3; drop table if exists t4; -create table t1 (f1 integer) engine = innodb; -create table t2 (f2 integer) engine = innodb; -create table t3 (f3 integer) engine = innodb; -create table t4 (f4 tinyint) engine = innodb; +create table t1 (f1 integer) engine = ; +create table t2 (f2 integer) engine = ; +create table t3 (f3 integer) engine = ; +create table t4 (f4 tinyint) engine = ; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( diff --git a/mysql-test/suite/funcs_1/r/memory_trig_0102.result b/mysql-test/suite/funcs_1/r/memory_trig_0102.result index d926d682d13..1ada907f9e6 100644 --- a/mysql-test/suite/funcs_1/r/memory_trig_0102.result +++ b/mysql-test/suite/funcs_1/r/memory_trig_0102.result @@ -53,13 +53,11 @@ f172 numeric zerofill, f173 numeric unsigned zerofill, f174 numeric (0), f175 numeric (64) -) engine = memory; +) engine = ; Warnings: Note 1265 Data truncated for column 'f150' at row 1 Note 1265 Data truncated for column 'f151' at row 1 Note 1265 Data truncated for column 'f152' at row 1 -load data infile '/std_data_ln/funcs_1/memory_tb3.txt' -into table tb3; Testcase: 3.5.1.1: ------------------ @@ -188,7 +186,7 @@ Testcase 3.5.1.7: - need to fix drop table if exists t1; Warnings: Note 1051 Unknown table 't1' -create table t1 (f1 int, f2 char(25),f3 int) engine=memory; +create table t1 (f1 int, f2 char(25),f3 int) engine = ; CREATE TRIGGER trg5_1 BEFORE INSERT on test.t1 for each row set new.f3 = '14'; CREATE TRIGGER trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ @@ -227,7 +225,7 @@ ERROR HY000: Trigger in wrong schema drop database if exists trig_db; create database trig_db; use trig_db; -create table t1 (f1 integer) engine = memory; +create table t1 (f1 integer) engine = ; use test; CREATE TRIGGER trig_db.trg6_2 AFTER INSERT on tb3 for each row set @ret_trg6_2 = 5; @@ -255,8 +253,8 @@ Testcase 3.5.1.?: ----------------- drop table if exists t1; drop table if exists t2; -create table t1 (f1 char(50), f2 integer) engine = memory; -create table t2 (f1 char(50), f2 integer) engine = memory; +create table t1 (f1 char(50), f2 integer) engine = ; +create table t2 (f1 char(50), f2 integer) engine = ; create trigger trig before insert on t1 for each row set new.f1 ='trig t1'; create trigger trig before update on t2 @@ -288,15 +286,15 @@ create database trig_db1; create database trig_db2; create database trig_db3; use trig_db1; -create table t1 (f1 char(50), f2 integer) engine = memory; +create table t1 (f1 char(50), f2 integer) engine = ; create trigger trig before insert on t1 for each row set new.f1 ='trig1', @test_var1='trig1'; use trig_db2; -create table t2 (f1 char(50), f2 integer) engine = memory; +create table t2 (f1 char(50), f2 integer) engine = ; create trigger trig before insert on t2 for each row set new.f1 ='trig2', @test_var2='trig2'; use trig_db3; -create table t1 (f1 char(50), f2 integer) engine = memory; +create table t1 (f1 char(50), f2 integer) engine = ; create trigger trig before insert on t1 for each row set new.f1 ='trig3', @test_var3='trig3'; set @test_var1= '', @test_var2= '', @test_var3= ''; @@ -334,8 +332,8 @@ drop database if exists trig_db2; create database trig_db1; create database trig_db2; use trig_db1; -create table t1 (f1 char(50), f2 integer) engine = memory; -create table trig_db2.t1 (f1 char(50), f2 integer) engine = memory; +create table t1 (f1 char(50), f2 integer) engine = ; +create table trig_db2.t1 (f1 char(50), f2 integer) engine = ; create trigger trig1_b before insert on t1 for each row set @test_var1='trig1_b'; create trigger trig_db1.trig1_a after insert on t1 diff --git a/mysql-test/suite/funcs_1/r/memory_trig_03.result b/mysql-test/suite/funcs_1/r/memory_trig_03.result index 4fa5a72afd5..0d29724fcb7 100644 --- a/mysql-test/suite/funcs_1/r/memory_trig_03.result +++ b/mysql-test/suite/funcs_1/r/memory_trig_03.result @@ -53,20 +53,18 @@ f172 numeric zerofill, f173 numeric unsigned zerofill, f174 numeric (0), f175 numeric (64) -) engine = memory; +) engine = ; Warnings: Note 1265 Data truncated for column 'f150' at row 1 Note 1265 Data truncated for column 'f151' at row 1 Note 1265 Data truncated for column 'f152' at row 1 -load data infile '/std_data_ln/funcs_1/memory_tb3.txt' -into table tb3; Testcase 3.5.3: --------------- drop database if exists priv_db; create database priv_db; use priv_db; -create table t1 (f1 char(20)) engine= memory; +create table t1 (f1 char(20)) engine= ; create User test_noprivs@localhost; set password for test_noprivs@localhost = password('PWD'); create User test_yesprivs@localhost; @@ -603,8 +601,8 @@ Testcase: 3.5.3.x: use priv_db; drop table if exists t1; drop table if exists t2; -create table t1 (f1 int) engine= memory; -create table t2 (f2 int) engine= memory; +create table t1 (f1 int) engine= ; +create table t2 (f2 int) engine= ; revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; grant SUPER on *.* to test_yesprivs@localhost; grant SELECT, UPDATE on priv_db.t1 to test_yesprivs@localhost; @@ -693,4 +691,5 @@ drop database if exists priv_db; drop user test_yesprivs@localhost; drop user test_noprivs@localhost; drop user test_noprivs; -DROP TABLE test.tb3; +use test; +drop table tb3; diff --git a/mysql-test/suite/funcs_1/r/memory_trig_0407.result b/mysql-test/suite/funcs_1/r/memory_trig_0407.result index 65bb3b91c9e..a4871065c04 100644 --- a/mysql-test/suite/funcs_1/r/memory_trig_0407.result +++ b/mysql-test/suite/funcs_1/r/memory_trig_0407.result @@ -53,13 +53,11 @@ f172 numeric zerofill, f173 numeric unsigned zerofill, f174 numeric (0), f175 numeric (64) -) engine = memory; +) engine = ; Warnings: Note 1265 Data truncated for column 'f150' at row 1 Note 1265 Data truncated for column 'f151' at row 1 Note 1265 Data truncated for column 'f152' at row 1 -load data infile '/std_data_ln/funcs_1/memory_tb3.txt' -into table tb3; Testcase: 3.5: -------------- @@ -80,7 +78,7 @@ Testcase 3.5.4.1: ----------------- create database db_drop; Use db_drop; -create table t1 (f1 char(30)) engine=memory; +create table t1 (f1 char(30)) engine = ; grant INSERT, SELECT on db_drop.t1 to test_general; Use db_drop; Create trigger trg1 BEFORE INSERT on t1 @@ -108,7 +106,7 @@ Testcase 3.5.4.2: create database db_drop2; Use db_drop2; drop table if exists t1_432 ; -create table t1_432 (f1 char (30)) engine=memory; +create table t1_432 (f1 char (30)) engine = ; Drop trigger tr_does_not_exit; ERROR HY000: Trigger does not exist drop table if exists t1_432 ; @@ -120,8 +118,8 @@ create database db_drop3; Use db_drop3; drop table if exists t1_433 ; drop table if exists t1_433a ; -create table t1_433 (f1 char (30)) engine=memory; -create table t1_433a (f1a char (5)) engine=memory; +create table t1_433 (f1 char (30)) engine = ; +create table t1_433a (f1a char (5)) engine = ; CREATE TRIGGER trg3 BEFORE INSERT on t1_433 for each row set new.f1 = 'Trigger 3.5.4.3'; Drop trigger t1.433.trg3; @@ -141,7 +139,7 @@ Testcase 3.5.4.4: ----------------- create database db_drop4; Use db_drop4; -create table t1 (f1 char(30)) engine=memory; +create table t1 (f1 char(30)) engine = ; grant INSERT, SELECT on db_drop4.t1 to test_general; Create trigger trg4 BEFORE INSERT on t1 for each row set new.f1='Trigger 3.5.4.4'; @@ -162,7 +160,7 @@ where information_schema.triggers.trigger_name='trg4'; trigger_schema trigger_name event_object_table create database db_drop4; Use db_drop4; -create table t1 (f1 char(30)) engine=memory; +create table t1 (f1 char(30)) engine = ; grant INSERT, SELECT on db_drop4.t1 to test_general; Insert into t1 values ('2nd Insert 3.5.4.4'); Select * from t1; @@ -177,7 +175,7 @@ Testcase 3.5.4.5: ----------------- create database db_drop5; Use db_drop5; -create table t1 (f1 char(50)) engine=memory; +create table t1 (f1 char(50)) engine = ; grant INSERT, SELECT on t1 to test_general; Create trigger trg5 BEFORE INSERT on t1 for each row set new.f1='Trigger 3.5.4.5'; @@ -193,7 +191,7 @@ select trigger_schema, trigger_name, event_object_table from information_schema.triggers where information_schema.triggers.trigger_name='trg5'; trigger_schema trigger_name event_object_table -create table t1 (f1 char(50)) engine=memory; +create table t1 (f1 char(50)) engine = ; grant INSERT, SELECT on t1 to test_general; Insert into t1 values ('2nd Insert 3.5.4.5'); Select * from t1; @@ -234,7 +232,7 @@ Testcase 3.5.5.4: create database dbtest_one; create database dbtest_two; use dbtest_two; -create table t2 (f1 char(15)) engine=memory; +create table t2 (f1 char(15)) engine = ; use dbtest_one; create trigger trg4 before INSERT on dbtest_two.t2 for each row set new.f1='trig 3.5.5.4'; diff --git a/mysql-test/suite/funcs_1/r/memory_trig_08.result b/mysql-test/suite/funcs_1/r/memory_trig_08.result index 3224df54f4d..6ced07cef73 100644 --- a/mysql-test/suite/funcs_1/r/memory_trig_08.result +++ b/mysql-test/suite/funcs_1/r/memory_trig_08.result @@ -53,13 +53,11 @@ f172 numeric zerofill, f173 numeric unsigned zerofill, f174 numeric (0), f175 numeric (64) -) engine = memory; +) engine = ; Warnings: Note 1265 Data truncated for column 'f150' at row 1 Note 1265 Data truncated for column 'f151' at row 1 Note 1265 Data truncated for column 'f152' at row 1 -load data infile '/std_data_ln/funcs_1/memory_tb3.txt' -into table tb3; Testcase: 3.5: -------------- @@ -88,17 +86,17 @@ create table t1_i ( i120 char ascii not null DEFAULT b'101', i136 smallint zerofill not null DEFAULT 999, i144 int zerofill not null DEFAULT 99999, -i163 decimal (63,30)) engine=memory; +i163 decimal (63,30)) engine=; create table t1_u ( u120 char ascii not null DEFAULT b'101', u136 smallint zerofill not null DEFAULT 999, u144 int zerofill not null DEFAULT 99999, -u163 decimal (63,30)) engine=memory; +u163 decimal (63,30)) engine=; create table t1_d ( d120 char ascii not null DEFAULT b'101', d136 smallint zerofill not null DEFAULT 999, d144 int zerofill not null DEFAULT 99999, -d163 decimal (63,30)) engine=memory; +d163 decimal (63,30)) engine=; Insert into t1_u values ('a',111,99999,999.99); Insert into t1_u values ('b',222,99999,999.99); Insert into t1_u values ('c',333,99999,999.99); diff --git a/mysql-test/suite/funcs_1/r/memory_trig_09.result b/mysql-test/suite/funcs_1/r/memory_trig_09.result index b14e0a02aa2..b84f4f60583 100644 --- a/mysql-test/suite/funcs_1/r/memory_trig_09.result +++ b/mysql-test/suite/funcs_1/r/memory_trig_09.result @@ -53,7 +53,7 @@ f172 numeric zerofill, f173 numeric unsigned zerofill, f174 numeric (0), f175 numeric (64) -) engine = memory; +) engine = ; Warnings: Note 1265 Data truncated for column 'f150' at row 1 Note 1265 Data truncated for column 'f151' at row 1 diff --git a/mysql-test/suite/funcs_1/r/memory_trig_1011ext.result b/mysql-test/suite/funcs_1/r/memory_trig_1011ext.result index 5f7859189aa..97f1eb22476 100644 --- a/mysql-test/suite/funcs_1/r/memory_trig_1011ext.result +++ b/mysql-test/suite/funcs_1/r/memory_trig_1011ext.result @@ -53,7 +53,7 @@ f172 numeric zerofill, f173 numeric unsigned zerofill, f174 numeric (0), f175 numeric (64) -) engine = memory; +) engine = ; Warnings: Note 1265 Data truncated for column 'f150' at row 1 Note 1265 Data truncated for column 'f151' at row 1 @@ -129,7 +129,7 @@ delete from tb3 where f122 like 'Test 3.5.10.1/2/3%'; Testcase 3.5.10.4: ------------------ -create table tb_load (f1 int, f2 char(25),f3 int) engine=memory; +create table tb_load (f1 int, f2 char(25),f3 int) engine = ; Create trigger trg4 before insert on tb_load for each row set new.f3=-(new.f1 div 5), @counter= @counter+1; set @counter= 0; @@ -163,7 +163,7 @@ Testcase 3.5.10.6: (implemented in trig_frkey.test) Testcase 3.5.10.extra: ---------------------- -create table t1_sp (var136 tinyint, var151 decimal) engine=memory; +create table t1_sp (var136 tinyint, var151 decimal) engine = ; create trigger trg before insert on t1_sp for each row set @counter=@counter+1; create procedure trig_sp() @@ -212,12 +212,12 @@ drop table if exists t2_2; drop table if exists t2_3; drop table if exists t2_4; drop table if exists t3; -create table t1 (f1 integer) engine=memory; -create table t2_1 (f1 integer) engine=memory; -create table t2_2 (f1 integer) engine=memory; -create table t2_3 (f1 integer) engine=memory; -create table t2_4 (f1 integer) engine=memory; -create table t3 (f1 integer) engine=memory; +create table t1 (f1 integer) engine = ; +create table t2_1 (f1 integer) engine = ; +create table t2_2 (f1 integer) engine = ; +create table t2_3 (f1 integer) engine = ; +create table t2_4 (f1 integer) engine = ; +create table t3 (f1 integer) engine = ; insert into t1 values (1); create trigger tr1 after insert on t1 for each row BEGIN @@ -255,10 +255,10 @@ drop table if exists t1; drop table if exists t2; drop table if exists t3; drop table if exists t4; -create table t1 (f1 integer) engine = memory; -create table t2 (f2 integer) engine = memory; -create table t3 (f3 integer) engine = memory; -create table t4 (f4 integer) engine = memory; +create table t1 (f1 integer) engine = ; +create table t2 (f2 integer) engine = ; +create table t3 (f3 integer) engine = ; +create table t4 (f4 integer) engine = ; insert into t1 values (0); create trigger tr1 after insert on t1 for each row insert into t2 (f2) values (new.f1+1); @@ -298,7 +298,7 @@ set @sql_mode='traditional'; create table t1_sp ( count integer, var136 tinyint, -var151 decimal) engine=memory; +var151 decimal) engine = ; create procedure trig_sp() begin declare done int default 0; @@ -352,7 +352,7 @@ drop procedure trig_sp; drop trigger trg; drop table t1_sp; -Testcase y.y.y.5: Roleback of nested trigger references +Testcase y.y.y.5: Rollback of nested trigger references ------------------------------------------------------- set @@sql_mode='traditional'; use test; @@ -360,10 +360,10 @@ drop table if exists t1; drop table if exists t2; drop table if exists t3; drop table if exists t4; -create table t1 (f1 integer) engine = memory; -create table t2 (f2 integer) engine = memory; -create table t3 (f3 integer) engine = memory; -create table t4 (f4 tinyint) engine = memory; +create table t1 (f1 integer) engine = ; +create table t2 (f2 integer) engine = ; +create table t3 (f3 integer) engine = ; +create table t4 (f4 tinyint) engine = ; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_0102.result b/mysql-test/suite/funcs_1/r/myisam_trig_0102.result index b49fe114791..1ada907f9e6 100644 --- a/mysql-test/suite/funcs_1/r/myisam_trig_0102.result +++ b/mysql-test/suite/funcs_1/r/myisam_trig_0102.result @@ -1,17 +1,11 @@ USE test; -drop table if exists tb3 ; +drop table if exists tb3; create table tb3 ( f118 char not null DEFAULT 'a', f119 char binary not null DEFAULT b'101', f120 char ascii not null DEFAULT b'101', -f121 tinytext, -f122 text, -f123 mediumtext, -f124 longtext unicode, -f125 tinyblob, -f126 blob, -f127 mediumblob, -f128 longblob, +f121 char(50), +f122 char(50), f129 binary not null DEFAULT b'101', f130 tinyint not null DEFAULT 99, f131 tinyint unsigned not null DEFAULT 99, @@ -59,13 +53,11 @@ f172 numeric zerofill, f173 numeric unsigned zerofill, f174 numeric (0), f175 numeric (64) -) Engine = myisam; +) engine = ; Warnings: Note 1265 Data truncated for column 'f150' at row 1 Note 1265 Data truncated for column 'f151' at row 1 Note 1265 Data truncated for column 'f152' at row 1 -load data infile '/std_data_ln/funcs_1/myisam_tb3.txt' -into table tb3; Testcase: 3.5.1.1: ------------------ @@ -194,7 +186,7 @@ Testcase 3.5.1.7: - need to fix drop table if exists t1; Warnings: Note 1051 Unknown table 't1' -create table t1 (f1 int, f2 char(25),f3 int) engine=myisam; +create table t1 (f1 int, f2 char(25),f3 int) engine = ; CREATE TRIGGER trg5_1 BEFORE INSERT on test.t1 for each row set new.f3 = '14'; CREATE TRIGGER trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ @@ -233,7 +225,7 @@ ERROR HY000: Trigger in wrong schema drop database if exists trig_db; create database trig_db; use trig_db; -create table t1 (f1 integer) engine = myisam; +create table t1 (f1 integer) engine = ; use test; CREATE TRIGGER trig_db.trg6_2 AFTER INSERT on tb3 for each row set @ret_trg6_2 = 5; @@ -261,8 +253,8 @@ Testcase 3.5.1.?: ----------------- drop table if exists t1; drop table if exists t2; -create table t1 (f1 char(50), f2 integer) engine = myisam; -create table t2 (f1 char(50), f2 integer) engine = myisam; +create table t1 (f1 char(50), f2 integer) engine = ; +create table t2 (f1 char(50), f2 integer) engine = ; create trigger trig before insert on t1 for each row set new.f1 ='trig t1'; create trigger trig before update on t2 @@ -294,15 +286,15 @@ create database trig_db1; create database trig_db2; create database trig_db3; use trig_db1; -create table t1 (f1 char(50), f2 integer) engine = myisam; +create table t1 (f1 char(50), f2 integer) engine = ; create trigger trig before insert on t1 for each row set new.f1 ='trig1', @test_var1='trig1'; use trig_db2; -create table t2 (f1 char(50), f2 integer) engine = myisam; +create table t2 (f1 char(50), f2 integer) engine = ; create trigger trig before insert on t2 for each row set new.f1 ='trig2', @test_var2='trig2'; use trig_db3; -create table t1 (f1 char(50), f2 integer) engine = myisam; +create table t1 (f1 char(50), f2 integer) engine = ; create trigger trig before insert on t1 for each row set new.f1 ='trig3', @test_var3='trig3'; set @test_var1= '', @test_var2= '', @test_var3= ''; @@ -340,8 +332,8 @@ drop database if exists trig_db2; create database trig_db1; create database trig_db2; use trig_db1; -create table t1 (f1 char(50), f2 integer) engine = myisam; -create table trig_db2.t1 (f1 char(50), f2 integer) engine = myisam; +create table t1 (f1 char(50), f2 integer) engine = ; +create table trig_db2.t1 (f1 char(50), f2 integer) engine = ; create trigger trig1_b before insert on t1 for each row set @test_var1='trig1_b'; create trigger trig_db1.trig1_a after insert on t1 diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_03.result b/mysql-test/suite/funcs_1/r/myisam_trig_03.result index ae003721cb4..0d29724fcb7 100644 --- a/mysql-test/suite/funcs_1/r/myisam_trig_03.result +++ b/mysql-test/suite/funcs_1/r/myisam_trig_03.result @@ -1,17 +1,11 @@ USE test; -drop table if exists tb3 ; +drop table if exists tb3; create table tb3 ( f118 char not null DEFAULT 'a', f119 char binary not null DEFAULT b'101', f120 char ascii not null DEFAULT b'101', -f121 tinytext, -f122 text, -f123 mediumtext, -f124 longtext unicode, -f125 tinyblob, -f126 blob, -f127 mediumblob, -f128 longblob, +f121 char(50), +f122 char(50), f129 binary not null DEFAULT b'101', f130 tinyint not null DEFAULT 99, f131 tinyint unsigned not null DEFAULT 99, @@ -59,20 +53,18 @@ f172 numeric zerofill, f173 numeric unsigned zerofill, f174 numeric (0), f175 numeric (64) -) Engine = myisam; +) engine = ; Warnings: Note 1265 Data truncated for column 'f150' at row 1 Note 1265 Data truncated for column 'f151' at row 1 Note 1265 Data truncated for column 'f152' at row 1 -load data infile '/std_data_ln/funcs_1/myisam_tb3.txt' -into table tb3; Testcase 3.5.3: --------------- drop database if exists priv_db; create database priv_db; use priv_db; -create table t1 (f1 char(20)) engine= myisam; +create table t1 (f1 char(20)) engine= ; create User test_noprivs@localhost; set password for test_noprivs@localhost = password('PWD'); create User test_yesprivs@localhost; @@ -609,8 +601,8 @@ Testcase: 3.5.3.x: use priv_db; drop table if exists t1; drop table if exists t2; -create table t1 (f1 int) engine= myisam; -create table t2 (f2 int) engine= myisam; +create table t1 (f1 int) engine= ; +create table t2 (f2 int) engine= ; revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; grant SUPER on *.* to test_yesprivs@localhost; grant SELECT, UPDATE on priv_db.t1 to test_yesprivs@localhost; @@ -699,4 +691,5 @@ drop database if exists priv_db; drop user test_yesprivs@localhost; drop user test_noprivs@localhost; drop user test_noprivs; -DROP TABLE test.tb3; +use test; +drop table tb3; diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_0407.result b/mysql-test/suite/funcs_1/r/myisam_trig_0407.result index ade033fa852..a4871065c04 100644 --- a/mysql-test/suite/funcs_1/r/myisam_trig_0407.result +++ b/mysql-test/suite/funcs_1/r/myisam_trig_0407.result @@ -1,17 +1,11 @@ USE test; -drop table if exists tb3 ; +drop table if exists tb3; create table tb3 ( f118 char not null DEFAULT 'a', f119 char binary not null DEFAULT b'101', f120 char ascii not null DEFAULT b'101', -f121 tinytext, -f122 text, -f123 mediumtext, -f124 longtext unicode, -f125 tinyblob, -f126 blob, -f127 mediumblob, -f128 longblob, +f121 char(50), +f122 char(50), f129 binary not null DEFAULT b'101', f130 tinyint not null DEFAULT 99, f131 tinyint unsigned not null DEFAULT 99, @@ -59,13 +53,11 @@ f172 numeric zerofill, f173 numeric unsigned zerofill, f174 numeric (0), f175 numeric (64) -) Engine = myisam; +) engine = ; Warnings: Note 1265 Data truncated for column 'f150' at row 1 Note 1265 Data truncated for column 'f151' at row 1 Note 1265 Data truncated for column 'f152' at row 1 -load data infile '/std_data_ln/funcs_1/myisam_tb3.txt' -into table tb3; Testcase: 3.5: -------------- @@ -86,7 +78,7 @@ Testcase 3.5.4.1: ----------------- create database db_drop; Use db_drop; -create table t1 (f1 char(30)) engine=myisam; +create table t1 (f1 char(30)) engine = ; grant INSERT, SELECT on db_drop.t1 to test_general; Use db_drop; Create trigger trg1 BEFORE INSERT on t1 @@ -114,7 +106,7 @@ Testcase 3.5.4.2: create database db_drop2; Use db_drop2; drop table if exists t1_432 ; -create table t1_432 (f1 char (30)) engine=myisam; +create table t1_432 (f1 char (30)) engine = ; Drop trigger tr_does_not_exit; ERROR HY000: Trigger does not exist drop table if exists t1_432 ; @@ -126,8 +118,8 @@ create database db_drop3; Use db_drop3; drop table if exists t1_433 ; drop table if exists t1_433a ; -create table t1_433 (f1 char (30)) engine=myisam; -create table t1_433a (f1a char (5)) engine=myisam; +create table t1_433 (f1 char (30)) engine = ; +create table t1_433a (f1a char (5)) engine = ; CREATE TRIGGER trg3 BEFORE INSERT on t1_433 for each row set new.f1 = 'Trigger 3.5.4.3'; Drop trigger t1.433.trg3; @@ -147,7 +139,7 @@ Testcase 3.5.4.4: ----------------- create database db_drop4; Use db_drop4; -create table t1 (f1 char(30)) engine=myisam; +create table t1 (f1 char(30)) engine = ; grant INSERT, SELECT on db_drop4.t1 to test_general; Create trigger trg4 BEFORE INSERT on t1 for each row set new.f1='Trigger 3.5.4.4'; @@ -168,7 +160,7 @@ where information_schema.triggers.trigger_name='trg4'; trigger_schema trigger_name event_object_table create database db_drop4; Use db_drop4; -create table t1 (f1 char(30)) engine=myisam; +create table t1 (f1 char(30)) engine = ; grant INSERT, SELECT on db_drop4.t1 to test_general; Insert into t1 values ('2nd Insert 3.5.4.4'); Select * from t1; @@ -183,7 +175,7 @@ Testcase 3.5.4.5: ----------------- create database db_drop5; Use db_drop5; -create table t1 (f1 char(50)) engine=myisam; +create table t1 (f1 char(50)) engine = ; grant INSERT, SELECT on t1 to test_general; Create trigger trg5 BEFORE INSERT on t1 for each row set new.f1='Trigger 3.5.4.5'; @@ -199,7 +191,7 @@ select trigger_schema, trigger_name, event_object_table from information_schema.triggers where information_schema.triggers.trigger_name='trg5'; trigger_schema trigger_name event_object_table -create table t1 (f1 char(50)) engine=myisam; +create table t1 (f1 char(50)) engine = ; grant INSERT, SELECT on t1 to test_general; Insert into t1 values ('2nd Insert 3.5.4.5'); Select * from t1; @@ -240,7 +232,7 @@ Testcase 3.5.5.4: create database dbtest_one; create database dbtest_two; use dbtest_two; -create table t2 (f1 char(15)) engine=myisam; +create table t2 (f1 char(15)) engine = ; use dbtest_one; create trigger trg4 before INSERT on dbtest_two.t2 for each row set new.f1='trig 3.5.5.4'; diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_08.result b/mysql-test/suite/funcs_1/r/myisam_trig_08.result index dcfa0aa7ddf..6ced07cef73 100644 --- a/mysql-test/suite/funcs_1/r/myisam_trig_08.result +++ b/mysql-test/suite/funcs_1/r/myisam_trig_08.result @@ -1,17 +1,11 @@ USE test; -drop table if exists tb3 ; +drop table if exists tb3; create table tb3 ( f118 char not null DEFAULT 'a', f119 char binary not null DEFAULT b'101', f120 char ascii not null DEFAULT b'101', -f121 tinytext, -f122 text, -f123 mediumtext, -f124 longtext unicode, -f125 tinyblob, -f126 blob, -f127 mediumblob, -f128 longblob, +f121 char(50), +f122 char(50), f129 binary not null DEFAULT b'101', f130 tinyint not null DEFAULT 99, f131 tinyint unsigned not null DEFAULT 99, @@ -59,13 +53,11 @@ f172 numeric zerofill, f173 numeric unsigned zerofill, f174 numeric (0), f175 numeric (64) -) Engine = myisam; +) engine = ; Warnings: Note 1265 Data truncated for column 'f150' at row 1 Note 1265 Data truncated for column 'f151' at row 1 Note 1265 Data truncated for column 'f152' at row 1 -load data infile '/std_data_ln/funcs_1/myisam_tb3.txt' -into table tb3; Testcase: 3.5: -------------- @@ -94,17 +86,17 @@ create table t1_i ( i120 char ascii not null DEFAULT b'101', i136 smallint zerofill not null DEFAULT 999, i144 int zerofill not null DEFAULT 99999, -i163 decimal (63,30)) engine=myisam; +i163 decimal (63,30)) engine=; create table t1_u ( u120 char ascii not null DEFAULT b'101', u136 smallint zerofill not null DEFAULT 999, u144 int zerofill not null DEFAULT 99999, -u163 decimal (63,30)) engine=myisam; +u163 decimal (63,30)) engine=; create table t1_d ( d120 char ascii not null DEFAULT b'101', d136 smallint zerofill not null DEFAULT 999, d144 int zerofill not null DEFAULT 99999, -d163 decimal (63,30)) engine=myisam; +d163 decimal (63,30)) engine=; Insert into t1_u values ('a',111,99999,999.99); Insert into t1_u values ('b',222,99999,999.99); Insert into t1_u values ('c',333,99999,999.99); diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_09.result b/mysql-test/suite/funcs_1/r/myisam_trig_09.result index 3d89bc6d3c5..b84f4f60583 100644 --- a/mysql-test/suite/funcs_1/r/myisam_trig_09.result +++ b/mysql-test/suite/funcs_1/r/myisam_trig_09.result @@ -1,17 +1,11 @@ USE test; -drop table if exists tb3 ; +drop table if exists tb3; create table tb3 ( f118 char not null DEFAULT 'a', f119 char binary not null DEFAULT b'101', f120 char ascii not null DEFAULT b'101', -f121 tinytext, -f122 text, -f123 mediumtext, -f124 longtext unicode, -f125 tinyblob, -f126 blob, -f127 mediumblob, -f128 longblob, +f121 char(50), +f122 char(50), f129 binary not null DEFAULT b'101', f130 tinyint not null DEFAULT 99, f131 tinyint unsigned not null DEFAULT 99, @@ -59,12 +53,12 @@ f172 numeric zerofill, f173 numeric unsigned zerofill, f174 numeric (0), f175 numeric (64) -) Engine = myisam; +) engine = ; Warnings: Note 1265 Data truncated for column 'f150' at row 1 Note 1265 Data truncated for column 'f151' at row 1 Note 1265 Data truncated for column 'f152' at row 1 -load data infile '/std_data_ln/funcs_1/myisam_tb3.txt' +load data infile '/std_data_ln/funcs_1/memory_tb3.txt' into table tb3; Testcase 3.5.9.1/2: @@ -74,9 +68,9 @@ set new.f142 = 94087, @counter=@counter+1; TotalRows 10 Affected -8 +9 NotAffected -2 +1 NewValuew 0 set @counter=0; @@ -84,7 +78,7 @@ Update tb3 Set f142='1' where f130<100; select count(*) as ExpectedChanged, @counter as TrigCounter from tb3 where f142=94087; ExpectedChanged TrigCounter -8 8 +9 9 select count(*) as ExpectedNotChange from tb3 where f130<100 and f142<>94087; ExpectedNotChange diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_1011ext.result b/mysql-test/suite/funcs_1/r/myisam_trig_1011ext.result index fe8fdd29446..57cf86f9657 100644 --- a/mysql-test/suite/funcs_1/r/myisam_trig_1011ext.result +++ b/mysql-test/suite/funcs_1/r/myisam_trig_1011ext.result @@ -1,17 +1,11 @@ USE test; -drop table if exists tb3 ; +drop table if exists tb3; create table tb3 ( f118 char not null DEFAULT 'a', f119 char binary not null DEFAULT b'101', f120 char ascii not null DEFAULT b'101', -f121 tinytext, -f122 text, -f123 mediumtext, -f124 longtext unicode, -f125 tinyblob, -f126 blob, -f127 mediumblob, -f128 longblob, +f121 char(50), +f122 char(50), f129 binary not null DEFAULT b'101', f130 tinyint not null DEFAULT 99, f131 tinyint unsigned not null DEFAULT 99, @@ -59,12 +53,12 @@ f172 numeric zerofill, f173 numeric unsigned zerofill, f174 numeric (0), f175 numeric (64) -) Engine = myisam; +) engine = ; Warnings: Note 1265 Data truncated for column 'f150' at row 1 Note 1265 Data truncated for column 'f151' at row 1 Note 1265 Data truncated for column 'f152' at row 1 -load data infile '/std_data_ln/funcs_1/myisam_tb3.txt' +load data infile '/std_data_ln/funcs_1/memory_tb3.txt' into table tb3; Testcase 3.5.10.1/2/3: @@ -135,7 +129,7 @@ delete from tb3 where f122 like 'Test 3.5.10.1/2/3%'; Testcase 3.5.10.4: ------------------ -create table tb_load (f1 int, f2 char(25),f3 int) engine=myisam; +create table tb_load (f1 int, f2 char(25),f3 int) engine = ; Create trigger trg4 before insert on tb_load for each row set new.f3=-(new.f1 div 5), @counter= @counter+1; set @counter= 0; @@ -169,7 +163,7 @@ Testcase 3.5.10.6: (implemented in trig_frkey.test) Testcase 3.5.10.extra: ---------------------- -create table t1_sp (var136 tinyint, var151 decimal) engine=myisam; +create table t1_sp (var136 tinyint, var151 decimal) engine = ; create trigger trg before insert on t1_sp for each row set @counter=@counter+1; create procedure trig_sp() @@ -218,12 +212,12 @@ drop table if exists t2_2; drop table if exists t2_3; drop table if exists t2_4; drop table if exists t3; -create table t1 (f1 integer) engine=myisam; -create table t2_1 (f1 integer) engine=myisam; -create table t2_2 (f1 integer) engine=myisam; -create table t2_3 (f1 integer) engine=myisam; -create table t2_4 (f1 integer) engine=myisam; -create table t3 (f1 integer) engine=myisam; +create table t1 (f1 integer) engine = ; +create table t2_1 (f1 integer) engine = ; +create table t2_2 (f1 integer) engine = ; +create table t2_3 (f1 integer) engine = ; +create table t2_4 (f1 integer) engine = ; +create table t3 (f1 integer) engine = ; insert into t1 values (1); create trigger tr1 after insert on t1 for each row BEGIN @@ -261,10 +255,10 @@ drop table if exists t1; drop table if exists t2; drop table if exists t3; drop table if exists t4; -create table t1 (f1 integer) engine = myisam; -create table t2 (f2 integer) engine = myisam; -create table t3 (f3 integer) engine = myisam; -create table t4 (f4 integer) engine = myisam; +create table t1 (f1 integer) engine = ; +create table t2 (f2 integer) engine = ; +create table t3 (f3 integer) engine = ; +create table t4 (f4 integer) engine = ; insert into t1 values (0); create trigger tr1 after insert on t1 for each row insert into t2 (f2) values (new.f1+1); @@ -304,7 +298,7 @@ set @sql_mode='traditional'; create table t1_sp ( count integer, var136 tinyint, -var151 decimal) engine=myisam; +var151 decimal) engine = ; create procedure trig_sp() begin declare done int default 0; @@ -358,7 +352,7 @@ drop procedure trig_sp; drop trigger trg; drop table t1_sp; -Testcase y.y.y.5: Roleback of nested trigger references +Testcase y.y.y.5: Rollback of nested trigger references ------------------------------------------------------- set @@sql_mode='traditional'; use test; @@ -366,10 +360,10 @@ drop table if exists t1; drop table if exists t2; drop table if exists t3; drop table if exists t4; -create table t1 (f1 integer) engine = myisam; -create table t2 (f2 integer) engine = myisam; -create table t3 (f3 integer) engine = myisam; -create table t4 (f4 tinyint) engine = myisam; +create table t1 (f1 integer) engine = ; +create table t2 (f2 integer) engine = ; +create table t3 (f3 integer) engine = ; +create table t4 (f4 tinyint) engine = ; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( diff --git a/mysql-test/suite/funcs_1/r/ndb_trig_0102.result b/mysql-test/suite/funcs_1/r/ndb_trig_0102.result new file mode 100644 index 00000000000..1ada907f9e6 --- /dev/null +++ b/mysql-test/suite/funcs_1/r/ndb_trig_0102.result @@ -0,0 +1,357 @@ +USE test; +drop table if exists tb3; +create table tb3 ( +f118 char not null DEFAULT 'a', +f119 char binary not null DEFAULT b'101', +f120 char ascii not null DEFAULT b'101', +f121 char(50), +f122 char(50), +f129 binary not null DEFAULT b'101', +f130 tinyint not null DEFAULT 99, +f131 tinyint unsigned not null DEFAULT 99, +f132 tinyint zerofill not null DEFAULT 99, +f133 tinyint unsigned zerofill not null DEFAULT 99, +f134 smallint not null DEFAULT 999, +f135 smallint unsigned not null DEFAULT 999, +f136 smallint zerofill not null DEFAULT 999, +f137 smallint unsigned zerofill not null DEFAULT 999, +f138 mediumint not null DEFAULT 9999, +f139 mediumint unsigned not null DEFAULT 9999, +f140 mediumint zerofill not null DEFAULT 9999, +f141 mediumint unsigned zerofill not null DEFAULT 9999, +f142 int not null DEFAULT 99999, +f143 int unsigned not null DEFAULT 99999, +f144 int zerofill not null DEFAULT 99999, +f145 int unsigned zerofill not null DEFAULT 99999, +f146 bigint not null DEFAULT 999999, +f147 bigint unsigned not null DEFAULT 999999, +f148 bigint zerofill not null DEFAULT 999999, +f149 bigint unsigned zerofill not null DEFAULT 999999, +f150 decimal not null DEFAULT 999.999, +f151 decimal unsigned not null DEFAULT 999.17, +f152 decimal zerofill not null DEFAULT 999.999, +f153 decimal unsigned zerofill, +f154 decimal (0), +f155 decimal (64), +f156 decimal (0) unsigned, +f157 decimal (64) unsigned, +f158 decimal (0) zerofill, +f159 decimal (64) zerofill, +f160 decimal (0) unsigned zerofill, +f161 decimal (64) unsigned zerofill, +f162 decimal (0,0), +f163 decimal (63,30), +f164 decimal (0,0) unsigned, +f165 decimal (63,30) unsigned, +f166 decimal (0,0) zerofill, +f167 decimal (63,30) zerofill, +f168 decimal (0,0) unsigned zerofill, +f169 decimal (63,30) unsigned zerofill, +f170 numeric, +f171 numeric unsigned, +f172 numeric zerofill, +f173 numeric unsigned zerofill, +f174 numeric (0), +f175 numeric (64) +) engine = ; +Warnings: +Note 1265 Data truncated for column 'f150' at row 1 +Note 1265 Data truncated for column 'f151' at row 1 +Note 1265 Data truncated for column 'f152' at row 1 + +Testcase: 3.5.1.1: +------------------ +use test; +Create trigger trg1_1 BEFORE INSERT +on tb3 for each row set @test_before = 2, new.f142 = @test_before; +Create trigger trg1_2 AFTER INSERT +on tb3 for each row set @test_after = 6; +Create trigger trg1_4 BEFORE UPDATE +on tb3 for each row set @test_before = 27, +new.f142 = @test_before, +new.f122 = 'Before Update Trigger'; +Create trigger trg1_3 AFTER UPDATE +on tb3 for each row set @test_after = '15'; +Create trigger trg1_5 BEFORE DELETE on tb3 for each row +select count(*) into @test_before from tb3 as tr_tb3 +where f121 = 'Test 3.5.1.1'; +Create trigger trg1_6 AFTER DELETE on tb3 for each row +select count(*) into @test_after from tb3 as tr_tb3 +where f121 = 'Test 3.5.1.1'; +set @test_before = 1; +set @test_after = 5; +select @test_before, @test_after; +@test_before @test_after +1 5 +Insert into tb3 (f121, f122, f142, f144, f134) +values ('Test 3.5.1.1', 'First Row', @test_before, @test_after, 1); +select f121, f122, f142, f144, f134 from tb3 where f121 = 'Test 3.5.1.1'; +f121 f122 f142 f144 f134 +Test 3.5.1.1 First Row 2 0000000005 1 +select @test_before, @test_after; +@test_before @test_after +2 6 +set @test_before = 18; +set @test_after = 8; +select @test_before, @test_after; +@test_before @test_after +18 8 +Update tb3 set tb3.f122 = 'Update', +tb3.f142 = @test_before, +tb3.f144 = @test_after +where tb3.f121 = 'Test 3.5.1.1'; +select f121, f122, f142, f144, f134 from tb3 where f121 = 'Test 3.5.1.1'; +f121 f122 f142 f144 f134 +Test 3.5.1.1 Before Update Trigger 27 0000000008 1 +select @test_before, @test_after; +@test_before @test_after +27 15 +Insert into tb3 (f121, f122, f142, f144, f134) +values ('Test 3.5.1.1', 'Second Row', 5, 6, 2); +set @test_before = 0; +set @test_after = 0; +select f121, f122, f142, f144, f134 from tb3 where f121 = 'Test 3.5.1.1'; +f121 f122 f142 f144 f134 +Test 3.5.1.1 Before Update Trigger 27 0000000008 1 +Test 3.5.1.1 Second Row 2 0000000006 2 +select @test_before, @test_after; +@test_before @test_after +0 0 +Delete from tb3 where f121 = 'Test 3.5.1.1' and f134 = 2; +select f121, f122, f142, f144, f134 from tb3 where f121 = 'Test 3.5.1.1'; +f121 f122 f142 f144 f134 +Test 3.5.1.1 Before Update Trigger 27 0000000008 1 +select @test_before, @test_after; +@test_before @test_after +2 1 +drop trigger trg1_1; +drop trigger trg1_2; +drop trigger trg1_3; +drop trigger trg1_4; +drop trigger trg1_5; +drop trigger trg1_6; +delete from tb3 where f121='Test 3.5.1.1'; + +Testcase: 3.5.1.2: +------------------ +Create trigger trg_1 after insert +on tb3 for each statement set @x= 1; +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 'statement set @x= 1' at line 2 +drop trigger trg_1; + +Testcase 3.5.1.3: +----------------- +CREATE TRIGGER trg3_1 on tb3 BEFORE INSERT for each row set new.f120 = 't'; +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 'on tb3 BEFORE INSERT for each row set new.f120 = 't'' at line 1 +CREATE trg3_2 TRIGGER AFTER INSERT on tb3 for each row set new.f120 = 's'; +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 'trg3_2 TRIGGER AFTER INSERT on tb3 for each row set new.f120 = 's'' at line 1 +CREATE TRIGGER trg3_3 Before DELETE on tb3 set @ret1 = 'test' for each row; +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 'set @ret1 = 'test' for each row' at line 1 +CREATE TRIGGER trg3_4 DELETE AFTER on tb3 set @ret1 = 'test' for each row; +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 'DELETE AFTER on tb3 set @ret1 = 'test' for each row' at line 1 +CREATE for each row TRIGGER trg3_5 AFTER UPDATE on tb3 set @ret1 = 'test'; +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 'for each row TRIGGER trg3_5 AFTER UPDATE on tb3 set @ret1 = 'test'' at line 1 +drop trigger trg3_1; +drop trigger trg3_2; +drop trigger trg3_3; +drop trigger trg3_4; +drop trigger trg3_5; + +Testcase: 3.5.1.5: +------------------ +CREATE TRIGGER trg4_1 AFTER on tb3 for each row set new.f120 = 'e'; +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 'on tb3 for each row set new.f120 = 'e'' at line 1 +CREATE TRIGGER trg4_2 INSERT on tb3 for each set row new.f120 = 'f'; +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 'INSERT on tb3 for each set row new.f120 = 'f'' at line 1 +CREATE TRIGGER trg4_3 BEFORE INSERT tb3 for each row set new.f120 = 'g'; +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 'tb3 for each row set new.f120 = 'g'' at line 1 +CREATE TRIGGER trg4_4 AFTER UPDATE on tb3 for each set new.f120 = 'g'; +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 'set new.f120 = 'g'' at line 1 +CREATE trg4_5 AFTER DELETE on tb3 for each set new.f120 = 'g'; +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 'trg4_5 AFTER DELETE on tb3 for each set new.f120 = 'g'' at line 1 +CREATE TRIGGER trg4_6 BEFORE DELETE for each row set new.f120 = 'g'; +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 'for each row set new.f120 = 'g'' at line 1 +drop trigger trg4_1; +drop trigger trg4_2; +drop trigger trg4_3; +drop trigger trg4_4; +drop trigger trg4_5; +drop trigger trg4_6; + +Testcase 3.5.1.6: - Need to fix +------------------------------- + +Testcase 3.5.1.7: - need to fix +------------------------------- +drop table if exists t1; +Warnings: +Note 1051 Unknown table 't1' +create table t1 (f1 int, f2 char(25),f3 int) engine = ; +CREATE TRIGGER trg5_1 BEFORE INSERT on test.t1 +for each row set new.f3 = '14'; +CREATE TRIGGER trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ +BEFORE UPDATE on test.t1 for each row set new.f3 = '42'; +insert into t1 (f2) values ('insert 3.5.1.7'); +select * from t1; +f1 f2 f3 +NULL insert 3.5.1.7 14 +update t1 set f2='update 3.5.1.7'; +select * from t1; +f1 f2 f3 +NULL update 3.5.1.7 42 +select trigger_name from information_schema.triggers order by trigger_name; +trigger_name +trg5_1 +trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWX +drop trigger trg5_1; +drop trigger trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ; +drop table t1; + +Testcase 3.5.1.8: +----------------- +CREATE TRIGGER trg12* before insert on tb3 for each row set new.f120 = 't'; +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 '* before insert on tb3 for each row set new.f120 = 't'' at line 1 +CREATE TRIGGER trigger before insert on tb3 for each row set new.f120 = 't'; +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 'trigger before insert on tb3 for each row set new.f120 = 't'' at line 1 +CREATE TRIGGER 100 before insert on tb3 for each row set new.f120 = 't'; +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 '100 before insert on tb3 for each row set new.f120 = 't'' at line 1 +CREATE TRIGGER @@view before insert on tb3 for each row set new.f120 = 't'; +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 '@@view before insert on tb3 for each row set new.f120 = 't'' at line 1 +CREATE TRIGGER @name before insert on tb3 for each row set new.f120 = 't'; +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 '@name before insert on tb3 for each row set new.f120 = 't'' at line 1 +CREATE TRIGGER tb3.trg6_1 BEFORE INSERT on test.tb3 +for each row set new.f120 ='X'; +ERROR HY000: Trigger in wrong schema +drop database if exists trig_db; +create database trig_db; +use trig_db; +create table t1 (f1 integer) engine = ; +use test; +CREATE TRIGGER trig_db.trg6_2 AFTER INSERT on tb3 +for each row set @ret_trg6_2 = 5; +ERROR 42S02: Table 'trig_db.tb3' doesn't exist +use trig_db; +CREATE TRIGGER trg6_3 AFTER INSERT on test.tb3 +for each row set @ret_trg6_3 = 18; +ERROR HY000: Trigger in wrong schema +use test; +drop database trig_db; +drop trigger trg6_1; +drop trigger trg6_3; + +Testcase 3.5.1.9:(cannot be inplemented at this point) +------------------------------------------------------ + +Testcase 3.5.1.10: +------------------ +CREATE TRIGGER trg7_1 BEFORE UPDATE on tb3 for each row set new.f120 ='X'; +CREATE TRIGGER trg7_1 AFTER INSERT on tb3 for each row set @x ='Y'; +ERROR HY000: Trigger already exists +drop trigger trg7_1; + +Testcase 3.5.1.?: +----------------- +drop table if exists t1; +drop table if exists t2; +create table t1 (f1 char(50), f2 integer) engine = ; +create table t2 (f1 char(50), f2 integer) engine = ; +create trigger trig before insert on t1 +for each row set new.f1 ='trig t1'; +create trigger trig before update on t2 +for each row set new.f1 ='trig t2'; +ERROR HY000: Trigger already exists +insert into t1 value ('insert to t1',1); +select * from t1; +f1 f2 +trig t1 1 +update t1 set f1='update to t1'; +select * from t1; +f1 f2 +update to t1 1 +insert into t2 value ('insert to t2',2); +update t2 set f1='update to t1'; +select * from t2; +f1 f2 +update to t1 2 +drop table t1; +drop table t2; +drop trigger trig; + +Testcase 3.5.1.11: +------------------ +drop database if exists trig_db1; +drop database if exists trig_db2; +drop database if exists trig_db3; +create database trig_db1; +create database trig_db2; +create database trig_db3; +use trig_db1; +create table t1 (f1 char(50), f2 integer) engine = ; +create trigger trig before insert on t1 +for each row set new.f1 ='trig1', @test_var1='trig1'; +use trig_db2; +create table t2 (f1 char(50), f2 integer) engine = ; +create trigger trig before insert on t2 +for each row set new.f1 ='trig2', @test_var2='trig2'; +use trig_db3; +create table t1 (f1 char(50), f2 integer) engine = ; +create trigger trig before insert on t1 +for each row set new.f1 ='trig3', @test_var3='trig3'; +set @test_var1= '', @test_var2= '', @test_var3= ''; +use trig_db1; +insert into t1 (f1,f2) values ('insert to db1 t1',1); +insert into trig_db1.t1 (f1,f2) values ('insert to db1 t1 from db1',2); +insert into trig_db2.t2 (f1,f2) values ('insert to db2 t2 from db1',3); +insert into trig_db3.t1 (f1,f2) values ('insert to db3 t1 from db1',4); +select @test_var1, @test_var2, @test_var3; +@test_var1 @test_var2 @test_var3 +trig1 trig2 trig3 +select * from t1 order by f2; +f1 f2 +trig1 1 +trig1 2 +select * from trig_db2.t2; +f1 f2 +trig2 3 +select * from trig_db3.t1; +f1 f2 +trig3 4 +select * from t1 order by f2; +f1 f2 +trig1 1 +trig1 2 +use test; +drop database trig_db1; +drop database trig_db2; +drop database trig_db3; + +Testcase 3.5.2.1/2/3: +--------------------- +drop database if exists trig_db1; +drop database if exists trig_db2; +create database trig_db1; +create database trig_db2; +use trig_db1; +create table t1 (f1 char(50), f2 integer) engine = ; +create table trig_db2.t1 (f1 char(50), f2 integer) engine = ; +create trigger trig1_b before insert on t1 +for each row set @test_var1='trig1_b'; +create trigger trig_db1.trig1_a after insert on t1 +for each row set @test_var2='trig1_a'; +create trigger trig_db2.trig2 before insert on trig_db2.t1 +for each row set @test_var3='trig2'; +select trigger_schema, trigger_name, event_object_table +from information_schema.triggers order by trigger_name; +trigger_schema trigger_name event_object_table +trig_db1 trig1_a t1 +trig_db1 trig1_b t1 +trig_db2 trig2 t1 +set @test_var1= '', @test_var2= '', @test_var3= ''; +insert into t1 (f1,f2) values ('insert to db1 t1 from db1',352); +insert into trig_db2.t1 (f1,f2) values ('insert to db2 t1 from db1',352); +select @test_var1, @test_var2, @test_var3; +@test_var1 @test_var2 @test_var3 +trig1_b trig1_a trig2 +drop database trig_db1; +drop database trig_db2; +DROP TABLE test.tb3; diff --git a/mysql-test/suite/funcs_1/r/ndb_trig_03.result b/mysql-test/suite/funcs_1/r/ndb_trig_03.result new file mode 100644 index 00000000000..0d29724fcb7 --- /dev/null +++ b/mysql-test/suite/funcs_1/r/ndb_trig_03.result @@ -0,0 +1,695 @@ +USE test; +drop table if exists tb3; +create table tb3 ( +f118 char not null DEFAULT 'a', +f119 char binary not null DEFAULT b'101', +f120 char ascii not null DEFAULT b'101', +f121 char(50), +f122 char(50), +f129 binary not null DEFAULT b'101', +f130 tinyint not null DEFAULT 99, +f131 tinyint unsigned not null DEFAULT 99, +f132 tinyint zerofill not null DEFAULT 99, +f133 tinyint unsigned zerofill not null DEFAULT 99, +f134 smallint not null DEFAULT 999, +f135 smallint unsigned not null DEFAULT 999, +f136 smallint zerofill not null DEFAULT 999, +f137 smallint unsigned zerofill not null DEFAULT 999, +f138 mediumint not null DEFAULT 9999, +f139 mediumint unsigned not null DEFAULT 9999, +f140 mediumint zerofill not null DEFAULT 9999, +f141 mediumint unsigned zerofill not null DEFAULT 9999, +f142 int not null DEFAULT 99999, +f143 int unsigned not null DEFAULT 99999, +f144 int zerofill not null DEFAULT 99999, +f145 int unsigned zerofill not null DEFAULT 99999, +f146 bigint not null DEFAULT 999999, +f147 bigint unsigned not null DEFAULT 999999, +f148 bigint zerofill not null DEFAULT 999999, +f149 bigint unsigned zerofill not null DEFAULT 999999, +f150 decimal not null DEFAULT 999.999, +f151 decimal unsigned not null DEFAULT 999.17, +f152 decimal zerofill not null DEFAULT 999.999, +f153 decimal unsigned zerofill, +f154 decimal (0), +f155 decimal (64), +f156 decimal (0) unsigned, +f157 decimal (64) unsigned, +f158 decimal (0) zerofill, +f159 decimal (64) zerofill, +f160 decimal (0) unsigned zerofill, +f161 decimal (64) unsigned zerofill, +f162 decimal (0,0), +f163 decimal (63,30), +f164 decimal (0,0) unsigned, +f165 decimal (63,30) unsigned, +f166 decimal (0,0) zerofill, +f167 decimal (63,30) zerofill, +f168 decimal (0,0) unsigned zerofill, +f169 decimal (63,30) unsigned zerofill, +f170 numeric, +f171 numeric unsigned, +f172 numeric zerofill, +f173 numeric unsigned zerofill, +f174 numeric (0), +f175 numeric (64) +) engine = ; +Warnings: +Note 1265 Data truncated for column 'f150' at row 1 +Note 1265 Data truncated for column 'f151' at row 1 +Note 1265 Data truncated for column 'f152' at row 1 + +Testcase 3.5.3: +--------------- +drop database if exists priv_db; +create database priv_db; +use priv_db; +create table t1 (f1 char(20)) engine= ; +create User test_noprivs@localhost; +set password for test_noprivs@localhost = password('PWD'); +create User test_yesprivs@localhost; +set password for test_yesprivs@localhost = password('PWD'); + +Testcase 3.5.3.2/6: +------------------- +revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; +grant ALL on *.* to test_noprivs@localhost; +revoke SUPER on *.* from test_noprivs@localhost; +show grants for test_noprivs@localhost; +Grants for test_noprivs@localhost +GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; +grant SUPER on *.* to test_yesprivs@localhost; +grant SELECT on priv_db.t1 to test_yesprivs@localhost; +show grants for test_yesprivs@localhost; +Grants for test_yesprivs@localhost +GRANT SUPER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK); +connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK); + +Testcase 3.5.3.2: +----------------- +select current_user; +current_user +test_noprivs@localhost +use priv_db; +create trigger trg1_1 before INSERT on t1 for each row +set new.f1 = 'trig 3.5.3.2_1-no'; +ERROR 42000: Access denied; you need the SUPER privilege for this operation +use priv_db; +insert into t1 (f1) values ('insert 3.5.3.2-no'); +select f1 from t1 order by f1; +f1 +insert 3.5.3.2-no +select current_user; +current_user +test_yesprivs@localhost +use priv_db; +create trigger trg1_2 before INSERT on t1 for each row +set new.f1 = 'trig 3.5.3.2_2-yes'; +select current_user; +current_user +root@localhost +use priv_db; +insert into t1 (f1) values ('insert 3.5.3.2-yes'); +ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for column 'f1' in table 't1' +select f1 from t1 order by f1; +f1 +insert 3.5.3.2-no +grant UPDATE on priv_db.t1 to test_yesprivs@localhost; +insert into t1 (f1) values ('insert 3.5.3.2-yes'); +select f1 from t1 order by f1; +f1 +insert 3.5.3.2-no +trig 3.5.3.2_2-yes + +Testcase 3.5.3.6: +----------------- +use priv_db; +drop trigger trg1_2; +ERROR 42000: Access denied; you need the SUPER privilege for this operation +use priv_db; +insert into t1 (f1) values ('insert 3.5.3.6-yes'); +select f1 from t1 order by f1; +f1 +insert 3.5.3.2-no +trig 3.5.3.2_2-yes +trig 3.5.3.2_2-yes +use priv_db; +drop trigger trg1_2; +use priv_db; +insert into t1 (f1) values ('insert 3.5.3.6-no'); +select f1 from t1 order by f1; +f1 +insert 3.5.3.2-no +insert 3.5.3.6-no +trig 3.5.3.2_2-yes +trig 3.5.3.2_2-yes +drop trigger trg1_2; + +Testcase 3.5.3.7a: +------------------ +revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; +grant ALL on *.* to test_noprivs@localhost; +revoke UPDATE on *.* from test_noprivs@localhost; +show grants for test_noprivs@localhost; +Grants for test_noprivs@localhost +GRANT SELECT, INSERT, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; +grant SUPER, UPDATE on *.* to test_yesprivs@localhost; +show grants for test_yesprivs@localhost; +Grants for test_yesprivs@localhost +GRANT UPDATE, SUPER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK); +connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK); +select current_user; +current_user +test_noprivs@localhost +use priv_db; +show grants; +Grants for test_noprivs@localhost +GRANT SELECT, INSERT, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +select f1 from t1 order by f1; +f1 +insert 3.5.3.2-no +insert 3.5.3.6-no +trig 3.5.3.2_2-yes +trig 3.5.3.2_2-yes +create trigger trg4a_1 before INSERT on t1 for each row +set new.f1 = 'trig 3.5.3.7-1a'; +insert into t1 (f1) values ('insert 3.5.3.7-1a'); +ERROR 42000: UPDATE command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1' +select f1 from t1 order by f1; +f1 +insert 3.5.3.2-no +insert 3.5.3.6-no +trig 3.5.3.2_2-yes +trig 3.5.3.2_2-yes +drop trigger trg4a_1; +use priv_db; +select current_user; +current_user +test_yesprivs@localhost +show grants; +Grants for test_yesprivs@localhost +GRANT UPDATE, SUPER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +create trigger trg4a_2 before INSERT on t1 for each row +set new.f1 = 'trig 3.5.3.7-2a'; +insert into t1 (f1) values ('insert 3.5.3.7-2b'); +select f1 from t1 order by f1; +f1 +insert 3.5.3.2-no +insert 3.5.3.6-no +trig 3.5.3.2_2-yes +trig 3.5.3.2_2-yes +trig 3.5.3.7-2a +drop trigger trg4a_2; + +Testcase 3.5.3.7b: +------------------ +revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; +grant SUPER on *.* to test_noprivs; +grant ALL on priv_db.* to test_noprivs@localhost; +revoke UPDATE on priv_db.* from test_noprivs@localhost; +show grants for test_noprivs; +Grants for test_noprivs@% +GRANT SUPER ON *.* TO 'test_noprivs'@'%' +revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; +grant SUPER on *.* to test_yesprivs@localhost; +grant UPDATE on priv_db.* to test_yesprivs@localhost; +show grants for test_yesprivs@localhost; +Grants for test_yesprivs@localhost +GRANT SUPER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT UPDATE ON `priv_db`.* TO 'test_yesprivs'@'localhost' +connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK); +connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK); +show grants; +Grants for test_noprivs@localhost +GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE ON `priv_db`.* TO 'test_noprivs'@'localhost' +use priv_db; +create trigger trg4b_1 before UPDATE on t1 for each row +set new.f1 = 'trig 3.5.3.7-1b'; +ERROR 42000: Access denied; you need the SUPER privilege for this operation +insert into t1 (f1) values ('insert 3.5.3.7-1b'); +select f1 from t1 order by f1; +f1 +insert 3.5.3.2-no +insert 3.5.3.6-no +insert 3.5.3.7-1b +trig 3.5.3.2_2-yes +trig 3.5.3.2_2-yes +trig 3.5.3.7-2a +update t1 set f1 = 'update 3.5.3.7-1b' where f1 = 'insert 3.5.3.7-1b'; +select f1 from t1 order by f1; +f1 +insert 3.5.3.2-no +insert 3.5.3.6-no +trig 3.5.3.2_2-yes +trig 3.5.3.2_2-yes +trig 3.5.3.7-2a +update 3.5.3.7-1b +drop trigger trg4b_1; +ERROR HY000: Trigger does not exist +show grants; +Grants for test_yesprivs@localhost +GRANT SUPER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT UPDATE ON `priv_db`.* TO 'test_yesprivs'@'localhost' +use priv_db; +create trigger trg4b_2 before UPDATE on t1 for each row +set new.f1 = 'trig 3.5.3.7-2b'; +insert into t1 (f1) values ('insert 3.5.3.7-2b'); +select f1 from t1 order by f1; +f1 +insert 3.5.3.2-no +insert 3.5.3.6-no +insert 3.5.3.7-2b +trig 3.5.3.2_2-yes +trig 3.5.3.2_2-yes +trig 3.5.3.7-2a +update 3.5.3.7-1b +update t1 set f1 = 'update 3.5.3.7-2b' where f1 = 'insert 3.5.3.7-2b'; +select f1 from t1 order by f1; +f1 +insert 3.5.3.2-no +insert 3.5.3.6-no +trig 3.5.3.2_2-yes +trig 3.5.3.2_2-yes +trig 3.5.3.7-2a +trig 3.5.3.7-2b +update 3.5.3.7-1b +drop trigger trg4b_2; + +Testcase 3.5.3.7c +----------------- +revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; +grant SUPER on *.* to test_noprivs@localhost; +grant ALL on priv_db.t1 to test_noprivs@localhost; +revoke UPDATE on priv_db.t1 from test_noprivs@localhost; +show grants for test_noprivs; +Grants for test_noprivs@% +GRANT SUPER ON *.* TO 'test_noprivs'@'%' +revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; +grant SUPER on *.* to test_yesprivs@localhost; +grant UPDATE on priv_db.t1 to test_yesprivs@localhost; +show grants for test_yesprivs@localhost; +Grants for test_yesprivs@localhost +GRANT SUPER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK); +connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK); +show grants; +Grants for test_noprivs@localhost +GRANT SUPER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' +use priv_db; +create trigger trg4c_1 before INSERT on t1 for each row +set new.f1 = 'trig 3.5.3.7-1c'; +insert into t1 (f1) values ('insert 3.5.3.7-1c'); +ERROR 42000: UPDATE command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1' +select f1 from t1 order by f1; +f1 +insert 3.5.3.2-no +insert 3.5.3.6-no +trig 3.5.3.2_2-yes +trig 3.5.3.2_2-yes +trig 3.5.3.7-2a +trig 3.5.3.7-2b +update 3.5.3.7-1b +drop trigger trg4c_1; +show grants; +Grants for test_yesprivs@localhost +GRANT SUPER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +use priv_db; +create trigger trg4c_2 before INSERT on t1 for each row +set new.f1 = 'trig 3.5.3.7-2c'; +insert into t1 (f1) values ('insert 3.5.3.7-2c'); +select f1 from t1 order by f1; +f1 +insert 3.5.3.2-no +insert 3.5.3.6-no +trig 3.5.3.2_2-yes +trig 3.5.3.2_2-yes +trig 3.5.3.7-2a +trig 3.5.3.7-2b +trig 3.5.3.7-2c +update 3.5.3.7-1b +drop trigger trg4c_2; + +Testcase 3.5.3.7d: +------------------ +revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; +grant SUPER on *.* to test_noprivs@localhost; +grant SELECT (f1), INSERT (f1) on priv_db.t1 to test_noprivs@localhost; +show grants for test_noprivs; +Grants for test_noprivs@% +GRANT SUPER ON *.* TO 'test_noprivs'@'%' +revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; +grant SUPER on *.* to test_yesprivs@localhost; +grant UPDATE (f1) on priv_db.t1 to test_yesprivs@localhost; +show grants for test_noprivs; +Grants for test_noprivs@% +GRANT SUPER ON *.* TO 'test_noprivs'@'%' +connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK); +connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK); +show grants; +Grants for test_noprivs@localhost +GRANT SUPER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT (f1), INSERT (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' +use priv_db; +create trigger trg4d_1 before INSERT on t1 for each row +set new.f1 = 'trig 3.5.3.7-1d'; +insert into t1 (f1) values ('insert 3.5.3.7-1d'); +ERROR 42000: UPDATE command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1' +select f1 from t1 order by f1; +f1 +insert 3.5.3.2-no +insert 3.5.3.6-no +trig 3.5.3.2_2-yes +trig 3.5.3.2_2-yes +trig 3.5.3.7-2a +trig 3.5.3.7-2b +trig 3.5.3.7-2c +update 3.5.3.7-1b +drop trigger trg4d_1; +show grants; +Grants for test_yesprivs@localhost +GRANT SUPER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT UPDATE (f1) ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +use priv_db; +create trigger trg4d_2 before INSERT on t1 for each row +set new.f1 = 'trig 3.5.3.7-2d'; +insert into t1 (f1) values ('insert 3.5.3.7-2d'); +select f1 from t1 order by f1; +f1 +insert 3.5.3.2-no +insert 3.5.3.6-no +trig 3.5.3.2_2-yes +trig 3.5.3.2_2-yes +trig 3.5.3.7-2a +trig 3.5.3.7-2b +trig 3.5.3.7-2c +trig 3.5.3.7-2d +update 3.5.3.7-1b +drop trigger trg4d_2; + +Testcase 3.5.3.8a: +------------------ +revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; +grant ALL on *.* to test_noprivs@localhost; +revoke SELECT on *.* from test_noprivs@localhost; +show grants for test_noprivs@localhost; +Grants for test_noprivs@localhost +GRANT INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; +grant SUPER, SELECT on *.* to test_yesprivs@localhost; +show grants for test_yesprivs@localhost; +Grants for test_yesprivs@localhost +GRANT SELECT, SUPER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK); +connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK); +select current_user; +current_user +test_noprivs@localhost +use priv_db; +show grants; +Grants for test_noprivs@localhost +GRANT INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +create trigger trg5a_1 before INSERT on t1 for each row +set @test_var = new.f1; +set @test_var = 'before trig 3.5.3.8-1a'; +select @test_var; +@test_var +before trig 3.5.3.8-1a +insert into t1 (f1) values ('insert 3.5.3.8-1a'); +ERROR 42000: SELECT command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1' +select @test_var; +@test_var +before trig 3.5.3.8-1a +drop trigger trg5a_1; +use priv_db; +select current_user; +current_user +test_yesprivs@localhost +show grants; +Grants for test_yesprivs@localhost +GRANT SELECT, SUPER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +create trigger trg5a_2 before INSERT on t1 for each row +set @test_var= new.f1; +set @test_var= 'before trig 3.5.3.8-2a'; +select @test_var; +@test_var +before trig 3.5.3.8-2a +insert into t1 (f1) values ('insert 3.5.3.8-2a'); +select @test_var; +@test_var +insert 3.5.3.8-2a +drop trigger trg5a_2; + +Testcase: 3.5.3.8b +------------------ +revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; +grant SUPER on *.* to test_noprivs@localhost; +grant ALL on priv_db.* to test_noprivs@localhost; +revoke SELECT on priv_db.* from test_noprivs@localhost; +show grants for test_noprivs@localhost; +Grants for test_noprivs@localhost +GRANT SUPER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE ON `priv_db`.* TO 'test_noprivs'@'localhost' +revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; +grant SUPER on *.* to test_yesprivs@localhost; +grant SELECT on priv_db.* to test_yesprivs@localhost; +show grants for test_yesprivs@localhost; +Grants for test_yesprivs@localhost +GRANT SUPER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT ON `priv_db`.* TO 'test_yesprivs'@'localhost' +connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK); +connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK); +show grants; +Grants for test_noprivs@localhost +GRANT SUPER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE ON `priv_db`.* TO 'test_noprivs'@'localhost' +use priv_db; +create trigger trg5b_1 before UPDATE on t1 for each row +set @test_var= new.f1; +set @test_var= 'before trig 3.5.3.8-1b'; +insert into t1 (f1) values ('insert 3.5.3.8-1b'); +select @test_var; +@test_var +before trig 3.5.3.8-1b +update t1 set f1= 'update 3.5.3.8-1b' where f1 = 'insert 3.5.3.8-1b'; +ERROR 42000: SELECT command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1' +select @test_var; +@test_var +before trig 3.5.3.8-1b +drop trigger trg5b_1; +show grants; +Grants for test_yesprivs@localhost +GRANT SUPER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT ON `priv_db`.* TO 'test_yesprivs'@'localhost' +use priv_db; +create trigger trg5b_2 before UPDATE on t1 for each row +set @test_var= new.f1; +set @test_var= 'before trig 3.5.3.8-2b'; +insert into t1 (f1) values ('insert 3.5.3.8-2b'); +select @test_var; +@test_var +before trig 3.5.3.8-2b +update t1 set f1= 'update 3.5.3.8-2b' where f1 = 'insert 3.5.3.8-2b'; +select @test_var; +@test_var +update 3.5.3.8-2b +drop trigger trg5b_2; + +Testcase 3.5.3.8c: +------------------ +revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; +grant SUPER on *.* to test_noprivs@localhost; +grant ALL on priv_db.t1 to test_noprivs@localhost; +revoke SELECT on priv_db.t1 from test_noprivs@localhost; +show grants for test_noprivs@localhost; +Grants for test_noprivs@localhost +GRANT SUPER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' +revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; +grant SUPER on *.* to test_yesprivs@localhost; +grant SELECT on priv_db.t1 to test_yesprivs@localhost; +show grants for test_yesprivs@localhost; +Grants for test_yesprivs@localhost +GRANT SUPER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK); +connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK); +show grants; +Grants for test_noprivs@localhost +GRANT SUPER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' +use priv_db; +create trigger trg5c_1 before INSERT on t1 for each row +set @test_var= new.f1; +set @test_var= 'before trig 3.5.3.8-1c'; +insert into t1 (f1) values ('insert 3.5.3.8-1c'); +ERROR 42000: SELECT command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1' +select @test_var; +@test_var +before trig 3.5.3.8-1c +drop trigger trg5c_1; +show grants; +Grants for test_yesprivs@localhost +GRANT SUPER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +use priv_db; +create trigger trg5c_2 before INSERT on t1 for each row +set @test_var= new.f1; +set @test_var='before trig 3.5.3.8-2c'; +insert into t1 (f1) values ('insert 3.5.3.8-2c'); +select @test_var; +@test_var +insert 3.5.3.8-2c +drop trigger trg5c_2; + +Testcase: 3.5.3.8d: +------------------- +revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; +grant SUPER on *.* to test_noprivs@localhost; +grant UPDATE (f1), INSERT (f1) on priv_db.t1 to test_noprivs@localhost; +show grants for test_noprivs@localhost; +Grants for test_noprivs@localhost +GRANT SUPER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' +revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; +grant SUPER on *.* to test_yesprivs@localhost; +grant SELECT (f1) on priv_db.t1 to test_yesprivs@localhost; +show grants for test_noprivs@localhost; +Grants for test_noprivs@localhost +GRANT SUPER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' +connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK); +connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK); +show grants; +Grants for test_noprivs@localhost +GRANT SUPER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' +use priv_db; +create trigger trg5d_1 before INSERT on t1 for each row +set @test_var= new.f1; +set @test_var='before trig 3.5.3.8-1d'; +insert into t1 (f1) values ('insert 3.5.3.8-1d'); +ERROR 42000: SELECT command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1' +select @test_var; +@test_var +before trig 3.5.3.8-1d +drop trigger trg5d_1; +show grants; +Grants for test_yesprivs@localhost +GRANT SUPER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT (f1) ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +use priv_db; +create trigger trg5d_2 before INSERT on t1 for each row +set @test_var= new.f1; +set @test_var='before trig 3.5.3.8-2d'; +insert into t1 (f1) values ('insert 3.5.3.8-2d'); +select @test_var; +@test_var +insert 3.5.3.8-2d +drop trigger trg5d_2; + +Testcase: 3.5.3.x: +------------------ +use priv_db; +drop table if exists t1; +drop table if exists t2; +create table t1 (f1 int) engine= ; +create table t2 (f2 int) engine= ; +revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; +grant SUPER on *.* to test_yesprivs@localhost; +grant SELECT, UPDATE on priv_db.t1 to test_yesprivs@localhost; +grant SELECT on priv_db.t2 to test_yesprivs@localhost; +show grants for test_yesprivs@localhost; +Grants for test_yesprivs@localhost +GRANT SUPER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT ON `priv_db`.`t2` TO 'test_yesprivs'@'localhost' +GRANT SELECT, UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK); +select current_user; +current_user +test_yesprivs@localhost +use priv_db; +create trigger trg1 before insert on t1 for each row +insert into t2 values (new.f1); +use priv_db; +insert into t1 (f1) values (4); +ERROR 42000: INSERT command denied to user 'test_yesprivs'@'localhost' for table 't2' +revoke SELECT on priv_db.t2 from test_yesprivs@localhost; +grant INSERT on priv_db.t2 to test_yesprivs@localhost; +insert into t1 (f1) values (4); +select f1 from t1 order by f1; +f1 +4 +select f2 from t2 order by f2; +f2 +4 +use priv_db; +drop trigger trg1; +create trigger trg2 before insert on t1 for each row +update t2 set f2=new.f1-1; +use priv_db; +insert into t1 (f1) values (2); +ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for table 't2' +revoke INSERT on priv_db.t2 from test_yesprivs@localhost; +grant UPDATE on priv_db.t2 to test_yesprivs@localhost; +insert into t1 (f1) values (2); +select f1 from t1 order by f1; +f1 +2 +4 +select f2 from t2 order by f2; +f2 +1 +use priv_db; +drop trigger trg2; +create trigger trg3 before insert on t1 for each row +select f2 into @aaa from t2 where f2=new.f1; +use priv_db; +insert into t1 (f1) values (1); +ERROR 42000: SELECT command denied to user 'test_yesprivs'@'localhost' for table 't2' +revoke UPDATE on priv_db.t2 from test_yesprivs@localhost; +grant SELECT on priv_db.t2 to test_yesprivs@localhost; +insert into t1 (f1) values (1); +select f1 from t1 order by f1; +f1 +1 +2 +4 +select f2 from t2 order by f2; +f2 +1 +select @aaa; +@aaa +1 +use priv_db; +drop trigger trg3; +create trigger trg4 before insert on t1 for each row +delete from t2; +use priv_db; +insert into t1 (f1) values (1); +ERROR 42000: DELETE command denied to user 'test_yesprivs'@'localhost' for table 't2' +revoke SELECT on priv_db.t2 from test_yesprivs@localhost; +grant DELETE on priv_db.t2 to test_yesprivs@localhost; +insert into t1 (f1) values (1); +select f1 from t1 order by f1; +f1 +1 +1 +2 +4 +select f2 from t2 order by f2; +f2 +drop database if exists priv_db; +drop user test_yesprivs@localhost; +drop user test_noprivs@localhost; +drop user test_noprivs; +use test; +drop table tb3; diff --git a/mysql-test/suite/funcs_1/r/ndb_trig_0407.result b/mysql-test/suite/funcs_1/r/ndb_trig_0407.result new file mode 100644 index 00000000000..a4871065c04 --- /dev/null +++ b/mysql-test/suite/funcs_1/r/ndb_trig_0407.result @@ -0,0 +1,473 @@ +USE test; +drop table if exists tb3; +create table tb3 ( +f118 char not null DEFAULT 'a', +f119 char binary not null DEFAULT b'101', +f120 char ascii not null DEFAULT b'101', +f121 char(50), +f122 char(50), +f129 binary not null DEFAULT b'101', +f130 tinyint not null DEFAULT 99, +f131 tinyint unsigned not null DEFAULT 99, +f132 tinyint zerofill not null DEFAULT 99, +f133 tinyint unsigned zerofill not null DEFAULT 99, +f134 smallint not null DEFAULT 999, +f135 smallint unsigned not null DEFAULT 999, +f136 smallint zerofill not null DEFAULT 999, +f137 smallint unsigned zerofill not null DEFAULT 999, +f138 mediumint not null DEFAULT 9999, +f139 mediumint unsigned not null DEFAULT 9999, +f140 mediumint zerofill not null DEFAULT 9999, +f141 mediumint unsigned zerofill not null DEFAULT 9999, +f142 int not null DEFAULT 99999, +f143 int unsigned not null DEFAULT 99999, +f144 int zerofill not null DEFAULT 99999, +f145 int unsigned zerofill not null DEFAULT 99999, +f146 bigint not null DEFAULT 999999, +f147 bigint unsigned not null DEFAULT 999999, +f148 bigint zerofill not null DEFAULT 999999, +f149 bigint unsigned zerofill not null DEFAULT 999999, +f150 decimal not null DEFAULT 999.999, +f151 decimal unsigned not null DEFAULT 999.17, +f152 decimal zerofill not null DEFAULT 999.999, +f153 decimal unsigned zerofill, +f154 decimal (0), +f155 decimal (64), +f156 decimal (0) unsigned, +f157 decimal (64) unsigned, +f158 decimal (0) zerofill, +f159 decimal (64) zerofill, +f160 decimal (0) unsigned zerofill, +f161 decimal (64) unsigned zerofill, +f162 decimal (0,0), +f163 decimal (63,30), +f164 decimal (0,0) unsigned, +f165 decimal (63,30) unsigned, +f166 decimal (0,0) zerofill, +f167 decimal (63,30) zerofill, +f168 decimal (0,0) unsigned zerofill, +f169 decimal (63,30) unsigned zerofill, +f170 numeric, +f171 numeric unsigned, +f172 numeric zerofill, +f173 numeric unsigned zerofill, +f174 numeric (0), +f175 numeric (64) +) engine = ; +Warnings: +Note 1265 Data truncated for column 'f150' at row 1 +Note 1265 Data truncated for column 'f151' at row 1 +Note 1265 Data truncated for column 'f152' at row 1 + +Testcase: 3.5: +-------------- +create User test_general@localhost; +set password for test_general@localhost = password('PWD'); +revoke ALL PRIVILEGES, GRANT OPTION FROM test_general@localhost; +create User test_super@localhost; +set password for test_super@localhost = password('PWD'); +grant ALL on *.* to test_super@localhost with grant OPTION; +connect(localhost,test_general,PWD,test,MASTER_MYPORT,MASTER_MYSOCK); +connect(localhost,test_super,PWD,test,MASTER_MYPORT,MASTER_MYSOCK); + +Testcase 3.5.4: +--------------- +use test; + +Testcase 3.5.4.1: +----------------- +create database db_drop; +Use db_drop; +create table t1 (f1 char(30)) engine = ; +grant INSERT, SELECT on db_drop.t1 to test_general; +Use db_drop; +Create trigger trg1 BEFORE INSERT on t1 +for each row set new.f1='Trigger 3.5.4.1'; +Use db_drop; +Insert into t1 values ('Insert error 3.5.4.1'); +Select * from t1 order by f1; +f1 +Trigger 3.5.4.1 +drop trigger trg1; +select trigger_schema, trigger_name, event_object_table +from information_schema.triggers order by trigger_name; +trigger_schema trigger_name event_object_table +Insert into t1 values ('Insert no trigger 3.5.4.1'); +Select * from t1 order by f1; +f1 +Insert no trigger 3.5.4.1 +Trigger 3.5.4.1 +drop trigger trg1; +drop database if exists db_drop; +revoke ALL PRIVILEGES, GRANT OPTION FROM 'test_general'@'localhost'; + +Testcase 3.5.4.2: +----------------- +create database db_drop2; +Use db_drop2; +drop table if exists t1_432 ; +create table t1_432 (f1 char (30)) engine = ; +Drop trigger tr_does_not_exit; +ERROR HY000: Trigger does not exist +drop table if exists t1_432 ; +drop database if exists db_drop2; + +Testcase 3.5.4.3: +----------------- +create database db_drop3; +Use db_drop3; +drop table if exists t1_433 ; +drop table if exists t1_433a ; +create table t1_433 (f1 char (30)) engine = ; +create table t1_433a (f1a char (5)) engine = ; +CREATE TRIGGER trg3 BEFORE INSERT on t1_433 for each row +set new.f1 = 'Trigger 3.5.4.3'; +Drop trigger t1.433.trg3; +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 '.trg3' at line 1 +Drop trigger db_drop3.t1.433.trg3; +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 '.433.trg3' at line 1 +Drop trigger mysql.trg3; +ERROR HY000: Trigger does not exist +Drop trigger tbx.trg3; +ERROR HY000: Trigger does not exist +Drop trigger db_drop3.trg3; +drop table if exists t1_433; +drop table if exists t1_433a; +drop database if exists db_drop3; + +Testcase 3.5.4.4: +----------------- +create database db_drop4; +Use db_drop4; +create table t1 (f1 char(30)) engine = ; +grant INSERT, SELECT on db_drop4.t1 to test_general; +Create trigger trg4 BEFORE INSERT on t1 +for each row set new.f1='Trigger 3.5.4.4'; +Use db_drop4; +Insert into t1 values ('Insert 3.5.4.4'); +Select * from t1; +f1 +Trigger 3.5.4.4 +Drop database db_drop4; +Show databases; +Database +information_schema +mysql +test +select trigger_schema, trigger_name, event_object_table +from information_schema.triggers +where information_schema.triggers.trigger_name='trg4'; +trigger_schema trigger_name event_object_table +create database db_drop4; +Use db_drop4; +create table t1 (f1 char(30)) engine = ; +grant INSERT, SELECT on db_drop4.t1 to test_general; +Insert into t1 values ('2nd Insert 3.5.4.4'); +Select * from t1; +f1 +2nd Insert 3.5.4.4 +drop trigger trg4; +ERROR HY000: Trigger does not exist +drop database if exists db_drop4; +revoke ALL PRIVILEGES, GRANT OPTION FROM 'test_general'@'localhost'; + +Testcase 3.5.4.5: +----------------- +create database db_drop5; +Use db_drop5; +create table t1 (f1 char(50)) engine = ; +grant INSERT, SELECT on t1 to test_general; +Create trigger trg5 BEFORE INSERT on t1 +for each row set new.f1='Trigger 3.5.4.5'; +Use db_drop5; +Insert into t1 values ('Insert 3.5.4.5'); +Select * from t1; +f1 +Trigger 3.5.4.5 +Drop table t1; +Show tables; +Tables_in_db_drop5 +select trigger_schema, trigger_name, event_object_table +from information_schema.triggers +where information_schema.triggers.trigger_name='trg5'; +trigger_schema trigger_name event_object_table +create table t1 (f1 char(50)) engine = ; +grant INSERT, SELECT on t1 to test_general; +Insert into t1 values ('2nd Insert 3.5.4.5'); +Select * from t1; +f1 +2nd Insert 3.5.4.5 +drop trigger trg5; +ERROR HY000: Trigger does not exist +drop database if exists db_drop5; +revoke ALL PRIVILEGES, GRANT OPTION FROM 'test_general'@'localhost'; + +Testcase 3.5.5: +--------------- +use test; + +Testcase 3.5.5.1: +----------------- +Create trigger trg1 before INSERT on t100 for each row set new.f2=1000; +ERROR 42S02: Table 'test.t100' doesn't exist + +Testcase 3.5.5.2: +----------------- +Create temporary table t1_temp (f1 bigint signed, f2 bigint unsigned); +Create trigger trg2 before INSERT +on t1_temp for each row set new.f2=9999; +ERROR HY000: Trigger's 't1_temp' is view or temporary table +drop table t1_temp; + +Testcase 3.5.5.3: +----------------- +Create view vw3 as select f118 from tb3; +Create trigger trg3 before INSERT +on vw3 for each row set new.f118='s'; +ERROR HY000: 'test.vw3' is not BASE TABLE +drop view vw3; + +Testcase 3.5.5.4: +----------------- +create database dbtest_one; +create database dbtest_two; +use dbtest_two; +create table t2 (f1 char(15)) engine = ; +use dbtest_one; +create trigger trg4 before INSERT +on dbtest_two.t2 for each row set new.f1='trig 3.5.5.4'; +ERROR HY000: Trigger in wrong schema +grant INSERT, SELECT on dbtest_two.t2 to test_general; +grant SELECT on dbtest_one.* to test_general; +use dbtest_two; +Insert into t2 values ('1st Insert 3.5.5.4'); +Warnings: +Warning 1265 Data truncated for column 'f1' at row 1 +Select * from t2; +f1 +1st Insert 3.5. +use dbtest_one; +Insert into dbtest_two.t2 values ('2nd Insert 3.5.5.4'); +Warnings: +Warning 1265 Data truncated for column 'f1' at row 1 +Select * from dbtest_two.t2 order by f1; +f1 +1st Insert 3.5. +2nd Insert 3.5. +revoke ALL PRIVILEGES, GRANT OPTION FROM 'test_general'@'localhost'; +DROP DATABASE if exists dbtest_one; +drop database if EXISTS dbtest_two; + +Testcase 3.5.6: +--------------- +use test; + +Testcase 3.5.6.1 (see Testcase 3.5.1.1) +--------------------------------------- + +Testcase 3.5.6.2 (see Testcase 3.5.1.1) +--------------------------------------- + +Testcase 3.5.6.3: +----------------- +Create trigger trg3_1 DURING UPDATE on tb3 for each row set new.f132=25; +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 'DURING UPDATE on tb3 for each row set new.f132=25' at line 1 +Create trigger trg3_2 TIME INSERT on tb3 for each row set new.f132=15; +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 'TIME INSERT on tb3 for each row set new.f132=15' at line 1 +drop trigger tb3.trg3_1; +drop trigger tb3.trg3_2; + +Testcase 3.5.6.4 (see Testcase 3.5.1.1) +--------------------------------------- + +Testcase 3.5.6.5 (see Testcase 3.5.1.1) +--------------------------------------- + +Testcase 3.5.7.1 (see Testcase 3.5.1.1) +--------------------------------------- + +Testcase 3.5.7.2 (see Testcase 3.5.1.1) +--------------------------------------- + +Testcase 3.5.7.3 (see Testcase 3.5.1.1) +--------------------------------------- + +Testcase 3.5.7.4: +----------------- +Create trigger trg4_1 BEFORE SELECT on tb3 for each row set new.f132=5; +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 'SELECT on tb3 for each row set new.f132=5' at line 1 +Create trigger trg4_2 AFTER VALUE on tb3 for each row set new.f132=1; +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 'VALUE on tb3 for each row set new.f132=1' at line 1 +drop trigger tb3.trg4_1; +drop trigger tb3.trg4_2; + +Testcase 3.5.7.5 / 3.5.7.6: +--------------------------- +Create trigger trg5_1 BEFORE INSERT +on tb3 for each row set new.f122='Trigger1 3.5.7.5/6'; +Create trigger trg5_2 BEFORE INSERT +on tb3 for each row set new.f122='Trigger2 3.5.7.5'; +ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table' +Insert into tb3 (f121,f122) values ('Test 3.5.7.5/6','Insert 3.5.7.5'); +Select f121,f122 from tb3 where f121='Test 3.5.7.5/6'; +f121 f122 +Test 3.5.7.5/6 Trigger1 3.5.7.5/6 +update tb3 set f122='Update 3.5.7.6' where f121= 'Test 3.5.7.5/6'; +Select f121,f122 from tb3 where f121='Test 3.5.7.5/6'; +f121 f122 +Test 3.5.7.5/6 Update 3.5.7.6 +drop trigger trg5_1; +drop trigger trg5_2; +delete from tb3 where f121='Test 3.5.7.5/6'; + +Testcase 3.5.7.7 / 3.5.7.8: +--------------------------- +set @test_var='Before trig 3.5.7.7'; +Create trigger trg6_1 AFTER INSERT +on tb3 for each row set @test_var='Trigger1 3.5.7.7/8'; +Create trigger trg6_2 AFTER INSERT +on tb3 for each row set @test_var='Trigger2 3.5.7.7'; +ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table' +select @test_var; +@test_var +Before trig 3.5.7.7 +Insert into tb3 (f121,f122) values ('Test 3.5.7.7/8','Insert 3.5.7.7'); +Select f121,f122 from tb3 where f121='Test 3.5.7.7/8'; +f121 f122 +Test 3.5.7.7/8 Insert 3.5.7.7 +select @test_var; +@test_var +Trigger1 3.5.7.7/8 +update tb3 set f122='Update 3.5.7.8' where f121= 'Test 3.5.7.7/8'; +Select f121,f122 from tb3 where f121='Test 3.5.7.7/8'; +f121 f122 +Test 3.5.7.7/8 Update 3.5.7.8 +select @test_var; +@test_var +Trigger1 3.5.7.7/8 +drop trigger trg6_1; +drop trigger trg6_2; +delete from tb3 where f121='Test 3.5.7.7/8'; + +Testcase 3.5.7.9/10: +-------------------- +Create trigger trg7_1 BEFORE UPDATE +on tb3 for each row set new.f122='Trigger1 3.5.7.9/10'; +Create trigger trg7_2 BEFORE UPDATE +on tb3 for each row set new.f122='Trigger2 3.5.7.9'; +ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table' +Insert into tb3 (f121,f122) values ('Test 3.5.7.9/10','Insert 3.5.7.9'); +Select f121,f122 from tb3 where f121='Test 3.5.7.9/10'; +f121 f122 +Test 3.5.7.9/10 Insert 3.5.7.9 +update tb3 set f122='update 3.5.7.10' where f121='Test 3.5.7.9/10'; +Select f121,f122 from tb3 where f121='Test 3.5.7.9/10'; +f121 f122 +Test 3.5.7.9/10 Trigger1 3.5.7.9/10 +drop trigger trg7_1; +drop trigger trg7_2; +delete from tb3 where f121='Test 3.5.7.9/10'; + +Testcase 3.5.7.11/12: +--------------------- +set @test_var='Before trig 3.5.7.11'; +Create trigger trg8_1 AFTER UPDATE +on tb3 for each row set @test_var='Trigger 3.5.7.11/12'; +Create trigger trg8_2 AFTER UPDATE +on tb3 for each row set @test_var='Trigger2 3.5.7.11'; +ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table' +select @test_var; +@test_var +Before trig 3.5.7.11 +Insert into tb3 (f121,f122) values ('Test 3.5.7.11/12','Insert 3.5.7.11/12'); +select @test_var; +@test_var +Before trig 3.5.7.11 +Select f121,f122 from tb3 where f121='Test 3.5.7.11/12'; +f121 f122 +Test 3.5.7.11/12 Insert 3.5.7.11/12 +update tb3 set f122='update 3.5.7.12' where f121='Test 3.5.7.11/12'; +Select f121,f122 from tb3 where f121='Test 3.5.7.11/12'; +f121 f122 +Test 3.5.7.11/12 update 3.5.7.12 +select @test_var; +@test_var +Trigger 3.5.7.11/12 +delete from tb3 where f121='Test 3.5.7.11/12'; +drop trigger trg8_1; +drop trigger trg8_2; +delete from tb3 where f121='Test 3.5.7.11/12'; + +Testcase 3.5.7.13/14: +--------------------- +set @test_var=1; +Create trigger trg9_1 BEFORE DELETE +on tb3 for each row set @test_var=@test_var+1; +Create trigger trg9_2 BEFORE DELETE +on tb3 for each row set @test_var=@test_var+10; +ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table' +select @test_var; +@test_var +1 +Insert into tb3 (f121,f122) values ('Test 3.5.7.13/14','Insert 3.5.7.13'); +Select f121,f122 from tb3 where f121='Test 3.5.7.13/14'; +f121 f122 +Test 3.5.7.13/14 Insert 3.5.7.13 +select @test_var; +@test_var +1 +delete from tb3 where f121='Test 3.5.7.13/14'; +Select f121,f122 from tb3 where f121='Test 3.5.7.13/14'; +f121 f122 +select @test_var; +@test_var +2 +delete from tb3 where f121='Test 3.5.7.13/14'; +select @test_var; +@test_var +2 +drop trigger trg9_1; +drop trigger trg9_2; +delete from tb3 where f121='Test 3.5.7.13/14'; + +Testcase 3.5.7.15/16: +--------------------- +set @test_var=1; +Create trigger trg_3_406010_1 AFTER DELETE +on tb3 for each row set @test_var=@test_var+5; +Create trigger trg_3_406010_2 AFTER DELETE +on tb3 for each row set @test_var=@test_var+50; +ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table' +Create trigger trg_3_406010_1 AFTER INSERT +on tb3 for each row set @test_var=@test_var+1; +ERROR HY000: Trigger already exists +select @test_var; +@test_var +1 +Insert into tb3 (f121,f122) values ('Test 3.5.7.15/16','Insert 3.5.7.15/16'); +Select f121,f122 from tb3 where f121='Test 3.5.7.15/16'; +f121 f122 +Test 3.5.7.15/16 Insert 3.5.7.15/16 +select @test_var; +@test_var +1 +delete from tb3 where f121='Test 3.5.7.15/16'; +Select f121,f122 from tb3 where f121='Test 3.5.7.15/16'; +f121 f122 +select @test_var; +@test_var +6 +delete from tb3 where f121='Test 3.5.7.15/16'; +select @test_var; +@test_var +6 +drop trigger trg_3_406010_1; +drop trigger trg_3_406010_2; +delete from tb3 where f121='Test 3.5.7.15/16'; + +Testcase 3.5.7.17 (see Testcase 3.5.1.1) +---------------------------------------- +drop user test_general@localhost; +drop user test_general; +drop user test_super@localhost; +DROP TABLE test.tb3; diff --git a/mysql-test/suite/funcs_1/r/ndb_trig_08.result b/mysql-test/suite/funcs_1/r/ndb_trig_08.result new file mode 100644 index 00000000000..6ced07cef73 --- /dev/null +++ b/mysql-test/suite/funcs_1/r/ndb_trig_08.result @@ -0,0 +1,529 @@ +USE test; +drop table if exists tb3; +create table tb3 ( +f118 char not null DEFAULT 'a', +f119 char binary not null DEFAULT b'101', +f120 char ascii not null DEFAULT b'101', +f121 char(50), +f122 char(50), +f129 binary not null DEFAULT b'101', +f130 tinyint not null DEFAULT 99, +f131 tinyint unsigned not null DEFAULT 99, +f132 tinyint zerofill not null DEFAULT 99, +f133 tinyint unsigned zerofill not null DEFAULT 99, +f134 smallint not null DEFAULT 999, +f135 smallint unsigned not null DEFAULT 999, +f136 smallint zerofill not null DEFAULT 999, +f137 smallint unsigned zerofill not null DEFAULT 999, +f138 mediumint not null DEFAULT 9999, +f139 mediumint unsigned not null DEFAULT 9999, +f140 mediumint zerofill not null DEFAULT 9999, +f141 mediumint unsigned zerofill not null DEFAULT 9999, +f142 int not null DEFAULT 99999, +f143 int unsigned not null DEFAULT 99999, +f144 int zerofill not null DEFAULT 99999, +f145 int unsigned zerofill not null DEFAULT 99999, +f146 bigint not null DEFAULT 999999, +f147 bigint unsigned not null DEFAULT 999999, +f148 bigint zerofill not null DEFAULT 999999, +f149 bigint unsigned zerofill not null DEFAULT 999999, +f150 decimal not null DEFAULT 999.999, +f151 decimal unsigned not null DEFAULT 999.17, +f152 decimal zerofill not null DEFAULT 999.999, +f153 decimal unsigned zerofill, +f154 decimal (0), +f155 decimal (64), +f156 decimal (0) unsigned, +f157 decimal (64) unsigned, +f158 decimal (0) zerofill, +f159 decimal (64) zerofill, +f160 decimal (0) unsigned zerofill, +f161 decimal (64) unsigned zerofill, +f162 decimal (0,0), +f163 decimal (63,30), +f164 decimal (0,0) unsigned, +f165 decimal (63,30) unsigned, +f166 decimal (0,0) zerofill, +f167 decimal (63,30) zerofill, +f168 decimal (0,0) unsigned zerofill, +f169 decimal (63,30) unsigned zerofill, +f170 numeric, +f171 numeric unsigned, +f172 numeric zerofill, +f173 numeric unsigned zerofill, +f174 numeric (0), +f175 numeric (64) +) engine = ; +Warnings: +Note 1265 Data truncated for column 'f150' at row 1 +Note 1265 Data truncated for column 'f151' at row 1 +Note 1265 Data truncated for column 'f152' at row 1 + +Testcase: 3.5: +-------------- +create User test_general@localhost; +set password for test_general@localhost = password('PWD'); +revoke ALL PRIVILEGES, GRANT OPTION FROM test_general@localhost; +create User test_super@localhost; +set password for test_super@localhost = password('PWD'); +grant ALL on *.* to test_super@localhost with grant OPTION; +connect(localhost,test_general,PWD,test,MASTER_MYPORT,MASTER_MYSOCK); +connect(localhost,test_super,PWD,test,MASTER_MYPORT,MASTER_MYSOCK); + +Testcase 3.5.8.1: (implied in previous tests) +--------------------------------------------- + +Testcase 3.5.8.2: (implied in previous tests) +--------------------------------------------- + +Testcase 3.5.8.3/4: +------------------- +create database db_test; +grant SELECT, INSERT, UPDATE, DELETE on db_test.* to test_general; +grant LOCK TABLES on db_test.* to test_general; +Use db_test; +create table t1_i ( +i120 char ascii not null DEFAULT b'101', +i136 smallint zerofill not null DEFAULT 999, +i144 int zerofill not null DEFAULT 99999, +i163 decimal (63,30)) engine=; +create table t1_u ( +u120 char ascii not null DEFAULT b'101', +u136 smallint zerofill not null DEFAULT 999, +u144 int zerofill not null DEFAULT 99999, +u163 decimal (63,30)) engine=; +create table t1_d ( +d120 char ascii not null DEFAULT b'101', +d136 smallint zerofill not null DEFAULT 999, +d144 int zerofill not null DEFAULT 99999, +d163 decimal (63,30)) engine=; +Insert into t1_u values ('a',111,99999,999.99); +Insert into t1_u values ('b',222,99999,999.99); +Insert into t1_u values ('c',333,99999,999.99); +Insert into t1_u values ('d',222,99999,999.99); +Insert into t1_u values ('e',222,99999,999.99); +Insert into t1_u values ('f',333,99999,999.99); +Insert into t1_d values ('a',111,99999,999.99); +Insert into t1_d values ('b',222,99999,999.99); +Insert into t1_d values ('c',333,99999,999.99); +Insert into t1_d values ('d',444,99999,999.99); +Insert into t1_d values ('e',222,99999,999.99); +Insert into t1_d values ('f',222,99999,999.99); + +3.5.8.4 - multiple SQL +---------------------- +use test; +Create trigger trg1 AFTER INSERT on tb3 for each row +BEGIN +insert into db_test.t1_i +values (new.f120, new.f136, new.f144, new.f163); +update db_test.t1_u +set u144=new.f144, u163=new.f163 +where u136=new.f136; +delete from db_test.t1_d where d136= new.f136; +select sum(db_test.t1_u.u163) into @test_var from db_test.t1_u +where u136= new.f136; +END// +Use test; +set @test_var=0; +Insert into tb3 (f120, f122, f136, f144, f163) +values ('1', 'Test 3.5.8.4', 222, 23456, 1.05); +Select f120, f122, f136, f144, f163 from tb3 where f122= 'Test 3.5.8.4'; +f120 f122 f136 f144 f163 +1 Test 3.5.8.4 00222 0000023456 1.050000000000000000000000000000 +select * from db_test.t1_i; +i120 i136 i144 i163 +1 00222 0000023456 1.050000000000000000000000000000 +select * from db_test.t1_u; +u120 u136 u144 u163 +a 00111 0000099999 999.990000000000000000000000000000 +b 00222 0000023456 1.050000000000000000000000000000 +c 00333 0000099999 999.990000000000000000000000000000 +d 00222 0000023456 1.050000000000000000000000000000 +e 00222 0000023456 1.050000000000000000000000000000 +f 00333 0000099999 999.990000000000000000000000000000 +select * from db_test.t1_d; +d120 d136 d144 d163 +a 00111 0000099999 999.990000000000000000000000000000 +c 00333 0000099999 999.990000000000000000000000000000 +d 00444 0000099999 999.990000000000000000000000000000 +select @test_var; +@test_var +3.150000000000000000000000000000 + +3.5.8.4 - single SQL - insert +----------------------------- +Create trigger trg2 BEFORE UPDATE on tb3 for each row +BEGIN +insert into db_test.t1_i +values (new.f120, new.f136, new.f144, new.f163); +END// +Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%'; +f120 f122 f136 f144 f163 +1 Test 3.5.8.4 00222 0000023456 1.050000000000000000000000000000 +select * from db_test.t1_i order by i120; +i120 i136 i144 i163 +1 00222 0000023456 1.050000000000000000000000000000 +update tb3 set f120='I', f122='Test 3.5.8.4-Single Insert' + where f122='Test 3.5.8.4'; +Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%'; +f120 f122 f136 f144 f163 +I Test 3.5.8.4-Single Insert 00222 0000023456 1.050000000000000000000000000000 +select * from db_test.t1_i order by i120; +i120 i136 i144 i163 +1 00222 0000023456 1.050000000000000000000000000000 +I 00222 0000023456 1.050000000000000000000000000000 + +3.5.8.4 - single SQL - update +----------------------------- +drop trigger trg2; +Create trigger trg3 BEFORE UPDATE on tb3 for each row +update db_test.t1_u +set u120=new.f120 +where u136=new.f136; +update tb3 set f120='U', f122='Test 3.5.8.4-Single Update' + where f122='Test 3.5.8.4-Single Insert'; +Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%'; +f120 f122 f136 f144 f163 +U Test 3.5.8.4-Single Update 00222 0000023456 1.050000000000000000000000000000 +select * from db_test.t1_u order by u120; +u120 u136 u144 u163 +a 00111 0000099999 999.990000000000000000000000000000 +c 00333 0000099999 999.990000000000000000000000000000 +f 00333 0000099999 999.990000000000000000000000000000 +U 00222 0000023456 1.050000000000000000000000000000 +U 00222 0000023456 1.050000000000000000000000000000 +U 00222 0000023456 1.050000000000000000000000000000 + +3.5.8.3/4 - single SQL - delete +------------------------------- +drop trigger trg3; +Create trigger trg4 AFTER UPDATE on tb3 for each row +delete from db_test.t1_d where d136= new.f136; +update tb3 set f120='D', f136=444, +f122='Test 3.5.8.4-Single Delete' + where f122='Test 3.5.8.4-Single Update'; +Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%'; +f120 f122 f136 f144 f163 +D Test 3.5.8.4-Single Delete 00444 0000023456 1.050000000000000000000000000000 +select * from db_test.t1_d order by d120; +d120 d136 d144 d163 +a 00111 0000099999 999.990000000000000000000000000000 +c 00333 0000099999 999.990000000000000000000000000000 + +3.5.8.3/4 - single SQL - select +------------------------------- +drop trigger trg4; +Create trigger trg5 AFTER UPDATE on tb3 for each row +select sum(db_test.t1_u.u163) into @test_var from db_test.t1_u +where u136= new.f136; +set @test_var=0; +update tb3 set f120='S', f136=111, +f122='Test 3.5.8.4-Single Select' + where f122='Test 3.5.8.4-Single Delete'; +Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%'; +f120 f122 f136 f144 f163 +S Test 3.5.8.4-Single Select 00111 0000023456 1.050000000000000000000000000000 +select @test_var; +@test_var +999.990000000000000000000000000000 +drop trigger trg1; +drop trigger trg5; +drop database if exists db_test; +delete from tb3 where f122 like 'Test 3.5.8.4%'; +revoke ALL PRIVILEGES, GRANT OPTION FROM 'test_general'@'localhost'; + +Testcase 3.5.8.5 (IF): +---------------------- +create trigger trg2 before insert on tb3 for each row +BEGIN +IF new.f120='1' then +set @test_var='one', new.f120='2'; +ELSEIF new.f120='2' then +set @test_var='two', new.f120='3'; +ELSEIF new.f120='3' then +set @test_var='three', new.f120='4'; +END IF; +IF (new.f120='4') and (new.f136=10) then +set @test_var2='2nd if', new.f120='d'; +ELSE +set @test_var2='2nd else', new.f120='D'; +END IF; +END// +set @test_var='Empty', @test_var2=0; +Insert into tb3 (f120, f122, f136) values ('1', 'Test 3.5.8.5-if', 101); +select f120, f122, f136, @test_var, @test_var2 +from tb3 where f122 = 'Test 3.5.8.5-if' order by f136; +f120 f122 f136 @test_var @test_var2 +D Test 3.5.8.5-if 00101 one 2nd else +Insert into tb3 (f120, f122, f136) values ('2', 'Test 3.5.8.5-if', 102); +select f120, f122, f136, @test_var, @test_var2 +from tb3 where f122 = 'Test 3.5.8.5-if' order by f136; +f120 f122 f136 @test_var @test_var2 +D Test 3.5.8.5-if 00101 two 2nd else +D Test 3.5.8.5-if 00102 two 2nd else +Insert into tb3 (f120, f122, f136) values ('3', 'Test 3.5.8.5-if', 10); +select f120, f122, f136, @test_var, @test_var2 +from tb3 where f122 = 'Test 3.5.8.5-if' order by f136; +f120 f122 f136 @test_var @test_var2 +d Test 3.5.8.5-if 00010 three 2nd if +D Test 3.5.8.5-if 00101 three 2nd if +D Test 3.5.8.5-if 00102 three 2nd if +Insert into tb3 (f120, f122, f136) values ('3', 'Test 3.5.8.5-if', 103); +select f120, f122, f136, @test_var, @test_var2 +from tb3 where f122 = 'Test 3.5.8.5-if' order by f136; +f120 f122 f136 @test_var @test_var2 +d Test 3.5.8.5-if 00010 three 2nd else +D Test 3.5.8.5-if 00101 three 2nd else +D Test 3.5.8.5-if 00102 three 2nd else +D Test 3.5.8.5-if 00103 three 2nd else +create trigger trg3 before update on tb3 for each row +BEGIN +ELSEIF new.f120='2' then +END IF; +END// +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 'ELSEIF new.f120='2' then +END IF; +END' at line 3 +drop trigger trg3// +create trigger trg4 before update on tb3 for each row +BEGIN +IF (new.f120='4') and (new.f136=10) then +set @test_var2='2nd if', new.f120='d'; +ELSE +set @test_var2='2nd else', new.f120='D'; +END// +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 7 +drop trigger trg4; +drop trigger trg2; +delete from tb3 where f121='Test 3.5.8.5-if'; + +Testcase 3.5.8.5-case: +---------------------- +create trigger trg3 before insert on tb3 for each row +BEGIN +SET new.f120=char(ascii(new.f120)-32); +CASE +when new.f136<100 then set new.f136=new.f136+120; +when new.f136<10 then set new.f144=777; +when new.f136>100 then set new.f120=new.f136-1; +END case; +CASE +when new.f136=200 then set @test_var=CONCAT(new.f120, '='); +ELSE set @test_var=concat(new.f120, '*'); +END case; +CASE new.f144 +when 1 then set @test_var=concat(@test_var, 'one'); +when 2 then set @test_var=concat(@test_var, 'two'); +when 3 then set @test_var=concat(@test_var, 'three'); +when 4 then set @test_var=concat(@test_var, 'four'); +when 5 then set @test_var=concat(@test_var, 'five'); +when 6 then set @test_var=concat(@test_var, 'six'); +when 7 then set @test_var=concat(@test_var, 'seven'); +when 8 then set @test_var=concat(@test_var, 'eight'); +when 9 then set @test_var=concat(@test_var, 'nine'); +when 10 then set @test_var=concat(@test_var, 'ten'); +when 11 then set @test_var=concat(@test_var, 'eleven'); +when 12 then set @test_var=concat(@test_var, 'twelve'); +when 13 then set @test_var=concat(@test_var, 'thirteen'); +when 14 then set @test_var=concat(@test_var, 'fourteen'); +when 15 then set @test_var=concat(@test_var, 'fifteen'); +ELSE set @test_var=CONCAT(new.f120, '*', new.f144); +END case; +END// +set @test_var='Empty'; +Insert into tb3 (f120, f122, f136, f144) +values ('a', 'Test 3.5.8.5-case', 5, 7); +select f120, f122, f136, f144, @test_var +from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; +f120 f122 f136 f144 @test_var +A Test 3.5.8.5-case 00125 0000000007 A*seven +Insert into tb3 (f120, f122, f136, f144) +values ('b', 'Test 3.5.8.5-case', 71,16); +select f120, f122, f136, f144, @test_var +from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; +f120 f122 f136 f144 @test_var +A Test 3.5.8.5-case 00125 0000000007 B*0000000016 +B Test 3.5.8.5-case 00191 0000000016 B*0000000016 +Insert into tb3 (f120, f122, f136, f144) +values ('c', 'Test 3.5.8.5-case', 80,1); +select f120, f122, f136, f144, @test_var +from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; +f120 f122 f136 f144 @test_var +A Test 3.5.8.5-case 00125 0000000007 C=one +B Test 3.5.8.5-case 00191 0000000016 C=one +C Test 3.5.8.5-case 00200 0000000001 C=one +Insert into tb3 (f120, f122, f136) +values ('d', 'Test 3.5.8.5-case', 152); +Warnings: +Warning 1265 Data truncated for column 'f120' at row 1 +select f120, f122, f136, f144, @test_var +from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; +f120 f122 f136 f144 @test_var +1 Test 3.5.8.5-case 00152 0000099999 1*0000099999 +A Test 3.5.8.5-case 00125 0000000007 1*0000099999 +B Test 3.5.8.5-case 00191 0000000016 1*0000099999 +C Test 3.5.8.5-case 00200 0000000001 1*0000099999 +Insert into tb3 (f120, f122, f136, f144) +values ('e', 'Test 3.5.8.5-case', 200, 8); +Warnings: +Warning 1265 Data truncated for column 'f120' at row 1 +select f120, f122, f136, f144, @test_var +from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; +f120 f122 f136 f144 @test_var +1 Test 3.5.8.5-case 00152 0000099999 1=eight +1 Test 3.5.8.5-case 00200 0000000008 1=eight +A Test 3.5.8.5-case 00125 0000000007 1=eight +B Test 3.5.8.5-case 00191 0000000016 1=eight +C Test 3.5.8.5-case 00200 0000000001 1=eight +Insert into tb3 (f120, f122, f136, f144) +values ('f', 'Test 3.5.8.5-case', 100, 8); +select f120, f122, f136, f144, @test_var +from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; +f120 f122 f136 f144 @test_var +1 Test 3.5.8.5-case 00152 0000099999 1=eight +1 Test 3.5.8.5-case 00200 0000000008 1=eight +A Test 3.5.8.5-case 00125 0000000007 1=eight +B Test 3.5.8.5-case 00191 0000000016 1=eight +C Test 3.5.8.5-case 00200 0000000001 1=eight +create trigger trg3a before update on tb3 for each row +BEGIN +CASE +when new.f136<100 then set new.f120='p'; +END// +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 5 +drop trigger trg3a; +drop trigger trg3; +delete from tb3 where f121='Test 3.5.8.5-case'; + +Testcase 3.5.8.5-loop/leave: +---------------------------- +Create trigger trg4 after insert on tb3 for each row +BEGIN +set @counter=0, @flag='Initial'; +Label1: loop +if new.f136 new.f136 END REPEAT rp_label; +END// +set @counter1= 0, @counter2= 0; +Insert into tb3 (f122, f136) +values ('Test 3.5.8.5-repeat', 13); +select @counter1, @counter2; +@counter1 @counter2 +15 8 +Create trigger trg6_2 after update on tb3 for each row +BEGIN +REPEAT +SET @counter2 = @counter2 + 1; +END// +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 'END' at line 5 +drop trigger trg6; +delete from tb3 where f122='Test 3.5.8.5-repeat'; + +Testcase 3.5.8.5-while: +----------------------- +Create trigger trg7 after insert on tb3 for each row +wl_label: WHILE @counter1 < new.f136 DO +SET @counter1 = @counter1 + 1; +IF (@counter1 MOD 2 = 0) THEN ITERATE wl_label; +END IF; +SET @counter2 = @counter2 + 1; +END WHILE wl_label// +set @counter1= 0, @counter2= 0; +Insert into tb3 (f122, f136) +values ('Test 3.5.8.5-while', 7); +select @counter1, @counter2; +@counter1 @counter2 +7 4 +Create trigger trg7_2 after update on tb3 for each row +BEGIN +WHILE @counter1 < new.f136 +SET @counter1 = @counter1 + 1; +END// +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 'SET @counter1 = @counter1 + 1; +END' at line 4 +delete from tb3 where f122='Test 3.5.8.5-while'; +drop trigger trg7; + +Testcase 3.5.8.6: (requirement void) +------------------------------------ +CREATE PROCEDURE sp_01 () BEGIN set @v1=1; END// +CREATE TRIGGER trg8_1 BEFORE UPDATE ON tb3 FOR EACH ROW +BEGIN +CALL sp_01 (); +END// +Insert into tb3 (f120, f122, f136) values ('6', 'Test 3.5.8.6-insert', 101); +update tb3 set f120='S', f136=111, +f122='Test 3.5.8.6-tr8_1' + where f122='Test 3.5.8.6-insert'; +select f120, f122 +from tb3 where f122 like 'Test 3.5.8.6%' order by f120; +f120 f122 +S Test 3.5.8.6-tr8_1 +DROP TRIGGER trg8_1; +DROP PROCEDURE sp_01; + +Testcase 3.5.8.7 +---------------- +Create trigger trg9_1 before update on tb3 for each row +BEGIN +Start transaction; +Set new.f120='U'; +Commit; +END// +ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger. +Create trigger trg9_2 before delete on tb3 for each row +BEGIN +Start transaction; +Set @var2=old.f120; +Rollback; +END// +ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger. +drop user test_general@localhost; +drop user test_general; +drop user test_super@localhost; +DROP TABLE test.tb3; diff --git a/mysql-test/suite/funcs_1/r/ndb_trig_09.result b/mysql-test/suite/funcs_1/r/ndb_trig_09.result new file mode 100644 index 00000000000..b84f4f60583 --- /dev/null +++ b/mysql-test/suite/funcs_1/r/ndb_trig_09.result @@ -0,0 +1,267 @@ +USE test; +drop table if exists tb3; +create table tb3 ( +f118 char not null DEFAULT 'a', +f119 char binary not null DEFAULT b'101', +f120 char ascii not null DEFAULT b'101', +f121 char(50), +f122 char(50), +f129 binary not null DEFAULT b'101', +f130 tinyint not null DEFAULT 99, +f131 tinyint unsigned not null DEFAULT 99, +f132 tinyint zerofill not null DEFAULT 99, +f133 tinyint unsigned zerofill not null DEFAULT 99, +f134 smallint not null DEFAULT 999, +f135 smallint unsigned not null DEFAULT 999, +f136 smallint zerofill not null DEFAULT 999, +f137 smallint unsigned zerofill not null DEFAULT 999, +f138 mediumint not null DEFAULT 9999, +f139 mediumint unsigned not null DEFAULT 9999, +f140 mediumint zerofill not null DEFAULT 9999, +f141 mediumint unsigned zerofill not null DEFAULT 9999, +f142 int not null DEFAULT 99999, +f143 int unsigned not null DEFAULT 99999, +f144 int zerofill not null DEFAULT 99999, +f145 int unsigned zerofill not null DEFAULT 99999, +f146 bigint not null DEFAULT 999999, +f147 bigint unsigned not null DEFAULT 999999, +f148 bigint zerofill not null DEFAULT 999999, +f149 bigint unsigned zerofill not null DEFAULT 999999, +f150 decimal not null DEFAULT 999.999, +f151 decimal unsigned not null DEFAULT 999.17, +f152 decimal zerofill not null DEFAULT 999.999, +f153 decimal unsigned zerofill, +f154 decimal (0), +f155 decimal (64), +f156 decimal (0) unsigned, +f157 decimal (64) unsigned, +f158 decimal (0) zerofill, +f159 decimal (64) zerofill, +f160 decimal (0) unsigned zerofill, +f161 decimal (64) unsigned zerofill, +f162 decimal (0,0), +f163 decimal (63,30), +f164 decimal (0,0) unsigned, +f165 decimal (63,30) unsigned, +f166 decimal (0,0) zerofill, +f167 decimal (63,30) zerofill, +f168 decimal (0,0) unsigned zerofill, +f169 decimal (63,30) unsigned zerofill, +f170 numeric, +f171 numeric unsigned, +f172 numeric zerofill, +f173 numeric unsigned zerofill, +f174 numeric (0), +f175 numeric (64) +) engine = ; +Warnings: +Note 1265 Data truncated for column 'f150' at row 1 +Note 1265 Data truncated for column 'f151' at row 1 +Note 1265 Data truncated for column 'f152' at row 1 +load data infile '/std_data_ln/funcs_1/memory_tb3.txt' +into table tb3; + +Testcase 3.5.9.1/2: +------------------- +Create trigger trg1 BEFORE UPDATE on tb3 for each row +set new.f142 = 94087, @counter=@counter+1; +TotalRows +10 +Affected +9 +NotAffected +1 +NewValuew +0 +set @counter=0; +Update tb3 Set f142='1' where f130<100; +select count(*) as ExpectedChanged, @counter as TrigCounter +from tb3 where f142=94087; +ExpectedChanged TrigCounter +9 9 +select count(*) as ExpectedNotChange from tb3 +where f130<100 and f142<>94087; +ExpectedNotChange +0 +select count(*) as NonExpectedChanged from tb3 +where f130>=130 and f142=94087; +NonExpectedChanged +0 +drop trigger trg1; + +Testcase 3.5.9.3: +----------------- +Create trigger trg2_a before update on tb3 for each row +set @tr_var_b4_118=old.f118, @tr_var_b4_121=old.f121, +@tr_var_b4_122=old.f122, @tr_var_b4_136=old.f136, +@tr_var_b4_163=old.f163; +Create trigger trg2_b after update on tb3 for each row +set @tr_var_af_118=old.f118, @tr_var_af_121=old.f121, +@tr_var_af_122=old.f122, @tr_var_af_136=old.f136, +@tr_var_af_163=old.f163; +Create trigger trg2_c before delete on tb3 for each row +set @tr_var_b4_118=old.f118, @tr_var_b4_121=old.f121, +@tr_var_b4_122=old.f122, @tr_var_b4_136=old.f136, +@tr_var_b4_163=old.f163; +Create trigger trg2_d after delete on tb3 for each row +set @tr_var_af_118=old.f118, @tr_var_af_121=old.f121, +@tr_var_af_122=old.f122, @tr_var_af_136=old.f136, +@tr_var_af_163=old.f163; +@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_163 +0 0 0 0 0 +@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_163 +0 0 0 0 0 +Insert into tb3 (f122, f136, f163) +values ('Test 3.5.9.3', 7, 123.17); +Update tb3 Set f136=8 where f122='Test 3.5.9.3'; +select f118, f121, f122, f136, f163 from tb3 where f122='Test 3.5.9.3' order by f136; +f118 f121 f122 f136 f163 +a NULL Test 3.5.9.3 00008 123.170000000000000000000000000000 +select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122, +@tr_var_b4_136, @tr_var_b4_163; +@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_163 +a NULL Test 3.5.9.3 7 123.170000000000000000000000000000 +select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122, +@tr_var_af_136, @tr_var_af_163; +@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_163 +a NULL Test 3.5.9.3 7 123.170000000000000000000000000000 +@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_163 +0 0 0 0 0 +@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_163 +0 0 0 0 0 +delete from tb3 where f122='Test 3.5.9.3'; +select f118, f121, f122, f136, f163 from tb3 where f122='Test 3.5.9.3' order by f136; +f118 f121 f122 f136 f163 +select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122, +@tr_var_b4_136, @tr_var_b4_163; +@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_163 +a NULL Test 3.5.9.3 8 123.170000000000000000000000000000 +select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122, +@tr_var_af_136, @tr_var_af_163; +@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_163 +a NULL Test 3.5.9.3 8 123.170000000000000000000000000000 +drop trigger trg2_a; +drop trigger trg2_b; +drop trigger trg2_c; +drop trigger trg2_d; + +Testcase 3.5.9.4: +----------------- +Create trigger trg3_a before insert on tb3 for each row +set @tr_var_b4_118=new.f118, @tr_var_b4_121=new.f121, +@tr_var_b4_122=new.f122, @tr_var_b4_136=new.f136, +@tr_var_b4_151=new.f151, @tr_var_b4_163=new.f163; +Create trigger trg3_b after insert on tb3 for each row +set @tr_var_af_118=new.f118, @tr_var_af_121=new.f121, +@tr_var_af_122=new.f122, @tr_var_af_136=new.f136, +@tr_var_af_151=new.f151, @tr_var_af_163=new.f163; +Create trigger trg3_c before update on tb3 for each row +set @tr_var_b4_118=new.f118, @tr_var_b4_121=new.f121, +@tr_var_b4_122=new.f122, @tr_var_b4_136=new.f136, +@tr_var_b4_151=new.f151, @tr_var_b4_163=new.f163; +Create trigger trg3_d after update on tb3 for each row +set @tr_var_af_118=new.f118, @tr_var_af_121=new.f121, +@tr_var_af_122=new.f122, @tr_var_af_136=new.f136, +@tr_var_af_151=new.f151, @tr_var_af_163=new.f163; +@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_151 @tr_var_b4_163 +0 0 0 0 0 0 +@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_151 @tr_var_af_163 +0 0 0 0 0 0 +Insert into tb3 (f122, f136, f151, f163) +values ('Test 3.5.9.4', 7, DEFAULT, 995.24); +select f118, f121, f122, f136, f151, f163 from tb3 +where f122 like 'Test 3.5.9.4%' order by f163; +f118 f121 f122 f136 f151 f163 +a NULL Test 3.5.9.4 00007 999 995.240000000000000000000000000000 +select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122, +@tr_var_b4_136, @tr_var_b4_151, @tr_var_b4_163; +@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_151 @tr_var_b4_163 +a NULL Test 3.5.9.4 7 999 995.240000000000000000000000000000 +select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122, +@tr_var_af_136, @tr_var_af_151, @tr_var_af_163; +@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_151 @tr_var_af_163 +a NULL Test 3.5.9.4 7 999 995.240000000000000000000000000000 +@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_151 @tr_var_b4_163 +0 0 0 0 0 0 +@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_151 @tr_var_af_163 +0 0 0 0 0 0 +Update tb3 Set f122='Test 3.5.9.4-trig', f136=NULL, f151=DEFAULT, f163=NULL +where f122='Test 3.5.9.4'; +Warnings: +Warning 1048 Column 'f136' cannot be null +select f118, f121, f122, f136, f151, f163 from tb3 +where f122 like 'Test 3.5.9.4-trig' order by f163; +f118 f121 f122 f136 f151 f163 +a NULL Test 3.5.9.4-trig 00000 999 NULL +select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122, +@tr_var_b4_136, @tr_var_b4_151, @tr_var_b4_163; +@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_151 @tr_var_b4_163 +a NULL Test 3.5.9.4-trig 0 999 NULL +select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122, +@tr_var_af_136, @tr_var_af_151, @tr_var_af_163; +@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_151 @tr_var_af_163 +a NULL Test 3.5.9.4-trig 0 999 NULL +drop trigger trg3_a; +drop trigger trg3_b; +drop trigger trg3_c; +drop trigger trg3_d; +delete from tb3 where f122='Test 3.5.9.4-trig'; + +Testcase 3.5.9.5: (implied in previous tests) +--------------------------------------------- + +Testcase 3.5.9.6: +----------------- +create trigger trg4a before insert on tb3 for each row +set @temp1= old.f120; +ERROR HY000: There is no OLD row in on INSERT trigger +create trigger trg4b after insert on tb3 for each row +set old.f120= 'test'; +ERROR HY000: Updating of OLD row is not allowed in trigger +drop trigger trg4a; +drop trigger trg4b; + +Testcase 3.5.9.7: (implied in previous tests) +--------------------------------------------- + +Testcase 3.5.9.8: (implied in previous tests) +--------------------------------------------- + +Testcase 3.5.9.9: +----------------- +create trigger trg5a before DELETE on tb3 for each row +set @temp1=new.f122; +ERROR HY000: There is no NEW row in on DELETE trigger +create trigger trg5b after DELETE on tb3 for each row +set new.f122='test'; +ERROR HY000: There is no NEW row in on DELETE trigger +drop trigger trg5a; +drop trigger trg5b; + +Testcase 3.5.9.10: (implied in previous tests) +---------------------------------------------- + +Testcase 3.5.9.11: covered by 3.5.9.9 +------------------------------------- + +Testcase 3.5.9.12: covered by 3.5.9.6 +------------------------------------- + +Testcase 3.5.9.13: +------------------ +create trigger trg6a before UPDATE on tb3 for each row +set old.f118='C', new.f118='U'; +ERROR HY000: Updating of OLD row is not allowed in trigger +create trigger trg6b after INSERT on tb3 for each row +set old.f136=163, new.f118='U'; +ERROR HY000: Updating of OLD row is not allowed in trigger +create trigger trg6c after UPDATE on tb3 for each row +set old.f136=NULL; +ERROR HY000: Updating of OLD row is not allowed in trigger +drop trigger trg6a; +drop trigger trg6b; +drop trigger trg6c; + +Testcase 3.5.9.14: (implied in previous tests) +---------------------------------------------- +DROP TABLE test.tb3; diff --git a/mysql-test/suite/funcs_1/r/ndb_trig_1011ext.result b/mysql-test/suite/funcs_1/r/ndb_trig_1011ext.result new file mode 100644 index 00000000000..60b70d1c981 --- /dev/null +++ b/mysql-test/suite/funcs_1/r/ndb_trig_1011ext.result @@ -0,0 +1,394 @@ +USE test; +drop table if exists tb3; +create table tb3 ( +f118 char not null DEFAULT 'a', +f119 char binary not null DEFAULT b'101', +f120 char ascii not null DEFAULT b'101', +f121 char(50), +f122 char(50), +f129 binary not null DEFAULT b'101', +f130 tinyint not null DEFAULT 99, +f131 tinyint unsigned not null DEFAULT 99, +f132 tinyint zerofill not null DEFAULT 99, +f133 tinyint unsigned zerofill not null DEFAULT 99, +f134 smallint not null DEFAULT 999, +f135 smallint unsigned not null DEFAULT 999, +f136 smallint zerofill not null DEFAULT 999, +f137 smallint unsigned zerofill not null DEFAULT 999, +f138 mediumint not null DEFAULT 9999, +f139 mediumint unsigned not null DEFAULT 9999, +f140 mediumint zerofill not null DEFAULT 9999, +f141 mediumint unsigned zerofill not null DEFAULT 9999, +f142 int not null DEFAULT 99999, +f143 int unsigned not null DEFAULT 99999, +f144 int zerofill not null DEFAULT 99999, +f145 int unsigned zerofill not null DEFAULT 99999, +f146 bigint not null DEFAULT 999999, +f147 bigint unsigned not null DEFAULT 999999, +f148 bigint zerofill not null DEFAULT 999999, +f149 bigint unsigned zerofill not null DEFAULT 999999, +f150 decimal not null DEFAULT 999.999, +f151 decimal unsigned not null DEFAULT 999.17, +f152 decimal zerofill not null DEFAULT 999.999, +f153 decimal unsigned zerofill, +f154 decimal (0), +f155 decimal (64), +f156 decimal (0) unsigned, +f157 decimal (64) unsigned, +f158 decimal (0) zerofill, +f159 decimal (64) zerofill, +f160 decimal (0) unsigned zerofill, +f161 decimal (64) unsigned zerofill, +f162 decimal (0,0), +f163 decimal (63,30), +f164 decimal (0,0) unsigned, +f165 decimal (63,30) unsigned, +f166 decimal (0,0) zerofill, +f167 decimal (63,30) zerofill, +f168 decimal (0,0) unsigned zerofill, +f169 decimal (63,30) unsigned zerofill, +f170 numeric, +f171 numeric unsigned, +f172 numeric zerofill, +f173 numeric unsigned zerofill, +f174 numeric (0), +f175 numeric (64) +) engine = ; +Warnings: +Note 1265 Data truncated for column 'f150' at row 1 +Note 1265 Data truncated for column 'f151' at row 1 +Note 1265 Data truncated for column 'f152' at row 1 +load data infile '/std_data_ln/funcs_1/memory_tb3.txt' +into table tb3; + +Testcase 3.5.10.1/2/3: +---------------------- +Create view vw11 as select * from tb3 +where f122 like 'Test 3.5.10.1/2/3%'; +Create trigger trg1a before insert on tb3 +for each row set new.f163=111.11; +Create trigger trg1b after insert on tb3 +for each row set @test_var='After Insert'; +Create trigger trg1c before update on tb3 +for each row set new.f121='Y', new.f122='Test 3.5.10.1/2/3-Update'; +Create trigger trg1d after update on tb3 +for each row set @test_var='After Update'; +Create trigger trg1e before delete on tb3 +for each row set @test_var=5; +Create trigger trg1f after delete on tb3 +for each row set @test_var= 2* @test_var+7; +Insert into vw11 (f122, f151) values ('Test 3.5.10.1/2/3', 1); +Insert into vw11 (f122, f151) values ('Test 3.5.10.1/2/3', 2); +Insert into vw11 (f122, f151) values ('Not in View', 3); +select f121, f122, f151, f163 +from tb3 where f122 like 'Test 3.5.10.1/2/3%' order by f151; +f121 f122 f151 f163 +NULL Test 3.5.10.1/2/3 1 111.110000000000000000000000000000 +NULL Test 3.5.10.1/2/3 2 111.110000000000000000000000000000 +select f121, f122, f151, f163 from vw11; +f121 f122 f151 f163 +NULL Test 3.5.10.1/2/3 1 111.110000000000000000000000000000 +NULL Test 3.5.10.1/2/3 2 111.110000000000000000000000000000 +select f121, f122, f151, f163 +from tb3 where f122 like 'Not in View'; +f121 f122 f151 f163 +NULL Not in View 3 111.110000000000000000000000000000 +Update vw11 set f163=1; +select f121, f122, f151, f163 from tb3 +where f122 like 'Test 3.5.10.1/2/3%' order by f151; +f121 f122 f151 f163 +Y Test 3.5.10.1/2/3-Update 1 1.000000000000000000000000000000 +Y Test 3.5.10.1/2/3-Update 2 1.000000000000000000000000000000 +select f121, f122, f151, f163 from vw11; +f121 f122 f151 f163 +Y Test 3.5.10.1/2/3-Update 1 1.000000000000000000000000000000 +Y Test 3.5.10.1/2/3-Update 2 1.000000000000000000000000000000 +set @test_var=0; +Select @test_var as 'before delete'; +before delete +0 +delete from vw11 where f151=1; +select f121, f122, f151, f163 from tb3 +where f122 like 'Test 3.5.10.1/2/3%' order by f151; +f121 f122 f151 f163 +Y Test 3.5.10.1/2/3-Update 2 1.000000000000000000000000000000 +select f121, f122, f151, f163 from vw11; +f121 f122 f151 f163 +Y Test 3.5.10.1/2/3-Update 2 1.000000000000000000000000000000 +Select @test_var as 'after delete'; +after delete +17 +drop view vw11; +drop trigger trg1a; +drop trigger trg1b; +drop trigger trg1c; +drop trigger trg1d; +drop trigger trg1e; +drop trigger trg1f; +delete from tb3 where f122 like 'Test 3.5.10.1/2/3%'; + +Testcase 3.5.10.4: +------------------ +create table tb_load (f1 int, f2 char(25),f3 int) engine = ; +Create trigger trg4 before insert on tb_load +for each row set new.f3=-(new.f1 div 5), @counter= @counter+1; +set @counter= 0; +select @counter as 'Rows Loaded Before'; +Rows Loaded Before +0 +load data infile '/std_data_ln/funcs_1/t9.txt' into table tb_load; +select @counter as 'Rows Loaded After'; +Rows Loaded After +10 +Select * from tb_load order by f1 limit 10; +f1 f2 f3 +-5000 a` 1000 +-4999 aaa 999 +-4998 abaa 999 +-4997 acaaa 999 +-4996 adaaaa 999 +-4995 aeaaaaa 999 +-4994 afaaaaaa 998 +-4993 agaaaaaaa 998 +-4992 a^aaaaaaaa 998 +-4991 a_aaaaaaaaa 998 +drop trigger trg4; +drop table tb_load; + +Testcase 3.5.10.5: (implemented in trig_frkey.test) +--------------------------------------------------- + +Testcase 3.5.10.6: (implemented in trig_frkey.test) +--------------------------------------------------- + +Testcase 3.5.10.extra: +---------------------- +create table t1_sp (var136 tinyint, var151 decimal) engine = ; +create trigger trg before insert on t1_sp +for each row set @counter=@counter+1; +create procedure trig_sp() +begin +declare done int default 0; +declare var151 decimal; +declare var136 tinyint; +declare cur1 cursor for select f136, f151 from tb3; +declare continue handler for sqlstate '01000' set done = 1; +open cur1; +fetch cur1 into var136, var151; +wl_loop: WHILE NOT done DO +insert into t1_sp values (var136, var151); +fetch cur1 into var136, var151; +END WHILE wl_loop; +close cur1; +end// +set @counter=0; +select @counter; +@counter +0 +call trig_sp(); +ERROR 02000: No data - zero rows fetched, selected, or processed +select @counter; +@counter +11 +select count(*) from tb3; +count(*) +11 +select count(*) from t1_sp; +count(*) +11 +drop procedure trig_sp; +drop trigger trg; +drop table t1_sp; + +Testcase 3.5.11.1 (implemented in trig_perf.test) +------------------------------------------------- + +Testcase y.y.y.2: Check for triggers starting triggers +------------------------------------------------------ +use test; +drop table if exists t1; +drop table if exists t2_1; +drop table if exists t2_2; +drop table if exists t2_3; +drop table if exists t2_4; +drop table if exists t3; +create table t1 (f1 integer) engine = ; +create table t2_1 (f1 integer) engine = ; +create table t2_2 (f1 integer) engine = ; +create table t2_3 (f1 integer) engine = ; +create table t2_4 (f1 integer) engine = ; +create table t3 (f1 integer) engine = ; +insert into t1 values (1); +create trigger tr1 after insert on t1 for each row +BEGIN +insert into t2_1 (f1) values (new.f1+1); +insert into t2_2 (f1) values (new.f1+1); +insert into t2_3 (f1) values (new.f1+1); +insert into t2_4 (f1) values (new.f1+1); +END// +create trigger tr2_1 after insert on t2_1 for each row +insert into t3 (f1) values (new.f1+10); +create trigger tr2_2 after insert on t2_2 for each row +insert into t3 (f1) values (new.f1+100); +create trigger tr2_3 after insert on t2_3 for each row +insert into t3 (f1) values (new.f1+1000); +create trigger tr2_4 after insert on t2_4 for each row +insert into t3 (f1) values (new.f1+10000); +insert into t1 values (1); +select * from t3 order by f1; +f1 +12 +102 +1002 +10002 +drop trigger tr1; +drop trigger tr2_1; +drop trigger tr2_2; +drop trigger tr2_3; +drop trigger tr2_4; +drop table t1, t2_1, t2_2, t2_3, t2_4, t3; + +Testcase y.y.y.3: Circular trigger reference +-------------------------------------------- +use test; +drop table if exists t1; +drop table if exists t2; +drop table if exists t3; +drop table if exists t4; +create table t1 (f1 integer) engine = ; +create table t2 (f2 integer) engine = ; +create table t3 (f3 integer) engine = ; +create table t4 (f4 integer) engine = ; +insert into t1 values (0); +create trigger tr1 after insert on t1 +for each row insert into t2 (f2) values (new.f1+1); +create trigger tr2 after insert on t2 +for each row insert into t3 (f3) values (new.f2+1); +create trigger tr3 after insert on t3 +for each row insert into t4 (f4) values (new.f3+1); +create trigger tr4 after insert on t4 +for each row insert into t1 (f1) values (new.f4+1); +insert into t1 values (1); +ERROR HY000: Can't update table 't1' in stored function/trigger because it is already used by statement which invoked this stored function/trigger. +select * from t1 order by f1; +f1 +0 +select * from t2 order by f2; +f2 +select * from t3 order by f3; +f3 +select * from t4 order by f4; +f4 +drop trigger tr1; +drop trigger tr2; +drop trigger tr3; +drop trigger tr4; +drop table t1; +drop table t2; +drop table t3; +drop table t4; + +Testcase y.y.y.4: Recursive trigger/SP references +------------------------------------------------- +set @sql_mode='traditional'; +create table t1_sp ( +count integer, +var136 tinyint, +var151 decimal) engine = ; +create procedure trig_sp() +begin +declare done int default 0; +declare var151 decimal; +declare var136 tinyint; +declare cur1 cursor for select f136, f151 from tb3; +declare continue handler for sqlstate '01000' set done = 1; +set @counter= @counter+1; +open cur1; +fetch cur1 into var136, var151; +wl_loop: WHILE NOT done DO +insert into t1_sp values (@counter, var136, var151); +fetch cur1 into var136, var151; +END WHILE wl_loop; +close cur1; +end// +create trigger trg before insert on t1_sp +for each row call trig_sp(); +set @counter=0; +select @counter; +@counter +0 +call trig_sp(); +ERROR HY000: Recursive limit 0 (as set by the max_sp_recursion_depth variable) was exceeded for routine trig_sp +select @counter; +@counter +1 +select count(*) from tb3; +count(*) +11 +select count(*) from t1_sp; +count(*) +0 +set @@max_sp_recursion_depth= 10; +set @counter=0; +select @counter; +@counter +0 +call trig_sp(); +ERROR HY000: Can't update table 't1_sp' in stored function/trigger because it is already used by statement which invoked this stored function/trigger. +select @counter; +@counter +2 +select count(*) from tb3; +count(*) +11 +select count(*) from t1_sp; +count(*) +0 +drop procedure trig_sp; +drop trigger trg; +drop table t1_sp; + +Testcase y.y.y.5: Rollback of nested trigger references +------------------------------------------------------- +set @@sql_mode='traditional'; +use test; +drop table if exists t1; +drop table if exists t2; +drop table if exists t3; +drop table if exists t4; +create table t1 (f1 integer) engine = ; +create table t2 (f2 integer) engine = ; +create table t3 (f3 integer) engine = ; +create table t4 (f4 tinyint) engine = ; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `f1` int(11) default NULL +) ENGINE= DEFAULT CHARSET=latin1 +insert into t1 values (1); +create trigger tr1 after insert on t1 +for each row insert into t2 (f2) values (new.f1+1); +create trigger tr2 after insert on t2 +for each row insert into t3 (f3) values (new.f2+1); +create trigger tr3 after insert on t3 +for each row insert into t4 (f4) values (new.f3+1000); +set autocommit=0; +start transaction; +insert into t1 values (1); +ERROR 22003: Out of range value adjusted for column 'f4' at row 1 +commit; +select * from t1 order by f1; +f1 +1 +select * from t2 order by f2; +f2 +select * from t3 order by f3; +f3 +drop trigger tr1; +drop trigger tr2; +drop trigger tr3; +drop table t1; +drop table t2; +drop table t3; +drop table t4; +DROP TABLE test.tb3; diff --git a/mysql-test/suite/funcs_1/t/disabled.def b/mysql-test/suite/funcs_1/t/disabled.def index 6833178a353..c9b7c8fb4dd 100644 --- a/mysql-test/suite/funcs_1/t/disabled.def +++ b/mysql-test/suite/funcs_1/t/disabled.def @@ -13,3 +13,4 @@ innodb_storedproc: (changes of WL#2984, using storeproc_nn instead) memory_storedproc: (changes of WL#2984, using storeproc_nn instead) myisam_storedproc: (changes of WL#2984, using storeproc_nn instead) +ndb_trig_1011ext: Bug#32656 NDB: Duplicate key error aborts transaction in handler. Doesn't talk back to SQL diff --git a/mysql-test/suite/funcs_1/t/innodb_trig_0102.test b/mysql-test/suite/funcs_1/t/innodb_trig_0102.test index c1da8f5448e..d5e65d3580f 100644 --- a/mysql-test/suite/funcs_1/t/innodb_trig_0102.test +++ b/mysql-test/suite/funcs_1/t/innodb_trig_0102.test @@ -1,4 +1,4 @@ -#### suite/funcs_1/t/innodb_triggers.test +#### suite/funcs_1/t/innodb_trig_0102.test # InnoDB tables should be used # @@ -7,10 +7,4 @@ # 2. Set $engine_type let $engine_type= innodb; -# Create some objects needed in many testcases -USE test; ---source suite/funcs_1/include/innodb_tb3.inc - --source suite/funcs_1/triggers/triggers_0102.inc -DROP TABLE test.tb3; - diff --git a/mysql-test/suite/funcs_1/t/innodb_trig_03.test b/mysql-test/suite/funcs_1/t/innodb_trig_03.test index 374bcf59a37..2a611c97fbf 100644 --- a/mysql-test/suite/funcs_1/t/innodb_trig_03.test +++ b/mysql-test/suite/funcs_1/t/innodb_trig_03.test @@ -1,4 +1,4 @@ -#### suite/funcs_1/t/innodb_triggers.test +#### suite/funcs_1/t/innodb_trig_03.test # InnoDB tables should be used # @@ -7,10 +7,4 @@ # 2. Set $engine_type let $engine_type= innodb; -# Create some objects needed in many testcases -USE test; ---source suite/funcs_1/include/innodb_tb3.inc - --source suite/funcs_1/triggers/triggers_03.inc -DROP TABLE test.tb3; - diff --git a/mysql-test/suite/funcs_1/t/innodb_trig_0407.test b/mysql-test/suite/funcs_1/t/innodb_trig_0407.test index 1a0689847b1..d8081770f4b 100644 --- a/mysql-test/suite/funcs_1/t/innodb_trig_0407.test +++ b/mysql-test/suite/funcs_1/t/innodb_trig_0407.test @@ -1,4 +1,4 @@ -#### suite/funcs_1/t/innodb_triggers.test +#### suite/funcs_1/t/innodb_trig_0407.test # InnoDB tables should be used # @@ -7,10 +7,4 @@ # 2. Set $engine_type let $engine_type= innodb; -# Create some objects needed in many testcases -USE test; ---source suite/funcs_1/include/innodb_tb3.inc - --source suite/funcs_1/triggers/triggers_0407.inc -DROP TABLE test.tb3; - diff --git a/mysql-test/suite/funcs_1/t/innodb_trig_08.test b/mysql-test/suite/funcs_1/t/innodb_trig_08.test index a4ac2db0955..ba48b977ba2 100644 --- a/mysql-test/suite/funcs_1/t/innodb_trig_08.test +++ b/mysql-test/suite/funcs_1/t/innodb_trig_08.test @@ -1,4 +1,4 @@ -#### suite/funcs_1/t/innodb_triggers.test +#### suite/funcs_1/t/innodb_trig_08.test # InnoDB tables should be used # @@ -7,10 +7,4 @@ # 2. Set $engine_type let $engine_type= innodb; -# Create some objects needed in many testcases -USE test; ---source suite/funcs_1/include/innodb_tb3.inc - --source suite/funcs_1/triggers/triggers_08.inc -DROP TABLE test.tb3; - diff --git a/mysql-test/suite/funcs_1/t/innodb_trig_09.test b/mysql-test/suite/funcs_1/t/innodb_trig_09.test index 40a0f145ef0..ad11465ff3c 100644 --- a/mysql-test/suite/funcs_1/t/innodb_trig_09.test +++ b/mysql-test/suite/funcs_1/t/innodb_trig_09.test @@ -1,4 +1,4 @@ -#### suite/funcs_1/t/innodb_triggers.test +#### suite/funcs_1/t/innodb_trig_09.test # InnoDB tables should be used # @@ -7,10 +7,4 @@ # 2. Set $engine_type let $engine_type= innodb; -# Create some objects needed in many testcases -USE test; ---source suite/funcs_1/include/innodb_tb3.inc - --source suite/funcs_1/triggers/triggers_09.inc -DROP TABLE test.tb3; - diff --git a/mysql-test/suite/funcs_1/t/innodb_trig_1011ext.test b/mysql-test/suite/funcs_1/t/innodb_trig_1011ext.test index f778b097a1b..b3252499191 100644 --- a/mysql-test/suite/funcs_1/t/innodb_trig_1011ext.test +++ b/mysql-test/suite/funcs_1/t/innodb_trig_1011ext.test @@ -1,4 +1,4 @@ -#### suite/funcs_1/t/innodb_triggers.test +#### suite/funcs_1/t/innodb_trig_1011ext.test # InnoDB tables should be used # @@ -7,10 +7,4 @@ # 2. Set $engine_type let $engine_type= innodb; -# Create some objects needed in many testcases -USE test; ---source suite/funcs_1/include/innodb_tb3.inc - --source suite/funcs_1/triggers/triggers_1011ext.inc -DROP TABLE test.tb3; - diff --git a/mysql-test/suite/funcs_1/t/memory_trig_0102.test b/mysql-test/suite/funcs_1/t/memory_trig_0102.test index c7b07cedfad..f13ca29e583 100644 --- a/mysql-test/suite/funcs_1/t/memory_trig_0102.test +++ b/mysql-test/suite/funcs_1/t/memory_trig_0102.test @@ -1,14 +1,8 @@ -#### suite/funcs_1/t/memory_triggers.test +#### suite/funcs_1/t/memory_trig_0102.test # Memory tables should be used # # Set $engine_type let $engine_type= memory; -# Create some objects needed in many testcases -USE test; ---source suite/funcs_1/include/memory_tb3.inc - --source suite/funcs_1/triggers/triggers_0102.inc -DROP TABLE test.tb3; - diff --git a/mysql-test/suite/funcs_1/t/memory_trig_03.test b/mysql-test/suite/funcs_1/t/memory_trig_03.test index b7205ce15d2..617400679d0 100644 --- a/mysql-test/suite/funcs_1/t/memory_trig_03.test +++ b/mysql-test/suite/funcs_1/t/memory_trig_03.test @@ -1,14 +1,8 @@ -#### suite/funcs_1/t/memory_triggers.test +#### suite/funcs_1/t/memory_trig_03.test # Memory tables should be used # # Set $engine_type let $engine_type= memory; -# Create some objects needed in many testcases -USE test; ---source suite/funcs_1/include/memory_tb3.inc - --source suite/funcs_1/triggers/triggers_03.inc -DROP TABLE test.tb3; - diff --git a/mysql-test/suite/funcs_1/t/memory_trig_0407.test b/mysql-test/suite/funcs_1/t/memory_trig_0407.test index 01b4bc39159..be87f191b2c 100644 --- a/mysql-test/suite/funcs_1/t/memory_trig_0407.test +++ b/mysql-test/suite/funcs_1/t/memory_trig_0407.test @@ -1,14 +1,8 @@ -#### suite/funcs_1/t/memory_triggers.test +#### suite/funcs_1/t/memory_trig_0407.test # Memory tables should be used # # Set $engine_type let $engine_type= memory; -# Create some objects needed in many testcases -USE test; ---source suite/funcs_1/include/memory_tb3.inc - --source suite/funcs_1/triggers/triggers_0407.inc -DROP TABLE test.tb3; - diff --git a/mysql-test/suite/funcs_1/t/memory_trig_08.test b/mysql-test/suite/funcs_1/t/memory_trig_08.test index bc09d4f3943..05c09312575 100644 --- a/mysql-test/suite/funcs_1/t/memory_trig_08.test +++ b/mysql-test/suite/funcs_1/t/memory_trig_08.test @@ -1,14 +1,8 @@ -#### suite/funcs_1/t/memory_triggers.test +#### suite/funcs_1/t/memory_trig_08.test # Memory tables should be used # # Set $engine_type let $engine_type= memory; -# Create some objects needed in many testcases -USE test; ---source suite/funcs_1/include/memory_tb3.inc - --source suite/funcs_1/triggers/triggers_08.inc -DROP TABLE test.tb3; - diff --git a/mysql-test/suite/funcs_1/t/memory_trig_09.test b/mysql-test/suite/funcs_1/t/memory_trig_09.test index 682e07f9fad..9ebced07bee 100644 --- a/mysql-test/suite/funcs_1/t/memory_trig_09.test +++ b/mysql-test/suite/funcs_1/t/memory_trig_09.test @@ -1,14 +1,8 @@ -#### suite/funcs_1/t/memory_triggers.test +#### suite/funcs_1/t/memory_trig_09.test # Memory tables should be used # # Set $engine_type let $engine_type= memory; -# Create some objects needed in many testcases -USE test; ---source suite/funcs_1/include/memory_tb3.inc - --source suite/funcs_1/triggers/triggers_09.inc -DROP TABLE test.tb3; - diff --git a/mysql-test/suite/funcs_1/t/memory_trig_1011ext.test b/mysql-test/suite/funcs_1/t/memory_trig_1011ext.test index c6dfe54b64d..e604d172f75 100644 --- a/mysql-test/suite/funcs_1/t/memory_trig_1011ext.test +++ b/mysql-test/suite/funcs_1/t/memory_trig_1011ext.test @@ -1,14 +1,8 @@ -#### suite/funcs_1/t/memory_triggers.test +#### suite/funcs_1/t/memory_trig_1011ext.test # Memory tables should be used # # Set $engine_type let $engine_type= memory; -# Create some objects needed in many testcases -USE test; ---source suite/funcs_1/include/memory_tb3.inc - --source suite/funcs_1/triggers/triggers_1011ext.inc -DROP TABLE test.tb3; - diff --git a/mysql-test/suite/funcs_1/t/myisam_trig_0102.test b/mysql-test/suite/funcs_1/t/myisam_trig_0102.test index fd326b2f061..473f25da26a 100644 --- a/mysql-test/suite/funcs_1/t/myisam_trig_0102.test +++ b/mysql-test/suite/funcs_1/t/myisam_trig_0102.test @@ -1,14 +1,8 @@ -#### suite/funcs_1/t/myisam_triggers.test +#### suite/funcs_1/t/myisam_trig_0102.test # MyISAM tables should be used # # Set $engine_type let $engine_type= myisam; -# Create some objects needed in many testcases -USE test; ---source suite/funcs_1/include/myisam_tb3.inc - --source suite/funcs_1/triggers/triggers_0102.inc -DROP TABLE test.tb3; - diff --git a/mysql-test/suite/funcs_1/t/myisam_trig_03.test b/mysql-test/suite/funcs_1/t/myisam_trig_03.test index 77b2d16a2a6..66087725597 100644 --- a/mysql-test/suite/funcs_1/t/myisam_trig_03.test +++ b/mysql-test/suite/funcs_1/t/myisam_trig_03.test @@ -1,14 +1,8 @@ -#### suite/funcs_1/t/myisam_triggers.test +#### suite/funcs_1/t/myisam_trig_03.test # MyISAM tables should be used # # Set $engine_type let $engine_type= myisam; -# Create some objects needed in many testcases -USE test; ---source suite/funcs_1/include/myisam_tb3.inc - --source suite/funcs_1/triggers/triggers_03.inc -DROP TABLE test.tb3; - diff --git a/mysql-test/suite/funcs_1/t/myisam_trig_0407.test b/mysql-test/suite/funcs_1/t/myisam_trig_0407.test index e1e9b6fd230..334bf764191 100644 --- a/mysql-test/suite/funcs_1/t/myisam_trig_0407.test +++ b/mysql-test/suite/funcs_1/t/myisam_trig_0407.test @@ -1,14 +1,8 @@ -#### suite/funcs_1/t/myisam_triggers.test +#### suite/funcs_1/t/myisam_trig_0407.test # MyISAM tables should be used # # Set $engine_type let $engine_type= myisam; -# Create some objects needed in many testcases -USE test; ---source suite/funcs_1/include/myisam_tb3.inc - --source suite/funcs_1/triggers/triggers_0407.inc -DROP TABLE test.tb3; - diff --git a/mysql-test/suite/funcs_1/t/myisam_trig_08.test b/mysql-test/suite/funcs_1/t/myisam_trig_08.test index 225d994a732..af040e228e2 100644 --- a/mysql-test/suite/funcs_1/t/myisam_trig_08.test +++ b/mysql-test/suite/funcs_1/t/myisam_trig_08.test @@ -1,14 +1,8 @@ -#### suite/funcs_1/t/myisam_triggers.test +#### suite/funcs_1/t/myisam_trig_08.test # MyISAM tables should be used # # Set $engine_type let $engine_type= myisam; -# Create some objects needed in many testcases -USE test; ---source suite/funcs_1/include/myisam_tb3.inc - --source suite/funcs_1/triggers/triggers_08.inc -DROP TABLE test.tb3; - diff --git a/mysql-test/suite/funcs_1/t/myisam_trig_09.test b/mysql-test/suite/funcs_1/t/myisam_trig_09.test index f5c53f48adb..9add2cda204 100644 --- a/mysql-test/suite/funcs_1/t/myisam_trig_09.test +++ b/mysql-test/suite/funcs_1/t/myisam_trig_09.test @@ -1,14 +1,8 @@ -#### suite/funcs_1/t/myisam_triggers.test +#### suite/funcs_1/t/myisam_trig_09.test # MyISAM tables should be used # # Set $engine_type let $engine_type= myisam; -# Create some objects needed in many testcases -USE test; ---source suite/funcs_1/include/myisam_tb3.inc - --source suite/funcs_1/triggers/triggers_09.inc -DROP TABLE test.tb3; - diff --git a/mysql-test/suite/funcs_1/t/myisam_trig_1011ext.test b/mysql-test/suite/funcs_1/t/myisam_trig_1011ext.test index e7e36c39706..44ba5cefee2 100644 --- a/mysql-test/suite/funcs_1/t/myisam_trig_1011ext.test +++ b/mysql-test/suite/funcs_1/t/myisam_trig_1011ext.test @@ -1,14 +1,8 @@ -#### suite/funcs_1/t/myisam_triggers.test +#### suite/funcs_1/t/myisam_trig_1011ext.test # MyISAM tables should be used # # Set $engine_type let $engine_type= myisam; -# Create some objects needed in many testcases -USE test; ---source suite/funcs_1/include/myisam_tb3.inc - --source suite/funcs_1/triggers/triggers_1011ext.inc -DROP TABLE test.tb3; - diff --git a/mysql-test/suite/funcs_1/t/ndb_trig_0102.test b/mysql-test/suite/funcs_1/t/ndb_trig_0102.test new file mode 100644 index 00000000000..dd239ff5edb --- /dev/null +++ b/mysql-test/suite/funcs_1/t/ndb_trig_0102.test @@ -0,0 +1,10 @@ +#### suite/funcs_1/t/ndb_trig_0102.test + +# NDB tables should be used +# +# 1. Check if NDB is available +--source include/have_ndb.inc +# 2. Set $engine_type +let $engine_type= ndbcluster; + +--source suite/funcs_1/triggers/triggers_0102.inc diff --git a/mysql-test/suite/funcs_1/t/ndb_trig_03.test b/mysql-test/suite/funcs_1/t/ndb_trig_03.test new file mode 100644 index 00000000000..1f68bd05a80 --- /dev/null +++ b/mysql-test/suite/funcs_1/t/ndb_trig_03.test @@ -0,0 +1,10 @@ +#### suite/funcs_1/t/ndb_trig_03.test + +# NDB tables should be used +# +# 1. Check if NDB is available +--source include/have_ndb.inc +# 2. Set $engine_type +let $engine_type= ndbcluster; + +--source suite/funcs_1/triggers/triggers_03.inc diff --git a/mysql-test/suite/funcs_1/t/ndb_trig_0407.test b/mysql-test/suite/funcs_1/t/ndb_trig_0407.test new file mode 100644 index 00000000000..eccefd12dd9 --- /dev/null +++ b/mysql-test/suite/funcs_1/t/ndb_trig_0407.test @@ -0,0 +1,10 @@ +#### suite/funcs_1/t/ndb_trig_0407.test + +# NDB tables should be used +# +# 1. Check if NDB is available +--source include/have_ndb.inc +# 2. Set $engine_type +let $engine_type= ndbcluster; + +--source suite/funcs_1/triggers/triggers_0407.inc diff --git a/mysql-test/suite/funcs_1/t/ndb_trig_08.test b/mysql-test/suite/funcs_1/t/ndb_trig_08.test new file mode 100644 index 00000000000..e07c4fe7ec4 --- /dev/null +++ b/mysql-test/suite/funcs_1/t/ndb_trig_08.test @@ -0,0 +1,10 @@ +#### suite/funcs_1/t/ndb_trig_08.test + +# NDB tables should be used +# +# 1. Check if NDB is available +--source include/have_ndb.inc +# 2. Set $engine_type +let $engine_type= ndbcluster; + +--source suite/funcs_1/triggers/triggers_08.inc diff --git a/mysql-test/suite/funcs_1/t/ndb_trig_09.test b/mysql-test/suite/funcs_1/t/ndb_trig_09.test new file mode 100644 index 00000000000..8def1d9eea1 --- /dev/null +++ b/mysql-test/suite/funcs_1/t/ndb_trig_09.test @@ -0,0 +1,10 @@ +#### suite/funcs_1/t/ndb_trig_09.test + +# NDB tables should be used +# +# 1. Check if NDB is available +--source include/have_ndb.inc +# 2. Set $engine_type +let $engine_type= ndbcluster; + +--source suite/funcs_1/triggers/triggers_09.inc diff --git a/mysql-test/suite/funcs_1/t/ndb_trig_1011ext.test b/mysql-test/suite/funcs_1/t/ndb_trig_1011ext.test new file mode 100644 index 00000000000..729d5fee60b --- /dev/null +++ b/mysql-test/suite/funcs_1/t/ndb_trig_1011ext.test @@ -0,0 +1,10 @@ +#### suite/funcs_1/t/ndb_trig_1011ext.test + +# NDB tables should be used +# +# 1. Check if NDB is available +--source include/have_ndb.inc +# 2. Set $engine_type +let $engine_type= ndbcluster; + +--source suite/funcs_1/triggers/triggers_1011ext.inc diff --git a/mysql-test/suite/funcs_1/triggers/triggers_0102.inc b/mysql-test/suite/funcs_1/triggers/triggers_0102.inc index cadfb9ec9be..dced2f2f42c 100644 --- a/mysql-test/suite/funcs_1/triggers/triggers_0102.inc +++ b/mysql-test/suite/funcs_1/triggers/triggers_0102.inc @@ -4,6 +4,9 @@ # (test case numbering refer to requirement document TP v1.1) #====================================================================== +USE test; +--source suite/funcs_1/include/tb3.inc + # OBM - ToDo ############ # 1. Performace @@ -52,6 +55,7 @@ use test; select @test_before, @test_after; Insert into tb3 (f121, f122, f142, f144, f134) values ('Test 3.5.1.1', 'First Row', @test_before, @test_after, 1); + --sorted_result select f121, f122, f142, f144, f134 from tb3 where f121 = 'Test 3.5.1.1'; select @test_before, @test_after; @@ -63,6 +67,7 @@ use test; tb3.f142 = @test_before, tb3.f144 = @test_after where tb3.f121 = 'Test 3.5.1.1'; + --sorted_result select f121, f122, f142, f144, f134 from tb3 where f121 = 'Test 3.5.1.1'; select @test_before, @test_after; @@ -71,9 +76,11 @@ use test; values ('Test 3.5.1.1', 'Second Row', 5, 6, 2); set @test_before = 0; set @test_after = 0; + --sorted_result select f121, f122, f142, f144, f134 from tb3 where f121 = 'Test 3.5.1.1'; select @test_before, @test_after; Delete from tb3 where f121 = 'Test 3.5.1.1' and f134 = 2; + --sorted_result select f121, f122, f142, f144, f134 from tb3 where f121 = 'Test 3.5.1.1'; select @test_before, @test_after; @@ -211,7 +218,8 @@ let $message= Testcase 3.5.1.7: - need to fix; --source include/show_msg.inc drop table if exists t1; - eval create table t1 (f1 int, f2 char(25),f3 int) engine=$engine_type; + --replace_result $engine_type + eval create table t1 (f1 int, f2 char(25),f3 int) engine = $engine_type; CREATE TRIGGER trg5_1 BEFORE INSERT on test.t1 for each row set new.f3 = '14'; CREATE TRIGGER trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ @@ -261,6 +269,7 @@ let $message= Testcase 3.5.1.8:; --enable_warnings create database trig_db; use trig_db; + --replace_result $engine_type eval create table t1 (f1 integer) engine = $engine_type; # Can't create a trigger in a different database @@ -324,7 +333,9 @@ let $message= Testcase 3.5.1.?:; drop table if exists t1; drop table if exists t2; --enable_warnings + --replace_result $engine_type eval create table t1 (f1 char(50), f2 integer) engine = $engine_type; + --replace_result $engine_type eval create table t2 (f1 char(50), f2 integer) engine = $engine_type; create trigger trig before insert on t1 @@ -366,14 +377,17 @@ let $message= Testcase 3.5.1.11:; create database trig_db2; create database trig_db3; use trig_db1; + --replace_result $engine_type eval create table t1 (f1 char(50), f2 integer) engine = $engine_type; create trigger trig before insert on t1 for each row set new.f1 ='trig1', @test_var1='trig1'; use trig_db2; + --replace_result $engine_type eval create table t2 (f1 char(50), f2 integer) engine = $engine_type; create trigger trig before insert on t2 for each row set new.f1 ='trig2', @test_var2='trig2'; use trig_db3; + --replace_result $engine_type eval create table t1 (f1 char(50), f2 integer) engine = $engine_type; create trigger trig before insert on t1 for each row set new.f1 ='trig3', @test_var3='trig3'; @@ -425,7 +439,9 @@ let $message= Testcase 3.5.2.1/2/3:; create database trig_db1; create database trig_db2; use trig_db1; + --replace_result $engine_type eval create table t1 (f1 char(50), f2 integer) engine = $engine_type; + --replace_result $engine_type eval create table trig_db2.t1 (f1 char(50), f2 integer) engine = $engine_type; create trigger trig1_b before insert on t1 for each row set @test_var1='trig1_b'; @@ -445,3 +461,4 @@ let $message= Testcase 3.5.2.1/2/3:; --disable_warnings drop database trig_db1; drop database trig_db2; +DROP TABLE test.tb3; diff --git a/mysql-test/suite/funcs_1/triggers/triggers_03.inc b/mysql-test/suite/funcs_1/triggers/triggers_03.inc index ac76dc83062..b0b98bf27e5 100644 --- a/mysql-test/suite/funcs_1/triggers/triggers_03.inc +++ b/mysql-test/suite/funcs_1/triggers/triggers_03.inc @@ -1,9 +1,13 @@ +#### suite/funcs_1/triggers/triggers_03.inc #====================================================================== # # Trigger Tests # (test case numbering refer to requirement document TP v1.1) #====================================================================== +USE test; +--source suite/funcs_1/include/tb3.inc + --disable_abort_on_error ########################################### @@ -20,6 +24,7 @@ let $message= Testcase 3.5.3:; --enable_warnings create database priv_db; use priv_db; + --replace_result $engine_type eval create table t1 (f1 char(20)) engine= $engine_type; create User test_noprivs@localhost; @@ -569,7 +574,9 @@ let $message=Testcase: 3.5.3.x:; drop table if exists t2; --enable_warnings + --replace_result $engine_type eval create table t1 (f1 int) engine= $engine_type; + --replace_result $engine_type eval create table t2 (f2 int) engine= $engine_type; revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; @@ -656,3 +663,5 @@ let $message=Testcase: 3.5.3.x:; drop user test_noprivs; --enable_warnings +use test; +drop table tb3; diff --git a/mysql-test/suite/funcs_1/triggers/triggers_0407.inc b/mysql-test/suite/funcs_1/triggers/triggers_0407.inc index a05bdb45bac..8bacc3944de 100644 --- a/mysql-test/suite/funcs_1/triggers/triggers_0407.inc +++ b/mysql-test/suite/funcs_1/triggers/triggers_0407.inc @@ -4,6 +4,9 @@ # (test case numbering refer to requirement document TP v1.1) #====================================================================== +USE test; +--source suite/funcs_1/include/tb3.inc + --disable_abort_on_error # General setup for Trigger tests @@ -43,7 +46,8 @@ let $message= Testcase 3.5.4.1:; connection con1_super; create database db_drop; Use db_drop; - eval create table t1 (f1 char(30)) engine=$engine_type; + --replace_result $engine_type + eval create table t1 (f1 char(30)) engine = $engine_type; grant INSERT, SELECT on db_drop.t1 to test_general; Use db_drop; Create trigger trg1 BEFORE INSERT on t1 @@ -82,7 +86,8 @@ let $message= Testcase 3.5.4.2:; --disable_warnings drop table if exists t1_432 ; --enable_warnings - eval create table t1_432 (f1 char (30)) engine=$engine_type; + --replace_result $engine_type + eval create table t1_432 (f1 char (30)) engine = $engine_type; --error ER_TRG_DOES_NOT_EXIST Drop trigger tr_does_not_exit; #cleanup @@ -104,8 +109,10 @@ let $message= Testcase 3.5.4.3:; drop table if exists t1_433 ; drop table if exists t1_433a ; --enable_warnings - eval create table t1_433 (f1 char (30)) engine=$engine_type; - eval create table t1_433a (f1a char (5)) engine=$engine_type; + --replace_result $engine_type + eval create table t1_433 (f1 char (30)) engine = $engine_type; + --replace_result $engine_type + eval create table t1_433a (f1a char (5)) engine = $engine_type; CREATE TRIGGER trg3 BEFORE INSERT on t1_433 for each row set new.f1 = 'Trigger 3.5.4.3'; @@ -141,7 +148,8 @@ let $message= Testcase 3.5.4.4:; connection con1_super; create database db_drop4; Use db_drop4; - eval create table t1 (f1 char(30)) engine=$engine_type; + --replace_result $engine_type + eval create table t1 (f1 char(30)) engine = $engine_type; grant INSERT, SELECT on db_drop4.t1 to test_general; Create trigger trg4 BEFORE INSERT on t1 for each row set new.f1='Trigger 3.5.4.4'; @@ -157,7 +165,8 @@ let $message= Testcase 3.5.4.4:; where information_schema.triggers.trigger_name='trg4'; create database db_drop4; Use db_drop4; - eval create table t1 (f1 char(30)) engine=$engine_type; + --replace_result $engine_type + eval create table t1 (f1 char(30)) engine = $engine_type; grant INSERT, SELECT on db_drop4.t1 to test_general; connection con1_general; Insert into t1 values ('2nd Insert 3.5.4.4'); @@ -181,7 +190,8 @@ let $message= Testcase 3.5.4.5:; connection con1_super; create database db_drop5; Use db_drop5; - eval create table t1 (f1 char(50)) engine=$engine_type; + --replace_result $engine_type + eval create table t1 (f1 char(50)) engine = $engine_type; grant INSERT, SELECT on t1 to test_general; Create trigger trg5 BEFORE INSERT on t1 for each row set new.f1='Trigger 3.5.4.5'; @@ -195,7 +205,8 @@ let $message= Testcase 3.5.4.5:; select trigger_schema, trigger_name, event_object_table from information_schema.triggers where information_schema.triggers.trigger_name='trg5'; - eval create table t1 (f1 char(50)) engine=$engine_type; + --replace_result $engine_type + eval create table t1 (f1 char(50)) engine = $engine_type; grant INSERT, SELECT on t1 to test_general; connection con1_general; Insert into t1 values ('2nd Insert 3.5.4.5'); @@ -281,7 +292,8 @@ let $message= Testcase 3.5.5.4:; create database dbtest_one; create database dbtest_two; use dbtest_two; - eval create table t2 (f1 char(15)) engine=$engine_type; + --replace_result $engine_type + eval create table t2 (f1 char(15)) engine = $engine_type; use dbtest_one; --error ER_TRG_IN_WRONG_SCHEMA create trigger trg4 before INSERT @@ -609,3 +621,4 @@ let $message= Testcase 3.5.7.17 (see Testcase 3.5.1.1); drop user test_general; drop user test_super@localhost; +DROP TABLE test.tb3; diff --git a/mysql-test/suite/funcs_1/triggers/triggers_08.inc b/mysql-test/suite/funcs_1/triggers/triggers_08.inc index 48db2cbf566..45228357bc5 100644 --- a/mysql-test/suite/funcs_1/triggers/triggers_08.inc +++ b/mysql-test/suite/funcs_1/triggers/triggers_08.inc @@ -4,6 +4,9 @@ # (test case numbering refer to requirement document TP v1.1) #====================================================================== +USE test; +--source suite/funcs_1/include/tb3.inc + # General setup for Trigger tests let $message= Testcase: 3.5:; --source include/show_msg.inc @@ -56,16 +59,19 @@ let $message= Testcase 3.5.8.3/4:; grant SELECT, INSERT, UPDATE, DELETE on db_test.* to test_general; grant LOCK TABLES on db_test.* to test_general; Use db_test; + --replace_result $engine_type eval create table t1_i ( i120 char ascii not null DEFAULT b'101', i136 smallint zerofill not null DEFAULT 999, i144 int zerofill not null DEFAULT 99999, i163 decimal (63,30)) engine=$engine_type; + --replace_result $engine_type eval create table t1_u ( u120 char ascii not null DEFAULT b'101', u136 smallint zerofill not null DEFAULT 999, u144 int zerofill not null DEFAULT 99999, u163 decimal (63,30)) engine=$engine_type; + --replace_result $engine_type eval create table t1_d ( d120 char ascii not null DEFAULT b'101', d136 smallint zerofill not null DEFAULT 999, @@ -549,4 +555,4 @@ let $message= Testcase 3.5.8.7; drop user test_general; drop user test_super@localhost; - +DROP TABLE test.tb3; diff --git a/mysql-test/suite/funcs_1/triggers/triggers_09.inc b/mysql-test/suite/funcs_1/triggers/triggers_09.inc index c84b89fa457..1645f7384ef 100644 --- a/mysql-test/suite/funcs_1/triggers/triggers_09.inc +++ b/mysql-test/suite/funcs_1/triggers/triggers_09.inc @@ -4,6 +4,13 @@ # (test case numbering refer to requirement document TP v1.1) #====================================================================== +USE test; +--source suite/funcs_1/include/tb3.inc + +--replace_result $MYSQLTEST_VARDIR +eval +load data infile '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/memory_tb3.txt' +into table tb3; ################################# ####### Section 3.5.9 ########### @@ -313,4 +320,4 @@ let $message= Testcase 3.5.9.13:; let $message= Testcase 3.5.9.14: (implied in previous tests); --source include/show_msg.inc - +DROP TABLE test.tb3; diff --git a/mysql-test/suite/funcs_1/triggers/triggers_1011ext.inc b/mysql-test/suite/funcs_1/triggers/triggers_1011ext.inc index b568fc422e4..20229434b5f 100644 --- a/mysql-test/suite/funcs_1/triggers/triggers_1011ext.inc +++ b/mysql-test/suite/funcs_1/triggers/triggers_1011ext.inc @@ -4,6 +4,14 @@ # (test case numbering refer to requirement document TP v1.1) #====================================================================== +USE test; +--source suite/funcs_1/include/tb3.inc + +--replace_result $MYSQLTEST_VARDIR +eval +load data infile '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/memory_tb3.txt' +into table tb3; + --disable_abort_on_error ############################################## @@ -49,6 +57,7 @@ let $message= Testcase 3.5.10.1/2/3:; Insert into vw11 (f122, f151) values ('Not in View', 3); select f121, f122, f151, f163 from tb3 where f122 like 'Test 3.5.10.1/2/3%' order by f151; + --sorted_result select f121, f122, f151, f163 from vw11; select f121, f122, f151, f163 from tb3 where f122 like 'Not in View'; @@ -57,6 +66,7 @@ let $message= Testcase 3.5.10.1/2/3:; Update vw11 set f163=1; select f121, f122, f151, f163 from tb3 where f122 like 'Test 3.5.10.1/2/3%' order by f151; + --sorted_result select f121, f122, f151, f163 from vw11; #Section 3.5.10.3 @@ -65,6 +75,7 @@ let $message= Testcase 3.5.10.1/2/3:; delete from vw11 where f151=1; select f121, f122, f151, f163 from tb3 where f122 like 'Test 3.5.10.1/2/3%' order by f151; + --sorted_result select f121, f122, f151, f163 from vw11; Select @test_var as 'after delete'; @@ -88,7 +99,8 @@ let $message= Testcase 3.5.10.1/2/3:; let $message= Testcase 3.5.10.4:; --source include/show_msg.inc - eval create table tb_load (f1 int, f2 char(25),f3 int) engine=$engine_type; + --replace_result $engine_type + eval create table tb_load (f1 int, f2 char(25),f3 int) engine = $engine_type; Create trigger trg4 before insert on tb_load for each row set new.f3=-(new.f1 div 5), @counter= @counter+1; @@ -131,7 +143,8 @@ let $message= Testcase 3.5.10.6: (implemented in trig_frkey.test); let $message= Testcase 3.5.10.extra:; --source include/show_msg.inc - eval create table t1_sp (var136 tinyint, var151 decimal) engine=$engine_type; + --replace_result $engine_type + eval create table t1_sp (var136 tinyint, var151 decimal) engine = $engine_type; create trigger trg before insert on t1_sp for each row set @counter=@counter+1; @@ -203,12 +216,18 @@ let $message= Testcase y.y.y.2: Check for triggers starting triggers; drop table if exists t3; --enable_warnings - eval create table t1 (f1 integer) engine=$engine_type; - eval create table t2_1 (f1 integer) engine=$engine_type; - eval create table t2_2 (f1 integer) engine=$engine_type; - eval create table t2_3 (f1 integer) engine=$engine_type; - eval create table t2_4 (f1 integer) engine=$engine_type; - eval create table t3 (f1 integer) engine=$engine_type; + --replace_result $engine_type + eval create table t1 (f1 integer) engine = $engine_type; + --replace_result $engine_type + eval create table t2_1 (f1 integer) engine = $engine_type; + --replace_result $engine_type + eval create table t2_2 (f1 integer) engine = $engine_type; + --replace_result $engine_type + eval create table t2_3 (f1 integer) engine = $engine_type; + --replace_result $engine_type + eval create table t2_4 (f1 integer) engine = $engine_type; + --replace_result $engine_type + eval create table t3 (f1 integer) engine = $engine_type; insert into t1 values (1); delimiter //; @@ -256,9 +275,13 @@ let $message= Testcase y.y.y.3: Circular trigger reference; drop table if exists t3; drop table if exists t4; --enable_warnings + --replace_result $engine_type eval create table t1 (f1 integer) engine = $engine_type; + --replace_result $engine_type eval create table t2 (f2 integer) engine = $engine_type; + --replace_result $engine_type eval create table t3 (f3 integer) engine = $engine_type; + --replace_result $engine_type eval create table t4 (f4 integer) engine = $engine_type; insert into t1 values (0); @@ -298,10 +321,11 @@ let $message= Testcase y.y.y.4: Recursive trigger/SP references; --source include/show_msg.inc set @sql_mode='traditional'; + --replace_result $engine_type eval create table t1_sp ( count integer, var136 tinyint, - var151 decimal) engine=$engine_type; + var151 decimal) engine = $engine_type; delimiter //; create procedure trig_sp() @@ -353,7 +377,7 @@ set @sql_mode='traditional'; # Testcase: y.y.y.5: # Checking rollback of nested trigger definitions -let $message= Testcase y.y.y.5: Roleback of nested trigger references; +let $message= Testcase y.y.y.5: Rollback of nested trigger references; --source include/show_msg.inc set @@sql_mode='traditional'; @@ -364,10 +388,15 @@ let $message= Testcase y.y.y.5: Roleback of nested trigger references; drop table if exists t3; drop table if exists t4; --enable_warnings + --replace_result $engine_type eval create table t1 (f1 integer) engine = $engine_type; + --replace_result $engine_type eval create table t2 (f2 integer) engine = $engine_type; + --replace_result $engine_type eval create table t3 (f3 integer) engine = $engine_type; + --replace_result $engine_type eval create table t4 (f4 tinyint) engine = $engine_type; + --replace_result $engine_type show create table t1; insert into t1 values (1); create trigger tr1 after insert on t1 @@ -377,19 +406,18 @@ let $message= Testcase y.y.y.5: Roleback of nested trigger references; create trigger tr3 after insert on t3 for each row insert into t4 (f4) values (new.f3+1000); -#lock tables t1 write, t2 write, t3 write, t4 write; - set autocommit=0; start transaction; +# Bug#32656 NDB: Duplicate key error aborts transaction in handler. +# Doesn't talk back to SQL --error ER_WARN_DATA_OUT_OF_RANGE insert into t1 values (1); commit; select * from t1 order by f1; select * from t2 order by f2; select * from t3 order by f3; -#unlock tables; + #Cleanup - --disable_warnings drop trigger tr1; drop trigger tr2; drop trigger tr3; @@ -397,5 +425,5 @@ let $message= Testcase y.y.y.5: Roleback of nested trigger references; drop table t2; drop table t3; drop table t4; - --enable_warnings +DROP TABLE test.tb3; diff --git a/mysql-test/t/func_misc.test b/mysql-test/t/func_misc.test index 7415f3ef56a..36c18979154 100644 --- a/mysql-test/t/func_misc.test +++ b/mysql-test/t/func_misc.test @@ -178,7 +178,7 @@ SET @sleep_time_per_result_row = 1; SET @max_acceptable_delay = 2; # TIMEDIFF = time for query with sleep (mostly the time caused by SLEEP) # + time for delays caused by high load on testing box -# Ensure that at least a reasonable fraction of TIMEDIFF is belongs to the SLEEP +# Ensure that at least a reasonable fraction of TIMEDIFF belongs to the SLEEP # by appropriate setting of variables. # Ensure that any "judging" has a base of minimum three attempts. # (Test 2 uses all attempts except the first one.) @@ -242,7 +242,7 @@ while ($num) # -> total runtime is clear more needed than for one result row needed # = Replacement for one of the original Bug#12689 tests --echo # Test 1: Does the query with SLEEP need a reasonable time? -eval SELECT COUNT(*) > $loops - 1 INTO @aux1 FROM t_history +eval SELECT COUNT(*) >= $loops - 1 INTO @aux1 FROM t_history WHERE TIMEDIFF(end_ts,start_ts) - @sleep_time_per_result_row * @row_count BETWEEN 0 AND @max_acceptable_delay; SELECT @aux1 AS "Expect 1"; @@ -257,7 +257,7 @@ SELECT @aux1 AS "Expect 1"; # = Replacement for one of the original Bug#12689 tests --echo # Test 2: Does the query with SLEEP need a reasonable time even in case --echo # of the non first execution? -eval SELECT COUNT(*) > $loops - 1 - 1 INTO @aux2 FROM t_history +eval SELECT COUNT(*) >= $loops - 1 - 1 INTO @aux2 FROM t_history WHERE TIMEDIFF(end_ts,start_ts) - @sleep_time_per_result_row * @row_count BETWEEN 0 AND @max_acceptable_delay AND attempt > 1; From a8af693b5031019646c5bdffa50df760123182e5 Mon Sep 17 00:00:00 2001 From: Mattias Jonsson Date: Tue, 3 Jun 2008 13:25:41 +0200 Subject: [PATCH 14/46] Bug#31210: INSERT DELAYED crashes server when used on partitioned tables Problem was an unclear error message since it could suggest that MyISAM did not support INSERT DELAYED. Changed the error message to say that DELAYED is not supported by the table, instead of the table's storage engine. The confusion is that a partitioned table is in somewhat sense using the partitioning storage engine, which in turn uses the ordinary storage engine. By saying that the table does not support DELAYED we do not give any extra informantion about the storage engine or if it is partitioned. mysql-test/r/innodb-replace.result: Bug#31210: INSERT DELAYED crashes server when used on partitioned tables changed error message mysql-test/t/innodb-replace.test: Bug#31210: INSERT DELAYED crashes server when used on partitioned tables changed error message mysql-test/t/merge.test: Bug#31210: INSERT DELAYED crashes server when used on partitioned tables changed error message mysql-test/t/partition_hash.test: Bug#31210: INSERT DELAYED crashes server when used on partitioned tables changed error message sql/share/errmsg.txt: Bug#31210: INSERT DELAYED crashes server when used on partitioned tables added error message for tables not supporting DELAYED sql/sql_insert.cc: Bug#31210: INSERT DELAYED crashes server when used on partitioned tables changed error message --- mysql-test/r/innodb-replace.result | 4 ++-- mysql-test/t/innodb-replace.test | 4 ++-- mysql-test/t/merge.test | 6 +++--- mysql-test/t/partition_hash.test | 5 +++-- sql/share/errmsg.txt | 3 +++ sql/sql_insert.cc | 2 +- 6 files changed, 14 insertions(+), 10 deletions(-) diff --git a/mysql-test/r/innodb-replace.result b/mysql-test/r/innodb-replace.result index 77e0aeb38fd..c926bb89a2e 100644 --- a/mysql-test/r/innodb-replace.result +++ b/mysql-test/r/innodb-replace.result @@ -3,11 +3,11 @@ create table t1 (c1 char(5) unique not null, c2 int, stamp timestamp) engine=inn select * from t1; c1 c2 stamp replace delayed into t1 (c1, c2) values ( "text1","11"); -ERROR HY000: Table storage engine for 't1' doesn't have this option +ERROR HY000: DELAYED option not supported for table 't1' select * from t1; c1 c2 stamp replace delayed into t1 (c1, c2) values ( "text1","12"); -ERROR HY000: Table storage engine for 't1' doesn't have this option +ERROR HY000: DELAYED option not supported for table 't1' select * from t1; c1 c2 stamp drop table t1; diff --git a/mysql-test/t/innodb-replace.test b/mysql-test/t/innodb-replace.test index d44ede65ce8..8c3aacde5e8 100644 --- a/mysql-test/t/innodb-replace.test +++ b/mysql-test/t/innodb-replace.test @@ -11,10 +11,10 @@ drop table if exists t1; # create table t1 (c1 char(5) unique not null, c2 int, stamp timestamp) engine=innodb; select * from t1; ---error 1031 +--error ER_DELAYED_NOT_SUPPORTED replace delayed into t1 (c1, c2) values ( "text1","11"); select * from t1; ---error 1031 +--error ER_DELAYED_NOT_SUPPORTED replace delayed into t1 (c1, c2) values ( "text1","12"); select * from t1; drop table t1; diff --git a/mysql-test/t/merge.test b/mysql-test/t/merge.test index 76e746db037..fd1336491aa 100644 --- a/mysql-test/t/merge.test +++ b/mysql-test/t/merge.test @@ -1201,7 +1201,7 @@ UNLOCK TABLES; # Succeeds in embedded server - is converted to normal insert # Fails in normal server, ps-protocol - not supported by engine # Fails in normal server, normal protocol - not a base table ---error 0, ER_ILLEGAL_HA, ER_WRONG_OBJECT +--error 0, ER_DELAYED_NOT_SUPPORTED, ER_WRONG_OBJECT INSERT DELAYED INTO t4 VALUES(44); # Get rid of row in embedded server DELETE FROM t4 WHERE c1 = 44; @@ -1214,9 +1214,9 @@ INSERT DELAYED INTO t3 VALUES(33); } SELECT * FROM t4 ORDER BY c1; LOCK TABLES t3 WRITE, t2 WRITE, t4 WRITE, t1 WRITE; ---error ER_DELAYED_INSERT_TABLE_LOCKED, ER_ILLEGAL_HA +--error ER_DELAYED_INSERT_TABLE_LOCKED, ER_DELAYED_NOT_SUPPORTED INSERT DELAYED INTO t4 VALUES(444); ---error ER_DELAYED_INSERT_TABLE_LOCKED, ER_ILLEGAL_HA +--error ER_DELAYED_INSERT_TABLE_LOCKED, ER_DELAYED_NOT_SUPPORTED INSERT DELAYED INTO t3 VALUES(333); SELECT * FROM t4 ORDER BY c1; UNLOCK TABLES; diff --git a/mysql-test/t/partition_hash.test b/mysql-test/t/partition_hash.test index 362d5f747e9..5b9aa5707b9 100644 --- a/mysql-test/t/partition_hash.test +++ b/mysql-test/t/partition_hash.test @@ -165,8 +165,9 @@ drop table t1; # CREATE TABLE t1 (c1 INT) ENGINE=MyISAM PARTITION BY HASH(c1) PARTITIONS 1; # The test succeeds in an embedded server because normal insert is done. -# The test fails in a normal server with "engine doesn't have this option". ---error 0, ER_ILLEGAL_HA +# The test fails in a normal server with +# "DELAYED option not supported by table". +--error 0, ER_DELAYED_NOT_SUPPORTED INSERT DELAYED INTO t1 VALUES (1); DROP TABLE t1; diff --git a/sql/share/errmsg.txt b/sql/share/errmsg.txt index e03371a308b..426290714eb 100644 --- a/sql/share/errmsg.txt +++ b/sql/share/errmsg.txt @@ -6130,3 +6130,6 @@ ER_LOG_PURGE_NO_FILE ER_NEED_REPREPARE eng "Prepared statement needs to be re-prepared" + +ER_DELAYED_NOT_SUPPORTED + eng "DELAYED option not supported for table '%-.192s'" diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index d1e5c26912d..8847468b7c2 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -2305,7 +2305,7 @@ pthread_handler_t handle_delayed_insert(void *arg) if (!(di->table->file->ha_table_flags() & HA_CAN_INSERT_DELAYED)) { thd->fatal_error(); - my_error(ER_ILLEGAL_HA, MYF(0), di->table_list.table_name); + my_error(ER_DELAYED_NOT_SUPPORTED, MYF(0), di->table_list.table_name); goto err; } if (di->table->triggers) From 2100ec9ec91642e214cb043aac3a728a018d5b15 Mon Sep 17 00:00:00 2001 From: Davi Arnaut Date: Tue, 3 Jun 2008 10:59:46 -0300 Subject: [PATCH 15/46] Bug#33362: Query cache invalidation (truncate) may hang if cached query uses many tables The problem was that query cache would not properly cache queries which used 256 or more tables but yet would leave behind query cache blocks pointing to freed (destroyed) data. Later when invalidating (due to a truncate) query cache would attempt to grab a lock which resided in the freed data, leading to hangs or undefined behavior. This was happening due to a improper return value from the function responsible for registering the tables used in the query (so the cache can be invalidated later if one of the tables is modified). The function expected a return value of type boolean (char, 8 bits) indicating success (1) or failure (0) but the number of tables registered (unsigned int, 32 bits) was being returned instead. This caused the function to return failure for cases where it had actually succeed because when a type (unsigned int) is converted to a narrower type (char), the excess bits on the left are discarded. Thus if the 8 rightmost bits are zero, the return value will be 0 (failure). The solution is to simply return true (1) only if the number of registered table is greater than zero and false (0) otherwise. mysql-test/r/query_cache_merge.result: Add test case result for Bug#33362 mysql-test/t/query_cache_merge.test: Add test case for Bug#33362 sql/sql_cache.cc: Return 1 or 0 depending on the number of registered tables. --- mysql-test/r/query_cache_merge.result | 1674 +++++++++++++++++++++++++ mysql-test/t/query_cache_merge.test | 58 + sql/sql_cache.cc | 2 +- 3 files changed, 1733 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/query_cache_merge.result b/mysql-test/r/query_cache_merge.result index d2bbe217815..c324df65f77 100644 --- a/mysql-test/r/query_cache_merge.result +++ b/mysql-test/r/query_cache_merge.result @@ -19,3 +19,1677 @@ Qcache_queries_in_cache 0 drop table t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80,t81,t82,t83,t84,t85,t86,t87,t88,t89,t90,t91,t92,t93,t94,t95,t96,t97,t98,t99,t100,t101,t102,t103,t104,t105,t106,t107,t108,t109,t110,t111,t112,t113,t114,t115,t116,t117,t118,t119,t120,t121,t122,t123,t124,t125,t126,t127,t128,t129,t130,t131,t132,t133,t134,t135,t136,t137,t138,t139,t140,t141,t142,t143,t144,t145,t146,t147,t148,t149,t150,t151,t152,t153,t154,t155,t156,t157,t158,t159,t160,t161,t162,t163,t164,t165,t166,t167,t168,t169,t170,t171,t172,t173,t174,t175,t176,t177,t178,t179,t180,t181,t182,t183,t184,t185,t186,t187,t188,t189,t190,t191,t192,t193,t194,t195,t196,t197,t198,t199,t200,t201,t202,t203,t204,t205,t206,t207,t208,t209,t210,t211,t212,t213,t214,t215,t216,t217,t218,t219,t220,t221,t222,t223,t224,t225,t226,t227,t228,t229,t230,t231,t232,t233,t234,t235,t236,t237,t238,t239,t240,t241,t242,t243,t244,t245,t246,t247,t248,t249,t250,t251,t252,t253,t254,t255,t256,t257,t00; SET @@global.query_cache_size=0; set @@global.table_definition_cache=@save_table_definition_cache; +SET @save_table_definition_cache = @@global.table_definition_cache; +SET @@global.table_definition_cache = 512; +CREATE TABLE t255 (a INT); +INSERT INTO t255 VALUES (255); +CREATE TABLE t254 (a INT); +INSERT INTO t254 VALUES (254); +CREATE TABLE t253 (a INT); +INSERT INTO t253 VALUES (253); +CREATE TABLE t252 (a INT); +INSERT INTO t252 VALUES (252); +CREATE TABLE t251 (a INT); +INSERT INTO t251 VALUES (251); +CREATE TABLE t250 (a INT); +INSERT INTO t250 VALUES (250); +CREATE TABLE t249 (a INT); +INSERT INTO t249 VALUES (249); +CREATE TABLE t248 (a INT); +INSERT INTO t248 VALUES (248); +CREATE TABLE t247 (a INT); +INSERT INTO t247 VALUES (247); +CREATE TABLE t246 (a INT); +INSERT INTO t246 VALUES (246); +CREATE TABLE t245 (a INT); +INSERT INTO t245 VALUES (245); +CREATE TABLE t244 (a INT); +INSERT INTO t244 VALUES (244); +CREATE TABLE t243 (a INT); +INSERT INTO t243 VALUES (243); +CREATE TABLE t242 (a INT); +INSERT INTO t242 VALUES (242); +CREATE TABLE t241 (a INT); +INSERT INTO t241 VALUES (241); +CREATE TABLE t240 (a INT); +INSERT INTO t240 VALUES (240); +CREATE TABLE t239 (a INT); +INSERT INTO t239 VALUES (239); +CREATE TABLE t238 (a INT); +INSERT INTO t238 VALUES (238); +CREATE TABLE t237 (a INT); +INSERT INTO t237 VALUES (237); +CREATE TABLE t236 (a INT); +INSERT INTO t236 VALUES (236); +CREATE TABLE t235 (a INT); +INSERT INTO t235 VALUES (235); +CREATE TABLE t234 (a INT); +INSERT INTO t234 VALUES (234); +CREATE TABLE t233 (a INT); +INSERT INTO t233 VALUES (233); +CREATE TABLE t232 (a INT); +INSERT INTO t232 VALUES (232); +CREATE TABLE t231 (a INT); +INSERT INTO t231 VALUES (231); +CREATE TABLE t230 (a INT); +INSERT INTO t230 VALUES (230); +CREATE TABLE t229 (a INT); +INSERT INTO t229 VALUES (229); +CREATE TABLE t228 (a INT); +INSERT INTO t228 VALUES (228); +CREATE TABLE t227 (a INT); +INSERT INTO t227 VALUES (227); +CREATE TABLE t226 (a INT); +INSERT INTO t226 VALUES (226); +CREATE TABLE t225 (a INT); +INSERT INTO t225 VALUES (225); +CREATE TABLE t224 (a INT); +INSERT INTO t224 VALUES (224); +CREATE TABLE t223 (a INT); +INSERT INTO t223 VALUES (223); +CREATE TABLE t222 (a INT); +INSERT INTO t222 VALUES (222); +CREATE TABLE t221 (a INT); +INSERT INTO t221 VALUES (221); +CREATE TABLE t220 (a INT); +INSERT INTO t220 VALUES (220); +CREATE TABLE t219 (a INT); +INSERT INTO t219 VALUES (219); +CREATE TABLE t218 (a INT); +INSERT INTO t218 VALUES (218); +CREATE TABLE t217 (a INT); +INSERT INTO t217 VALUES (217); +CREATE TABLE t216 (a INT); +INSERT INTO t216 VALUES (216); +CREATE TABLE t215 (a INT); +INSERT INTO t215 VALUES (215); +CREATE TABLE t214 (a INT); +INSERT INTO t214 VALUES (214); +CREATE TABLE t213 (a INT); +INSERT INTO t213 VALUES (213); +CREATE TABLE t212 (a INT); +INSERT INTO t212 VALUES (212); +CREATE TABLE t211 (a INT); +INSERT INTO t211 VALUES (211); +CREATE TABLE t210 (a INT); +INSERT INTO t210 VALUES (210); +CREATE TABLE t209 (a INT); +INSERT INTO t209 VALUES (209); +CREATE TABLE t208 (a INT); +INSERT INTO t208 VALUES (208); +CREATE TABLE t207 (a INT); +INSERT INTO t207 VALUES (207); +CREATE TABLE t206 (a INT); +INSERT INTO t206 VALUES (206); +CREATE TABLE t205 (a INT); +INSERT INTO t205 VALUES (205); +CREATE TABLE t204 (a INT); +INSERT INTO t204 VALUES (204); +CREATE TABLE t203 (a INT); +INSERT INTO t203 VALUES (203); +CREATE TABLE t202 (a INT); +INSERT INTO t202 VALUES (202); +CREATE TABLE t201 (a INT); +INSERT INTO t201 VALUES (201); +CREATE TABLE t200 (a INT); +INSERT INTO t200 VALUES (200); +CREATE TABLE t199 (a INT); +INSERT INTO t199 VALUES (199); +CREATE TABLE t198 (a INT); +INSERT INTO t198 VALUES (198); +CREATE TABLE t197 (a INT); +INSERT INTO t197 VALUES (197); +CREATE TABLE t196 (a INT); +INSERT INTO t196 VALUES (196); +CREATE TABLE t195 (a INT); +INSERT INTO t195 VALUES (195); +CREATE TABLE t194 (a INT); +INSERT INTO t194 VALUES (194); +CREATE TABLE t193 (a INT); +INSERT INTO t193 VALUES (193); +CREATE TABLE t192 (a INT); +INSERT INTO t192 VALUES (192); +CREATE TABLE t191 (a INT); +INSERT INTO t191 VALUES (191); +CREATE TABLE t190 (a INT); +INSERT INTO t190 VALUES (190); +CREATE TABLE t189 (a INT); +INSERT INTO t189 VALUES (189); +CREATE TABLE t188 (a INT); +INSERT INTO t188 VALUES (188); +CREATE TABLE t187 (a INT); +INSERT INTO t187 VALUES (187); +CREATE TABLE t186 (a INT); +INSERT INTO t186 VALUES (186); +CREATE TABLE t185 (a INT); +INSERT INTO t185 VALUES (185); +CREATE TABLE t184 (a INT); +INSERT INTO t184 VALUES (184); +CREATE TABLE t183 (a INT); +INSERT INTO t183 VALUES (183); +CREATE TABLE t182 (a INT); +INSERT INTO t182 VALUES (182); +CREATE TABLE t181 (a INT); +INSERT INTO t181 VALUES (181); +CREATE TABLE t180 (a INT); +INSERT INTO t180 VALUES (180); +CREATE TABLE t179 (a INT); +INSERT INTO t179 VALUES (179); +CREATE TABLE t178 (a INT); +INSERT INTO t178 VALUES (178); +CREATE TABLE t177 (a INT); +INSERT INTO t177 VALUES (177); +CREATE TABLE t176 (a INT); +INSERT INTO t176 VALUES (176); +CREATE TABLE t175 (a INT); +INSERT INTO t175 VALUES (175); +CREATE TABLE t174 (a INT); +INSERT INTO t174 VALUES (174); +CREATE TABLE t173 (a INT); +INSERT INTO t173 VALUES (173); +CREATE TABLE t172 (a INT); +INSERT INTO t172 VALUES (172); +CREATE TABLE t171 (a INT); +INSERT INTO t171 VALUES (171); +CREATE TABLE t170 (a INT); +INSERT INTO t170 VALUES (170); +CREATE TABLE t169 (a INT); +INSERT INTO t169 VALUES (169); +CREATE TABLE t168 (a INT); +INSERT INTO t168 VALUES (168); +CREATE TABLE t167 (a INT); +INSERT INTO t167 VALUES (167); +CREATE TABLE t166 (a INT); +INSERT INTO t166 VALUES (166); +CREATE TABLE t165 (a INT); +INSERT INTO t165 VALUES (165); +CREATE TABLE t164 (a INT); +INSERT INTO t164 VALUES (164); +CREATE TABLE t163 (a INT); +INSERT INTO t163 VALUES (163); +CREATE TABLE t162 (a INT); +INSERT INTO t162 VALUES (162); +CREATE TABLE t161 (a INT); +INSERT INTO t161 VALUES (161); +CREATE TABLE t160 (a INT); +INSERT INTO t160 VALUES (160); +CREATE TABLE t159 (a INT); +INSERT INTO t159 VALUES (159); +CREATE TABLE t158 (a INT); +INSERT INTO t158 VALUES (158); +CREATE TABLE t157 (a INT); +INSERT INTO t157 VALUES (157); +CREATE TABLE t156 (a INT); +INSERT INTO t156 VALUES (156); +CREATE TABLE t155 (a INT); +INSERT INTO t155 VALUES (155); +CREATE TABLE t154 (a INT); +INSERT INTO t154 VALUES (154); +CREATE TABLE t153 (a INT); +INSERT INTO t153 VALUES (153); +CREATE TABLE t152 (a INT); +INSERT INTO t152 VALUES (152); +CREATE TABLE t151 (a INT); +INSERT INTO t151 VALUES (151); +CREATE TABLE t150 (a INT); +INSERT INTO t150 VALUES (150); +CREATE TABLE t149 (a INT); +INSERT INTO t149 VALUES (149); +CREATE TABLE t148 (a INT); +INSERT INTO t148 VALUES (148); +CREATE TABLE t147 (a INT); +INSERT INTO t147 VALUES (147); +CREATE TABLE t146 (a INT); +INSERT INTO t146 VALUES (146); +CREATE TABLE t145 (a INT); +INSERT INTO t145 VALUES (145); +CREATE TABLE t144 (a INT); +INSERT INTO t144 VALUES (144); +CREATE TABLE t143 (a INT); +INSERT INTO t143 VALUES (143); +CREATE TABLE t142 (a INT); +INSERT INTO t142 VALUES (142); +CREATE TABLE t141 (a INT); +INSERT INTO t141 VALUES (141); +CREATE TABLE t140 (a INT); +INSERT INTO t140 VALUES (140); +CREATE TABLE t139 (a INT); +INSERT INTO t139 VALUES (139); +CREATE TABLE t138 (a INT); +INSERT INTO t138 VALUES (138); +CREATE TABLE t137 (a INT); +INSERT INTO t137 VALUES (137); +CREATE TABLE t136 (a INT); +INSERT INTO t136 VALUES (136); +CREATE TABLE t135 (a INT); +INSERT INTO t135 VALUES (135); +CREATE TABLE t134 (a INT); +INSERT INTO t134 VALUES (134); +CREATE TABLE t133 (a INT); +INSERT INTO t133 VALUES (133); +CREATE TABLE t132 (a INT); +INSERT INTO t132 VALUES (132); +CREATE TABLE t131 (a INT); +INSERT INTO t131 VALUES (131); +CREATE TABLE t130 (a INT); +INSERT INTO t130 VALUES (130); +CREATE TABLE t129 (a INT); +INSERT INTO t129 VALUES (129); +CREATE TABLE t128 (a INT); +INSERT INTO t128 VALUES (128); +CREATE TABLE t127 (a INT); +INSERT INTO t127 VALUES (127); +CREATE TABLE t126 (a INT); +INSERT INTO t126 VALUES (126); +CREATE TABLE t125 (a INT); +INSERT INTO t125 VALUES (125); +CREATE TABLE t124 (a INT); +INSERT INTO t124 VALUES (124); +CREATE TABLE t123 (a INT); +INSERT INTO t123 VALUES (123); +CREATE TABLE t122 (a INT); +INSERT INTO t122 VALUES (122); +CREATE TABLE t121 (a INT); +INSERT INTO t121 VALUES (121); +CREATE TABLE t120 (a INT); +INSERT INTO t120 VALUES (120); +CREATE TABLE t119 (a INT); +INSERT INTO t119 VALUES (119); +CREATE TABLE t118 (a INT); +INSERT INTO t118 VALUES (118); +CREATE TABLE t117 (a INT); +INSERT INTO t117 VALUES (117); +CREATE TABLE t116 (a INT); +INSERT INTO t116 VALUES (116); +CREATE TABLE t115 (a INT); +INSERT INTO t115 VALUES (115); +CREATE TABLE t114 (a INT); +INSERT INTO t114 VALUES (114); +CREATE TABLE t113 (a INT); +INSERT INTO t113 VALUES (113); +CREATE TABLE t112 (a INT); +INSERT INTO t112 VALUES (112); +CREATE TABLE t111 (a INT); +INSERT INTO t111 VALUES (111); +CREATE TABLE t110 (a INT); +INSERT INTO t110 VALUES (110); +CREATE TABLE t109 (a INT); +INSERT INTO t109 VALUES (109); +CREATE TABLE t108 (a INT); +INSERT INTO t108 VALUES (108); +CREATE TABLE t107 (a INT); +INSERT INTO t107 VALUES (107); +CREATE TABLE t106 (a INT); +INSERT INTO t106 VALUES (106); +CREATE TABLE t105 (a INT); +INSERT INTO t105 VALUES (105); +CREATE TABLE t104 (a INT); +INSERT INTO t104 VALUES (104); +CREATE TABLE t103 (a INT); +INSERT INTO t103 VALUES (103); +CREATE TABLE t102 (a INT); +INSERT INTO t102 VALUES (102); +CREATE TABLE t101 (a INT); +INSERT INTO t101 VALUES (101); +CREATE TABLE t100 (a INT); +INSERT INTO t100 VALUES (100); +CREATE TABLE t99 (a INT); +INSERT INTO t99 VALUES (99); +CREATE TABLE t98 (a INT); +INSERT INTO t98 VALUES (98); +CREATE TABLE t97 (a INT); +INSERT INTO t97 VALUES (97); +CREATE TABLE t96 (a INT); +INSERT INTO t96 VALUES (96); +CREATE TABLE t95 (a INT); +INSERT INTO t95 VALUES (95); +CREATE TABLE t94 (a INT); +INSERT INTO t94 VALUES (94); +CREATE TABLE t93 (a INT); +INSERT INTO t93 VALUES (93); +CREATE TABLE t92 (a INT); +INSERT INTO t92 VALUES (92); +CREATE TABLE t91 (a INT); +INSERT INTO t91 VALUES (91); +CREATE TABLE t90 (a INT); +INSERT INTO t90 VALUES (90); +CREATE TABLE t89 (a INT); +INSERT INTO t89 VALUES (89); +CREATE TABLE t88 (a INT); +INSERT INTO t88 VALUES (88); +CREATE TABLE t87 (a INT); +INSERT INTO t87 VALUES (87); +CREATE TABLE t86 (a INT); +INSERT INTO t86 VALUES (86); +CREATE TABLE t85 (a INT); +INSERT INTO t85 VALUES (85); +CREATE TABLE t84 (a INT); +INSERT INTO t84 VALUES (84); +CREATE TABLE t83 (a INT); +INSERT INTO t83 VALUES (83); +CREATE TABLE t82 (a INT); +INSERT INTO t82 VALUES (82); +CREATE TABLE t81 (a INT); +INSERT INTO t81 VALUES (81); +CREATE TABLE t80 (a INT); +INSERT INTO t80 VALUES (80); +CREATE TABLE t79 (a INT); +INSERT INTO t79 VALUES (79); +CREATE TABLE t78 (a INT); +INSERT INTO t78 VALUES (78); +CREATE TABLE t77 (a INT); +INSERT INTO t77 VALUES (77); +CREATE TABLE t76 (a INT); +INSERT INTO t76 VALUES (76); +CREATE TABLE t75 (a INT); +INSERT INTO t75 VALUES (75); +CREATE TABLE t74 (a INT); +INSERT INTO t74 VALUES (74); +CREATE TABLE t73 (a INT); +INSERT INTO t73 VALUES (73); +CREATE TABLE t72 (a INT); +INSERT INTO t72 VALUES (72); +CREATE TABLE t71 (a INT); +INSERT INTO t71 VALUES (71); +CREATE TABLE t70 (a INT); +INSERT INTO t70 VALUES (70); +CREATE TABLE t69 (a INT); +INSERT INTO t69 VALUES (69); +CREATE TABLE t68 (a INT); +INSERT INTO t68 VALUES (68); +CREATE TABLE t67 (a INT); +INSERT INTO t67 VALUES (67); +CREATE TABLE t66 (a INT); +INSERT INTO t66 VALUES (66); +CREATE TABLE t65 (a INT); +INSERT INTO t65 VALUES (65); +CREATE TABLE t64 (a INT); +INSERT INTO t64 VALUES (64); +CREATE TABLE t63 (a INT); +INSERT INTO t63 VALUES (63); +CREATE TABLE t62 (a INT); +INSERT INTO t62 VALUES (62); +CREATE TABLE t61 (a INT); +INSERT INTO t61 VALUES (61); +CREATE TABLE t60 (a INT); +INSERT INTO t60 VALUES (60); +CREATE TABLE t59 (a INT); +INSERT INTO t59 VALUES (59); +CREATE TABLE t58 (a INT); +INSERT INTO t58 VALUES (58); +CREATE TABLE t57 (a INT); +INSERT INTO t57 VALUES (57); +CREATE TABLE t56 (a INT); +INSERT INTO t56 VALUES (56); +CREATE TABLE t55 (a INT); +INSERT INTO t55 VALUES (55); +CREATE TABLE t54 (a INT); +INSERT INTO t54 VALUES (54); +CREATE TABLE t53 (a INT); +INSERT INTO t53 VALUES (53); +CREATE TABLE t52 (a INT); +INSERT INTO t52 VALUES (52); +CREATE TABLE t51 (a INT); +INSERT INTO t51 VALUES (51); +CREATE TABLE t50 (a INT); +INSERT INTO t50 VALUES (50); +CREATE TABLE t49 (a INT); +INSERT INTO t49 VALUES (49); +CREATE TABLE t48 (a INT); +INSERT INTO t48 VALUES (48); +CREATE TABLE t47 (a INT); +INSERT INTO t47 VALUES (47); +CREATE TABLE t46 (a INT); +INSERT INTO t46 VALUES (46); +CREATE TABLE t45 (a INT); +INSERT INTO t45 VALUES (45); +CREATE TABLE t44 (a INT); +INSERT INTO t44 VALUES (44); +CREATE TABLE t43 (a INT); +INSERT INTO t43 VALUES (43); +CREATE TABLE t42 (a INT); +INSERT INTO t42 VALUES (42); +CREATE TABLE t41 (a INT); +INSERT INTO t41 VALUES (41); +CREATE TABLE t40 (a INT); +INSERT INTO t40 VALUES (40); +CREATE TABLE t39 (a INT); +INSERT INTO t39 VALUES (39); +CREATE TABLE t38 (a INT); +INSERT INTO t38 VALUES (38); +CREATE TABLE t37 (a INT); +INSERT INTO t37 VALUES (37); +CREATE TABLE t36 (a INT); +INSERT INTO t36 VALUES (36); +CREATE TABLE t35 (a INT); +INSERT INTO t35 VALUES (35); +CREATE TABLE t34 (a INT); +INSERT INTO t34 VALUES (34); +CREATE TABLE t33 (a INT); +INSERT INTO t33 VALUES (33); +CREATE TABLE t32 (a INT); +INSERT INTO t32 VALUES (32); +CREATE TABLE t31 (a INT); +INSERT INTO t31 VALUES (31); +CREATE TABLE t30 (a INT); +INSERT INTO t30 VALUES (30); +CREATE TABLE t29 (a INT); +INSERT INTO t29 VALUES (29); +CREATE TABLE t28 (a INT); +INSERT INTO t28 VALUES (28); +CREATE TABLE t27 (a INT); +INSERT INTO t27 VALUES (27); +CREATE TABLE t26 (a INT); +INSERT INTO t26 VALUES (26); +CREATE TABLE t25 (a INT); +INSERT INTO t25 VALUES (25); +CREATE TABLE t24 (a INT); +INSERT INTO t24 VALUES (24); +CREATE TABLE t23 (a INT); +INSERT INTO t23 VALUES (23); +CREATE TABLE t22 (a INT); +INSERT INTO t22 VALUES (22); +CREATE TABLE t21 (a INT); +INSERT INTO t21 VALUES (21); +CREATE TABLE t20 (a INT); +INSERT INTO t20 VALUES (20); +CREATE TABLE t19 (a INT); +INSERT INTO t19 VALUES (19); +CREATE TABLE t18 (a INT); +INSERT INTO t18 VALUES (18); +CREATE TABLE t17 (a INT); +INSERT INTO t17 VALUES (17); +CREATE TABLE t16 (a INT); +INSERT INTO t16 VALUES (16); +CREATE TABLE t15 (a INT); +INSERT INTO t15 VALUES (15); +CREATE TABLE t14 (a INT); +INSERT INTO t14 VALUES (14); +CREATE TABLE t13 (a INT); +INSERT INTO t13 VALUES (13); +CREATE TABLE t12 (a INT); +INSERT INTO t12 VALUES (12); +CREATE TABLE t11 (a INT); +INSERT INTO t11 VALUES (11); +CREATE TABLE t10 (a INT); +INSERT INTO t10 VALUES (10); +CREATE TABLE t9 (a INT); +INSERT INTO t9 VALUES (9); +CREATE TABLE t8 (a INT); +INSERT INTO t8 VALUES (8); +CREATE TABLE t7 (a INT); +INSERT INTO t7 VALUES (7); +CREATE TABLE t6 (a INT); +INSERT INTO t6 VALUES (6); +CREATE TABLE t5 (a INT); +INSERT INTO t5 VALUES (5); +CREATE TABLE t4 (a INT); +INSERT INTO t4 VALUES (4); +CREATE TABLE t3 (a INT); +INSERT INTO t3 VALUES (3); +CREATE TABLE t2 (a INT); +INSERT INTO t2 VALUES (2); +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1); +CREATE TABLE t0 (a INT) ENGINE=MERGE UNION(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80,t81,t82,t83,t84,t85,t86,t87,t88,t89,t90,t91,t92,t93,t94,t95,t96,t97,t98,t99,t100,t101,t102,t103,t104,t105,t106,t107,t108,t109,t110,t111,t112,t113,t114,t115,t116,t117,t118,t119,t120,t121,t122,t123,t124,t125,t126,t127,t128,t129,t130,t131,t132,t133,t134,t135,t136,t137,t138,t139,t140,t141,t142,t143,t144,t145,t146,t147,t148,t149,t150,t151,t152,t153,t154,t155,t156,t157,t158,t159,t160,t161,t162,t163,t164,t165,t166,t167,t168,t169,t170,t171,t172,t173,t174,t175,t176,t177,t178,t179,t180,t181,t182,t183,t184,t185,t186,t187,t188,t189,t190,t191,t192,t193,t194,t195,t196,t197,t198,t199,t200,t201,t202,t203,t204,t205,t206,t207,t208,t209,t210,t211,t212,t213,t214,t215,t216,t217,t218,t219,t220,t221,t222,t223,t224,t225,t226,t227,t228,t229,t230,t231,t232,t233,t234,t235,t236,t237,t238,t239,t240,t241,t242,t243,t244,t245,t246,t247,t248,t249,t250,t251,t252,t253,t254,t255); +SET GLOBAL query_cache_size = 1048576; +FLUSH STATUS; +SELECT a FROM t0 WHERE a = 1; +a +1 +SHOW STATUS LIKE "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 1 +TRUNCATE TABLE t255; +SELECT a FROM t1; +a +1 +TRUNCATE TABLE t254; +SELECT a FROM t2; +a +2 +TRUNCATE TABLE t253; +SELECT a FROM t3; +a +3 +TRUNCATE TABLE t252; +SELECT a FROM t4; +a +4 +TRUNCATE TABLE t251; +SELECT a FROM t5; +a +5 +TRUNCATE TABLE t250; +SELECT a FROM t6; +a +6 +TRUNCATE TABLE t249; +SELECT a FROM t7; +a +7 +TRUNCATE TABLE t248; +SELECT a FROM t8; +a +8 +TRUNCATE TABLE t247; +SELECT a FROM t9; +a +9 +TRUNCATE TABLE t246; +SELECT a FROM t10; +a +10 +TRUNCATE TABLE t245; +SELECT a FROM t11; +a +11 +TRUNCATE TABLE t244; +SELECT a FROM t12; +a +12 +TRUNCATE TABLE t243; +SELECT a FROM t13; +a +13 +TRUNCATE TABLE t242; +SELECT a FROM t14; +a +14 +TRUNCATE TABLE t241; +SELECT a FROM t15; +a +15 +TRUNCATE TABLE t240; +SELECT a FROM t16; +a +16 +TRUNCATE TABLE t239; +SELECT a FROM t17; +a +17 +TRUNCATE TABLE t238; +SELECT a FROM t18; +a +18 +TRUNCATE TABLE t237; +SELECT a FROM t19; +a +19 +TRUNCATE TABLE t236; +SELECT a FROM t20; +a +20 +TRUNCATE TABLE t235; +SELECT a FROM t21; +a +21 +TRUNCATE TABLE t234; +SELECT a FROM t22; +a +22 +TRUNCATE TABLE t233; +SELECT a FROM t23; +a +23 +TRUNCATE TABLE t232; +SELECT a FROM t24; +a +24 +TRUNCATE TABLE t231; +SELECT a FROM t25; +a +25 +TRUNCATE TABLE t230; +SELECT a FROM t26; +a +26 +TRUNCATE TABLE t229; +SELECT a FROM t27; +a +27 +TRUNCATE TABLE t228; +SELECT a FROM t28; +a +28 +TRUNCATE TABLE t227; +SELECT a FROM t29; +a +29 +TRUNCATE TABLE t226; +SELECT a FROM t30; +a +30 +TRUNCATE TABLE t225; +SELECT a FROM t31; +a +31 +TRUNCATE TABLE t224; +SELECT a FROM t32; +a +32 +TRUNCATE TABLE t223; +SELECT a FROM t33; +a +33 +TRUNCATE TABLE t222; +SELECT a FROM t34; +a +34 +TRUNCATE TABLE t221; +SELECT a FROM t35; +a +35 +TRUNCATE TABLE t220; +SELECT a FROM t36; +a +36 +TRUNCATE TABLE t219; +SELECT a FROM t37; +a +37 +TRUNCATE TABLE t218; +SELECT a FROM t38; +a +38 +TRUNCATE TABLE t217; +SELECT a FROM t39; +a +39 +TRUNCATE TABLE t216; +SELECT a FROM t40; +a +40 +TRUNCATE TABLE t215; +SELECT a FROM t41; +a +41 +TRUNCATE TABLE t214; +SELECT a FROM t42; +a +42 +TRUNCATE TABLE t213; +SELECT a FROM t43; +a +43 +TRUNCATE TABLE t212; +SELECT a FROM t44; +a +44 +TRUNCATE TABLE t211; +SELECT a FROM t45; +a +45 +TRUNCATE TABLE t210; +SELECT a FROM t46; +a +46 +TRUNCATE TABLE t209; +SELECT a FROM t47; +a +47 +TRUNCATE TABLE t208; +SELECT a FROM t48; +a +48 +TRUNCATE TABLE t207; +SELECT a FROM t49; +a +49 +TRUNCATE TABLE t206; +SELECT a FROM t50; +a +50 +TRUNCATE TABLE t205; +SELECT a FROM t51; +a +51 +TRUNCATE TABLE t204; +SELECT a FROM t52; +a +52 +TRUNCATE TABLE t203; +SELECT a FROM t53; +a +53 +TRUNCATE TABLE t202; +SELECT a FROM t54; +a +54 +TRUNCATE TABLE t201; +SELECT a FROM t55; +a +55 +TRUNCATE TABLE t200; +SELECT a FROM t56; +a +56 +TRUNCATE TABLE t199; +SELECT a FROM t57; +a +57 +TRUNCATE TABLE t198; +SELECT a FROM t58; +a +58 +TRUNCATE TABLE t197; +SELECT a FROM t59; +a +59 +TRUNCATE TABLE t196; +SELECT a FROM t60; +a +60 +TRUNCATE TABLE t195; +SELECT a FROM t61; +a +61 +TRUNCATE TABLE t194; +SELECT a FROM t62; +a +62 +TRUNCATE TABLE t193; +SELECT a FROM t63; +a +63 +TRUNCATE TABLE t192; +SELECT a FROM t64; +a +64 +TRUNCATE TABLE t191; +SELECT a FROM t65; +a +65 +TRUNCATE TABLE t190; +SELECT a FROM t66; +a +66 +TRUNCATE TABLE t189; +SELECT a FROM t67; +a +67 +TRUNCATE TABLE t188; +SELECT a FROM t68; +a +68 +TRUNCATE TABLE t187; +SELECT a FROM t69; +a +69 +TRUNCATE TABLE t186; +SELECT a FROM t70; +a +70 +TRUNCATE TABLE t185; +SELECT a FROM t71; +a +71 +TRUNCATE TABLE t184; +SELECT a FROM t72; +a +72 +TRUNCATE TABLE t183; +SELECT a FROM t73; +a +73 +TRUNCATE TABLE t182; +SELECT a FROM t74; +a +74 +TRUNCATE TABLE t181; +SELECT a FROM t75; +a +75 +TRUNCATE TABLE t180; +SELECT a FROM t76; +a +76 +TRUNCATE TABLE t179; +SELECT a FROM t77; +a +77 +TRUNCATE TABLE t178; +SELECT a FROM t78; +a +78 +TRUNCATE TABLE t177; +SELECT a FROM t79; +a +79 +TRUNCATE TABLE t176; +SELECT a FROM t80; +a +80 +TRUNCATE TABLE t175; +SELECT a FROM t81; +a +81 +TRUNCATE TABLE t174; +SELECT a FROM t82; +a +82 +TRUNCATE TABLE t173; +SELECT a FROM t83; +a +83 +TRUNCATE TABLE t172; +SELECT a FROM t84; +a +84 +TRUNCATE TABLE t171; +SELECT a FROM t85; +a +85 +TRUNCATE TABLE t170; +SELECT a FROM t86; +a +86 +TRUNCATE TABLE t169; +SELECT a FROM t87; +a +87 +TRUNCATE TABLE t168; +SELECT a FROM t88; +a +88 +TRUNCATE TABLE t167; +SELECT a FROM t89; +a +89 +TRUNCATE TABLE t166; +SELECT a FROM t90; +a +90 +TRUNCATE TABLE t165; +SELECT a FROM t91; +a +91 +TRUNCATE TABLE t164; +SELECT a FROM t92; +a +92 +TRUNCATE TABLE t163; +SELECT a FROM t93; +a +93 +TRUNCATE TABLE t162; +SELECT a FROM t94; +a +94 +TRUNCATE TABLE t161; +SELECT a FROM t95; +a +95 +TRUNCATE TABLE t160; +SELECT a FROM t96; +a +96 +TRUNCATE TABLE t159; +SELECT a FROM t97; +a +97 +TRUNCATE TABLE t158; +SELECT a FROM t98; +a +98 +TRUNCATE TABLE t157; +SELECT a FROM t99; +a +99 +TRUNCATE TABLE t156; +SELECT a FROM t100; +a +100 +TRUNCATE TABLE t155; +SELECT a FROM t101; +a +101 +TRUNCATE TABLE t154; +SELECT a FROM t102; +a +102 +TRUNCATE TABLE t153; +SELECT a FROM t103; +a +103 +TRUNCATE TABLE t152; +SELECT a FROM t104; +a +104 +TRUNCATE TABLE t151; +SELECT a FROM t105; +a +105 +TRUNCATE TABLE t150; +SELECT a FROM t106; +a +106 +TRUNCATE TABLE t149; +SELECT a FROM t107; +a +107 +TRUNCATE TABLE t148; +SELECT a FROM t108; +a +108 +TRUNCATE TABLE t147; +SELECT a FROM t109; +a +109 +TRUNCATE TABLE t146; +SELECT a FROM t110; +a +110 +TRUNCATE TABLE t145; +SELECT a FROM t111; +a +111 +TRUNCATE TABLE t144; +SELECT a FROM t112; +a +112 +TRUNCATE TABLE t143; +SELECT a FROM t113; +a +113 +TRUNCATE TABLE t142; +SELECT a FROM t114; +a +114 +TRUNCATE TABLE t141; +SELECT a FROM t115; +a +115 +TRUNCATE TABLE t140; +SELECT a FROM t116; +a +116 +TRUNCATE TABLE t139; +SELECT a FROM t117; +a +117 +TRUNCATE TABLE t138; +SELECT a FROM t118; +a +118 +TRUNCATE TABLE t137; +SELECT a FROM t119; +a +119 +TRUNCATE TABLE t136; +SELECT a FROM t120; +a +120 +TRUNCATE TABLE t135; +SELECT a FROM t121; +a +121 +TRUNCATE TABLE t134; +SELECT a FROM t122; +a +122 +TRUNCATE TABLE t133; +SELECT a FROM t123; +a +123 +TRUNCATE TABLE t132; +SELECT a FROM t124; +a +124 +TRUNCATE TABLE t131; +SELECT a FROM t125; +a +125 +TRUNCATE TABLE t130; +SELECT a FROM t126; +a +126 +TRUNCATE TABLE t129; +SELECT a FROM t127; +a +127 +TRUNCATE TABLE t128; +SELECT a FROM t128; +a +TRUNCATE TABLE t127; +SELECT a FROM t129; +a +TRUNCATE TABLE t126; +SELECT a FROM t130; +a +TRUNCATE TABLE t125; +SELECT a FROM t131; +a +TRUNCATE TABLE t124; +SELECT a FROM t132; +a +TRUNCATE TABLE t123; +SELECT a FROM t133; +a +TRUNCATE TABLE t122; +SELECT a FROM t134; +a +TRUNCATE TABLE t121; +SELECT a FROM t135; +a +TRUNCATE TABLE t120; +SELECT a FROM t136; +a +TRUNCATE TABLE t119; +SELECT a FROM t137; +a +TRUNCATE TABLE t118; +SELECT a FROM t138; +a +TRUNCATE TABLE t117; +SELECT a FROM t139; +a +TRUNCATE TABLE t116; +SELECT a FROM t140; +a +TRUNCATE TABLE t115; +SELECT a FROM t141; +a +TRUNCATE TABLE t114; +SELECT a FROM t142; +a +TRUNCATE TABLE t113; +SELECT a FROM t143; +a +TRUNCATE TABLE t112; +SELECT a FROM t144; +a +TRUNCATE TABLE t111; +SELECT a FROM t145; +a +TRUNCATE TABLE t110; +SELECT a FROM t146; +a +TRUNCATE TABLE t109; +SELECT a FROM t147; +a +TRUNCATE TABLE t108; +SELECT a FROM t148; +a +TRUNCATE TABLE t107; +SELECT a FROM t149; +a +TRUNCATE TABLE t106; +SELECT a FROM t150; +a +TRUNCATE TABLE t105; +SELECT a FROM t151; +a +TRUNCATE TABLE t104; +SELECT a FROM t152; +a +TRUNCATE TABLE t103; +SELECT a FROM t153; +a +TRUNCATE TABLE t102; +SELECT a FROM t154; +a +TRUNCATE TABLE t101; +SELECT a FROM t155; +a +TRUNCATE TABLE t100; +SELECT a FROM t156; +a +TRUNCATE TABLE t99; +SELECT a FROM t157; +a +TRUNCATE TABLE t98; +SELECT a FROM t158; +a +TRUNCATE TABLE t97; +SELECT a FROM t159; +a +TRUNCATE TABLE t96; +SELECT a FROM t160; +a +TRUNCATE TABLE t95; +SELECT a FROM t161; +a +TRUNCATE TABLE t94; +SELECT a FROM t162; +a +TRUNCATE TABLE t93; +SELECT a FROM t163; +a +TRUNCATE TABLE t92; +SELECT a FROM t164; +a +TRUNCATE TABLE t91; +SELECT a FROM t165; +a +TRUNCATE TABLE t90; +SELECT a FROM t166; +a +TRUNCATE TABLE t89; +SELECT a FROM t167; +a +TRUNCATE TABLE t88; +SELECT a FROM t168; +a +TRUNCATE TABLE t87; +SELECT a FROM t169; +a +TRUNCATE TABLE t86; +SELECT a FROM t170; +a +TRUNCATE TABLE t85; +SELECT a FROM t171; +a +TRUNCATE TABLE t84; +SELECT a FROM t172; +a +TRUNCATE TABLE t83; +SELECT a FROM t173; +a +TRUNCATE TABLE t82; +SELECT a FROM t174; +a +TRUNCATE TABLE t81; +SELECT a FROM t175; +a +TRUNCATE TABLE t80; +SELECT a FROM t176; +a +TRUNCATE TABLE t79; +SELECT a FROM t177; +a +TRUNCATE TABLE t78; +SELECT a FROM t178; +a +TRUNCATE TABLE t77; +SELECT a FROM t179; +a +TRUNCATE TABLE t76; +SELECT a FROM t180; +a +TRUNCATE TABLE t75; +SELECT a FROM t181; +a +TRUNCATE TABLE t74; +SELECT a FROM t182; +a +TRUNCATE TABLE t73; +SELECT a FROM t183; +a +TRUNCATE TABLE t72; +SELECT a FROM t184; +a +TRUNCATE TABLE t71; +SELECT a FROM t185; +a +TRUNCATE TABLE t70; +SELECT a FROM t186; +a +TRUNCATE TABLE t69; +SELECT a FROM t187; +a +TRUNCATE TABLE t68; +SELECT a FROM t188; +a +TRUNCATE TABLE t67; +SELECT a FROM t189; +a +TRUNCATE TABLE t66; +SELECT a FROM t190; +a +TRUNCATE TABLE t65; +SELECT a FROM t191; +a +TRUNCATE TABLE t64; +SELECT a FROM t192; +a +TRUNCATE TABLE t63; +SELECT a FROM t193; +a +TRUNCATE TABLE t62; +SELECT a FROM t194; +a +TRUNCATE TABLE t61; +SELECT a FROM t195; +a +TRUNCATE TABLE t60; +SELECT a FROM t196; +a +TRUNCATE TABLE t59; +SELECT a FROM t197; +a +TRUNCATE TABLE t58; +SELECT a FROM t198; +a +TRUNCATE TABLE t57; +SELECT a FROM t199; +a +TRUNCATE TABLE t56; +SELECT a FROM t200; +a +TRUNCATE TABLE t55; +SELECT a FROM t201; +a +TRUNCATE TABLE t54; +SELECT a FROM t202; +a +TRUNCATE TABLE t53; +SELECT a FROM t203; +a +TRUNCATE TABLE t52; +SELECT a FROM t204; +a +TRUNCATE TABLE t51; +SELECT a FROM t205; +a +TRUNCATE TABLE t50; +SELECT a FROM t206; +a +TRUNCATE TABLE t49; +SELECT a FROM t207; +a +TRUNCATE TABLE t48; +SELECT a FROM t208; +a +TRUNCATE TABLE t47; +SELECT a FROM t209; +a +TRUNCATE TABLE t46; +SELECT a FROM t210; +a +TRUNCATE TABLE t45; +SELECT a FROM t211; +a +TRUNCATE TABLE t44; +SELECT a FROM t212; +a +TRUNCATE TABLE t43; +SELECT a FROM t213; +a +TRUNCATE TABLE t42; +SELECT a FROM t214; +a +TRUNCATE TABLE t41; +SELECT a FROM t215; +a +TRUNCATE TABLE t40; +SELECT a FROM t216; +a +TRUNCATE TABLE t39; +SELECT a FROM t217; +a +TRUNCATE TABLE t38; +SELECT a FROM t218; +a +TRUNCATE TABLE t37; +SELECT a FROM t219; +a +TRUNCATE TABLE t36; +SELECT a FROM t220; +a +TRUNCATE TABLE t35; +SELECT a FROM t221; +a +TRUNCATE TABLE t34; +SELECT a FROM t222; +a +TRUNCATE TABLE t33; +SELECT a FROM t223; +a +TRUNCATE TABLE t32; +SELECT a FROM t224; +a +TRUNCATE TABLE t31; +SELECT a FROM t225; +a +TRUNCATE TABLE t30; +SELECT a FROM t226; +a +TRUNCATE TABLE t29; +SELECT a FROM t227; +a +TRUNCATE TABLE t28; +SELECT a FROM t228; +a +TRUNCATE TABLE t27; +SELECT a FROM t229; +a +TRUNCATE TABLE t26; +SELECT a FROM t230; +a +TRUNCATE TABLE t25; +SELECT a FROM t231; +a +TRUNCATE TABLE t24; +SELECT a FROM t232; +a +TRUNCATE TABLE t23; +SELECT a FROM t233; +a +TRUNCATE TABLE t22; +SELECT a FROM t234; +a +TRUNCATE TABLE t21; +SELECT a FROM t235; +a +TRUNCATE TABLE t20; +SELECT a FROM t236; +a +TRUNCATE TABLE t19; +SELECT a FROM t237; +a +TRUNCATE TABLE t18; +SELECT a FROM t238; +a +TRUNCATE TABLE t17; +SELECT a FROM t239; +a +TRUNCATE TABLE t16; +SELECT a FROM t240; +a +TRUNCATE TABLE t15; +SELECT a FROM t241; +a +TRUNCATE TABLE t14; +SELECT a FROM t242; +a +TRUNCATE TABLE t13; +SELECT a FROM t243; +a +TRUNCATE TABLE t12; +SELECT a FROM t244; +a +TRUNCATE TABLE t11; +SELECT a FROM t245; +a +TRUNCATE TABLE t10; +SELECT a FROM t246; +a +TRUNCATE TABLE t9; +SELECT a FROM t247; +a +TRUNCATE TABLE t8; +SELECT a FROM t248; +a +TRUNCATE TABLE t7; +SELECT a FROM t249; +a +TRUNCATE TABLE t6; +SELECT a FROM t250; +a +TRUNCATE TABLE t5; +SELECT a FROM t251; +a +TRUNCATE TABLE t4; +SELECT a FROM t252; +a +TRUNCATE TABLE t3; +SELECT a FROM t253; +a +TRUNCATE TABLE t2; +SELECT a FROM t254; +a +TRUNCATE TABLE t1; +SELECT a FROM t255; +a +SELECT a FROM t0; +a +DROP TABLE t0; +DROP TABLE t255; +DROP TABLE t254; +DROP TABLE t253; +DROP TABLE t252; +DROP TABLE t251; +DROP TABLE t250; +DROP TABLE t249; +DROP TABLE t248; +DROP TABLE t247; +DROP TABLE t246; +DROP TABLE t245; +DROP TABLE t244; +DROP TABLE t243; +DROP TABLE t242; +DROP TABLE t241; +DROP TABLE t240; +DROP TABLE t239; +DROP TABLE t238; +DROP TABLE t237; +DROP TABLE t236; +DROP TABLE t235; +DROP TABLE t234; +DROP TABLE t233; +DROP TABLE t232; +DROP TABLE t231; +DROP TABLE t230; +DROP TABLE t229; +DROP TABLE t228; +DROP TABLE t227; +DROP TABLE t226; +DROP TABLE t225; +DROP TABLE t224; +DROP TABLE t223; +DROP TABLE t222; +DROP TABLE t221; +DROP TABLE t220; +DROP TABLE t219; +DROP TABLE t218; +DROP TABLE t217; +DROP TABLE t216; +DROP TABLE t215; +DROP TABLE t214; +DROP TABLE t213; +DROP TABLE t212; +DROP TABLE t211; +DROP TABLE t210; +DROP TABLE t209; +DROP TABLE t208; +DROP TABLE t207; +DROP TABLE t206; +DROP TABLE t205; +DROP TABLE t204; +DROP TABLE t203; +DROP TABLE t202; +DROP TABLE t201; +DROP TABLE t200; +DROP TABLE t199; +DROP TABLE t198; +DROP TABLE t197; +DROP TABLE t196; +DROP TABLE t195; +DROP TABLE t194; +DROP TABLE t193; +DROP TABLE t192; +DROP TABLE t191; +DROP TABLE t190; +DROP TABLE t189; +DROP TABLE t188; +DROP TABLE t187; +DROP TABLE t186; +DROP TABLE t185; +DROP TABLE t184; +DROP TABLE t183; +DROP TABLE t182; +DROP TABLE t181; +DROP TABLE t180; +DROP TABLE t179; +DROP TABLE t178; +DROP TABLE t177; +DROP TABLE t176; +DROP TABLE t175; +DROP TABLE t174; +DROP TABLE t173; +DROP TABLE t172; +DROP TABLE t171; +DROP TABLE t170; +DROP TABLE t169; +DROP TABLE t168; +DROP TABLE t167; +DROP TABLE t166; +DROP TABLE t165; +DROP TABLE t164; +DROP TABLE t163; +DROP TABLE t162; +DROP TABLE t161; +DROP TABLE t160; +DROP TABLE t159; +DROP TABLE t158; +DROP TABLE t157; +DROP TABLE t156; +DROP TABLE t155; +DROP TABLE t154; +DROP TABLE t153; +DROP TABLE t152; +DROP TABLE t151; +DROP TABLE t150; +DROP TABLE t149; +DROP TABLE t148; +DROP TABLE t147; +DROP TABLE t146; +DROP TABLE t145; +DROP TABLE t144; +DROP TABLE t143; +DROP TABLE t142; +DROP TABLE t141; +DROP TABLE t140; +DROP TABLE t139; +DROP TABLE t138; +DROP TABLE t137; +DROP TABLE t136; +DROP TABLE t135; +DROP TABLE t134; +DROP TABLE t133; +DROP TABLE t132; +DROP TABLE t131; +DROP TABLE t130; +DROP TABLE t129; +DROP TABLE t128; +DROP TABLE t127; +DROP TABLE t126; +DROP TABLE t125; +DROP TABLE t124; +DROP TABLE t123; +DROP TABLE t122; +DROP TABLE t121; +DROP TABLE t120; +DROP TABLE t119; +DROP TABLE t118; +DROP TABLE t117; +DROP TABLE t116; +DROP TABLE t115; +DROP TABLE t114; +DROP TABLE t113; +DROP TABLE t112; +DROP TABLE t111; +DROP TABLE t110; +DROP TABLE t109; +DROP TABLE t108; +DROP TABLE t107; +DROP TABLE t106; +DROP TABLE t105; +DROP TABLE t104; +DROP TABLE t103; +DROP TABLE t102; +DROP TABLE t101; +DROP TABLE t100; +DROP TABLE t99; +DROP TABLE t98; +DROP TABLE t97; +DROP TABLE t96; +DROP TABLE t95; +DROP TABLE t94; +DROP TABLE t93; +DROP TABLE t92; +DROP TABLE t91; +DROP TABLE t90; +DROP TABLE t89; +DROP TABLE t88; +DROP TABLE t87; +DROP TABLE t86; +DROP TABLE t85; +DROP TABLE t84; +DROP TABLE t83; +DROP TABLE t82; +DROP TABLE t81; +DROP TABLE t80; +DROP TABLE t79; +DROP TABLE t78; +DROP TABLE t77; +DROP TABLE t76; +DROP TABLE t75; +DROP TABLE t74; +DROP TABLE t73; +DROP TABLE t72; +DROP TABLE t71; +DROP TABLE t70; +DROP TABLE t69; +DROP TABLE t68; +DROP TABLE t67; +DROP TABLE t66; +DROP TABLE t65; +DROP TABLE t64; +DROP TABLE t63; +DROP TABLE t62; +DROP TABLE t61; +DROP TABLE t60; +DROP TABLE t59; +DROP TABLE t58; +DROP TABLE t57; +DROP TABLE t56; +DROP TABLE t55; +DROP TABLE t54; +DROP TABLE t53; +DROP TABLE t52; +DROP TABLE t51; +DROP TABLE t50; +DROP TABLE t49; +DROP TABLE t48; +DROP TABLE t47; +DROP TABLE t46; +DROP TABLE t45; +DROP TABLE t44; +DROP TABLE t43; +DROP TABLE t42; +DROP TABLE t41; +DROP TABLE t40; +DROP TABLE t39; +DROP TABLE t38; +DROP TABLE t37; +DROP TABLE t36; +DROP TABLE t35; +DROP TABLE t34; +DROP TABLE t33; +DROP TABLE t32; +DROP TABLE t31; +DROP TABLE t30; +DROP TABLE t29; +DROP TABLE t28; +DROP TABLE t27; +DROP TABLE t26; +DROP TABLE t25; +DROP TABLE t24; +DROP TABLE t23; +DROP TABLE t22; +DROP TABLE t21; +DROP TABLE t20; +DROP TABLE t19; +DROP TABLE t18; +DROP TABLE t17; +DROP TABLE t16; +DROP TABLE t15; +DROP TABLE t14; +DROP TABLE t13; +DROP TABLE t12; +DROP TABLE t11; +DROP TABLE t10; +DROP TABLE t9; +DROP TABLE t8; +DROP TABLE t7; +DROP TABLE t6; +DROP TABLE t5; +DROP TABLE t4; +DROP TABLE t3; +DROP TABLE t2; +DROP TABLE t1; +SET @@global.query_cache_size = 0; +SET @@global.table_definition_cache = @save_table_definition_cache; +End of 5.1 tests diff --git a/mysql-test/t/query_cache_merge.test b/mysql-test/t/query_cache_merge.test index 5247d29a83c..4e25bc3ed14 100644 --- a/mysql-test/t/query_cache_merge.test +++ b/mysql-test/t/query_cache_merge.test @@ -48,3 +48,61 @@ SET @@global.query_cache_size=0; set @@global.table_definition_cache=@save_table_definition_cache; # End of 4.1 tests + +# +# Bug#33362: Query cache invalidation (truncate) may hang if cached query uses many tables +# + +SET @save_table_definition_cache = @@global.table_definition_cache; +SET @@global.table_definition_cache = 512; + +let $c= 255; + +while ($c) +{ + eval CREATE TABLE t$c (a INT); + eval INSERT INTO t$c VALUES ($c); + dec $c; +} + +let $c= 254; +let $str= t255; + +while ($c) +{ + let $str= t$c,$str; + dec $c; +} + +eval CREATE TABLE t0 (a INT) ENGINE=MERGE UNION($str); +SET GLOBAL query_cache_size = 1048576; +FLUSH STATUS; +SELECT a FROM t0 WHERE a = 1; +SHOW STATUS LIKE "Qcache_queries_in_cache"; + +let $c= 255; +let $i= 1; + +while ($c) +{ + eval TRUNCATE TABLE t$c; + eval SELECT a FROM t$i; + dec $c; + inc $i; +} + +SELECT a FROM t0; +DROP TABLE t0; + +let $c= 255; + +while ($c) +{ + eval DROP TABLE t$c; + dec $c; +} + +SET @@global.query_cache_size = 0; +SET @@global.table_definition_cache = @save_table_definition_cache; + +--echo End of 5.1 tests diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc index 388700f0efa..375ffc882b4 100644 --- a/sql/sql_cache.cc +++ b/sql/sql_cache.cc @@ -2746,7 +2746,7 @@ my_bool Query_cache::register_all_tables(Query_cache_block *block, tmp++) unlink_table(tmp); } - return (n); + return test(n); } From 58f30a5886c117c9123986a3452364422ef395dd Mon Sep 17 00:00:00 2001 From: Mattias Jonsson Date: Mon, 9 Jun 2008 14:39:20 +0200 Subject: [PATCH 16/46] Bug#31210: INSERT DELAYED crashes server when used on partitioned tables post push patch push build found tree failing test when using: --ps-protocol --mysqld=--binlog-format=row Changed to the new error message. sql/sql_prepare.cc: Bug#31210: INSERT DELAYED crashes server when used on partitioned tables Changed to the newly added error message --- sql/sql_prepare.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index ca72d1c1613..73ab28a233c 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -1154,9 +1154,9 @@ static bool mysql_test_insert(Prepared_statement *stmt, if (table_list->lock_type == TL_WRITE_DELAYED && !(table_list->table->file->ha_table_flags() & HA_CAN_INSERT_DELAYED)) { - my_error(ER_ILLEGAL_HA, MYF(0), (table_list->view ? - table_list->view_name.str : - table_list->table_name)); + my_error(ER_DELAYED_NOT_SUPPORTED, MYF(0), (table_list->view ? + table_list->view_name.str : + table_list->table_name)); goto error; } while ((values= its++)) From dd64a86af41b0ad9f7f0d32071eb54921bd99ab2 Mon Sep 17 00:00:00 2001 From: mysqldev Date: Tue, 10 Jun 2008 14:25:21 +0200 Subject: [PATCH 17/46] Raise version number after cloning 5.0.64 --- configure.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in index db14982840d..247a17da940 100644 --- a/configure.in +++ b/configure.in @@ -7,7 +7,7 @@ AC_INIT(sql/mysqld.cc) AC_CANONICAL_SYSTEM # The Docs Makefile.am parses this line! # remember to also change ndb version below and update version.c in ndb -AM_INIT_AUTOMAKE(mysql, 5.0.64) +AM_INIT_AUTOMAKE(mysql, 5.0.66) AM_CONFIG_HEADER([include/config.h:config.h.in]) PROTOCOL_VERSION=10 @@ -23,7 +23,7 @@ NDB_SHARED_LIB_VERSION=$NDB_SHARED_LIB_MAJOR_VERSION:0:0 # ndb version NDB_VERSION_MAJOR=5 NDB_VERSION_MINOR=0 -NDB_VERSION_BUILD=64 +NDB_VERSION_BUILD=66 NDB_VERSION_STATUS="" # Set all version vars based on $VERSION. How do we do this more elegant ? From 3c2cb27162265f0888d9ad9b4a4853246f1a4521 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 13 Jun 2008 14:47:24 +0200 Subject: [PATCH 18/46] No change - hack to force BZR conversion From ca7defedd2ece078efad63b54ea07ddffaec6dec Mon Sep 17 00:00:00 2001 From: Hakan Kuecuekyilmaz Date: Mon, 16 Jun 2008 10:04:00 +0200 Subject: [PATCH 19/46] Fix for Bug#16902. mysys/errors.c: Fixed typo, Bug#16902. --- mysys/errors.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysys/errors.c b/mysys/errors.c index 889cf6d7fe3..537a75c6ef3 100644 --- a/mysys/errors.c +++ b/mysys/errors.c @@ -75,7 +75,7 @@ void init_glob_errs() EE(EE_STAT) = "Can't get stat of '%s' (Errcode: %d)"; EE(EE_CANT_CHSIZE) = "Can't change size of file (Errcode: %d)"; EE(EE_CANT_OPEN_STREAM)= "Can't open stream from handle (Errcode: %d)"; - EE(EE_GETWD) = "Can't get working dirctory (Errcode: %d)"; + EE(EE_GETWD) = "Can't get working directory (Errcode: %d)"; EE(EE_SETWD) = "Can't change dir to '%s' (Errcode: %d)"; EE(EE_LINK_WARNING) = "Warning: '%s' had %d links"; EE(EE_OPEN_WARNING) = "Warning: %d files and %d streams is left open\n"; From f3a81ef408714cf36103edd81e84f55169cfabce Mon Sep 17 00:00:00 2001 From: Hakan Kuecuekyilmaz Date: Mon, 16 Jun 2008 10:05:00 +0200 Subject: [PATCH 20/46] Fix for Bug#16902. mysys/errors.c: Fixed typo, Bug#16902. --- mysys/errors.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysys/errors.c b/mysys/errors.c index 857de1325d4..1c13255a616 100644 --- a/mysys/errors.c +++ b/mysys/errors.c @@ -74,7 +74,7 @@ void init_glob_errs() EE(EE_STAT) = "Can't get stat of '%s' (Errcode: %d)"; EE(EE_CANT_CHSIZE) = "Can't change size of file (Errcode: %d)"; EE(EE_CANT_OPEN_STREAM)= "Can't open stream from handle (Errcode: %d)"; - EE(EE_GETWD) = "Can't get working dirctory (Errcode: %d)"; + EE(EE_GETWD) = "Can't get working directory (Errcode: %d)"; EE(EE_SETWD) = "Can't change dir to '%s' (Errcode: %d)"; EE(EE_LINK_WARNING) = "Warning: '%s' had %d links"; EE(EE_OPEN_WARNING) = "%d files and %d streams is left open\n"; From 28f9704737def200d6e608bce07cf2d437cc872e Mon Sep 17 00:00:00 2001 From: "Matthias Leich mleich@mysql.com" Date: Mon, 16 Jun 2008 20:39:58 +0200 Subject: [PATCH 21/46] Fix for Bug#37167 funcs_1: Many tests fail if the embedded server is used. Bug#37164 funcs_1: Some tests fail if an optional character set is missing. + some cleanup within the testsuite related to the fixes above + some adjustments to open bugs on Mac OS X Details: - Remove the initial loading of data from tests if these data are not somewhere retrieved - Remove any use of columns with attribute unicode (-> UCS2 is no more needed) from tests where unicode properties are not checked or somehow required - Create a separate branch of the Character maximum length test (CML). If UCS2 is available than this test gets applied to every available type of string column with attribute unicode This prevents any loss of coverage by the points above. - Disable the execution of is_tables_ndb which gives wrong results because of a bug. Correct the exepected results of this test. - In case of tests failing when applied to the embedded server 1) Create a variant of this test for the embedded server or 2) Skip the test in case of embedded server depending on purpose and complexity of test. - Skip the tests which could suffer from Bug 28309 First insert violates unique constraint - was "memory" table empty ? Bug 37380 Test funcs_1.is_columns_myisam_embedded fails on OS X (both bugs Mac OS X, embedded server, MySQL 5.0 only) - Minor improvements like remove typos --- mysql-test/suite/funcs_1/datadict/columns.inc | 1 - .../funcs_1/datadict/is_key_column_usage.inc | 344 +++++ .../suite/funcs_1/datadict/is_routines.inc | 472 +++++++ .../suite/funcs_1/datadict/is_schemata.inc | 247 ++++ .../suite/funcs_1/datadict/is_tables.inc | 475 +++++++ .../suite/funcs_1/datadict/is_triggers.inc | 254 ++++ .../suite/funcs_1/datadict/is_views.inc | 306 +++++ mysql-test/suite/funcs_1/datadict/tables.inc | 55 + mysql-test/suite/funcs_1/datadict/tables1.inc | 15 +- mysql-test/suite/funcs_1/datadict/tables2.inc | 3 +- .../suite/funcs_1/include/bug28309_skip.inc | 13 + .../suite/funcs_1/include/innodb_tb1.inc | 2 +- .../suite/funcs_1/include/innodb_tb3.inc | 2 +- .../suite/funcs_1/include/innodb_tb4.inc | 6 +- .../suite/funcs_1/include/memory_tb4.inc | 6 +- .../suite/funcs_1/include/myisam_tb1.inc | 2 +- .../suite/funcs_1/include/myisam_tb3.inc | 2 +- .../suite/funcs_1/include/myisam_tb4.inc | 6 +- .../suite/funcs_1/r/innodb_trig_frkey.result | 152 +-- .../suite/funcs_1/r/is_cml_innodb.result | 97 ++ .../suite/funcs_1/r/is_cml_memory.result | 82 ++ .../suite/funcs_1/r/is_cml_myisam.result | 98 ++ mysql-test/suite/funcs_1/r/is_cml_ndb.result | 97 ++ .../suite/funcs_1/r/is_columns_innodb.result | 36 +- .../funcs_1/r/is_columns_is_embedded.result | 380 ++++++ .../suite/funcs_1/r/is_columns_memory.result | 21 +- .../suite/funcs_1/r/is_columns_myisam.result | 35 +- .../r/is_columns_myisam_embedded.result | 1214 +++++++++++++++++ .../r/is_columns_mysql_embedded.result | 361 +++++ .../r/is_key_column_usage_embedded.result | 372 +++++ .../funcs_1/r/is_routines_embedded.result | 620 +++++++++ .../funcs_1/r/is_schemata_embedded.result | 187 +++ .../r/is_statistics_mysql_embedded.result | 103 ++ ...is_table_constraints_mysql_embedded.result | 57 + .../suite/funcs_1/r/is_tables_embedded.result | 427 ++++++ .../suite/funcs_1/r/is_tables_innodb.result | 1032 +------------- .../suite/funcs_1/r/is_tables_is.result | 8 +- .../suite/funcs_1/r/is_tables_memory.result | 1020 +------------- .../suite/funcs_1/r/is_tables_myisam.result | 990 +------------- .../r/is_tables_myisam_embedded.result | 192 +++ .../suite/funcs_1/r/is_tables_mysql.result | 8 +- .../funcs_1/r/is_tables_mysql_embedded.result | 815 +++++++++++ .../suite/funcs_1/r/is_tables_ndb.result | 460 +------ .../funcs_1/r/is_triggers_embedded.result | 208 +++ .../suite/funcs_1/r/is_views_embedded.result | 241 ++++ .../funcs_1/storedproc/storedproc_06.inc | 6 +- .../funcs_1/storedproc/storedproc_10.inc | 6 +- mysql-test/suite/funcs_1/t/disabled.def | 1 + .../suite/funcs_1/t/innodb_trig_frkey.test | 6 - .../suite/funcs_1/t/is_basics_mixed.test | 13 + mysql-test/suite/funcs_1/t/is_cml_innodb.test | 41 + mysql-test/suite/funcs_1/t/is_cml_memory.test | 37 + mysql-test/suite/funcs_1/t/is_cml_myisam.test | 41 + mysql-test/suite/funcs_1/t/is_cml_ndb.test | 41 + .../suite/funcs_1/t/is_column_privileges.test | 4 +- .../t/is_column_privileges_is_mysql_test.test | 5 +- mysql-test/suite/funcs_1/t/is_columns.test | 4 +- .../suite/funcs_1/t/is_columns_innodb.test | 4 + mysql-test/suite/funcs_1/t/is_columns_is.test | 7 +- .../funcs_1/t/is_columns_is_embedded.test | 23 + .../suite/funcs_1/t/is_columns_memory.test | 4 + .../suite/funcs_1/t/is_columns_myisam.test | 5 +- .../funcs_1/t/is_columns_myisam_embedded.test | 30 + .../suite/funcs_1/t/is_columns_mysql.test | 5 + .../funcs_1/t/is_columns_mysql_embedded.test | 19 + .../suite/funcs_1/t/is_columns_ndb.test | 4 + .../suite/funcs_1/t/is_key_column_usage.test | 339 +---- .../t/is_key_column_usage_embedded.test | 20 + mysql-test/suite/funcs_1/t/is_routines.test | 466 +------ .../suite/funcs_1/t/is_routines_embedded.test | 20 + .../suite/funcs_1/t/is_schema_privileges.test | 4 +- .../t/is_schema_privileges_is_mysql_test.test | 5 +- mysql-test/suite/funcs_1/t/is_schemata.test | 241 +--- .../suite/funcs_1/t/is_schemata_embedded.test | 20 + .../funcs_1/t/is_schemata_is_mysql_test.test | 5 +- mysql-test/suite/funcs_1/t/is_statistics.test | 4 +- .../suite/funcs_1/t/is_statistics_mysql.test | 5 +- .../t/is_statistics_mysql_embedded.test | 19 + .../suite/funcs_1/t/is_table_constraints.test | 4 +- .../funcs_1/t/is_table_constraints_mysql.test | 5 +- .../is_table_constraints_mysql_embedded.test | 18 + .../suite/funcs_1/t/is_table_privileges.test | 4 +- mysql-test/suite/funcs_1/t/is_tables.test | 469 +------ .../suite/funcs_1/t/is_tables_embedded.test | 20 + .../suite/funcs_1/t/is_tables_innodb.test | 12 +- .../suite/funcs_1/t/is_tables_memory.test | 12 +- .../suite/funcs_1/t/is_tables_myisam.test | 13 +- .../funcs_1/t/is_tables_myisam_embedded.test | 22 + .../suite/funcs_1/t/is_tables_mysql.test | 5 +- .../funcs_1/t/is_tables_mysql_embedded.test | 18 + mysql-test/suite/funcs_1/t/is_tables_ndb.test | 24 +- mysql-test/suite/funcs_1/t/is_triggers.test | 248 +--- .../suite/funcs_1/t/is_triggers_embedded.test | 20 + .../suite/funcs_1/t/is_user_privileges.test | 4 +- mysql-test/suite/funcs_1/t/is_views.test | 300 +--- .../suite/funcs_1/t/is_views_embedded.test | 20 + .../suite/funcs_1/t/memory_trig_0102.test | 1 + .../suite/funcs_1/t/memory_trig_0407.test | 1 + .../suite/funcs_1/t/memory_trig_1011ext.test | 1 + mysql-test/suite/funcs_1/t/memory_views.test | 1 + .../suite/funcs_1/triggers/trig_frkey.inc | 127 +- .../suite/funcs_1/triggers/triggers_03.inc | 4 + mysql-test/suite/funcs_1/views/func_view.inc | 21 +- .../suite/funcs_1/views/views_master.inc | 2 +- 104 files changed, 8697 insertions(+), 5657 deletions(-) create mode 100644 mysql-test/suite/funcs_1/datadict/is_key_column_usage.inc create mode 100644 mysql-test/suite/funcs_1/datadict/is_routines.inc create mode 100644 mysql-test/suite/funcs_1/datadict/is_schemata.inc create mode 100644 mysql-test/suite/funcs_1/datadict/is_tables.inc create mode 100644 mysql-test/suite/funcs_1/datadict/is_triggers.inc create mode 100644 mysql-test/suite/funcs_1/datadict/is_views.inc create mode 100644 mysql-test/suite/funcs_1/datadict/tables.inc create mode 100644 mysql-test/suite/funcs_1/include/bug28309_skip.inc create mode 100644 mysql-test/suite/funcs_1/r/is_cml_innodb.result create mode 100644 mysql-test/suite/funcs_1/r/is_cml_memory.result create mode 100644 mysql-test/suite/funcs_1/r/is_cml_myisam.result create mode 100644 mysql-test/suite/funcs_1/r/is_cml_ndb.result create mode 100644 mysql-test/suite/funcs_1/r/is_columns_is_embedded.result create mode 100644 mysql-test/suite/funcs_1/r/is_columns_myisam_embedded.result create mode 100644 mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result create mode 100644 mysql-test/suite/funcs_1/r/is_key_column_usage_embedded.result create mode 100644 mysql-test/suite/funcs_1/r/is_routines_embedded.result create mode 100644 mysql-test/suite/funcs_1/r/is_schemata_embedded.result create mode 100644 mysql-test/suite/funcs_1/r/is_statistics_mysql_embedded.result create mode 100644 mysql-test/suite/funcs_1/r/is_table_constraints_mysql_embedded.result create mode 100644 mysql-test/suite/funcs_1/r/is_tables_embedded.result create mode 100644 mysql-test/suite/funcs_1/r/is_tables_myisam_embedded.result create mode 100644 mysql-test/suite/funcs_1/r/is_tables_mysql_embedded.result create mode 100644 mysql-test/suite/funcs_1/r/is_triggers_embedded.result create mode 100644 mysql-test/suite/funcs_1/r/is_views_embedded.result create mode 100644 mysql-test/suite/funcs_1/t/is_cml_innodb.test create mode 100644 mysql-test/suite/funcs_1/t/is_cml_memory.test create mode 100644 mysql-test/suite/funcs_1/t/is_cml_myisam.test create mode 100644 mysql-test/suite/funcs_1/t/is_cml_ndb.test create mode 100644 mysql-test/suite/funcs_1/t/is_columns_is_embedded.test create mode 100644 mysql-test/suite/funcs_1/t/is_columns_myisam_embedded.test create mode 100644 mysql-test/suite/funcs_1/t/is_columns_mysql_embedded.test create mode 100644 mysql-test/suite/funcs_1/t/is_key_column_usage_embedded.test create mode 100644 mysql-test/suite/funcs_1/t/is_routines_embedded.test create mode 100644 mysql-test/suite/funcs_1/t/is_schemata_embedded.test create mode 100644 mysql-test/suite/funcs_1/t/is_statistics_mysql_embedded.test create mode 100644 mysql-test/suite/funcs_1/t/is_table_constraints_mysql_embedded.test create mode 100644 mysql-test/suite/funcs_1/t/is_tables_embedded.test create mode 100644 mysql-test/suite/funcs_1/t/is_tables_myisam_embedded.test create mode 100644 mysql-test/suite/funcs_1/t/is_tables_mysql_embedded.test create mode 100644 mysql-test/suite/funcs_1/t/is_triggers_embedded.test create mode 100644 mysql-test/suite/funcs_1/t/is_views_embedded.test diff --git a/mysql-test/suite/funcs_1/datadict/columns.inc b/mysql-test/suite/funcs_1/datadict/columns.inc index 86f8afeff73..64318492b00 100644 --- a/mysql-test/suite/funcs_1/datadict/columns.inc +++ b/mysql-test/suite/funcs_1/datadict/columns.inc @@ -84,4 +84,3 @@ SELECT CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, FROM information_schema.columns $my_where ORDER BY TABLE_SCHEMA, TABLE_NAME, ORDINAL_POSITION; - diff --git a/mysql-test/suite/funcs_1/datadict/is_key_column_usage.inc b/mysql-test/suite/funcs_1/datadict/is_key_column_usage.inc new file mode 100644 index 00000000000..46d828b2e72 --- /dev/null +++ b/mysql-test/suite/funcs_1/datadict/is_key_column_usage.inc @@ -0,0 +1,344 @@ +# suite/funcs_1/datadict/is_key_column_usage.inc +# +# Check the layout of information_schema.key_column_usage and the impact of +# CREATE/ALTER/DROP TABLE/VIEW/SCHEMA/COLUMN ... on it. +# +# Note: +# This test is not intended +# - to show information about the all time existing tables +# within the databases information_schema and mysql +# - for checking storage engine properties +# Therefore please do not alter $engine_type. +# +# Author: +# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of +# testsuite funcs_1 +# Create this script based on older scripts and new code. +# Last Change: +# 2008-06-11 mleich Move t/is_key_column_usage.test to this file and +# create variants for embedded/non embedded server. +# + +let $engine_type = MEMORY; + +let $is_table = KEY_COLUMN_USAGE; + +# The table INFORMATION_SCHEMA.KEY_COLUMN_USAGE must exist +eval SHOW TABLES FROM information_schema LIKE '$is_table'; + +--echo ####################################################################### +--echo # Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT +--echo ####################################################################### +# Ensure that every INFORMATION_SCHEMA table can be queried with a SELECT +# statement, just as if it were an ordinary user-defined table. +# +--source suite/funcs_1/datadict/is_table_query.inc + + +--echo ######################################################################### +--echo # Testcase 3.2.7.1: INFORMATION_SCHEMA.KEY_COLUMN_USAGE layout +--echo ######################################################################### +# Ensure that the INFORMATION_SCHEMA.KEY_COLUMN_USAGE table has the following +# columns, in the following order: +# +# CONSTRAINT_CATALOG (always shows NULL), +# CONSTRAINT_SCHEMA (shows the database, or schema, in which an accessible +# constraint, or index, resides), +# CONSTRAINT_NAME (shows the name of the accessible constraint), +# TABLE_CATALOG (always shows NULL), +# TABLE_SCHEMA (shows the database, or schema, in which the table constrained +# by that constraint resides), +# TABLE_NAME (shows the name of the table constrained by the constraint), +# COLUMN_NAME (shows the name of a column that is the index key, or part of +# the index key), +# ORDINAL_POSITION (shows the ordinal position of the column within the +# constraint index), +# POSITION_IN_UNIQUE_CONSTRAINT (shows, for a foreign key column, the ordinal +# position of the referenced column within the referenced unique index; +# otherwise NULL). +# added with 5.0.6: +# REFERENCED_TABLE_SCHEMA, +# REFERENCED_TABLE_NAME, +# REFERENCED_COLUMN_NAME +# +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval DESCRIBE information_schema.$is_table; +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval SHOW CREATE TABLE information_schema.$is_table; +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval SHOW COLUMNS FROM information_schema.$is_table; + +# Note: Retrieval of information within information_schema.columns about +# information_schema.key_column_usage is in is_columns_is.test. + +# Show that CONSTRAINT_CATALOG and TABLE_CATALOG are always NULL. +SELECT constraint_catalog, constraint_schema, constraint_name, table_catalog, + table_schema, table_name, column_name +FROM information_schema.key_column_usage +WHERE constraint_catalog IS NOT NULL OR table_catalog IS NOT NULL; + + +--echo ######################################################################################## +--echo # Testcase 3.2.7.2 + 3.2.7.3: INFORMATION_SCHEMA.KEY_COLUMN_USAGE accessible information +--echo ######################################################################################## +# 3.2.7.2: Ensure that the table shows the relevant information on every column, defined to +# be part of an index key, which is accessible to the current user or to PUBLIC. +# 3.2.7.3: Ensure that the table does not show any information on any indexed column that is +# not accessible to the current user or PUBLIC. +# +--disable_warnings +DROP DATABASE IF EXISTS db_datadict; +--enable_warnings +CREATE DATABASE db_datadict; + +--error 0,ER_CANNOT_USER +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +--error 0,ER_CANNOT_USER +DROP USER 'testuser2'@'localhost'; +CREATE USER 'testuser2'@'localhost'; + +USE db_datadict; + +--replace_result $engine_type +eval +CREATE TABLE t1_1 + (f1 INT NOT NULL, PRIMARY KEY(f1), + f2 INT, INDEX f2_ind(f2)) +ENGINE = $engine_type; +GRANT SELECT ON t1_1 to 'testuser1'@'localhost'; + +--replace_result $engine_type +eval +CREATE TABLE t1_2 + (f1 INT NOT NULL, PRIMARY KEY(f1), + f2 INT, INDEX f2_ind(f2)) +ENGINE = $engine_type; +GRANT SELECT ON t1_2 to 'testuser2'@'localhost'; +#FIXME: add foreign keys + +let $select= SELECT * FROM information_schema.key_column_usage +WHERE table_name LIKE 't1_%' +ORDER BY constraint_catalog, constraint_schema, constraint_name, + table_catalog, table_schema, table_name, ordinal_position; + +# show view of user root +eval $select; + +--echo # Establish connection testuser1 (user=testuser1) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser1, localhost, testuser1, , db_datadict); +eval $select; + +--echo # Establish connection testuser2 (user=testuser2) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser2, localhost, testuser2, , db_datadict); +eval $select; + +# Cleanup +--echo # Switch to connection default and close connections testuser1, testuser2 +connection default; +disconnect testuser1; +disconnect testuser2; +DROP USER 'testuser1'@'localhost'; +DROP USER 'testuser2'@'localhost'; +DROP TABLE t1_1; +DROP TABLE t1_2; +DROP DATABASE IF EXISTS db_datadict; + + +--echo ######################################################################################## +--echo # Testcase 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.KEY_COLUMN_USAGE modifications +--echo ######################################################################################## +# 3.2.1.13: Ensure that the creation of any new database object (e.g. table or +# column) automatically inserts all relevant information on that +# object into every appropriate INFORMATION_SCHEMA table. +# 3.2.1.14: Ensure that the alteration of any existing database object +# automatically updates all relevant information on that object in +# every appropriate INFORMATION_SCHEMA table. +# 3.2.1.15: Ensure that the dropping of any existing database object +# automatically deletes all relevant information on that object from +# every appropriate INFORMATION_SCHEMA table. +# +--disable_warnings +DROP DATABASE IF EXISTS db_datadict; +DROP TABLE IF EXISTS test.t1_my_table; +--enable_warnings +CREATE DATABASE db_datadict; + +SELECT table_name FROM information_schema.key_column_usage +WHERE table_name LIKE 't1_my_table%'; +--replace_result $engine_type +eval +CREATE TABLE test.t1_my_table + (f1 CHAR(12), f2 TIMESTAMP, f4 BIGINT, PRIMARY KEY(f1,f2)) +DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci +ENGINE = $engine_type; +# Settings used in CREATE TABLE must be visible +# in information_schema.key_column_usage. +--vertical_results +SELECT * FROM information_schema.key_column_usage +WHERE table_name = 't1_my_table'; +--horizontal_results +# +# Check modification of TABLE_NAME +SELECT DISTINCT table_name FROM information_schema.key_column_usage +WHERE table_name LIKE 't1_my_table%'; +RENAME TABLE test.t1_my_table TO test.t1_my_tablex; +SELECT DISTINCT table_name FROM information_schema.key_column_usage +WHERE table_name LIKE 't1_my_table%'; +# +# Check modification of TABLE_SCHEMA +SELECT DISTINCT table_schema,table_name FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex'; +RENAME TABLE test.t1_my_tablex TO db_datadict.t1_my_tablex; +SELECT DISTINCT table_schema,table_name FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex'; +# +# Check modification of COLUMN_NAME +SELECT DISTINCT table_name, column_name FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex' +ORDER BY table_name, column_name; +ALTER TABLE db_datadict.t1_my_tablex CHANGE COLUMN f1 first_col CHAR(12); +SELECT DISTINCT table_name, column_name FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex' +ORDER BY table_name, column_name; +# +# Note: The size of the column list and the not very selective qualification +# is intended. I want to see that the schema names are equal and +# all records about 't1_my_tablex'. +let $my_select = SELECT constraint_schema, constraint_name, table_schema, +table_name, column_name, ordinal_position +FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex' +ORDER BY constraint_schema, constraint_name, table_schema, + table_name, ordinal_position; +# +# Check ADD INDEX being not UNIQUE (does not show up in key_column_usage) +eval $my_select; +CREATE INDEX f2 ON db_datadict.t1_my_tablex(f2); +eval $my_select; +DROP INDEX f2 ON db_datadict.t1_my_tablex; +# +# Check ADD UNIQUE INDEX without name explicit assigned +eval $my_select; +ALTER TABLE db_datadict.t1_my_tablex ADD UNIQUE (f2); +eval $my_select; +DROP INDEX f2 ON db_datadict.t1_my_tablex; +# +# Check ADD UNIQUE INDEX with name explicit assigned +eval $my_select; +ALTER TABLE db_datadict.t1_my_tablex ADD UNIQUE my_idx (f2); +eval $my_select; +DROP INDEX my_idx ON db_datadict.t1_my_tablex; +eval $my_select; +ALTER TABLE db_datadict.t1_my_tablex ADD UNIQUE my_idx (f4,first_col); +eval $my_select; +# +# Check DROP COLUMN +eval $my_select; +ALTER TABLE db_datadict.t1_my_tablex +DROP COLUMN first_col; +eval $my_select; +# +# Check impact of DROP TABLE +SELECT table_name, column_name +FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex' +ORDER BY table_name, column_name; +DROP TABLE db_datadict.t1_my_tablex; +SELECT table_name, column_name +FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex'; +# +# No UNIQUE CONSTRAINT -> no entry in key_column_usage +SELECT table_name FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex'; +--replace_result $engine_type +eval +CREATE TABLE db_datadict.t1_my_tablex +ENGINE = $engine_type AS +SELECT 1 AS f1; +SELECT table_name FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex'; +# UNIQUE CONSTRAINT -> entry in key_column_usage +ALTER TABLE db_datadict.t1_my_tablex ADD PRIMARY KEY(f1); +SELECT table_name FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex'; +# +# Check impact of DROP SCHEMA +SELECT table_name FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex'; +DROP DATABASE db_datadict; +SELECT table_name FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex'; +# + + +--echo ######################################################################## +--echo # Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and +--echo # DDL on INFORMATION_SCHEMA table are not supported +--echo ######################################################################## +# 3.2.1.3: Ensure that no user may execute an INSERT statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.4: Ensure that no user may execute an UPDATE statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.5: Ensure that no user may execute a DELETE statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.8: Ensure that no user may create an index on an +# INFORMATION_SCHEMA table. +# 3.2.1.9: Ensure that no user may alter the definition of an +# INFORMATION_SCHEMA table. +# 3.2.1.10: Ensure that no user may drop an INFORMATION_SCHEMA table. +# 3.2.1.11: Ensure that no user may move an INFORMATION_SCHEMA table to any +# other database. +# 3.2.1.12: Ensure that no user may directly add to, alter, or delete any data +# in an INFORMATION_SCHEMA table. +# +--disable_warnings +DROP DATABASE IF EXISTS db_datadict; +DROP TABLE IF EXISTS db_datadict.t1; +--enable_warnings +CREATE DATABASE db_datadict; +--replace_result $engine_type +eval +CREATE TABLE db_datadict.t1 (f1 BIGINT) +ENGINE = $engine_type; + +--error ER_DBACCESS_DENIED_ERROR +INSERT INTO information_schema.key_column_usage + (constraint_schema, constraint_name, table_name) +VALUES ( 'mysql', 'primary', 'db'); +--error ER_DBACCESS_DENIED_ERROR +INSERT INTO information_schema.key_column_usage +SELECT * FROM information_schema.key_column_usage; + +--error ER_DBACCESS_DENIED_ERROR +UPDATE information_schema.key_column_usage +SET table_name = 'db1' WHERE constraint_name = 'primary'; + +--error ER_DBACCESS_DENIED_ERROR +DELETE FROM information_schema.key_column_usage WHERE table_name = 't1'; +--error ER_DBACCESS_DENIED_ERROR +TRUNCATE information_schema.key_column_usage; + +--error ER_DBACCESS_DENIED_ERROR +CREATE INDEX i3 ON information_schema.key_column_usage(table_name); + +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.key_column_usage ADD f1 INT; + +--error ER_DBACCESS_DENIED_ERROR +DROP TABLE information_schema.key_column_usage; + +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.key_column_usage +RENAME db_datadict.key_column_usage; +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.key_column_usage +RENAME information_schema.xkey_column_usage; + +# Cleanup +DROP TABLE db_datadict.t1; +DROP DATABASE db_datadict; + diff --git a/mysql-test/suite/funcs_1/datadict/is_routines.inc b/mysql-test/suite/funcs_1/datadict/is_routines.inc new file mode 100644 index 00000000000..3e9aa874a66 --- /dev/null +++ b/mysql-test/suite/funcs_1/datadict/is_routines.inc @@ -0,0 +1,472 @@ +# suite/funcs_1/datadict/is_routines.inc +# +# Check the layout of information_schema.routines and the impact of +# CREATE/ALTER/DROP PROCEDURE/FUNCTION ... on it. +# +# Note: +# This test is not intended +# - to show information about the all time existing routines (there are no +# in the moment) within the databases information_schema and mysql +# - for checking storage engine properties +# Therefore please do not alter $engine_type and $other_engine_type. +# +# Author: +# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of +# testsuite funcs_1 +# Create this script based on older scripts and new code. +# Last Change: +# 2008-06-11 mleich Move t/is_routines.test to this file and +# create variants for embedded/non embedded server. +# + +let $engine_type = MEMORY; +let $other_engine_type = MyISAM; + +let $is_table = ROUTINES; + +# The table INFORMATION_SCHEMA.TABLES must exist +eval SHOW TABLES FROM information_schema LIKE '$is_table'; + +--echo ####################################################################### +--echo # Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT +--echo ####################################################################### +# Ensure that every INFORMATION_SCHEMA table can be queried with a SELECT +# statement, just as if it were an ordinary user-defined table. +# +--source suite/funcs_1/datadict/is_table_query.inc + + +--echo ######################################################################### +--echo # Testcase 3.2.8.1: INFORMATION_SCHEMA.ROUTINES layout +--echo ######################################################################### +# Ensure that the INFORMATION_SCHEMA.ROUTINES table has the following columns, +# in the following order: +# +# SPECIFIC_NAME (shows the name of an accessible stored procedure, or routine), +# ROUTINE_CATALOG (always shows NULL), +# ROUTINE_SCHEMA (shows the database, or schema, in which the routine resides), +# ROUTINE_NAME (shows the same stored procedure name), +# ROUTINE_TYPE (shows whether the stored procedure is a procedure or a function), +# DTD_IDENTIFIER (shows, for a function, the complete data type definition of +# the value the function will return; otherwise NULL), +# ROUTINE_BODY (shows the language in which the stored procedure is written; +# currently always SQL), +# ROUTINE_DEFINITION (shows as much of the routine body as is possible in the +# allotted space), +# EXTERNAL_NAME (always shows NULL), +# EXTERNAL_LANGUAGE (always shows NULL), +# PARAMETER_STYLE (shows the routine's parameter style; always SQL), +# IS_DETERMINISTIC (shows whether the routine is deterministic), +# SQL_DATA_ACCESS (shows the routine's defined sql-data-access clause value), +# SQL_PATH (always shows NULL), +# SECURITY_TYPE (shows whether the routine's defined security_type is 'definer' +# or 'invoker'), +# CREATED (shows the timestamp of the time the routine was created), +# LAST_ALTERED (shows the timestamp of the time the routine was last altered), +# SQL_MODE (shows the sql_mode setting at the time the routine was created), +# ROUTINE_COMMENT (shows the comment, if any, defined for the routine; +# otherwise NULL), +# DEFINER (shows the user who created the routine). +# +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval DESCRIBE information_schema.$is_table; +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval SHOW CREATE TABLE information_schema.$is_table; +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval SHOW COLUMNS FROM information_schema.$is_table; + +USE test; +--disable_warnings +DROP PROCEDURE IF EXISTS sp_for_routines; +DROP FUNCTION IF EXISTS function_for_routines; +--enable_warnings +CREATE PROCEDURE sp_for_routines() SELECT 'db_datadict'; +CREATE FUNCTION function_for_routines() RETURNS INT RETURN 0; + +# Show that the column values of +# ROUTINE_CATALOG, EXTERNAL_NAME, EXTERNAL_LANGUAGE, SQL_PATH are always NULL +# and +# ROUTINE_BODY, PARAMETER_STYLE are 'SQL' +# and +# SPECIFIC_NAME = ROUTINE_NAME. +SELECT specific_name,routine_catalog,routine_schema,routine_name,routine_type, + routine_body,external_name,external_language,parameter_style,sql_path +FROM information_schema.routines +WHERE routine_catalog IS NOT NULL OR external_name IS NOT NULL + OR external_language IS NOT NULL OR sql_path IS NOT NULL + OR routine_body <> 'SQL' OR parameter_style <> 'SQL' + OR specific_name <> routine_name; + +DROP PROCEDURE sp_for_routines; +DROP FUNCTION function_for_routines; + + +--echo ################################################################################ +--echo # Testcase 3.2.8.2 + 3.2.8.3: INFORMATION_SCHEMA.ROUTINES accessible information +--echo ################################################################################ +# 3.2.8.2: Ensure that the table shows the relevant information on every SQL-invoked +# routine (i.e. stored procedure) which is accessible to the current user +# or to PUBLIC. +# 3.2.8.3: Ensure that the table does not show any information on any stored procedure +# that is not accessible to the current user or PUBLIC. +# +--disable_warnings +DROP DATABASE IF EXISTS db_datadict; +DROP DATABASE IF EXISTS db_datadict_2; +--enable_warnings + +CREATE DATABASE db_datadict; +USE db_datadict; +--replace_result $other_engine_type +eval +CREATE TABLE res_6_408002_1(f1 CHAR(3), f2 TEXT(25), f3 DATE, f4 INT) +ENGINE = $other_engine_type; +INSERT INTO res_6_408002_1(f1, f2, f3, f4) +VALUES('abc', 'xyz', '1989-11-09', 0815); +--disable_warnings +DROP PROCEDURE IF EXISTS sp_6_408002_1; +--enable_warnings +delimiter //; +CREATE PROCEDURE sp_6_408002_1() +BEGIN + SELECT * FROM db_datadict.res_6_408002_1; +END// +delimiter ;// + +CREATE DATABASE db_datadict_2; +USE db_datadict_2; +--replace_result $other_engine_type +eval +CREATE TABLE res_6_408002_2(f1 CHAR(3), f2 TEXT(25), f3 DATE, f4 INT) +ENGINE = $other_engine_type; +INSERT INTO res_6_408002_2(f1, f2, f3, f4) +VALUES('abc', 'xyz', '1990-10-03', 4711); +--disable_warnings +DROP PROCEDURE IF EXISTS sp_6_408002_2; +--enable_warnings +delimiter //; +CREATE PROCEDURE sp_6_408002_2() +BEGIN + SELECT * FROM db_datadict_2.res_6_408002_2; +END// +delimiter ;// + +--error 0,ER_CANNOT_USER +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +--error 0,ER_CANNOT_USER +DROP USER 'testuser2'@'localhost'; +CREATE USER 'testuser2'@'localhost'; +--error 0,ER_CANNOT_USER +DROP USER 'testuser3'@'localhost'; +CREATE USER 'testuser3'@'localhost'; + + +GRANT SELECT ON db_datadict_2.* TO 'testuser1'@'localhost'; +GRANT EXECUTE ON db_datadict_2.* TO 'testuser1'@'localhost'; + +GRANT EXECUTE ON db_datadict.* TO 'testuser1'@'localhost'; +GRANT SELECT ON db_datadict.* TO 'testuser2'@'localhost'; + +GRANT EXECUTE ON PROCEDURE db_datadict_2.sp_6_408002_2 +TO 'testuser2'@'localhost'; +GRANT EXECUTE ON db_datadict_2.* TO 'testuser2'@'localhost'; +FLUSH PRIVILEGES; + +--echo # Establish connection testuser1 (user=testuser1) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser1, localhost, testuser1, , db_datadict); +--replace_column 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss" +SELECT * FROM information_schema.routines; + +--echo # Establish connection testuser2 (user=testuser2) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser2, localhost, testuser2, , db_datadict); +--replace_column 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss" +SELECT * FROM information_schema.routines; + +--echo # Establish connection testuser3 (user=testuser3) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser3, localhost, testuser3, , test); +--replace_column 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss" +SELECT * FROM information_schema.routines; + +# Cleanup +--echo # Switch to connection default and close connections testuser1,testuser2,testuser3 +connection default; +disconnect testuser1; +disconnect testuser2; +disconnect testuser3; + +DROP USER 'testuser1'@'localhost'; +DROP USER 'testuser2'@'localhost'; +DROP USER 'testuser3'@'localhost'; + +USE test; +DROP DATABASE db_datadict; +DROP DATABASE db_datadict_2; + + +--echo ######################################################################### +--echo # 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.ROUTINES modifications +--echo ######################################################################### +# 3.2.1.13: Ensure that the creation of any new database object (e.g. table or +# column) automatically inserts all relevant information on that +# object into every appropriate INFORMATION_SCHEMA table. +# 3.2.1.14: Ensure that the alteration of any existing database object +# automatically updates all relevant information on that object in +# every appropriate INFORMATION_SCHEMA table. +# 3.2.1.15: Ensure that the dropping of any existing database object +# automatically deletes all relevant information on that object from +# every appropriate INFORMATION_SCHEMA table. +# +# Some more tests are in t/information_schema_routines.test which exists +# in MySQL 5.1 and up only. +# +--disable_warnings +DROP DATABASE IF EXISTS db_datadict; +--enable_warnings +CREATE DATABASE db_datadict; + +SELECT * FROM information_schema.routines WHERE routine_schema = 'db_datadict'; +USE db_datadict; +CREATE PROCEDURE sp_for_routines() SELECT 'db_datadict'; +CREATE FUNCTION function_for_routines() RETURNS INT RETURN 0; +--vertical_results +--replace_column 16 17 +SELECT * FROM information_schema.routines WHERE routine_schema = 'db_datadict' +ORDER BY routine_name; +--horizontal_results + +ALTER PROCEDURE sp_for_routines SQL SECURITY INVOKER; +ALTER FUNCTION function_for_routines COMMENT 'updated comments'; +--vertical_results +--replace_column 16 17 +SELECT * FROM information_schema.routines WHERE routine_schema = 'db_datadict' +ORDER BY routine_name; +--horizontal_results + +DROP PROCEDURE sp_for_routines; +DROP FUNCTION function_for_routines; +SELECT * FROM information_schema.routines WHERE routine_schema = 'db_datadict'; + +CREATE PROCEDURE sp_for_routines() SELECT 'db_datadict'; +CREATE FUNCTION function_for_routines() RETURNS INT RETURN 0; +--vertical_results +--replace_column 16 17 +SELECT * FROM information_schema.routines WHERE routine_schema = 'db_datadict' +ORDER BY routine_name; +--horizontal_results +use test; +DROP DATABASE db_datadict; +SELECT * FROM information_schema.routines WHERE routine_schema = 'db_datadict'; + + +--echo ######################################################################### +--echo # 3.2.8.4: INFORMATION_SCHEMA.ROUTINES routine body too big for +--echo # ROUTINE_DEFINITION column +--echo ######################################################################### +# Ensure that a stored procedure with a routine body that is too large to fit +# into the INFORMATION_SCHEMA.ROUTINES.ROUTINE_DEFINITION column correctly shows +# as much of the information as is possible within the allotted size. +# +--disable_warnings +DROP DATABASE IF EXISTS db_datadict; +--enable_warnings +CREATE DATABASE db_datadict; +USE db_datadict; +# +--replace_result $other_engine_type +eval +CREATE TABLE db_datadict.res_6_408004_1 + (f1 LONGTEXT , f2 MEDIUMINT , f3 LONGBLOB , f4 REAL , f5 YEAR) +ENGINE = $other_engine_type; +INSERT INTO db_datadict.res_6_408004_1 +VALUES ('abc', 98765 , 99999999 , 98765, 10); +# +--replace_result $other_engine_type +eval +CREATE TABLE db_datadict.res_6_408004_2 + (f1 LONGTEXT , f2 MEDIUMINT , f3 LONGBLOB , f4 REAL , f5 YEAR) +ENGINE = $other_engine_type; +INSERT INTO db_datadict.res_6_408004_2 +VALUES ('abc', 98765 , 99999999 , 98765, 10); + +--echo # Checking the max. possible length of (currently) 4 GByte is not +--echo # in this environment here. + +delimiter //; +CREATE PROCEDURE sp_6_408004 () +BEGIN + DECLARE done INTEGER DEFAULt 0; + DECLARE variable_number_1 LONGTEXT; + DECLARE variable_number_2 MEDIUMINT; + DECLARE variable_number_3 LONGBLOB; + DECLARE variable_number_4 REAL; + DECLARE variable_number_5 YEAR; + DECLARE cursor_number_1 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10; + DECLARE cursor_number_2 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10; + DECLARE cursor_number_3 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10; + DECLARE cursor_number_4 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10; + DECLARE cursor_number_5 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10; + DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done = 1; + BEGIN + OPEN cursor_number_1; + WHILE done <> 1 DO + FETCH cursor_number_1 + INTO variable_number_1, variable_number_2, variable_number_3, + variable_number_4, variable_number_5; + IF done <> 0 THEN + INSERT INTO res_6_408004_2 + VALUES (variable_number_1, variable_number_2, variable_number_3, + variable_number_4, variable_number_5); + END IF; + END WHILE; + BEGIN + BEGIN + SET done = 0; + OPEN cursor_number_2; + WHILE done <> 1 DO + FETCH cursor_number_2 + INTO variable_number_1, variable_number_2, variable_number_3, + variable_number_4, variable_number_5; + IF done <> 0 THEN + INSERT INTO res_6_408004_2 + VALUES(variable_number_1, variable_number_2, variable_number_3, + variable_number_4, variable_number_5); + END IF; + END WHILE; + END; + SET done = 0; + OPEN cursor_number_3; + WHILE done <> 1 DO + FETCH cursor_number_3 + INTO variable_number_1, variable_number_2, variable_number_3, + variable_number_4, variable_number_5; + IF done <> 0 THEN + INSERT INTO res_6_408004_2 + VALUES(variable_number_1, variable_number_2, variable_number_3, + variable_number_4, variable_number_5); + END IF; + END WHILE; + END; + END; + BEGIN + SET done = 0; + OPEN cursor_number_4; + WHILE done <> 1 DO + FETCH cursor_number_4 + INTO variable_number_1, variable_number_2, variable_number_3, + variable_number_4, variable_number_5; + IF done <> 0 THEN + INSERT INTO res_6_408004_2 + VALUES (variable_number_1, variable_number_2, variable_number_3, + variable_number_4, variable_number_5); + END IF; + END WHILE; + END; + BEGIN + SET @a='test row'; + SELECT @a; + SELECT @a; + SELECT @a; + END; + BEGIN + SET done = 0; + OPEN cursor_number_5; + WHILE done <> 1 DO + FETCH cursor_number_5 + INTO variable_number_1, variable_number_2, variable_number_3, + variable_number_4, variable_number_5; + IF done <> 0 THEN + INSERT INTO res_6_408004_2 + VALUES (variable_number_1, variable_number_2, variable_number_3, + variable_number_4, variable_number_5); + END IF; + END WHILE; + END; + BEGIN + SET @a='test row'; + SELECT @a; + SELECT @a; + SELECT @a; + END; +END// +delimiter ;// + +CALL db_datadict.sp_6_408004 (); +SELECT * FROM db_datadict.res_6_408004_2; + +--vertical_results +--replace_column 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss" +SELECT *, LENGTH(routine_definition) FROM information_schema.routines +WHERE routine_schema = 'db_datadict'; +--horizontal_results + +# Cleanup +DROP DATABASE db_datadict; +# ---------------------------------------------------------------------------------------------- + + +--echo ######################################################################## +--echo # Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and +--echo # DDL on INFORMATION_SCHEMA table are not supported +--echo ######################################################################## +# 3.2.1.3: Ensure that no user may execute an INSERT statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.4: Ensure that no user may execute an UPDATE statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.5: Ensure that no user may execute a DELETE statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.8: Ensure that no user may create an index on an INFORMATION_SCHEMA table. +# 3.2.1.9: Ensure that no user may alter the definition of an +# INFORMATION_SCHEMA table. +# 3.2.1.10: Ensure that no user may drop an INFORMATION_SCHEMA table. +# 3.2.1.11: Ensure that no user may move an INFORMATION_SCHEMA table to any +# other database. +# 3.2.1.12: Ensure that no user may directly add to, alter, or delete any data +# in an INFORMATION_SCHEMA table. +# +--disable_warnings +DROP DATABASE IF EXISTS db_datadict; +--enable_warnings +CREATE DATABASE db_datadict; +USE db_datadict; +CREATE PROCEDURE sp_for_routines() SELECT 'db_datadict'; +USE test; + +--error ER_DBACCESS_DENIED_ERROR +INSERT INTO information_schema.routines (routine_name, routine_type ) +VALUES ('p2', 'procedure'); + +--error ER_DBACCESS_DENIED_ERROR +UPDATE information_schema.routines SET routine_name = 'p2' +WHERE routine_body = 'sql'; + +--error ER_DBACCESS_DENIED_ERROR +DELETE FROM information_schema.routines ; +# +--error ER_DBACCESS_DENIED_ERROR +TRUNCATE information_schema.routines ; + +--error ER_DBACCESS_DENIED_ERROR +CREATE INDEX i7 ON information_schema.routines (routine_name); + +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.routines ADD f1 INT; +# +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.routines DISCARD TABLESPACE; + +--error ER_DBACCESS_DENIED_ERROR +DROP TABLE information_schema.routines ; + +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.routines RENAME db_datadict.routines; +# +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.routines RENAME information_schema.xroutines; + +# Cleanup +DROP DATABASE db_datadict; + diff --git a/mysql-test/suite/funcs_1/datadict/is_schemata.inc b/mysql-test/suite/funcs_1/datadict/is_schemata.inc new file mode 100644 index 00000000000..b2a6139b839 --- /dev/null +++ b/mysql-test/suite/funcs_1/datadict/is_schemata.inc @@ -0,0 +1,247 @@ +# suite/funcs_1/datadict/is_schemata.inc +# +# Check the layout of information_schema.schemata, permissions and the impact of +# CREATE/ALTER/DROP SCHEMA on it. +# +# Note: +# This test is not intended +# - to show information about the all time existing databases +# information_schema and mysql +# - for checking storage engine properties +# +# Author: +# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of +# testsuite funcs_1 +# Create this script based on older scripts and new code. +# Last Change: +# 2008-06-11 mleich Move t/is_schemata.test to this file and +# create variants for embedded/non embedded server. +# + +let $is_table = SCHEMATA; + +# The table INFORMATION_SCHEMA.SCHEMATA must exist +eval SHOW TABLES FROM information_schema LIKE '$is_table'; + +--echo ####################################################################### +--echo # Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT +--echo ####################################################################### +# Ensure that every INFORMATION_SCHEMA table can be queried with a SELECT +# statement, just as if it were an ordinary user-defined table. +# +--source suite/funcs_1/datadict/is_table_query.inc + + +--echo ######################################################################### +--echo # Testcase 3.2.9.1: INFORMATION_SCHEMA.SCHEMATA layout; +--echo ######################################################################### +# Ensure that the INFORMATION_SCHEMA.SCHEMATA table has the following columns, +# in the following order: +# +# CATALOG_NAME (always shows NULL), +# SCHEMA_NAME (shows the name of a database, or schema, on which the current +# user or PUBLIC has privileges), +# DEFAULT_CHARACTER_SET_NAME (shows the name of that database's default +# character set), +# DEFAULT_COLLATION_NAME (shows the database defaul collation) +# SQL_PATH (always shows NULL). +# +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval DESCRIBE information_schema.$is_table; +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval SHOW CREATE TABLE information_schema.$is_table; +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval SHOW COLUMNS FROM information_schema.$is_table; + +# Note: Retrieval of information within information_schema.columns about +# information_schema.schemata is in is_columns_is.test. + +# Show that CATALOG_NAME and SQL_PATH are always NULL. +SELECT catalog_name, schema_name, sql_path +FROM information_schema.schemata +WHERE catalog_name IS NOT NULL or sql_path IS NOT NULL; + + +--echo ############################################################################### +--echo # Testcases 3.2.9.2+3.2.9.3: INFORMATION_SCHEMA.SCHEMATA accessible information +--echo ############################################################################### +# 3.2.9.2 Ensure that the table shows the relevant information for every +# database on which the current user or PUBLIC have privileges. +# 3.2.9.3 Ensure that the table does not show any information on any databases +# on which the current user and PUBLIC have no privileges. +# +# Note: Check of content within information_schema.schemata about the databases +# information_schema and mysql is in +# suite/funcs_1/t/is_schemata_is_mysql.test. +# +--disable_warnings +DROP DATABASE IF EXISTS db_datadict_1; +DROP DATABASE IF EXISTS db_datadict_2; +--enable_warnings +CREATE DATABASE db_datadict_1; +CREATE DATABASE db_datadict_2; + +--error 0,ER_CANNOT_USER +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +--error 0,ER_CANNOT_USER +DROP USER 'testuser2'@'localhost'; +CREATE USER 'testuser2'@'localhost'; +--error 0,ER_CANNOT_USER +DROP USER 'testuser3'@'localhost'; +CREATE USER 'testuser3'@'localhost'; + +GRANT SELECT ON db_datadict_1.* to 'testuser1'@'localhost'; +GRANT SELECT ON db_datadict_1.* to 'testuser2'@'localhost'; +GRANT SELECT ON db_datadict_2.* to 'testuser2'@'localhost'; + +let $my_select = SELECT * FROM information_schema.schemata +WHERE schema_name LIKE 'db_datadict_%' ORDER BY schema_name; +let $my_show = SHOW DATABASES LIKE 'db_datadict_%'; + +eval $my_select; +--sorted_result +eval $my_show; + +--echo # Establish connection testuser1 (user=testuser1) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser1, localhost, testuser1, , db_datadict_1); +# Shows db_datadict_1 +eval $my_select; +--sorted_result +eval $my_show; + +--echo # Establish connection testuser2 (user=testuser2) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser2, localhost, testuser2, , db_datadict_2); +# Shows db_datadict_1 and db_datadict_2 +eval $my_select; +--sorted_result +eval $my_show; + +--echo # Establish connection testuser3 (user=testuser3) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser3, localhost, testuser3, , test); +# Shows neither db_datadict_1 nor db_datadict_2 +eval $my_select; +--sorted_result +eval $my_show; + +# Cleanup +--echo # Switch to connection default and close connections testuser1,testuser2,testuser3 +connection default; +disconnect testuser1; +disconnect testuser2; +disconnect testuser3; +DROP USER 'testuser1'@'localhost'; +DROP USER 'testuser2'@'localhost'; +DROP USER 'testuser3'@'localhost'; +DROP DATABASE db_datadict_1; +DROP DATABASE db_datadict_2; + + +--echo ################################################################################# +--echo # Testcases 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.SCHEMATA modifications +--echo ################################################################################# +# 3.2.1.13: Ensure that the creation of any new database object (e.g. table or +# column) automatically inserts all relevant information on that +# object into every appropriate INFORMATION_SCHEMA table. +# 3.2.1.14: Ensure that the alteration of any existing database object +# automatically updates all relevant information on that object in +# every appropriate INFORMATION_SCHEMA table. +# 3.2.1.15: Ensure that the dropping of any existing database object +# automatically deletes all relevant information on that object from +# every appropriate INFORMATION_SCHEMA table. +# +--disable_warnings +DROP DATABASE IF EXISTS db_datadict; +--enable_warnings + +SELECT * FROM information_schema.schemata WHERE schema_name = 'db_datadict'; +CREATE DATABASE db_datadict CHARACTER SET 'latin1' COLLATE 'latin1_swedish_ci'; +SELECT * FROM information_schema.schemata WHERE schema_name = 'db_datadict'; + +# Check modify default CHARACTER SET +SELECT schema_name, default_character_set_name +FROM information_schema.schemata WHERE schema_name = 'db_datadict'; +ALTER SCHEMA db_datadict CHARACTER SET 'utf8'; +SELECT schema_name, default_character_set_name +FROM information_schema.schemata WHERE schema_name = 'db_datadict'; +ALTER SCHEMA db_datadict CHARACTER SET 'latin1'; + +# Check modify default COLLATION +SELECT schema_name, default_collation_name FROM information_schema.schemata +WHERE schema_name = 'db_datadict'; +ALTER SCHEMA db_datadict COLLATE 'latin1_general_cs'; +SELECT schema_name, default_collation_name FROM information_schema.schemata +WHERE schema_name = 'db_datadict'; + +# Check DROP DATABASE +SELECT schema_name +FROM information_schema.schemata WHERE schema_name = 'db_datadict'; +DROP DATABASE db_datadict; +SELECT schema_name +FROM information_schema.schemata WHERE schema_name = 'db_datadict'; + + +--echo ######################################################################## +--echo # Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and +--echo # DDL on INFORMATION_SCHEMA tables are not supported +--echo ######################################################################## +# 3.2.1.3: Ensure that no user may execute an INSERT statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.4: Ensure that no user may execute an UPDATE statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.5: Ensure that no user may execute a DELETE statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.8: Ensure that no user may create an index on an INFORMATION_SCHEMA table. +# 3.2.1.9: Ensure that no user may alter the definition of an +# INFORMATION_SCHEMA table. +# 3.2.1.10: Ensure that no user may drop an INFORMATION_SCHEMA table. +# 3.2.1.11: Ensure that no user may move an INFORMATION_SCHEMA table to any +# other database. +# 3.2.1.12: Ensure that no user may directly add to, alter, or delete any data +# in an INFORMATION_SCHEMA table. +# +--disable_warnings +DROP DATABASE IF EXISTS db_datadict; +--enable_warnings +CREATE DATABASE db_datadict CHARACTER SET 'latin1' COLLATE 'latin1_swedish_ci'; + +--error ER_DBACCESS_DENIED_ERROR +INSERT INTO information_schema.schemata + (catalog_name, schema_name, default_character_set_name, sql_path) +VALUES (NULL, 'db1', 'latin1', NULL); +--error ER_DBACCESS_DENIED_ERROR +INSERT INTO information_schema.schemata +SELECT * FROM information_schema.schemata; + +--error ER_DBACCESS_DENIED_ERROR +UPDATE information_schema.schemata +SET default_character_set_name = 'utf8' +WHERE schema_name = 'db_datadict'; +--error ER_DBACCESS_DENIED_ERROR +UPDATE information_schema.schemata SET catalog_name = 't_4711'; + +--error ER_DBACCESS_DENIED_ERROR +DELETE FROM information_schema.schemata WHERE schema_name = 'db_datadict'; +--error ER_DBACCESS_DENIED_ERROR +TRUNCATE information_schema.schemata; + +--error ER_DBACCESS_DENIED_ERROR +CREATE INDEX i1 ON information_schema.schemata(schema_name); + +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.schemata ADD f1 INT; + +--error ER_DBACCESS_DENIED_ERROR +DROP TABLE information_schema.schemata; + +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.schemata RENAME db_datadict.schemata; +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.schemata RENAME information_schema.xschemata; + +# Cleanup +DROP DATABASE db_datadict; + diff --git a/mysql-test/suite/funcs_1/datadict/is_tables.inc b/mysql-test/suite/funcs_1/datadict/is_tables.inc new file mode 100644 index 00000000000..6d47c33e715 --- /dev/null +++ b/mysql-test/suite/funcs_1/datadict/is_tables.inc @@ -0,0 +1,475 @@ +# suite/funcs_1/datadict/is_tables.inc +# +# Check the layout of information_schema.tables and the impact of +# CREATE/ALTER/DROP TABLE/VIEW/SCHEMA ... on it. +# +# Note: +# This test is not intended +# - to show information about the all time existing tables +# within the databases information_schema and mysql +# - for checking storage engine properties +# Therefore please do not alter $engine_type and $other_engine_type. +# Some results of the subtests depend on the storage engines assigned. +# +# Author: +# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of +# testsuite funcs_1 +# Create this script based on older scripts and new code. +# Last Change: +# 2008-06-11 mleich Move t/is_tables.test to this file and +# create variants for embedded/non embedded server. +# + +let $engine_type = MEMORY; +let $other_engine_type = MyISAM; + +let $is_table = TABLES; + +# The table INFORMATION_SCHEMA.TABLES must exist +eval SHOW TABLES FROM information_schema LIKE '$is_table'; + +--echo ####################################################################### +--echo # Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT +--echo ####################################################################### +# Ensure that every INFORMATION_SCHEMA table can be queried with a SELECT +# statement, just as if it were an ordinary user-defined table. +# +--source suite/funcs_1/datadict/is_table_query.inc + + +--echo ######################################################################### +--echo # Testcase 3.2.12.1: INFORMATION_SCHEMA.TABLES layout +--echo ######################################################################### +# Ensure that the INFORMATION_SCHEMA.TABLES table has the following columns, +# in the following order: +# +# TABLE_CATALOG (always shows NULL), +# TABLE_SCHEMA (shows the name of the database, or schema, in which an +# accessible table resides), +# TABLE_NAME (shows the name of a table which the current user may access), +# TABLE_TYPE (shows whether the table is a BASE TABLE, a TEMPORARY table, +# or a VIEW), +# ENGINE (shows the storage engine used for the table), +# VERSION (shows the version number of the table's .frm file), +# ROW_FORMAT (shows the table's row storage format; either FIXED, DYNAMIC +# or COMPRESSED), +# TABLE_ROWS (shows the number of rows in the table), +# AVG_ROW_LENGTH (shows the average length of the table's rows), +# DATA_LENGTH (shows the length of the table's data file), +# MAX_DATA_LENGTH (shows the maximum length of the table's data file), +# INDEX_LENGTH (shows the length of the index file associated with the table), +# DATA_FREE (shows the number of allocated, unused bytes), +# AUTO_INCREMENT (shows the next AUTO_INCREMENT value, where applicable), +# CREATE_TIME (shows the timestamp of the time the table was created), +# UPDATE_TIME (shows the timestamp of the time the table's data file was +# last updated), +# CHECK_TIME (shows the timestamp of the time the table was last checked), +# TABLE_COLLATION (shows the table's default collation), +# CHECKSUM (shows the live checksum value for the table, if any; otherwise NULL), +# CREATE_OPTIONS (shows any additional options used in the table's definition; +# otherwise NULL), +# TABLE_COMMENT (shows the comment added to the table's definition; +# otherwise NULL). +# +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval DESCRIBE information_schema.$is_table; +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval SHOW CREATE TABLE information_schema.$is_table; +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval SHOW COLUMNS FROM information_schema.$is_table; + +# Note: Retrieval of information within information_schema.columns about +# information_schema.tables is in is_columns_is.test. + +# Show that TABLE_CATALOG is always NULL. +SELECT table_catalog, table_schema, table_name +FROM information_schema.tables WHERE table_catalog IS NOT NULL; + + +--echo ################################################################################ +--echo # Testcase 3.2.12.2 + 3.2.12.3: INFORMATION_SCHEMA.TABLES accessible information +--echo ################################################################################ +# 3.2.12.2: Ensure that the table shows the relevant information on every base table +# and view on which the current user or PUBLIC has privileges. +# 3.2.12.3: Ensure that the table does not show any information on any tables +# on which the current user and public have no privileges. +# +# Note: Check of content within information_schema.tables about tables within +# database is in +# mysql is_tables_mysql.test +# information_schema is_tables_is.test +# test% is_tables_.test +# +--disable_warnings +DROP DATABASE IF EXISTS db_datadict; +--enable_warnings +CREATE DATABASE db_datadict; + +--error 0,ER_CANNOT_USER +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +GRANT CREATE, CREATE VIEW, INSERT, SELECT ON db_datadict.* + TO 'testuser1'@'localhost' WITH GRANT OPTION; +--error 0,ER_CANNOT_USER +DROP USER 'testuser2'@'localhost'; +CREATE USER 'testuser2'@'localhost'; +--error 0,ER_CANNOT_USER +DROP USER 'testuser3'@'localhost'; +CREATE USER 'testuser3'@'localhost'; + +--replace_result $engine_type +eval +CREATE TABLE db_datadict.tb1 (f1 INT, f2 INT, f3 INT) +ENGINE = $engine_type; + +GRANT SELECT ON db_datadict.tb1 TO 'testuser1'@'localhost'; +GRANT ALL ON db_datadict.tb1 TO 'testuser2'@'localhost' WITH GRANT OPTION; + +let $my_select = SELECT * FROM information_schema.tables +WHERE table_schema = 'db_datadict' ORDER BY table_name; +let $my_show = SHOW TABLES FROM db_datadict; + +--echo # Establish connection testuser1 (user=testuser1) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser1, localhost, testuser1, , db_datadict); +# tb2 is not granted to anyone +--replace_result $engine_type +eval +CREATE TABLE tb2 (f1 DECIMAL) +ENGINE = $engine_type; +--replace_result $engine_type +eval +CREATE TABLE tb3 (f1 VARCHAR(200)) +ENGINE = $engine_type; +GRANT SELECT ON db_datadict.tb3 to 'testuser3'@'localhost'; +GRANT INSERT ON db_datadict.tb3 to 'testuser2'@'localhost'; +CREATE VIEW v3 AS SELECT * FROM tb3; +GRANT SELECT ON db_datadict.v3 to 'testuser3'@'localhost'; + +if ($have_bug_32285) +{ +--disable_ps_protocol +} +# We do not want to check here values affected by +# - the storage engine used +# - Operating system / Filesystem +# - start time of test +# 1 TABLE_CATALOG +# 2 TABLE_SCHEMA +# 3 TABLE_NAME +# 4 TABLE_TYPE +# 5 ENGINE affected by storage engine used +# 6 VERSION +# 7 ROW_FORMAT affected by storage engine used +# 8 TABLE_ROWS +# 9 AVG_ROW_LENGTH affected by storage engine used +# 10 DATA_LENGTH affected by storage engine used and maybe OS +# 11 MAX_DATA_LENGTH affected by storage engine used and maybe OS +# 12 INDEX_LENGTH affected by storage engine used and maybe OS +# 13 DATA_FREE affected by storage engine used and maybe OS +# 14 AUTO_INCREMENT +# 15 CREATE_TIME depends roughly on start time of test (*) +# 16 UPDATE_TIME depends roughly on start time of test (*) +# 17 CHECK_TIME depends roughly on start time of test and storage engine (*) +# 18 TABLE_COLLATION +# 19 CHECKSUM affected by storage engine used +# 20 CREATE_OPTIONS +# 21 TABLE_COMMENT affected by some storage engines +# (*) In case of view or temporary table NULL. +--replace_column 5 "#ENG#" 7 "#RF#" 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "#CRT" 16 "#UT#" 17 "#CT#" 19 "#CS#" +eval $my_select; +--enable_ps_protocol +--sorted_result +eval $my_show; + +--echo # Establish connection testuser2 (user=testuser2) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser2, localhost, testuser2, , db_datadict); +if ($have_bug_32285) +{ +--disable_ps_protocol +} +--replace_column 5 "#ENG#" 7 "#RF#" 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "#CRT" 16 "#UT#" 17 "#CT#" 19 "#CS#" +eval $my_select; +--enable_ps_protocol +--sorted_result +eval $my_show; + +--echo # Establish connection testuser3 (user=testuser3) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser3, localhost, testuser3, , db_datadict); +if ($have_bug_32285) +{ +--disable_ps_protocol +} +--replace_column 5 "#ENG#" 7 "#RF#" 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "#CRT" 16 "#UT#" 17 "#CT#" 19 "#CS#" +eval $my_select; +--enable_ps_protocol +--sorted_result +eval $my_show; + +--echo # Switch to connection default (user=root) +connection default; +# we see only 'public' tables +if ($have_bug_32285) +{ +--disable_ps_protocol +} +--replace_column 5 "#ENG#" 7 "#RF#" 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "#CRT" 16 "#UT#" 17 "#CT#" 19 "#CS#" +eval $my_select; +--enable_ps_protocol +--sorted_result +eval $my_show; + +# Cleanup +--echo # Close connection testuser1, testuser2, testuser3 +disconnect testuser1; +disconnect testuser2; +disconnect testuser3; +DROP USER 'testuser1'@'localhost'; +DROP USER 'testuser2'@'localhost'; +DROP USER 'testuser3'@'localhost'; +DROP DATABASE db_datadict; + + +--echo ######################################################################### +--echo # 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.TABLES modifications +--echo ######################################################################### +# 3.2.1.13: Ensure that the creation of any new database object (e.g. table or +# column) automatically inserts all relevant information on that +# object into every appropriate INFORMATION_SCHEMA table. +# 3.2.1.14: Ensure that the alteration of any existing database object +# automatically updates all relevant information on that object in +# every appropriate INFORMATION_SCHEMA table. +# 3.2.1.15: Ensure that the dropping of any existing database object +# automatically deletes all relevant information on that object from +# every appropriate INFORMATION_SCHEMA table. +# +--disable_warnings +DROP TABLE IF EXISTS test.t1_my_table; +DROP DATABASE IF EXISTS db_datadict; +--enable_warnings +CREATE DATABASE db_datadict; + +SELECT table_name FROM information_schema.tables +WHERE table_name LIKE 't1_my_table%'; +--replace_result $engine_type +eval +CREATE TABLE test.t1_my_table (f1 BIGINT) +DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci +COMMENT = 'Initial Comment' ENGINE = $engine_type; +# Settings used in CREATE TABLE must be visible in information_schema.tables. +--vertical_results +--replace_column 5 "#ENG#" 7 "#RF#" 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "#CRT" 16 "#UT#" 17 "#CT#" 19 "#CS#" +SELECT * FROM information_schema.tables +WHERE table_name = 't1_my_table'; +--horizontal_results +# +# Check modification of TABLE_NAME +SELECT table_name FROM information_schema.tables +WHERE table_name LIKE 't1_my_table%'; +RENAME TABLE test.t1_my_table TO test.t1_my_tablex; +SELECT table_name FROM information_schema.tables +WHERE table_name LIKE 't1_my_table%'; +# +# Check modification of TABLE_SCHEMA +SELECT table_schema,table_name FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +RENAME TABLE test.t1_my_tablex TO db_datadict.t1_my_tablex; +SELECT table_schema,table_name FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +# +# Check modification of ENGINE +--replace_result $engine_type +SELECT table_name, engine FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +--replace_result $other_engine_type +eval +ALTER TABLE db_datadict.t1_my_tablex +ENGINE = $other_engine_type; +--replace_result $other_engine_type +SELECT table_name, engine FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +# +# Check modification of TABLE_ROWS +SELECT table_name, table_rows FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +INSERT INTO db_datadict.t1_my_tablex VALUES(1),(2); +SELECT table_name, table_rows FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +# +# Check indirect modification of TABLE_COLLATION +SELECT table_name, table_collation FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +ALTER TABLE db_datadict.t1_my_tablex DEFAULT CHARACTER SET utf8; +SELECT table_name, table_collation FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +# Check direct modification of TABLE_COLLATION +SELECT table_name, table_collation FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +ALTER TABLE db_datadict.t1_my_tablex +DEFAULT CHARACTER SET latin1 COLLATE latin1_german1_ci; +SELECT table_name, table_collation FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +# +# Check modification of TABLE_COMMENT +SELECT table_name, TABLE_COMMENT FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +ALTER TABLE db_datadict.t1_my_tablex COMMENT 'Changed Comment'; +SELECT table_name, TABLE_COMMENT FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +# +# Check modification of AUTO_INCREMENT +SELECT table_name, AUTO_INCREMENT FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +ALTER TABLE db_datadict.t1_my_tablex +ADD f2 BIGINT AUTO_INCREMENT, ADD PRIMARY KEY (f2); +SELECT table_name, AUTO_INCREMENT FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +# +# Check modification of ROW_FORMAT +SELECT table_name, ROW_FORMAT FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +ALTER TABLE db_datadict.t1_my_tablex ROW_FORMAT = dynamic; +SELECT table_name, ROW_FORMAT FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +# +# Check "growth" of UPDATE_TIME and modification of CHECKSUM +SELECT table_name, checksum FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +ALTER TABLE db_datadict.t1_my_tablex CHECKSUM = 1; +SELECT table_name, checksum IS NOT NULL FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +SELECT UPDATE_TIME, checksum INTO @UPDATE_TIME, @checksum +FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +# Enforce a time difference bigger than the smallest unit (1 second). +--real_sleep 1.1 +INSERT INTO db_datadict.t1_my_tablex SET f1 = 3; +SELECT UPDATE_TIME > @UPDATE_TIME + AS "Is current UPDATE_TIME bigger than before last INSERT?" +FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +SELECT checksum <> @checksum + AS "Is current CHECKSUM different than before last INSERT?" +FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +# +# Information is used later +SELECT CREATE_TIME INTO @CREATE_TIME FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +# +# Check impact of DROP TABLE +SELECT table_name FROM information_schema.tables +WHERE table_name LIKE 't1_my_table%'; +DROP TABLE db_datadict.t1_my_tablex; +SELECT table_name FROM information_schema.tables +WHERE table_name LIKE 't1_my_table%'; +# +# Check "growth" of CREATE_TIME +--replace_result $other_engine_type +eval +CREATE TABLE test.t1_my_tablex (f1 BIGINT) +ENGINE = $other_engine_type; +SELECT CREATE_TIME > @CREATE_TIME + AS "Is current CREATE_TIME bigger than for the old dropped table?" +FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +DROP TABLE test.t1_my_tablex; +# +# Check a VIEW +CREATE VIEW test.t1_my_tablex AS SELECT 1; +--vertical_results +SELECT * FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +--horizontal_results +DROP VIEW test.t1_my_tablex; +SELECT table_name FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +# +# Check a temporary table +--replace_result $other_engine_type +eval +CREATE TEMPORARY TABLE test.t1_my_tablex +ENGINE = $other_engine_type + AS SELECT 1; +--vertical_results +SELECT table_name, table_type FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +--horizontal_results +DROP TEMPORARY TABLE test.t1_my_tablex; +# +# Check impact of DROP SCHEMA +--replace_result $engine_type +eval +CREATE TABLE db_datadict.t1_my_tablex +ENGINE = $engine_type AS +SELECT 1; +SELECT table_name FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +DROP DATABASE db_datadict; +SELECT table_name FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; + + +--echo ######################################################################## +--echo # Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and +--echo # DDL on INFORMATION_SCHEMA tables are not supported +--echo ######################################################################## +# 3.2.1.3: Ensure that no user may execute an INSERT statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.4: Ensure that no user may execute an UPDATE statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.5: Ensure that no user may execute a DELETE statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.8: Ensure that no user may create an index on an +# INFORMATION_SCHEMA table. +# 3.2.1.9: Ensure that no user may alter the definition of an +# INFORMATION_SCHEMA table. +# 3.2.1.10: Ensure that no user may drop an INFORMATION_SCHEMA table. +# 3.2.1.11: Ensure that no user may move an INFORMATION_SCHEMA table to any +# other database. +# 3.2.1.12: Ensure that no user may directly add to, alter, or delete any data +# in an INFORMATION_SCHEMA table. +# +--disable_warnings +DROP DATABASE IF EXISTS db_datadict; +--enable_warnings +CREATE DATABASE db_datadict; +--replace_result $engine_type +eval +CREATE TABLE db_datadict.t1 (f1 BIGINT) +ENGINE = $engine_type; + +--error ER_DBACCESS_DENIED_ERROR +INSERT INTO information_schema.tables +SELECT * FROM information_schema.tables; + +--error ER_DBACCESS_DENIED_ERROR +UPDATE information_schema.tables SET table_schema = 'test' +WHERE table_name = 't1'; + +--error ER_DBACCESS_DENIED_ERROR +DELETE FROM information_schema.tables WHERE table_name = 't1'; +--error ER_DBACCESS_DENIED_ERROR +TRUNCATE information_schema.tables; + +--error ER_DBACCESS_DENIED_ERROR +CREATE INDEX my_idx_on_tables ON information_schema.tables(table_schema); + +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.tables DROP PRIMARY KEY; +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.tables ADD f1 INT; + +--error ER_DBACCESS_DENIED_ERROR +DROP TABLE information_schema.tables; + +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.tables RENAME db_datadict.tables; +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.tables RENAME information_schema.xtables; + +# Cleanup +DROP DATABASE db_datadict; + diff --git a/mysql-test/suite/funcs_1/datadict/is_triggers.inc b/mysql-test/suite/funcs_1/datadict/is_triggers.inc new file mode 100644 index 00000000000..1e659f00485 --- /dev/null +++ b/mysql-test/suite/funcs_1/datadict/is_triggers.inc @@ -0,0 +1,254 @@ +# suite/funcs_1/datadict/is_triggers.inc +# +# Check the layout of information_schema.triggers and the impact of +# CREATE/ALTER/DROP TABLE/VIEW/SCHEMA ... on it. +# +# Note: +# This test is not intended +# - to show information about the all time existing triggers +# (there are no in the moment) within the databases information_schema +# and mysql +# - for checking storage engine properties +# Therefore please do not alter $engine_type and $other_engine_type. +# +# Author: +# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of +# testsuite funcs_1 +# Create this script based on older scripts and new code. +# Last Change: +# 2008-06-11 mleich Move t/is_triggers.test to this file and +# create variants for embedded/non embedded server. +# + +let $engine_type = MEMORY; +let $other_engine_type = MyISAM; + +let $is_table = TRIGGERS; + +# The table INFORMATION_SCHEMA.TRIGGERS must exist +eval SHOW TABLES FROM information_schema LIKE '$is_table'; + +--echo ####################################################################### +--echo # Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT +--echo ####################################################################### +# Ensure that every INFORMATION_SCHEMA table can be queried with a SELECT +# statement, just as if it were an ordinary user-defined table. +# +--source suite/funcs_1/datadict/is_table_query.inc + + +--echo ######################################################################### +--echo # Testcase 3.2.12.1: INFORMATION_SCHEMA.TRIGGERS layout +--echo ######################################################################### +# Ensure that the INFORMATION_SCHEMA.TRIGGERS table has the following columns, +# in the following order: +# +# TRIGGER_CATALOG NULL +# TRIGGER_SCHEMA name of the database in which the trigger occurs +# TRIGGER_NAME +# EVENT_MANIPULATION event associated with the trigger +# ('INSERT', 'DELETE', or 'UPDATE') +# EVENT_OBJECT_CATALOG NULL +# EVENT_OBJECT_SCHEMA database in which the table associated with the +# trigger occurs +# EVENT_OBJECT_TABLE name of the table associated with the trigger +# ACTION_ORDER 0 +# ACTION_CONDITION NULL +# ACTION_STATEMENT +# ACTION_ORIENTATION ROW +# ACTION_TIMING 'BEFORE' or 'AFTER' +# ACTION_REFERENCE_OLD_TABLE NULL +# ACTION_REFERENCE_NEW_TABLE NULL +# ACTION_REFERENCE_OLD_ROW OLD +# ACTION_REFERENCE_NEW_ROW NEW +# CREATED NULL (0) +# SQL_MODE server SQL mode that was in effect at the time +# when the trigger was created +# (also used during trigger execution) +# DEFINER who defined the trigger +# +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval DESCRIBE information_schema.$is_table; +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval SHOW CREATE TABLE information_schema.$is_table; +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval SHOW COLUMNS FROM information_schema.$is_table; + + +# Note: Retrieval of information within information_schema.columns about +# information_schema.tables is in is_columns_is.test. + +# Show that several columns are always NULL. +SELECT * FROM information_schema.triggers +WHERE trigger_catalog IS NOT NULL OR event_object_catalog IS NOT NULL + OR action_condition IS NOT NULL OR action_reference_old_table IS NOT NULL + OR action_reference_new_table IS NOT NULL; + + +--echo ################################################################################## +--echo # Testcase 3.2.18.2 + 3.2.18.3: INFORMATION_SCHEMA.TRIGGERS accessible information +--echo ################################################################################## +# 3.2.18.2: Ensure that the table shows the relevant information on every +# trigger on which the current user or PUBLIC has privileges. +# 3.2.18.3: Ensure that the table does not show any information on any trigger +# on which the current user and public have no privileges. +# The SUPER privilege is required for +# - creation of triggers +# - retrieval in INFORMATION_SCHEMA.TRIGGERS (affects size of result set) +# +--disable_warnings +DROP DATABASE IF EXISTS db_datadict; +--enable_warnings +CREATE DATABASE db_datadict; +--error 0,ER_CANNOT_USER +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +--error 0,ER_CANNOT_USER +DROP USER 'testuser2'@'localhost'; +CREATE USER 'testuser2'@'localhost'; +--error 0,ER_CANNOT_USER +DROP USER 'testuser3'@'localhost'; +CREATE USER 'testuser3'@'localhost'; +--error 0,ER_CANNOT_USER +DROP USER 'testuser4'@'localhost'; +CREATE USER 'testuser4'@'localhost'; + +GRANT SUPER ON *.* TO 'testuser1'@'localhost'; +GRANT SUPER ON *.* TO 'testuser3'@'localhost'; +GRANT SUPER ON *.* TO 'testuser4'@'localhost'; +GRANT ALL ON db_datadict.* TO 'testuser1'@'localhost' WITH GRANT OPTION; + +let $my_select = SELECT * FROM information_schema.triggers +WHERE trigger_name = 'trg1'; +let $my_show = SHOW TRIGGERS FROM db_datadict; +--echo # Establish connection testuser1 (user=testuser1) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser1, localhost, testuser1, , db_datadict); +--replace_result $engine_type +eval +CREATE TABLE db_datadict.t1 (f1 INT, f2 INT, f3 INT) +ENGINE = $engine_type; +CREATE TRIGGER trg1 BEFORE INSERT +ON db_datadict.t1 FOR EACH ROW SET @test_before = 2, new.f1 = @test_before; +GRANT ALL ON db_datadict.t1 TO 'testuser2'@'localhost'; +GRANT SELECT ON db_datadict.t1 TO 'testuser3'@'localhost'; +eval $my_select; +eval $my_show; + +--echo # Establish connection testuser2 (user=testuser2) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser2, localhost, testuser2, , db_datadict); +SHOW GRANTS FOR 'testuser2'@'localhost'; +--echo # No SUPER Privilege --> no result for query +eval $my_select; +eval $my_show; + +--echo # Establish connection testuser3 (user=testuser3) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser3, localhost, testuser3, , test); +SHOW GRANTS FOR 'testuser3'@'localhost'; +--echo # SUPER Privilege + SELECT Privilege on t1 --> result for query +eval $my_select; +eval $my_show; + +--echo # Establish connection testuser4 (user=testuser4) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser4, localhost, testuser4, , test); +SHOW GRANTS FOR 'testuser4'@'localhost'; +--echo # SUPER Privilege + no SELECT Privilege on t1 --> no result for query +eval $my_select; +eval $my_show; + +--echo # Switch to connection default and close connections testuser1 - testuser4 +connection default; +disconnect testuser1; +disconnect testuser2; +disconnect testuser3; +disconnect testuser4; +eval $my_select; +eval $my_show; +DROP USER 'testuser1'@'localhost'; +DROP USER 'testuser2'@'localhost'; +DROP USER 'testuser3'@'localhost'; +DROP USER 'testuser4'@'localhost'; +DROP DATABASE db_datadict; + + +--echo ######################################################################### +--echo # 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.TRIGGERS modifications +--echo ######################################################################### +# 3.2.1.13: Ensure that the creation of any new database object (e.g. table or +# column) automatically inserts all relevant information on that +# object into every appropriate INFORMATION_SCHEMA table. +# 3.2.1.14: Ensure that the alteration of any existing database object +# automatically updates all relevant information on that object in +# every appropriate INFORMATION_SCHEMA table. +# 3.2.1.15: Ensure that the dropping of any existing database object +# automatically deletes all relevant information on that object from +# every appropriate INFORMATION_SCHEMA table. +# FIXME: To be implemented + + +--echo ######################################################################## +--echo # Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and +--echo # DDL on INFORMATION_SCHEMA tables are not supported +--echo ######################################################################## +# 3.2.1.3: Ensure that no user may execute an INSERT statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.4: Ensure that no user may execute an UPDATE statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.5: Ensure that no user may execute a DELETE statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.8: Ensure that no user may create an index on an +# INFORMATION_SCHEMA table. +# 3.2.1.9: Ensure that no user may alter the definition of an +# INFORMATION_SCHEMA table. +# 3.2.1.10: Ensure that no user may drop an INFORMATION_SCHEMA table. +# 3.2.1.11: Ensure that no user may move an INFORMATION_SCHEMA table to any +# other database. +# 3.2.1.12: Ensure that no user may directly add to, alter, or delete any data +# in an INFORMATION_SCHEMA table. +# +--disable_warnings +DROP DATABASE IF EXISTS db_datadict; +--enable_warnings +CREATE DATABASE db_datadict; +--replace_result $engine_type +eval +CREATE TABLE db_datadict.t1 (f1 BIGINT) +ENGINE = $engine_type; +CREATE TRIGGER db_datadict.trg1 BEFORE INSERT +ON db_datadict.t1 FOR EACH ROW SET @test_before = 2, new.f1 = @test_before; + +--error ER_DBACCESS_DENIED_ERROR +INSERT INTO information_schema.triggers +SELECT * FROM information_schema.triggers; + +--error ER_DBACCESS_DENIED_ERROR +UPDATE information_schema.triggers SET trigger_schema = 'test' +WHERE table_name = 't1'; + +--error ER_DBACCESS_DENIED_ERROR +DELETE FROM information_schema.triggers WHERE trigger_name = 't1'; +--error ER_DBACCESS_DENIED_ERROR +TRUNCATE information_schema.triggers; + +--error ER_DBACCESS_DENIED_ERROR +CREATE INDEX my_idx_on_triggers ON information_schema.triggers(trigger_schema); + +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.triggers DROP PRIMARY KEY; +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.triggers ADD f1 INT; + +--error ER_DBACCESS_DENIED_ERROR +DROP TABLE information_schema.triggers; + +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.triggers RENAME db_datadict.triggers; +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.triggers RENAME information_schema.xtriggers; + +# Cleanup +DROP DATABASE db_datadict; + diff --git a/mysql-test/suite/funcs_1/datadict/is_views.inc b/mysql-test/suite/funcs_1/datadict/is_views.inc new file mode 100644 index 00000000000..32e66e4f684 --- /dev/null +++ b/mysql-test/suite/funcs_1/datadict/is_views.inc @@ -0,0 +1,306 @@ +# suite/funcs_1/datadict/is_views.inc +# +# Check the layout of information_schema.views and the impact of +# CREATE/ALTER/DROP TABLE/VIEW/SCHEMA ... on it. +# +# Note: +# - This test should not check storage engine properties. +# - Please do not change the storage engines used within this test +# except you know that the impact is acceptable. +# Some storage engines might not support the modification of +# properties like in the following tests. +# +# Author: +# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of +# testsuite funcs_1 +# Create this script based on older scripts and new code. +# Last Change: +# 2008-06-11 mleich Move t/is_views.test to this file and +# create variants for embedded/non embedded server. +# + +let $engine_type = MEMORY; +let $other_engine_type = MyISAM; + +let $is_table = VIEWS; + +# The table INFORMATION_SCHEMA.VIEWS must exist +eval SHOW TABLES FROM information_schema LIKE '$is_table'; + +--echo ####################################################################### +--echo # Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT +--echo ####################################################################### +# Ensure that every INFORMATION_SCHEMA table can be queried with a SELECT +# statement, just as if it were an ordinary user-defined table. +# +--source suite/funcs_1/datadict/is_table_query.inc + + +--echo ######################################################################### +--echo # Testcase 3.2.13.1: INFORMATION_SCHEMA.VIEWS layout +--echo ######################################################################### +# Ensure that the INFORMATION_SCHEMA.VIEWS table has the following columns, +# in the following order: +# +# TABLE_CATALOG (always shows NULL), +# TABLE_SCHEMA (shows the database, or schema, in which an accessible +# view resides), +# TABLE_NAME (shows the name of a view accessible to the current user), +# VIEW_DEFINITION (shows the SELECT statement that makes up the +# view's definition), +# CHECK_OPTION (shows the value of the WITH CHECK OPTION clause used to define +# the view, either NONE, LOCAL or CASCADED), +# IS_UPDATABLE (shows whether the view is an updatable view), +# DEFINER (added with 5.0.14), +# SECURITY_TYPE (added with 5.0.14). +# +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval DESCRIBE information_schema.$is_table; +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval SHOW CREATE TABLE information_schema.$is_table; +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval SHOW COLUMNS FROM information_schema.$is_table; + +# Note: Retrieval of information within information_schema.columns about +# information_schema.views is in is_columns_is.test. + +# Show that TABLE_CATALOG is always NULL. +SELECT table_catalog, table_schema, table_name +FROM information_schema.views WHERE table_catalog IS NOT NULL; + + +--echo ################################################################################ +--echo # Testcase 3.2.13.2 + 3.2.13.3: INFORMATION_SCHEMA.VIEWS accessible information +--echo ################################################################################ +# 3.2.13.2: Ensure that the table shows the relevant information on every view for +# which the current user or PUBLIC has the SHOW CREATE VIEW privilege. +# 3.2.13.3: Ensure that the table does not show any information on any views for which +# the current user and PUBLIC have no SHOW CREATE VIEW privilege. +# +--disable_warnings +DROP DATABASE IF EXISTS db_datadict; +--enable_warnings +CREATE DATABASE db_datadict; + +--error 0,ER_CANNOT_USER +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +--error 0,ER_CANNOT_USER +DROP USER 'testuser2'@'localhost'; +CREATE USER 'testuser2'@'localhost'; +--error 0,ER_CANNOT_USER +DROP USER 'test_no_views'@'localhost'; +CREATE USER 'test_no_views'@'localhost'; + +--replace_result $engine_type +eval +CREATE TABLE db_datadict.t1(f1 INT, f2 INT, f3 INT) +ENGINE = $engine_type; +CREATE VIEW db_datadict.v_granted_to_1 AS SELECT * FROM db_datadict.t1; +CREATE VIEW db_datadict.v_granted_glob AS SELECT f2, f3 FROM db_datadict.t1; + +GRANT SELECT ON db_datadict.t1 TO 'testuser1'@'localhost'; +GRANT SELECT ON db_datadict.v_granted_to_1 TO 'testuser1'@'localhost'; +GRANT SHOW VIEW, CREATE VIEW ON db_datadict.* TO 'testuser2'@'localhost'; + +let $select = SELECT * FROM information_schema.views +WHERE table_schema = 'db_datadict' ORDER BY table_name; +eval $select; + +--echo # Establish connection testuser1 (user=testuser1) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser1, localhost, testuser1, , test); +eval $select; + +--echo # Establish connection testuser2 (user=testuser2) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser2, localhost, testuser2, , test); +eval $select; + +--echo # Establish connection test_no_views (user=test_no_views) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (test_no_views, localhost, test_no_views, , test); +eval $select; + +# Cleanup +--echo # Switch to connection default and close all other connections +connection default; +disconnect testuser1; +disconnect testuser2; +disconnect test_no_views; +DROP USER 'testuser1'@'localhost'; +DROP USER 'testuser2'@'localhost'; +DROP USER 'test_no_views'@'localhost'; +DROP DATABASE db_datadict; + +--echo ######################################################################### +--echo # 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.VIEWS modifications +--echo ######################################################################### +# 3.2.1.13: Ensure that the creation of any new database object (e.g. table or +# column) automatically inserts all relevant information on that +# object into every appropriate INFORMATION_SCHEMA table. +# 3.2.1.14: Ensure that the alteration of any existing database object +# automatically updates all relevant information on that object in +# every appropriate INFORMATION_SCHEMA table. +# 3.2.1.15: Ensure that the dropping of any existing database object +# automatically deletes all relevant information on that object from +# every appropriate INFORMATION_SCHEMA table. +# +--disable_warnings +DROP TABLE IF EXISTS test.t1_my_table; +DROP DATABASE IF EXISTS db_datadict; +--enable_warnings +CREATE DATABASE db_datadict; +--replace_result $engine_type +eval +CREATE TABLE test.t1_table (f1 BIGINT, f2 CHAR(10)) +DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci +ENGINE = $engine_type; +--error 0,ER_CANNOT_USER +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; + +# Check just created VIEW +SELECT * FROM information_schema.views +WHERE table_name LIKE 't1_%'; +CREATE VIEW test.t1_view AS SELECT DISTINCT f1 FROM test.t1_table; +SELECT * FROM information_schema.views +WHERE table_name LIKE 't1_%'; +# +# Check modification of DEFINER, SECURITY_TYPE, IS_UPDATABLE, VIEW_DEFINITION, +# CHECK_OPTION +SELECT table_name,definer FROM information_schema.views +WHERE table_name = 't1_view'; +ALTER DEFINER = 'testuser1'@'localhost' VIEW test.t1_view AS +SELECT DISTINCT f1 FROM test.t1_table; +# The next result set could suffer from +# Bug#22763 Disrepancy between SHOW CREATE VIEW and I_S.VIEWS +# because the VIEW definition is missing. +# Therefore we exclude the problematic columns from the result set. +SELECT table_name,definer,security_type FROM information_schema.views +WHERE table_name LIKE 't1_%'; +ALTER DEFINER = 'root'@'localhost' SQL SECURITY INVOKER VIEW test.t1_view AS +SELECT f1 FROM test.t1_table WITH LOCAL CHECK OPTION; +SELECT table_name,definer,security_type FROM information_schema.views +WHERE table_name LIKE 't1_%'; +# +# Check modification of TABLE_SCHEMA +SELECT table_schema,table_name FROM information_schema.views +WHERE table_name LIKE 't1_%' +ORDER BY table_schema,table_name; +--error ER_FORBID_SCHEMA_CHANGE +RENAME TABLE test.t1_view TO db_datadict.t1_view; +# Workaround for missing move to another database +DROP VIEW test.t1_view; +CREATE VIEW db_datadict.t1_view AS SELECT * FROM test.t1_table; +SELECT table_schema,table_name FROM information_schema.views +WHERE table_name LIKE 't1_%' +ORDER BY table_schema,table_name; +# +# Check modification of TABLE_NAME +SELECT table_name FROM information_schema.views +WHERE table_name LIKE 't1_%' +ORDER BY table_name; +RENAME TABLE db_datadict.t1_view TO db_datadict.t1_viewx; +SELECT table_name FROM information_schema.views +WHERE table_name LIKE 't1_%' +ORDER BY table_name; +# +# Check impact of DROP VIEW +SELECT table_name FROM information_schema.views +WHERE table_name LIKE 't1_%' +ORDER BY table_name; +DROP VIEW db_datadict.t1_viewx; +SELECT table_name FROM information_schema.views +WHERE table_name LIKE 't1_%' +ORDER BY table_name; +CREATE VIEW db_datadict.t1_view AS SELECT * FROM test.t1_table; +# +# Check impact of DROP base TABLE of VIEW +SELECT table_name FROM information_schema.views +WHERE table_name LIKE 't1_%' +ORDER BY table_name; +DROP TABLE test.t1_table; +SELECT table_name FROM information_schema.views +WHERE table_name LIKE 't1_%' +ORDER BY table_name; +--replace_result $engine_type +eval +CREATE TABLE test.t1_table (f1 BIGINT, f2 CHAR(10)) +DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci COMMENT = 'Initial Comment' +ENGINE = $engine_type; +# +# Check impact of DROP SCHEMA +SELECT table_name FROM information_schema.views +WHERE table_name LIKE 't1_%' +ORDER BY table_name; +DROP DATABASE db_datadict; +SELECT table_name FROM information_schema.views +WHERE table_name LIKE 't1_%' +ORDER BY table_name; + +# Cleanup +DROP USER 'testuser1'@'localhost'; +DROP TABLE test.t1_table; + +--echo ######################################################################## +--echo # Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and +--echo # DDL on INFORMATION_SCHEMA table are not supported +--echo ######################################################################## +# 3.2.1.3: Ensure that no user may execute an INSERT statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.4: Ensure that no user may execute an UPDATE statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.5: Ensure that no user may execute a DELETE statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.8: Ensure that no user may create an index on an +# INFORMATION_SCHEMA table. +# 3.2.1.9: Ensure that no user may alter the definition of an +# INFORMATION_SCHEMA table. +# 3.2.1.10: Ensure that no user may drop an INFORMATION_SCHEMA table. +# 3.2.1.11: Ensure that no user may move an INFORMATION_SCHEMA table to any +# other database. +# 3.2.1.12: Ensure that no user may directly add to, alter, or delete any data +# in an INFORMATION_SCHEMA table. +# +--disable_warnings +DROP DATABASE IF EXISTS db_datadict; +--enable_warnings +CREATE DATABASE db_datadict; +CREATE VIEW db_datadict.v1 AS SELECT 1; + +--error ER_DBACCESS_DENIED_ERROR +INSERT INTO information_schema.views +SELECT * FROM information_schema.views; +--error ER_DBACCESS_DENIED_ERROR +INSERT INTO information_schema.views(table_schema, table_name) +VALUES ('db2', 'v2'); + +--error ER_DBACCESS_DENIED_ERROR +UPDATE information_schema.views SET table_schema = 'test' +WHERE table_name = 't1'; + +--error ER_DBACCESS_DENIED_ERROR +DELETE FROM information_schema.views WHERE table_name = 't1'; +--error ER_DBACCESS_DENIED_ERROR +TRUNCATE information_schema.views; + +--error ER_DBACCESS_DENIED_ERROR +CREATE INDEX my_idx_on_views ON information_schema.views(table_schema); + +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.views DROP PRIMARY KEY; +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.views ADD f1 INT; + +--error ER_DBACCESS_DENIED_ERROR +DROP TABLE information_schema.views; + +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.views RENAME db_datadict.views; +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.views RENAME information_schema.xviews; + +# Cleanup +DROP DATABASE db_datadict; + diff --git a/mysql-test/suite/funcs_1/datadict/tables.inc b/mysql-test/suite/funcs_1/datadict/tables.inc new file mode 100644 index 00000000000..5aa072d184c --- /dev/null +++ b/mysql-test/suite/funcs_1/datadict/tables.inc @@ -0,0 +1,55 @@ +# suite/funcs_1/datadict/tables.inc +# +# Auxiliary script to be sourced by +# is_tables_.test +# +# The variable $engine_type has to be assigned before sourcing ths script. +# +# Author: +# 2008-06-04 mleich Create this script based on older scripts and new code. +# + +# Just have some tables within different databases. +--disable_warnings +DROP DATABASE IF EXISTS test1; +DROP DATABASE IF EXISTS test2; +--enable_warnings +CREATE DATABASE test1; +CREATE DATABASE test2; + +--replace_result $engine_type +eval CREATE TABLE test1.t1 (f1 VARCHAR(20)) ENGINE = $engine_type; +--replace_result $engine_type +eval CREATE TABLE test1.t2 (f1 VARCHAR(20)) ENGINE = $engine_type; +--replace_result $engine_type +eval CREATE TABLE test2.t1 (f1 VARCHAR(20)) ENGINE = $engine_type; + +--source suite/funcs_1/datadict/tables2.inc +SHOW TABLES FROM test1; +SHOW TABLES FROM test2; + +# Create a low privileged user. +# Note: The database db_datadict is just a "home" for the low privileged user +# and not in the focus of testing. +--error 0,ER_CANNOT_USER +DROP USER testuser1@localhost; +CREATE USER testuser1@localhost; +GRANT SELECT ON test1.* TO testuser1@localhost; + +--echo # Establish connection testuser1 (user=testuser1) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser1,localhost,testuser1,,test1); +--source suite/funcs_1/datadict/tables2.inc +SHOW TABLES FROM test1; +# The lowprivileged user testuser1 will get here an error. +--disable_abort_on_error +SHOW TABLES FROM test2; +--enable_abort_on_error + +--echo # Switch to connection default and close connection testuser1 +connection default; +disconnect testuser1; +DROP USER testuser1@localhost; + +DROP DATABASE test1; +DROP DATABASE test2; diff --git a/mysql-test/suite/funcs_1/datadict/tables1.inc b/mysql-test/suite/funcs_1/datadict/tables1.inc index a03304028f6..2e054a9dcfb 100644 --- a/mysql-test/suite/funcs_1/datadict/tables1.inc +++ b/mysql-test/suite/funcs_1/datadict/tables1.inc @@ -2,8 +2,8 @@ # # Auxiliary script to be sourced by # is_tables_mysql.test +# is_tables_mysql_embedded.test # is_tables_is.test -# is_tables_.test # # Author: # 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of @@ -12,28 +12,27 @@ # --disable_warnings -DROP DATABASE IF EXISTS db_datadict; +DROP DATABASE IF EXISTS test1; --enable_warnings -CREATE DATABASE db_datadict; +CREATE DATABASE test1; --source suite/funcs_1/datadict/tables2.inc # Create a low privileged user. -# Note: The database db_datadict is just a "home" for the low privileged user +# Note: The database test1 is just a "home" for the low privileged user # and not in the focus of testing. --error 0,ER_CANNOT_USER DROP USER testuser1@localhost; CREATE USER testuser1@localhost; -GRANT SELECT ON db_datadict.* TO testuser1@localhost; +GRANT SELECT ON test1.* TO testuser1@localhost; --echo # Establish connection testuser1 (user=testuser1) --replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (testuser1,localhost,testuser1,,db_datadict); +connect (testuser1,localhost,testuser1,,test1); --source suite/funcs_1/datadict/tables2.inc --echo # Switch to connection default and close connection testuser1 connection default; disconnect testuser1; DROP USER testuser1@localhost; -DROP DATABASE db_datadict; - +DROP DATABASE test1; diff --git a/mysql-test/suite/funcs_1/datadict/tables2.inc b/mysql-test/suite/funcs_1/datadict/tables2.inc index 1066e52f8f0..6442aab493c 100644 --- a/mysql-test/suite/funcs_1/datadict/tables2.inc +++ b/mysql-test/suite/funcs_1/datadict/tables2.inc @@ -29,6 +29,8 @@ let $innodb_pattern = 'InnoDB free'; let $ndb_pattern = 'number_of_replicas'; --vertical_results +# We do not unify the engine name here, because the rowformat is +# specific to the engine. --replace_column 8 "#TBLR#" 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "#CRT#" 16 "#UT#" 17 "#CT#" 20 "#CO#" 21 "#TC#" eval SELECT *, @@ -44,4 +46,3 @@ FROM information_schema.tables $my_where ORDER BY table_schema,table_name; --horizontal_results - diff --git a/mysql-test/suite/funcs_1/include/bug28309_skip.inc b/mysql-test/suite/funcs_1/include/bug28309_skip.inc new file mode 100644 index 00000000000..18ba6641fad --- /dev/null +++ b/mysql-test/suite/funcs_1/include/bug28309_skip.inc @@ -0,0 +1,13 @@ +# Skip tests which suffer from +# Bug#28309 First insert violates unique constraint +# - was "memory" table empty? +# if the folowing conditions are fulfilled: +# - MySQL Version is 5.0 (Bug is fixed in 5.1 and up) +# - use of embedded server +# - run on a case insensitive filesystem +# +let $value= query_get_value(SHOW VARIABLES LIKE 'lower_case_file_system', Value, 1); +if (`SELECT '$value' = 'ON' AND VERSION() LIKE '5.0%embedded%'`) +{ + skip # Test requires backport of fix for Bug#28309 First insert violates unique constraint - was "memory" table empty ?; +} diff --git a/mysql-test/suite/funcs_1/include/innodb_tb1.inc b/mysql-test/suite/funcs_1/include/innodb_tb1.inc index 4fede496478..c6b6395d91f 100644 --- a/mysql-test/suite/funcs_1/include/innodb_tb1.inc +++ b/mysql-test/suite/funcs_1/include/innodb_tb1.inc @@ -7,7 +7,7 @@ create table tb1 ( f1 char(0), f2 char(0) binary, f3 char(0) ascii, -f4 tinytext unicode, +f4 tinytext, f5 text, f6 mediumtext, f7 longtext, diff --git a/mysql-test/suite/funcs_1/include/innodb_tb3.inc b/mysql-test/suite/funcs_1/include/innodb_tb3.inc index b8562d7acf2..ffdb20b7eef 100644 --- a/mysql-test/suite/funcs_1/include/innodb_tb3.inc +++ b/mysql-test/suite/funcs_1/include/innodb_tb3.inc @@ -10,7 +10,7 @@ f120 char ascii not null DEFAULT b'101', f121 tinytext, f122 text, f123 mediumtext, -f124 longtext unicode, +f124 longtext, f125 tinyblob, f126 blob, f127 mediumblob, diff --git a/mysql-test/suite/funcs_1/include/innodb_tb4.inc b/mysql-test/suite/funcs_1/include/innodb_tb4.inc index ef8fc240eca..c7c919c829d 100644 --- a/mysql-test/suite/funcs_1/include/innodb_tb4.inc +++ b/mysql-test/suite/funcs_1/include/innodb_tb4.inc @@ -55,13 +55,13 @@ f223 year(3), f224 year(4), f225 enum("1enum","2enum"), f226 set("1set","2set"), -f235 char(0) unicode, +f235 char(0), f236 char(90), f237 char(255) ascii, f238 varchar(0), f239 varchar(20000) binary, -f240 varchar(2000) unicode, -f241 char(100) unicode +f240 varchar(2000), +f241 char(100) ) engine = innodb; --replace_result $MYSQLTEST_VARDIR diff --git a/mysql-test/suite/funcs_1/include/memory_tb4.inc b/mysql-test/suite/funcs_1/include/memory_tb4.inc index f9cc1d53c52..0cf17127d32 100644 --- a/mysql-test/suite/funcs_1/include/memory_tb4.inc +++ b/mysql-test/suite/funcs_1/include/memory_tb4.inc @@ -55,12 +55,12 @@ f223 year(3), f224 year(4), f225 enum("1enum","2enum"), f226 set("1set","2set"), -f236 char(95) unicode, -f241 char(255) unicode, +f236 char(95), +f241 char(255), f237 char(130) binary, f238 varchar(25000) binary, f239 varbinary(0), -f240 varchar(1200) unicode +f240 varchar(1200) ) engine = memory; --replace_result $MYSQLTEST_VARDIR diff --git a/mysql-test/suite/funcs_1/include/myisam_tb1.inc b/mysql-test/suite/funcs_1/include/myisam_tb1.inc index da740cffaf3..1c95c6c53c0 100644 --- a/mysql-test/suite/funcs_1/include/myisam_tb1.inc +++ b/mysql-test/suite/funcs_1/include/myisam_tb1.inc @@ -7,7 +7,7 @@ create table tb1 ( f1 char, f2 char binary, f3 char ascii, -f4 tinytext unicode, +f4 tinytext, f5 text, f6 mediumtext, f7 longtext, diff --git a/mysql-test/suite/funcs_1/include/myisam_tb3.inc b/mysql-test/suite/funcs_1/include/myisam_tb3.inc index 4ee6388f3bc..209c2e13fbf 100644 --- a/mysql-test/suite/funcs_1/include/myisam_tb3.inc +++ b/mysql-test/suite/funcs_1/include/myisam_tb3.inc @@ -10,7 +10,7 @@ f120 char ascii not null DEFAULT b'101', f121 tinytext, f122 text, f123 mediumtext, -f124 longtext unicode, +f124 longtext, f125 tinyblob, f126 blob, f127 mediumblob, diff --git a/mysql-test/suite/funcs_1/include/myisam_tb4.inc b/mysql-test/suite/funcs_1/include/myisam_tb4.inc index 1f7d19fd061..d7e3a966579 100644 --- a/mysql-test/suite/funcs_1/include/myisam_tb4.inc +++ b/mysql-test/suite/funcs_1/include/myisam_tb4.inc @@ -63,13 +63,13 @@ f231 VARBINARY(192), f232 VARBINARY(27), f233 VARBINARY(64), f234 VARBINARY(192), -f235 char(255) unicode, +f235 char(255), f236 char(60) ascii, f237 char(255) binary, f238 varchar(0) binary, f239 varbinary(1000), -f240 varchar(120) unicode, -f241 char(100) unicode, +f240 varchar(120), +f241 char(100), f242 bit(30) ) engine = myisam; diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_frkey.result b/mysql-test/suite/funcs_1/r/innodb_trig_frkey.result index fe341762047..019a76b951c 100644 --- a/mysql-test/suite/funcs_1/r/innodb_trig_frkey.result +++ b/mysql-test/suite/funcs_1/r/innodb_trig_frkey.result @@ -1,141 +1,73 @@ -USE test; -drop table if exists tb3 ; -create table tb3 ( -f118 char not null DEFAULT 'a', -f119 char binary not null DEFAULT b'101', -f120 char ascii not null DEFAULT b'101', -f121 tinytext, -f122 text, -f123 mediumtext, -f124 longtext unicode, -f125 tinyblob, -f126 blob, -f127 mediumblob, -f128 longblob, -f129 binary not null DEFAULT b'101', -f130 tinyint not null DEFAULT 99, -f131 tinyint unsigned not null DEFAULT 99, -f132 tinyint zerofill not null DEFAULT 99, -f133 tinyint unsigned zerofill not null DEFAULT 99, -f134 smallint not null DEFAULT 999, -f135 smallint unsigned not null DEFAULT 999, -f136 smallint zerofill not null DEFAULT 999, -f137 smallint unsigned zerofill not null DEFAULT 999, -f138 mediumint not null DEFAULT 9999, -f139 mediumint unsigned not null DEFAULT 9999, -f140 mediumint zerofill not null DEFAULT 9999, -f141 mediumint unsigned zerofill not null DEFAULT 9999, -f142 int not null DEFAULT 99999, -f143 int unsigned not null DEFAULT 99999, -f144 int zerofill not null DEFAULT 99999, -f145 int unsigned zerofill not null DEFAULT 99999, -f146 bigint not null DEFAULT 999999, -f147 bigint unsigned not null DEFAULT 999999, -f148 bigint zerofill not null DEFAULT 999999, -f149 bigint unsigned zerofill not null DEFAULT 999999, -f150 decimal not null DEFAULT 999.999, -f151 decimal unsigned not null DEFAULT 999.17, -f152 decimal zerofill not null DEFAULT 999.999, -f153 decimal unsigned zerofill, -f154 decimal (0), -f155 decimal (64), -f156 decimal (0) unsigned, -f157 decimal (64) unsigned, -f158 decimal (0) zerofill, -f159 decimal (64) zerofill, -f160 decimal (0) unsigned zerofill, -f161 decimal (64) unsigned zerofill, -f162 decimal (0,0), -f163 decimal (63,30), -f164 decimal (0,0) unsigned, -f165 decimal (63,30) unsigned, -f166 decimal (0,0) zerofill, -f167 decimal (63,30) zerofill, -f168 decimal (0,0) unsigned zerofill, -f169 decimal (63,30) unsigned zerofill, -f170 numeric, -f171 numeric unsigned, -f172 numeric zerofill, -f173 numeric unsigned zerofill, -f174 numeric (0), -f175 numeric (64) -) engine = innodb; -Warnings: -Note 1265 Data truncated for column 'f150' at row 1 -Note 1265 Data truncated for column 'f151' at row 1 -Note 1265 Data truncated for column 'f152' at row 1 -load data infile '/std_data_ln/funcs_1/innodb_tb3.txt' -into table tb3; Testcase x.x.x.1: ----------------- DROP TABLE IF EXISTS t0, t1, t2; -CREATE TABLE t0 (col1 char(50)) ENGINE=innodb; -CREATE TABLE t1 (id INT NOT NULL, col1 char(50), -PRIMARY KEY (id)) ENGINE=innodb; +CREATE TABLE t0 (col1 CHAR(50)) +ENGINE = ; +CREATE TABLE t1 (id INT NOT NULL, col1 CHAR(50), PRIMARY KEY (id)) +ENGINE = ; CREATE TABLE t2 (id INT PRIMARY KEY, f_id INT, -INDEX par_ind (f_id), col1 char(50), -FOREIGN KEY (f_id) REFERENCES t1(id) -ON DELETE SET NULL) ENGINE=innodb; -insert into t1 values (1,'Department A'); -insert into t1 values (2,'Department B'); -insert into t1 values (3,'Department C'); -insert into t2 values (1,2,'Emp 1'); -insert into t2 values (2,2,'Emp 2'); -insert into t2 values (3,2,'Emp 3'); -create trigger trig after insert on t0 for each row -delete from t1 where col1=new.col1; -select * from t2; +INDEX par_ind (f_id), col1 CHAR(50), +FOREIGN KEY (f_id) REFERENCES t1(id) ON DELETE SET NULL) +ENGINE = ; +INSERT INTO t1 VALUES (1,'Department A'); +INSERT INTO t1 VALUES (2,'Department B'); +INSERT INTO t1 VALUES (3,'Department C'); +INSERT INTO t2 VALUES (1,2,'Emp 1'); +INSERT INTO t2 VALUES (2,2,'Emp 2'); +INSERT INTO t2 VALUES (3,2,'Emp 3'); +CREATE TRIGGER trig AFTER INSERT ON t0 FOR EACH ROW +DELETE FROM t1 WHERE col1 = new.col1; +SELECT * FROM t2; id f_id col1 1 2 Emp 1 2 2 Emp 2 3 2 Emp 3 -lock tables t0 write, t1 write; -insert into t0 values ('Department B'); -unlock tables; -select * from t2; +LOCK TABLES t0 WRITE, t1 WRITE; +INSERT INTO t0 VALUES ('Department B'); +UNLOCK TABLES; +SELECT * FROM t2; id f_id col1 1 NULL Emp 1 2 NULL Emp 2 3 NULL Emp 3 -drop trigger trig; -drop table t2, t1; +DROP TRIGGER trig; +DROP TABLE t2, t1; Testcase x.x.x.2: ----------------- DROP TABLE IF EXISTS t1, t2; -CREATE TABLE t1 (id INT NOT NULL, col1 char(50), -PRIMARY KEY (id)) ENGINE=innodb; +CREATE TABLE t1 (id INT NOT NULL, col1 CHAR(50), PRIMARY KEY (id)) +ENGINE = ; CREATE TABLE t2 (id INT PRIMARY KEY, f_id INT, -INDEX par_ind (f_id), col1 char(50), -FOREIGN KEY (f_id) REFERENCES t1(id) -ON UPDATE CASCADE) ENGINE=innodb; -insert into t1 values (1,'Department A'); -insert into t1 values (2,'Department B'); -insert into t1 values (3,'Department C'); -insert into t2 values (1,2,'Emp 1'); -insert into t2 values (2,3,'Emp 2'); -insert into t2 values (3,4,'Emp 3'); +INDEX par_ind (f_id), col1 CHAR(50), +FOREIGN KEY (f_id) REFERENCES t1(id) ON UPDATE CASCADE) +ENGINE = ; +INSERT INTO t1 VALUES (1,'Department A'); +INSERT INTO t1 VALUES (2,'Department B'); +INSERT INTO t1 VALUES (3,'Department C'); +INSERT INTO t2 VALUES (1,2,'Emp 1'); +INSERT INTO t2 VALUES (2,3,'Emp 2'); +insert into t2 VALUES (3,4,'Emp 3'); ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test/t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`f_id`) REFERENCES `t1` (`id`) ON UPDATE CASCADE) -create trigger tr_t2 before insert on t2 for each row -insert into t1 values(new.f_id, concat('New Department ', new.f_id)); -lock tables t1 write, t2 write; -insert into t2 values (3,4,'Emp 3'); -unlock tables; -select * from t1; +CREATE TRIGGER tr_t2 BEFORE INSERT ON t2 FOR EACH ROW +INSERT INTO t1 VALUES(new.f_id, CONCAT('New Department ', new.f_id)); +LOCK TABLES t1 WRITE, t2 WRITE; +INSERT INTO t2 VALUES (3,4,'Emp 3'); +UNLOCK TABLES; +SELECT * FROM t1; id col1 1 Department A 2 Department B 3 Department C 4 New Department 4 -select * from t2; +SELECT * FROM t2; id f_id col1 1 2 Emp 1 2 3 Emp 2 3 4 Emp 3 -drop trigger tr_t2; -drop table t2, t1, t0; +DROP TRIGGER tr_t2; +DROP TABLE t2, t1, t0; Foreign Key tests disabled (bug 11472 - stored in trig_frkey2.test) ------------------------------------------------------------------- -DROP TABLE test.tb3; diff --git a/mysql-test/suite/funcs_1/r/is_cml_innodb.result b/mysql-test/suite/funcs_1/r/is_cml_innodb.result new file mode 100644 index 00000000000..7c214cb770f --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_cml_innodb.result @@ -0,0 +1,97 @@ +USE test; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 +( +f1 CHAR UNICODE, +f2 CHAR(0) UNICODE, +f3 CHAR(10) UNICODE, +f5 VARCHAR(0) UNICODE, +f6 VARCHAR(255) UNICODE, +f7 VARCHAR(260) UNICODE, +f8 TEXT UNICODE, +f9 TINYTEXT UNICODE, +f10 MEDIUMTEXT UNICODE, +f11 LONGTEXT UNICODE +) ENGINE = InnoDB; +SELECT * FROM information_schema.columns +WHERE table_schema LIKE 'test%' +ORDER BY table_schema, table_name, column_name; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT +NULL test t1 f1 1 NULL YES char 1 2 NULL NULL ucs2 ucs2_general_ci char(1) select,insert,update,references +NULL test t1 f10 9 NULL YES mediumtext 8388607 16777215 NULL NULL ucs2 ucs2_general_ci mediumtext select,insert,update,references +NULL test t1 f11 10 NULL YES longtext 2147483647 4294967295 NULL NULL ucs2 ucs2_general_ci longtext select,insert,update,references +NULL test t1 f2 2 NULL YES char 0 0 NULL NULL ucs2 ucs2_general_ci char(0) select,insert,update,references +NULL test t1 f3 3 NULL YES char 10 20 NULL NULL ucs2 ucs2_general_ci char(10) select,insert,update,references +NULL test t1 f5 4 NULL YES varchar 0 0 NULL NULL ucs2 ucs2_general_ci varchar(0) select,insert,update,references +NULL test t1 f6 5 NULL YES varchar 255 510 NULL NULL ucs2 ucs2_general_ci varchar(255) select,insert,update,references +NULL test t1 f7 6 NULL YES varchar 260 520 NULL NULL ucs2 ucs2_general_ci varchar(260) select,insert,update,references +NULL test t1 f8 7 NULL YES text 32767 65535 NULL NULL ucs2 ucs2_general_ci text select,insert,update,references +NULL test t1 f9 8 NULL YES tinytext 127 255 NULL NULL ucs2 ucs2_general_ci tinytext select,insert,update,references +########################################################################## +# Show the quotient of CHARACTER_OCTET_LENGTH and CHARACTER_MAXIMUM_LENGTH +########################################################################## +SELECT DISTINCT +CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, +DATA_TYPE, +CHARACTER_SET_NAME, +COLLATION_NAME +FROM information_schema.columns +WHERE table_schema LIKE 'test%' +AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH = 1 +ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML; +COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME +SELECT DISTINCT +CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, +DATA_TYPE, +CHARACTER_SET_NAME, +COLLATION_NAME +FROM information_schema.columns +WHERE table_schema LIKE 'test%' +AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH <> 1 +ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML; +COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME +2.0000 char ucs2 ucs2_general_ci +2.0000 longtext ucs2 ucs2_general_ci +2.0000 mediumtext ucs2 ucs2_general_ci +2.0000 text ucs2 ucs2_general_ci +2.0000 varchar ucs2 ucs2_general_ci +2.0079 tinytext ucs2 ucs2_general_ci +SELECT DISTINCT +CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, +DATA_TYPE, +CHARACTER_SET_NAME, +COLLATION_NAME +FROM information_schema.columns +WHERE table_schema LIKE 'test%' +AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH IS NULL +ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML; +COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME +NULL char ucs2 ucs2_general_ci +NULL varchar ucs2 ucs2_general_ci +--> CHAR(0) is allowed (see manual), and here both CHARACHTER_* values +--> are 0, which is intended behavior, and the result of 0 / 0 IS NULL +SELECT CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, +TABLE_SCHEMA, +TABLE_NAME, +COLUMN_NAME, +DATA_TYPE, +CHARACTER_MAXIMUM_LENGTH, +CHARACTER_OCTET_LENGTH, +CHARACTER_SET_NAME, +COLLATION_NAME, +COLUMN_TYPE +FROM information_schema.columns +WHERE table_schema LIKE 'test%' +ORDER BY TABLE_SCHEMA, TABLE_NAME, ORDINAL_POSITION; +COL_CML TABLE_SCHEMA TABLE_NAME COLUMN_NAME DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE +2.0000 test t1 f1 char 1 2 ucs2 ucs2_general_ci char(1) +NULL test t1 f2 char 0 0 ucs2 ucs2_general_ci char(0) +2.0000 test t1 f3 char 10 20 ucs2 ucs2_general_ci char(10) +NULL test t1 f5 varchar 0 0 ucs2 ucs2_general_ci varchar(0) +2.0000 test t1 f6 varchar 255 510 ucs2 ucs2_general_ci varchar(255) +2.0000 test t1 f7 varchar 260 520 ucs2 ucs2_general_ci varchar(260) +2.0000 test t1 f8 text 32767 65535 ucs2 ucs2_general_ci text +2.0079 test t1 f9 tinytext 127 255 ucs2 ucs2_general_ci tinytext +2.0000 test t1 f10 mediumtext 8388607 16777215 ucs2 ucs2_general_ci mediumtext +2.0000 test t1 f11 longtext 2147483647 4294967295 ucs2 ucs2_general_ci longtext +DROP TABLE t1; diff --git a/mysql-test/suite/funcs_1/r/is_cml_memory.result b/mysql-test/suite/funcs_1/r/is_cml_memory.result new file mode 100644 index 00000000000..fe4b018cec3 --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_cml_memory.result @@ -0,0 +1,82 @@ +SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION'; +USE test; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 +( +f1 CHAR UNICODE, +f2 CHAR(0) UNICODE, +f3 CHAR(10) UNICODE, +f5 VARCHAR(0) UNICODE, +f6 VARCHAR(255) UNICODE, +f7 VARCHAR(260) UNICODE +) ENGINE = MEMORY; +SELECT * FROM information_schema.columns +WHERE table_schema LIKE 'test%' +ORDER BY table_schema, table_name, column_name; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT +NULL test t1 f1 1 NULL YES char 1 2 NULL NULL ucs2 ucs2_general_ci char(1) select,insert,update,references +NULL test t1 f2 2 NULL YES char 0 0 NULL NULL ucs2 ucs2_general_ci char(0) select,insert,update,references +NULL test t1 f3 3 NULL YES char 10 20 NULL NULL ucs2 ucs2_general_ci char(10) select,insert,update,references +NULL test t1 f5 4 NULL YES varchar 0 0 NULL NULL ucs2 ucs2_general_ci varchar(0) select,insert,update,references +NULL test t1 f6 5 NULL YES varchar 255 510 NULL NULL ucs2 ucs2_general_ci varchar(255) select,insert,update,references +NULL test t1 f7 6 NULL YES varchar 260 520 NULL NULL ucs2 ucs2_general_ci varchar(260) select,insert,update,references +########################################################################## +# Show the quotient of CHARACTER_OCTET_LENGTH and CHARACTER_MAXIMUM_LENGTH +########################################################################## +SELECT DISTINCT +CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, +DATA_TYPE, +CHARACTER_SET_NAME, +COLLATION_NAME +FROM information_schema.columns +WHERE table_schema LIKE 'test%' +AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH = 1 +ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML; +COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME +SELECT DISTINCT +CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, +DATA_TYPE, +CHARACTER_SET_NAME, +COLLATION_NAME +FROM information_schema.columns +WHERE table_schema LIKE 'test%' +AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH <> 1 +ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML; +COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME +2.0000 char ucs2 ucs2_general_ci +2.0000 varchar ucs2 ucs2_general_ci +SELECT DISTINCT +CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, +DATA_TYPE, +CHARACTER_SET_NAME, +COLLATION_NAME +FROM information_schema.columns +WHERE table_schema LIKE 'test%' +AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH IS NULL +ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML; +COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME +NULL char ucs2 ucs2_general_ci +NULL varchar ucs2 ucs2_general_ci +--> CHAR(0) is allowed (see manual), and here both CHARACHTER_* values +--> are 0, which is intended behavior, and the result of 0 / 0 IS NULL +SELECT CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, +TABLE_SCHEMA, +TABLE_NAME, +COLUMN_NAME, +DATA_TYPE, +CHARACTER_MAXIMUM_LENGTH, +CHARACTER_OCTET_LENGTH, +CHARACTER_SET_NAME, +COLLATION_NAME, +COLUMN_TYPE +FROM information_schema.columns +WHERE table_schema LIKE 'test%' +ORDER BY TABLE_SCHEMA, TABLE_NAME, ORDINAL_POSITION; +COL_CML TABLE_SCHEMA TABLE_NAME COLUMN_NAME DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE +2.0000 test t1 f1 char 1 2 ucs2 ucs2_general_ci char(1) +NULL test t1 f2 char 0 0 ucs2 ucs2_general_ci char(0) +2.0000 test t1 f3 char 10 20 ucs2 ucs2_general_ci char(10) +NULL test t1 f5 varchar 0 0 ucs2 ucs2_general_ci varchar(0) +2.0000 test t1 f6 varchar 255 510 ucs2 ucs2_general_ci varchar(255) +2.0000 test t1 f7 varchar 260 520 ucs2 ucs2_general_ci varchar(260) +DROP TABLE t1; diff --git a/mysql-test/suite/funcs_1/r/is_cml_myisam.result b/mysql-test/suite/funcs_1/r/is_cml_myisam.result new file mode 100644 index 00000000000..9808b1c1793 --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_cml_myisam.result @@ -0,0 +1,98 @@ +SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION'; +USE test; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 +( +f1 CHAR UNICODE, +f2 CHAR(0) UNICODE, +f3 CHAR(10) UNICODE, +f5 VARCHAR(0) UNICODE, +f6 VARCHAR(255) UNICODE, +f7 VARCHAR(260) UNICODE, +f8 TEXT UNICODE, +f9 TINYTEXT UNICODE, +f10 MEDIUMTEXT UNICODE, +f11 LONGTEXT UNICODE +) ENGINE = MyISAM; +SELECT * FROM information_schema.columns +WHERE table_schema LIKE 'test%' +ORDER BY table_schema, table_name, column_name; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT +NULL test t1 f1 1 NULL YES char 1 2 NULL NULL ucs2 ucs2_general_ci char(1) select,insert,update,references +NULL test t1 f10 9 NULL YES mediumtext 8388607 16777215 NULL NULL ucs2 ucs2_general_ci mediumtext select,insert,update,references +NULL test t1 f11 10 NULL YES longtext 2147483647 4294967295 NULL NULL ucs2 ucs2_general_ci longtext select,insert,update,references +NULL test t1 f2 2 NULL YES char 0 0 NULL NULL ucs2 ucs2_general_ci char(0) select,insert,update,references +NULL test t1 f3 3 NULL YES char 10 20 NULL NULL ucs2 ucs2_general_ci char(10) select,insert,update,references +NULL test t1 f5 4 NULL YES varchar 0 0 NULL NULL ucs2 ucs2_general_ci varchar(0) select,insert,update,references +NULL test t1 f6 5 NULL YES varchar 255 510 NULL NULL ucs2 ucs2_general_ci varchar(255) select,insert,update,references +NULL test t1 f7 6 NULL YES varchar 260 520 NULL NULL ucs2 ucs2_general_ci varchar(260) select,insert,update,references +NULL test t1 f8 7 NULL YES text 32767 65535 NULL NULL ucs2 ucs2_general_ci text select,insert,update,references +NULL test t1 f9 8 NULL YES tinytext 127 255 NULL NULL ucs2 ucs2_general_ci tinytext select,insert,update,references +########################################################################## +# Show the quotient of CHARACTER_OCTET_LENGTH and CHARACTER_MAXIMUM_LENGTH +########################################################################## +SELECT DISTINCT +CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, +DATA_TYPE, +CHARACTER_SET_NAME, +COLLATION_NAME +FROM information_schema.columns +WHERE table_schema LIKE 'test%' +AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH = 1 +ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML; +COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME +SELECT DISTINCT +CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, +DATA_TYPE, +CHARACTER_SET_NAME, +COLLATION_NAME +FROM information_schema.columns +WHERE table_schema LIKE 'test%' +AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH <> 1 +ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML; +COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME +2.0000 char ucs2 ucs2_general_ci +2.0000 longtext ucs2 ucs2_general_ci +2.0000 mediumtext ucs2 ucs2_general_ci +2.0000 text ucs2 ucs2_general_ci +2.0000 varchar ucs2 ucs2_general_ci +2.0079 tinytext ucs2 ucs2_general_ci +SELECT DISTINCT +CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, +DATA_TYPE, +CHARACTER_SET_NAME, +COLLATION_NAME +FROM information_schema.columns +WHERE table_schema LIKE 'test%' +AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH IS NULL +ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML; +COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME +NULL char ucs2 ucs2_general_ci +NULL varchar ucs2 ucs2_general_ci +--> CHAR(0) is allowed (see manual), and here both CHARACHTER_* values +--> are 0, which is intended behavior, and the result of 0 / 0 IS NULL +SELECT CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, +TABLE_SCHEMA, +TABLE_NAME, +COLUMN_NAME, +DATA_TYPE, +CHARACTER_MAXIMUM_LENGTH, +CHARACTER_OCTET_LENGTH, +CHARACTER_SET_NAME, +COLLATION_NAME, +COLUMN_TYPE +FROM information_schema.columns +WHERE table_schema LIKE 'test%' +ORDER BY TABLE_SCHEMA, TABLE_NAME, ORDINAL_POSITION; +COL_CML TABLE_SCHEMA TABLE_NAME COLUMN_NAME DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE +2.0000 test t1 f1 char 1 2 ucs2 ucs2_general_ci char(1) +NULL test t1 f2 char 0 0 ucs2 ucs2_general_ci char(0) +2.0000 test t1 f3 char 10 20 ucs2 ucs2_general_ci char(10) +NULL test t1 f5 varchar 0 0 ucs2 ucs2_general_ci varchar(0) +2.0000 test t1 f6 varchar 255 510 ucs2 ucs2_general_ci varchar(255) +2.0000 test t1 f7 varchar 260 520 ucs2 ucs2_general_ci varchar(260) +2.0000 test t1 f8 text 32767 65535 ucs2 ucs2_general_ci text +2.0079 test t1 f9 tinytext 127 255 ucs2 ucs2_general_ci tinytext +2.0000 test t1 f10 mediumtext 8388607 16777215 ucs2 ucs2_general_ci mediumtext +2.0000 test t1 f11 longtext 2147483647 4294967295 ucs2 ucs2_general_ci longtext +DROP TABLE t1; diff --git a/mysql-test/suite/funcs_1/r/is_cml_ndb.result b/mysql-test/suite/funcs_1/r/is_cml_ndb.result new file mode 100644 index 00000000000..ba6a0589ae0 --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_cml_ndb.result @@ -0,0 +1,97 @@ +USE test; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 +( +f1 CHAR UNICODE, +f2 CHAR(0) UNICODE, +f3 CHAR(10) UNICODE, +f5 VARCHAR(0) UNICODE, +f6 VARCHAR(255) UNICODE, +f7 VARCHAR(260) UNICODE, +f8 TEXT UNICODE, +f9 TINYTEXT UNICODE, +f10 MEDIUMTEXT UNICODE, +f11 LONGTEXT UNICODE +) ENGINE = NDB; +SELECT * FROM information_schema.columns +WHERE table_schema LIKE 'test%' +ORDER BY table_schema, table_name, column_name; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT +NULL test t1 f1 1 NULL YES char 1 2 NULL NULL ucs2 ucs2_general_ci char(1) select,insert,update,references +NULL test t1 f10 9 NULL YES mediumtext 8388607 16777215 NULL NULL ucs2 ucs2_general_ci mediumtext select,insert,update,references +NULL test t1 f11 10 NULL YES longtext 2147483647 4294967295 NULL NULL ucs2 ucs2_general_ci longtext select,insert,update,references +NULL test t1 f2 2 NULL YES char 0 0 NULL NULL ucs2 ucs2_general_ci char(0) select,insert,update,references +NULL test t1 f3 3 NULL YES char 10 20 NULL NULL ucs2 ucs2_general_ci char(10) select,insert,update,references +NULL test t1 f5 4 NULL YES varchar 0 0 NULL NULL ucs2 ucs2_general_ci varchar(0) select,insert,update,references +NULL test t1 f6 5 NULL YES varchar 255 510 NULL NULL ucs2 ucs2_general_ci varchar(255) select,insert,update,references +NULL test t1 f7 6 NULL YES varchar 260 520 NULL NULL ucs2 ucs2_general_ci varchar(260) select,insert,update,references +NULL test t1 f8 7 NULL YES text 32767 65535 NULL NULL ucs2 ucs2_general_ci text select,insert,update,references +NULL test t1 f9 8 NULL YES tinytext 127 255 NULL NULL ucs2 ucs2_general_ci tinytext select,insert,update,references +########################################################################## +# Show the quotient of CHARACTER_OCTET_LENGTH and CHARACTER_MAXIMUM_LENGTH +########################################################################## +SELECT DISTINCT +CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, +DATA_TYPE, +CHARACTER_SET_NAME, +COLLATION_NAME +FROM information_schema.columns +WHERE table_schema LIKE 'test%' +AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH = 1 +ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML; +COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME +SELECT DISTINCT +CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, +DATA_TYPE, +CHARACTER_SET_NAME, +COLLATION_NAME +FROM information_schema.columns +WHERE table_schema LIKE 'test%' +AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH <> 1 +ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML; +COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME +2.0000 char ucs2 ucs2_general_ci +2.0000 longtext ucs2 ucs2_general_ci +2.0000 mediumtext ucs2 ucs2_general_ci +2.0000 text ucs2 ucs2_general_ci +2.0000 varchar ucs2 ucs2_general_ci +2.0079 tinytext ucs2 ucs2_general_ci +SELECT DISTINCT +CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, +DATA_TYPE, +CHARACTER_SET_NAME, +COLLATION_NAME +FROM information_schema.columns +WHERE table_schema LIKE 'test%' +AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH IS NULL +ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML; +COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME +NULL char ucs2 ucs2_general_ci +NULL varchar ucs2 ucs2_general_ci +--> CHAR(0) is allowed (see manual), and here both CHARACHTER_* values +--> are 0, which is intended behavior, and the result of 0 / 0 IS NULL +SELECT CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, +TABLE_SCHEMA, +TABLE_NAME, +COLUMN_NAME, +DATA_TYPE, +CHARACTER_MAXIMUM_LENGTH, +CHARACTER_OCTET_LENGTH, +CHARACTER_SET_NAME, +COLLATION_NAME, +COLUMN_TYPE +FROM information_schema.columns +WHERE table_schema LIKE 'test%' +ORDER BY TABLE_SCHEMA, TABLE_NAME, ORDINAL_POSITION; +COL_CML TABLE_SCHEMA TABLE_NAME COLUMN_NAME DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE +2.0000 test t1 f1 char 1 2 ucs2 ucs2_general_ci char(1) +NULL test t1 f2 char 0 0 ucs2 ucs2_general_ci char(0) +2.0000 test t1 f3 char 10 20 ucs2 ucs2_general_ci char(10) +NULL test t1 f5 varchar 0 0 ucs2 ucs2_general_ci varchar(0) +2.0000 test t1 f6 varchar 255 510 ucs2 ucs2_general_ci varchar(255) +2.0000 test t1 f7 varchar 260 520 ucs2 ucs2_general_ci varchar(260) +2.0000 test t1 f8 text 32767 65535 ucs2 ucs2_general_ci text +2.0079 test t1 f9 tinytext 127 255 ucs2 ucs2_general_ci tinytext +2.0000 test t1 f10 mediumtext 8388607 16777215 ucs2 ucs2_general_ci mediumtext +2.0000 test t1 f11 longtext 2147483647 4294967295 ucs2 ucs2_general_ci longtext +DROP TABLE t1; diff --git a/mysql-test/suite/funcs_1/r/is_columns_innodb.result b/mysql-test/suite/funcs_1/r/is_columns_innodb.result index d80ab62a987..aaeb58a3475 100644 --- a/mysql-test/suite/funcs_1/r/is_columns_innodb.result +++ b/mysql-test/suite/funcs_1/r/is_columns_innodb.result @@ -6,7 +6,7 @@ create table tb1 ( f1 char(0), f2 char(0) binary, f3 char(0) ascii, -f4 tinytext unicode, +f4 tinytext, f5 text, f6 mediumtext, f7 longtext, @@ -142,7 +142,7 @@ f120 char ascii not null DEFAULT b'101', f121 tinytext, f122 text, f123 mediumtext, -f124 longtext unicode, +f124 longtext, f125 tinyblob, f126 blob, f127 mediumblob, @@ -254,13 +254,13 @@ f223 year(3), f224 year(4), f225 enum("1enum","2enum"), f226 set("1set","2set"), -f235 char(0) unicode, +f235 char(0), f236 char(90), f237 char(255) ascii, f238 varchar(0), f239 varchar(20000) binary, -f240 varchar(2000) unicode, -f241 char(100) unicode +f240 varchar(2000), +f241 char(100) ) engine = innodb; load data infile '/std_data_ln/funcs_1/innodb_tb4.txt' into table tb4; @@ -460,7 +460,7 @@ NULL test tb1 f36 36 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0 NULL test tb1 f37 37 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references NULL test tb1 f38 38 10 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references NULL test tb1 f39 39 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb1 f4 4 NULL YES tinytext 127 255 NULL NULL ucs2 ucs2_general_ci tinytext select,insert,update,references +NULL test tb1 f4 4 NULL YES tinytext 255 255 NULL NULL latin1 latin1_swedish_ci tinytext select,insert,update,references NULL test tb1 f40 40 10 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references NULL test tb1 f41 41 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NULL test tb1 f42 42 0000000000000000000000000000000000000000000000000000000000000010 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references @@ -542,7 +542,7 @@ NULL test tb3 f120 3  NO char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) NULL test tb3 f121 4 NULL YES tinytext 255 255 NULL NULL latin1 latin1_swedish_ci tinytext select,insert,update,references NULL test tb3 f122 5 NULL YES text 65535 65535 NULL NULL latin1 latin1_swedish_ci text select,insert,update,references NULL test tb3 f123 6 NULL YES mediumtext 16777215 16777215 NULL NULL latin1 latin1_swedish_ci mediumtext select,insert,update,references -NULL test tb3 f124 7 NULL YES longtext 2147483647 4294967295 NULL NULL ucs2 ucs2_general_ci longtext select,insert,update,references +NULL test tb3 f124 7 NULL YES longtext 4294967295 4294967295 NULL NULL latin1 latin1_swedish_ci longtext select,insert,update,references NULL test tb3 f125 8 NULL YES tinyblob 255 255 NULL NULL NULL NULL tinyblob select,insert,update,references NULL test tb3 f126 9 NULL YES blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references NULL test tb3 f127 10 NULL YES mediumblob 16777215 16777215 NULL NULL NULL NULL mediumblob select,insert,update,references @@ -645,13 +645,13 @@ NULL test tb4 f223 48 NULL YES year NULL NULL NULL NULL NULL NULL year(4) sele NULL test tb4 f224 49 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references NULL test tb4 f225 50 NULL YES enum 5 5 NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references NULL test tb4 f226 51 NULL YES set 9 9 NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references -NULL test tb4 f235 52 NULL YES char 0 0 NULL NULL ucs2 ucs2_general_ci char(0) select,insert,update,references +NULL test tb4 f235 52 NULL YES char 0 0 NULL NULL latin1 latin1_swedish_ci char(0) select,insert,update,references NULL test tb4 f236 53 NULL YES char 90 90 NULL NULL latin1 latin1_swedish_ci char(90) select,insert,update,references NULL test tb4 f237 54 NULL YES char 255 255 NULL NULL latin1 latin1_swedish_ci char(255) select,insert,update,references NULL test tb4 f238 55 NULL YES varchar 0 0 NULL NULL latin1 latin1_swedish_ci varchar(0) select,insert,update,references NULL test tb4 f239 56 NULL YES varchar 20000 20000 NULL NULL latin1 latin1_bin varchar(20000) select,insert,update,references -NULL test tb4 f240 57 NULL YES varchar 2000 4000 NULL NULL ucs2 ucs2_general_ci varchar(2000) select,insert,update,references -NULL test tb4 f241 58 NULL YES char 100 200 NULL NULL ucs2 ucs2_general_ci char(100) select,insert,update,references +NULL test tb4 f240 57 NULL YES varchar 2000 2000 NULL NULL latin1 latin1_swedish_ci varchar(2000) select,insert,update,references +NULL test tb4 f241 58 NULL YES char 100 100 NULL NULL latin1 latin1_swedish_ci char(100) select,insert,update,references NULL test1 tb2 f100 42 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references NULL test1 tb2 f101 43 2000-01-01 NO date NULL NULL NULL NULL NULL NULL date select,insert,update,references NULL test1 tb2 f102 44 00:00:20 NO time NULL NULL NULL NULL NULL NULL time select,insert,update,references @@ -736,6 +736,7 @@ COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME 1.0000 set latin1 latin1_swedish_ci 1.0000 text latin1 latin1_swedish_ci 1.0000 tinytext latin1 latin1_swedish_ci +1.0000 varchar latin1 latin1_swedish_ci SELECT DISTINCT CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, DATA_TYPE, @@ -746,10 +747,6 @@ WHERE table_schema LIKE 'test%' AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH <> 1 ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML; COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME -2.0000 char ucs2 ucs2_general_ci -2.0000 longtext ucs2 ucs2_general_ci -2.0000 varchar ucs2 ucs2_general_ci -2.0079 tinytext ucs2 ucs2_general_ci SELECT DISTINCT CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, DATA_TYPE, @@ -780,7 +777,6 @@ NULL year NULL NULL NULL char latin1 latin1_bin NULL char latin1 latin1_swedish_ci NULL varchar latin1 latin1_swedish_ci -NULL char ucs2 ucs2_general_ci --> CHAR(0) is allowed (see manual), and here both CHARACHTER_* values --> are 0, which is intended behavior, and the result of 0 / 0 IS NULL SELECT CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, @@ -844,7 +840,7 @@ NULL test t9 f3 int NULL NULL NULL NULL int(11) NULL test tb1 f1 char 0 0 latin1 latin1_swedish_ci char(0) NULL test tb1 f2 char 0 0 latin1 latin1_bin char(0) NULL test tb1 f3 char 0 0 latin1 latin1_swedish_ci char(0) -2.0079 test tb1 f4 tinytext 127 255 ucs2 ucs2_general_ci tinytext +1.0000 test tb1 f4 tinytext 255 255 latin1 latin1_swedish_ci tinytext 1.0000 test tb1 f5 text 65535 65535 latin1 latin1_swedish_ci text 1.0000 test tb1 f6 mediumtext 16777215 16777215 latin1 latin1_swedish_ci mediumtext 1.0000 test tb1 f7 longtext 4294967295 4294967295 latin1 latin1_swedish_ci longtext @@ -956,7 +952,7 @@ NULL test tb2 f107 year NULL NULL NULL NULL year(4) 1.0000 test tb3 f121 tinytext 255 255 latin1 latin1_swedish_ci tinytext 1.0000 test tb3 f122 text 65535 65535 latin1 latin1_swedish_ci text 1.0000 test tb3 f123 mediumtext 16777215 16777215 latin1 latin1_swedish_ci mediumtext -2.0000 test tb3 f124 longtext 2147483647 4294967295 ucs2 ucs2_general_ci longtext +1.0000 test tb3 f124 longtext 4294967295 4294967295 latin1 latin1_swedish_ci longtext 1.0000 test tb3 f125 tinyblob 255 255 NULL NULL tinyblob 1.0000 test tb3 f126 blob 65535 65535 NULL NULL blob 1.0000 test tb3 f127 mediumblob 16777215 16777215 NULL NULL mediumblob @@ -1059,13 +1055,13 @@ NULL test tb4 f223 year NULL NULL NULL NULL year(4) NULL test tb4 f224 year NULL NULL NULL NULL year(4) 1.0000 test tb4 f225 enum 5 5 latin1 latin1_swedish_ci enum('1enum','2enum') 1.0000 test tb4 f226 set 9 9 latin1 latin1_swedish_ci set('1set','2set') -NULL test tb4 f235 char 0 0 ucs2 ucs2_general_ci char(0) +NULL test tb4 f235 char 0 0 latin1 latin1_swedish_ci char(0) 1.0000 test tb4 f236 char 90 90 latin1 latin1_swedish_ci char(90) 1.0000 test tb4 f237 char 255 255 latin1 latin1_swedish_ci char(255) NULL test tb4 f238 varchar 0 0 latin1 latin1_swedish_ci varchar(0) 1.0000 test tb4 f239 varchar 20000 20000 latin1 latin1_bin varchar(20000) -2.0000 test tb4 f240 varchar 2000 4000 ucs2 ucs2_general_ci varchar(2000) -2.0000 test tb4 f241 char 100 200 ucs2 ucs2_general_ci char(100) +1.0000 test tb4 f240 varchar 2000 2000 latin1 latin1_swedish_ci varchar(2000) +1.0000 test tb4 f241 char 100 100 latin1 latin1_swedish_ci char(100) NULL test1 tb2 f59 decimal NULL NULL NULL NULL decimal(10,0) unsigned NULL test1 tb2 f60 decimal NULL NULL NULL NULL decimal(64,0) unsigned NULL test1 tb2 f61 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill diff --git a/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result b/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result new file mode 100644 index 00000000000..6ad08c11c19 --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result @@ -0,0 +1,380 @@ +SELECT * FROM information_schema.columns +WHERE table_schema = 'information_schema' +AND table_name <> 'profiling' +ORDER BY table_schema, table_name, column_name; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT +NULL information_schema CHARACTER_SETS CHARACTER_SET_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema CHARACTER_SETS DEFAULT_COLLATE_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema CHARACTER_SETS DESCRIPTION 3 NO varchar 60 180 NULL NULL utf8 utf8_general_ci varchar(60) +NULL information_schema CHARACTER_SETS MAXLEN 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(3) +NULL information_schema COLLATIONS CHARACTER_SET_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema COLLATIONS COLLATION_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema COLLATIONS ID 3 0 NO bigint NULL NULL 19 0 NULL NULL bigint(11) +NULL information_schema COLLATIONS IS_COMPILED 5 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) +NULL information_schema COLLATIONS IS_DEFAULT 4 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) +NULL information_schema COLLATIONS SORTLEN 6 0 NO bigint NULL NULL 19 0 NULL NULL bigint(3) +NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY CHARACTER_SET_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) +NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) +NULL information_schema COLUMNS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema COLUMNS COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema COLUMNS COLUMN_COMMENT 19 NO varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) +NULL information_schema COLUMNS COLUMN_DEFAULT 6 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext +NULL information_schema COLUMNS COLUMN_KEY 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) +NULL information_schema COLUMNS COLUMN_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema COLUMNS COLUMN_TYPE 15 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext +NULL information_schema COLUMNS DATA_TYPE 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema COLUMNS EXTRA 17 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) +NULL information_schema COLUMNS IS_NULLABLE 7 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) +NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) +NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) +NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) +NULL information_schema COLUMNS PRIVILEGES 18 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) +NULL information_schema COLUMNS TABLE_CATALOG 1 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) +NULL information_schema COLUMNS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema COLUMNS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema COLUMN_PRIVILEGES COLUMN_NAME 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema COLUMN_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) +NULL information_schema COLUMN_PRIVILEGES IS_GRANTABLE 7 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) +NULL information_schema COLUMN_PRIVILEGES PRIVILEGE_TYPE 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema COLUMN_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) +NULL information_schema COLUMN_PRIVILEGES TABLE_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema COLUMN_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema KEY_COLUMN_USAGE COLUMN_NAME 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_CATALOG 1 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) +NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema KEY_COLUMN_USAGE ORDINAL_POSITION 8 0 NO bigint NULL NULL 19 0 NULL NULL bigint(10) +NULL information_schema KEY_COLUMN_USAGE POSITION_IN_UNIQUE_CONSTRAINT 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(10) +NULL information_schema KEY_COLUMN_USAGE REFERENCED_COLUMN_NAME 12 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_NAME 11 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_SCHEMA 10 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema KEY_COLUMN_USAGE TABLE_CATALOG 4 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) +NULL information_schema KEY_COLUMN_USAGE TABLE_NAME 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema KEY_COLUMN_USAGE TABLE_SCHEMA 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema ROUTINES CREATED 16 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime +NULL information_schema ROUTINES DEFINER 20 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) +NULL information_schema ROUTINES DTD_IDENTIFIER 6 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema ROUTINES EXTERNAL_LANGUAGE 10 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema ROUTINES EXTERNAL_NAME 9 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema ROUTINES IS_DETERMINISTIC 12 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) +NULL information_schema ROUTINES LAST_ALTERED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime +NULL information_schema ROUTINES PARAMETER_STYLE 11 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) +NULL information_schema ROUTINES ROUTINE_BODY 7 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) +NULL information_schema ROUTINES ROUTINE_CATALOG 2 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) +NULL information_schema ROUTINES ROUTINE_COMMENT 19 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema ROUTINES ROUTINE_DEFINITION 8 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext +NULL information_schema ROUTINES ROUTINE_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema ROUTINES ROUTINE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema ROUTINES ROUTINE_TYPE 5 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) +NULL information_schema ROUTINES SECURITY_TYPE 15 NO varchar 7 21 NULL NULL utf8 utf8_general_ci varchar(7) +NULL information_schema ROUTINES SPECIFIC_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema ROUTINES SQL_DATA_ACCESS 13 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema ROUTINES SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext +NULL information_schema ROUTINES SQL_PATH 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema SCHEMATA CATALOG_NAME 1 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) +NULL information_schema SCHEMATA DEFAULT_CHARACTER_SET_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema SCHEMATA DEFAULT_COLLATION_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema SCHEMATA SCHEMA_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema SCHEMATA SQL_PATH 5 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) +NULL information_schema SCHEMA_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) +NULL information_schema SCHEMA_PRIVILEGES IS_GRANTABLE 5 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) +NULL information_schema SCHEMA_PRIVILEGES PRIVILEGE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema SCHEMA_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) +NULL information_schema SCHEMA_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema STATISTICS CARDINALITY 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) +NULL information_schema STATISTICS COLLATION 9 NULL YES varchar 1 3 NULL NULL utf8 utf8_general_ci varchar(1) +NULL information_schema STATISTICS COLUMN_NAME 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema STATISTICS COMMENT 15 NULL YES varchar 16 48 NULL NULL utf8 utf8_general_ci varchar(16) +NULL information_schema STATISTICS INDEX_NAME 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema STATISTICS INDEX_SCHEMA 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema STATISTICS INDEX_TYPE 14 NO varchar 16 48 NULL NULL utf8 utf8_general_ci varchar(16) +NULL information_schema STATISTICS NON_UNIQUE 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(1) +NULL information_schema STATISTICS NULLABLE 13 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) +NULL information_schema STATISTICS PACKED 12 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) +NULL information_schema STATISTICS SEQ_IN_INDEX 7 0 NO bigint NULL NULL 19 0 NULL NULL bigint(2) +NULL information_schema STATISTICS SUB_PART 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(3) +NULL information_schema STATISTICS TABLE_CATALOG 1 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) +NULL information_schema STATISTICS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema STATISTICS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) +NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) +NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) +NULL information_schema TABLES CHECK_TIME 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime +NULL information_schema TABLES CREATE_OPTIONS 20 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) +NULL information_schema TABLES CREATE_TIME 15 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime +NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) +NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) +NULL information_schema TABLES ENGINE 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) +NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) +NULL information_schema TABLES ROW_FORMAT 7 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) +NULL information_schema TABLES TABLE_CATALOG 1 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) +NULL information_schema TABLES TABLE_COLLATION 18 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema TABLES TABLE_COMMENT 21 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) +NULL information_schema TABLES TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) +NULL information_schema TABLES TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema TABLES TABLE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema TABLES UPDATE_TIME 16 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime +NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) +NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_CATALOG 1 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) +NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_TYPE 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema TABLE_CONSTRAINTS TABLE_NAME 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema TABLE_CONSTRAINTS TABLE_SCHEMA 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema TABLE_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) +NULL information_schema TABLE_PRIVILEGES IS_GRANTABLE 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) +NULL information_schema TABLE_PRIVILEGES PRIVILEGE_TYPE 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema TABLE_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) +NULL information_schema TABLE_PRIVILEGES TABLE_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema TABLE_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema TRIGGERS ACTION_CONDITION 9 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext +NULL information_schema TRIGGERS ACTION_ORDER 8 0 NO bigint NULL NULL 19 0 NULL NULL bigint(4) +NULL information_schema TRIGGERS ACTION_ORIENTATION 11 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) +NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_ROW 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) +NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_TABLE 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_ROW 15 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) +NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_TABLE 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema TRIGGERS ACTION_STATEMENT 10 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext +NULL information_schema TRIGGERS ACTION_TIMING 12 NO varchar 6 18 NULL NULL utf8 utf8_general_ci varchar(6) +NULL information_schema TRIGGERS CREATED 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime +NULL information_schema TRIGGERS DEFINER 19 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext +NULL information_schema TRIGGERS EVENT_MANIPULATION 4 NO varchar 6 18 NULL NULL utf8 utf8_general_ci varchar(6) +NULL information_schema TRIGGERS EVENT_OBJECT_CATALOG 5 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) +NULL information_schema TRIGGERS EVENT_OBJECT_SCHEMA 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema TRIGGERS EVENT_OBJECT_TABLE 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema TRIGGERS SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext +NULL information_schema TRIGGERS TRIGGER_CATALOG 1 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) +NULL information_schema TRIGGERS TRIGGER_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema TRIGGERS TRIGGER_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema USER_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) +NULL information_schema USER_PRIVILEGES IS_GRANTABLE 4 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) +NULL information_schema USER_PRIVILEGES PRIVILEGE_TYPE 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema USER_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) +NULL information_schema VIEWS CHECK_OPTION 5 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) +NULL information_schema VIEWS DEFINER 7 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) +NULL information_schema VIEWS IS_UPDATABLE 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) +NULL information_schema VIEWS SECURITY_TYPE 8 NO varchar 7 21 NULL NULL utf8 utf8_general_ci varchar(7) +NULL information_schema VIEWS TABLE_CATALOG 1 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) +NULL information_schema VIEWS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema VIEWS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) +NULL information_schema VIEWS VIEW_DEFINITION 4 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext +########################################################################## +# Show the quotient of CHARACTER_OCTET_LENGTH and CHARACTER_MAXIMUM_LENGTH +########################################################################## +SELECT DISTINCT +CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, +DATA_TYPE, +CHARACTER_SET_NAME, +COLLATION_NAME +FROM information_schema.columns +WHERE table_schema = 'information_schema' +AND table_name <> 'profiling' +AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH = 1 +ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML; +COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME +1.0000 longtext utf8 utf8_general_ci +SELECT DISTINCT +CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, +DATA_TYPE, +CHARACTER_SET_NAME, +COLLATION_NAME +FROM information_schema.columns +WHERE table_schema = 'information_schema' +AND table_name <> 'profiling' +AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH <> 1 +ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML; +COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME +3.0000 varchar utf8 utf8_general_ci +SELECT DISTINCT +CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, +DATA_TYPE, +CHARACTER_SET_NAME, +COLLATION_NAME +FROM information_schema.columns +WHERE table_schema = 'information_schema' +AND table_name <> 'profiling' +AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH IS NULL +ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML; +COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME +NULL bigint NULL NULL +NULL datetime NULL NULL +--> CHAR(0) is allowed (see manual), and here both CHARACHTER_* values +--> are 0, which is intended behavior, and the result of 0 / 0 IS NULL +SELECT CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, +TABLE_SCHEMA, +TABLE_NAME, +COLUMN_NAME, +DATA_TYPE, +CHARACTER_MAXIMUM_LENGTH, +CHARACTER_OCTET_LENGTH, +CHARACTER_SET_NAME, +COLLATION_NAME, +COLUMN_TYPE +FROM information_schema.columns +WHERE table_schema = 'information_schema' +AND table_name <> 'profiling' +ORDER BY TABLE_SCHEMA, TABLE_NAME, ORDINAL_POSITION; +COL_CML TABLE_SCHEMA TABLE_NAME COLUMN_NAME DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE +3.0000 information_schema CHARACTER_SETS CHARACTER_SET_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema CHARACTER_SETS DEFAULT_COLLATE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema CHARACTER_SETS DESCRIPTION varchar 60 180 utf8 utf8_general_ci varchar(60) +NULL information_schema CHARACTER_SETS MAXLEN bigint NULL NULL NULL NULL bigint(3) +3.0000 information_schema COLLATIONS COLLATION_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema COLLATIONS CHARACTER_SET_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +NULL information_schema COLLATIONS ID bigint NULL NULL NULL NULL bigint(11) +3.0000 information_schema COLLATIONS IS_DEFAULT varchar 3 9 utf8 utf8_general_ci varchar(3) +3.0000 information_schema COLLATIONS IS_COMPILED varchar 3 9 utf8 utf8_general_ci varchar(3) +NULL information_schema COLLATIONS SORTLEN bigint NULL NULL NULL NULL bigint(3) +3.0000 information_schema COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema COLLATION_CHARACTER_SET_APPLICABILITY CHARACTER_SET_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema COLUMNS TABLE_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512) +3.0000 information_schema COLUMNS TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema COLUMNS TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema COLUMNS COLUMN_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +NULL information_schema COLUMNS ORDINAL_POSITION bigint NULL NULL NULL NULL bigint(21) +1.0000 information_schema COLUMNS COLUMN_DEFAULT longtext 4294967295 4294967295 utf8 utf8_general_ci longtext +3.0000 information_schema COLUMNS IS_NULLABLE varchar 3 9 utf8 utf8_general_ci varchar(3) +3.0000 information_schema COLUMNS DATA_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64) +NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH bigint NULL NULL NULL NULL bigint(21) +NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH bigint NULL NULL NULL NULL bigint(21) +NULL information_schema COLUMNS NUMERIC_PRECISION bigint NULL NULL NULL NULL bigint(21) +NULL information_schema COLUMNS NUMERIC_SCALE bigint NULL NULL NULL NULL bigint(21) +3.0000 information_schema COLUMNS CHARACTER_SET_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema COLUMNS COLLATION_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +1.0000 information_schema COLUMNS COLUMN_TYPE longtext 4294967295 4294967295 utf8 utf8_general_ci longtext +3.0000 information_schema COLUMNS COLUMN_KEY varchar 3 9 utf8 utf8_general_ci varchar(3) +3.0000 information_schema COLUMNS EXTRA varchar 20 60 utf8 utf8_general_ci varchar(20) +3.0000 information_schema COLUMNS PRIVILEGES varchar 80 240 utf8 utf8_general_ci varchar(80) +3.0000 information_schema COLUMNS COLUMN_COMMENT varchar 255 765 utf8 utf8_general_ci varchar(255) +3.0000 information_schema COLUMN_PRIVILEGES GRANTEE varchar 81 243 utf8 utf8_general_ci varchar(81) +3.0000 information_schema COLUMN_PRIVILEGES TABLE_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512) +3.0000 information_schema COLUMN_PRIVILEGES TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema COLUMN_PRIVILEGES TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema COLUMN_PRIVILEGES COLUMN_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema COLUMN_PRIVILEGES PRIVILEGE_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema COLUMN_PRIVILEGES IS_GRANTABLE varchar 3 9 utf8 utf8_general_ci varchar(3) +3.0000 information_schema KEY_COLUMN_USAGE CONSTRAINT_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512) +3.0000 information_schema KEY_COLUMN_USAGE CONSTRAINT_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema KEY_COLUMN_USAGE CONSTRAINT_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema KEY_COLUMN_USAGE TABLE_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512) +3.0000 information_schema KEY_COLUMN_USAGE TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema KEY_COLUMN_USAGE TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema KEY_COLUMN_USAGE COLUMN_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +NULL information_schema KEY_COLUMN_USAGE ORDINAL_POSITION bigint NULL NULL NULL NULL bigint(10) +NULL information_schema KEY_COLUMN_USAGE POSITION_IN_UNIQUE_CONSTRAINT bigint NULL NULL NULL NULL bigint(10) +3.0000 information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema KEY_COLUMN_USAGE REFERENCED_COLUMN_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema ROUTINES SPECIFIC_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema ROUTINES ROUTINE_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512) +3.0000 information_schema ROUTINES ROUTINE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema ROUTINES ROUTINE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema ROUTINES ROUTINE_TYPE varchar 9 27 utf8 utf8_general_ci varchar(9) +3.0000 information_schema ROUTINES DTD_IDENTIFIER varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema ROUTINES ROUTINE_BODY varchar 8 24 utf8 utf8_general_ci varchar(8) +1.0000 information_schema ROUTINES ROUTINE_DEFINITION longtext 4294967295 4294967295 utf8 utf8_general_ci longtext +3.0000 information_schema ROUTINES EXTERNAL_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema ROUTINES EXTERNAL_LANGUAGE varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema ROUTINES PARAMETER_STYLE varchar 8 24 utf8 utf8_general_ci varchar(8) +3.0000 information_schema ROUTINES IS_DETERMINISTIC varchar 3 9 utf8 utf8_general_ci varchar(3) +3.0000 information_schema ROUTINES SQL_DATA_ACCESS varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema ROUTINES SQL_PATH varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema ROUTINES SECURITY_TYPE varchar 7 21 utf8 utf8_general_ci varchar(7) +NULL information_schema ROUTINES CREATED datetime NULL NULL NULL NULL datetime +NULL information_schema ROUTINES LAST_ALTERED datetime NULL NULL NULL NULL datetime +1.0000 information_schema ROUTINES SQL_MODE longtext 4294967295 4294967295 utf8 utf8_general_ci longtext +3.0000 information_schema ROUTINES ROUTINE_COMMENT varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema ROUTINES DEFINER varchar 77 231 utf8 utf8_general_ci varchar(77) +3.0000 information_schema SCHEMATA CATALOG_NAME varchar 512 1536 utf8 utf8_general_ci varchar(512) +3.0000 information_schema SCHEMATA SCHEMA_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema SCHEMATA DEFAULT_CHARACTER_SET_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema SCHEMATA DEFAULT_COLLATION_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema SCHEMATA SQL_PATH varchar 512 1536 utf8 utf8_general_ci varchar(512) +3.0000 information_schema SCHEMA_PRIVILEGES GRANTEE varchar 81 243 utf8 utf8_general_ci varchar(81) +3.0000 information_schema SCHEMA_PRIVILEGES TABLE_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512) +3.0000 information_schema SCHEMA_PRIVILEGES TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema SCHEMA_PRIVILEGES PRIVILEGE_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema SCHEMA_PRIVILEGES IS_GRANTABLE varchar 3 9 utf8 utf8_general_ci varchar(3) +3.0000 information_schema STATISTICS TABLE_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512) +3.0000 information_schema STATISTICS TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema STATISTICS TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +NULL information_schema STATISTICS NON_UNIQUE bigint NULL NULL NULL NULL bigint(1) +3.0000 information_schema STATISTICS INDEX_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema STATISTICS INDEX_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +NULL information_schema STATISTICS SEQ_IN_INDEX bigint NULL NULL NULL NULL bigint(2) +3.0000 information_schema STATISTICS COLUMN_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema STATISTICS COLLATION varchar 1 3 utf8 utf8_general_ci varchar(1) +NULL information_schema STATISTICS CARDINALITY bigint NULL NULL NULL NULL bigint(21) +NULL information_schema STATISTICS SUB_PART bigint NULL NULL NULL NULL bigint(3) +3.0000 information_schema STATISTICS PACKED varchar 10 30 utf8 utf8_general_ci varchar(10) +3.0000 information_schema STATISTICS NULLABLE varchar 3 9 utf8 utf8_general_ci varchar(3) +3.0000 information_schema STATISTICS INDEX_TYPE varchar 16 48 utf8 utf8_general_ci varchar(16) +3.0000 information_schema STATISTICS COMMENT varchar 16 48 utf8 utf8_general_ci varchar(16) +3.0000 information_schema TABLES TABLE_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512) +3.0000 information_schema TABLES TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema TABLES TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema TABLES TABLE_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema TABLES ENGINE varchar 64 192 utf8 utf8_general_ci varchar(64) +NULL information_schema TABLES VERSION bigint NULL NULL NULL NULL bigint(21) +3.0000 information_schema TABLES ROW_FORMAT varchar 10 30 utf8 utf8_general_ci varchar(10) +NULL information_schema TABLES TABLE_ROWS bigint NULL NULL NULL NULL bigint(21) +NULL information_schema TABLES AVG_ROW_LENGTH bigint NULL NULL NULL NULL bigint(21) +NULL information_schema TABLES DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) +NULL information_schema TABLES MAX_DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) +NULL information_schema TABLES INDEX_LENGTH bigint NULL NULL NULL NULL bigint(21) +NULL information_schema TABLES DATA_FREE bigint NULL NULL NULL NULL bigint(21) +NULL information_schema TABLES AUTO_INCREMENT bigint NULL NULL NULL NULL bigint(21) +NULL information_schema TABLES CREATE_TIME datetime NULL NULL NULL NULL datetime +NULL information_schema TABLES UPDATE_TIME datetime NULL NULL NULL NULL datetime +NULL information_schema TABLES CHECK_TIME datetime NULL NULL NULL NULL datetime +3.0000 information_schema TABLES TABLE_COLLATION varchar 64 192 utf8 utf8_general_ci varchar(64) +NULL information_schema TABLES CHECKSUM bigint NULL NULL NULL NULL bigint(21) +3.0000 information_schema TABLES CREATE_OPTIONS varchar 255 765 utf8 utf8_general_ci varchar(255) +3.0000 information_schema TABLES TABLE_COMMENT varchar 80 240 utf8 utf8_general_ci varchar(80) +3.0000 information_schema TABLE_CONSTRAINTS CONSTRAINT_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512) +3.0000 information_schema TABLE_CONSTRAINTS CONSTRAINT_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema TABLE_CONSTRAINTS CONSTRAINT_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema TABLE_CONSTRAINTS TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema TABLE_CONSTRAINTS TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema TABLE_CONSTRAINTS CONSTRAINT_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema TABLE_PRIVILEGES GRANTEE varchar 81 243 utf8 utf8_general_ci varchar(81) +3.0000 information_schema TABLE_PRIVILEGES TABLE_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512) +3.0000 information_schema TABLE_PRIVILEGES TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema TABLE_PRIVILEGES TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema TABLE_PRIVILEGES PRIVILEGE_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema TABLE_PRIVILEGES IS_GRANTABLE varchar 3 9 utf8 utf8_general_ci varchar(3) +3.0000 information_schema TRIGGERS TRIGGER_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512) +3.0000 information_schema TRIGGERS TRIGGER_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema TRIGGERS TRIGGER_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema TRIGGERS EVENT_MANIPULATION varchar 6 18 utf8 utf8_general_ci varchar(6) +3.0000 information_schema TRIGGERS EVENT_OBJECT_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512) +3.0000 information_schema TRIGGERS EVENT_OBJECT_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema TRIGGERS EVENT_OBJECT_TABLE varchar 64 192 utf8 utf8_general_ci varchar(64) +NULL information_schema TRIGGERS ACTION_ORDER bigint NULL NULL NULL NULL bigint(4) +1.0000 information_schema TRIGGERS ACTION_CONDITION longtext 4294967295 4294967295 utf8 utf8_general_ci longtext +1.0000 information_schema TRIGGERS ACTION_STATEMENT longtext 4294967295 4294967295 utf8 utf8_general_ci longtext +3.0000 information_schema TRIGGERS ACTION_ORIENTATION varchar 9 27 utf8 utf8_general_ci varchar(9) +3.0000 information_schema TRIGGERS ACTION_TIMING varchar 6 18 utf8 utf8_general_ci varchar(6) +3.0000 information_schema TRIGGERS ACTION_REFERENCE_OLD_TABLE varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema TRIGGERS ACTION_REFERENCE_NEW_TABLE varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema TRIGGERS ACTION_REFERENCE_OLD_ROW varchar 3 9 utf8 utf8_general_ci varchar(3) +3.0000 information_schema TRIGGERS ACTION_REFERENCE_NEW_ROW varchar 3 9 utf8 utf8_general_ci varchar(3) +NULL information_schema TRIGGERS CREATED datetime NULL NULL NULL NULL datetime +1.0000 information_schema TRIGGERS SQL_MODE longtext 4294967295 4294967295 utf8 utf8_general_ci longtext +1.0000 information_schema TRIGGERS DEFINER longtext 4294967295 4294967295 utf8 utf8_general_ci longtext +3.0000 information_schema USER_PRIVILEGES GRANTEE varchar 81 243 utf8 utf8_general_ci varchar(81) +3.0000 information_schema USER_PRIVILEGES TABLE_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512) +3.0000 information_schema USER_PRIVILEGES PRIVILEGE_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema USER_PRIVILEGES IS_GRANTABLE varchar 3 9 utf8 utf8_general_ci varchar(3) +3.0000 information_schema VIEWS TABLE_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512) +3.0000 information_schema VIEWS TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema VIEWS TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +1.0000 information_schema VIEWS VIEW_DEFINITION longtext 4294967295 4294967295 utf8 utf8_general_ci longtext +3.0000 information_schema VIEWS CHECK_OPTION varchar 8 24 utf8 utf8_general_ci varchar(8) +3.0000 information_schema VIEWS IS_UPDATABLE varchar 3 9 utf8 utf8_general_ci varchar(3) +3.0000 information_schema VIEWS DEFINER varchar 77 231 utf8 utf8_general_ci varchar(77) +3.0000 information_schema VIEWS SECURITY_TYPE varchar 7 21 utf8 utf8_general_ci varchar(7) diff --git a/mysql-test/suite/funcs_1/r/is_columns_memory.result b/mysql-test/suite/funcs_1/r/is_columns_memory.result index ae7c5919447..2a715439e54 100644 --- a/mysql-test/suite/funcs_1/r/is_columns_memory.result +++ b/mysql-test/suite/funcs_1/r/is_columns_memory.result @@ -244,12 +244,12 @@ f223 year(3), f224 year(4), f225 enum("1enum","2enum"), f226 set("1set","2set"), -f236 char(95) unicode, -f241 char(255) unicode, +f236 char(95), +f241 char(255), f237 char(130) binary, f238 varchar(25000) binary, f239 varbinary(0), -f240 varchar(1200) unicode +f240 varchar(1200) ) engine = memory; load data infile '/std_data_ln/funcs_1/memory_tb4.txt' into table tb4; @@ -620,12 +620,12 @@ NULL test tb4 f223 48 NULL YES year NULL NULL NULL NULL NULL NULL year(4) sele NULL test tb4 f224 49 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references NULL test tb4 f225 50 NULL YES enum 5 5 NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references NULL test tb4 f226 51 NULL YES set 9 9 NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references -NULL test tb4 f236 52 NULL YES char 95 190 NULL NULL ucs2 ucs2_general_ci char(95) select,insert,update,references +NULL test tb4 f236 52 NULL YES char 95 95 NULL NULL latin1 latin1_swedish_ci char(95) select,insert,update,references NULL test tb4 f237 54 NULL YES char 130 130 NULL NULL latin1 latin1_bin char(130) select,insert,update,references NULL test tb4 f238 55 NULL YES varchar 25000 25000 NULL NULL latin1 latin1_bin varchar(25000) select,insert,update,references NULL test tb4 f239 56 NULL YES varbinary 0 0 NULL NULL NULL NULL varbinary(0) select,insert,update,references -NULL test tb4 f240 57 NULL YES varchar 1200 2400 NULL NULL ucs2 ucs2_general_ci varchar(1200) select,insert,update,references -NULL test tb4 f241 53 NULL YES char 255 510 NULL NULL ucs2 ucs2_general_ci char(255) select,insert,update,references +NULL test tb4 f240 57 NULL YES varchar 1200 1200 NULL NULL latin1 latin1_swedish_ci varchar(1200) select,insert,update,references +NULL test tb4 f241 53 NULL YES char 255 255 NULL NULL latin1 latin1_swedish_ci char(255) select,insert,update,references NULL test1 tb2 f100 42 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references NULL test1 tb2 f101 43 2000-01-01 NO date NULL NULL NULL NULL NULL NULL date select,insert,update,references NULL test1 tb2 f102 44 00:00:20 NO time NULL NULL NULL NULL NULL NULL time select,insert,update,references @@ -702,6 +702,7 @@ COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME 1.0000 char latin1 latin1_swedish_ci 1.0000 enum latin1 latin1_swedish_ci 1.0000 set latin1 latin1_swedish_ci +1.0000 varchar latin1 latin1_swedish_ci SELECT DISTINCT CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, DATA_TYPE, @@ -712,8 +713,6 @@ WHERE table_schema LIKE 'test%' AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH <> 1 ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML; COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME -2.0000 char ucs2 ucs2_general_ci -2.0000 varchar ucs2 ucs2_general_ci SELECT DISTINCT CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, DATA_TYPE, @@ -1006,12 +1005,12 @@ NULL test tb4 f223 year NULL NULL NULL NULL year(4) NULL test tb4 f224 year NULL NULL NULL NULL year(4) 1.0000 test tb4 f225 enum 5 5 latin1 latin1_swedish_ci enum('1enum','2enum') 1.0000 test tb4 f226 set 9 9 latin1 latin1_swedish_ci set('1set','2set') -2.0000 test tb4 f236 char 95 190 ucs2 ucs2_general_ci char(95) -2.0000 test tb4 f241 char 255 510 ucs2 ucs2_general_ci char(255) +1.0000 test tb4 f236 char 95 95 latin1 latin1_swedish_ci char(95) +1.0000 test tb4 f241 char 255 255 latin1 latin1_swedish_ci char(255) 1.0000 test tb4 f237 char 130 130 latin1 latin1_bin char(130) 1.0000 test tb4 f238 varchar 25000 25000 latin1 latin1_bin varchar(25000) NULL test tb4 f239 varbinary 0 0 NULL NULL varbinary(0) -2.0000 test tb4 f240 varchar 1200 2400 ucs2 ucs2_general_ci varchar(1200) +1.0000 test tb4 f240 varchar 1200 1200 latin1 latin1_swedish_ci varchar(1200) NULL test1 tb2 f59 decimal NULL NULL NULL NULL decimal(10,0) unsigned NULL test1 tb2 f60 decimal NULL NULL NULL NULL decimal(64,0) unsigned NULL test1 tb2 f61 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill diff --git a/mysql-test/suite/funcs_1/r/is_columns_myisam.result b/mysql-test/suite/funcs_1/r/is_columns_myisam.result index 94574c33d74..9393d1638bd 100644 --- a/mysql-test/suite/funcs_1/r/is_columns_myisam.result +++ b/mysql-test/suite/funcs_1/r/is_columns_myisam.result @@ -7,7 +7,7 @@ create table tb1 ( f1 char, f2 char binary, f3 char ascii, -f4 tinytext unicode, +f4 tinytext, f5 text, f6 mediumtext, f7 longtext, @@ -154,7 +154,7 @@ f120 char ascii not null DEFAULT b'101', f121 tinytext, f122 text, f123 mediumtext, -f124 longtext unicode, +f124 longtext, f125 tinyblob, f126 blob, f127 mediumblob, @@ -274,13 +274,13 @@ f231 VARBINARY(192), f232 VARBINARY(27), f233 VARBINARY(64), f234 VARBINARY(192), -f235 char(255) unicode, +f235 char(255), f236 char(60) ascii, f237 char(255) binary, f238 varchar(0) binary, f239 varbinary(1000), -f240 varchar(120) unicode, -f241 char(100) unicode, +f240 varchar(120), +f241 char(100), f242 bit(30) ) engine = myisam; load data infile '/std_data_ln/funcs_1/myisam_tb4.txt' @@ -489,7 +489,7 @@ NULL test tb1 f36 36 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0 NULL test tb1 f37 37 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references NULL test tb1 f38 38 10 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references NULL test tb1 f39 39 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb1 f4 4 NULL YES tinytext 127 255 NULL NULL ucs2 ucs2_general_ci tinytext select,insert,update,references +NULL test tb1 f4 4 NULL YES tinytext 255 255 NULL NULL latin1 latin1_swedish_ci tinytext select,insert,update,references NULL test tb1 f40 40 10 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references NULL test tb1 f41 41 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NULL test tb1 f42 42 0000000000000000000000000000000000000000000000000000000000000010 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references @@ -579,7 +579,7 @@ NULL test tb3 f120 3  NO char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) NULL test tb3 f121 4 NULL YES tinytext 255 255 NULL NULL latin1 latin1_swedish_ci tinytext select,insert,update,references NULL test tb3 f122 5 NULL YES text 65535 65535 NULL NULL latin1 latin1_swedish_ci text select,insert,update,references NULL test tb3 f123 6 NULL YES mediumtext 16777215 16777215 NULL NULL latin1 latin1_swedish_ci mediumtext select,insert,update,references -NULL test tb3 f124 7 NULL YES longtext 2147483647 4294967295 NULL NULL ucs2 ucs2_general_ci longtext select,insert,update,references +NULL test tb3 f124 7 NULL YES longtext 4294967295 4294967295 NULL NULL latin1 latin1_swedish_ci longtext select,insert,update,references NULL test tb3 f125 8 NULL YES tinyblob 255 255 NULL NULL NULL NULL tinyblob select,insert,update,references NULL test tb3 f126 9 NULL YES blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references NULL test tb3 f127 10 NULL YES mediumblob 16777215 16777215 NULL NULL NULL NULL mediumblob select,insert,update,references @@ -690,13 +690,13 @@ NULL test tb4 f231 56 NULL YES varbinary 192 192 NULL NULL NULL NULL varbinary(1 NULL test tb4 f232 57 NULL YES varbinary 27 27 NULL NULL NULL NULL varbinary(27) select,insert,update,references NULL test tb4 f233 58 NULL YES varbinary 64 64 NULL NULL NULL NULL varbinary(64) select,insert,update,references NULL test tb4 f234 59 NULL YES varbinary 192 192 NULL NULL NULL NULL varbinary(192) select,insert,update,references -NULL test tb4 f235 60 NULL YES char 255 510 NULL NULL ucs2 ucs2_general_ci char(255) select,insert,update,references +NULL test tb4 f235 60 NULL YES char 255 255 NULL NULL latin1 latin1_swedish_ci char(255) select,insert,update,references NULL test tb4 f236 61 NULL YES char 60 60 NULL NULL latin1 latin1_swedish_ci char(60) select,insert,update,references NULL test tb4 f237 62 NULL YES char 255 255 NULL NULL latin1 latin1_bin char(255) select,insert,update,references NULL test tb4 f238 63 NULL YES varchar 0 0 NULL NULL latin1 latin1_bin varchar(0) select,insert,update,references NULL test tb4 f239 64 NULL YES varbinary 1000 1000 NULL NULL NULL NULL varbinary(1000) select,insert,update,references -NULL test tb4 f240 65 NULL YES varchar 120 240 NULL NULL ucs2 ucs2_general_ci varchar(120) select,insert,update,references -NULL test tb4 f241 66 NULL YES char 100 200 NULL NULL ucs2 ucs2_general_ci char(100) select,insert,update,references +NULL test tb4 f240 65 NULL YES varchar 120 120 NULL NULL latin1 latin1_swedish_ci varchar(120) select,insert,update,references +NULL test tb4 f241 66 NULL YES char 100 100 NULL NULL latin1 latin1_swedish_ci char(100) select,insert,update,references NULL test tb4 f242 67 NULL YES bit NULL NULL 30 NULL NULL NULL bit(30) select,insert,update,references NULL test1 tb2 f100 42 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references NULL test1 tb2 f101 43 2000-01-01 NO date NULL NULL NULL NULL NULL NULL date select,insert,update,references @@ -790,6 +790,7 @@ COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME 1.0000 set latin1 latin1_swedish_ci 1.0000 text latin1 latin1_swedish_ci 1.0000 tinytext latin1 latin1_swedish_ci +1.0000 varchar latin1 latin1_swedish_ci SELECT DISTINCT CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, DATA_TYPE, @@ -800,10 +801,6 @@ WHERE table_schema LIKE 'test%' AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH <> 1 ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML; COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME -2.0000 char ucs2 ucs2_general_ci -2.0000 longtext ucs2 ucs2_general_ci -2.0000 varchar ucs2 ucs2_general_ci -2.0079 tinytext ucs2 ucs2_general_ci SELECT DISTINCT CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, DATA_TYPE, @@ -896,7 +893,7 @@ NULL test t9 f3 int NULL NULL NULL NULL int(11) 1.0000 test tb1 f1 char 1 1 latin1 latin1_swedish_ci char(1) 1.0000 test tb1 f2 char 1 1 latin1 latin1_bin char(1) 1.0000 test tb1 f3 char 1 1 latin1 latin1_swedish_ci char(1) -2.0079 test tb1 f4 tinytext 127 255 ucs2 ucs2_general_ci tinytext +1.0000 test tb1 f4 tinytext 255 255 latin1 latin1_swedish_ci tinytext 1.0000 test tb1 f5 text 65535 65535 latin1 latin1_swedish_ci text 1.0000 test tb1 f6 mediumtext 16777215 16777215 latin1 latin1_swedish_ci mediumtext 1.0000 test tb1 f7 longtext 4294967295 4294967295 latin1 latin1_swedish_ci longtext @@ -1016,7 +1013,7 @@ NULL test tb2 f107 year NULL NULL NULL NULL year(4) 1.0000 test tb3 f121 tinytext 255 255 latin1 latin1_swedish_ci tinytext 1.0000 test tb3 f122 text 65535 65535 latin1 latin1_swedish_ci text 1.0000 test tb3 f123 mediumtext 16777215 16777215 latin1 latin1_swedish_ci mediumtext -2.0000 test tb3 f124 longtext 2147483647 4294967295 ucs2 ucs2_general_ci longtext +1.0000 test tb3 f124 longtext 4294967295 4294967295 latin1 latin1_swedish_ci longtext 1.0000 test tb3 f125 tinyblob 255 255 NULL NULL tinyblob 1.0000 test tb3 f126 blob 65535 65535 NULL NULL blob 1.0000 test tb3 f127 mediumblob 16777215 16777215 NULL NULL mediumblob @@ -1127,13 +1124,13 @@ NULL test tb4 f224 year NULL NULL NULL NULL year(4) 1.0000 test tb4 f232 varbinary 27 27 NULL NULL varbinary(27) 1.0000 test tb4 f233 varbinary 64 64 NULL NULL varbinary(64) 1.0000 test tb4 f234 varbinary 192 192 NULL NULL varbinary(192) -2.0000 test tb4 f235 char 255 510 ucs2 ucs2_general_ci char(255) +1.0000 test tb4 f235 char 255 255 latin1 latin1_swedish_ci char(255) 1.0000 test tb4 f236 char 60 60 latin1 latin1_swedish_ci char(60) 1.0000 test tb4 f237 char 255 255 latin1 latin1_bin char(255) NULL test tb4 f238 varchar 0 0 latin1 latin1_bin varchar(0) 1.0000 test tb4 f239 varbinary 1000 1000 NULL NULL varbinary(1000) -2.0000 test tb4 f240 varchar 120 240 ucs2 ucs2_general_ci varchar(120) -2.0000 test tb4 f241 char 100 200 ucs2 ucs2_general_ci char(100) +1.0000 test tb4 f240 varchar 120 120 latin1 latin1_swedish_ci varchar(120) +1.0000 test tb4 f241 char 100 100 latin1 latin1_swedish_ci char(100) NULL test tb4 f242 bit NULL NULL NULL NULL bit(30) NULL test1 tb2 f59 decimal NULL NULL NULL NULL decimal(10,0) unsigned NULL test1 tb2 f60 decimal NULL NULL NULL NULL decimal(64,0) unsigned diff --git a/mysql-test/suite/funcs_1/r/is_columns_myisam_embedded.result b/mysql-test/suite/funcs_1/r/is_columns_myisam_embedded.result new file mode 100644 index 00000000000..ffc6683b099 --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_columns_myisam_embedded.result @@ -0,0 +1,1214 @@ +SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION'; +DROP DATABASE IF EXISTS test1; +CREATE DATABASE test1; +USE test; +drop table if exists tb1 ; +create table tb1 ( +f1 char, +f2 char binary, +f3 char ascii, +f4 tinytext, +f5 text, +f6 mediumtext, +f7 longtext, +f8 tinyblob, +f9 blob, +f10 mediumblob, +f11 longblob, +f12 binary, +f13 tinyint, +f14 tinyint unsigned, +f15 tinyint zerofill, +f16 tinyint unsigned zerofill, +f17 smallint, +f18 smallint unsigned, +f19 smallint zerofill, +f20 smallint unsigned zerofill, +f21 mediumint, +f22 mediumint unsigned, +f23 mediumint zerofill, +f24 mediumint unsigned zerofill, +f25 int, +f26 int unsigned, +f27 int zerofill, +f28 int unsigned zerofill, +f29 bigint, +f30 bigint unsigned, +f31 bigint zerofill, +f32 bigint unsigned zerofill, +f33 decimal not null DEFAULT 9.9, +f34 decimal unsigned not null DEFAULT 9.9, +f35 decimal zerofill not null DEFAULT 9.9, +f36 decimal unsigned zerofill not null DEFAULT 9.9, +f37 decimal (0) not null DEFAULT 9.9, +f38 decimal (64) not null DEFAULT 9.9, +f39 decimal (0) unsigned not null DEFAULT 9.9, +f40 decimal (64) unsigned not null DEFAULT 9.9, +f41 decimal (0) zerofill not null DEFAULT 9.9, +f42 decimal (64) zerofill not null DEFAULT 9.9, +f43 decimal (0) unsigned zerofill not null DEFAULT 9.9, +f44 decimal (64) unsigned zerofill not null DEFAULT 9.9, +f45 decimal (0,0) not null DEFAULT 9.9, +f46 decimal (63,30) not null DEFAULT 9.9, +f47 decimal (0,0) unsigned not null DEFAULT 9.9, +f48 decimal (63,30) unsigned not null DEFAULT 9.9, +f49 decimal (0,0) zerofill not null DEFAULT 9.9, +f50 decimal (63,30) zerofill not null DEFAULT 9.9, +f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9, +f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9, +f53 numeric not null DEFAULT 99, +f54 numeric unsigned not null DEFAULT 99, +f55 numeric zerofill not null DEFAULT 99, +f56 numeric unsigned zerofill not null DEFAULT 99, +f57 numeric (0) not null DEFAULT 99, +f58 numeric (64) not null DEFAULT 99 +) engine = myisam; +Warnings: +Note 1265 Data truncated for column 'f33' at row 1 +Note 1265 Data truncated for column 'f34' at row 1 +Note 1265 Data truncated for column 'f35' at row 1 +Note 1265 Data truncated for column 'f36' at row 1 +Note 1265 Data truncated for column 'f37' at row 1 +Note 1265 Data truncated for column 'f38' at row 1 +Note 1265 Data truncated for column 'f39' at row 1 +Note 1265 Data truncated for column 'f40' at row 1 +Note 1265 Data truncated for column 'f41' at row 1 +Note 1265 Data truncated for column 'f42' at row 1 +Note 1265 Data truncated for column 'f43' at row 1 +Note 1265 Data truncated for column 'f44' at row 1 +Note 1265 Data truncated for column 'f45' at row 1 +Note 1265 Data truncated for column 'f47' at row 1 +Note 1265 Data truncated for column 'f49' at row 1 +Note 1265 Data truncated for column 'f51' at row 1 +load data infile '/std_data_ln/funcs_1/myisam_tb1.txt' +into table tb1; +drop table if exists tb2 ; +create table tb2 ( +f59 numeric (0) unsigned, +f60 numeric (64) unsigned, +f61 numeric (0) zerofill, +f62 numeric (64) zerofill, +f63 numeric (0) unsigned zerofill, +f64 numeric (64) unsigned zerofill, +f65 numeric (0,0), +f66 numeric (63,30), +f67 numeric (0,0) unsigned, +f68 numeric (63,30) unsigned, +f69 numeric (0,0) zerofill, +f70 numeric (63,30) zerofill, +f71 numeric (0,0) unsigned zerofill, +f72 numeric (63,30) unsigned zerofill, +f73 real, +f74 real unsigned, +f75 real zerofill, +f76 real unsigned zerofill, +f77 double default 7.7, +f78 double unsigned default 7.7, +f79 double zerofill default 7.7, +f80 double unsigned zerofill default 8.8, +f81 float not null default 8.8, +f82 float unsigned not null default 8.8, +f83 float zerofill not null default 8.8, +f84 float unsigned zerofill not null default 8.8, +f85 float(0) not null default 8.8, +f86 float(23) not null default 8.8, +f87 float(0) unsigned not null default 8.8, +f88 float(23) unsigned not null default 8.8, +f89 float(0) zerofill not null default 8.8, +f90 float(23) zerofill not null default 8.8, +f91 float(0) unsigned zerofill not null default 8.8, +f92 float(23) unsigned zerofill not null default 8.8, +f93 float(24) not null default 8.8, +f94 float(53) not null default 8.8, +f95 float(24) unsigned not null default 8.8, +f96 float(53) unsigned not null default 8.8, +f97 float(24) zerofill not null default 8.8, +f98 float(53) zerofill not null default 8.8, +f99 float(24) unsigned zerofill not null default 8.8, +f100 float(53) unsigned zerofill not null default 8.8, +f101 date not null default '2000-01-01', +f102 time not null default 20, +f103 datetime not null default '2/2/2', +f104 timestamp not null default 20001231235959, +f105 year not null default 2000, +f106 year(3) not null default 2000, +f107 year(4) not null default 2000, +f108 enum("1enum","2enum") not null default "1enum", +f109 set("1set","2set") not null default "1set", +f110 VARBINARY(64) null, +f111 VARBINARY(27) null , +f112 VARBINARY(64) null , +f113 VARBINARY(192) null , +f114 VARBINARY(192) , +f115 VARBINARY(27) null , +f116 VARBINARY(64) null, +f117 VARBINARY(192) null +) engine = myisam; +load data infile '/std_data_ln/funcs_1/myisam_tb2.txt' +into table tb2; +drop table if exists tb3 ; +create table tb3 ( +f118 char not null DEFAULT 'a', +f119 char binary not null DEFAULT b'101', +f120 char ascii not null DEFAULT b'101', +f121 tinytext, +f122 text, +f123 mediumtext, +f124 longtext, +f125 tinyblob, +f126 blob, +f127 mediumblob, +f128 longblob, +f129 binary not null DEFAULT b'101', +f130 tinyint not null DEFAULT 99, +f131 tinyint unsigned not null DEFAULT 99, +f132 tinyint zerofill not null DEFAULT 99, +f133 tinyint unsigned zerofill not null DEFAULT 99, +f134 smallint not null DEFAULT 999, +f135 smallint unsigned not null DEFAULT 999, +f136 smallint zerofill not null DEFAULT 999, +f137 smallint unsigned zerofill not null DEFAULT 999, +f138 mediumint not null DEFAULT 9999, +f139 mediumint unsigned not null DEFAULT 9999, +f140 mediumint zerofill not null DEFAULT 9999, +f141 mediumint unsigned zerofill not null DEFAULT 9999, +f142 int not null DEFAULT 99999, +f143 int unsigned not null DEFAULT 99999, +f144 int zerofill not null DEFAULT 99999, +f145 int unsigned zerofill not null DEFAULT 99999, +f146 bigint not null DEFAULT 999999, +f147 bigint unsigned not null DEFAULT 999999, +f148 bigint zerofill not null DEFAULT 999999, +f149 bigint unsigned zerofill not null DEFAULT 999999, +f150 decimal not null DEFAULT 999.999, +f151 decimal unsigned not null DEFAULT 999.17, +f152 decimal zerofill not null DEFAULT 999.999, +f153 decimal unsigned zerofill, +f154 decimal (0), +f155 decimal (64), +f156 decimal (0) unsigned, +f157 decimal (64) unsigned, +f158 decimal (0) zerofill, +f159 decimal (64) zerofill, +f160 decimal (0) unsigned zerofill, +f161 decimal (64) unsigned zerofill, +f162 decimal (0,0), +f163 decimal (63,30), +f164 decimal (0,0) unsigned, +f165 decimal (63,30) unsigned, +f166 decimal (0,0) zerofill, +f167 decimal (63,30) zerofill, +f168 decimal (0,0) unsigned zerofill, +f169 decimal (63,30) unsigned zerofill, +f170 numeric, +f171 numeric unsigned, +f172 numeric zerofill, +f173 numeric unsigned zerofill, +f174 numeric (0), +f175 numeric (64) +) Engine = myisam; +Warnings: +Note 1265 Data truncated for column 'f150' at row 1 +Note 1265 Data truncated for column 'f151' at row 1 +Note 1265 Data truncated for column 'f152' at row 1 +load data infile '/std_data_ln/funcs_1/myisam_tb3.txt' +into table tb3; +drop table if exists tb4 ; +create table tb4 ( +f176 numeric (0) unsigned not null DEFAULT 9, +f177 numeric (64) unsigned not null DEFAULT 9, +f178 numeric (0) zerofill not null DEFAULT 9, +f179 numeric (64) zerofill not null DEFAULT 9, +f180 numeric (0) unsigned zerofill not null DEFAULT 9, +f181 numeric (64) unsigned zerofill not null DEFAULT 9, +f182 numeric (0,0) not null DEFAULT 9, +f183 numeric (63,30) not null DEFAULT 9, +f184 numeric (0,0) unsigned not null DEFAULT 9, +f185 numeric (63,30) unsigned not null DEFAULT 9, +f186 numeric (0,0) zerofill not null DEFAULT 9, +f187 numeric (63,30) zerofill not null DEFAULT 9, +f188 numeric (0,0) unsigned zerofill not null DEFAULT 9, +f189 numeric (63,30) unsigned zerofill not null DEFAULT 9, +f190 real not null DEFAULT 88.8, +f191 real unsigned not null DEFAULT 88.8, +f192 real zerofill not null DEFAULT 88.8, +f193 real unsigned zerofill not null DEFAULT 88.8, +f194 double not null DEFAULT 55.5, +f195 double unsigned not null DEFAULT 55.5, +f196 double zerofill not null DEFAULT 55.5, +f197 double unsigned zerofill not null DEFAULT 55.5, +f198 float, +f199 float unsigned, +f200 float zerofill, +f201 float unsigned zerofill, +f202 float(0), +f203 float(23), +f204 float(0) unsigned, +f205 float(23) unsigned, +f206 float(0) zerofill, +f207 float(23) zerofill, +f208 float(0) unsigned zerofill, +f209 float(23) unsigned zerofill, +f210 float(24), +f211 float(53), +f212 float(24) unsigned, +f213 float(53) unsigned, +f214 float(24) zerofill, +f215 float(53) zerofill, +f216 float(24) unsigned zerofill, +f217 float(53) unsigned zerofill, +f218 date, +f219 time, +f220 datetime, +f221 timestamp, +f222 year, +f223 year(3), +f224 year(4), +f225 enum("1enum","2enum"), +f226 set("1set","2set"), +f227 VARBINARY(64), +f228 VARBINARY(27), +f229 VARBINARY(64), +f230 VARBINARY(192), +f231 VARBINARY(192), +f232 VARBINARY(27), +f233 VARBINARY(64), +f234 VARBINARY(192), +f235 char(255), +f236 char(60) ascii, +f237 char(255) binary, +f238 varchar(0) binary, +f239 varbinary(1000), +f240 varchar(120), +f241 char(100), +f242 bit(30) +) engine = myisam; +load data infile '/std_data_ln/funcs_1/myisam_tb4.txt' +into table tb4; +USE test1; +drop table if exists tb2 ; +create table tb2 ( +f59 numeric (0) unsigned, +f60 numeric (64) unsigned, +f61 numeric (0) zerofill, +f62 numeric (64) zerofill, +f63 numeric (0) unsigned zerofill, +f64 numeric (64) unsigned zerofill, +f65 numeric (0,0), +f66 numeric (63,30), +f67 numeric (0,0) unsigned, +f68 numeric (63,30) unsigned, +f69 numeric (0,0) zerofill, +f70 numeric (63,30) zerofill, +f71 numeric (0,0) unsigned zerofill, +f72 numeric (63,30) unsigned zerofill, +f73 real, +f74 real unsigned, +f75 real zerofill, +f76 real unsigned zerofill, +f77 double default 7.7, +f78 double unsigned default 7.7, +f79 double zerofill default 7.7, +f80 double unsigned zerofill default 8.8, +f81 float not null default 8.8, +f82 float unsigned not null default 8.8, +f83 float zerofill not null default 8.8, +f84 float unsigned zerofill not null default 8.8, +f85 float(0) not null default 8.8, +f86 float(23) not null default 8.8, +f87 float(0) unsigned not null default 8.8, +f88 float(23) unsigned not null default 8.8, +f89 float(0) zerofill not null default 8.8, +f90 float(23) zerofill not null default 8.8, +f91 float(0) unsigned zerofill not null default 8.8, +f92 float(23) unsigned zerofill not null default 8.8, +f93 float(24) not null default 8.8, +f94 float(53) not null default 8.8, +f95 float(24) unsigned not null default 8.8, +f96 float(53) unsigned not null default 8.8, +f97 float(24) zerofill not null default 8.8, +f98 float(53) zerofill not null default 8.8, +f99 float(24) unsigned zerofill not null default 8.8, +f100 float(53) unsigned zerofill not null default 8.8, +f101 date not null default '2000-01-01', +f102 time not null default 20, +f103 datetime not null default '2/2/2', +f104 timestamp not null default 20001231235959, +f105 year not null default 2000, +f106 year(3) not null default 2000, +f107 year(4) not null default 2000, +f108 enum("1enum","2enum") not null default "1enum", +f109 set("1set","2set") not null default "1set", +f110 VARBINARY(64) null, +f111 VARBINARY(27) null , +f112 VARBINARY(64) null , +f113 VARBINARY(192) null , +f114 VARBINARY(192) , +f115 VARBINARY(27) null , +f116 VARBINARY(64) null, +f117 VARBINARY(192) null +) engine = myisam; +load data infile '/std_data_ln/funcs_1/myisam_tb2.txt' +into table tb2; +USE test; +USE test; +DROP TABLE IF EXISTS t1, t2, t4, t10, t11; +CREATE TABLE t1 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +ENGINE = MyISAM; +CREATE TABLE t2 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +ENGINE = MyISAM; +CREATE TABLE t4 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +ENGINE = MyISAM; +CREATE TABLE t10 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +ENGINE = MyISAM; +CREATE TABLE t11 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +ENGINE = MyISAM; +LOAD DATA INFILE '/std_data_ln/funcs_1/t4.txt' INTO TABLE t1; +LOAD DATA INFILE '/std_data_ln/funcs_1/t4.txt' INTO TABLE t2; +LOAD DATA INFILE '/std_data_ln/funcs_1/t4.txt' INTO TABLE t4; +LOAD DATA INFILE '/std_data_ln/funcs_1/t4.txt' INTO TABLE t10; +LOAD DATA INFILE '/std_data_ln/funcs_1/t4.txt' INTO TABLE t11; +drop TABLE if exists t3; +CREATE TABLE t3 (f1 char(20), f2 char(20), f3 integer) ENGINE = MyISAM; +LOAD DATA INFILE '/std_data_ln/funcs_1/t3.txt' INTO TABLE t3; +drop database if exists test4; +CREATE database test4; +use test4; +CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) +ENGINE = MyISAM; +LOAD DATA INFILE '/std_data_ln/funcs_1/t4.txt' INTO TABLE t6; +use test; +drop TABLE if exists t7, t8; +CREATE TABLE t7 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = MyISAM; +CREATE TABLE t8 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = MyISAM; +LOAD DATA INFILE '/std_data_ln/funcs_1/t7.txt' INTO TABLE t7; +Warnings: +Warning 1265 Data truncated for column 'f3' at row 1 +Warning 1265 Data truncated for column 'f3' at row 2 +Warning 1265 Data truncated for column 'f3' at row 3 +Warning 1265 Data truncated for column 'f3' at row 4 +Warning 1265 Data truncated for column 'f3' at row 5 +Warning 1265 Data truncated for column 'f3' at row 6 +Warning 1265 Data truncated for column 'f3' at row 7 +Warning 1265 Data truncated for column 'f3' at row 8 +Warning 1265 Data truncated for column 'f3' at row 9 +Warning 1265 Data truncated for column 'f3' at row 10 +LOAD DATA INFILE '/std_data_ln/funcs_1/t7.txt' INTO TABLE t8; +Warnings: +Warning 1265 Data truncated for column 'f3' at row 1 +Warning 1265 Data truncated for column 'f3' at row 2 +Warning 1265 Data truncated for column 'f3' at row 3 +Warning 1265 Data truncated for column 'f3' at row 4 +Warning 1265 Data truncated for column 'f3' at row 5 +Warning 1265 Data truncated for column 'f3' at row 6 +Warning 1265 Data truncated for column 'f3' at row 7 +Warning 1265 Data truncated for column 'f3' at row 8 +Warning 1265 Data truncated for column 'f3' at row 9 +Warning 1265 Data truncated for column 'f3' at row 10 +drop TABLE if exists t9; +CREATE TABLE t9 (f1 int, f2 char(25), f3 int) ENGINE = MyISAM; +LOAD DATA INFILE '/std_data_ln/funcs_1/t9.txt' INTO TABLE t9; +SELECT * FROM information_schema.columns +WHERE table_schema LIKE 'test%' +ORDER BY table_schema, table_name, column_name; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT +NULL test t1 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) +NULL test t1 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) +NULL test t1 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date +NULL test t1 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) +NULL test t1 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) +NULL test t1 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) +NULL test t10 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) +NULL test t10 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) +NULL test t10 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date +NULL test t10 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) +NULL test t10 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) +NULL test t10 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) +NULL test t11 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) +NULL test t11 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) +NULL test t11 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date +NULL test t11 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) +NULL test t11 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) +NULL test t11 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) +NULL test t2 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) +NULL test t2 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) +NULL test t2 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date +NULL test t2 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) +NULL test t2 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) +NULL test t2 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) +NULL test t3 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) +NULL test t3 f2 2 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) +NULL test t3 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) +NULL test t4 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) +NULL test t4 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) +NULL test t4 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date +NULL test t4 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) +NULL test t4 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) +NULL test t4 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) +NULL test t7 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) +NULL test t7 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) +NULL test t7 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date +NULL test t7 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) +NULL test t8 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) +NULL test t8 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) +NULL test t8 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date +NULL test t8 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) +NULL test t9 f1 1 NULL YES int NULL NULL 10 0 NULL NULL int(11) +NULL test t9 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) +NULL test t9 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) +NULL test tb1 f1 1 NULL YES char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) +NULL test tb1 f10 10 NULL YES mediumblob 16777215 16777215 NULL NULL NULL NULL mediumblob +NULL test tb1 f11 11 NULL YES longblob 4294967295 4294967295 NULL NULL NULL NULL longblob +NULL test tb1 f12 12 NULL YES binary 1 1 NULL NULL NULL NULL binary(1) +NULL test tb1 f13 13 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(4) +NULL test tb1 f14 14 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned +NULL test tb1 f15 15 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill +NULL test tb1 f16 16 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill +NULL test tb1 f17 17 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(6) +NULL test tb1 f18 18 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned +NULL test tb1 f19 19 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill +NULL test tb1 f2 2 NULL YES char 1 1 NULL NULL latin1 latin1_bin char(1) +NULL test tb1 f20 20 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill +NULL test tb1 f21 21 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(9) +NULL test tb1 f22 22 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned +NULL test tb1 f23 23 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill +NULL test tb1 f24 24 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill +NULL test tb1 f25 25 NULL YES int NULL NULL 10 0 NULL NULL int(11) +NULL test tb1 f26 26 NULL YES int NULL NULL 10 0 NULL NULL int(10) unsigned +NULL test tb1 f27 27 NULL YES int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill +NULL test tb1 f28 28 NULL YES int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill +NULL test tb1 f29 29 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) +NULL test tb1 f3 3 NULL YES char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) +NULL test tb1 f30 30 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned +NULL test tb1 f31 31 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill +NULL test tb1 f32 32 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill +NULL test tb1 f33 33 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) +NULL test tb1 f34 34 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned +NULL test tb1 f35 35 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill +NULL test tb1 f36 36 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill +NULL test tb1 f37 37 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) +NULL test tb1 f38 38 10 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) +NULL test tb1 f39 39 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned +NULL test tb1 f4 4 NULL YES tinytext 255 255 NULL NULL latin1 latin1_swedish_ci tinytext +NULL test tb1 f40 40 10 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned +NULL test tb1 f41 41 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill +NULL test tb1 f42 42 0000000000000000000000000000000000000000000000000000000000000010 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill +NULL test tb1 f43 43 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill +NULL test tb1 f44 44 0000000000000000000000000000000000000000000000000000000000000010 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill +NULL test tb1 f45 45 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) +NULL test tb1 f46 46 9.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) +NULL test tb1 f47 47 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned +NULL test tb1 f48 48 9.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned +NULL test tb1 f49 49 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill +NULL test tb1 f5 5 NULL YES text 65535 65535 NULL NULL latin1 latin1_swedish_ci text +NULL test tb1 f50 50 000000000000000000000000000000009.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill +NULL test tb1 f51 51 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill +NULL test tb1 f52 52 000000000000000000000000000000009.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill +NULL test tb1 f53 53 99 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) +NULL test tb1 f54 54 99 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned +NULL test tb1 f55 55 0000000099 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill +NULL test tb1 f56 56 0000000099 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill +NULL test tb1 f57 57 99 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) +NULL test tb1 f58 58 99 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) +NULL test tb1 f6 6 NULL YES mediumtext 16777215 16777215 NULL NULL latin1 latin1_swedish_ci mediumtext +NULL test tb1 f7 7 NULL YES longtext 4294967295 4294967295 NULL NULL latin1 latin1_swedish_ci longtext +NULL test tb1 f8 8 NULL YES tinyblob 255 255 NULL NULL NULL NULL tinyblob +NULL test tb1 f9 9 NULL YES blob 65535 65535 NULL NULL NULL NULL blob +NULL test tb2 f100 42 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill +NULL test tb2 f101 43 2000-01-01 NO date NULL NULL NULL NULL NULL NULL date +NULL test tb2 f102 44 00:00:20 NO time NULL NULL NULL NULL NULL NULL time +NULL test tb2 f103 45 0002-02-02 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime +NULL test tb2 f104 46 2000-12-31 23:59:59 NO timestamp NULL NULL NULL NULL NULL NULL timestamp +NULL test tb2 f105 47 2000 NO year NULL NULL NULL NULL NULL NULL year(4) +NULL test tb2 f106 48 2000 NO year NULL NULL NULL NULL NULL NULL year(4) +NULL test tb2 f107 49 2000 NO year NULL NULL NULL NULL NULL NULL year(4) +NULL test tb2 f108 50 1enum NO enum 5 5 NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') +NULL test tb2 f109 51 1set NO set 9 9 NULL NULL latin1 latin1_swedish_ci set('1set','2set') +NULL test tb2 f110 52 NULL YES varbinary 64 64 NULL NULL NULL NULL varbinary(64) +NULL test tb2 f111 53 NULL YES varbinary 27 27 NULL NULL NULL NULL varbinary(27) +NULL test tb2 f112 54 NULL YES varbinary 64 64 NULL NULL NULL NULL varbinary(64) +NULL test tb2 f113 55 NULL YES varbinary 192 192 NULL NULL NULL NULL varbinary(192) +NULL test tb2 f114 56 NULL YES varbinary 192 192 NULL NULL NULL NULL varbinary(192) +NULL test tb2 f115 57 NULL YES varbinary 27 27 NULL NULL NULL NULL varbinary(27) +NULL test tb2 f116 58 NULL YES varbinary 64 64 NULL NULL NULL NULL varbinary(64) +NULL test tb2 f117 59 NULL YES varbinary 192 192 NULL NULL NULL NULL varbinary(192) +NULL test tb2 f59 1 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned +NULL test tb2 f60 2 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned +NULL test tb2 f61 3 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill +NULL test tb2 f62 4 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill +NULL test tb2 f63 5 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill +NULL test tb2 f64 6 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill +NULL test tb2 f65 7 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) +NULL test tb2 f66 8 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) +NULL test tb2 f67 9 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned +NULL test tb2 f68 10 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned +NULL test tb2 f69 11 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill +NULL test tb2 f70 12 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill +NULL test tb2 f71 13 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill +NULL test tb2 f72 14 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill +NULL test tb2 f73 15 NULL YES double NULL NULL 22 NULL NULL NULL double +NULL test tb2 f74 16 NULL YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned +NULL test tb2 f75 17 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill +NULL test tb2 f76 18 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill +NULL test tb2 f77 19 7.7 YES double NULL NULL 22 NULL NULL NULL double +NULL test tb2 f78 20 7.7 YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned +NULL test tb2 f79 21 00000000000000000007.7 YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill +NULL test tb2 f80 22 00000000000000000008.8 YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill +NULL test tb2 f81 23 8.8 NO float NULL NULL 12 NULL NULL NULL float +NULL test tb2 f82 24 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned +NULL test tb2 f83 25 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill +NULL test tb2 f84 26 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill +NULL test tb2 f85 27 8.8 NO float NULL NULL 12 NULL NULL NULL float +NULL test tb2 f86 28 8.8 NO float NULL NULL 12 NULL NULL NULL float +NULL test tb2 f87 29 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned +NULL test tb2 f88 30 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned +NULL test tb2 f89 31 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill +NULL test tb2 f90 32 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill +NULL test tb2 f91 33 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill +NULL test tb2 f92 34 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill +NULL test tb2 f93 35 8.8 NO float NULL NULL 12 NULL NULL NULL float +NULL test tb2 f94 36 8.8 NO double NULL NULL 22 NULL NULL NULL double +NULL test tb2 f95 37 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned +NULL test tb2 f96 38 8.8 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned +NULL test tb2 f97 39 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill +NULL test tb2 f98 40 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill +NULL test tb2 f99 41 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill +NULL test tb3 f118 1 a NO char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) +NULL test tb3 f119 2  NO char 1 1 NULL NULL latin1 latin1_bin char(1) +NULL test tb3 f120 3  NO char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) +NULL test tb3 f121 4 NULL YES tinytext 255 255 NULL NULL latin1 latin1_swedish_ci tinytext +NULL test tb3 f122 5 NULL YES text 65535 65535 NULL NULL latin1 latin1_swedish_ci text +NULL test tb3 f123 6 NULL YES mediumtext 16777215 16777215 NULL NULL latin1 latin1_swedish_ci mediumtext +NULL test tb3 f124 7 NULL YES longtext 4294967295 4294967295 NULL NULL latin1 latin1_swedish_ci longtext +NULL test tb3 f125 8 NULL YES tinyblob 255 255 NULL NULL NULL NULL tinyblob +NULL test tb3 f126 9 NULL YES blob 65535 65535 NULL NULL NULL NULL blob +NULL test tb3 f127 10 NULL YES mediumblob 16777215 16777215 NULL NULL NULL NULL mediumblob +NULL test tb3 f128 11 NULL YES longblob 4294967295 4294967295 NULL NULL NULL NULL longblob +NULL test tb3 f129 12  NO binary 1 1 NULL NULL NULL NULL binary(1) +NULL test tb3 f130 13 99 NO tinyint NULL NULL 3 0 NULL NULL tinyint(4) +NULL test tb3 f131 14 99 NO tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned +NULL test tb3 f132 15 099 NO tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill +NULL test tb3 f133 16 099 NO tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill +NULL test tb3 f134 17 999 NO smallint NULL NULL 5 0 NULL NULL smallint(6) +NULL test tb3 f135 18 999 NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned +NULL test tb3 f136 19 00999 NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill +NULL test tb3 f137 20 00999 NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill +NULL test tb3 f138 21 9999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(9) +NULL test tb3 f139 22 9999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned +NULL test tb3 f140 23 00009999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill +NULL test tb3 f141 24 00009999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill +NULL test tb3 f142 25 99999 NO int NULL NULL 10 0 NULL NULL int(11) +NULL test tb3 f143 26 99999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned +NULL test tb3 f144 27 0000099999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill +NULL test tb3 f145 28 0000099999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill +NULL test tb3 f146 29 999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) +NULL test tb3 f147 30 999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned +NULL test tb3 f148 31 00000000000000999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill +NULL test tb3 f149 32 00000000000000999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill +NULL test tb3 f150 33 1000 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) +NULL test tb3 f151 34 999 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned +NULL test tb3 f152 35 0000001000 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill +NULL test tb3 f153 36 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill +NULL test tb3 f154 37 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) +NULL test tb3 f155 38 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) +NULL test tb3 f156 39 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned +NULL test tb3 f157 40 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned +NULL test tb3 f158 41 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill +NULL test tb3 f159 42 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill +NULL test tb3 f160 43 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill +NULL test tb3 f161 44 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill +NULL test tb3 f162 45 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) +NULL test tb3 f163 46 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) +NULL test tb3 f164 47 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned +NULL test tb3 f165 48 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned +NULL test tb3 f166 49 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill +NULL test tb3 f167 50 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill +NULL test tb3 f168 51 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill +NULL test tb3 f169 52 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill +NULL test tb3 f170 53 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) +NULL test tb3 f171 54 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned +NULL test tb3 f172 55 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill +NULL test tb3 f173 56 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill +NULL test tb3 f174 57 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) +NULL test tb3 f175 58 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) +NULL test tb4 f176 1 9 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned +NULL test tb4 f177 2 9 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned +NULL test tb4 f178 3 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill +NULL test tb4 f179 4 0000000000000000000000000000000000000000000000000000000000000009 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill +NULL test tb4 f180 5 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill +NULL test tb4 f181 6 0000000000000000000000000000000000000000000000000000000000000009 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill +NULL test tb4 f182 7 9 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) +NULL test tb4 f183 8 9.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) +NULL test tb4 f184 9 9 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned +NULL test tb4 f185 10 9.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned +NULL test tb4 f186 11 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill +NULL test tb4 f187 12 000000000000000000000000000000009.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill +NULL test tb4 f188 13 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill +NULL test tb4 f189 14 000000000000000000000000000000009.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill +NULL test tb4 f190 15 88.8 NO double NULL NULL 22 NULL NULL NULL double +NULL test tb4 f191 16 88.8 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned +NULL test tb4 f192 17 00000000000000000088.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill +NULL test tb4 f193 18 00000000000000000088.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill +NULL test tb4 f194 19 55.5 NO double NULL NULL 22 NULL NULL NULL double +NULL test tb4 f195 20 55.5 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned +NULL test tb4 f196 21 00000000000000000055.5 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill +NULL test tb4 f197 22 00000000000000000055.5 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill +NULL test tb4 f198 23 NULL YES float NULL NULL 12 NULL NULL NULL float +NULL test tb4 f199 24 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned +NULL test tb4 f200 25 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill +NULL test tb4 f201 26 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill +NULL test tb4 f202 27 NULL YES float NULL NULL 12 NULL NULL NULL float +NULL test tb4 f203 28 NULL YES float NULL NULL 12 NULL NULL NULL float +NULL test tb4 f204 29 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned +NULL test tb4 f205 30 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned +NULL test tb4 f206 31 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill +NULL test tb4 f207 32 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill +NULL test tb4 f208 33 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill +NULL test tb4 f209 34 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill +NULL test tb4 f210 35 NULL YES float NULL NULL 12 NULL NULL NULL float +NULL test tb4 f211 36 NULL YES double NULL NULL 22 NULL NULL NULL double +NULL test tb4 f212 37 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned +NULL test tb4 f213 38 NULL YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned +NULL test tb4 f214 39 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill +NULL test tb4 f215 40 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill +NULL test tb4 f216 41 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill +NULL test tb4 f217 42 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill +NULL test tb4 f218 43 NULL YES date NULL NULL NULL NULL NULL NULL date +NULL test tb4 f219 44 NULL YES time NULL NULL NULL NULL NULL NULL time +NULL test tb4 f220 45 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime +NULL test tb4 f221 46 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp +NULL test tb4 f222 47 NULL YES year NULL NULL NULL NULL NULL NULL year(4) +NULL test tb4 f223 48 NULL YES year NULL NULL NULL NULL NULL NULL year(4) +NULL test tb4 f224 49 NULL YES year NULL NULL NULL NULL NULL NULL year(4) +NULL test tb4 f225 50 NULL YES enum 5 5 NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') +NULL test tb4 f226 51 NULL YES set 9 9 NULL NULL latin1 latin1_swedish_ci set('1set','2set') +NULL test tb4 f227 52 NULL YES varbinary 64 64 NULL NULL NULL NULL varbinary(64) +NULL test tb4 f228 53 NULL YES varbinary 27 27 NULL NULL NULL NULL varbinary(27) +NULL test tb4 f229 54 NULL YES varbinary 64 64 NULL NULL NULL NULL varbinary(64) +NULL test tb4 f230 55 NULL YES varbinary 192 192 NULL NULL NULL NULL varbinary(192) +NULL test tb4 f231 56 NULL YES varbinary 192 192 NULL NULL NULL NULL varbinary(192) +NULL test tb4 f232 57 NULL YES varbinary 27 27 NULL NULL NULL NULL varbinary(27) +NULL test tb4 f233 58 NULL YES varbinary 64 64 NULL NULL NULL NULL varbinary(64) +NULL test tb4 f234 59 NULL YES varbinary 192 192 NULL NULL NULL NULL varbinary(192) +NULL test tb4 f235 60 NULL YES char 255 255 NULL NULL latin1 latin1_swedish_ci char(255) +NULL test tb4 f236 61 NULL YES char 60 60 NULL NULL latin1 latin1_swedish_ci char(60) +NULL test tb4 f237 62 NULL YES char 255 255 NULL NULL latin1 latin1_bin char(255) +NULL test tb4 f238 63 NULL YES varchar 0 0 NULL NULL latin1 latin1_bin varchar(0) +NULL test tb4 f239 64 NULL YES varbinary 1000 1000 NULL NULL NULL NULL varbinary(1000) +NULL test tb4 f240 65 NULL YES varchar 120 120 NULL NULL latin1 latin1_swedish_ci varchar(120) +NULL test tb4 f241 66 NULL YES char 100 100 NULL NULL latin1 latin1_swedish_ci char(100) +NULL test tb4 f242 67 NULL YES bit NULL NULL 30 NULL NULL NULL bit(30) +NULL test1 tb2 f100 42 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill +NULL test1 tb2 f101 43 2000-01-01 NO date NULL NULL NULL NULL NULL NULL date +NULL test1 tb2 f102 44 00:00:20 NO time NULL NULL NULL NULL NULL NULL time +NULL test1 tb2 f103 45 0002-02-02 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime +NULL test1 tb2 f104 46 2000-12-31 23:59:59 NO timestamp NULL NULL NULL NULL NULL NULL timestamp +NULL test1 tb2 f105 47 2000 NO year NULL NULL NULL NULL NULL NULL year(4) +NULL test1 tb2 f106 48 2000 NO year NULL NULL NULL NULL NULL NULL year(4) +NULL test1 tb2 f107 49 2000 NO year NULL NULL NULL NULL NULL NULL year(4) +NULL test1 tb2 f108 50 1enum NO enum 5 5 NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') +NULL test1 tb2 f109 51 1set NO set 9 9 NULL NULL latin1 latin1_swedish_ci set('1set','2set') +NULL test1 tb2 f110 52 NULL YES varbinary 64 64 NULL NULL NULL NULL varbinary(64) +NULL test1 tb2 f111 53 NULL YES varbinary 27 27 NULL NULL NULL NULL varbinary(27) +NULL test1 tb2 f112 54 NULL YES varbinary 64 64 NULL NULL NULL NULL varbinary(64) +NULL test1 tb2 f113 55 NULL YES varbinary 192 192 NULL NULL NULL NULL varbinary(192) +NULL test1 tb2 f114 56 NULL YES varbinary 192 192 NULL NULL NULL NULL varbinary(192) +NULL test1 tb2 f115 57 NULL YES varbinary 27 27 NULL NULL NULL NULL varbinary(27) +NULL test1 tb2 f116 58 NULL YES varbinary 64 64 NULL NULL NULL NULL varbinary(64) +NULL test1 tb2 f117 59 NULL YES varbinary 192 192 NULL NULL NULL NULL varbinary(192) +NULL test1 tb2 f59 1 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned +NULL test1 tb2 f60 2 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned +NULL test1 tb2 f61 3 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill +NULL test1 tb2 f62 4 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill +NULL test1 tb2 f63 5 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill +NULL test1 tb2 f64 6 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill +NULL test1 tb2 f65 7 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) +NULL test1 tb2 f66 8 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) +NULL test1 tb2 f67 9 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned +NULL test1 tb2 f68 10 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned +NULL test1 tb2 f69 11 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill +NULL test1 tb2 f70 12 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill +NULL test1 tb2 f71 13 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill +NULL test1 tb2 f72 14 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill +NULL test1 tb2 f73 15 NULL YES double NULL NULL 22 NULL NULL NULL double +NULL test1 tb2 f74 16 NULL YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned +NULL test1 tb2 f75 17 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill +NULL test1 tb2 f76 18 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill +NULL test1 tb2 f77 19 7.7 YES double NULL NULL 22 NULL NULL NULL double +NULL test1 tb2 f78 20 7.7 YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned +NULL test1 tb2 f79 21 00000000000000000007.7 YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill +NULL test1 tb2 f80 22 00000000000000000008.8 YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill +NULL test1 tb2 f81 23 8.8 NO float NULL NULL 12 NULL NULL NULL float +NULL test1 tb2 f82 24 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned +NULL test1 tb2 f83 25 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill +NULL test1 tb2 f84 26 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill +NULL test1 tb2 f85 27 8.8 NO float NULL NULL 12 NULL NULL NULL float +NULL test1 tb2 f86 28 8.8 NO float NULL NULL 12 NULL NULL NULL float +NULL test1 tb2 f87 29 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned +NULL test1 tb2 f88 30 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned +NULL test1 tb2 f89 31 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill +NULL test1 tb2 f90 32 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill +NULL test1 tb2 f91 33 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill +NULL test1 tb2 f92 34 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill +NULL test1 tb2 f93 35 8.8 NO float NULL NULL 12 NULL NULL NULL float +NULL test1 tb2 f94 36 8.8 NO double NULL NULL 22 NULL NULL NULL double +NULL test1 tb2 f95 37 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned +NULL test1 tb2 f96 38 8.8 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned +NULL test1 tb2 f97 39 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill +NULL test1 tb2 f98 40 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill +NULL test1 tb2 f99 41 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill +NULL test4 t6 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) +NULL test4 t6 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) +NULL test4 t6 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date +NULL test4 t6 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) +NULL test4 t6 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) +NULL test4 t6 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) +########################################################################## +# Show the quotient of CHARACTER_OCTET_LENGTH and CHARACTER_MAXIMUM_LENGTH +########################################################################## +SELECT DISTINCT +CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, +DATA_TYPE, +CHARACTER_SET_NAME, +COLLATION_NAME +FROM information_schema.columns +WHERE table_schema LIKE 'test%' +AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH = 1 +ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML; +COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME +1.0000 binary NULL NULL +1.0000 blob NULL NULL +1.0000 longblob NULL NULL +1.0000 mediumblob NULL NULL +1.0000 tinyblob NULL NULL +1.0000 varbinary NULL NULL +1.0000 char latin1 latin1_bin +1.0000 char latin1 latin1_swedish_ci +1.0000 enum latin1 latin1_swedish_ci +1.0000 longtext latin1 latin1_swedish_ci +1.0000 mediumtext latin1 latin1_swedish_ci +1.0000 set latin1 latin1_swedish_ci +1.0000 text latin1 latin1_swedish_ci +1.0000 tinytext latin1 latin1_swedish_ci +1.0000 varchar latin1 latin1_swedish_ci +SELECT DISTINCT +CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, +DATA_TYPE, +CHARACTER_SET_NAME, +COLLATION_NAME +FROM information_schema.columns +WHERE table_schema LIKE 'test%' +AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH <> 1 +ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML; +COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME +SELECT DISTINCT +CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, +DATA_TYPE, +CHARACTER_SET_NAME, +COLLATION_NAME +FROM information_schema.columns +WHERE table_schema LIKE 'test%' +AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH IS NULL +ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML; +COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME +NULL bigint NULL NULL +NULL bit NULL NULL +NULL date NULL NULL +NULL datetime NULL NULL +NULL decimal NULL NULL +NULL double NULL NULL +NULL double unsigned NULL NULL +NULL double unsigned zerofill NULL NULL +NULL float NULL NULL +NULL float unsigned NULL NULL +NULL float unsigned zerofill NULL NULL +NULL int NULL NULL +NULL mediumint NULL NULL +NULL smallint NULL NULL +NULL time NULL NULL +NULL timestamp NULL NULL +NULL tinyint NULL NULL +NULL year NULL NULL +NULL varchar latin1 latin1_bin +--> CHAR(0) is allowed (see manual), and here both CHARACHTER_* values +--> are 0, which is intended behavior, and the result of 0 / 0 IS NULL +SELECT CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, +TABLE_SCHEMA, +TABLE_NAME, +COLUMN_NAME, +DATA_TYPE, +CHARACTER_MAXIMUM_LENGTH, +CHARACTER_OCTET_LENGTH, +CHARACTER_SET_NAME, +COLLATION_NAME, +COLUMN_TYPE +FROM information_schema.columns +WHERE table_schema LIKE 'test%' +ORDER BY TABLE_SCHEMA, TABLE_NAME, ORDINAL_POSITION; +COL_CML TABLE_SCHEMA TABLE_NAME COLUMN_NAME DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE +1.0000 test t1 f1 char 20 20 latin1 latin1_swedish_ci char(20) +1.0000 test t1 f2 char 25 25 latin1 latin1_swedish_ci char(25) +NULL test t1 f3 date NULL NULL NULL NULL date +NULL test t1 f4 int NULL NULL NULL NULL int(11) +1.0000 test t1 f5 char 25 25 latin1 latin1_swedish_ci char(25) +NULL test t1 f6 int NULL NULL NULL NULL int(11) +1.0000 test t10 f1 char 20 20 latin1 latin1_swedish_ci char(20) +1.0000 test t10 f2 char 25 25 latin1 latin1_swedish_ci char(25) +NULL test t10 f3 date NULL NULL NULL NULL date +NULL test t10 f4 int NULL NULL NULL NULL int(11) +1.0000 test t10 f5 char 25 25 latin1 latin1_swedish_ci char(25) +NULL test t10 f6 int NULL NULL NULL NULL int(11) +1.0000 test t11 f1 char 20 20 latin1 latin1_swedish_ci char(20) +1.0000 test t11 f2 char 25 25 latin1 latin1_swedish_ci char(25) +NULL test t11 f3 date NULL NULL NULL NULL date +NULL test t11 f4 int NULL NULL NULL NULL int(11) +1.0000 test t11 f5 char 25 25 latin1 latin1_swedish_ci char(25) +NULL test t11 f6 int NULL NULL NULL NULL int(11) +1.0000 test t2 f1 char 20 20 latin1 latin1_swedish_ci char(20) +1.0000 test t2 f2 char 25 25 latin1 latin1_swedish_ci char(25) +NULL test t2 f3 date NULL NULL NULL NULL date +NULL test t2 f4 int NULL NULL NULL NULL int(11) +1.0000 test t2 f5 char 25 25 latin1 latin1_swedish_ci char(25) +NULL test t2 f6 int NULL NULL NULL NULL int(11) +1.0000 test t3 f1 char 20 20 latin1 latin1_swedish_ci char(20) +1.0000 test t3 f2 char 20 20 latin1 latin1_swedish_ci char(20) +NULL test t3 f3 int NULL NULL NULL NULL int(11) +1.0000 test t4 f1 char 20 20 latin1 latin1_swedish_ci char(20) +1.0000 test t4 f2 char 25 25 latin1 latin1_swedish_ci char(25) +NULL test t4 f3 date NULL NULL NULL NULL date +NULL test t4 f4 int NULL NULL NULL NULL int(11) +1.0000 test t4 f5 char 25 25 latin1 latin1_swedish_ci char(25) +NULL test t4 f6 int NULL NULL NULL NULL int(11) +1.0000 test t7 f1 char 20 20 latin1 latin1_swedish_ci char(20) +1.0000 test t7 f2 char 25 25 latin1 latin1_swedish_ci char(25) +NULL test t7 f3 date NULL NULL NULL NULL date +NULL test t7 f4 int NULL NULL NULL NULL int(11) +1.0000 test t8 f1 char 20 20 latin1 latin1_swedish_ci char(20) +1.0000 test t8 f2 char 25 25 latin1 latin1_swedish_ci char(25) +NULL test t8 f3 date NULL NULL NULL NULL date +NULL test t8 f4 int NULL NULL NULL NULL int(11) +NULL test t9 f1 int NULL NULL NULL NULL int(11) +1.0000 test t9 f2 char 25 25 latin1 latin1_swedish_ci char(25) +NULL test t9 f3 int NULL NULL NULL NULL int(11) +1.0000 test tb1 f1 char 1 1 latin1 latin1_swedish_ci char(1) +1.0000 test tb1 f2 char 1 1 latin1 latin1_bin char(1) +1.0000 test tb1 f3 char 1 1 latin1 latin1_swedish_ci char(1) +1.0000 test tb1 f4 tinytext 255 255 latin1 latin1_swedish_ci tinytext +1.0000 test tb1 f5 text 65535 65535 latin1 latin1_swedish_ci text +1.0000 test tb1 f6 mediumtext 16777215 16777215 latin1 latin1_swedish_ci mediumtext +1.0000 test tb1 f7 longtext 4294967295 4294967295 latin1 latin1_swedish_ci longtext +1.0000 test tb1 f8 tinyblob 255 255 NULL NULL tinyblob +1.0000 test tb1 f9 blob 65535 65535 NULL NULL blob +1.0000 test tb1 f10 mediumblob 16777215 16777215 NULL NULL mediumblob +1.0000 test tb1 f11 longblob 4294967295 4294967295 NULL NULL longblob +1.0000 test tb1 f12 binary 1 1 NULL NULL binary(1) +NULL test tb1 f13 tinyint NULL NULL NULL NULL tinyint(4) +NULL test tb1 f14 tinyint NULL NULL NULL NULL tinyint(3) unsigned +NULL test tb1 f15 tinyint NULL NULL NULL NULL tinyint(3) unsigned zerofill +NULL test tb1 f16 tinyint NULL NULL NULL NULL tinyint(3) unsigned zerofill +NULL test tb1 f17 smallint NULL NULL NULL NULL smallint(6) +NULL test tb1 f18 smallint NULL NULL NULL NULL smallint(5) unsigned +NULL test tb1 f19 smallint NULL NULL NULL NULL smallint(5) unsigned zerofill +NULL test tb1 f20 smallint NULL NULL NULL NULL smallint(5) unsigned zerofill +NULL test tb1 f21 mediumint NULL NULL NULL NULL mediumint(9) +NULL test tb1 f22 mediumint NULL NULL NULL NULL mediumint(8) unsigned +NULL test tb1 f23 mediumint NULL NULL NULL NULL mediumint(8) unsigned zerofill +NULL test tb1 f24 mediumint NULL NULL NULL NULL mediumint(8) unsigned zerofill +NULL test tb1 f25 int NULL NULL NULL NULL int(11) +NULL test tb1 f26 int NULL NULL NULL NULL int(10) unsigned +NULL test tb1 f27 int NULL NULL NULL NULL int(10) unsigned zerofill +NULL test tb1 f28 int NULL NULL NULL NULL int(10) unsigned zerofill +NULL test tb1 f29 bigint NULL NULL NULL NULL bigint(20) +NULL test tb1 f30 bigint NULL NULL NULL NULL bigint(20) unsigned +NULL test tb1 f31 bigint NULL NULL NULL NULL bigint(20) unsigned zerofill +NULL test tb1 f32 bigint NULL NULL NULL NULL bigint(20) unsigned zerofill +NULL test tb1 f33 decimal NULL NULL NULL NULL decimal(10,0) +NULL test tb1 f34 decimal NULL NULL NULL NULL decimal(10,0) unsigned +NULL test tb1 f35 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb1 f36 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb1 f37 decimal NULL NULL NULL NULL decimal(10,0) +NULL test tb1 f38 decimal NULL NULL NULL NULL decimal(64,0) +NULL test tb1 f39 decimal NULL NULL NULL NULL decimal(10,0) unsigned +NULL test tb1 f40 decimal NULL NULL NULL NULL decimal(64,0) unsigned +NULL test tb1 f41 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb1 f42 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill +NULL test tb1 f43 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb1 f44 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill +NULL test tb1 f45 decimal NULL NULL NULL NULL decimal(10,0) +NULL test tb1 f46 decimal NULL NULL NULL NULL decimal(63,30) +NULL test tb1 f47 decimal NULL NULL NULL NULL decimal(10,0) unsigned +NULL test tb1 f48 decimal NULL NULL NULL NULL decimal(63,30) unsigned +NULL test tb1 f49 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb1 f50 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill +NULL test tb1 f51 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb1 f52 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill +NULL test tb1 f53 decimal NULL NULL NULL NULL decimal(10,0) +NULL test tb1 f54 decimal NULL NULL NULL NULL decimal(10,0) unsigned +NULL test tb1 f55 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb1 f56 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb1 f57 decimal NULL NULL NULL NULL decimal(10,0) +NULL test tb1 f58 decimal NULL NULL NULL NULL decimal(64,0) +NULL test tb2 f59 decimal NULL NULL NULL NULL decimal(10,0) unsigned +NULL test tb2 f60 decimal NULL NULL NULL NULL decimal(64,0) unsigned +NULL test tb2 f61 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb2 f62 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill +NULL test tb2 f63 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb2 f64 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill +NULL test tb2 f65 decimal NULL NULL NULL NULL decimal(10,0) +NULL test tb2 f66 decimal NULL NULL NULL NULL decimal(63,30) +NULL test tb2 f67 decimal NULL NULL NULL NULL decimal(10,0) unsigned +NULL test tb2 f68 decimal NULL NULL NULL NULL decimal(63,30) unsigned +NULL test tb2 f69 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb2 f70 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill +NULL test tb2 f71 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb2 f72 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill +NULL test tb2 f73 double NULL NULL NULL NULL double +NULL test tb2 f74 double unsigned NULL NULL NULL NULL double unsigned +NULL test tb2 f75 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test tb2 f76 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test tb2 f77 double NULL NULL NULL NULL double +NULL test tb2 f78 double unsigned NULL NULL NULL NULL double unsigned +NULL test tb2 f79 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test tb2 f80 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test tb2 f81 float NULL NULL NULL NULL float +NULL test tb2 f82 float unsigned NULL NULL NULL NULL float unsigned +NULL test tb2 f83 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb2 f84 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb2 f85 float NULL NULL NULL NULL float +NULL test tb2 f86 float NULL NULL NULL NULL float +NULL test tb2 f87 float unsigned NULL NULL NULL NULL float unsigned +NULL test tb2 f88 float unsigned NULL NULL NULL NULL float unsigned +NULL test tb2 f89 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb2 f90 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb2 f91 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb2 f92 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb2 f93 float NULL NULL NULL NULL float +NULL test tb2 f94 double NULL NULL NULL NULL double +NULL test tb2 f95 float unsigned NULL NULL NULL NULL float unsigned +NULL test tb2 f96 double unsigned NULL NULL NULL NULL double unsigned +NULL test tb2 f97 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb2 f98 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test tb2 f99 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb2 f100 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test tb2 f101 date NULL NULL NULL NULL date +NULL test tb2 f102 time NULL NULL NULL NULL time +NULL test tb2 f103 datetime NULL NULL NULL NULL datetime +NULL test tb2 f104 timestamp NULL NULL NULL NULL timestamp +NULL test tb2 f105 year NULL NULL NULL NULL year(4) +NULL test tb2 f106 year NULL NULL NULL NULL year(4) +NULL test tb2 f107 year NULL NULL NULL NULL year(4) +1.0000 test tb2 f108 enum 5 5 latin1 latin1_swedish_ci enum('1enum','2enum') +1.0000 test tb2 f109 set 9 9 latin1 latin1_swedish_ci set('1set','2set') +1.0000 test tb2 f110 varbinary 64 64 NULL NULL varbinary(64) +1.0000 test tb2 f111 varbinary 27 27 NULL NULL varbinary(27) +1.0000 test tb2 f112 varbinary 64 64 NULL NULL varbinary(64) +1.0000 test tb2 f113 varbinary 192 192 NULL NULL varbinary(192) +1.0000 test tb2 f114 varbinary 192 192 NULL NULL varbinary(192) +1.0000 test tb2 f115 varbinary 27 27 NULL NULL varbinary(27) +1.0000 test tb2 f116 varbinary 64 64 NULL NULL varbinary(64) +1.0000 test tb2 f117 varbinary 192 192 NULL NULL varbinary(192) +1.0000 test tb3 f118 char 1 1 latin1 latin1_swedish_ci char(1) +1.0000 test tb3 f119 char 1 1 latin1 latin1_bin char(1) +1.0000 test tb3 f120 char 1 1 latin1 latin1_swedish_ci char(1) +1.0000 test tb3 f121 tinytext 255 255 latin1 latin1_swedish_ci tinytext +1.0000 test tb3 f122 text 65535 65535 latin1 latin1_swedish_ci text +1.0000 test tb3 f123 mediumtext 16777215 16777215 latin1 latin1_swedish_ci mediumtext +1.0000 test tb3 f124 longtext 4294967295 4294967295 latin1 latin1_swedish_ci longtext +1.0000 test tb3 f125 tinyblob 255 255 NULL NULL tinyblob +1.0000 test tb3 f126 blob 65535 65535 NULL NULL blob +1.0000 test tb3 f127 mediumblob 16777215 16777215 NULL NULL mediumblob +1.0000 test tb3 f128 longblob 4294967295 4294967295 NULL NULL longblob +1.0000 test tb3 f129 binary 1 1 NULL NULL binary(1) +NULL test tb3 f130 tinyint NULL NULL NULL NULL tinyint(4) +NULL test tb3 f131 tinyint NULL NULL NULL NULL tinyint(3) unsigned +NULL test tb3 f132 tinyint NULL NULL NULL NULL tinyint(3) unsigned zerofill +NULL test tb3 f133 tinyint NULL NULL NULL NULL tinyint(3) unsigned zerofill +NULL test tb3 f134 smallint NULL NULL NULL NULL smallint(6) +NULL test tb3 f135 smallint NULL NULL NULL NULL smallint(5) unsigned +NULL test tb3 f136 smallint NULL NULL NULL NULL smallint(5) unsigned zerofill +NULL test tb3 f137 smallint NULL NULL NULL NULL smallint(5) unsigned zerofill +NULL test tb3 f138 mediumint NULL NULL NULL NULL mediumint(9) +NULL test tb3 f139 mediumint NULL NULL NULL NULL mediumint(8) unsigned +NULL test tb3 f140 mediumint NULL NULL NULL NULL mediumint(8) unsigned zerofill +NULL test tb3 f141 mediumint NULL NULL NULL NULL mediumint(8) unsigned zerofill +NULL test tb3 f142 int NULL NULL NULL NULL int(11) +NULL test tb3 f143 int NULL NULL NULL NULL int(10) unsigned +NULL test tb3 f144 int NULL NULL NULL NULL int(10) unsigned zerofill +NULL test tb3 f145 int NULL NULL NULL NULL int(10) unsigned zerofill +NULL test tb3 f146 bigint NULL NULL NULL NULL bigint(20) +NULL test tb3 f147 bigint NULL NULL NULL NULL bigint(20) unsigned +NULL test tb3 f148 bigint NULL NULL NULL NULL bigint(20) unsigned zerofill +NULL test tb3 f149 bigint NULL NULL NULL NULL bigint(20) unsigned zerofill +NULL test tb3 f150 decimal NULL NULL NULL NULL decimal(10,0) +NULL test tb3 f151 decimal NULL NULL NULL NULL decimal(10,0) unsigned +NULL test tb3 f152 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb3 f153 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb3 f154 decimal NULL NULL NULL NULL decimal(10,0) +NULL test tb3 f155 decimal NULL NULL NULL NULL decimal(64,0) +NULL test tb3 f156 decimal NULL NULL NULL NULL decimal(10,0) unsigned +NULL test tb3 f157 decimal NULL NULL NULL NULL decimal(64,0) unsigned +NULL test tb3 f158 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb3 f159 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill +NULL test tb3 f160 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb3 f161 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill +NULL test tb3 f162 decimal NULL NULL NULL NULL decimal(10,0) +NULL test tb3 f163 decimal NULL NULL NULL NULL decimal(63,30) +NULL test tb3 f164 decimal NULL NULL NULL NULL decimal(10,0) unsigned +NULL test tb3 f165 decimal NULL NULL NULL NULL decimal(63,30) unsigned +NULL test tb3 f166 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb3 f167 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill +NULL test tb3 f168 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb3 f169 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill +NULL test tb3 f170 decimal NULL NULL NULL NULL decimal(10,0) +NULL test tb3 f171 decimal NULL NULL NULL NULL decimal(10,0) unsigned +NULL test tb3 f172 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb3 f173 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb3 f174 decimal NULL NULL NULL NULL decimal(10,0) +NULL test tb3 f175 decimal NULL NULL NULL NULL decimal(64,0) +NULL test tb4 f176 decimal NULL NULL NULL NULL decimal(10,0) unsigned +NULL test tb4 f177 decimal NULL NULL NULL NULL decimal(64,0) unsigned +NULL test tb4 f178 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb4 f179 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill +NULL test tb4 f180 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb4 f181 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill +NULL test tb4 f182 decimal NULL NULL NULL NULL decimal(10,0) +NULL test tb4 f183 decimal NULL NULL NULL NULL decimal(63,30) +NULL test tb4 f184 decimal NULL NULL NULL NULL decimal(10,0) unsigned +NULL test tb4 f185 decimal NULL NULL NULL NULL decimal(63,30) unsigned +NULL test tb4 f186 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb4 f187 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill +NULL test tb4 f188 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb4 f189 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill +NULL test tb4 f190 double NULL NULL NULL NULL double +NULL test tb4 f191 double unsigned NULL NULL NULL NULL double unsigned +NULL test tb4 f192 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test tb4 f193 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test tb4 f194 double NULL NULL NULL NULL double +NULL test tb4 f195 double unsigned NULL NULL NULL NULL double unsigned +NULL test tb4 f196 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test tb4 f197 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test tb4 f198 float NULL NULL NULL NULL float +NULL test tb4 f199 float unsigned NULL NULL NULL NULL float unsigned +NULL test tb4 f200 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb4 f201 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb4 f202 float NULL NULL NULL NULL float +NULL test tb4 f203 float NULL NULL NULL NULL float +NULL test tb4 f204 float unsigned NULL NULL NULL NULL float unsigned +NULL test tb4 f205 float unsigned NULL NULL NULL NULL float unsigned +NULL test tb4 f206 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb4 f207 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb4 f208 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb4 f209 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb4 f210 float NULL NULL NULL NULL float +NULL test tb4 f211 double NULL NULL NULL NULL double +NULL test tb4 f212 float unsigned NULL NULL NULL NULL float unsigned +NULL test tb4 f213 double unsigned NULL NULL NULL NULL double unsigned +NULL test tb4 f214 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb4 f215 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test tb4 f216 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb4 f217 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test tb4 f218 date NULL NULL NULL NULL date +NULL test tb4 f219 time NULL NULL NULL NULL time +NULL test tb4 f220 datetime NULL NULL NULL NULL datetime +NULL test tb4 f221 timestamp NULL NULL NULL NULL timestamp +NULL test tb4 f222 year NULL NULL NULL NULL year(4) +NULL test tb4 f223 year NULL NULL NULL NULL year(4) +NULL test tb4 f224 year NULL NULL NULL NULL year(4) +1.0000 test tb4 f225 enum 5 5 latin1 latin1_swedish_ci enum('1enum','2enum') +1.0000 test tb4 f226 set 9 9 latin1 latin1_swedish_ci set('1set','2set') +1.0000 test tb4 f227 varbinary 64 64 NULL NULL varbinary(64) +1.0000 test tb4 f228 varbinary 27 27 NULL NULL varbinary(27) +1.0000 test tb4 f229 varbinary 64 64 NULL NULL varbinary(64) +1.0000 test tb4 f230 varbinary 192 192 NULL NULL varbinary(192) +1.0000 test tb4 f231 varbinary 192 192 NULL NULL varbinary(192) +1.0000 test tb4 f232 varbinary 27 27 NULL NULL varbinary(27) +1.0000 test tb4 f233 varbinary 64 64 NULL NULL varbinary(64) +1.0000 test tb4 f234 varbinary 192 192 NULL NULL varbinary(192) +1.0000 test tb4 f235 char 255 255 latin1 latin1_swedish_ci char(255) +1.0000 test tb4 f236 char 60 60 latin1 latin1_swedish_ci char(60) +1.0000 test tb4 f237 char 255 255 latin1 latin1_bin char(255) +NULL test tb4 f238 varchar 0 0 latin1 latin1_bin varchar(0) +1.0000 test tb4 f239 varbinary 1000 1000 NULL NULL varbinary(1000) +1.0000 test tb4 f240 varchar 120 120 latin1 latin1_swedish_ci varchar(120) +1.0000 test tb4 f241 char 100 100 latin1 latin1_swedish_ci char(100) +NULL test tb4 f242 bit NULL NULL NULL NULL bit(30) +NULL test1 tb2 f59 decimal NULL NULL NULL NULL decimal(10,0) unsigned +NULL test1 tb2 f60 decimal NULL NULL NULL NULL decimal(64,0) unsigned +NULL test1 tb2 f61 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test1 tb2 f62 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill +NULL test1 tb2 f63 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test1 tb2 f64 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill +NULL test1 tb2 f65 decimal NULL NULL NULL NULL decimal(10,0) +NULL test1 tb2 f66 decimal NULL NULL NULL NULL decimal(63,30) +NULL test1 tb2 f67 decimal NULL NULL NULL NULL decimal(10,0) unsigned +NULL test1 tb2 f68 decimal NULL NULL NULL NULL decimal(63,30) unsigned +NULL test1 tb2 f69 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test1 tb2 f70 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill +NULL test1 tb2 f71 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test1 tb2 f72 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill +NULL test1 tb2 f73 double NULL NULL NULL NULL double +NULL test1 tb2 f74 double unsigned NULL NULL NULL NULL double unsigned +NULL test1 tb2 f75 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test1 tb2 f76 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test1 tb2 f77 double NULL NULL NULL NULL double +NULL test1 tb2 f78 double unsigned NULL NULL NULL NULL double unsigned +NULL test1 tb2 f79 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test1 tb2 f80 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test1 tb2 f81 float NULL NULL NULL NULL float +NULL test1 tb2 f82 float unsigned NULL NULL NULL NULL float unsigned +NULL test1 tb2 f83 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test1 tb2 f84 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test1 tb2 f85 float NULL NULL NULL NULL float +NULL test1 tb2 f86 float NULL NULL NULL NULL float +NULL test1 tb2 f87 float unsigned NULL NULL NULL NULL float unsigned +NULL test1 tb2 f88 float unsigned NULL NULL NULL NULL float unsigned +NULL test1 tb2 f89 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test1 tb2 f90 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test1 tb2 f91 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test1 tb2 f92 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test1 tb2 f93 float NULL NULL NULL NULL float +NULL test1 tb2 f94 double NULL NULL NULL NULL double +NULL test1 tb2 f95 float unsigned NULL NULL NULL NULL float unsigned +NULL test1 tb2 f96 double unsigned NULL NULL NULL NULL double unsigned +NULL test1 tb2 f97 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test1 tb2 f98 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test1 tb2 f99 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test1 tb2 f100 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test1 tb2 f101 date NULL NULL NULL NULL date +NULL test1 tb2 f102 time NULL NULL NULL NULL time +NULL test1 tb2 f103 datetime NULL NULL NULL NULL datetime +NULL test1 tb2 f104 timestamp NULL NULL NULL NULL timestamp +NULL test1 tb2 f105 year NULL NULL NULL NULL year(4) +NULL test1 tb2 f106 year NULL NULL NULL NULL year(4) +NULL test1 tb2 f107 year NULL NULL NULL NULL year(4) +1.0000 test1 tb2 f108 enum 5 5 latin1 latin1_swedish_ci enum('1enum','2enum') +1.0000 test1 tb2 f109 set 9 9 latin1 latin1_swedish_ci set('1set','2set') +1.0000 test1 tb2 f110 varbinary 64 64 NULL NULL varbinary(64) +1.0000 test1 tb2 f111 varbinary 27 27 NULL NULL varbinary(27) +1.0000 test1 tb2 f112 varbinary 64 64 NULL NULL varbinary(64) +1.0000 test1 tb2 f113 varbinary 192 192 NULL NULL varbinary(192) +1.0000 test1 tb2 f114 varbinary 192 192 NULL NULL varbinary(192) +1.0000 test1 tb2 f115 varbinary 27 27 NULL NULL varbinary(27) +1.0000 test1 tb2 f116 varbinary 64 64 NULL NULL varbinary(64) +1.0000 test1 tb2 f117 varbinary 192 192 NULL NULL varbinary(192) +1.0000 test4 t6 f1 char 20 20 latin1 latin1_swedish_ci char(20) +1.0000 test4 t6 f2 char 25 25 latin1 latin1_swedish_ci char(25) +NULL test4 t6 f3 date NULL NULL NULL NULL date +NULL test4 t6 f4 int NULL NULL NULL NULL int(11) +1.0000 test4 t6 f5 char 25 25 latin1 latin1_swedish_ci char(25) +NULL test4 t6 f6 int NULL NULL NULL NULL int(11) +DROP DATABASE test1; +DROP DATABASE test4; +DROP TABLE test.t1; +DROP TABLE test.t2; +DROP TABLE test.t3; +DROP TABLE test.t4; +DROP TABLE test.t7; +DROP TABLE test.t8; +DROP TABLE test.t9; +DROP TABLE test.t10; +DROP TABLE test.t11; +DROP TABLE test.tb1; +DROP TABLE test.tb2; +DROP TABLE test.tb3; +DROP TABLE test.tb4; diff --git a/mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result b/mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result new file mode 100644 index 00000000000..34a357d5811 --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result @@ -0,0 +1,361 @@ +SELECT * FROM information_schema.columns +WHERE table_schema = 'mysql' +ORDER BY table_schema, table_name, column_name; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT +NULL mysql columns_priv Column_name 5 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI +NULL mysql columns_priv Column_priv 7 NO set 31 93 NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','References') +NULL mysql columns_priv Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI +NULL mysql columns_priv Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI +NULL mysql columns_priv Table_name 4 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI +NULL mysql columns_priv Timestamp 6 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp +NULL mysql columns_priv User 3 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI +NULL mysql db Alter_priv 13 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql db Alter_routine_priv 19 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql db Create_priv 8 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql db Create_routine_priv 18 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql db Create_tmp_table_priv 14 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql db Create_view_priv 16 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql db Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI +NULL mysql db Delete_priv 7 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql db Drop_priv 9 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql db Execute_priv 20 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql db Grant_priv 10 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql db Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI +NULL mysql db Index_priv 12 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql db Insert_priv 5 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql db Lock_tables_priv 15 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql db References_priv 11 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql db Select_priv 4 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql db Show_view_priv 17 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql db Update_priv 6 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql db User 3 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI +NULL mysql func dl 3 NO char 128 384 NULL NULL utf8 utf8_bin char(128) +NULL mysql func name 1 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI +NULL mysql func ret 2 0 NO tinyint NULL NULL 3 0 NULL NULL tinyint(1) +NULL mysql func type 4 NULL NO enum 9 27 NULL NULL utf8 utf8_general_ci enum('function','aggregate') +NULL mysql help_category help_category_id 1 NULL NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned PRI +NULL mysql help_category name 2 NULL NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) UNI +NULL mysql help_category parent_category_id 3 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned +NULL mysql help_category url 4 NULL NO char 128 384 NULL NULL utf8 utf8_general_ci char(128) +NULL mysql help_keyword help_keyword_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI +NULL mysql help_keyword name 2 NULL NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) UNI +NULL mysql help_relation help_keyword_id 2 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI +NULL mysql help_relation help_topic_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI +NULL mysql help_topic description 4 NULL NO text 65535 65535 NULL NULL utf8 utf8_general_ci text +NULL mysql help_topic example 5 NULL NO text 65535 65535 NULL NULL utf8 utf8_general_ci text +NULL mysql help_topic help_category_id 3 NULL NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned +NULL mysql help_topic help_topic_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI +NULL mysql help_topic name 2 NULL NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) UNI +NULL mysql help_topic url 6 NULL NO char 128 384 NULL NULL utf8 utf8_general_ci char(128) +NULL mysql host Alter_priv 12 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql host Alter_routine_priv 18 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql host Create_priv 7 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql host Create_routine_priv 17 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql host Create_tmp_table_priv 13 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql host Create_view_priv 15 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql host Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI +NULL mysql host Delete_priv 6 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql host Drop_priv 8 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql host Execute_priv 19 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql host Grant_priv 9 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql host Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI +NULL mysql host Index_priv 11 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql host Insert_priv 4 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql host Lock_tables_priv 14 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql host References_priv 10 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql host Select_priv 3 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql host Show_view_priv 16 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql host Update_priv 5 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql proc body 11 NULL NO longblob 4294967295 4294967295 NULL NULL NULL NULL longblob +NULL mysql proc comment 16 NO char 64 192 NULL NULL utf8 utf8_bin char(64) +NULL mysql proc created 13 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp +NULL mysql proc db 1 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI +NULL mysql proc definer 12 NO char 77 231 NULL NULL utf8 utf8_bin char(77) +NULL mysql proc is_deterministic 7 NO NO enum 3 9 NULL NULL utf8 utf8_general_ci enum('YES','NO') +NULL mysql proc language 5 SQL NO enum 3 9 NULL NULL utf8 utf8_general_ci enum('SQL') +NULL mysql proc modified 14 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL NULL NULL timestamp +NULL mysql proc name 2 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) PRI +NULL mysql proc param_list 9 NULL NO blob 65535 65535 NULL NULL NULL NULL blob +NULL mysql proc returns 10 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) +NULL mysql proc security_type 8 DEFINER NO enum 7 21 NULL NULL utf8 utf8_general_ci enum('INVOKER','DEFINER') +NULL mysql proc specific_name 4 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) +NULL mysql proc sql_data_access 6 CONTAINS_SQL NO enum 17 51 NULL NULL utf8 utf8_general_ci enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') +NULL mysql proc sql_mode 15 NO set 431 1293 NULL NULL utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE') +NULL mysql proc type 3 NULL NO enum 9 27 NULL NULL utf8 utf8_general_ci enum('FUNCTION','PROCEDURE') PRI +NULL mysql procs_priv Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI +NULL mysql procs_priv Grantor 6 NO char 77 231 NULL NULL utf8 utf8_bin char(77) MUL +NULL mysql procs_priv Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI +NULL mysql procs_priv Proc_priv 7 NO set 27 81 NULL NULL utf8 utf8_general_ci set('Execute','Alter Routine','Grant') +NULL mysql procs_priv Routine_name 4 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI +NULL mysql procs_priv Routine_type 5 NULL NO enum 9 27 NULL NULL utf8 utf8_bin enum('FUNCTION','PROCEDURE') PRI +NULL mysql procs_priv Timestamp 8 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp +NULL mysql procs_priv User 3 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI +NULL mysql tables_priv Column_priv 8 NO set 31 93 NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','References') +NULL mysql tables_priv Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI +NULL mysql tables_priv Grantor 5 NO char 77 231 NULL NULL utf8 utf8_bin char(77) MUL +NULL mysql tables_priv Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI +NULL mysql tables_priv Table_name 4 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI +NULL mysql tables_priv Table_priv 7 NO set 90 270 NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view') +NULL mysql tables_priv Timestamp 6 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp +NULL mysql tables_priv User 3 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI +NULL mysql time_zone Time_zone_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI auto_increment +NULL mysql time_zone Use_leap_seconds 2 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('Y','N') +NULL mysql time_zone_leap_second Correction 2 NULL NO int NULL NULL 10 0 NULL NULL int(11) +NULL mysql time_zone_leap_second Transition_time 1 NULL NO bigint NULL NULL 19 0 NULL NULL bigint(20) PRI +NULL mysql time_zone_name Name 1 NULL NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) PRI +NULL mysql time_zone_name Time_zone_id 2 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned +NULL mysql time_zone_transition Time_zone_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI +NULL mysql time_zone_transition Transition_time 2 NULL NO bigint NULL NULL 19 0 NULL NULL bigint(20) PRI +NULL mysql time_zone_transition Transition_type_id 3 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned +NULL mysql time_zone_transition_type Abbreviation 5 NO char 8 24 NULL NULL utf8 utf8_general_ci char(8) +NULL mysql time_zone_transition_type Is_DST 4 0 NO tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned +NULL mysql time_zone_transition_type Offset 3 0 NO int NULL NULL 10 0 NULL NULL int(11) +NULL mysql time_zone_transition_type Time_zone_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI +NULL mysql time_zone_transition_type Transition_type_id 2 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI +NULL mysql user Alter_priv 17 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql user Alter_routine_priv 28 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql user Create_priv 8 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql user Create_routine_priv 27 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql user Create_tmp_table_priv 20 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql user Create_user_priv 29 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql user Create_view_priv 25 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql user Delete_priv 7 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql user Drop_priv 9 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql user Execute_priv 22 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql user File_priv 13 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql user Grant_priv 14 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql user Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI +NULL mysql user Index_priv 16 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql user Insert_priv 5 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql user Lock_tables_priv 21 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql user max_connections 36 0 NO int NULL NULL 10 0 NULL NULL int(11) unsigned +NULL mysql user max_questions 34 0 NO int NULL NULL 10 0 NULL NULL int(11) unsigned +NULL mysql user max_updates 35 0 NO int NULL NULL 10 0 NULL NULL int(11) unsigned +NULL mysql user max_user_connections 37 0 NO int NULL NULL 10 0 NULL NULL int(11) unsigned +NULL mysql user Password 3 NO char 41 41 NULL NULL latin1 latin1_bin char(41) +NULL mysql user Process_priv 12 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql user References_priv 15 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql user Reload_priv 10 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql user Repl_client_priv 24 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql user Repl_slave_priv 23 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql user Select_priv 4 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql user Show_db_priv 18 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql user Show_view_priv 26 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql user Shutdown_priv 11 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql user ssl_cipher 31 NULL NO blob 65535 65535 NULL NULL NULL NULL blob +NULL mysql user ssl_type 30 NO enum 9 27 NULL NULL utf8 utf8_general_ci enum('','ANY','X509','SPECIFIED') +NULL mysql user Super_priv 19 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql user Update_priv 6 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') +NULL mysql user User 2 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI +NULL mysql user x509_issuer 32 NULL NO blob 65535 65535 NULL NULL NULL NULL blob +NULL mysql user x509_subject 33 NULL NO blob 65535 65535 NULL NULL NULL NULL blob +########################################################################## +# Show the quotient of CHARACTER_OCTET_LENGTH and CHARACTER_MAXIMUM_LENGTH +########################################################################## +SELECT DISTINCT +CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, +DATA_TYPE, +CHARACTER_SET_NAME, +COLLATION_NAME +FROM information_schema.columns +WHERE table_schema = 'mysql' +AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH = 1 +ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML; +COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME +1.0000 blob NULL NULL +1.0000 longblob NULL NULL +1.0000 char latin1 latin1_bin +1.0000 text utf8 utf8_general_ci +SELECT DISTINCT +CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, +DATA_TYPE, +CHARACTER_SET_NAME, +COLLATION_NAME +FROM information_schema.columns +WHERE table_schema = 'mysql' +AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH <> 1 +ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML; +COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME +3.0000 char utf8 utf8_bin +3.0000 enum utf8 utf8_bin +3.0000 char utf8 utf8_general_ci +3.0000 enum utf8 utf8_general_ci +3.0000 set utf8 utf8_general_ci +SELECT DISTINCT +CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, +DATA_TYPE, +CHARACTER_SET_NAME, +COLLATION_NAME +FROM information_schema.columns +WHERE table_schema = 'mysql' +AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH IS NULL +ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML; +COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME +NULL bigint NULL NULL +NULL int NULL NULL +NULL smallint NULL NULL +NULL timestamp NULL NULL +NULL tinyint NULL NULL +--> CHAR(0) is allowed (see manual), and here both CHARACHTER_* values +--> are 0, which is intended behavior, and the result of 0 / 0 IS NULL +SELECT CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, +TABLE_SCHEMA, +TABLE_NAME, +COLUMN_NAME, +DATA_TYPE, +CHARACTER_MAXIMUM_LENGTH, +CHARACTER_OCTET_LENGTH, +CHARACTER_SET_NAME, +COLLATION_NAME, +COLUMN_TYPE +FROM information_schema.columns +WHERE table_schema = 'mysql' +ORDER BY TABLE_SCHEMA, TABLE_NAME, ORDINAL_POSITION; +COL_CML TABLE_SCHEMA TABLE_NAME COLUMN_NAME DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE +3.0000 mysql columns_priv Host char 60 180 utf8 utf8_bin char(60) +3.0000 mysql columns_priv Db char 64 192 utf8 utf8_bin char(64) +3.0000 mysql columns_priv User char 16 48 utf8 utf8_bin char(16) +3.0000 mysql columns_priv Table_name char 64 192 utf8 utf8_bin char(64) +3.0000 mysql columns_priv Column_name char 64 192 utf8 utf8_bin char(64) +NULL mysql columns_priv Timestamp timestamp NULL NULL NULL NULL timestamp +3.0000 mysql columns_priv Column_priv set 31 93 utf8 utf8_general_ci set('Select','Insert','Update','References') +3.0000 mysql db Host char 60 180 utf8 utf8_bin char(60) +3.0000 mysql db Db char 64 192 utf8 utf8_bin char(64) +3.0000 mysql db User char 16 48 utf8 utf8_bin char(16) +3.0000 mysql db Select_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql db Insert_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql db Update_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql db Delete_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql db Create_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql db Drop_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql db Grant_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql db References_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql db Index_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql db Alter_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql db Create_tmp_table_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql db Lock_tables_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql db Create_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql db Show_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql db Create_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql db Alter_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql db Execute_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql func name char 64 192 utf8 utf8_bin char(64) +NULL mysql func ret tinyint NULL NULL NULL NULL tinyint(1) +3.0000 mysql func dl char 128 384 utf8 utf8_bin char(128) +3.0000 mysql func type enum 9 27 utf8 utf8_general_ci enum('function','aggregate') +NULL mysql help_category help_category_id smallint NULL NULL NULL NULL smallint(5) unsigned +3.0000 mysql help_category name char 64 192 utf8 utf8_general_ci char(64) +NULL mysql help_category parent_category_id smallint NULL NULL NULL NULL smallint(5) unsigned +3.0000 mysql help_category url char 128 384 utf8 utf8_general_ci char(128) +NULL mysql help_keyword help_keyword_id int NULL NULL NULL NULL int(10) unsigned +3.0000 mysql help_keyword name char 64 192 utf8 utf8_general_ci char(64) +NULL mysql help_relation help_topic_id int NULL NULL NULL NULL int(10) unsigned +NULL mysql help_relation help_keyword_id int NULL NULL NULL NULL int(10) unsigned +NULL mysql help_topic help_topic_id int NULL NULL NULL NULL int(10) unsigned +3.0000 mysql help_topic name char 64 192 utf8 utf8_general_ci char(64) +NULL mysql help_topic help_category_id smallint NULL NULL NULL NULL smallint(5) unsigned +1.0000 mysql help_topic description text 65535 65535 utf8 utf8_general_ci text +1.0000 mysql help_topic example text 65535 65535 utf8 utf8_general_ci text +3.0000 mysql help_topic url char 128 384 utf8 utf8_general_ci char(128) +3.0000 mysql host Host char 60 180 utf8 utf8_bin char(60) +3.0000 mysql host Db char 64 192 utf8 utf8_bin char(64) +3.0000 mysql host Select_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql host Insert_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql host Update_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql host Delete_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql host Create_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql host Drop_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql host Grant_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql host References_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql host Index_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql host Alter_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql host Create_tmp_table_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql host Lock_tables_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql host Create_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql host Show_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql host Create_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql host Alter_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql host Execute_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql proc db char 64 192 utf8 utf8_bin char(64) +3.0000 mysql proc name char 64 192 utf8 utf8_general_ci char(64) +3.0000 mysql proc type enum 9 27 utf8 utf8_general_ci enum('FUNCTION','PROCEDURE') +3.0000 mysql proc specific_name char 64 192 utf8 utf8_general_ci char(64) +3.0000 mysql proc language enum 3 9 utf8 utf8_general_ci enum('SQL') +3.0000 mysql proc sql_data_access enum 17 51 utf8 utf8_general_ci enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') +3.0000 mysql proc is_deterministic enum 3 9 utf8 utf8_general_ci enum('YES','NO') +3.0000 mysql proc security_type enum 7 21 utf8 utf8_general_ci enum('INVOKER','DEFINER') +1.0000 mysql proc param_list blob 65535 65535 NULL NULL blob +3.0000 mysql proc returns char 64 192 utf8 utf8_general_ci char(64) +1.0000 mysql proc body longblob 4294967295 4294967295 NULL NULL longblob +3.0000 mysql proc definer char 77 231 utf8 utf8_bin char(77) +NULL mysql proc created timestamp NULL NULL NULL NULL timestamp +NULL mysql proc modified timestamp NULL NULL NULL NULL timestamp +3.0000 mysql proc sql_mode set 431 1293 utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE') +3.0000 mysql proc comment char 64 192 utf8 utf8_bin char(64) +3.0000 mysql procs_priv Host char 60 180 utf8 utf8_bin char(60) +3.0000 mysql procs_priv Db char 64 192 utf8 utf8_bin char(64) +3.0000 mysql procs_priv User char 16 48 utf8 utf8_bin char(16) +3.0000 mysql procs_priv Routine_name char 64 192 utf8 utf8_bin char(64) +3.0000 mysql procs_priv Routine_type enum 9 27 utf8 utf8_bin enum('FUNCTION','PROCEDURE') +3.0000 mysql procs_priv Grantor char 77 231 utf8 utf8_bin char(77) +3.0000 mysql procs_priv Proc_priv set 27 81 utf8 utf8_general_ci set('Execute','Alter Routine','Grant') +NULL mysql procs_priv Timestamp timestamp NULL NULL NULL NULL timestamp +3.0000 mysql tables_priv Host char 60 180 utf8 utf8_bin char(60) +3.0000 mysql tables_priv Db char 64 192 utf8 utf8_bin char(64) +3.0000 mysql tables_priv User char 16 48 utf8 utf8_bin char(16) +3.0000 mysql tables_priv Table_name char 64 192 utf8 utf8_bin char(64) +3.0000 mysql tables_priv Grantor char 77 231 utf8 utf8_bin char(77) +NULL mysql tables_priv Timestamp timestamp NULL NULL NULL NULL timestamp +3.0000 mysql tables_priv Table_priv set 90 270 utf8 utf8_general_ci set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view') +3.0000 mysql tables_priv Column_priv set 31 93 utf8 utf8_general_ci set('Select','Insert','Update','References') +NULL mysql time_zone Time_zone_id int NULL NULL NULL NULL int(10) unsigned +3.0000 mysql time_zone Use_leap_seconds enum 1 3 utf8 utf8_general_ci enum('Y','N') +NULL mysql time_zone_leap_second Transition_time bigint NULL NULL NULL NULL bigint(20) +NULL mysql time_zone_leap_second Correction int NULL NULL NULL NULL int(11) +3.0000 mysql time_zone_name Name char 64 192 utf8 utf8_general_ci char(64) +NULL mysql time_zone_name Time_zone_id int NULL NULL NULL NULL int(10) unsigned +NULL mysql time_zone_transition Time_zone_id int NULL NULL NULL NULL int(10) unsigned +NULL mysql time_zone_transition Transition_time bigint NULL NULL NULL NULL bigint(20) +NULL mysql time_zone_transition Transition_type_id int NULL NULL NULL NULL int(10) unsigned +NULL mysql time_zone_transition_type Time_zone_id int NULL NULL NULL NULL int(10) unsigned +NULL mysql time_zone_transition_type Transition_type_id int NULL NULL NULL NULL int(10) unsigned +NULL mysql time_zone_transition_type Offset int NULL NULL NULL NULL int(11) +NULL mysql time_zone_transition_type Is_DST tinyint NULL NULL NULL NULL tinyint(3) unsigned +3.0000 mysql time_zone_transition_type Abbreviation char 8 24 utf8 utf8_general_ci char(8) +3.0000 mysql user Host char 60 180 utf8 utf8_bin char(60) +3.0000 mysql user User char 16 48 utf8 utf8_bin char(16) +1.0000 mysql user Password char 41 41 latin1 latin1_bin char(41) +3.0000 mysql user Select_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql user Insert_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql user Update_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql user Delete_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql user Create_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql user Drop_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql user Reload_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql user Shutdown_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql user Process_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql user File_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql user Grant_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql user References_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql user Index_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql user Alter_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql user Show_db_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql user Super_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql user Create_tmp_table_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql user Lock_tables_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql user Execute_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql user Repl_slave_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql user Repl_client_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql user Create_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql user Show_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql user Create_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql user Alter_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql user Create_user_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql user ssl_type enum 9 27 utf8 utf8_general_ci enum('','ANY','X509','SPECIFIED') +1.0000 mysql user ssl_cipher blob 65535 65535 NULL NULL blob +1.0000 mysql user x509_issuer blob 65535 65535 NULL NULL blob +1.0000 mysql user x509_subject blob 65535 65535 NULL NULL blob +NULL mysql user max_questions int NULL NULL NULL NULL int(11) unsigned +NULL mysql user max_updates int NULL NULL NULL NULL int(11) unsigned +NULL mysql user max_connections int NULL NULL NULL NULL int(11) unsigned +NULL mysql user max_user_connections int NULL NULL NULL NULL int(11) unsigned diff --git a/mysql-test/suite/funcs_1/r/is_key_column_usage_embedded.result b/mysql-test/suite/funcs_1/r/is_key_column_usage_embedded.result new file mode 100644 index 00000000000..17b5708643b --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_key_column_usage_embedded.result @@ -0,0 +1,372 @@ +SHOW TABLES FROM information_schema LIKE 'KEY_COLUMN_USAGE'; +Tables_in_information_schema (KEY_COLUMN_USAGE) +KEY_COLUMN_USAGE +####################################################################### +# Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT +####################################################################### +DROP VIEW IF EXISTS test.v1; +DROP PROCEDURE IF EXISTS test.p1; +DROP FUNCTION IF EXISTS test.f1; +CREATE VIEW test.v1 AS SELECT * FROM information_schema.KEY_COLUMN_USAGE; +CREATE PROCEDURE test.p1() SELECT * FROM information_schema.KEY_COLUMN_USAGE; +CREATE FUNCTION test.f1() returns BIGINT +BEGIN +DECLARE counter BIGINT DEFAULT NULL; +SELECT COUNT(*) INTO counter FROM information_schema.KEY_COLUMN_USAGE; +RETURN counter; +END// +# Attention: The printing of the next result sets is disabled. +SELECT * FROM information_schema.KEY_COLUMN_USAGE; +SELECT * FROM test.v1; +CALL test.p1; +SELECT test.f1(); +DROP VIEW test.v1; +DROP PROCEDURE test.p1; +DROP FUNCTION test.f1; +######################################################################### +# Testcase 3.2.7.1: INFORMATION_SCHEMA.KEY_COLUMN_USAGE layout +######################################################################### +DESCRIBE information_schema.KEY_COLUMN_USAGE; +Field Type Null Key Default Extra +CONSTRAINT_CATALOG varchar(512) YES NULL +CONSTRAINT_SCHEMA varchar(64) NO +CONSTRAINT_NAME varchar(64) NO +TABLE_CATALOG varchar(512) YES NULL +TABLE_SCHEMA varchar(64) NO +TABLE_NAME varchar(64) NO +COLUMN_NAME varchar(64) NO +ORDINAL_POSITION bigint(10) NO 0 +POSITION_IN_UNIQUE_CONSTRAINT bigint(10) YES NULL +REFERENCED_TABLE_SCHEMA varchar(64) YES NULL +REFERENCED_TABLE_NAME varchar(64) YES NULL +REFERENCED_COLUMN_NAME varchar(64) YES NULL +SHOW CREATE TABLE information_schema.KEY_COLUMN_USAGE; +Table Create Table +KEY_COLUMN_USAGE CREATE TEMPORARY TABLE `KEY_COLUMN_USAGE` ( + `CONSTRAINT_CATALOG` varchar(512) default NULL, + `CONSTRAINT_SCHEMA` varchar(64) NOT NULL default '', + `CONSTRAINT_NAME` varchar(64) NOT NULL default '', + `TABLE_CATALOG` varchar(512) default NULL, + `TABLE_SCHEMA` varchar(64) NOT NULL default '', + `TABLE_NAME` varchar(64) NOT NULL default '', + `COLUMN_NAME` varchar(64) NOT NULL default '', + `ORDINAL_POSITION` bigint(10) NOT NULL default '0', + `POSITION_IN_UNIQUE_CONSTRAINT` bigint(10) default NULL, + `REFERENCED_TABLE_SCHEMA` varchar(64) default NULL, + `REFERENCED_TABLE_NAME` varchar(64) default NULL, + `REFERENCED_COLUMN_NAME` varchar(64) default NULL +) ENGINE=MEMORY DEFAULT CHARSET=utf8 +SHOW COLUMNS FROM information_schema.KEY_COLUMN_USAGE; +Field Type Null Key Default Extra +CONSTRAINT_CATALOG varchar(512) YES NULL +CONSTRAINT_SCHEMA varchar(64) NO +CONSTRAINT_NAME varchar(64) NO +TABLE_CATALOG varchar(512) YES NULL +TABLE_SCHEMA varchar(64) NO +TABLE_NAME varchar(64) NO +COLUMN_NAME varchar(64) NO +ORDINAL_POSITION bigint(10) NO 0 +POSITION_IN_UNIQUE_CONSTRAINT bigint(10) YES NULL +REFERENCED_TABLE_SCHEMA varchar(64) YES NULL +REFERENCED_TABLE_NAME varchar(64) YES NULL +REFERENCED_COLUMN_NAME varchar(64) YES NULL +SELECT constraint_catalog, constraint_schema, constraint_name, table_catalog, +table_schema, table_name, column_name +FROM information_schema.key_column_usage +WHERE constraint_catalog IS NOT NULL OR table_catalog IS NOT NULL; +constraint_catalog constraint_schema constraint_name table_catalog table_schema table_name column_name +######################################################################################## +# Testcase 3.2.7.2 + 3.2.7.3: INFORMATION_SCHEMA.KEY_COLUMN_USAGE accessible information +######################################################################################## +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +DROP USER 'testuser2'@'localhost'; +CREATE USER 'testuser2'@'localhost'; +USE db_datadict; +CREATE TABLE t1_1 +(f1 INT NOT NULL, PRIMARY KEY(f1), +f2 INT, INDEX f2_ind(f2)) +ENGINE = ; +GRANT SELECT ON t1_1 to 'testuser1'@'localhost'; +CREATE TABLE t1_2 +(f1 INT NOT NULL, PRIMARY KEY(f1), +f2 INT, INDEX f2_ind(f2)) +ENGINE = ; +GRANT SELECT ON t1_2 to 'testuser2'@'localhost'; +SELECT * FROM information_schema.key_column_usage +WHERE table_name LIKE 't1_%' +ORDER BY constraint_catalog, constraint_schema, constraint_name, +table_catalog, table_schema, table_name, ordinal_position; +CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME +NULL db_datadict PRIMARY NULL db_datadict t1_1 f1 1 NULL NULL NULL NULL +NULL db_datadict PRIMARY NULL db_datadict t1_2 f1 1 NULL NULL NULL NULL +# Establish connection testuser1 (user=testuser1) +SELECT * FROM information_schema.key_column_usage +WHERE table_name LIKE 't1_%' +ORDER BY constraint_catalog, constraint_schema, constraint_name, +table_catalog, table_schema, table_name, ordinal_position; +CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME +NULL db_datadict PRIMARY NULL db_datadict t1_1 f1 1 NULL NULL NULL NULL +NULL db_datadict PRIMARY NULL db_datadict t1_2 f1 1 NULL NULL NULL NULL +# Establish connection testuser2 (user=testuser2) +SELECT * FROM information_schema.key_column_usage +WHERE table_name LIKE 't1_%' +ORDER BY constraint_catalog, constraint_schema, constraint_name, +table_catalog, table_schema, table_name, ordinal_position; +CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME +NULL db_datadict PRIMARY NULL db_datadict t1_1 f1 1 NULL NULL NULL NULL +NULL db_datadict PRIMARY NULL db_datadict t1_2 f1 1 NULL NULL NULL NULL +# Switch to connection default and close connections testuser1, testuser2 +DROP USER 'testuser1'@'localhost'; +DROP USER 'testuser2'@'localhost'; +DROP TABLE t1_1; +DROP TABLE t1_2; +DROP DATABASE IF EXISTS db_datadict; +######################################################################################## +# Testcase 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.KEY_COLUMN_USAGE modifications +######################################################################################## +DROP DATABASE IF EXISTS db_datadict; +DROP TABLE IF EXISTS test.t1_my_table; +CREATE DATABASE db_datadict; +SELECT table_name FROM information_schema.key_column_usage +WHERE table_name LIKE 't1_my_table%'; +table_name +CREATE TABLE test.t1_my_table +(f1 CHAR(12), f2 TIMESTAMP, f4 BIGINT, PRIMARY KEY(f1,f2)) +DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci +ENGINE = ; +SELECT * FROM information_schema.key_column_usage +WHERE table_name = 't1_my_table'; +CONSTRAINT_CATALOG NULL +CONSTRAINT_SCHEMA test +CONSTRAINT_NAME PRIMARY +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME t1_my_table +COLUMN_NAME f1 +ORDINAL_POSITION 1 +POSITION_IN_UNIQUE_CONSTRAINT NULL +REFERENCED_TABLE_SCHEMA NULL +REFERENCED_TABLE_NAME NULL +REFERENCED_COLUMN_NAME NULL +CONSTRAINT_CATALOG NULL +CONSTRAINT_SCHEMA test +CONSTRAINT_NAME PRIMARY +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME t1_my_table +COLUMN_NAME f2 +ORDINAL_POSITION 2 +POSITION_IN_UNIQUE_CONSTRAINT NULL +REFERENCED_TABLE_SCHEMA NULL +REFERENCED_TABLE_NAME NULL +REFERENCED_COLUMN_NAME NULL +SELECT DISTINCT table_name FROM information_schema.key_column_usage +WHERE table_name LIKE 't1_my_table%'; +table_name +t1_my_table +RENAME TABLE test.t1_my_table TO test.t1_my_tablex; +SELECT DISTINCT table_name FROM information_schema.key_column_usage +WHERE table_name LIKE 't1_my_table%'; +table_name +t1_my_tablex +SELECT DISTINCT table_schema,table_name FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex'; +table_schema table_name +test t1_my_tablex +RENAME TABLE test.t1_my_tablex TO db_datadict.t1_my_tablex; +SELECT DISTINCT table_schema,table_name FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex'; +table_schema table_name +db_datadict t1_my_tablex +SELECT DISTINCT table_name, column_name FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex' +ORDER BY table_name, column_name; +table_name column_name +t1_my_tablex f1 +t1_my_tablex f2 +ALTER TABLE db_datadict.t1_my_tablex CHANGE COLUMN f1 first_col CHAR(12); +SELECT DISTINCT table_name, column_name FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex' +ORDER BY table_name, column_name; +table_name column_name +t1_my_tablex f2 +t1_my_tablex first_col +SELECT constraint_schema, constraint_name, table_schema, +table_name, column_name, ordinal_position +FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex' +ORDER BY constraint_schema, constraint_name, table_schema, +table_name, ordinal_position; +constraint_schema constraint_name table_schema table_name column_name ordinal_position +db_datadict PRIMARY db_datadict t1_my_tablex first_col 1 +db_datadict PRIMARY db_datadict t1_my_tablex f2 2 +CREATE INDEX f2 ON db_datadict.t1_my_tablex(f2); +SELECT constraint_schema, constraint_name, table_schema, +table_name, column_name, ordinal_position +FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex' +ORDER BY constraint_schema, constraint_name, table_schema, +table_name, ordinal_position; +constraint_schema constraint_name table_schema table_name column_name ordinal_position +db_datadict PRIMARY db_datadict t1_my_tablex first_col 1 +db_datadict PRIMARY db_datadict t1_my_tablex f2 2 +DROP INDEX f2 ON db_datadict.t1_my_tablex; +SELECT constraint_schema, constraint_name, table_schema, +table_name, column_name, ordinal_position +FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex' +ORDER BY constraint_schema, constraint_name, table_schema, +table_name, ordinal_position; +constraint_schema constraint_name table_schema table_name column_name ordinal_position +db_datadict PRIMARY db_datadict t1_my_tablex first_col 1 +db_datadict PRIMARY db_datadict t1_my_tablex f2 2 +ALTER TABLE db_datadict.t1_my_tablex ADD UNIQUE (f2); +SELECT constraint_schema, constraint_name, table_schema, +table_name, column_name, ordinal_position +FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex' +ORDER BY constraint_schema, constraint_name, table_schema, +table_name, ordinal_position; +constraint_schema constraint_name table_schema table_name column_name ordinal_position +db_datadict f2 db_datadict t1_my_tablex f2 1 +db_datadict PRIMARY db_datadict t1_my_tablex first_col 1 +db_datadict PRIMARY db_datadict t1_my_tablex f2 2 +DROP INDEX f2 ON db_datadict.t1_my_tablex; +SELECT constraint_schema, constraint_name, table_schema, +table_name, column_name, ordinal_position +FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex' +ORDER BY constraint_schema, constraint_name, table_schema, +table_name, ordinal_position; +constraint_schema constraint_name table_schema table_name column_name ordinal_position +db_datadict PRIMARY db_datadict t1_my_tablex first_col 1 +db_datadict PRIMARY db_datadict t1_my_tablex f2 2 +ALTER TABLE db_datadict.t1_my_tablex ADD UNIQUE my_idx (f2); +SELECT constraint_schema, constraint_name, table_schema, +table_name, column_name, ordinal_position +FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex' +ORDER BY constraint_schema, constraint_name, table_schema, +table_name, ordinal_position; +constraint_schema constraint_name table_schema table_name column_name ordinal_position +db_datadict my_idx db_datadict t1_my_tablex f2 1 +db_datadict PRIMARY db_datadict t1_my_tablex first_col 1 +db_datadict PRIMARY db_datadict t1_my_tablex f2 2 +DROP INDEX my_idx ON db_datadict.t1_my_tablex; +SELECT constraint_schema, constraint_name, table_schema, +table_name, column_name, ordinal_position +FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex' +ORDER BY constraint_schema, constraint_name, table_schema, +table_name, ordinal_position; +constraint_schema constraint_name table_schema table_name column_name ordinal_position +db_datadict PRIMARY db_datadict t1_my_tablex first_col 1 +db_datadict PRIMARY db_datadict t1_my_tablex f2 2 +ALTER TABLE db_datadict.t1_my_tablex ADD UNIQUE my_idx (f4,first_col); +SELECT constraint_schema, constraint_name, table_schema, +table_name, column_name, ordinal_position +FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex' +ORDER BY constraint_schema, constraint_name, table_schema, +table_name, ordinal_position; +constraint_schema constraint_name table_schema table_name column_name ordinal_position +db_datadict my_idx db_datadict t1_my_tablex f4 1 +db_datadict my_idx db_datadict t1_my_tablex first_col 2 +db_datadict PRIMARY db_datadict t1_my_tablex first_col 1 +db_datadict PRIMARY db_datadict t1_my_tablex f2 2 +SELECT constraint_schema, constraint_name, table_schema, +table_name, column_name, ordinal_position +FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex' +ORDER BY constraint_schema, constraint_name, table_schema, +table_name, ordinal_position; +constraint_schema constraint_name table_schema table_name column_name ordinal_position +db_datadict my_idx db_datadict t1_my_tablex f4 1 +db_datadict my_idx db_datadict t1_my_tablex first_col 2 +db_datadict PRIMARY db_datadict t1_my_tablex first_col 1 +db_datadict PRIMARY db_datadict t1_my_tablex f2 2 +ALTER TABLE db_datadict.t1_my_tablex +DROP COLUMN first_col; +SELECT constraint_schema, constraint_name, table_schema, +table_name, column_name, ordinal_position +FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex' +ORDER BY constraint_schema, constraint_name, table_schema, +table_name, ordinal_position; +constraint_schema constraint_name table_schema table_name column_name ordinal_position +db_datadict my_idx db_datadict t1_my_tablex f4 1 +db_datadict PRIMARY db_datadict t1_my_tablex f2 1 +SELECT table_name, column_name +FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex' +ORDER BY table_name, column_name; +table_name column_name +t1_my_tablex f2 +t1_my_tablex f4 +DROP TABLE db_datadict.t1_my_tablex; +SELECT table_name, column_name +FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex'; +table_name column_name +SELECT table_name FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex'; +table_name +CREATE TABLE db_datadict.t1_my_tablex +ENGINE = AS +SELECT 1 AS f1; +SELECT table_name FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex'; +table_name +ALTER TABLE db_datadict.t1_my_tablex ADD PRIMARY KEY(f1); +SELECT table_name FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex'; +table_name +t1_my_tablex +SELECT table_name FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex'; +table_name +t1_my_tablex +DROP DATABASE db_datadict; +SELECT table_name FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex'; +table_name +######################################################################## +# 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 table are not supported +######################################################################## +DROP DATABASE IF EXISTS db_datadict; +DROP TABLE IF EXISTS db_datadict.t1; +CREATE DATABASE db_datadict; +CREATE TABLE db_datadict.t1 (f1 BIGINT) +ENGINE = ; +INSERT INTO information_schema.key_column_usage +(constraint_schema, constraint_name, table_name) +VALUES ( 'mysql', 'primary', 'db'); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +INSERT INTO information_schema.key_column_usage +SELECT * FROM information_schema.key_column_usage; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +UPDATE information_schema.key_column_usage +SET table_name = 'db1' WHERE constraint_name = 'primary'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DELETE FROM information_schema.key_column_usage WHERE table_name = 't1'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +TRUNCATE information_schema.key_column_usage; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE INDEX i3 ON information_schema.key_column_usage(table_name); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.key_column_usage ADD f1 INT; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DROP TABLE information_schema.key_column_usage; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.key_column_usage +RENAME db_datadict.key_column_usage; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.key_column_usage +RENAME information_schema.xkey_column_usage; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DROP TABLE db_datadict.t1; +DROP DATABASE db_datadict; diff --git a/mysql-test/suite/funcs_1/r/is_routines_embedded.result b/mysql-test/suite/funcs_1/r/is_routines_embedded.result new file mode 100644 index 00000000000..2e5dbf84402 --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_routines_embedded.result @@ -0,0 +1,620 @@ +SHOW TABLES FROM information_schema LIKE 'ROUTINES'; +Tables_in_information_schema (ROUTINES) +ROUTINES +####################################################################### +# Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT +####################################################################### +DROP VIEW IF EXISTS test.v1; +DROP PROCEDURE IF EXISTS test.p1; +DROP FUNCTION IF EXISTS test.f1; +CREATE VIEW test.v1 AS SELECT * FROM information_schema.ROUTINES; +CREATE PROCEDURE test.p1() SELECT * FROM information_schema.ROUTINES; +CREATE FUNCTION test.f1() returns BIGINT +BEGIN +DECLARE counter BIGINT DEFAULT NULL; +SELECT COUNT(*) INTO counter FROM information_schema.ROUTINES; +RETURN counter; +END// +# Attention: The printing of the next result sets is disabled. +SELECT * FROM information_schema.ROUTINES; +SELECT * FROM test.v1; +CALL test.p1; +SELECT test.f1(); +DROP VIEW test.v1; +DROP PROCEDURE test.p1; +DROP FUNCTION test.f1; +######################################################################### +# Testcase 3.2.8.1: INFORMATION_SCHEMA.ROUTINES layout +######################################################################### +DESCRIBE information_schema.ROUTINES; +Field Type Null Key Default Extra +SPECIFIC_NAME varchar(64) NO +ROUTINE_CATALOG varchar(512) YES NULL +ROUTINE_SCHEMA varchar(64) NO +ROUTINE_NAME varchar(64) NO +ROUTINE_TYPE varchar(9) NO +DTD_IDENTIFIER varchar(64) YES NULL +ROUTINE_BODY varchar(8) NO +ROUTINE_DEFINITION longtext YES NULL +EXTERNAL_NAME varchar(64) YES NULL +EXTERNAL_LANGUAGE varchar(64) YES NULL +PARAMETER_STYLE varchar(8) NO +IS_DETERMINISTIC varchar(3) NO +SQL_DATA_ACCESS varchar(64) NO +SQL_PATH varchar(64) YES NULL +SECURITY_TYPE varchar(7) NO +CREATED datetime NO 0000-00-00 00:00:00 +LAST_ALTERED datetime NO 0000-00-00 00:00:00 +SQL_MODE longtext NO NULL +ROUTINE_COMMENT varchar(64) NO +DEFINER varchar(77) NO +SHOW CREATE TABLE information_schema.ROUTINES; +Table Create Table +ROUTINES CREATE TEMPORARY TABLE `ROUTINES` ( + `SPECIFIC_NAME` varchar(64) NOT NULL default '', + `ROUTINE_CATALOG` varchar(512) default NULL, + `ROUTINE_SCHEMA` varchar(64) NOT NULL default '', + `ROUTINE_NAME` varchar(64) NOT NULL default '', + `ROUTINE_TYPE` varchar(9) NOT NULL default '', + `DTD_IDENTIFIER` varchar(64) default NULL, + `ROUTINE_BODY` varchar(8) NOT NULL default '', + `ROUTINE_DEFINITION` longtext, + `EXTERNAL_NAME` varchar(64) default NULL, + `EXTERNAL_LANGUAGE` varchar(64) default NULL, + `PARAMETER_STYLE` varchar(8) NOT NULL default '', + `IS_DETERMINISTIC` varchar(3) NOT NULL default '', + `SQL_DATA_ACCESS` varchar(64) NOT NULL default '', + `SQL_PATH` varchar(64) default NULL, + `SECURITY_TYPE` varchar(7) NOT NULL default '', + `CREATED` datetime NOT NULL default '0000-00-00 00:00:00', + `LAST_ALTERED` datetime NOT NULL default '0000-00-00 00:00:00', + `SQL_MODE` longtext NOT NULL, + `ROUTINE_COMMENT` varchar(64) NOT NULL default '', + `DEFINER` varchar(77) NOT NULL default '' +) ENGINE=MyISAM DEFAULT CHARSET=utf8 +SHOW COLUMNS FROM information_schema.ROUTINES; +Field Type Null Key Default Extra +SPECIFIC_NAME varchar(64) NO +ROUTINE_CATALOG varchar(512) YES NULL +ROUTINE_SCHEMA varchar(64) NO +ROUTINE_NAME varchar(64) NO +ROUTINE_TYPE varchar(9) NO +DTD_IDENTIFIER varchar(64) YES NULL +ROUTINE_BODY varchar(8) NO +ROUTINE_DEFINITION longtext YES NULL +EXTERNAL_NAME varchar(64) YES NULL +EXTERNAL_LANGUAGE varchar(64) YES NULL +PARAMETER_STYLE varchar(8) NO +IS_DETERMINISTIC varchar(3) NO +SQL_DATA_ACCESS varchar(64) NO +SQL_PATH varchar(64) YES NULL +SECURITY_TYPE varchar(7) NO +CREATED datetime NO 0000-00-00 00:00:00 +LAST_ALTERED datetime NO 0000-00-00 00:00:00 +SQL_MODE longtext NO NULL +ROUTINE_COMMENT varchar(64) NO +DEFINER varchar(77) NO +USE test; +DROP PROCEDURE IF EXISTS sp_for_routines; +DROP FUNCTION IF EXISTS function_for_routines; +CREATE PROCEDURE sp_for_routines() SELECT 'db_datadict'; +CREATE FUNCTION function_for_routines() RETURNS INT RETURN 0; +SELECT specific_name,routine_catalog,routine_schema,routine_name,routine_type, +routine_body,external_name,external_language,parameter_style,sql_path +FROM information_schema.routines +WHERE routine_catalog IS NOT NULL OR external_name IS NOT NULL +OR external_language IS NOT NULL OR sql_path IS NOT NULL +OR routine_body <> 'SQL' OR parameter_style <> 'SQL' + OR specific_name <> routine_name; +specific_name routine_catalog routine_schema routine_name routine_type routine_body external_name external_language parameter_style sql_path +DROP PROCEDURE sp_for_routines; +DROP FUNCTION function_for_routines; +################################################################################ +# Testcase 3.2.8.2 + 3.2.8.3: INFORMATION_SCHEMA.ROUTINES accessible information +################################################################################ +DROP DATABASE IF EXISTS db_datadict; +DROP DATABASE IF EXISTS db_datadict_2; +CREATE DATABASE db_datadict; +USE db_datadict; +CREATE TABLE res_6_408002_1(f1 CHAR(3), f2 TEXT(25), f3 DATE, f4 INT) +ENGINE = ; +INSERT INTO res_6_408002_1(f1, f2, f3, f4) +VALUES('abc', 'xyz', '1989-11-09', 0815); +DROP PROCEDURE IF EXISTS sp_6_408002_1; +CREATE PROCEDURE sp_6_408002_1() +BEGIN +SELECT * FROM db_datadict.res_6_408002_1; +END// +CREATE DATABASE db_datadict_2; +USE db_datadict_2; +CREATE TABLE res_6_408002_2(f1 CHAR(3), f2 TEXT(25), f3 DATE, f4 INT) +ENGINE = ; +INSERT INTO res_6_408002_2(f1, f2, f3, f4) +VALUES('abc', 'xyz', '1990-10-03', 4711); +DROP PROCEDURE IF EXISTS sp_6_408002_2; +CREATE PROCEDURE sp_6_408002_2() +BEGIN +SELECT * FROM db_datadict_2.res_6_408002_2; +END// +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +DROP USER 'testuser2'@'localhost'; +CREATE USER 'testuser2'@'localhost'; +DROP USER 'testuser3'@'localhost'; +CREATE USER 'testuser3'@'localhost'; +GRANT SELECT ON db_datadict_2.* TO 'testuser1'@'localhost'; +GRANT EXECUTE ON db_datadict_2.* TO 'testuser1'@'localhost'; +GRANT EXECUTE ON db_datadict.* TO 'testuser1'@'localhost'; +GRANT SELECT ON db_datadict.* TO 'testuser2'@'localhost'; +GRANT EXECUTE ON PROCEDURE db_datadict_2.sp_6_408002_2 +TO 'testuser2'@'localhost'; +GRANT EXECUTE ON db_datadict_2.* TO 'testuser2'@'localhost'; +FLUSH PRIVILEGES; +# Establish connection testuser1 (user=testuser1) +SELECT * FROM information_schema.routines; +SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER +sp_6_408002_1 NULL db_datadict sp_6_408002_1 PROCEDURE NULL SQL BEGIN +SELECT * FROM db_datadict.res_6_408002_1; +END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost +sp_6_408002_2 NULL db_datadict_2 sp_6_408002_2 PROCEDURE NULL SQL BEGIN +SELECT * FROM db_datadict_2.res_6_408002_2; +END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost +# Establish connection testuser2 (user=testuser2) +SELECT * FROM information_schema.routines; +SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER +sp_6_408002_1 NULL db_datadict sp_6_408002_1 PROCEDURE NULL SQL BEGIN +SELECT * FROM db_datadict.res_6_408002_1; +END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost +sp_6_408002_2 NULL db_datadict_2 sp_6_408002_2 PROCEDURE NULL SQL BEGIN +SELECT * FROM db_datadict_2.res_6_408002_2; +END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost +# Establish connection testuser3 (user=testuser3) +SELECT * FROM information_schema.routines; +SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER +sp_6_408002_1 NULL db_datadict sp_6_408002_1 PROCEDURE NULL SQL BEGIN +SELECT * FROM db_datadict.res_6_408002_1; +END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost +sp_6_408002_2 NULL db_datadict_2 sp_6_408002_2 PROCEDURE NULL SQL BEGIN +SELECT * FROM db_datadict_2.res_6_408002_2; +END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost +# Switch to connection default and close connections testuser1,testuser2,testuser3 +DROP USER 'testuser1'@'localhost'; +DROP USER 'testuser2'@'localhost'; +DROP USER 'testuser3'@'localhost'; +USE test; +DROP DATABASE db_datadict; +DROP DATABASE db_datadict_2; +######################################################################### +# 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.ROUTINES modifications +######################################################################### +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +SELECT * FROM information_schema.routines WHERE routine_schema = 'db_datadict'; +SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER +USE db_datadict; +CREATE PROCEDURE sp_for_routines() SELECT 'db_datadict'; +CREATE FUNCTION function_for_routines() RETURNS INT RETURN 0; +SELECT * FROM information_schema.routines WHERE routine_schema = 'db_datadict' +ORDER BY routine_name; +SPECIFIC_NAME function_for_routines +ROUTINE_CATALOG NULL +ROUTINE_SCHEMA db_datadict +ROUTINE_NAME function_for_routines +ROUTINE_TYPE FUNCTION +DTD_IDENTIFIER int(11) +ROUTINE_BODY SQL +ROUTINE_DEFINITION RETURN 0 +EXTERNAL_NAME NULL +EXTERNAL_LANGUAGE NULL +PARAMETER_STYLE SQL +IS_DETERMINISTIC NO +SQL_DATA_ACCESS CONTAINS SQL +SQL_PATH NULL +SECURITY_TYPE DEFINER +CREATED +LAST_ALTERED +SQL_MODE +ROUTINE_COMMENT +DEFINER root@localhost +SPECIFIC_NAME sp_for_routines +ROUTINE_CATALOG NULL +ROUTINE_SCHEMA db_datadict +ROUTINE_NAME sp_for_routines +ROUTINE_TYPE PROCEDURE +DTD_IDENTIFIER NULL +ROUTINE_BODY SQL +ROUTINE_DEFINITION SELECT 'db_datadict' +EXTERNAL_NAME NULL +EXTERNAL_LANGUAGE NULL +PARAMETER_STYLE SQL +IS_DETERMINISTIC NO +SQL_DATA_ACCESS CONTAINS SQL +SQL_PATH NULL +SECURITY_TYPE DEFINER +CREATED +LAST_ALTERED +SQL_MODE +ROUTINE_COMMENT +DEFINER root@localhost +ALTER PROCEDURE sp_for_routines SQL SECURITY INVOKER; +ALTER FUNCTION function_for_routines COMMENT 'updated comments'; +SELECT * FROM information_schema.routines WHERE routine_schema = 'db_datadict' +ORDER BY routine_name; +SPECIFIC_NAME function_for_routines +ROUTINE_CATALOG NULL +ROUTINE_SCHEMA db_datadict +ROUTINE_NAME function_for_routines +ROUTINE_TYPE FUNCTION +DTD_IDENTIFIER int(11) +ROUTINE_BODY SQL +ROUTINE_DEFINITION RETURN 0 +EXTERNAL_NAME NULL +EXTERNAL_LANGUAGE NULL +PARAMETER_STYLE SQL +IS_DETERMINISTIC NO +SQL_DATA_ACCESS CONTAINS SQL +SQL_PATH NULL +SECURITY_TYPE DEFINER +CREATED +LAST_ALTERED +SQL_MODE +ROUTINE_COMMENT updated comments +DEFINER root@localhost +SPECIFIC_NAME sp_for_routines +ROUTINE_CATALOG NULL +ROUTINE_SCHEMA db_datadict +ROUTINE_NAME sp_for_routines +ROUTINE_TYPE PROCEDURE +DTD_IDENTIFIER NULL +ROUTINE_BODY SQL +ROUTINE_DEFINITION SELECT 'db_datadict' +EXTERNAL_NAME NULL +EXTERNAL_LANGUAGE NULL +PARAMETER_STYLE SQL +IS_DETERMINISTIC NO +SQL_DATA_ACCESS CONTAINS SQL +SQL_PATH NULL +SECURITY_TYPE INVOKER +CREATED +LAST_ALTERED +SQL_MODE +ROUTINE_COMMENT +DEFINER root@localhost +DROP PROCEDURE sp_for_routines; +DROP FUNCTION function_for_routines; +SELECT * FROM information_schema.routines WHERE routine_schema = 'db_datadict'; +SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER +CREATE PROCEDURE sp_for_routines() SELECT 'db_datadict'; +CREATE FUNCTION function_for_routines() RETURNS INT RETURN 0; +SELECT * FROM information_schema.routines WHERE routine_schema = 'db_datadict' +ORDER BY routine_name; +SPECIFIC_NAME function_for_routines +ROUTINE_CATALOG NULL +ROUTINE_SCHEMA db_datadict +ROUTINE_NAME function_for_routines +ROUTINE_TYPE FUNCTION +DTD_IDENTIFIER int(11) +ROUTINE_BODY SQL +ROUTINE_DEFINITION RETURN 0 +EXTERNAL_NAME NULL +EXTERNAL_LANGUAGE NULL +PARAMETER_STYLE SQL +IS_DETERMINISTIC NO +SQL_DATA_ACCESS CONTAINS SQL +SQL_PATH NULL +SECURITY_TYPE DEFINER +CREATED +LAST_ALTERED +SQL_MODE +ROUTINE_COMMENT +DEFINER root@localhost +SPECIFIC_NAME sp_for_routines +ROUTINE_CATALOG NULL +ROUTINE_SCHEMA db_datadict +ROUTINE_NAME sp_for_routines +ROUTINE_TYPE PROCEDURE +DTD_IDENTIFIER NULL +ROUTINE_BODY SQL +ROUTINE_DEFINITION SELECT 'db_datadict' +EXTERNAL_NAME NULL +EXTERNAL_LANGUAGE NULL +PARAMETER_STYLE SQL +IS_DETERMINISTIC NO +SQL_DATA_ACCESS CONTAINS SQL +SQL_PATH NULL +SECURITY_TYPE DEFINER +CREATED +LAST_ALTERED +SQL_MODE +ROUTINE_COMMENT +DEFINER root@localhost +use test; +DROP DATABASE db_datadict; +SELECT * FROM information_schema.routines WHERE routine_schema = 'db_datadict'; +SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER +######################################################################### +# 3.2.8.4: INFORMATION_SCHEMA.ROUTINES routine body too big for +# ROUTINE_DEFINITION column +######################################################################### +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +USE db_datadict; +CREATE TABLE db_datadict.res_6_408004_1 +(f1 LONGTEXT , f2 MEDIUMINT , f3 LONGBLOB , f4 REAL , f5 YEAR) +ENGINE = ; +INSERT INTO db_datadict.res_6_408004_1 +VALUES ('abc', 98765 , 99999999 , 98765, 10); +CREATE TABLE db_datadict.res_6_408004_2 +(f1 LONGTEXT , f2 MEDIUMINT , f3 LONGBLOB , f4 REAL , f5 YEAR) +ENGINE = ; +INSERT INTO db_datadict.res_6_408004_2 +VALUES ('abc', 98765 , 99999999 , 98765, 10); +# Checking the max. possible length of (currently) 4 GByte is not +# in this environment here. +CREATE PROCEDURE sp_6_408004 () +BEGIN +DECLARE done INTEGER DEFAULt 0; +DECLARE variable_number_1 LONGTEXT; +DECLARE variable_number_2 MEDIUMINT; +DECLARE variable_number_3 LONGBLOB; +DECLARE variable_number_4 REAL; +DECLARE variable_number_5 YEAR; +DECLARE cursor_number_1 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10; +DECLARE cursor_number_2 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10; +DECLARE cursor_number_3 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10; +DECLARE cursor_number_4 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10; +DECLARE cursor_number_5 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10; +DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done = 1; +BEGIN +OPEN cursor_number_1; +WHILE done <> 1 DO +FETCH cursor_number_1 +INTO variable_number_1, variable_number_2, variable_number_3, +variable_number_4, variable_number_5; +IF done <> 0 THEN +INSERT INTO res_6_408004_2 +VALUES (variable_number_1, variable_number_2, variable_number_3, +variable_number_4, variable_number_5); +END IF; +END WHILE; +BEGIN +BEGIN +SET done = 0; +OPEN cursor_number_2; +WHILE done <> 1 DO +FETCH cursor_number_2 +INTO variable_number_1, variable_number_2, variable_number_3, +variable_number_4, variable_number_5; +IF done <> 0 THEN +INSERT INTO res_6_408004_2 +VALUES(variable_number_1, variable_number_2, variable_number_3, +variable_number_4, variable_number_5); +END IF; +END WHILE; +END; +SET done = 0; +OPEN cursor_number_3; +WHILE done <> 1 DO +FETCH cursor_number_3 +INTO variable_number_1, variable_number_2, variable_number_3, +variable_number_4, variable_number_5; +IF done <> 0 THEN +INSERT INTO res_6_408004_2 +VALUES(variable_number_1, variable_number_2, variable_number_3, +variable_number_4, variable_number_5); +END IF; +END WHILE; +END; +END; +BEGIN +SET done = 0; +OPEN cursor_number_4; +WHILE done <> 1 DO +FETCH cursor_number_4 +INTO variable_number_1, variable_number_2, variable_number_3, +variable_number_4, variable_number_5; +IF done <> 0 THEN +INSERT INTO res_6_408004_2 +VALUES (variable_number_1, variable_number_2, variable_number_3, +variable_number_4, variable_number_5); +END IF; +END WHILE; +END; +BEGIN +SET @a='test row'; +SELECT @a; +SELECT @a; +SELECT @a; +END; +BEGIN +SET done = 0; +OPEN cursor_number_5; +WHILE done <> 1 DO +FETCH cursor_number_5 +INTO variable_number_1, variable_number_2, variable_number_3, +variable_number_4, variable_number_5; +IF done <> 0 THEN +INSERT INTO res_6_408004_2 +VALUES (variable_number_1, variable_number_2, variable_number_3, +variable_number_4, variable_number_5); +END IF; +END WHILE; +END; +BEGIN +SET @a='test row'; +SELECT @a; +SELECT @a; +SELECT @a; +END; +END// +CALL db_datadict.sp_6_408004 (); +@a +test row +@a +test row +@a +test row +@a +test row +@a +test row +@a +test row +SELECT * FROM db_datadict.res_6_408004_2; +f1 f2 f3 f4 f5 +abc 98765 99999999 98765 2010 +abc 98765 99999999 98765 2010 +abc 98765 99999999 98765 2010 +abc 98765 99999999 98765 2010 +abc 98765 99999999 98765 2010 +abc 98765 99999999 98765 2010 +SELECT *, LENGTH(routine_definition) FROM information_schema.routines +WHERE routine_schema = 'db_datadict'; +SPECIFIC_NAME sp_6_408004 +ROUTINE_CATALOG NULL +ROUTINE_SCHEMA db_datadict +ROUTINE_NAME sp_6_408004 +ROUTINE_TYPE PROCEDURE +DTD_IDENTIFIER NULL +ROUTINE_BODY SQL +ROUTINE_DEFINITION BEGIN +DECLARE done INTEGER DEFAULt 0; +DECLARE variable_number_1 LONGTEXT; +DECLARE variable_number_2 MEDIUMINT; +DECLARE variable_number_3 LONGBLOB; +DECLARE variable_number_4 REAL; +DECLARE variable_number_5 YEAR; +DECLARE cursor_number_1 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10; +DECLARE cursor_number_2 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10; +DECLARE cursor_number_3 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10; +DECLARE cursor_number_4 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10; +DECLARE cursor_number_5 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10; +DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done = 1; +BEGIN +OPEN cursor_number_1; +WHILE done <> 1 DO +FETCH cursor_number_1 +INTO variable_number_1, variable_number_2, variable_number_3, +variable_number_4, variable_number_5; +IF done <> 0 THEN +INSERT INTO res_6_408004_2 +VALUES (variable_number_1, variable_number_2, variable_number_3, +variable_number_4, variable_number_5); +END IF; +END WHILE; +BEGIN +BEGIN +SET done = 0; +OPEN cursor_number_2; +WHILE done <> 1 DO +FETCH cursor_number_2 +INTO variable_number_1, variable_number_2, variable_number_3, +variable_number_4, variable_number_5; +IF done <> 0 THEN +INSERT INTO res_6_408004_2 +VALUES(variable_number_1, variable_number_2, variable_number_3, +variable_number_4, variable_number_5); +END IF; +END WHILE; +END; +SET done = 0; +OPEN cursor_number_3; +WHILE done <> 1 DO +FETCH cursor_number_3 +INTO variable_number_1, variable_number_2, variable_number_3, +variable_number_4, variable_number_5; +IF done <> 0 THEN +INSERT INTO res_6_408004_2 +VALUES(variable_number_1, variable_number_2, variable_number_3, +variable_number_4, variable_number_5); +END IF; +END WHILE; +END; +END; +BEGIN +SET done = 0; +OPEN cursor_number_4; +WHILE done <> 1 DO +FETCH cursor_number_4 +INTO variable_number_1, variable_number_2, variable_number_3, +variable_number_4, variable_number_5; +IF done <> 0 THEN +INSERT INTO res_6_408004_2 +VALUES (variable_number_1, variable_number_2, variable_number_3, +variable_number_4, variable_number_5); +END IF; +END WHILE; +END; +BEGIN +SET @a='test row'; +SELECT @a; +SELECT @a; +SELECT @a; +END; +BEGIN +SET done = 0; +OPEN cursor_number_5; +WHILE done <> 1 DO +FETCH cursor_number_5 +INTO variable_number_1, variable_number_2, variable_number_3, +variable_number_4, variable_number_5; +IF done <> 0 THEN +INSERT INTO res_6_408004_2 +VALUES (variable_number_1, variable_number_2, variable_number_3, +variable_number_4, variable_number_5); +END IF; +END WHILE; +END; +BEGIN +SET @a='test row'; +SELECT @a; +SELECT @a; +SELECT @a; +END; +END +EXTERNAL_NAME NULL +EXTERNAL_LANGUAGE NULL +PARAMETER_STYLE SQL +IS_DETERMINISTIC NO +SQL_DATA_ACCESS CONTAINS SQL +SQL_PATH NULL +SECURITY_TYPE DEFINER +CREATED YYYY-MM-DD hh:mm:ss +LAST_ALTERED YYYY-MM-DD hh:mm:ss +SQL_MODE +ROUTINE_COMMENT +DEFINER root@localhost +LENGTH(routine_definition) 2549 +DROP DATABASE db_datadict; +######################################################################## +# 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 table are not supported +######################################################################## +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +USE db_datadict; +CREATE PROCEDURE sp_for_routines() SELECT 'db_datadict'; +USE test; +INSERT INTO information_schema.routines (routine_name, routine_type ) +VALUES ('p2', 'procedure'); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +UPDATE information_schema.routines SET routine_name = 'p2' +WHERE routine_body = 'sql'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DELETE FROM information_schema.routines ; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +TRUNCATE information_schema.routines ; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE INDEX i7 ON information_schema.routines (routine_name); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.routines ADD f1 INT; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.routines DISCARD TABLESPACE; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DROP TABLE information_schema.routines ; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.routines RENAME db_datadict.routines; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.routines RENAME information_schema.xroutines; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DROP DATABASE db_datadict; diff --git a/mysql-test/suite/funcs_1/r/is_schemata_embedded.result b/mysql-test/suite/funcs_1/r/is_schemata_embedded.result new file mode 100644 index 00000000000..0dbbeaaa468 --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_schemata_embedded.result @@ -0,0 +1,187 @@ +SHOW TABLES FROM information_schema LIKE 'SCHEMATA'; +Tables_in_information_schema (SCHEMATA) +SCHEMATA +####################################################################### +# Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT +####################################################################### +DROP VIEW IF EXISTS test.v1; +DROP PROCEDURE IF EXISTS test.p1; +DROP FUNCTION IF EXISTS test.f1; +CREATE VIEW test.v1 AS SELECT * FROM information_schema.SCHEMATA; +CREATE PROCEDURE test.p1() SELECT * FROM information_schema.SCHEMATA; +CREATE FUNCTION test.f1() returns BIGINT +BEGIN +DECLARE counter BIGINT DEFAULT NULL; +SELECT COUNT(*) INTO counter FROM information_schema.SCHEMATA; +RETURN counter; +END// +# Attention: The printing of the next result sets is disabled. +SELECT * FROM information_schema.SCHEMATA; +SELECT * FROM test.v1; +CALL test.p1; +SELECT test.f1(); +DROP VIEW test.v1; +DROP PROCEDURE test.p1; +DROP FUNCTION test.f1; +######################################################################### +# Testcase 3.2.9.1: INFORMATION_SCHEMA.SCHEMATA layout; +######################################################################### +DESCRIBE information_schema.SCHEMATA; +Field Type Null Key Default Extra +CATALOG_NAME varchar(512) YES NULL +SCHEMA_NAME varchar(64) NO +DEFAULT_CHARACTER_SET_NAME varchar(64) NO +DEFAULT_COLLATION_NAME varchar(64) NO +SQL_PATH varchar(512) YES NULL +SHOW CREATE TABLE information_schema.SCHEMATA; +Table Create Table +SCHEMATA CREATE TEMPORARY TABLE `SCHEMATA` ( + `CATALOG_NAME` varchar(512) default NULL, + `SCHEMA_NAME` varchar(64) NOT NULL default '', + `DEFAULT_CHARACTER_SET_NAME` varchar(64) NOT NULL default '', + `DEFAULT_COLLATION_NAME` varchar(64) NOT NULL default '', + `SQL_PATH` varchar(512) default NULL +) ENGINE=MEMORY DEFAULT CHARSET=utf8 +SHOW COLUMNS FROM information_schema.SCHEMATA; +Field Type Null Key Default Extra +CATALOG_NAME varchar(512) YES NULL +SCHEMA_NAME varchar(64) NO +DEFAULT_CHARACTER_SET_NAME varchar(64) NO +DEFAULT_COLLATION_NAME varchar(64) NO +SQL_PATH varchar(512) YES NULL +SELECT catalog_name, schema_name, sql_path +FROM information_schema.schemata +WHERE catalog_name IS NOT NULL or sql_path IS NOT NULL; +catalog_name schema_name sql_path +############################################################################### +# Testcases 3.2.9.2+3.2.9.3: INFORMATION_SCHEMA.SCHEMATA accessible information +############################################################################### +DROP DATABASE IF EXISTS db_datadict_1; +DROP DATABASE IF EXISTS db_datadict_2; +CREATE DATABASE db_datadict_1; +CREATE DATABASE db_datadict_2; +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +DROP USER 'testuser2'@'localhost'; +CREATE USER 'testuser2'@'localhost'; +DROP USER 'testuser3'@'localhost'; +CREATE USER 'testuser3'@'localhost'; +GRANT SELECT ON db_datadict_1.* to 'testuser1'@'localhost'; +GRANT SELECT ON db_datadict_1.* to 'testuser2'@'localhost'; +GRANT SELECT ON db_datadict_2.* to 'testuser2'@'localhost'; +SELECT * FROM information_schema.schemata +WHERE schema_name LIKE 'db_datadict_%' ORDER BY schema_name; +CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH +NULL db_datadict_1 latin1 latin1_swedish_ci NULL +NULL db_datadict_2 latin1 latin1_swedish_ci NULL +SHOW DATABASES LIKE 'db_datadict_%'; +Database (db_datadict_%) +db_datadict_1 +db_datadict_2 +# Establish connection testuser1 (user=testuser1) +SELECT * FROM information_schema.schemata +WHERE schema_name LIKE 'db_datadict_%' ORDER BY schema_name; +CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH +NULL db_datadict_1 latin1 latin1_swedish_ci NULL +NULL db_datadict_2 latin1 latin1_swedish_ci NULL +SHOW DATABASES LIKE 'db_datadict_%'; +Database (db_datadict_%) +db_datadict_1 +db_datadict_2 +# Establish connection testuser2 (user=testuser2) +SELECT * FROM information_schema.schemata +WHERE schema_name LIKE 'db_datadict_%' ORDER BY schema_name; +CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH +NULL db_datadict_1 latin1 latin1_swedish_ci NULL +NULL db_datadict_2 latin1 latin1_swedish_ci NULL +SHOW DATABASES LIKE 'db_datadict_%'; +Database (db_datadict_%) +db_datadict_1 +db_datadict_2 +# Establish connection testuser3 (user=testuser3) +SELECT * FROM information_schema.schemata +WHERE schema_name LIKE 'db_datadict_%' ORDER BY schema_name; +CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH +NULL db_datadict_1 latin1 latin1_swedish_ci NULL +NULL db_datadict_2 latin1 latin1_swedish_ci NULL +SHOW DATABASES LIKE 'db_datadict_%'; +Database (db_datadict_%) +db_datadict_1 +db_datadict_2 +# Switch to connection default and close connections testuser1,testuser2,testuser3 +DROP USER 'testuser1'@'localhost'; +DROP USER 'testuser2'@'localhost'; +DROP USER 'testuser3'@'localhost'; +DROP DATABASE db_datadict_1; +DROP DATABASE db_datadict_2; +################################################################################# +# Testcases 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.SCHEMATA modifications +################################################################################# +DROP DATABASE IF EXISTS db_datadict; +SELECT * FROM information_schema.schemata WHERE schema_name = 'db_datadict'; +CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH +CREATE DATABASE db_datadict CHARACTER SET 'latin1' COLLATE 'latin1_swedish_ci'; +SELECT * FROM information_schema.schemata WHERE schema_name = 'db_datadict'; +CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH +NULL db_datadict latin1 latin1_swedish_ci NULL +SELECT schema_name, default_character_set_name +FROM information_schema.schemata WHERE schema_name = 'db_datadict'; +schema_name default_character_set_name +db_datadict latin1 +ALTER SCHEMA db_datadict CHARACTER SET 'utf8'; +SELECT schema_name, default_character_set_name +FROM information_schema.schemata WHERE schema_name = 'db_datadict'; +schema_name default_character_set_name +db_datadict utf8 +ALTER SCHEMA db_datadict CHARACTER SET 'latin1'; +SELECT schema_name, default_collation_name FROM information_schema.schemata +WHERE schema_name = 'db_datadict'; +schema_name default_collation_name +db_datadict latin1_swedish_ci +ALTER SCHEMA db_datadict COLLATE 'latin1_general_cs'; +SELECT schema_name, default_collation_name FROM information_schema.schemata +WHERE schema_name = 'db_datadict'; +schema_name default_collation_name +db_datadict latin1_general_cs +SELECT schema_name +FROM information_schema.schemata WHERE schema_name = 'db_datadict'; +schema_name +db_datadict +DROP DATABASE db_datadict; +SELECT schema_name +FROM information_schema.schemata WHERE schema_name = 'db_datadict'; +schema_name +######################################################################## +# 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 +######################################################################## +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict CHARACTER SET 'latin1' COLLATE 'latin1_swedish_ci'; +INSERT INTO information_schema.schemata +(catalog_name, schema_name, default_character_set_name, sql_path) +VALUES (NULL, 'db1', 'latin1', NULL); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +INSERT INTO information_schema.schemata +SELECT * FROM information_schema.schemata; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +UPDATE information_schema.schemata +SET default_character_set_name = 'utf8' +WHERE schema_name = 'db_datadict'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +UPDATE information_schema.schemata SET catalog_name = 't_4711'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DELETE FROM information_schema.schemata WHERE schema_name = 'db_datadict'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +TRUNCATE information_schema.schemata; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE INDEX i1 ON information_schema.schemata(schema_name); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.schemata ADD f1 INT; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DROP TABLE information_schema.schemata; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.schemata RENAME db_datadict.schemata; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.schemata RENAME information_schema.xschemata; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DROP DATABASE db_datadict; diff --git a/mysql-test/suite/funcs_1/r/is_statistics_mysql_embedded.result b/mysql-test/suite/funcs_1/r/is_statistics_mysql_embedded.result new file mode 100644 index 00000000000..7602e71f7bf --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_statistics_mysql_embedded.result @@ -0,0 +1,103 @@ +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +DROP USER testuser1@localhost; +CREATE USER testuser1@localhost; +GRANT SELECT ON db_datadict.* TO testuser1@localhost; +SELECT * FROM information_schema.statistics +WHERE table_schema = 'mysql' +ORDER BY table_schema, table_name, index_name, seq_in_index, column_name; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT +NULL mysql columns_priv 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE +NULL mysql columns_priv 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE +NULL mysql columns_priv 0 mysql PRIMARY 3 User A #CARD# NULL NULL BTREE +NULL mysql columns_priv 0 mysql PRIMARY 4 Table_name A #CARD# NULL NULL BTREE +NULL mysql columns_priv 0 mysql PRIMARY 5 Column_name A #CARD# NULL NULL BTREE +NULL mysql db 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE +NULL mysql db 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE +NULL mysql db 0 mysql PRIMARY 3 User A #CARD# NULL NULL BTREE +NULL mysql db 1 mysql User 1 User A #CARD# NULL NULL BTREE +NULL mysql func 0 mysql PRIMARY 1 name A #CARD# NULL NULL BTREE +NULL mysql help_category 0 mysql name 1 name A #CARD# NULL NULL BTREE +NULL mysql help_category 0 mysql PRIMARY 1 help_category_id A #CARD# NULL NULL BTREE +NULL mysql help_keyword 0 mysql name 1 name A #CARD# NULL NULL BTREE +NULL mysql help_keyword 0 mysql PRIMARY 1 help_keyword_id A #CARD# NULL NULL BTREE +NULL mysql help_relation 0 mysql PRIMARY 1 help_keyword_id A #CARD# NULL NULL BTREE +NULL mysql help_relation 0 mysql PRIMARY 2 help_topic_id A #CARD# NULL NULL BTREE +NULL mysql help_topic 0 mysql name 1 name A #CARD# NULL NULL BTREE +NULL mysql help_topic 0 mysql PRIMARY 1 help_topic_id A #CARD# NULL NULL BTREE +NULL mysql host 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE +NULL mysql host 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE +NULL mysql proc 0 mysql PRIMARY 1 db A #CARD# NULL NULL BTREE +NULL mysql proc 0 mysql PRIMARY 2 name A #CARD# NULL NULL BTREE +NULL mysql proc 0 mysql PRIMARY 3 type A #CARD# NULL NULL BTREE +NULL mysql procs_priv 1 mysql Grantor 1 Grantor A #CARD# NULL NULL BTREE +NULL mysql procs_priv 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE +NULL mysql procs_priv 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE +NULL mysql procs_priv 0 mysql PRIMARY 3 User A #CARD# NULL NULL BTREE +NULL mysql procs_priv 0 mysql PRIMARY 4 Routine_name A #CARD# NULL NULL BTREE +NULL mysql procs_priv 0 mysql PRIMARY 5 Routine_type A #CARD# NULL NULL BTREE +NULL mysql tables_priv 1 mysql Grantor 1 Grantor A #CARD# NULL NULL BTREE +NULL mysql tables_priv 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE +NULL mysql tables_priv 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE +NULL mysql tables_priv 0 mysql PRIMARY 3 User A #CARD# NULL NULL BTREE +NULL mysql tables_priv 0 mysql PRIMARY 4 Table_name A #CARD# NULL NULL BTREE +NULL mysql time_zone 0 mysql PRIMARY 1 Time_zone_id A #CARD# NULL NULL BTREE +NULL mysql time_zone_leap_second 0 mysql PRIMARY 1 Transition_time A #CARD# NULL NULL BTREE +NULL mysql time_zone_name 0 mysql PRIMARY 1 Name A #CARD# NULL NULL BTREE +NULL mysql time_zone_transition 0 mysql PRIMARY 1 Time_zone_id A #CARD# NULL NULL BTREE +NULL mysql time_zone_transition 0 mysql PRIMARY 2 Transition_time A #CARD# NULL NULL BTREE +NULL mysql time_zone_transition_type 0 mysql PRIMARY 1 Time_zone_id A #CARD# NULL NULL BTREE +NULL mysql time_zone_transition_type 0 mysql PRIMARY 2 Transition_type_id A #CARD# NULL NULL BTREE +NULL mysql user 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE +NULL mysql user 0 mysql PRIMARY 2 User A #CARD# NULL NULL BTREE +# Establish connection testuser1 (user=testuser1) +SELECT * FROM information_schema.statistics +WHERE table_schema = 'mysql' +ORDER BY table_schema, table_name, index_name, seq_in_index, column_name; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT +NULL mysql columns_priv 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE +NULL mysql columns_priv 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE +NULL mysql columns_priv 0 mysql PRIMARY 3 User A #CARD# NULL NULL BTREE +NULL mysql columns_priv 0 mysql PRIMARY 4 Table_name A #CARD# NULL NULL BTREE +NULL mysql columns_priv 0 mysql PRIMARY 5 Column_name A #CARD# NULL NULL BTREE +NULL mysql db 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE +NULL mysql db 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE +NULL mysql db 0 mysql PRIMARY 3 User A #CARD# NULL NULL BTREE +NULL mysql db 1 mysql User 1 User A #CARD# NULL NULL BTREE +NULL mysql func 0 mysql PRIMARY 1 name A #CARD# NULL NULL BTREE +NULL mysql help_category 0 mysql name 1 name A #CARD# NULL NULL BTREE +NULL mysql help_category 0 mysql PRIMARY 1 help_category_id A #CARD# NULL NULL BTREE +NULL mysql help_keyword 0 mysql name 1 name A #CARD# NULL NULL BTREE +NULL mysql help_keyword 0 mysql PRIMARY 1 help_keyword_id A #CARD# NULL NULL BTREE +NULL mysql help_relation 0 mysql PRIMARY 1 help_keyword_id A #CARD# NULL NULL BTREE +NULL mysql help_relation 0 mysql PRIMARY 2 help_topic_id A #CARD# NULL NULL BTREE +NULL mysql help_topic 0 mysql name 1 name A #CARD# NULL NULL BTREE +NULL mysql help_topic 0 mysql PRIMARY 1 help_topic_id A #CARD# NULL NULL BTREE +NULL mysql host 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE +NULL mysql host 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE +NULL mysql proc 0 mysql PRIMARY 1 db A #CARD# NULL NULL BTREE +NULL mysql proc 0 mysql PRIMARY 2 name A #CARD# NULL NULL BTREE +NULL mysql proc 0 mysql PRIMARY 3 type A #CARD# NULL NULL BTREE +NULL mysql procs_priv 1 mysql Grantor 1 Grantor A #CARD# NULL NULL BTREE +NULL mysql procs_priv 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE +NULL mysql procs_priv 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE +NULL mysql procs_priv 0 mysql PRIMARY 3 User A #CARD# NULL NULL BTREE +NULL mysql procs_priv 0 mysql PRIMARY 4 Routine_name A #CARD# NULL NULL BTREE +NULL mysql procs_priv 0 mysql PRIMARY 5 Routine_type A #CARD# NULL NULL BTREE +NULL mysql tables_priv 1 mysql Grantor 1 Grantor A #CARD# NULL NULL BTREE +NULL mysql tables_priv 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE +NULL mysql tables_priv 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE +NULL mysql tables_priv 0 mysql PRIMARY 3 User A #CARD# NULL NULL BTREE +NULL mysql tables_priv 0 mysql PRIMARY 4 Table_name A #CARD# NULL NULL BTREE +NULL mysql time_zone 0 mysql PRIMARY 1 Time_zone_id A #CARD# NULL NULL BTREE +NULL mysql time_zone_leap_second 0 mysql PRIMARY 1 Transition_time A #CARD# NULL NULL BTREE +NULL mysql time_zone_name 0 mysql PRIMARY 1 Name A #CARD# NULL NULL BTREE +NULL mysql time_zone_transition 0 mysql PRIMARY 1 Time_zone_id A #CARD# NULL NULL BTREE +NULL mysql time_zone_transition 0 mysql PRIMARY 2 Transition_time A #CARD# NULL NULL BTREE +NULL mysql time_zone_transition_type 0 mysql PRIMARY 1 Time_zone_id A #CARD# NULL NULL BTREE +NULL mysql time_zone_transition_type 0 mysql PRIMARY 2 Transition_type_id A #CARD# NULL NULL BTREE +NULL mysql user 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE +NULL mysql user 0 mysql PRIMARY 2 User A #CARD# NULL NULL BTREE +# Switch to connection default and close connection testuser1 +DROP USER testuser1@localhost; +DROP DATABASE db_datadict; diff --git a/mysql-test/suite/funcs_1/r/is_table_constraints_mysql_embedded.result b/mysql-test/suite/funcs_1/r/is_table_constraints_mysql_embedded.result new file mode 100644 index 00000000000..0ab31365eb5 --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_table_constraints_mysql_embedded.result @@ -0,0 +1,57 @@ +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +DROP USER testuser1@localhost; +CREATE USER testuser1@localhost; +GRANT SELECT ON db_datadict.* TO testuser1@localhost; +SELECT * FROM information_schema.table_constraints +WHERE table_schema = 'mysql' +ORDER BY table_schema,table_name,constraint_name; +CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE +NULL mysql PRIMARY mysql columns_priv PRIMARY KEY +NULL mysql PRIMARY mysql db PRIMARY KEY +NULL mysql PRIMARY mysql func PRIMARY KEY +NULL mysql name mysql help_category UNIQUE +NULL mysql PRIMARY mysql help_category PRIMARY KEY +NULL mysql name mysql help_keyword UNIQUE +NULL mysql PRIMARY mysql help_keyword PRIMARY KEY +NULL mysql PRIMARY mysql help_relation PRIMARY KEY +NULL mysql name mysql help_topic UNIQUE +NULL mysql PRIMARY mysql help_topic PRIMARY KEY +NULL mysql PRIMARY mysql host PRIMARY KEY +NULL mysql PRIMARY mysql proc PRIMARY KEY +NULL mysql PRIMARY mysql procs_priv PRIMARY KEY +NULL mysql PRIMARY mysql tables_priv PRIMARY KEY +NULL mysql PRIMARY mysql time_zone PRIMARY KEY +NULL mysql PRIMARY mysql time_zone_leap_second PRIMARY KEY +NULL mysql PRIMARY mysql time_zone_name PRIMARY KEY +NULL mysql PRIMARY mysql time_zone_transition PRIMARY KEY +NULL mysql PRIMARY mysql time_zone_transition_type PRIMARY KEY +NULL mysql PRIMARY mysql user PRIMARY KEY +# Establish connection testuser1 (user=testuser1) +SELECT * FROM information_schema.table_constraints +WHERE table_schema = 'mysql' +ORDER BY table_schema,table_name,constraint_name; +CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE +NULL mysql PRIMARY mysql columns_priv PRIMARY KEY +NULL mysql PRIMARY mysql db PRIMARY KEY +NULL mysql PRIMARY mysql func PRIMARY KEY +NULL mysql name mysql help_category UNIQUE +NULL mysql PRIMARY mysql help_category PRIMARY KEY +NULL mysql name mysql help_keyword UNIQUE +NULL mysql PRIMARY mysql help_keyword PRIMARY KEY +NULL mysql PRIMARY mysql help_relation PRIMARY KEY +NULL mysql name mysql help_topic UNIQUE +NULL mysql PRIMARY mysql help_topic PRIMARY KEY +NULL mysql PRIMARY mysql host PRIMARY KEY +NULL mysql PRIMARY mysql proc PRIMARY KEY +NULL mysql PRIMARY mysql procs_priv PRIMARY KEY +NULL mysql PRIMARY mysql tables_priv PRIMARY KEY +NULL mysql PRIMARY mysql time_zone PRIMARY KEY +NULL mysql PRIMARY mysql time_zone_leap_second PRIMARY KEY +NULL mysql PRIMARY mysql time_zone_name PRIMARY KEY +NULL mysql PRIMARY mysql time_zone_transition PRIMARY KEY +NULL mysql PRIMARY mysql time_zone_transition_type PRIMARY KEY +NULL mysql PRIMARY mysql user PRIMARY KEY +# Switch to connection default and close connection testuser1 +DROP USER testuser1@localhost; +DROP DATABASE db_datadict; diff --git a/mysql-test/suite/funcs_1/r/is_tables_embedded.result b/mysql-test/suite/funcs_1/r/is_tables_embedded.result new file mode 100644 index 00000000000..13ee6277bad --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_tables_embedded.result @@ -0,0 +1,427 @@ +SHOW TABLES FROM information_schema LIKE 'TABLES'; +Tables_in_information_schema (TABLES) +TABLES +####################################################################### +# Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT +####################################################################### +DROP VIEW IF EXISTS test.v1; +DROP PROCEDURE IF EXISTS test.p1; +DROP FUNCTION IF EXISTS test.f1; +CREATE VIEW test.v1 AS SELECT * FROM information_schema.TABLES; +CREATE PROCEDURE test.p1() SELECT * FROM information_schema.TABLES; +CREATE FUNCTION test.f1() returns BIGINT +BEGIN +DECLARE counter BIGINT DEFAULT NULL; +SELECT COUNT(*) INTO counter FROM information_schema.TABLES; +RETURN counter; +END// +# Attention: The printing of the next result sets is disabled. +SELECT * FROM information_schema.TABLES; +SELECT * FROM test.v1; +CALL test.p1; +SELECT test.f1(); +DROP VIEW test.v1; +DROP PROCEDURE test.p1; +DROP FUNCTION test.f1; +######################################################################### +# Testcase 3.2.12.1: INFORMATION_SCHEMA.TABLES layout +######################################################################### +DESCRIBE information_schema.TABLES; +Field Type Null Key Default Extra +TABLE_CATALOG varchar(512) YES NULL +TABLE_SCHEMA varchar(64) NO +TABLE_NAME varchar(64) NO +TABLE_TYPE varchar(64) NO +ENGINE varchar(64) YES NULL +VERSION bigint(21) YES NULL +ROW_FORMAT varchar(10) YES NULL +TABLE_ROWS bigint(21) YES NULL +AVG_ROW_LENGTH bigint(21) YES NULL +DATA_LENGTH bigint(21) YES NULL +MAX_DATA_LENGTH bigint(21) YES NULL +INDEX_LENGTH bigint(21) YES NULL +DATA_FREE bigint(21) YES NULL +AUTO_INCREMENT bigint(21) YES NULL +CREATE_TIME datetime YES NULL +UPDATE_TIME datetime YES NULL +CHECK_TIME datetime YES NULL +TABLE_COLLATION varchar(64) YES NULL +CHECKSUM bigint(21) YES NULL +CREATE_OPTIONS varchar(255) YES NULL +TABLE_COMMENT varchar(80) NO +SHOW CREATE TABLE information_schema.TABLES; +Table Create Table +TABLES CREATE TEMPORARY TABLE `TABLES` ( + `TABLE_CATALOG` varchar(512) default NULL, + `TABLE_SCHEMA` varchar(64) NOT NULL default '', + `TABLE_NAME` varchar(64) NOT NULL default '', + `TABLE_TYPE` varchar(64) NOT NULL default '', + `ENGINE` varchar(64) default NULL, + `VERSION` bigint(21) default NULL, + `ROW_FORMAT` varchar(10) default NULL, + `TABLE_ROWS` bigint(21) default NULL, + `AVG_ROW_LENGTH` bigint(21) default NULL, + `DATA_LENGTH` bigint(21) default NULL, + `MAX_DATA_LENGTH` bigint(21) default NULL, + `INDEX_LENGTH` bigint(21) default NULL, + `DATA_FREE` bigint(21) default NULL, + `AUTO_INCREMENT` bigint(21) default NULL, + `CREATE_TIME` datetime default NULL, + `UPDATE_TIME` datetime default NULL, + `CHECK_TIME` datetime default NULL, + `TABLE_COLLATION` varchar(64) default NULL, + `CHECKSUM` bigint(21) default NULL, + `CREATE_OPTIONS` varchar(255) default NULL, + `TABLE_COMMENT` varchar(80) NOT NULL default '' +) ENGINE=MEMORY DEFAULT CHARSET=utf8 +SHOW COLUMNS FROM information_schema.TABLES; +Field Type Null Key Default Extra +TABLE_CATALOG varchar(512) YES NULL +TABLE_SCHEMA varchar(64) NO +TABLE_NAME varchar(64) NO +TABLE_TYPE varchar(64) NO +ENGINE varchar(64) YES NULL +VERSION bigint(21) YES NULL +ROW_FORMAT varchar(10) YES NULL +TABLE_ROWS bigint(21) YES NULL +AVG_ROW_LENGTH bigint(21) YES NULL +DATA_LENGTH bigint(21) YES NULL +MAX_DATA_LENGTH bigint(21) YES NULL +INDEX_LENGTH bigint(21) YES NULL +DATA_FREE bigint(21) YES NULL +AUTO_INCREMENT bigint(21) YES NULL +CREATE_TIME datetime YES NULL +UPDATE_TIME datetime YES NULL +CHECK_TIME datetime YES NULL +TABLE_COLLATION varchar(64) YES NULL +CHECKSUM bigint(21) YES NULL +CREATE_OPTIONS varchar(255) YES NULL +TABLE_COMMENT varchar(80) NO +SELECT table_catalog, table_schema, table_name +FROM information_schema.tables WHERE table_catalog IS NOT NULL; +table_catalog table_schema table_name +################################################################################ +# Testcase 3.2.12.2 + 3.2.12.3: INFORMATION_SCHEMA.TABLES accessible information +################################################################################ +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +GRANT CREATE, CREATE VIEW, INSERT, SELECT ON db_datadict.* +TO 'testuser1'@'localhost' WITH GRANT OPTION; +DROP USER 'testuser2'@'localhost'; +CREATE USER 'testuser2'@'localhost'; +DROP USER 'testuser3'@'localhost'; +CREATE USER 'testuser3'@'localhost'; +CREATE TABLE db_datadict.tb1 (f1 INT, f2 INT, f3 INT) +ENGINE = ; +GRANT SELECT ON db_datadict.tb1 TO 'testuser1'@'localhost'; +GRANT ALL ON db_datadict.tb1 TO 'testuser2'@'localhost' WITH GRANT OPTION; +# Establish connection testuser1 (user=testuser1) +CREATE TABLE tb2 (f1 DECIMAL) +ENGINE = ; +CREATE TABLE tb3 (f1 VARCHAR(200)) +ENGINE = ; +GRANT SELECT ON db_datadict.tb3 to 'testuser3'@'localhost'; +GRANT INSERT ON db_datadict.tb3 to 'testuser2'@'localhost'; +CREATE VIEW v3 AS SELECT * FROM tb3; +GRANT SELECT ON db_datadict.v3 to 'testuser3'@'localhost'; +SELECT * FROM information_schema.tables +WHERE table_schema = 'db_datadict' ORDER BY table_name; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT +NULL db_datadict tb1 BASE TABLE #ENG# 10 #RF# 0 #ARL# #DL# #MDL# #IL# #DF# NULL #CRT #UT# #CT# latin1_swedish_ci #CS# +NULL db_datadict tb2 BASE TABLE #ENG# 10 #RF# 0 #ARL# #DL# #MDL# #IL# #DF# NULL #CRT #UT# #CT# latin1_swedish_ci #CS# +NULL db_datadict tb3 BASE TABLE #ENG# 10 #RF# 0 #ARL# #DL# #MDL# #IL# #DF# NULL #CRT #UT# #CT# latin1_swedish_ci #CS# +NULL db_datadict v3 VIEW #ENG# NULL #RF# NULL #ARL# #DL# #MDL# #IL# #DF# NULL #CRT #UT# #CT# NULL #CS# NULL VIEW +SHOW TABLES FROM db_datadict; +Tables_in_db_datadict +tb1 +tb2 +tb3 +v3 +# Establish connection testuser2 (user=testuser2) +SELECT * FROM information_schema.tables +WHERE table_schema = 'db_datadict' ORDER BY table_name; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT +NULL db_datadict tb1 BASE TABLE #ENG# 10 #RF# 0 #ARL# #DL# #MDL# #IL# #DF# NULL #CRT #UT# #CT# latin1_swedish_ci #CS# +NULL db_datadict tb2 BASE TABLE #ENG# 10 #RF# 0 #ARL# #DL# #MDL# #IL# #DF# NULL #CRT #UT# #CT# latin1_swedish_ci #CS# +NULL db_datadict tb3 BASE TABLE #ENG# 10 #RF# 0 #ARL# #DL# #MDL# #IL# #DF# NULL #CRT #UT# #CT# latin1_swedish_ci #CS# +NULL db_datadict v3 VIEW #ENG# NULL #RF# NULL #ARL# #DL# #MDL# #IL# #DF# NULL #CRT #UT# #CT# NULL #CS# NULL VIEW +SHOW TABLES FROM db_datadict; +Tables_in_db_datadict +tb1 +tb2 +tb3 +v3 +# Establish connection testuser3 (user=testuser3) +SELECT * FROM information_schema.tables +WHERE table_schema = 'db_datadict' ORDER BY table_name; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT +NULL db_datadict tb1 BASE TABLE #ENG# 10 #RF# 0 #ARL# #DL# #MDL# #IL# #DF# NULL #CRT #UT# #CT# latin1_swedish_ci #CS# +NULL db_datadict tb2 BASE TABLE #ENG# 10 #RF# 0 #ARL# #DL# #MDL# #IL# #DF# NULL #CRT #UT# #CT# latin1_swedish_ci #CS# +NULL db_datadict tb3 BASE TABLE #ENG# 10 #RF# 0 #ARL# #DL# #MDL# #IL# #DF# NULL #CRT #UT# #CT# latin1_swedish_ci #CS# +NULL db_datadict v3 VIEW #ENG# NULL #RF# NULL #ARL# #DL# #MDL# #IL# #DF# NULL #CRT #UT# #CT# NULL #CS# NULL VIEW +SHOW TABLES FROM db_datadict; +Tables_in_db_datadict +tb1 +tb2 +tb3 +v3 +# Switch to connection default (user=root) +SELECT * FROM information_schema.tables +WHERE table_schema = 'db_datadict' ORDER BY table_name; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT +NULL db_datadict tb1 BASE TABLE #ENG# 10 #RF# 0 #ARL# #DL# #MDL# #IL# #DF# NULL #CRT #UT# #CT# latin1_swedish_ci #CS# +NULL db_datadict tb2 BASE TABLE #ENG# 10 #RF# 0 #ARL# #DL# #MDL# #IL# #DF# NULL #CRT #UT# #CT# latin1_swedish_ci #CS# +NULL db_datadict tb3 BASE TABLE #ENG# 10 #RF# 0 #ARL# #DL# #MDL# #IL# #DF# NULL #CRT #UT# #CT# latin1_swedish_ci #CS# +NULL db_datadict v3 VIEW #ENG# NULL #RF# NULL #ARL# #DL# #MDL# #IL# #DF# NULL #CRT #UT# #CT# NULL #CS# NULL VIEW +SHOW TABLES FROM db_datadict; +Tables_in_db_datadict +tb1 +tb2 +tb3 +v3 +# Close connection testuser1, testuser2, testuser3 +DROP USER 'testuser1'@'localhost'; +DROP USER 'testuser2'@'localhost'; +DROP USER 'testuser3'@'localhost'; +DROP DATABASE db_datadict; +######################################################################### +# 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.TABLES modifications +######################################################################### +DROP TABLE IF EXISTS test.t1_my_table; +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +SELECT table_name FROM information_schema.tables +WHERE table_name LIKE 't1_my_table%'; +table_name +CREATE TABLE test.t1_my_table (f1 BIGINT) +DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci +COMMENT = 'Initial Comment' ENGINE = ; +SELECT * FROM information_schema.tables +WHERE table_name = 't1_my_table'; +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME t1_my_table +TABLE_TYPE BASE TABLE +ENGINE #ENG# +VERSION 10 +ROW_FORMAT #RF# +TABLE_ROWS 0 +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM #CS# +CREATE_OPTIONS +TABLE_COMMENT Initial Comment +SELECT table_name FROM information_schema.tables +WHERE table_name LIKE 't1_my_table%'; +table_name +t1_my_table +RENAME TABLE test.t1_my_table TO test.t1_my_tablex; +SELECT table_name FROM information_schema.tables +WHERE table_name LIKE 't1_my_table%'; +table_name +t1_my_tablex +SELECT table_schema,table_name FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +table_schema table_name +test t1_my_tablex +RENAME TABLE test.t1_my_tablex TO db_datadict.t1_my_tablex; +SELECT table_schema,table_name FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +table_schema table_name +db_datadict t1_my_tablex +SELECT table_name, engine FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +table_name engine +t1_my_tablex +ALTER TABLE db_datadict.t1_my_tablex +ENGINE = ; +SELECT table_name, engine FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +table_name engine +t1_my_tablex +SELECT table_name, table_rows FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +table_name table_rows +t1_my_tablex 0 +INSERT INTO db_datadict.t1_my_tablex VALUES(1),(2); +SELECT table_name, table_rows FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +table_name table_rows +t1_my_tablex 2 +SELECT table_name, table_collation FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +table_name table_collation +t1_my_tablex latin1_swedish_ci +ALTER TABLE db_datadict.t1_my_tablex DEFAULT CHARACTER SET utf8; +SELECT table_name, table_collation FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +table_name table_collation +t1_my_tablex utf8_general_ci +SELECT table_name, table_collation FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +table_name table_collation +t1_my_tablex utf8_general_ci +ALTER TABLE db_datadict.t1_my_tablex +DEFAULT CHARACTER SET latin1 COLLATE latin1_german1_ci; +SELECT table_name, table_collation FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +table_name table_collation +t1_my_tablex latin1_german1_ci +SELECT table_name, TABLE_COMMENT FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +table_name TABLE_COMMENT +t1_my_tablex Initial Comment +ALTER TABLE db_datadict.t1_my_tablex COMMENT 'Changed Comment'; +SELECT table_name, TABLE_COMMENT FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +table_name TABLE_COMMENT +t1_my_tablex Changed Comment +SELECT table_name, AUTO_INCREMENT FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +table_name AUTO_INCREMENT +t1_my_tablex NULL +ALTER TABLE db_datadict.t1_my_tablex +ADD f2 BIGINT AUTO_INCREMENT, ADD PRIMARY KEY (f2); +SELECT table_name, AUTO_INCREMENT FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +table_name AUTO_INCREMENT +t1_my_tablex 3 +SELECT table_name, ROW_FORMAT FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +table_name ROW_FORMAT +t1_my_tablex Fixed +ALTER TABLE db_datadict.t1_my_tablex ROW_FORMAT = dynamic; +SELECT table_name, ROW_FORMAT FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +table_name ROW_FORMAT +t1_my_tablex Dynamic +SELECT table_name, checksum FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +table_name checksum +t1_my_tablex NULL +ALTER TABLE db_datadict.t1_my_tablex CHECKSUM = 1; +SELECT table_name, checksum IS NOT NULL FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +table_name checksum IS NOT NULL +t1_my_tablex 1 +SELECT UPDATE_TIME, checksum INTO @UPDATE_TIME, @checksum +FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +INSERT INTO db_datadict.t1_my_tablex SET f1 = 3; +SELECT UPDATE_TIME > @UPDATE_TIME +AS "Is current UPDATE_TIME bigger than before last INSERT?" +FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +Is current UPDATE_TIME bigger than before last INSERT? +1 +SELECT checksum <> @checksum +AS "Is current CHECKSUM different than before last INSERT?" +FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +Is current CHECKSUM different than before last INSERT? +1 +SELECT CREATE_TIME INTO @CREATE_TIME FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +SELECT table_name FROM information_schema.tables +WHERE table_name LIKE 't1_my_table%'; +table_name +t1_my_tablex +DROP TABLE db_datadict.t1_my_tablex; +SELECT table_name FROM information_schema.tables +WHERE table_name LIKE 't1_my_table%'; +table_name +CREATE TABLE test.t1_my_tablex (f1 BIGINT) +ENGINE = ; +SELECT CREATE_TIME > @CREATE_TIME +AS "Is current CREATE_TIME bigger than for the old dropped table?" +FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +Is current CREATE_TIME bigger than for the old dropped table? +1 +DROP TABLE test.t1_my_tablex; +CREATE VIEW test.t1_my_tablex AS SELECT 1; +SELECT * FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME t1_my_tablex +TABLE_TYPE VIEW +ENGINE NULL +VERSION NULL +ROW_FORMAT NULL +TABLE_ROWS NULL +AVG_ROW_LENGTH NULL +DATA_LENGTH NULL +MAX_DATA_LENGTH NULL +INDEX_LENGTH NULL +DATA_FREE NULL +AUTO_INCREMENT NULL +CREATE_TIME NULL +UPDATE_TIME NULL +CHECK_TIME NULL +TABLE_COLLATION NULL +CHECKSUM NULL +CREATE_OPTIONS NULL +TABLE_COMMENT VIEW +DROP VIEW test.t1_my_tablex; +SELECT table_name FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +table_name +CREATE TEMPORARY TABLE test.t1_my_tablex +ENGINE = +AS SELECT 1; +SELECT table_name, table_type FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +DROP TEMPORARY TABLE test.t1_my_tablex; +CREATE TABLE db_datadict.t1_my_tablex +ENGINE = AS +SELECT 1; +SELECT table_name FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +table_name +t1_my_tablex +DROP DATABASE db_datadict; +SELECT table_name FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +table_name +######################################################################## +# 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 +######################################################################## +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +CREATE TABLE db_datadict.t1 (f1 BIGINT) +ENGINE = ; +INSERT INTO information_schema.tables +SELECT * FROM information_schema.tables; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +UPDATE information_schema.tables SET table_schema = 'test' +WHERE table_name = 't1'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DELETE FROM information_schema.tables WHERE table_name = 't1'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +TRUNCATE information_schema.tables; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE INDEX my_idx_on_tables ON information_schema.tables(table_schema); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.tables DROP PRIMARY KEY; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.tables ADD f1 INT; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DROP TABLE information_schema.tables; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.tables RENAME db_datadict.tables; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.tables RENAME information_schema.xtables; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DROP DATABASE db_datadict; diff --git a/mysql-test/suite/funcs_1/r/is_tables_innodb.result b/mysql-test/suite/funcs_1/r/is_tables_innodb.result index 215e2c86654..f2d2e0a912a 100644 --- a/mysql-test/suite/funcs_1/r/is_tables_innodb.result +++ b/mysql-test/suite/funcs_1/r/is_tables_innodb.result @@ -1,386 +1,10 @@ DROP DATABASE IF EXISTS test1; +DROP DATABASE IF EXISTS test2; CREATE DATABASE test1; -USE test; -drop table if exists tb1 ; -create table tb1 ( -f1 char(0), -f2 char(0) binary, -f3 char(0) ascii, -f4 tinytext unicode, -f5 text, -f6 mediumtext, -f7 longtext, -f8 tinyblob, -f9 blob, -f10 mediumblob, -f11 longblob, -f12 binary, -f13 tinyint, -f14 tinyint unsigned, -f15 tinyint zerofill, -f16 tinyint unsigned zerofill, -f17 smallint, -f18 smallint unsigned, -f19 smallint zerofill, -f20 smallint unsigned zerofill, -f21 mediumint, -f22 mediumint unsigned, -f23 mediumint zerofill, -f24 mediumint unsigned zerofill, -f25 int, -f26 int unsigned, -f27 int zerofill, -f28 int unsigned zerofill, -f29 bigint, -f30 bigint unsigned, -f31 bigint zerofill, -f32 bigint unsigned zerofill, -f33 decimal, -f34 decimal unsigned, -f35 decimal zerofill, -f36 decimal unsigned zerofill not null DEFAULT 9.9, -f37 decimal (0) not null DEFAULT 9.9, -f38 decimal (64) not null DEFAULT 9.9, -f39 decimal (0) unsigned not null DEFAULT 9.9, -f40 decimal (64) unsigned not null DEFAULT 9.9, -f41 decimal (0) zerofill not null DEFAULT 9.9, -f42 decimal (64) zerofill not null DEFAULT 9.9, -f43 decimal (0) unsigned zerofill not null DEFAULT 9.9, -f44 decimal (64) unsigned zerofill not null DEFAULT 9.9, -f45 decimal (0,0) not null DEFAULT 9.9, -f46 decimal (63,30) not null DEFAULT 9.9, -f47 decimal (0,0) unsigned not null DEFAULT 9.9, -f48 decimal (63,30) unsigned not null DEFAULT 9.9, -f49 decimal (0,0) zerofill not null DEFAULT 9.9, -f50 decimal (63,30) zerofill not null DEFAULT 9.9, -f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9, -f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9, -f53 numeric not null DEFAULT 99, -f54 numeric unsigned not null DEFAULT 99, -f55 numeric zerofill not null DEFAULT 99, -f56 numeric unsigned zerofill not null DEFAULT 99, -f57 numeric (0) not null DEFAULT 99, -f58 numeric (64) not null DEFAULT 99 -) engine = innodb; -Warnings: -Note 1265 Data truncated for column 'f36' at row 1 -Note 1265 Data truncated for column 'f37' at row 1 -Note 1265 Data truncated for column 'f38' at row 1 -Note 1265 Data truncated for column 'f39' at row 1 -Note 1265 Data truncated for column 'f40' at row 1 -Note 1265 Data truncated for column 'f41' at row 1 -Note 1265 Data truncated for column 'f42' at row 1 -Note 1265 Data truncated for column 'f43' at row 1 -Note 1265 Data truncated for column 'f44' at row 1 -Note 1265 Data truncated for column 'f45' at row 1 -Note 1265 Data truncated for column 'f47' at row 1 -Note 1265 Data truncated for column 'f49' at row 1 -Note 1265 Data truncated for column 'f51' at row 1 -load data infile '/std_data_ln/funcs_1/innodb_tb1.txt' -into table tb1; -drop table if exists tb2 ; -create table tb2 ( -f59 numeric (0) unsigned, -f60 numeric (64) unsigned, -f61 numeric (0) zerofill, -f62 numeric (64) zerofill, -f63 numeric (0) unsigned zerofill, -f64 numeric (64) unsigned zerofill, -f65 numeric (0,0), -f66 numeric (63,30), -f67 numeric (0,0) unsigned, -f68 numeric (63,30) unsigned, -f69 numeric (0,0) zerofill, -f70 numeric (63,30) zerofill, -f71 numeric (0,0) unsigned zerofill, -f72 numeric (63,30) unsigned zerofill, -f73 real, -f74 real unsigned, -f75 real zerofill, -f76 real unsigned zerofill, -f77 double default 7.7, -f78 double unsigned default 7.7, -f79 double zerofill default 7.7, -f80 double unsigned zerofill default 8.8, -f81 float not null default 8.8, -f82 float unsigned not null default 8.8, -f83 float zerofill not null default 8.8, -f84 float unsigned zerofill not null default 8.8, -f85 float(0) not null default 8.8, -f86 float(23) not null default 8.8, -f87 float(0) unsigned not null default 8.8, -f88 float(23) unsigned not null default 8.8, -f89 float(0) zerofill not null default 8.8, -f90 float(23) zerofill not null default 8.8, -f91 float(0) unsigned zerofill not null default 8.8, -f92 float(23) unsigned zerofill not null default 8.8, -f93 float(24) not null default 8.8, -f94 float(53) not null default 8.8, -f95 float(24) unsigned not null default 8.8, -f96 float(53) unsigned not null default 8.8, -f97 float(24) zerofill not null default 8.8, -f98 float(53) zerofill not null default 8.8, -f99 float(24) unsigned zerofill not null default 8.8, -f100 float(53) unsigned zerofill not null default 8.8, -f101 date not null default '2000-01-01', -f102 time not null default 20, -f103 datetime not null default '2/2/2', -f104 timestamp not null default 20001231235959, -f105 year not null default 2000, -f106 year(3) not null default 2000, -f107 year(4) not null default 2000, -f108 enum("1enum","2enum") not null default "1enum", -f109 set("1set","2set") not null default "1set" -) engine = innodb; -load data infile '/std_data_ln/funcs_1/innodb_tb2.txt' -into table tb2; -drop table if exists tb3 ; -create table tb3 ( -f118 char not null DEFAULT 'a', -f119 char binary not null DEFAULT b'101', -f120 char ascii not null DEFAULT b'101', -f121 tinytext, -f122 text, -f123 mediumtext, -f124 longtext unicode, -f125 tinyblob, -f126 blob, -f127 mediumblob, -f128 longblob, -f129 binary not null DEFAULT b'101', -f130 tinyint not null DEFAULT 99, -f131 tinyint unsigned not null DEFAULT 99, -f132 tinyint zerofill not null DEFAULT 99, -f133 tinyint unsigned zerofill not null DEFAULT 99, -f134 smallint not null DEFAULT 999, -f135 smallint unsigned not null DEFAULT 999, -f136 smallint zerofill not null DEFAULT 999, -f137 smallint unsigned zerofill not null DEFAULT 999, -f138 mediumint not null DEFAULT 9999, -f139 mediumint unsigned not null DEFAULT 9999, -f140 mediumint zerofill not null DEFAULT 9999, -f141 mediumint unsigned zerofill not null DEFAULT 9999, -f142 int not null DEFAULT 99999, -f143 int unsigned not null DEFAULT 99999, -f144 int zerofill not null DEFAULT 99999, -f145 int unsigned zerofill not null DEFAULT 99999, -f146 bigint not null DEFAULT 999999, -f147 bigint unsigned not null DEFAULT 999999, -f148 bigint zerofill not null DEFAULT 999999, -f149 bigint unsigned zerofill not null DEFAULT 999999, -f150 decimal not null DEFAULT 999.999, -f151 decimal unsigned not null DEFAULT 999.17, -f152 decimal zerofill not null DEFAULT 999.999, -f153 decimal unsigned zerofill, -f154 decimal (0), -f155 decimal (64), -f156 decimal (0) unsigned, -f157 decimal (64) unsigned, -f158 decimal (0) zerofill, -f159 decimal (64) zerofill, -f160 decimal (0) unsigned zerofill, -f161 decimal (64) unsigned zerofill, -f162 decimal (0,0), -f163 decimal (63,30), -f164 decimal (0,0) unsigned, -f165 decimal (63,30) unsigned, -f166 decimal (0,0) zerofill, -f167 decimal (63,30) zerofill, -f168 decimal (0,0) unsigned zerofill, -f169 decimal (63,30) unsigned zerofill, -f170 numeric, -f171 numeric unsigned, -f172 numeric zerofill, -f173 numeric unsigned zerofill, -f174 numeric (0), -f175 numeric (64) -) engine = innodb; -Warnings: -Note 1265 Data truncated for column 'f150' at row 1 -Note 1265 Data truncated for column 'f151' at row 1 -Note 1265 Data truncated for column 'f152' at row 1 -load data infile '/std_data_ln/funcs_1/innodb_tb3.txt' -into table tb3; -drop table if exists tb4; -create table tb4 ( -f176 numeric (0) unsigned not null DEFAULT 9, -f177 numeric (64) unsigned not null DEFAULT 9, -f178 numeric (0) zerofill not null DEFAULT 9, -f179 numeric (64) zerofill not null DEFAULT 9, -f180 numeric (0) unsigned zerofill not null DEFAULT 9, -f181 numeric (64) unsigned zerofill not null DEFAULT 9, -f182 numeric (0,0) not null DEFAULT 9, -f183 numeric (63,30) not null DEFAULT 9, -f184 numeric (0,0) unsigned not null DEFAULT 9, -f185 numeric (63,30) unsigned not null DEFAULT 9, -f186 numeric (0,0) zerofill not null DEFAULT 9, -f187 numeric (63,30) zerofill not null DEFAULT 9, -f188 numeric (0,0) unsigned zerofill not null DEFAULT 9, -f189 numeric (63,30) unsigned zerofill not null DEFAULT 9, -f190 real not null DEFAULT 88.8, -f191 real unsigned not null DEFAULT 88.8, -f192 real zerofill not null DEFAULT 88.8, -f193 real unsigned zerofill not null DEFAULT 88.8, -f194 double not null DEFAULT 55.5, -f195 double unsigned not null DEFAULT 55.5, -f196 double zerofill not null DEFAULT 55.5, -f197 double unsigned zerofill not null DEFAULT 55.5, -f198 float, -f199 float unsigned, -f200 float zerofill, -f201 float unsigned zerofill, -f202 float(0), -f203 float(23), -f204 float(0) unsigned, -f205 float(23) unsigned, -f206 float(0) zerofill, -f207 float(23) zerofill, -f208 float(0) unsigned zerofill, -f209 float(23) unsigned zerofill, -f210 float(24), -f211 float(53), -f212 float(24) unsigned, -f213 float(53) unsigned, -f214 float(24) zerofill, -f215 float(53) zerofill, -f216 float(24) unsigned zerofill, -f217 float(53) unsigned zerofill, -f218 date, -f219 time, -f220 datetime, -f221 timestamp, -f222 year, -f223 year(3), -f224 year(4), -f225 enum("1enum","2enum"), -f226 set("1set","2set"), -f235 char(0) unicode, -f236 char(90), -f237 char(255) ascii, -f238 varchar(0), -f239 varchar(20000) binary, -f240 varchar(2000) unicode, -f241 char(100) unicode -) engine = innodb; -load data infile '/std_data_ln/funcs_1/innodb_tb4.txt' -into table tb4; -USE test1; -drop table if exists tb2 ; -create table tb2 ( -f59 numeric (0) unsigned, -f60 numeric (64) unsigned, -f61 numeric (0) zerofill, -f62 numeric (64) zerofill, -f63 numeric (0) unsigned zerofill, -f64 numeric (64) unsigned zerofill, -f65 numeric (0,0), -f66 numeric (63,30), -f67 numeric (0,0) unsigned, -f68 numeric (63,30) unsigned, -f69 numeric (0,0) zerofill, -f70 numeric (63,30) zerofill, -f71 numeric (0,0) unsigned zerofill, -f72 numeric (63,30) unsigned zerofill, -f73 real, -f74 real unsigned, -f75 real zerofill, -f76 real unsigned zerofill, -f77 double default 7.7, -f78 double unsigned default 7.7, -f79 double zerofill default 7.7, -f80 double unsigned zerofill default 8.8, -f81 float not null default 8.8, -f82 float unsigned not null default 8.8, -f83 float zerofill not null default 8.8, -f84 float unsigned zerofill not null default 8.8, -f85 float(0) not null default 8.8, -f86 float(23) not null default 8.8, -f87 float(0) unsigned not null default 8.8, -f88 float(23) unsigned not null default 8.8, -f89 float(0) zerofill not null default 8.8, -f90 float(23) zerofill not null default 8.8, -f91 float(0) unsigned zerofill not null default 8.8, -f92 float(23) unsigned zerofill not null default 8.8, -f93 float(24) not null default 8.8, -f94 float(53) not null default 8.8, -f95 float(24) unsigned not null default 8.8, -f96 float(53) unsigned not null default 8.8, -f97 float(24) zerofill not null default 8.8, -f98 float(53) zerofill not null default 8.8, -f99 float(24) unsigned zerofill not null default 8.8, -f100 float(53) unsigned zerofill not null default 8.8, -f101 date not null default '2000-01-01', -f102 time not null default 20, -f103 datetime not null default '2/2/2', -f104 timestamp not null default 20001231235959, -f105 year not null default 2000, -f106 year(3) not null default 2000, -f107 year(4) not null default 2000, -f108 enum("1enum","2enum") not null default "1enum", -f109 set("1set","2set") not null default "1set" -) engine = innodb; -load data infile '/std_data_ln/funcs_1/innodb_tb2.txt' -into table tb2; -USE test; -USE test; -DROP TABLE IF EXISTS t1, t2, t4, t10, t11; -CREATE TABLE t1 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -ENGINE = InnoDB; -CREATE TABLE t2 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -ENGINE = InnoDB; -CREATE TABLE t4 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -ENGINE = InnoDB; -CREATE TABLE t10 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -ENGINE = InnoDB; -CREATE TABLE t11 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -ENGINE = InnoDB; -LOAD DATA INFILE '/std_data_ln/funcs_1/t4.txt' INTO TABLE t1; -LOAD DATA INFILE '/std_data_ln/funcs_1/t4.txt' INTO TABLE t2; -LOAD DATA INFILE '/std_data_ln/funcs_1/t4.txt' INTO TABLE t4; -LOAD DATA INFILE '/std_data_ln/funcs_1/t4.txt' INTO TABLE t10; -LOAD DATA INFILE '/std_data_ln/funcs_1/t4.txt' INTO TABLE t11; -drop TABLE if exists t3; -CREATE TABLE t3 (f1 char(20), f2 char(20), f3 integer) ENGINE = InnoDB; -LOAD DATA INFILE '/std_data_ln/funcs_1/t3.txt' INTO TABLE t3; -drop database if exists test4; -CREATE database test4; -use test4; -CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) -ENGINE = InnoDB; -LOAD DATA INFILE '/std_data_ln/funcs_1/t4.txt' INTO TABLE t6; -use test; -drop TABLE if exists t7, t8; -CREATE TABLE t7 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = InnoDB; -CREATE TABLE t8 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = InnoDB; -LOAD DATA INFILE '/std_data_ln/funcs_1/t7.txt' INTO TABLE t7; -Warnings: -Warning 1265 Data truncated for column 'f3' at row 1 -Warning 1265 Data truncated for column 'f3' at row 2 -Warning 1265 Data truncated for column 'f3' at row 3 -Warning 1265 Data truncated for column 'f3' at row 4 -Warning 1265 Data truncated for column 'f3' at row 5 -Warning 1265 Data truncated for column 'f3' at row 6 -Warning 1265 Data truncated for column 'f3' at row 7 -Warning 1265 Data truncated for column 'f3' at row 8 -Warning 1265 Data truncated for column 'f3' at row 9 -Warning 1265 Data truncated for column 'f3' at row 10 -LOAD DATA INFILE '/std_data_ln/funcs_1/t7.txt' INTO TABLE t8; -Warnings: -Warning 1265 Data truncated for column 'f3' at row 1 -Warning 1265 Data truncated for column 'f3' at row 2 -Warning 1265 Data truncated for column 'f3' at row 3 -Warning 1265 Data truncated for column 'f3' at row 4 -Warning 1265 Data truncated for column 'f3' at row 5 -Warning 1265 Data truncated for column 'f3' at row 6 -Warning 1265 Data truncated for column 'f3' at row 7 -Warning 1265 Data truncated for column 'f3' at row 8 -Warning 1265 Data truncated for column 'f3' at row 9 -Warning 1265 Data truncated for column 'f3' at row 10 -drop TABLE if exists t9; -CREATE TABLE t9 (f1 int, f2 char(25), f3 int) ENGINE = InnoDB; -LOAD DATA INFILE '/std_data_ln/funcs_1/t9.txt' INTO TABLE t9; -DROP DATABASE IF EXISTS db_datadict; -CREATE DATABASE db_datadict; +CREATE DATABASE test2; +CREATE TABLE test1.t1 (f1 VARCHAR(20)) ENGINE = ; +CREATE TABLE test1.t2 (f1 VARCHAR(20)) ENGINE = ; +CREATE TABLE test2.t1 (f1 VARCHAR(20)) ENGINE = ; SELECT *, LEFT( table_comment, IF(INSTR(table_comment,'InnoDB free') = 0 @@ -394,7 +18,7 @@ FROM information_schema.tables WHERE table_schema LIKE 'test%' AND table_type = 'BASE TABLE' ORDER BY table_schema,table_name; TABLE_CATALOG NULL -TABLE_SCHEMA test +TABLE_SCHEMA test1 TABLE_NAME t1 TABLE_TYPE BASE TABLE ENGINE InnoDB @@ -417,414 +41,7 @@ TABLE_COMMENT #TC# user_comment Separator ----------------------------------------------------- TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t10 -TABLE_TYPE BASE TABLE -ENGINE InnoDB -VERSION 10 -ROW_FORMAT Compact -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t11 -TABLE_TYPE BASE TABLE -ENGINE InnoDB -VERSION 10 -ROW_FORMAT Compact -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t2 -TABLE_TYPE BASE TABLE -ENGINE InnoDB -VERSION 10 -ROW_FORMAT Compact -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t3 -TABLE_TYPE BASE TABLE -ENGINE InnoDB -VERSION 10 -ROW_FORMAT Compact -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t4 -TABLE_TYPE BASE TABLE -ENGINE InnoDB -VERSION 10 -ROW_FORMAT Compact -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t7 -TABLE_TYPE BASE TABLE -ENGINE InnoDB -VERSION 10 -ROW_FORMAT Compact -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t8 -TABLE_TYPE BASE TABLE -ENGINE InnoDB -VERSION 10 -ROW_FORMAT Compact -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t9 -TABLE_TYPE BASE TABLE -ENGINE InnoDB -VERSION 10 -ROW_FORMAT Compact -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME tb1 -TABLE_TYPE BASE TABLE -ENGINE InnoDB -VERSION 10 -ROW_FORMAT Compact -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME tb2 -TABLE_TYPE BASE TABLE -ENGINE InnoDB -VERSION 10 -ROW_FORMAT Compact -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME tb3 -TABLE_TYPE BASE TABLE -ENGINE InnoDB -VERSION 10 -ROW_FORMAT Compact -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME tb4 -TABLE_TYPE BASE TABLE -ENGINE InnoDB -VERSION 10 -ROW_FORMAT Compact -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL TABLE_SCHEMA test1 -TABLE_NAME tb2 -TABLE_TYPE BASE TABLE -ENGINE InnoDB -VERSION 10 -ROW_FORMAT Compact -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test4 -TABLE_NAME t6 -TABLE_TYPE BASE TABLE -ENGINE InnoDB -VERSION 10 -ROW_FORMAT Compact -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -DROP USER testuser1@localhost; -CREATE USER testuser1@localhost; -GRANT SELECT ON db_datadict.* TO testuser1@localhost; -# Establish connection testuser1 (user=testuser1) -SELECT *, -LEFT( table_comment, -IF(INSTR(table_comment,'InnoDB free') = 0 -AND INSTR(table_comment,'number_of_replicas') = 0, -LENGTH(table_comment), -INSTR(table_comment,'InnoDB free') -+ INSTR(table_comment,'number_of_replicas') - 1)) -AS "user_comment", -'-----------------------------------------------------' AS "Separator" -FROM information_schema.tables -WHERE table_schema LIKE 'test%' AND table_type = 'BASE TABLE' -ORDER BY table_schema,table_name; -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t1 -TABLE_TYPE BASE TABLE -ENGINE InnoDB -VERSION 10 -ROW_FORMAT Compact -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t10 -TABLE_TYPE BASE TABLE -ENGINE InnoDB -VERSION 10 -ROW_FORMAT Compact -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t11 -TABLE_TYPE BASE TABLE -ENGINE InnoDB -VERSION 10 -ROW_FORMAT Compact -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test TABLE_NAME t2 TABLE_TYPE BASE TABLE ENGINE InnoDB @@ -847,8 +64,54 @@ TABLE_COMMENT #TC# user_comment Separator ----------------------------------------------------- TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t3 +TABLE_SCHEMA test2 +TABLE_NAME t1 +TABLE_TYPE BASE TABLE +ENGINE InnoDB +VERSION 10 +ROW_FORMAT Compact +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +SHOW TABLES FROM test1; +Tables_in_test1 +t1 +t2 +SHOW TABLES FROM test2; +Tables_in_test2 +t1 +DROP USER testuser1@localhost; +CREATE USER testuser1@localhost; +GRANT SELECT ON test1.* TO testuser1@localhost; +# Establish connection testuser1 (user=testuser1) +SELECT *, +LEFT( table_comment, +IF(INSTR(table_comment,'InnoDB free') = 0 +AND INSTR(table_comment,'number_of_replicas') = 0, +LENGTH(table_comment), +INSTR(table_comment,'InnoDB free') ++ INSTR(table_comment,'number_of_replicas') - 1)) +AS "user_comment", +'-----------------------------------------------------' AS "Separator" +FROM information_schema.tables +WHERE table_schema LIKE 'test%' AND table_type = 'BASE TABLE' +ORDER BY table_schema,table_name; +TABLE_CATALOG NULL +TABLE_SCHEMA test1 +TABLE_NAME t1 TABLE_TYPE BASE TABLE ENGINE InnoDB VERSION 10 @@ -870,169 +133,8 @@ TABLE_COMMENT #TC# user_comment Separator ----------------------------------------------------- TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t4 -TABLE_TYPE BASE TABLE -ENGINE InnoDB -VERSION 10 -ROW_FORMAT Compact -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t7 -TABLE_TYPE BASE TABLE -ENGINE InnoDB -VERSION 10 -ROW_FORMAT Compact -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t8 -TABLE_TYPE BASE TABLE -ENGINE InnoDB -VERSION 10 -ROW_FORMAT Compact -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t9 -TABLE_TYPE BASE TABLE -ENGINE InnoDB -VERSION 10 -ROW_FORMAT Compact -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME tb1 -TABLE_TYPE BASE TABLE -ENGINE InnoDB -VERSION 10 -ROW_FORMAT Compact -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME tb2 -TABLE_TYPE BASE TABLE -ENGINE InnoDB -VERSION 10 -ROW_FORMAT Compact -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME tb3 -TABLE_TYPE BASE TABLE -ENGINE InnoDB -VERSION 10 -ROW_FORMAT Compact -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME tb4 +TABLE_SCHEMA test1 +TABLE_NAME t2 TABLE_TYPE BASE TABLE ENGINE InnoDB VERSION 10 @@ -1053,21 +155,13 @@ CREATE_OPTIONS #CO# TABLE_COMMENT #TC# user_comment Separator ----------------------------------------------------- +SHOW TABLES FROM test1; +Tables_in_test1 +t1 +t2 +SHOW TABLES FROM test2; +ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'test2' # Switch to connection default and close connection testuser1 DROP USER testuser1@localhost; -DROP DATABASE db_datadict; DROP DATABASE test1; -DROP DATABASE test4; -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; -DROP TABLE test.t7; -DROP TABLE test.t8; -DROP TABLE test.t9; -DROP TABLE test.t10; -DROP TABLE test.t11; -DROP TABLE test.tb1; -DROP TABLE test.tb2; -DROP TABLE test.tb3; -DROP TABLE test.tb4; +DROP DATABASE test2; diff --git a/mysql-test/suite/funcs_1/r/is_tables_is.result b/mysql-test/suite/funcs_1/r/is_tables_is.result index 78193155e22..e651047e540 100644 --- a/mysql-test/suite/funcs_1/r/is_tables_is.result +++ b/mysql-test/suite/funcs_1/r/is_tables_is.result @@ -1,5 +1,5 @@ -DROP DATABASE IF EXISTS db_datadict; -CREATE DATABASE db_datadict; +DROP DATABASE IF EXISTS test1; +CREATE DATABASE test1; SELECT *, LEFT( table_comment, IF(INSTR(table_comment,'InnoDB free') = 0 @@ -383,7 +383,7 @@ user_comment Separator ----------------------------------------------------- DROP USER testuser1@localhost; CREATE USER testuser1@localhost; -GRANT SELECT ON db_datadict.* TO testuser1@localhost; +GRANT SELECT ON test1.* TO testuser1@localhost; # Establish connection testuser1 (user=testuser1) SELECT *, LEFT( table_comment, @@ -768,4 +768,4 @@ user_comment Separator ----------------------------------------------------- # Switch to connection default and close connection testuser1 DROP USER testuser1@localhost; -DROP DATABASE db_datadict; +DROP DATABASE test1; diff --git a/mysql-test/suite/funcs_1/r/is_tables_memory.result b/mysql-test/suite/funcs_1/r/is_tables_memory.result index bfc83fa1f92..561bf6e569f 100644 --- a/mysql-test/suite/funcs_1/r/is_tables_memory.result +++ b/mysql-test/suite/funcs_1/r/is_tables_memory.result @@ -1,375 +1,11 @@ SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION'; DROP DATABASE IF EXISTS test1; +DROP DATABASE IF EXISTS test2; CREATE DATABASE test1; -USE test; -drop table if exists tb1 ; -create table tb1 ( -f1 char, -f2 char binary, -f3 char ascii, -f12 binary, -f13 tinyint, -f14 tinyint unsigned, -f15 tinyint zerofill, -f16 tinyint unsigned zerofill, -f17 smallint, -f18 smallint unsigned, -f19 smallint zerofill, -f20 smallint unsigned zerofill, -f21 mediumint, -f22 mediumint unsigned, -f23 mediumint zerofill, -f24 mediumint unsigned zerofill, -f25 int, -f26 int unsigned, -f27 int zerofill, -f28 int unsigned zerofill, -f29 bigint, -f30 bigint unsigned, -f31 bigint zerofill, -f32 bigint unsigned zerofill, -f33 decimal not null DEFAULT 9.9, -f34 decimal unsigned not null DEFAULT 9.9, -f35 decimal zerofill not null DEFAULT 9.9, -f36 decimal unsigned zerofill not null DEFAULT 9.9, -f37 decimal (0) not null DEFAULT 9.9, -f38 decimal (64) not null DEFAULT 9.9, -f39 decimal (0) unsigned not null DEFAULT 9.9, -f40 decimal (64) unsigned not null DEFAULT 9.9, -f41 decimal (0) zerofill not null DEFAULT 9.9, -f42 decimal (64) zerofill not null DEFAULT 9.9, -f43 decimal (0) unsigned zerofill not null DEFAULT 9.9, -f44 decimal (64) unsigned zerofill not null DEFAULT 9.9, -f45 decimal (0,0) not null DEFAULT 9.9, -f46 decimal (63,30) not null DEFAULT 9.9, -f47 decimal (0,0) unsigned not null DEFAULT 9.9, -f48 decimal (63,30) unsigned not null DEFAULT 9.9, -f49 decimal (0,0) zerofill not null DEFAULT 9.9, -f50 decimal (63,30) zerofill not null DEFAULT 9.9, -f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9, -f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9, -f53 numeric not null DEFAULT 99, -f54 numeric unsigned not null DEFAULT 99, -f55 numeric zerofill not null DEFAULT 99, -f56 numeric unsigned zerofill not null DEFAULT 99, -f57 numeric (0) not null DEFAULT 99, -f58 numeric (64) not null DEFAULT 99 -) engine = memory; -Warnings: -Note 1265 Data truncated for column 'f33' at row 1 -Note 1265 Data truncated for column 'f34' at row 1 -Note 1265 Data truncated for column 'f35' at row 1 -Note 1265 Data truncated for column 'f36' at row 1 -Note 1265 Data truncated for column 'f37' at row 1 -Note 1265 Data truncated for column 'f38' at row 1 -Note 1265 Data truncated for column 'f39' at row 1 -Note 1265 Data truncated for column 'f40' at row 1 -Note 1265 Data truncated for column 'f41' at row 1 -Note 1265 Data truncated for column 'f42' at row 1 -Note 1265 Data truncated for column 'f43' at row 1 -Note 1265 Data truncated for column 'f44' at row 1 -Note 1265 Data truncated for column 'f45' at row 1 -Note 1265 Data truncated for column 'f47' at row 1 -Note 1265 Data truncated for column 'f49' at row 1 -Note 1265 Data truncated for column 'f51' at row 1 -load data infile '/std_data_ln/funcs_1/memory_tb1.txt' -into table tb1; -drop table if exists tb2 ; -create table tb2 ( -f59 numeric (0) unsigned, -f60 numeric (64) unsigned, -f61 numeric (0) zerofill, -f62 numeric (64) zerofill, -f63 numeric (0) unsigned zerofill, -f64 numeric (64) unsigned zerofill, -f65 numeric (0,0), -f66 numeric (63,30), -f67 numeric (0,0) unsigned, -f68 numeric (63,30) unsigned, -f69 numeric (0,0) zerofill, -f70 numeric (63,30) zerofill, -f71 numeric (0,0) unsigned zerofill, -f72 numeric (63,30) unsigned zerofill, -f73 real, -f74 real unsigned, -f75 real zerofill, -f76 real unsigned zerofill, -f77 double default 7.7, -f78 double unsigned default 7.7, -f79 double zerofill default 7.7, -f80 double unsigned zerofill default 8.8, -f81 float not null default 8.8, -f82 float unsigned not null default 8.8, -f83 float zerofill not null default 8.8, -f84 float unsigned zerofill not null default 8.8, -f85 float(0) not null default 8.8, -f86 float(23) not null default 8.8, -f87 float(0) unsigned not null default 8.8, -f88 float(23) unsigned not null default 8.8, -f89 float(0) zerofill not null default 8.8, -f90 float(23) zerofill not null default 8.8, -f91 float(0) unsigned zerofill not null default 8.8, -f92 float(23) unsigned zerofill not null default 8.8, -f93 float(24) not null default 8.8, -f94 float(53) not null default 8.8, -f95 float(24) unsigned not null default 8.8, -f96 float(53) unsigned not null default 8.8, -f97 float(24) zerofill not null default 8.8, -f98 float(53) zerofill not null default 8.8, -f99 float(24) unsigned zerofill not null default 8.8, -f100 float(53) unsigned zerofill not null default 8.8, -f101 date not null default '2000-01-01', -f102 time not null default 20, -f103 datetime not null default '2/2/2', -f104 timestamp not null default 20001231235959, -f105 year not null default 2000, -f106 year(3) not null default 2000, -f107 year(4) not null default 2000, -f108 enum("1enum","2enum") not null default "1enum", -f109 set("1set","2set") not null default "1set" -) engine = memory; -load data infile '/std_data_ln/funcs_1/memory_tb2.txt' -into table tb2 ; -drop table if exists tb3; -create table tb3 ( -f118 char not null DEFAULT 'a', -f119 char binary not null DEFAULT b'101', -f120 char ascii not null DEFAULT b'101', -f121 char(50), -f122 char(50), -f129 binary not null DEFAULT b'101', -f130 tinyint not null DEFAULT 99, -f131 tinyint unsigned not null DEFAULT 99, -f132 tinyint zerofill not null DEFAULT 99, -f133 tinyint unsigned zerofill not null DEFAULT 99, -f134 smallint not null DEFAULT 999, -f135 smallint unsigned not null DEFAULT 999, -f136 smallint zerofill not null DEFAULT 999, -f137 smallint unsigned zerofill not null DEFAULT 999, -f138 mediumint not null DEFAULT 9999, -f139 mediumint unsigned not null DEFAULT 9999, -f140 mediumint zerofill not null DEFAULT 9999, -f141 mediumint unsigned zerofill not null DEFAULT 9999, -f142 int not null DEFAULT 99999, -f143 int unsigned not null DEFAULT 99999, -f144 int zerofill not null DEFAULT 99999, -f145 int unsigned zerofill not null DEFAULT 99999, -f146 bigint not null DEFAULT 999999, -f147 bigint unsigned not null DEFAULT 999999, -f148 bigint zerofill not null DEFAULT 999999, -f149 bigint unsigned zerofill not null DEFAULT 999999, -f150 decimal not null DEFAULT 999.999, -f151 decimal unsigned not null DEFAULT 999.17, -f152 decimal zerofill not null DEFAULT 999.999, -f153 decimal unsigned zerofill, -f154 decimal (0), -f155 decimal (64), -f156 decimal (0) unsigned, -f157 decimal (64) unsigned, -f158 decimal (0) zerofill, -f159 decimal (64) zerofill, -f160 decimal (0) unsigned zerofill, -f161 decimal (64) unsigned zerofill, -f162 decimal (0,0), -f163 decimal (63,30), -f164 decimal (0,0) unsigned, -f165 decimal (63,30) unsigned, -f166 decimal (0,0) zerofill, -f167 decimal (63,30) zerofill, -f168 decimal (0,0) unsigned zerofill, -f169 decimal (63,30) unsigned zerofill, -f170 numeric, -f171 numeric unsigned, -f172 numeric zerofill, -f173 numeric unsigned zerofill, -f174 numeric (0), -f175 numeric (64) -) engine = memory; -Warnings: -Note 1265 Data truncated for column 'f150' at row 1 -Note 1265 Data truncated for column 'f151' at row 1 -Note 1265 Data truncated for column 'f152' at row 1 -load data infile '/std_data_ln/funcs_1/memory_tb3.txt' -into table tb3; -drop table if exists tb4 ; -create table tb4 ( -f176 numeric (0) unsigned not null DEFAULT 9, -f177 numeric (64) unsigned not null DEFAULT 9, -f178 numeric (0) zerofill not null DEFAULT 9, -f179 numeric (64) zerofill not null DEFAULT 9, -f180 numeric (0) unsigned zerofill not null DEFAULT 9, -f181 numeric (64) unsigned zerofill not null DEFAULT 9, -f182 numeric (0,0) not null DEFAULT 9, -f183 numeric (63,30) not null DEFAULT 9, -f184 numeric (0,0) unsigned not null DEFAULT 9, -f185 numeric (63,30) unsigned not null DEFAULT 9, -f186 numeric (0,0) zerofill not null DEFAULT 9, -f187 numeric (63,30) zerofill not null DEFAULT 9, -f188 numeric (0,0) unsigned zerofill not null DEFAULT 9, -f189 numeric (63,30) unsigned zerofill not null DEFAULT 9, -f190 real not null DEFAULT 88.8, -f191 real unsigned not null DEFAULT 88.8, -f192 real zerofill not null DEFAULT 88.8, -f193 real unsigned zerofill not null DEFAULT 88.8, -f194 double not null DEFAULT 55.5, -f195 double unsigned not null DEFAULT 55.5, -f196 double zerofill not null DEFAULT 55.5, -f197 double unsigned zerofill not null DEFAULT 55.5, -f198 float, -f199 float unsigned, -f200 float zerofill, -f201 float unsigned zerofill, -f202 float(0), -f203 float(23), -f204 float(0) unsigned, -f205 float(23) unsigned, -f206 float(0) zerofill, -f207 float(23) zerofill, -f208 float(0) unsigned zerofill, -f209 float(23) unsigned zerofill, -f210 float(24), -f211 float(53), -f212 float(24) unsigned, -f213 float(53) unsigned, -f214 float(24) zerofill, -f215 float(53) zerofill, -f216 float(24) unsigned zerofill, -f217 float(53) unsigned zerofill, -f218 date, -f219 time, -f220 datetime, -f221 timestamp, -f222 year, -f223 year(3), -f224 year(4), -f225 enum("1enum","2enum"), -f226 set("1set","2set"), -f236 char(95) unicode, -f241 char(255) unicode, -f237 char(130) binary, -f238 varchar(25000) binary, -f239 varbinary(0), -f240 varchar(1200) unicode -) engine = memory; -load data infile '/std_data_ln/funcs_1/memory_tb4.txt' -into table tb4; -USE test1; -drop table if exists tb2 ; -create table tb2 ( -f59 numeric (0) unsigned, -f60 numeric (64) unsigned, -f61 numeric (0) zerofill, -f62 numeric (64) zerofill, -f63 numeric (0) unsigned zerofill, -f64 numeric (64) unsigned zerofill, -f65 numeric (0,0), -f66 numeric (63,30), -f67 numeric (0,0) unsigned, -f68 numeric (63,30) unsigned, -f69 numeric (0,0) zerofill, -f70 numeric (63,30) zerofill, -f71 numeric (0,0) unsigned zerofill, -f72 numeric (63,30) unsigned zerofill, -f73 real, -f74 real unsigned, -f75 real zerofill, -f76 real unsigned zerofill, -f77 double default 7.7, -f78 double unsigned default 7.7, -f79 double zerofill default 7.7, -f80 double unsigned zerofill default 8.8, -f81 float not null default 8.8, -f82 float unsigned not null default 8.8, -f83 float zerofill not null default 8.8, -f84 float unsigned zerofill not null default 8.8, -f85 float(0) not null default 8.8, -f86 float(23) not null default 8.8, -f87 float(0) unsigned not null default 8.8, -f88 float(23) unsigned not null default 8.8, -f89 float(0) zerofill not null default 8.8, -f90 float(23) zerofill not null default 8.8, -f91 float(0) unsigned zerofill not null default 8.8, -f92 float(23) unsigned zerofill not null default 8.8, -f93 float(24) not null default 8.8, -f94 float(53) not null default 8.8, -f95 float(24) unsigned not null default 8.8, -f96 float(53) unsigned not null default 8.8, -f97 float(24) zerofill not null default 8.8, -f98 float(53) zerofill not null default 8.8, -f99 float(24) unsigned zerofill not null default 8.8, -f100 float(53) unsigned zerofill not null default 8.8, -f101 date not null default '2000-01-01', -f102 time not null default 20, -f103 datetime not null default '2/2/2', -f104 timestamp not null default 20001231235959, -f105 year not null default 2000, -f106 year(3) not null default 2000, -f107 year(4) not null default 2000, -f108 enum("1enum","2enum") not null default "1enum", -f109 set("1set","2set") not null default "1set" -) engine = memory; -load data infile '/std_data_ln/funcs_1/memory_tb2.txt' -into table tb2 ; -USE test; -USE test; -DROP TABLE IF EXISTS t1, t2, t4, t10, t11; -CREATE TABLE t1 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -ENGINE = MEMORY; -CREATE TABLE t2 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -ENGINE = MEMORY; -CREATE TABLE t4 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -ENGINE = MEMORY; -CREATE TABLE t10 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -ENGINE = MEMORY; -CREATE TABLE t11 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -ENGINE = MEMORY; -LOAD DATA INFILE '/std_data_ln/funcs_1/t4.txt' INTO TABLE t1; -LOAD DATA INFILE '/std_data_ln/funcs_1/t4.txt' INTO TABLE t2; -LOAD DATA INFILE '/std_data_ln/funcs_1/t4.txt' INTO TABLE t4; -LOAD DATA INFILE '/std_data_ln/funcs_1/t4.txt' INTO TABLE t10; -LOAD DATA INFILE '/std_data_ln/funcs_1/t4.txt' INTO TABLE t11; -drop TABLE if exists t3; -CREATE TABLE t3 (f1 char(20), f2 char(20), f3 integer) ENGINE = MEMORY; -LOAD DATA INFILE '/std_data_ln/funcs_1/t3.txt' INTO TABLE t3; -drop database if exists test4; -CREATE database test4; -use test4; -CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) -ENGINE = MEMORY; -LOAD DATA INFILE '/std_data_ln/funcs_1/t4.txt' INTO TABLE t6; -use test; -drop TABLE if exists t7, t8; -CREATE TABLE t7 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = MEMORY; -CREATE TABLE t8 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = MEMORY; -LOAD DATA INFILE '/std_data_ln/funcs_1/t7.txt' INTO TABLE t7; -Warnings: -Warning 1265 Data truncated for column 'f3' at row 1 -Warning 1265 Data truncated for column 'f3' at row 2 -Warning 1265 Data truncated for column 'f3' at row 3 -Warning 1265 Data truncated for column 'f3' at row 4 -Warning 1265 Data truncated for column 'f3' at row 5 -Warning 1265 Data truncated for column 'f3' at row 6 -Warning 1265 Data truncated for column 'f3' at row 7 -Warning 1265 Data truncated for column 'f3' at row 8 -Warning 1265 Data truncated for column 'f3' at row 9 -Warning 1265 Data truncated for column 'f3' at row 10 -LOAD DATA INFILE '/std_data_ln/funcs_1/t7.txt' INTO TABLE t8; -Warnings: -Warning 1265 Data truncated for column 'f3' at row 1 -Warning 1265 Data truncated for column 'f3' at row 2 -Warning 1265 Data truncated for column 'f3' at row 3 -Warning 1265 Data truncated for column 'f3' at row 4 -Warning 1265 Data truncated for column 'f3' at row 5 -Warning 1265 Data truncated for column 'f3' at row 6 -Warning 1265 Data truncated for column 'f3' at row 7 -Warning 1265 Data truncated for column 'f3' at row 8 -Warning 1265 Data truncated for column 'f3' at row 9 -Warning 1265 Data truncated for column 'f3' at row 10 -drop TABLE if exists t9; -CREATE TABLE t9 (f1 int, f2 char(25), f3 int) ENGINE = MEMORY; -LOAD DATA INFILE '/std_data_ln/funcs_1/t9.txt' INTO TABLE t9; -DROP DATABASE IF EXISTS db_datadict; -CREATE DATABASE db_datadict; +CREATE DATABASE test2; +CREATE TABLE test1.t1 (f1 VARCHAR(20)) ENGINE = ; +CREATE TABLE test1.t2 (f1 VARCHAR(20)) ENGINE = ; +CREATE TABLE test2.t1 (f1 VARCHAR(20)) ENGINE = ; SELECT *, LEFT( table_comment, IF(INSTR(table_comment,'InnoDB free') = 0 @@ -383,7 +19,7 @@ FROM information_schema.tables WHERE table_schema LIKE 'test%' AND table_type = 'BASE TABLE' ORDER BY table_schema,table_name; TABLE_CATALOG NULL -TABLE_SCHEMA test +TABLE_SCHEMA test1 TABLE_NAME t1 TABLE_TYPE BASE TABLE ENGINE MEMORY @@ -406,414 +42,7 @@ TABLE_COMMENT #TC# user_comment Separator ----------------------------------------------------- TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t10 -TABLE_TYPE BASE TABLE -ENGINE MEMORY -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t11 -TABLE_TYPE BASE TABLE -ENGINE MEMORY -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t2 -TABLE_TYPE BASE TABLE -ENGINE MEMORY -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t3 -TABLE_TYPE BASE TABLE -ENGINE MEMORY -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t4 -TABLE_TYPE BASE TABLE -ENGINE MEMORY -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t7 -TABLE_TYPE BASE TABLE -ENGINE MEMORY -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t8 -TABLE_TYPE BASE TABLE -ENGINE MEMORY -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t9 -TABLE_TYPE BASE TABLE -ENGINE MEMORY -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME tb1 -TABLE_TYPE BASE TABLE -ENGINE MEMORY -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME tb2 -TABLE_TYPE BASE TABLE -ENGINE MEMORY -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME tb3 -TABLE_TYPE BASE TABLE -ENGINE MEMORY -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME tb4 -TABLE_TYPE BASE TABLE -ENGINE MEMORY -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL TABLE_SCHEMA test1 -TABLE_NAME tb2 -TABLE_TYPE BASE TABLE -ENGINE MEMORY -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test4 -TABLE_NAME t6 -TABLE_TYPE BASE TABLE -ENGINE MEMORY -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -DROP USER testuser1@localhost; -CREATE USER testuser1@localhost; -GRANT SELECT ON db_datadict.* TO testuser1@localhost; -# Establish connection testuser1 (user=testuser1) -SELECT *, -LEFT( table_comment, -IF(INSTR(table_comment,'InnoDB free') = 0 -AND INSTR(table_comment,'number_of_replicas') = 0, -LENGTH(table_comment), -INSTR(table_comment,'InnoDB free') -+ INSTR(table_comment,'number_of_replicas') - 1)) -AS "user_comment", -'-----------------------------------------------------' AS "Separator" -FROM information_schema.tables -WHERE table_schema LIKE 'test%' AND table_type = 'BASE TABLE' -ORDER BY table_schema,table_name; -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t1 -TABLE_TYPE BASE TABLE -ENGINE MEMORY -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t10 -TABLE_TYPE BASE TABLE -ENGINE MEMORY -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t11 -TABLE_TYPE BASE TABLE -ENGINE MEMORY -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test TABLE_NAME t2 TABLE_TYPE BASE TABLE ENGINE MEMORY @@ -836,8 +65,54 @@ TABLE_COMMENT #TC# user_comment Separator ----------------------------------------------------- TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t3 +TABLE_SCHEMA test2 +TABLE_NAME t1 +TABLE_TYPE BASE TABLE +ENGINE MEMORY +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +SHOW TABLES FROM test1; +Tables_in_test1 +t1 +t2 +SHOW TABLES FROM test2; +Tables_in_test2 +t1 +DROP USER testuser1@localhost; +CREATE USER testuser1@localhost; +GRANT SELECT ON test1.* TO testuser1@localhost; +# Establish connection testuser1 (user=testuser1) +SELECT *, +LEFT( table_comment, +IF(INSTR(table_comment,'InnoDB free') = 0 +AND INSTR(table_comment,'number_of_replicas') = 0, +LENGTH(table_comment), +INSTR(table_comment,'InnoDB free') ++ INSTR(table_comment,'number_of_replicas') - 1)) +AS "user_comment", +'-----------------------------------------------------' AS "Separator" +FROM information_schema.tables +WHERE table_schema LIKE 'test%' AND table_type = 'BASE TABLE' +ORDER BY table_schema,table_name; +TABLE_CATALOG NULL +TABLE_SCHEMA test1 +TABLE_NAME t1 TABLE_TYPE BASE TABLE ENGINE MEMORY VERSION 10 @@ -859,169 +134,8 @@ TABLE_COMMENT #TC# user_comment Separator ----------------------------------------------------- TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t4 -TABLE_TYPE BASE TABLE -ENGINE MEMORY -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t7 -TABLE_TYPE BASE TABLE -ENGINE MEMORY -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t8 -TABLE_TYPE BASE TABLE -ENGINE MEMORY -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t9 -TABLE_TYPE BASE TABLE -ENGINE MEMORY -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME tb1 -TABLE_TYPE BASE TABLE -ENGINE MEMORY -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME tb2 -TABLE_TYPE BASE TABLE -ENGINE MEMORY -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME tb3 -TABLE_TYPE BASE TABLE -ENGINE MEMORY -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME tb4 +TABLE_SCHEMA test1 +TABLE_NAME t2 TABLE_TYPE BASE TABLE ENGINE MEMORY VERSION 10 @@ -1042,21 +156,13 @@ CREATE_OPTIONS #CO# TABLE_COMMENT #TC# user_comment Separator ----------------------------------------------------- +SHOW TABLES FROM test1; +Tables_in_test1 +t1 +t2 +SHOW TABLES FROM test2; +ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'test2' # Switch to connection default and close connection testuser1 DROP USER testuser1@localhost; -DROP DATABASE db_datadict; DROP DATABASE test1; -DROP DATABASE test4; -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; -DROP TABLE test.t7; -DROP TABLE test.t8; -DROP TABLE test.t9; -DROP TABLE test.t10; -DROP TABLE test.t11; -DROP TABLE test.tb1; -DROP TABLE test.tb2; -DROP TABLE test.tb3; -DROP TABLE test.tb4; +DROP DATABASE test2; diff --git a/mysql-test/suite/funcs_1/r/is_tables_myisam.result b/mysql-test/suite/funcs_1/r/is_tables_myisam.result index 99d34818d98..0f476309303 100644 --- a/mysql-test/suite/funcs_1/r/is_tables_myisam.result +++ b/mysql-test/suite/funcs_1/r/is_tables_myisam.result @@ -1,415 +1,11 @@ SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION'; DROP DATABASE IF EXISTS test1; +DROP DATABASE IF EXISTS test2; CREATE DATABASE test1; -USE test; -drop table if exists tb1 ; -create table tb1 ( -f1 char, -f2 char binary, -f3 char ascii, -f4 tinytext unicode, -f5 text, -f6 mediumtext, -f7 longtext, -f8 tinyblob, -f9 blob, -f10 mediumblob, -f11 longblob, -f12 binary, -f13 tinyint, -f14 tinyint unsigned, -f15 tinyint zerofill, -f16 tinyint unsigned zerofill, -f17 smallint, -f18 smallint unsigned, -f19 smallint zerofill, -f20 smallint unsigned zerofill, -f21 mediumint, -f22 mediumint unsigned, -f23 mediumint zerofill, -f24 mediumint unsigned zerofill, -f25 int, -f26 int unsigned, -f27 int zerofill, -f28 int unsigned zerofill, -f29 bigint, -f30 bigint unsigned, -f31 bigint zerofill, -f32 bigint unsigned zerofill, -f33 decimal not null DEFAULT 9.9, -f34 decimal unsigned not null DEFAULT 9.9, -f35 decimal zerofill not null DEFAULT 9.9, -f36 decimal unsigned zerofill not null DEFAULT 9.9, -f37 decimal (0) not null DEFAULT 9.9, -f38 decimal (64) not null DEFAULT 9.9, -f39 decimal (0) unsigned not null DEFAULT 9.9, -f40 decimal (64) unsigned not null DEFAULT 9.9, -f41 decimal (0) zerofill not null DEFAULT 9.9, -f42 decimal (64) zerofill not null DEFAULT 9.9, -f43 decimal (0) unsigned zerofill not null DEFAULT 9.9, -f44 decimal (64) unsigned zerofill not null DEFAULT 9.9, -f45 decimal (0,0) not null DEFAULT 9.9, -f46 decimal (63,30) not null DEFAULT 9.9, -f47 decimal (0,0) unsigned not null DEFAULT 9.9, -f48 decimal (63,30) unsigned not null DEFAULT 9.9, -f49 decimal (0,0) zerofill not null DEFAULT 9.9, -f50 decimal (63,30) zerofill not null DEFAULT 9.9, -f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9, -f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9, -f53 numeric not null DEFAULT 99, -f54 numeric unsigned not null DEFAULT 99, -f55 numeric zerofill not null DEFAULT 99, -f56 numeric unsigned zerofill not null DEFAULT 99, -f57 numeric (0) not null DEFAULT 99, -f58 numeric (64) not null DEFAULT 99 -) engine = myisam; -Warnings: -Note 1265 Data truncated for column 'f33' at row 1 -Note 1265 Data truncated for column 'f34' at row 1 -Note 1265 Data truncated for column 'f35' at row 1 -Note 1265 Data truncated for column 'f36' at row 1 -Note 1265 Data truncated for column 'f37' at row 1 -Note 1265 Data truncated for column 'f38' at row 1 -Note 1265 Data truncated for column 'f39' at row 1 -Note 1265 Data truncated for column 'f40' at row 1 -Note 1265 Data truncated for column 'f41' at row 1 -Note 1265 Data truncated for column 'f42' at row 1 -Note 1265 Data truncated for column 'f43' at row 1 -Note 1265 Data truncated for column 'f44' at row 1 -Note 1265 Data truncated for column 'f45' at row 1 -Note 1265 Data truncated for column 'f47' at row 1 -Note 1265 Data truncated for column 'f49' at row 1 -Note 1265 Data truncated for column 'f51' at row 1 -load data infile '/std_data_ln/funcs_1/myisam_tb1.txt' -into table tb1; -drop table if exists tb2 ; -create table tb2 ( -f59 numeric (0) unsigned, -f60 numeric (64) unsigned, -f61 numeric (0) zerofill, -f62 numeric (64) zerofill, -f63 numeric (0) unsigned zerofill, -f64 numeric (64) unsigned zerofill, -f65 numeric (0,0), -f66 numeric (63,30), -f67 numeric (0,0) unsigned, -f68 numeric (63,30) unsigned, -f69 numeric (0,0) zerofill, -f70 numeric (63,30) zerofill, -f71 numeric (0,0) unsigned zerofill, -f72 numeric (63,30) unsigned zerofill, -f73 real, -f74 real unsigned, -f75 real zerofill, -f76 real unsigned zerofill, -f77 double default 7.7, -f78 double unsigned default 7.7, -f79 double zerofill default 7.7, -f80 double unsigned zerofill default 8.8, -f81 float not null default 8.8, -f82 float unsigned not null default 8.8, -f83 float zerofill not null default 8.8, -f84 float unsigned zerofill not null default 8.8, -f85 float(0) not null default 8.8, -f86 float(23) not null default 8.8, -f87 float(0) unsigned not null default 8.8, -f88 float(23) unsigned not null default 8.8, -f89 float(0) zerofill not null default 8.8, -f90 float(23) zerofill not null default 8.8, -f91 float(0) unsigned zerofill not null default 8.8, -f92 float(23) unsigned zerofill not null default 8.8, -f93 float(24) not null default 8.8, -f94 float(53) not null default 8.8, -f95 float(24) unsigned not null default 8.8, -f96 float(53) unsigned not null default 8.8, -f97 float(24) zerofill not null default 8.8, -f98 float(53) zerofill not null default 8.8, -f99 float(24) unsigned zerofill not null default 8.8, -f100 float(53) unsigned zerofill not null default 8.8, -f101 date not null default '2000-01-01', -f102 time not null default 20, -f103 datetime not null default '2/2/2', -f104 timestamp not null default 20001231235959, -f105 year not null default 2000, -f106 year(3) not null default 2000, -f107 year(4) not null default 2000, -f108 enum("1enum","2enum") not null default "1enum", -f109 set("1set","2set") not null default "1set", -f110 VARBINARY(64) null, -f111 VARBINARY(27) null , -f112 VARBINARY(64) null , -f113 VARBINARY(192) null , -f114 VARBINARY(192) , -f115 VARBINARY(27) null , -f116 VARBINARY(64) null, -f117 VARBINARY(192) null -) engine = myisam; -load data infile '/std_data_ln/funcs_1/myisam_tb2.txt' -into table tb2; -drop table if exists tb3 ; -create table tb3 ( -f118 char not null DEFAULT 'a', -f119 char binary not null DEFAULT b'101', -f120 char ascii not null DEFAULT b'101', -f121 tinytext, -f122 text, -f123 mediumtext, -f124 longtext unicode, -f125 tinyblob, -f126 blob, -f127 mediumblob, -f128 longblob, -f129 binary not null DEFAULT b'101', -f130 tinyint not null DEFAULT 99, -f131 tinyint unsigned not null DEFAULT 99, -f132 tinyint zerofill not null DEFAULT 99, -f133 tinyint unsigned zerofill not null DEFAULT 99, -f134 smallint not null DEFAULT 999, -f135 smallint unsigned not null DEFAULT 999, -f136 smallint zerofill not null DEFAULT 999, -f137 smallint unsigned zerofill not null DEFAULT 999, -f138 mediumint not null DEFAULT 9999, -f139 mediumint unsigned not null DEFAULT 9999, -f140 mediumint zerofill not null DEFAULT 9999, -f141 mediumint unsigned zerofill not null DEFAULT 9999, -f142 int not null DEFAULT 99999, -f143 int unsigned not null DEFAULT 99999, -f144 int zerofill not null DEFAULT 99999, -f145 int unsigned zerofill not null DEFAULT 99999, -f146 bigint not null DEFAULT 999999, -f147 bigint unsigned not null DEFAULT 999999, -f148 bigint zerofill not null DEFAULT 999999, -f149 bigint unsigned zerofill not null DEFAULT 999999, -f150 decimal not null DEFAULT 999.999, -f151 decimal unsigned not null DEFAULT 999.17, -f152 decimal zerofill not null DEFAULT 999.999, -f153 decimal unsigned zerofill, -f154 decimal (0), -f155 decimal (64), -f156 decimal (0) unsigned, -f157 decimal (64) unsigned, -f158 decimal (0) zerofill, -f159 decimal (64) zerofill, -f160 decimal (0) unsigned zerofill, -f161 decimal (64) unsigned zerofill, -f162 decimal (0,0), -f163 decimal (63,30), -f164 decimal (0,0) unsigned, -f165 decimal (63,30) unsigned, -f166 decimal (0,0) zerofill, -f167 decimal (63,30) zerofill, -f168 decimal (0,0) unsigned zerofill, -f169 decimal (63,30) unsigned zerofill, -f170 numeric, -f171 numeric unsigned, -f172 numeric zerofill, -f173 numeric unsigned zerofill, -f174 numeric (0), -f175 numeric (64) -) Engine = myisam; -Warnings: -Note 1265 Data truncated for column 'f150' at row 1 -Note 1265 Data truncated for column 'f151' at row 1 -Note 1265 Data truncated for column 'f152' at row 1 -load data infile '/std_data_ln/funcs_1/myisam_tb3.txt' -into table tb3; -drop table if exists tb4 ; -create table tb4 ( -f176 numeric (0) unsigned not null DEFAULT 9, -f177 numeric (64) unsigned not null DEFAULT 9, -f178 numeric (0) zerofill not null DEFAULT 9, -f179 numeric (64) zerofill not null DEFAULT 9, -f180 numeric (0) unsigned zerofill not null DEFAULT 9, -f181 numeric (64) unsigned zerofill not null DEFAULT 9, -f182 numeric (0,0) not null DEFAULT 9, -f183 numeric (63,30) not null DEFAULT 9, -f184 numeric (0,0) unsigned not null DEFAULT 9, -f185 numeric (63,30) unsigned not null DEFAULT 9, -f186 numeric (0,0) zerofill not null DEFAULT 9, -f187 numeric (63,30) zerofill not null DEFAULT 9, -f188 numeric (0,0) unsigned zerofill not null DEFAULT 9, -f189 numeric (63,30) unsigned zerofill not null DEFAULT 9, -f190 real not null DEFAULT 88.8, -f191 real unsigned not null DEFAULT 88.8, -f192 real zerofill not null DEFAULT 88.8, -f193 real unsigned zerofill not null DEFAULT 88.8, -f194 double not null DEFAULT 55.5, -f195 double unsigned not null DEFAULT 55.5, -f196 double zerofill not null DEFAULT 55.5, -f197 double unsigned zerofill not null DEFAULT 55.5, -f198 float, -f199 float unsigned, -f200 float zerofill, -f201 float unsigned zerofill, -f202 float(0), -f203 float(23), -f204 float(0) unsigned, -f205 float(23) unsigned, -f206 float(0) zerofill, -f207 float(23) zerofill, -f208 float(0) unsigned zerofill, -f209 float(23) unsigned zerofill, -f210 float(24), -f211 float(53), -f212 float(24) unsigned, -f213 float(53) unsigned, -f214 float(24) zerofill, -f215 float(53) zerofill, -f216 float(24) unsigned zerofill, -f217 float(53) unsigned zerofill, -f218 date, -f219 time, -f220 datetime, -f221 timestamp, -f222 year, -f223 year(3), -f224 year(4), -f225 enum("1enum","2enum"), -f226 set("1set","2set"), -f227 VARBINARY(64), -f228 VARBINARY(27), -f229 VARBINARY(64), -f230 VARBINARY(192), -f231 VARBINARY(192), -f232 VARBINARY(27), -f233 VARBINARY(64), -f234 VARBINARY(192), -f235 char(255) unicode, -f236 char(60) ascii, -f237 char(255) binary, -f238 varchar(0) binary, -f239 varbinary(1000), -f240 varchar(120) unicode, -f241 char(100) unicode, -f242 bit(30) -) engine = myisam; -load data infile '/std_data_ln/funcs_1/myisam_tb4.txt' -into table tb4; -USE test1; -drop table if exists tb2 ; -create table tb2 ( -f59 numeric (0) unsigned, -f60 numeric (64) unsigned, -f61 numeric (0) zerofill, -f62 numeric (64) zerofill, -f63 numeric (0) unsigned zerofill, -f64 numeric (64) unsigned zerofill, -f65 numeric (0,0), -f66 numeric (63,30), -f67 numeric (0,0) unsigned, -f68 numeric (63,30) unsigned, -f69 numeric (0,0) zerofill, -f70 numeric (63,30) zerofill, -f71 numeric (0,0) unsigned zerofill, -f72 numeric (63,30) unsigned zerofill, -f73 real, -f74 real unsigned, -f75 real zerofill, -f76 real unsigned zerofill, -f77 double default 7.7, -f78 double unsigned default 7.7, -f79 double zerofill default 7.7, -f80 double unsigned zerofill default 8.8, -f81 float not null default 8.8, -f82 float unsigned not null default 8.8, -f83 float zerofill not null default 8.8, -f84 float unsigned zerofill not null default 8.8, -f85 float(0) not null default 8.8, -f86 float(23) not null default 8.8, -f87 float(0) unsigned not null default 8.8, -f88 float(23) unsigned not null default 8.8, -f89 float(0) zerofill not null default 8.8, -f90 float(23) zerofill not null default 8.8, -f91 float(0) unsigned zerofill not null default 8.8, -f92 float(23) unsigned zerofill not null default 8.8, -f93 float(24) not null default 8.8, -f94 float(53) not null default 8.8, -f95 float(24) unsigned not null default 8.8, -f96 float(53) unsigned not null default 8.8, -f97 float(24) zerofill not null default 8.8, -f98 float(53) zerofill not null default 8.8, -f99 float(24) unsigned zerofill not null default 8.8, -f100 float(53) unsigned zerofill not null default 8.8, -f101 date not null default '2000-01-01', -f102 time not null default 20, -f103 datetime not null default '2/2/2', -f104 timestamp not null default 20001231235959, -f105 year not null default 2000, -f106 year(3) not null default 2000, -f107 year(4) not null default 2000, -f108 enum("1enum","2enum") not null default "1enum", -f109 set("1set","2set") not null default "1set", -f110 VARBINARY(64) null, -f111 VARBINARY(27) null , -f112 VARBINARY(64) null , -f113 VARBINARY(192) null , -f114 VARBINARY(192) , -f115 VARBINARY(27) null , -f116 VARBINARY(64) null, -f117 VARBINARY(192) null -) engine = myisam; -load data infile '/std_data_ln/funcs_1/myisam_tb2.txt' -into table tb2; -USE test; -USE test; -DROP TABLE IF EXISTS t1, t2, t4, t10, t11; -CREATE TABLE t1 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -ENGINE = MyISAM; -CREATE TABLE t2 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -ENGINE = MyISAM; -CREATE TABLE t4 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -ENGINE = MyISAM; -CREATE TABLE t10 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -ENGINE = MyISAM; -CREATE TABLE t11 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -ENGINE = MyISAM; -LOAD DATA INFILE '/std_data_ln/funcs_1/t4.txt' INTO TABLE t1; -LOAD DATA INFILE '/std_data_ln/funcs_1/t4.txt' INTO TABLE t2; -LOAD DATA INFILE '/std_data_ln/funcs_1/t4.txt' INTO TABLE t4; -LOAD DATA INFILE '/std_data_ln/funcs_1/t4.txt' INTO TABLE t10; -LOAD DATA INFILE '/std_data_ln/funcs_1/t4.txt' INTO TABLE t11; -drop TABLE if exists t3; -CREATE TABLE t3 (f1 char(20), f2 char(20), f3 integer) ENGINE = MyISAM; -LOAD DATA INFILE '/std_data_ln/funcs_1/t3.txt' INTO TABLE t3; -drop database if exists test4; -CREATE database test4; -use test4; -CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) -ENGINE = MyISAM; -LOAD DATA INFILE '/std_data_ln/funcs_1/t4.txt' INTO TABLE t6; -use test; -drop TABLE if exists t7, t8; -CREATE TABLE t7 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = MyISAM; -CREATE TABLE t8 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = MyISAM; -LOAD DATA INFILE '/std_data_ln/funcs_1/t7.txt' INTO TABLE t7; -Warnings: -Warning 1265 Data truncated for column 'f3' at row 1 -Warning 1265 Data truncated for column 'f3' at row 2 -Warning 1265 Data truncated for column 'f3' at row 3 -Warning 1265 Data truncated for column 'f3' at row 4 -Warning 1265 Data truncated for column 'f3' at row 5 -Warning 1265 Data truncated for column 'f3' at row 6 -Warning 1265 Data truncated for column 'f3' at row 7 -Warning 1265 Data truncated for column 'f3' at row 8 -Warning 1265 Data truncated for column 'f3' at row 9 -Warning 1265 Data truncated for column 'f3' at row 10 -LOAD DATA INFILE '/std_data_ln/funcs_1/t7.txt' INTO TABLE t8; -Warnings: -Warning 1265 Data truncated for column 'f3' at row 1 -Warning 1265 Data truncated for column 'f3' at row 2 -Warning 1265 Data truncated for column 'f3' at row 3 -Warning 1265 Data truncated for column 'f3' at row 4 -Warning 1265 Data truncated for column 'f3' at row 5 -Warning 1265 Data truncated for column 'f3' at row 6 -Warning 1265 Data truncated for column 'f3' at row 7 -Warning 1265 Data truncated for column 'f3' at row 8 -Warning 1265 Data truncated for column 'f3' at row 9 -Warning 1265 Data truncated for column 'f3' at row 10 -drop TABLE if exists t9; -CREATE TABLE t9 (f1 int, f2 char(25), f3 int) ENGINE = MyISAM; -LOAD DATA INFILE '/std_data_ln/funcs_1/t9.txt' INTO TABLE t9; -DROP DATABASE IF EXISTS db_datadict; -CREATE DATABASE db_datadict; +CREATE DATABASE test2; +CREATE TABLE test1.t1 (f1 VARCHAR(20)) ENGINE = ; +CREATE TABLE test1.t2 (f1 VARCHAR(20)) ENGINE = ; +CREATE TABLE test2.t1 (f1 VARCHAR(20)) ENGINE = ; SELECT *, LEFT( table_comment, IF(INSTR(table_comment,'InnoDB free') = 0 @@ -423,287 +19,11 @@ FROM information_schema.tables WHERE table_schema LIKE 'test%' AND table_type = 'BASE TABLE' ORDER BY table_schema,table_name; TABLE_CATALOG NULL -TABLE_SCHEMA test +TABLE_SCHEMA test1 TABLE_NAME t1 TABLE_TYPE BASE TABLE ENGINE MyISAM VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t10 -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t11 -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t2 -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t3 -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t4 -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t7 -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t8 -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t9 -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME tb1 -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Dynamic -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME tb2 -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Dynamic -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME tb3 -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Dynamic -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME tb4 -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 ROW_FORMAT Dynamic TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -723,7 +43,7 @@ user_comment Separator ----------------------------------------------------- TABLE_CATALOG NULL TABLE_SCHEMA test1 -TABLE_NAME tb2 +TABLE_NAME t2 TABLE_TYPE BASE TABLE ENGINE MyISAM VERSION 10 @@ -745,12 +65,12 @@ TABLE_COMMENT #TC# user_comment Separator ----------------------------------------------------- TABLE_CATALOG NULL -TABLE_SCHEMA test4 -TABLE_NAME t6 +TABLE_SCHEMA test2 +TABLE_NAME t1 TABLE_TYPE BASE TABLE ENGINE MyISAM VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT Dynamic TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -767,9 +87,16 @@ CREATE_OPTIONS #CO# TABLE_COMMENT #TC# user_comment Separator ----------------------------------------------------- +SHOW TABLES FROM test1; +Tables_in_test1 +t1 +t2 +SHOW TABLES FROM test2; +Tables_in_test2 +t1 DROP USER testuser1@localhost; CREATE USER testuser1@localhost; -GRANT SELECT ON db_datadict.* TO testuser1@localhost; +GRANT SELECT ON test1.* TO testuser1@localhost; # Establish connection testuser1 (user=testuser1) SELECT *, LEFT( table_comment, @@ -784,12 +111,12 @@ FROM information_schema.tables WHERE table_schema LIKE 'test%' AND table_type = 'BASE TABLE' ORDER BY table_schema,table_name; TABLE_CATALOG NULL -TABLE_SCHEMA test +TABLE_SCHEMA test1 TABLE_NAME t1 TABLE_TYPE BASE TABLE ENGINE MyISAM VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT Dynamic TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -807,264 +134,11 @@ TABLE_COMMENT #TC# user_comment Separator ----------------------------------------------------- TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t10 -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t11 -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test +TABLE_SCHEMA test1 TABLE_NAME t2 TABLE_TYPE BASE TABLE ENGINE MyISAM VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t3 -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t4 -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t7 -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t8 -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t9 -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME tb1 -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Dynamic -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME tb2 -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Dynamic -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME tb3 -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Dynamic -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME tb4 -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 ROW_FORMAT Dynamic TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1082,21 +156,13 @@ CREATE_OPTIONS #CO# TABLE_COMMENT #TC# user_comment Separator ----------------------------------------------------- +SHOW TABLES FROM test1; +Tables_in_test1 +t1 +t2 +SHOW TABLES FROM test2; +ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'test2' # Switch to connection default and close connection testuser1 DROP USER testuser1@localhost; -DROP DATABASE db_datadict; DROP DATABASE test1; -DROP DATABASE test4; -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; -DROP TABLE test.t7; -DROP TABLE test.t8; -DROP TABLE test.t9; -DROP TABLE test.t10; -DROP TABLE test.t11; -DROP TABLE test.tb1; -DROP TABLE test.tb2; -DROP TABLE test.tb3; -DROP TABLE test.tb4; +DROP DATABASE test2; diff --git a/mysql-test/suite/funcs_1/r/is_tables_myisam_embedded.result b/mysql-test/suite/funcs_1/r/is_tables_myisam_embedded.result new file mode 100644 index 00000000000..25c482bb73c --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_tables_myisam_embedded.result @@ -0,0 +1,192 @@ +SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION'; +DROP DATABASE IF EXISTS test1; +DROP DATABASE IF EXISTS test2; +CREATE DATABASE test1; +CREATE DATABASE test2; +CREATE TABLE test1.t1 (f1 VARCHAR(20)) ENGINE = ; +CREATE TABLE test1.t2 (f1 VARCHAR(20)) ENGINE = ; +CREATE TABLE test2.t1 (f1 VARCHAR(20)) ENGINE = ; +SELECT *, +LEFT( table_comment, +IF(INSTR(table_comment,'InnoDB free') = 0 +AND INSTR(table_comment,'number_of_replicas') = 0, +LENGTH(table_comment), +INSTR(table_comment,'InnoDB free') ++ INSTR(table_comment,'number_of_replicas') - 1)) +AS "user_comment", +'-----------------------------------------------------' AS "Separator" +FROM information_schema.tables +WHERE table_schema LIKE 'test%' AND table_type = 'BASE TABLE' +ORDER BY table_schema,table_name; +TABLE_CATALOG NULL +TABLE_SCHEMA test1 +TABLE_NAME t1 +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Dynamic +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test1 +TABLE_NAME t2 +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Dynamic +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test2 +TABLE_NAME t1 +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Dynamic +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +SHOW TABLES FROM test1; +Tables_in_test1 +t1 +t2 +SHOW TABLES FROM test2; +Tables_in_test2 +t1 +DROP USER testuser1@localhost; +CREATE USER testuser1@localhost; +GRANT SELECT ON test1.* TO testuser1@localhost; +# Establish connection testuser1 (user=testuser1) +SELECT *, +LEFT( table_comment, +IF(INSTR(table_comment,'InnoDB free') = 0 +AND INSTR(table_comment,'number_of_replicas') = 0, +LENGTH(table_comment), +INSTR(table_comment,'InnoDB free') ++ INSTR(table_comment,'number_of_replicas') - 1)) +AS "user_comment", +'-----------------------------------------------------' AS "Separator" +FROM information_schema.tables +WHERE table_schema LIKE 'test%' AND table_type = 'BASE TABLE' +ORDER BY table_schema,table_name; +TABLE_CATALOG NULL +TABLE_SCHEMA test1 +TABLE_NAME t1 +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Dynamic +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test1 +TABLE_NAME t2 +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Dynamic +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test2 +TABLE_NAME t1 +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Dynamic +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +SHOW TABLES FROM test1; +Tables_in_test1 +t1 +t2 +SHOW TABLES FROM test2; +Tables_in_test2 +t1 +# Switch to connection default and close connection testuser1 +DROP USER testuser1@localhost; +DROP DATABASE test1; +DROP DATABASE test2; diff --git a/mysql-test/suite/funcs_1/r/is_tables_mysql.result b/mysql-test/suite/funcs_1/r/is_tables_mysql.result index d407f224b7d..49a4267d170 100644 --- a/mysql-test/suite/funcs_1/r/is_tables_mysql.result +++ b/mysql-test/suite/funcs_1/r/is_tables_mysql.result @@ -1,5 +1,5 @@ -DROP DATABASE IF EXISTS db_datadict; -CREATE DATABASE db_datadict; +DROP DATABASE IF EXISTS test1; +CREATE DATABASE test1; SELECT *, LEFT( table_comment, IF(INSTR(table_comment,'InnoDB free') = 0 @@ -405,7 +405,7 @@ user_comment Users and global privileges Separator ----------------------------------------------------- DROP USER testuser1@localhost; CREATE USER testuser1@localhost; -GRANT SELECT ON db_datadict.* TO testuser1@localhost; +GRANT SELECT ON test1.* TO testuser1@localhost; # Establish connection testuser1 (user=testuser1) SELECT *, LEFT( table_comment, @@ -421,4 +421,4 @@ WHERE table_schema = 'mysql' ORDER BY table_schema,table_name; # Switch to connection default and close connection testuser1 DROP USER testuser1@localhost; -DROP DATABASE db_datadict; +DROP DATABASE test1; diff --git a/mysql-test/suite/funcs_1/r/is_tables_mysql_embedded.result b/mysql-test/suite/funcs_1/r/is_tables_mysql_embedded.result new file mode 100644 index 00000000000..e5416555189 --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_tables_mysql_embedded.result @@ -0,0 +1,815 @@ +DROP DATABASE IF EXISTS test1; +CREATE DATABASE test1; +SELECT *, +LEFT( table_comment, +IF(INSTR(table_comment,'InnoDB free') = 0 +AND INSTR(table_comment,'number_of_replicas') = 0, +LENGTH(table_comment), +INSTR(table_comment,'InnoDB free') ++ INSTR(table_comment,'number_of_replicas') - 1)) +AS "user_comment", +'-----------------------------------------------------' AS "Separator" +FROM information_schema.tables +WHERE table_schema = 'mysql' +ORDER BY table_schema,table_name; +TABLE_CATALOG NULL +TABLE_SCHEMA mysql +TABLE_NAME columns_priv +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_bin +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment Column privileges +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA mysql +TABLE_NAME db +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_bin +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment Database privileges +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA mysql +TABLE_NAME func +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_bin +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment User defined functions +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA mysql +TABLE_NAME help_category +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment help categories +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA mysql +TABLE_NAME help_keyword +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment help keywords +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA mysql +TABLE_NAME help_relation +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment keyword-topic relation +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA mysql +TABLE_NAME help_topic +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Dynamic +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment help topics +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA mysql +TABLE_NAME host +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_bin +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment Host privileges; Merged with database privileges +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA mysql +TABLE_NAME proc +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Dynamic +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment Stored Procedures +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA mysql +TABLE_NAME procs_priv +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_bin +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment Procedure privileges +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA mysql +TABLE_NAME tables_priv +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_bin +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment Table privileges +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA mysql +TABLE_NAME time_zone +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT 6 +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment Time zones +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA mysql +TABLE_NAME time_zone_leap_second +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment Leap seconds information for time zones +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA mysql +TABLE_NAME time_zone_name +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment Time zone names +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA mysql +TABLE_NAME time_zone_transition +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment Time zone transitions +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA mysql +TABLE_NAME time_zone_transition_type +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment Time zone transition types +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA mysql +TABLE_NAME user +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Dynamic +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_bin +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment Users and global privileges +Separator ----------------------------------------------------- +DROP USER testuser1@localhost; +CREATE USER testuser1@localhost; +GRANT SELECT ON test1.* TO testuser1@localhost; +# Establish connection testuser1 (user=testuser1) +SELECT *, +LEFT( table_comment, +IF(INSTR(table_comment,'InnoDB free') = 0 +AND INSTR(table_comment,'number_of_replicas') = 0, +LENGTH(table_comment), +INSTR(table_comment,'InnoDB free') ++ INSTR(table_comment,'number_of_replicas') - 1)) +AS "user_comment", +'-----------------------------------------------------' AS "Separator" +FROM information_schema.tables +WHERE table_schema = 'mysql' +ORDER BY table_schema,table_name; +TABLE_CATALOG NULL +TABLE_SCHEMA mysql +TABLE_NAME columns_priv +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_bin +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment Column privileges +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA mysql +TABLE_NAME db +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_bin +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment Database privileges +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA mysql +TABLE_NAME func +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_bin +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment User defined functions +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA mysql +TABLE_NAME help_category +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment help categories +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA mysql +TABLE_NAME help_keyword +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment help keywords +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA mysql +TABLE_NAME help_relation +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment keyword-topic relation +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA mysql +TABLE_NAME help_topic +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Dynamic +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment help topics +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA mysql +TABLE_NAME host +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_bin +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment Host privileges; Merged with database privileges +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA mysql +TABLE_NAME proc +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Dynamic +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment Stored Procedures +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA mysql +TABLE_NAME procs_priv +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_bin +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment Procedure privileges +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA mysql +TABLE_NAME tables_priv +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_bin +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment Table privileges +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA mysql +TABLE_NAME time_zone +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT 6 +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment Time zones +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA mysql +TABLE_NAME time_zone_leap_second +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment Leap seconds information for time zones +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA mysql +TABLE_NAME time_zone_name +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment Time zone names +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA mysql +TABLE_NAME time_zone_transition +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment Time zone transitions +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA mysql +TABLE_NAME time_zone_transition_type +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment Time zone transition types +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA mysql +TABLE_NAME user +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Dynamic +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_bin +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment Users and global privileges +Separator ----------------------------------------------------- +# Switch to connection default and close connection testuser1 +DROP USER testuser1@localhost; +DROP DATABASE test1; diff --git a/mysql-test/suite/funcs_1/r/is_tables_ndb.result b/mysql-test/suite/funcs_1/r/is_tables_ndb.result index 467f4566912..4ce150353c1 100644 --- a/mysql-test/suite/funcs_1/r/is_tables_ndb.result +++ b/mysql-test/suite/funcs_1/r/is_tables_ndb.result @@ -1,66 +1,10 @@ DROP DATABASE IF EXISTS test1; +DROP DATABASE IF EXISTS test2; CREATE DATABASE test1; -USE test; -USE test; -USE test; -DROP TABLE IF EXISTS t1, t2, t4, t10, t11; -CREATE TABLE t1 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -ENGINE = NDB; -CREATE TABLE t2 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -ENGINE = NDB; -CREATE TABLE t4 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -ENGINE = NDB; -CREATE TABLE t10 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -ENGINE = NDB; -CREATE TABLE t11 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -ENGINE = NDB; -LOAD DATA INFILE '/std_data_ln/funcs_1/t4.txt' INTO TABLE t1; -LOAD DATA INFILE '/std_data_ln/funcs_1/t4.txt' INTO TABLE t2; -LOAD DATA INFILE '/std_data_ln/funcs_1/t4.txt' INTO TABLE t4; -LOAD DATA INFILE '/std_data_ln/funcs_1/t4.txt' INTO TABLE t10; -LOAD DATA INFILE '/std_data_ln/funcs_1/t4.txt' INTO TABLE t11; -drop TABLE if exists t3; -CREATE TABLE t3 (f1 char(20), f2 char(20), f3 integer) ENGINE = NDB; -LOAD DATA INFILE '/std_data_ln/funcs_1/t3.txt' INTO TABLE t3; -drop database if exists test4; -CREATE database test4; -use test4; -CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) -ENGINE = NDB; -LOAD DATA INFILE '/std_data_ln/funcs_1/t4.txt' INTO TABLE t6; -use test; -drop TABLE if exists t7, t8; -CREATE TABLE t7 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = NDB; -CREATE TABLE t8 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = NDB; -LOAD DATA INFILE '/std_data_ln/funcs_1/t7.txt' INTO TABLE t7; -Warnings: -Warning 1265 Data truncated for column 'f3' at row 1 -Warning 1265 Data truncated for column 'f3' at row 2 -Warning 1265 Data truncated for column 'f3' at row 3 -Warning 1265 Data truncated for column 'f3' at row 4 -Warning 1265 Data truncated for column 'f3' at row 5 -Warning 1265 Data truncated for column 'f3' at row 6 -Warning 1265 Data truncated for column 'f3' at row 7 -Warning 1265 Data truncated for column 'f3' at row 8 -Warning 1265 Data truncated for column 'f3' at row 9 -Warning 1265 Data truncated for column 'f3' at row 10 -LOAD DATA INFILE '/std_data_ln/funcs_1/t7.txt' INTO TABLE t8; -Warnings: -Warning 1265 Data truncated for column 'f3' at row 1 -Warning 1265 Data truncated for column 'f3' at row 2 -Warning 1265 Data truncated for column 'f3' at row 3 -Warning 1265 Data truncated for column 'f3' at row 4 -Warning 1265 Data truncated for column 'f3' at row 5 -Warning 1265 Data truncated for column 'f3' at row 6 -Warning 1265 Data truncated for column 'f3' at row 7 -Warning 1265 Data truncated for column 'f3' at row 8 -Warning 1265 Data truncated for column 'f3' at row 9 -Warning 1265 Data truncated for column 'f3' at row 10 -drop TABLE if exists t9; -CREATE TABLE t9 (f1 int, f2 char(25), f3 int) ENGINE = NDB; -LOAD DATA INFILE '/std_data_ln/funcs_1/t9.txt' INTO TABLE t9; -DROP DATABASE IF EXISTS db_datadict; -CREATE DATABASE db_datadict; +CREATE DATABASE test2; +CREATE TABLE test1.t1 (f1 VARCHAR(20)) ENGINE = ; +CREATE TABLE test1.t2 (f1 VARCHAR(20)) ENGINE = ; +CREATE TABLE test2.t1 (f1 VARCHAR(20)) ENGINE = ; SELECT *, LEFT( table_comment, IF(INSTR(table_comment,'InnoDB free') = 0 @@ -74,12 +18,12 @@ FROM information_schema.tables WHERE table_schema LIKE 'test%' AND table_type = 'BASE TABLE' ORDER BY table_schema,table_name; TABLE_CATALOG NULL -TABLE_SCHEMA test +TABLE_SCHEMA test1 TABLE_NAME t1 TABLE_TYPE BASE TABLE ENGINE ndbcluster VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT Dynamic TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -97,58 +41,12 @@ TABLE_COMMENT #TC# user_comment Separator ----------------------------------------------------- TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t10 -TABLE_TYPE BASE TABLE -ENGINE ndbcluster -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t11 -TABLE_TYPE BASE TABLE -ENGINE ndbcluster -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test +TABLE_SCHEMA test1 TABLE_NAME t2 TABLE_TYPE BASE TABLE ENGINE ndbcluster VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT Dynamic TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -166,127 +64,12 @@ TABLE_COMMENT #TC# user_comment Separator ----------------------------------------------------- TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t3 +TABLE_SCHEMA test2 +TABLE_NAME t1 TABLE_TYPE BASE TABLE ENGINE ndbcluster VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t4 -TABLE_TYPE BASE TABLE -ENGINE ndbcluster -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t7 -TABLE_TYPE BASE TABLE -ENGINE ndbcluster -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t8 -TABLE_TYPE BASE TABLE -ENGINE ndbcluster -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t9 -TABLE_TYPE BASE TABLE -ENGINE ndbcluster -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test4 -TABLE_NAME t6 -TABLE_TYPE BASE TABLE -ENGINE ndbcluster -VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT Dynamic TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -303,9 +86,16 @@ CREATE_OPTIONS #CO# TABLE_COMMENT #TC# user_comment Separator ----------------------------------------------------- +SHOW TABLES FROM test1; +Tables_in_test1 +t1 +t2 +SHOW TABLES FROM test2; +Tables_in_test2 +t1 DROP USER testuser1@localhost; CREATE USER testuser1@localhost; -GRANT SELECT ON db_datadict.* TO testuser1@localhost; +GRANT SELECT ON test1.* TO testuser1@localhost; # Establish connection testuser1 (user=testuser1) SELECT *, LEFT( table_comment, @@ -320,12 +110,12 @@ FROM information_schema.tables WHERE table_schema LIKE 'test%' AND table_type = 'BASE TABLE' ORDER BY table_schema,table_name; TABLE_CATALOG NULL -TABLE_SCHEMA test +TABLE_SCHEMA test1 TABLE_NAME t1 TABLE_TYPE BASE TABLE ENGINE ndbcluster VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT Dynamic TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -343,196 +133,12 @@ TABLE_COMMENT #TC# user_comment Separator ----------------------------------------------------- TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t10 -TABLE_TYPE BASE TABLE -ENGINE ndbcluster -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t11 -TABLE_TYPE BASE TABLE -ENGINE ndbcluster -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test +TABLE_SCHEMA test1 TABLE_NAME t2 TABLE_TYPE BASE TABLE ENGINE ndbcluster VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t3 -TABLE_TYPE BASE TABLE -ENGINE ndbcluster -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t4 -TABLE_TYPE BASE TABLE -ENGINE ndbcluster -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t7 -TABLE_TYPE BASE TABLE -ENGINE ndbcluster -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t8 -TABLE_TYPE BASE TABLE -ENGINE ndbcluster -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t9 -TABLE_TYPE BASE TABLE -ENGINE ndbcluster -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test4 -TABLE_NAME t6 -TABLE_TYPE BASE TABLE -ENGINE ndbcluster -VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT Dynamic TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -549,17 +155,13 @@ CREATE_OPTIONS #CO# TABLE_COMMENT #TC# user_comment Separator ----------------------------------------------------- +SHOW TABLES FROM test1; +Tables_in_test1 +t1 +t2 +SHOW TABLES FROM test2; +ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'test2' # Switch to connection default and close connection testuser1 DROP USER testuser1@localhost; -DROP DATABASE db_datadict; DROP DATABASE test1; -DROP DATABASE test4; -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; -DROP TABLE test.t7; -DROP TABLE test.t8; -DROP TABLE test.t9; -DROP TABLE test.t10; -DROP TABLE test.t11; +DROP DATABASE test2; diff --git a/mysql-test/suite/funcs_1/r/is_triggers_embedded.result b/mysql-test/suite/funcs_1/r/is_triggers_embedded.result new file mode 100644 index 00000000000..5e0c7601da7 --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_triggers_embedded.result @@ -0,0 +1,208 @@ +SHOW TABLES FROM information_schema LIKE 'TRIGGERS'; +Tables_in_information_schema (TRIGGERS) +TRIGGERS +####################################################################### +# Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT +####################################################################### +DROP VIEW IF EXISTS test.v1; +DROP PROCEDURE IF EXISTS test.p1; +DROP FUNCTION IF EXISTS test.f1; +CREATE VIEW test.v1 AS SELECT * FROM information_schema.TRIGGERS; +CREATE PROCEDURE test.p1() SELECT * FROM information_schema.TRIGGERS; +CREATE FUNCTION test.f1() returns BIGINT +BEGIN +DECLARE counter BIGINT DEFAULT NULL; +SELECT COUNT(*) INTO counter FROM information_schema.TRIGGERS; +RETURN counter; +END// +# Attention: The printing of the next result sets is disabled. +SELECT * FROM information_schema.TRIGGERS; +SELECT * FROM test.v1; +CALL test.p1; +SELECT test.f1(); +DROP VIEW test.v1; +DROP PROCEDURE test.p1; +DROP FUNCTION test.f1; +######################################################################### +# Testcase 3.2.12.1: INFORMATION_SCHEMA.TRIGGERS layout +######################################################################### +DESCRIBE information_schema.TRIGGERS; +Field Type Null Key Default Extra +TRIGGER_CATALOG varchar(512) YES NULL +TRIGGER_SCHEMA varchar(64) NO +TRIGGER_NAME varchar(64) NO +EVENT_MANIPULATION varchar(6) NO +EVENT_OBJECT_CATALOG varchar(512) YES NULL +EVENT_OBJECT_SCHEMA varchar(64) NO +EVENT_OBJECT_TABLE varchar(64) NO +ACTION_ORDER bigint(4) NO 0 +ACTION_CONDITION longtext YES NULL +ACTION_STATEMENT longtext NO NULL +ACTION_ORIENTATION varchar(9) NO +ACTION_TIMING varchar(6) NO +ACTION_REFERENCE_OLD_TABLE varchar(64) YES NULL +ACTION_REFERENCE_NEW_TABLE varchar(64) YES NULL +ACTION_REFERENCE_OLD_ROW varchar(3) NO +ACTION_REFERENCE_NEW_ROW varchar(3) NO +CREATED datetime YES NULL +SQL_MODE longtext NO NULL +DEFINER longtext NO NULL +SHOW CREATE TABLE information_schema.TRIGGERS; +Table Create Table +TRIGGERS CREATE TEMPORARY TABLE `TRIGGERS` ( + `TRIGGER_CATALOG` varchar(512) default NULL, + `TRIGGER_SCHEMA` varchar(64) NOT NULL default '', + `TRIGGER_NAME` varchar(64) NOT NULL default '', + `EVENT_MANIPULATION` varchar(6) NOT NULL default '', + `EVENT_OBJECT_CATALOG` varchar(512) default NULL, + `EVENT_OBJECT_SCHEMA` varchar(64) NOT NULL default '', + `EVENT_OBJECT_TABLE` varchar(64) NOT NULL default '', + `ACTION_ORDER` bigint(4) NOT NULL default '0', + `ACTION_CONDITION` longtext, + `ACTION_STATEMENT` longtext NOT NULL, + `ACTION_ORIENTATION` varchar(9) NOT NULL default '', + `ACTION_TIMING` varchar(6) NOT NULL default '', + `ACTION_REFERENCE_OLD_TABLE` varchar(64) default NULL, + `ACTION_REFERENCE_NEW_TABLE` varchar(64) default NULL, + `ACTION_REFERENCE_OLD_ROW` varchar(3) NOT NULL default '', + `ACTION_REFERENCE_NEW_ROW` varchar(3) NOT NULL default '', + `CREATED` datetime default NULL, + `SQL_MODE` longtext NOT NULL, + `DEFINER` longtext NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=utf8 +SHOW COLUMNS FROM information_schema.TRIGGERS; +Field Type Null Key Default Extra +TRIGGER_CATALOG varchar(512) YES NULL +TRIGGER_SCHEMA varchar(64) NO +TRIGGER_NAME varchar(64) NO +EVENT_MANIPULATION varchar(6) NO +EVENT_OBJECT_CATALOG varchar(512) YES NULL +EVENT_OBJECT_SCHEMA varchar(64) NO +EVENT_OBJECT_TABLE varchar(64) NO +ACTION_ORDER bigint(4) NO 0 +ACTION_CONDITION longtext YES NULL +ACTION_STATEMENT longtext NO NULL +ACTION_ORIENTATION varchar(9) NO +ACTION_TIMING varchar(6) NO +ACTION_REFERENCE_OLD_TABLE varchar(64) YES NULL +ACTION_REFERENCE_NEW_TABLE varchar(64) YES NULL +ACTION_REFERENCE_OLD_ROW varchar(3) NO +ACTION_REFERENCE_NEW_ROW varchar(3) NO +CREATED datetime YES NULL +SQL_MODE longtext NO NULL +DEFINER longtext NO NULL +SELECT * FROM information_schema.triggers +WHERE trigger_catalog IS NOT NULL OR event_object_catalog IS NOT NULL +OR action_condition IS NOT NULL OR action_reference_old_table IS NOT NULL +OR action_reference_new_table IS NOT NULL; +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 +################################################################################## +# Testcase 3.2.18.2 + 3.2.18.3: INFORMATION_SCHEMA.TRIGGERS accessible information +################################################################################## +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +DROP USER 'testuser2'@'localhost'; +CREATE USER 'testuser2'@'localhost'; +DROP USER 'testuser3'@'localhost'; +CREATE USER 'testuser3'@'localhost'; +DROP USER 'testuser4'@'localhost'; +CREATE USER 'testuser4'@'localhost'; +GRANT SUPER ON *.* TO 'testuser1'@'localhost'; +GRANT SUPER ON *.* TO 'testuser3'@'localhost'; +GRANT SUPER ON *.* TO 'testuser4'@'localhost'; +GRANT ALL ON db_datadict.* TO 'testuser1'@'localhost' WITH GRANT OPTION; +# Establish connection testuser1 (user=testuser1) +CREATE TABLE db_datadict.t1 (f1 INT, f2 INT, f3 INT) +ENGINE = ; +CREATE TRIGGER trg1 BEFORE INSERT +ON db_datadict.t1 FOR EACH ROW SET @test_before = 2, new.f1 = @test_before; +GRANT ALL ON db_datadict.t1 TO 'testuser2'@'localhost'; +GRANT SELECT ON db_datadict.t1 TO 'testuser3'@'localhost'; +SELECT * FROM information_schema.triggers +WHERE trigger_name = 'trg1'; +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 +NULL db_datadict trg1 INSERT NULL db_datadict t1 0 NULL SET @test_before = 2, new.f1 = @test_before ROW BEFORE NULL NULL OLD NEW NULL testuser1@localhost +SHOW TRIGGERS FROM db_datadict; +Trigger Event Table Statement Timing Created sql_mode Definer +trg1 INSERT t1 SET @test_before = 2, new.f1 = @test_before BEFORE NULL testuser1@localhost +# Establish connection testuser2 (user=testuser2) +SHOW GRANTS FOR 'testuser2'@'localhost'; +# No SUPER Privilege --> no result for query +SELECT * FROM information_schema.triggers +WHERE trigger_name = 'trg1'; +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 +NULL db_datadict trg1 INSERT NULL db_datadict t1 0 NULL SET @test_before = 2, new.f1 = @test_before ROW BEFORE NULL NULL OLD NEW NULL testuser1@localhost +SHOW TRIGGERS FROM db_datadict; +Trigger Event Table Statement Timing Created sql_mode Definer +trg1 INSERT t1 SET @test_before = 2, new.f1 = @test_before BEFORE NULL testuser1@localhost +# Establish connection testuser3 (user=testuser3) +SHOW GRANTS FOR 'testuser3'@'localhost'; +# SUPER Privilege + SELECT Privilege on t1 --> result for query +SELECT * FROM information_schema.triggers +WHERE trigger_name = 'trg1'; +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 +NULL db_datadict trg1 INSERT NULL db_datadict t1 0 NULL SET @test_before = 2, new.f1 = @test_before ROW BEFORE NULL NULL OLD NEW NULL testuser1@localhost +SHOW TRIGGERS FROM db_datadict; +Trigger Event Table Statement Timing Created sql_mode Definer +trg1 INSERT t1 SET @test_before = 2, new.f1 = @test_before BEFORE NULL testuser1@localhost +# Establish connection testuser4 (user=testuser4) +SHOW GRANTS FOR 'testuser4'@'localhost'; +# SUPER Privilege + no SELECT Privilege on t1 --> no result for query +SELECT * FROM information_schema.triggers +WHERE trigger_name = 'trg1'; +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 +NULL db_datadict trg1 INSERT NULL db_datadict t1 0 NULL SET @test_before = 2, new.f1 = @test_before ROW BEFORE NULL NULL OLD NEW NULL testuser1@localhost +SHOW TRIGGERS FROM db_datadict; +Trigger Event Table Statement Timing Created sql_mode Definer +trg1 INSERT t1 SET @test_before = 2, new.f1 = @test_before BEFORE NULL testuser1@localhost +# Switch to connection default and close connections testuser1 - testuser4 +SELECT * FROM information_schema.triggers +WHERE trigger_name = 'trg1'; +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 +NULL db_datadict trg1 INSERT NULL db_datadict t1 0 NULL SET @test_before = 2, new.f1 = @test_before ROW BEFORE NULL NULL OLD NEW NULL testuser1@localhost +SHOW TRIGGERS FROM db_datadict; +Trigger Event Table Statement Timing Created sql_mode Definer +trg1 INSERT t1 SET @test_before = 2, new.f1 = @test_before BEFORE NULL testuser1@localhost +DROP USER 'testuser1'@'localhost'; +DROP USER 'testuser2'@'localhost'; +DROP USER 'testuser3'@'localhost'; +DROP USER 'testuser4'@'localhost'; +DROP DATABASE db_datadict; +######################################################################### +# 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.TRIGGERS modifications +######################################################################### +######################################################################## +# 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 +######################################################################## +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +CREATE TABLE db_datadict.t1 (f1 BIGINT) +ENGINE = ; +CREATE TRIGGER db_datadict.trg1 BEFORE INSERT +ON db_datadict.t1 FOR EACH ROW SET @test_before = 2, new.f1 = @test_before; +INSERT INTO information_schema.triggers +SELECT * FROM information_schema.triggers; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +UPDATE information_schema.triggers SET trigger_schema = 'test' +WHERE table_name = 't1'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DELETE FROM information_schema.triggers WHERE trigger_name = 't1'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +TRUNCATE information_schema.triggers; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE INDEX my_idx_on_triggers ON information_schema.triggers(trigger_schema); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.triggers DROP PRIMARY KEY; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.triggers ADD f1 INT; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DROP TABLE information_schema.triggers; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.triggers RENAME db_datadict.triggers; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.triggers RENAME information_schema.xtriggers; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DROP DATABASE db_datadict; diff --git a/mysql-test/suite/funcs_1/r/is_views_embedded.result b/mysql-test/suite/funcs_1/r/is_views_embedded.result new file mode 100644 index 00000000000..21f799fca79 --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_views_embedded.result @@ -0,0 +1,241 @@ +SHOW TABLES FROM information_schema LIKE 'VIEWS'; +Tables_in_information_schema (VIEWS) +VIEWS +####################################################################### +# Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT +####################################################################### +DROP VIEW IF EXISTS test.v1; +DROP PROCEDURE IF EXISTS test.p1; +DROP FUNCTION IF EXISTS test.f1; +CREATE VIEW test.v1 AS SELECT * FROM information_schema.VIEWS; +CREATE PROCEDURE test.p1() SELECT * FROM information_schema.VIEWS; +CREATE FUNCTION test.f1() returns BIGINT +BEGIN +DECLARE counter BIGINT DEFAULT NULL; +SELECT COUNT(*) INTO counter FROM information_schema.VIEWS; +RETURN counter; +END// +# Attention: The printing of the next result sets is disabled. +SELECT * FROM information_schema.VIEWS; +SELECT * FROM test.v1; +CALL test.p1; +SELECT test.f1(); +DROP VIEW test.v1; +DROP PROCEDURE test.p1; +DROP FUNCTION test.f1; +######################################################################### +# Testcase 3.2.13.1: INFORMATION_SCHEMA.VIEWS layout +######################################################################### +DESCRIBE information_schema.VIEWS; +Field Type Null Key Default Extra +TABLE_CATALOG varchar(512) YES NULL +TABLE_SCHEMA varchar(64) NO +TABLE_NAME varchar(64) NO +VIEW_DEFINITION longtext NO NULL +CHECK_OPTION varchar(8) NO +IS_UPDATABLE varchar(3) NO +DEFINER varchar(77) NO +SECURITY_TYPE varchar(7) NO +SHOW CREATE TABLE information_schema.VIEWS; +Table Create Table +VIEWS CREATE TEMPORARY TABLE `VIEWS` ( + `TABLE_CATALOG` varchar(512) default NULL, + `TABLE_SCHEMA` varchar(64) NOT NULL default '', + `TABLE_NAME` varchar(64) NOT NULL default '', + `VIEW_DEFINITION` longtext NOT NULL, + `CHECK_OPTION` varchar(8) NOT NULL default '', + `IS_UPDATABLE` varchar(3) NOT NULL default '', + `DEFINER` varchar(77) NOT NULL default '', + `SECURITY_TYPE` varchar(7) NOT NULL default '' +) ENGINE=MyISAM DEFAULT CHARSET=utf8 +SHOW COLUMNS FROM information_schema.VIEWS; +Field Type Null Key Default Extra +TABLE_CATALOG varchar(512) YES NULL +TABLE_SCHEMA varchar(64) NO +TABLE_NAME varchar(64) NO +VIEW_DEFINITION longtext NO NULL +CHECK_OPTION varchar(8) NO +IS_UPDATABLE varchar(3) NO +DEFINER varchar(77) NO +SECURITY_TYPE varchar(7) NO +SELECT table_catalog, table_schema, table_name +FROM information_schema.views WHERE table_catalog IS NOT NULL; +table_catalog table_schema table_name +################################################################################ +# Testcase 3.2.13.2 + 3.2.13.3: INFORMATION_SCHEMA.VIEWS accessible information +################################################################################ +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +DROP USER 'testuser2'@'localhost'; +CREATE USER 'testuser2'@'localhost'; +DROP USER 'test_no_views'@'localhost'; +CREATE USER 'test_no_views'@'localhost'; +CREATE TABLE db_datadict.t1(f1 INT, f2 INT, f3 INT) +ENGINE = ; +CREATE VIEW db_datadict.v_granted_to_1 AS SELECT * FROM db_datadict.t1; +CREATE VIEW db_datadict.v_granted_glob AS SELECT f2, f3 FROM db_datadict.t1; +GRANT SELECT ON db_datadict.t1 TO 'testuser1'@'localhost'; +GRANT SELECT ON db_datadict.v_granted_to_1 TO 'testuser1'@'localhost'; +GRANT SHOW VIEW, CREATE VIEW ON db_datadict.* TO 'testuser2'@'localhost'; +SELECT * FROM information_schema.views +WHERE table_schema = 'db_datadict' ORDER BY table_name; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE +NULL db_datadict v_granted_glob /* ALGORITHM=UNDEFINED */ select `db_datadict`.`t1`.`f2` AS `f2`,`db_datadict`.`t1`.`f3` AS `f3` from `db_datadict`.`t1` NONE YES root@localhost DEFINER +NULL db_datadict v_granted_to_1 /* ALGORITHM=UNDEFINED */ select `db_datadict`.`t1`.`f1` AS `f1`,`db_datadict`.`t1`.`f2` AS `f2`,`db_datadict`.`t1`.`f3` AS `f3` from `db_datadict`.`t1` NONE YES root@localhost DEFINER +# Establish connection testuser1 (user=testuser1) +SELECT * FROM information_schema.views +WHERE table_schema = 'db_datadict' ORDER BY table_name; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE +NULL db_datadict v_granted_glob NONE YES root@localhost DEFINER +NULL db_datadict v_granted_to_1 NONE YES root@localhost DEFINER +# Establish connection testuser2 (user=testuser2) +SELECT * FROM information_schema.views +WHERE table_schema = 'db_datadict' ORDER BY table_name; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE +NULL db_datadict v_granted_glob NONE YES root@localhost DEFINER +NULL db_datadict v_granted_to_1 NONE YES root@localhost DEFINER +# Establish connection test_no_views (user=test_no_views) +SELECT * FROM information_schema.views +WHERE table_schema = 'db_datadict' ORDER BY table_name; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE +NULL db_datadict v_granted_glob NONE YES root@localhost DEFINER +NULL db_datadict v_granted_to_1 NONE YES root@localhost DEFINER +# Switch to connection default and close all other connections +DROP USER 'testuser1'@'localhost'; +DROP USER 'testuser2'@'localhost'; +DROP USER 'test_no_views'@'localhost'; +DROP DATABASE db_datadict; +######################################################################### +# 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.VIEWS modifications +######################################################################### +DROP TABLE IF EXISTS test.t1_my_table; +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +CREATE TABLE test.t1_table (f1 BIGINT, f2 CHAR(10)) +DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci +ENGINE = ; +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +SELECT * FROM information_schema.views +WHERE table_name LIKE 't1_%'; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE +CREATE VIEW test.t1_view AS SELECT DISTINCT f1 FROM test.t1_table; +SELECT * FROM information_schema.views +WHERE table_name LIKE 't1_%'; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE +NULL test t1_view /* ALGORITHM=UNDEFINED */ select distinct `test`.`t1_table`.`f1` AS `f1` from `test`.`t1_table` NONE NO root@localhost DEFINER +SELECT table_name,definer FROM information_schema.views +WHERE table_name = 't1_view'; +table_name definer +t1_view root@localhost +ALTER DEFINER = 'testuser1'@'localhost' VIEW test.t1_view AS +SELECT DISTINCT f1 FROM test.t1_table; +SELECT table_name,definer,security_type FROM information_schema.views +WHERE table_name LIKE 't1_%'; +table_name definer security_type +t1_view testuser1@localhost DEFINER +ALTER DEFINER = 'root'@'localhost' SQL SECURITY INVOKER VIEW test.t1_view AS +SELECT f1 FROM test.t1_table WITH LOCAL CHECK OPTION; +SELECT table_name,definer,security_type FROM information_schema.views +WHERE table_name LIKE 't1_%'; +table_name definer security_type +t1_view root@localhost INVOKER +SELECT table_schema,table_name FROM information_schema.views +WHERE table_name LIKE 't1_%' +ORDER BY table_schema,table_name; +table_schema table_name +test t1_view +RENAME TABLE test.t1_view TO db_datadict.t1_view; +ERROR HY000: Changing schema from 'test' to 'db_datadict' is not allowed. +DROP VIEW test.t1_view; +CREATE VIEW db_datadict.t1_view AS SELECT * FROM test.t1_table; +SELECT table_schema,table_name FROM information_schema.views +WHERE table_name LIKE 't1_%' +ORDER BY table_schema,table_name; +table_schema table_name +db_datadict t1_view +SELECT table_name FROM information_schema.views +WHERE table_name LIKE 't1_%' +ORDER BY table_name; +table_name +t1_view +RENAME TABLE db_datadict.t1_view TO db_datadict.t1_viewx; +SELECT table_name FROM information_schema.views +WHERE table_name LIKE 't1_%' +ORDER BY table_name; +table_name +t1_viewx +SELECT table_name FROM information_schema.views +WHERE table_name LIKE 't1_%' +ORDER BY table_name; +table_name +t1_viewx +DROP VIEW db_datadict.t1_viewx; +SELECT table_name FROM information_schema.views +WHERE table_name LIKE 't1_%' +ORDER BY table_name; +table_name +CREATE VIEW db_datadict.t1_view AS SELECT * FROM test.t1_table; +SELECT table_name FROM information_schema.views +WHERE table_name LIKE 't1_%' +ORDER BY table_name; +table_name +t1_view +DROP TABLE test.t1_table; +SELECT table_name FROM information_schema.views +WHERE table_name LIKE 't1_%' +ORDER BY table_name; +table_name +t1_view +Warnings: +Warning 1356 View 'db_datadict.t1_view' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them +CREATE TABLE test.t1_table (f1 BIGINT, f2 CHAR(10)) +DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci COMMENT = 'Initial Comment' +ENGINE = ; +SELECT table_name FROM information_schema.views +WHERE table_name LIKE 't1_%' +ORDER BY table_name; +table_name +t1_view +DROP DATABASE db_datadict; +SELECT table_name FROM information_schema.views +WHERE table_name LIKE 't1_%' +ORDER BY table_name; +table_name +DROP USER 'testuser1'@'localhost'; +DROP TABLE test.t1_table; +######################################################################## +# 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 table are not supported +######################################################################## +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +CREATE VIEW db_datadict.v1 AS SELECT 1; +INSERT INTO information_schema.views +SELECT * FROM information_schema.views; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +INSERT INTO information_schema.views(table_schema, table_name) +VALUES ('db2', 'v2'); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +UPDATE information_schema.views SET table_schema = 'test' +WHERE table_name = 't1'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DELETE FROM information_schema.views WHERE table_name = 't1'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +TRUNCATE information_schema.views; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE INDEX my_idx_on_views ON information_schema.views(table_schema); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.views DROP PRIMARY KEY; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.views ADD f1 INT; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DROP TABLE information_schema.views; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.views RENAME db_datadict.views; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.views RENAME information_schema.xviews; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DROP DATABASE db_datadict; diff --git a/mysql-test/suite/funcs_1/storedproc/storedproc_06.inc b/mysql-test/suite/funcs_1/storedproc/storedproc_06.inc index 1a4dd9ff327..29f5bd73b04 100644 --- a/mysql-test/suite/funcs_1/storedproc/storedproc_06.inc +++ b/mysql-test/suite/funcs_1/storedproc/storedproc_06.inc @@ -1,5 +1,9 @@ #### suite/funcs_1/storedproc/storedproc_06.inc -# + +# This test cannot be used for the embedded server because we check here +# privileges. +--source include/not_embedded.inc + --source suite/funcs_1/storedproc/load_sp_tb.inc # ============================================================================== diff --git a/mysql-test/suite/funcs_1/storedproc/storedproc_10.inc b/mysql-test/suite/funcs_1/storedproc/storedproc_10.inc index 8e32a43e18f..83f5f2105c5 100644 --- a/mysql-test/suite/funcs_1/storedproc/storedproc_10.inc +++ b/mysql-test/suite/funcs_1/storedproc/storedproc_10.inc @@ -1,5 +1,9 @@ #### suite/funcs_1/storedproc/storedproc_10.inc -# + +# This test cannot be used for the embedded server because we check here +# privilgeges. +--source include/not_embedded.inc + --source suite/funcs_1/storedproc/load_sp_tb.inc # ============================================================================== diff --git a/mysql-test/suite/funcs_1/t/disabled.def b/mysql-test/suite/funcs_1/t/disabled.def index c9b7c8fb4dd..e9b85036259 100644 --- a/mysql-test/suite/funcs_1/t/disabled.def +++ b/mysql-test/suite/funcs_1/t/disabled.def @@ -14,3 +14,4 @@ innodb_storedproc: (changes of WL#2984, using storeproc_nn instead) memory_storedproc: (changes of WL#2984, using storeproc_nn instead) myisam_storedproc: (changes of WL#2984, using storeproc_nn instead) ndb_trig_1011ext: Bug#32656 NDB: Duplicate key error aborts transaction in handler. Doesn't talk back to SQL +is_tables_ndb: Bug#37198 user without any right on schema sees NDB table diff --git a/mysql-test/suite/funcs_1/t/innodb_trig_frkey.test b/mysql-test/suite/funcs_1/t/innodb_trig_frkey.test index 57298fd9056..32da61ec876 100644 --- a/mysql-test/suite/funcs_1/t/innodb_trig_frkey.test +++ b/mysql-test/suite/funcs_1/t/innodb_trig_frkey.test @@ -7,10 +7,4 @@ # 2. Set $engine_type let $engine_type= innodb; -# Create some objects needed in many testcases -USE test; ---source suite/funcs_1/include/innodb_tb3.inc - --source suite/funcs_1/triggers/trig_frkey.inc -DROP TABLE test.tb3; - diff --git a/mysql-test/suite/funcs_1/t/is_basics_mixed.test b/mysql-test/suite/funcs_1/t/is_basics_mixed.test index 30aeba12915..235b91c67d0 100644 --- a/mysql-test/suite/funcs_1/t/is_basics_mixed.test +++ b/mysql-test/suite/funcs_1/t/is_basics_mixed.test @@ -11,6 +11,19 @@ # Create this script based on older scripts and new code. # +# This test is strict adjusted to the behaviour of the non embedded server. +# Example of common differences between both servers: +# USE information_schema; CREATE VIEW tables AS SELECT 'garbage'; +# non embedded server: +# - errname ER_DBACCESS_DENIED_ERROR +# - ERROR 42000: Access denied for user 'root'@'localhost' to +# database 'information_schema' +# embedded server: +# - errno 1 +# - Can't create/write to file +# '.../var/master-data/information_schema/tables.frm~ +--source include/not_embedded.inc + --source suite/funcs_1/datadict/datadict.pre # $engine_type must point to storage engine which is all time available. diff --git a/mysql-test/suite/funcs_1/t/is_cml_innodb.test b/mysql-test/suite/funcs_1/t/is_cml_innodb.test new file mode 100644 index 00000000000..a37e5c8d94c --- /dev/null +++ b/mysql-test/suite/funcs_1/t/is_cml_innodb.test @@ -0,0 +1,41 @@ +# suite/funcs_1/t/is_cml_innodb.test +# +# Check the content of information_schema.columns about tables using +# UNICODE columns. +# Variant for storage engine InnoDB +# +# Author: +# 2008-06-04 mleich Create this script based on older scripts and new code. +# + +--source include/have_ucs2.inc + +# This test cannot be used for the embedded server because privileges +# are expected within result sets. +--source include/not_embedded.inc + +--source include/have_innodb.inc +let $engine_type= InnoDB; +USE test; +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings +eval CREATE TABLE t1 +( + f1 CHAR UNICODE, + f2 CHAR(0) UNICODE, + f3 CHAR(10) UNICODE, + f5 VARCHAR(0) UNICODE, + f6 VARCHAR(255) UNICODE, + f7 VARCHAR(260) UNICODE, + f8 TEXT UNICODE, + f9 TINYTEXT UNICODE, + f10 MEDIUMTEXT UNICODE, + f11 LONGTEXT UNICODE +) ENGINE = $engine_type; + +# We look only for the tables created here. +let $my_where = WHERE table_schema LIKE 'test%'; +--source suite/funcs_1/datadict/columns.inc + +DROP TABLE t1; diff --git a/mysql-test/suite/funcs_1/t/is_cml_memory.test b/mysql-test/suite/funcs_1/t/is_cml_memory.test new file mode 100644 index 00000000000..41602ac863a --- /dev/null +++ b/mysql-test/suite/funcs_1/t/is_cml_memory.test @@ -0,0 +1,37 @@ +# suite/funcs_1/t/is_cml_memory.test +# +# Check the content of information_schema.columns about tables using +# UNICODE columns. +# Variant for storage engine MEMORY +# +# Author: +# 2008-06-04 mleich Create this script based on older scripts and new code. +# + +--source include/have_ucs2.inc + +# This test cannot be used for the embedded server because privileges +# are expected within result sets. +--source include/not_embedded.inc + +let $engine_type= MEMORY; +SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION'; +USE test; +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings +eval CREATE TABLE t1 +( + f1 CHAR UNICODE, + f2 CHAR(0) UNICODE, + f3 CHAR(10) UNICODE, + f5 VARCHAR(0) UNICODE, + f6 VARCHAR(255) UNICODE, + f7 VARCHAR(260) UNICODE +) ENGINE = $engine_type; + +# We look only for the tables created here. +let $my_where = WHERE table_schema LIKE 'test%'; +--source suite/funcs_1/datadict/columns.inc + +DROP TABLE t1; diff --git a/mysql-test/suite/funcs_1/t/is_cml_myisam.test b/mysql-test/suite/funcs_1/t/is_cml_myisam.test new file mode 100644 index 00000000000..904cefbd4d7 --- /dev/null +++ b/mysql-test/suite/funcs_1/t/is_cml_myisam.test @@ -0,0 +1,41 @@ +# suite/funcs_1/t/is_cml_myisam.test +# +# Check the content of information_schema.columns about tables using +# UNICODE columns. +# Variant for storage engine MyISAM +# +# Author: +# 2008-06-04 mleich Create this script based on older scripts and new code. +# + +--source include/have_ucs2.inc + +# This test cannot be used for the embedded server because privileges +# are expected within result sets. +--source include/not_embedded.inc + +let $engine_type= MyISAM; +SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION'; +USE test; +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings +eval CREATE TABLE t1 +( + f1 CHAR UNICODE, + f2 CHAR(0) UNICODE, + f3 CHAR(10) UNICODE, + f5 VARCHAR(0) UNICODE, + f6 VARCHAR(255) UNICODE, + f7 VARCHAR(260) UNICODE, + f8 TEXT UNICODE, + f9 TINYTEXT UNICODE, + f10 MEDIUMTEXT UNICODE, + f11 LONGTEXT UNICODE +) ENGINE = $engine_type; + +# We look only for the tables created here. +let $my_where = WHERE table_schema LIKE 'test%'; +--source suite/funcs_1/datadict/columns.inc + +DROP TABLE t1; diff --git a/mysql-test/suite/funcs_1/t/is_cml_ndb.test b/mysql-test/suite/funcs_1/t/is_cml_ndb.test new file mode 100644 index 00000000000..55899be830b --- /dev/null +++ b/mysql-test/suite/funcs_1/t/is_cml_ndb.test @@ -0,0 +1,41 @@ +# suite/funcs_1/t/is_cml_ndb.test +# +# Check the content of information_schema.columns about tables using +# UNICODE columns. +# Variant for storage engine NDB +# +# Author: +# 2008-06-04 mleich Create this script based on older scripts and new code. +# + +--source include/have_ucs2.inc + +# This test cannot be used for the embedded server because privileges +# are expected within result sets. +--source include/not_embedded.inc + +--source include/have_ndb.inc +let $engine_type= NDB; +USE test; +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings +eval CREATE TABLE t1 +( + f1 CHAR UNICODE, + f2 CHAR(0) UNICODE, + f3 CHAR(10) UNICODE, + f5 VARCHAR(0) UNICODE, + f6 VARCHAR(255) UNICODE, + f7 VARCHAR(260) UNICODE, + f8 TEXT UNICODE, + f9 TINYTEXT UNICODE, + f10 MEDIUMTEXT UNICODE, + f11 LONGTEXT UNICODE +) ENGINE = $engine_type; + +# We look only for the tables created here. +let $my_where = WHERE table_schema LIKE 'test%'; +--source suite/funcs_1/datadict/columns.inc + +DROP TABLE t1; diff --git a/mysql-test/suite/funcs_1/t/is_column_privileges.test b/mysql-test/suite/funcs_1/t/is_column_privileges.test index 8f125051060..cb8c50c01b7 100644 --- a/mysql-test/suite/funcs_1/t/is_column_privileges.test +++ b/mysql-test/suite/funcs_1/t/is_column_privileges.test @@ -16,7 +16,9 @@ # Create this script based on older scripts and new code. # -# --source suite/funcs_1/datadict/datadict.pre +# This test cannot be used for the embedded server because we check here +# privileges. +--source include/not_embedded.inc let $engine_type = MEMORY; let $other_engine_type = MyISAM; diff --git a/mysql-test/suite/funcs_1/t/is_column_privileges_is_mysql_test.test b/mysql-test/suite/funcs_1/t/is_column_privileges_is_mysql_test.test index 3ed8597e309..33269fe929c 100644 --- a/mysql-test/suite/funcs_1/t/is_column_privileges_is_mysql_test.test +++ b/mysql-test/suite/funcs_1/t/is_column_privileges_is_mysql_test.test @@ -8,7 +8,10 @@ # testsuite funcs_1 # Create this script based on older scripts and new code. # -# + +# This test cannot be used for the embedded server because we check here +# privileges. +--source include/not_embedded.inc --echo ############################################################################## --echo # Testcases 3.2.9.2+3.2.9.3 INFORMATION_SCHEMA.SCHEMATA accessible information diff --git a/mysql-test/suite/funcs_1/t/is_columns.test b/mysql-test/suite/funcs_1/t/is_columns.test index 385de733ac3..efb52acd48c 100644 --- a/mysql-test/suite/funcs_1/t/is_columns.test +++ b/mysql-test/suite/funcs_1/t/is_columns.test @@ -16,7 +16,9 @@ # Create this script based on older scripts and new code. # -# --source suite/funcs_1/datadict/datadict.pre +# This test cannot be used for the embedded server because we check here +# privileges. +--source include/not_embedded.inc let $engine_type = MEMORY; let $other_engine_type = MyISAM; diff --git a/mysql-test/suite/funcs_1/t/is_columns_innodb.test b/mysql-test/suite/funcs_1/t/is_columns_innodb.test index 04b9f8354e4..7d8ca9a3a8e 100644 --- a/mysql-test/suite/funcs_1/t/is_columns_innodb.test +++ b/mysql-test/suite/funcs_1/t/is_columns_innodb.test @@ -10,6 +10,10 @@ # Create this script based on older scripts and new code. # +# This test cannot be used for the embedded server because we check here +# privileges. +--source include/not_embedded.inc + --source include/have_innodb.inc let $engine_type= InnoDB; --source suite/funcs_1/datadict/datadict_load.inc diff --git a/mysql-test/suite/funcs_1/t/is_columns_is.test b/mysql-test/suite/funcs_1/t/is_columns_is.test index 41a7d180be8..743b11d7bff 100644 --- a/mysql-test/suite/funcs_1/t/is_columns_is.test +++ b/mysql-test/suite/funcs_1/t/is_columns_is.test @@ -2,6 +2,9 @@ # # Check the content of information_schema.columns about tables within # the database information_schema. +# Variant for the non embedded server +# The expected results must equal is_columns_is_embedded except that +# columns.privileges are not empty. # # Note: The INFORMATION_SCHEMA table PROFILING is optional (exists in MySQL # Community version only) and therefore we exclude it from retrieval. @@ -12,8 +15,8 @@ # Create this script based on older scripts and new code. # +--source include/not_embedded.inc + let $my_where = WHERE table_schema = 'information_schema' AND table_name <> 'profiling'; -# --source suite/funcs_1/datadict/datadict.pre --source suite/funcs_1/datadict/columns.inc - diff --git a/mysql-test/suite/funcs_1/t/is_columns_is_embedded.test b/mysql-test/suite/funcs_1/t/is_columns_is_embedded.test new file mode 100644 index 00000000000..7bc29624f1d --- /dev/null +++ b/mysql-test/suite/funcs_1/t/is_columns_is_embedded.test @@ -0,0 +1,23 @@ +# suite/funcs_1/t/is_columns_is_embedded.test +# +# Check the content of information_schema.columns about tables within +# the database information_schema. +# Variant for the embedded server +# The expected results must equal is_columns_is except that +# columns.privileges is empty. +# +# Note: The INFORMATION_SCHEMA table PROFILING is optional (exists in MySQL +# Community version only) and therefore we exclude it from retrieval. +# +# Author: +# 2008-06-06 mleich Create this variant for the embedded server +# + +if (`SELECT VERSION() NOT LIKE '%embedded%'`) +{ + --skip Test requires: embedded server +} + +let $my_where = WHERE table_schema = 'information_schema' +AND table_name <> 'profiling'; +--source suite/funcs_1/datadict/columns.inc diff --git a/mysql-test/suite/funcs_1/t/is_columns_memory.test b/mysql-test/suite/funcs_1/t/is_columns_memory.test index 6cbf3b298b4..b76325d114a 100644 --- a/mysql-test/suite/funcs_1/t/is_columns_memory.test +++ b/mysql-test/suite/funcs_1/t/is_columns_memory.test @@ -10,6 +10,10 @@ # Create this script based on older scripts and new code. # +# This test cannot be used for the embedded server because we check here +# privileges. +--source include/not_embedded.inc + let $engine_type= MEMORY; SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION'; --source suite/funcs_1/datadict/datadict_load.inc diff --git a/mysql-test/suite/funcs_1/t/is_columns_myisam.test b/mysql-test/suite/funcs_1/t/is_columns_myisam.test index d98cd0347c6..09b5b088489 100644 --- a/mysql-test/suite/funcs_1/t/is_columns_myisam.test +++ b/mysql-test/suite/funcs_1/t/is_columns_myisam.test @@ -2,7 +2,9 @@ # # Check the content of information_schema.columns about tables within # the databases created by the user. -# Variant for storage engine MyISAM +# Variant for storage engine MyISAM and the non embedded server +# The expected results must equal is_columns_myisam_embedded except that +# that the privilege system works (affects some result sets). # # Author: # 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of @@ -10,6 +12,7 @@ # Create this script based on older scripts and new code. # +--source include/not_embedded.inc let $engine_type= MyISAM; SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION'; --source suite/funcs_1/datadict/datadict_load.inc diff --git a/mysql-test/suite/funcs_1/t/is_columns_myisam_embedded.test b/mysql-test/suite/funcs_1/t/is_columns_myisam_embedded.test new file mode 100644 index 00000000000..0d5f1a72cdb --- /dev/null +++ b/mysql-test/suite/funcs_1/t/is_columns_myisam_embedded.test @@ -0,0 +1,30 @@ +# suite/funcs_1/t/is_columns_myisam_embedded.test +# +# Check the content of information_schema.columns about tables within +# the databases created by the user. +# Variant for storage engine MyISAM and the embedded server +# The expected results must equal is_columns_myisam except that all users +# have all privileges (affects some result sets). +# +# Author: +# 2008-06-06 mleich Create this this variant for the embedded server. +# + +let $value= query_get_value(SHOW VARIABLES LIKE 'version_compile_os',Value,1); +if (`SELECT '$value' LIKE 'apple-darwin%'`) +{ + skip Bug#37380 Test funcs_1.is_columns_myisam_embedded fails on OS X; +} +if (`SELECT VERSION() NOT LIKE '%embedded%'`) +{ + --skip Test requires: embedded server +} +let $engine_type= MyISAM; +SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION'; +--source suite/funcs_1/datadict/datadict_load.inc + +# We look only for the tables created by datadict_load.inc. +let $my_where = WHERE table_schema LIKE 'test%'; +--source suite/funcs_1/datadict/columns.inc + +--source suite/funcs_1/include/cleanup.inc diff --git a/mysql-test/suite/funcs_1/t/is_columns_mysql.test b/mysql-test/suite/funcs_1/t/is_columns_mysql.test index 26539d0c8e0..a844e18f5be 100644 --- a/mysql-test/suite/funcs_1/t/is_columns_mysql.test +++ b/mysql-test/suite/funcs_1/t/is_columns_mysql.test @@ -2,6 +2,9 @@ # # Check the content of information_schema.columns about tables within # the database mysql. +# Variant for the non embedded server +# The expected results must equal is_columns_mysql_embedded except that +# columns.privileges are not empty. # # Author: # 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of @@ -9,5 +12,7 @@ # Create this script based on older scripts and new code. # +--source include/not_embedded.inc + let $my_where = WHERE table_schema = 'mysql'; --source suite/funcs_1/datadict/columns.inc diff --git a/mysql-test/suite/funcs_1/t/is_columns_mysql_embedded.test b/mysql-test/suite/funcs_1/t/is_columns_mysql_embedded.test new file mode 100644 index 00000000000..d1ed45425ec --- /dev/null +++ b/mysql-test/suite/funcs_1/t/is_columns_mysql_embedded.test @@ -0,0 +1,19 @@ +# suite/funcs_1/t/is_columns_mysql_embedded.test +# +# Check the content of information_schema.columns about tables within +# the database mysql. +# Variant for the embedded server +# The expected results must equal is_columns_mysql except that +# columns.privileges is empty. +# +# Author: +# 2008-06-06 mleich Create this variant for the embedded server +# + +if (`SELECT VERSION() NOT LIKE '%embedded%'`) +{ + --skip Test requires: embedded server +} + +let $my_where = WHERE table_schema = 'mysql'; +--source suite/funcs_1/datadict/columns.inc diff --git a/mysql-test/suite/funcs_1/t/is_columns_ndb.test b/mysql-test/suite/funcs_1/t/is_columns_ndb.test index 960e5f079bb..3d2a8d7aa5b 100644 --- a/mysql-test/suite/funcs_1/t/is_columns_ndb.test +++ b/mysql-test/suite/funcs_1/t/is_columns_ndb.test @@ -10,6 +10,10 @@ # Create this script based on older scripts and new code. # +# This test cannot be used for the embedded server because we check here +# privileges. +--source include/not_embedded.inc + --source include/have_ndb.inc let $engine_type= ndb; --source suite/funcs_1/datadict/datadict_load.inc diff --git a/mysql-test/suite/funcs_1/t/is_key_column_usage.test b/mysql-test/suite/funcs_1/t/is_key_column_usage.test index 219277c8645..a6bd8fc3989 100644 --- a/mysql-test/suite/funcs_1/t/is_key_column_usage.test +++ b/mysql-test/suite/funcs_1/t/is_key_column_usage.test @@ -2,13 +2,12 @@ # # Check the layout of information_schema.key_column_usage and the impact of # CREATE/ALTER/DROP TABLE/VIEW/SCHEMA/COLUMN ... on it. +# Variant for the non embedded server +# The expected results must equal is_key_column_usage_embedded except that +# that the privilege system works (affects some result sets). # -# Note: -# This test is not intended -# - to show information about the all time existing tables -# within the databases information_schema and mysql -# - for checking storage engine properties -# Therefore please do not alter $engine_type and $other_engine_type. +# There is detailed information about this test within +# suite/funcs_1/datadict/is_key_column_usage.inc # # Author: # 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of @@ -16,329 +15,5 @@ # Create this script based on older scripts and new code. # -# --source suite/funcs_1/datadict/datadict.pre - -let $engine_type = MEMORY; -# let $other_engine_type = MyISAM; - -let $is_table = KEY_COLUMN_USAGE; - -# The table INFORMATION_SCHEMA.KEY_COLUMN_USAGE must exist -eval SHOW TABLES FROM information_schema LIKE '$is_table'; - ---echo ####################################################################### ---echo # Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT ---echo ####################################################################### -# Ensure that every INFORMATION_SCHEMA table can be queried with a SELECT -# statement, just as if it were an ordinary user-defined table. -# ---source suite/funcs_1/datadict/is_table_query.inc - - ---echo ######################################################################### ---echo # Testcase 3.2.7.1: INFORMATION_SCHEMA.KEY_COLUMN_USAGE layout ---echo ######################################################################### -# Ensure that the INFORMATION_SCHEMA.KEY_COLUMN_USAGE table has the following -# columns, in the following order: -# -# CONSTRAINT_CATALOG (always shows NULL), -# CONSTRAINT_SCHEMA (shows the database, or schema, in which an accessible -# constraint, or index, resides), -# CONSTRAINT_NAME (shows the name of the accessible constraint), -# TABLE_CATALOG (always shows NULL), -# TABLE_SCHEMA (shows the database, or schema, in which the table constrained -# by that constraint resides), -# TABLE_NAME (shows the name of the table constrained by the constraint), -# COLUMN_NAME (shows the name of a column that is the index key, or part of -# the index key), -# ORDINAL_POSITION (shows the ordinal position of the column within the -# constraint index), -# POSITION_IN_UNIQUE_CONSTRAINT (shows, for a foreign key column, the ordinal -# position of the referenced column within the referenced unique index; -# otherwise NULL). -# added with 5.0.6: -# REFERENCED_TABLE_SCHEMA, -# REFERENCED_TABLE_NAME, -# REFERENCED_COLUMN_NAME -# ---source suite/funcs_1/datadict/datadict_bug_12777.inc -eval DESCRIBE information_schema.$is_table; ---source suite/funcs_1/datadict/datadict_bug_12777.inc -eval SHOW CREATE TABLE information_schema.$is_table; ---source suite/funcs_1/datadict/datadict_bug_12777.inc -eval SHOW COLUMNS FROM information_schema.$is_table; - -# Note: Retrieval of information within information_schema.columns about -# information_schema.key_column_usage is in is_columns_is.test. - -# Show that CONSTRAINT_CATALOG and TABLE_CATALOG are always NULL. -SELECT constraint_catalog, constraint_schema, constraint_name, table_catalog, - table_schema, table_name, column_name -FROM information_schema.key_column_usage -WHERE constraint_catalog IS NOT NULL OR table_catalog IS NOT NULL; - - ---echo ######################################################################################## ---echo # Testcase 3.2.7.2 + 3.2.7.3: INFORMATION_SCHEMA.KEY_COLUMN_USAGE accessible information ---echo ######################################################################################## -# 3.2.7.2: Ensure that the table shows the relevant information on every column, defined to -# be part of an index key, which is accessible to the current user or to PUBLIC. -# 3.2.7.3: Ensure that the table does not show any information on any indexed column that is -# not accessible to the current user or PUBLIC. -# ---disable_warnings -DROP DATABASE IF EXISTS db_datadict; ---enable_warnings -CREATE DATABASE db_datadict; - ---error 0,ER_CANNOT_USER -DROP USER 'testuser1'@'localhost'; -CREATE USER 'testuser1'@'localhost'; ---error 0,ER_CANNOT_USER -DROP USER 'testuser2'@'localhost'; -CREATE USER 'testuser2'@'localhost'; - -USE db_datadict; - ---replace_result $engine_type -eval -CREATE TABLE t1_1 - (f1 INT NOT NULL, PRIMARY KEY(f1), - f2 INT, INDEX f2_ind(f2)) -ENGINE = $engine_type; -GRANT SELECT ON t1_1 to 'testuser1'@'localhost'; - ---replace_result $engine_type -eval -CREATE TABLE t1_2 - (f1 INT NOT NULL, PRIMARY KEY(f1), - f2 INT, INDEX f2_ind(f2)) -ENGINE = $engine_type; -GRANT SELECT ON t1_2 to 'testuser2'@'localhost'; -#FIXME: add foreign keys - -let $select= SELECT * FROM information_schema.key_column_usage -WHERE table_name LIKE 't1_%' -ORDER BY constraint_catalog, constraint_schema, constraint_name, - table_catalog, table_schema, table_name, ordinal_position; - -# show view of user root -eval $select; - ---echo # Establish connection testuser1 (user=testuser1) ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (testuser1, localhost, testuser1, , db_datadict); -eval $select; - ---echo # Establish connection testuser2 (user=testuser2) ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (testuser2, localhost, testuser2, , db_datadict); -eval $select; - -# Cleanup ---echo # Switch to connection default and close connections testuser1, testuser2 -connection default; -disconnect testuser1; -disconnect testuser2; -DROP USER 'testuser1'@'localhost'; -DROP USER 'testuser2'@'localhost'; -DROP TABLE t1_1; -DROP TABLE t1_2; -DROP DATABASE IF EXISTS db_datadict; - - ---echo ######################################################################################## ---echo # Testcase 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.KEY_COLUMN_USAGE modifications ---echo ######################################################################################## -# 3.2.1.13: Ensure that the creation of any new database object (e.g. table or -# column) automatically inserts all relevant information on that -# object into every appropriate INFORMATION_SCHEMA table. -# 3.2.1.14: Ensure that the alteration of any existing database object -# automatically updates all relevant information on that object in -# every appropriate INFORMATION_SCHEMA table. -# 3.2.1.15: Ensure that the dropping of any existing database object -# automatically deletes all relevant information on that object from -# every appropriate INFORMATION_SCHEMA table. -# ---disable_warnings -DROP DATABASE IF EXISTS db_datadict; -DROP TABLE IF EXISTS test.t1_my_table; ---enable_warnings -CREATE DATABASE db_datadict; - -SELECT table_name FROM information_schema.key_column_usage -WHERE table_name LIKE 't1_my_table%'; ---replace_result $engine_type -eval -CREATE TABLE test.t1_my_table - (f1 CHAR(12), f2 TIMESTAMP, f4 BIGINT, PRIMARY KEY(f1,f2)) -DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci -ENGINE = $engine_type; -# Settings used in CREATE TABLE must be visible -# in information_schema.key_column_usage. ---vertical_results -SELECT * FROM information_schema.key_column_usage -WHERE table_name = 't1_my_table'; ---horizontal_results -# -# Check modification of TABLE_NAME -SELECT DISTINCT table_name FROM information_schema.key_column_usage -WHERE table_name LIKE 't1_my_table%'; -RENAME TABLE test.t1_my_table TO test.t1_my_tablex; -SELECT DISTINCT table_name FROM information_schema.key_column_usage -WHERE table_name LIKE 't1_my_table%'; -# -# Check modification of TABLE_SCHEMA -SELECT DISTINCT table_schema,table_name FROM information_schema.key_column_usage -WHERE table_name = 't1_my_tablex'; -RENAME TABLE test.t1_my_tablex TO db_datadict.t1_my_tablex; -SELECT DISTINCT table_schema,table_name FROM information_schema.key_column_usage -WHERE table_name = 't1_my_tablex'; -# -# Check modification of COLUMN_NAME -SELECT DISTINCT table_name, column_name FROM information_schema.key_column_usage -WHERE table_name = 't1_my_tablex' -ORDER BY table_name, column_name; -ALTER TABLE db_datadict.t1_my_tablex CHANGE COLUMN f1 first_col CHAR(12); -SELECT DISTINCT table_name, column_name FROM information_schema.key_column_usage -WHERE table_name = 't1_my_tablex' -ORDER BY table_name, column_name; -# -# Note: The size of the column list and the not very selective qualification -# is intended. I want to see that the schema names are equal and -# all records about 't1_my_tablex'. -let $my_select = SELECT constraint_schema, constraint_name, table_schema, -table_name, column_name, ordinal_position -FROM information_schema.key_column_usage -WHERE table_name = 't1_my_tablex' -ORDER BY constraint_schema, constraint_name, table_schema, - table_name, ordinal_position; -# -# Check ADD INDEX being not UNIQUE (does not show up in key_column_usage) -eval $my_select; -CREATE INDEX f2 ON db_datadict.t1_my_tablex(f2); -eval $my_select; -DROP INDEX f2 ON db_datadict.t1_my_tablex; -# -# Check ADD UNIQUE INDEX without name explicit assigned -eval $my_select; -ALTER TABLE db_datadict.t1_my_tablex ADD UNIQUE (f2); -eval $my_select; -DROP INDEX f2 ON db_datadict.t1_my_tablex; -# -# Check ADD UNIQUE INDEX with name explicit assigned -eval $my_select; -ALTER TABLE db_datadict.t1_my_tablex ADD UNIQUE my_idx (f2); -eval $my_select; -DROP INDEX my_idx ON db_datadict.t1_my_tablex; -eval $my_select; -ALTER TABLE db_datadict.t1_my_tablex ADD UNIQUE my_idx (f4,first_col); -eval $my_select; -# -# Check DROP COLUMN -eval $my_select; -ALTER TABLE db_datadict.t1_my_tablex -DROP COLUMN first_col; -eval $my_select; -# -# Check impact of DROP TABLE -SELECT table_name, column_name -FROM information_schema.key_column_usage -WHERE table_name = 't1_my_tablex' -ORDER BY table_name, column_name; -DROP TABLE db_datadict.t1_my_tablex; -SELECT table_name, column_name -FROM information_schema.key_column_usage -WHERE table_name = 't1_my_tablex'; -# -# No UNIQUE CONSTRAINT -> no entry in key_column_usage -SELECT table_name FROM information_schema.key_column_usage -WHERE table_name = 't1_my_tablex'; ---replace_result $engine_type -eval -CREATE TABLE db_datadict.t1_my_tablex -ENGINE = $engine_type AS -SELECT 1 AS f1; -SELECT table_name FROM information_schema.key_column_usage -WHERE table_name = 't1_my_tablex'; -# UNIQUE CONSTRAINT -> entry in key_column_usage -ALTER TABLE db_datadict.t1_my_tablex ADD PRIMARY KEY(f1); -SELECT table_name FROM information_schema.key_column_usage -WHERE table_name = 't1_my_tablex'; -# -# Check impact of DROP SCHEMA -SELECT table_name FROM information_schema.key_column_usage -WHERE table_name = 't1_my_tablex'; -DROP DATABASE db_datadict; -SELECT table_name FROM information_schema.key_column_usage -WHERE table_name = 't1_my_tablex'; -# - - ---echo ######################################################################## ---echo # Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and ---echo # DDL on INFORMATION_SCHEMA table are not supported ---echo ######################################################################## -# 3.2.1.3: Ensure that no user may execute an INSERT statement on any -# INFORMATION_SCHEMA table. -# 3.2.1.4: Ensure that no user may execute an UPDATE statement on any -# INFORMATION_SCHEMA table. -# 3.2.1.5: Ensure that no user may execute a DELETE statement on any -# INFORMATION_SCHEMA table. -# 3.2.1.8: Ensure that no user may create an index on an -# INFORMATION_SCHEMA table. -# 3.2.1.9: Ensure that no user may alter the definition of an -# INFORMATION_SCHEMA table. -# 3.2.1.10: Ensure that no user may drop an INFORMATION_SCHEMA table. -# 3.2.1.11: Ensure that no user may move an INFORMATION_SCHEMA table to any -# other database. -# 3.2.1.12: Ensure that no user may directly add to, alter, or delete any data -# in an INFORMATION_SCHEMA table. -# ---disable_warnings -DROP DATABASE IF EXISTS db_datadict; -DROP TABLE IF EXISTS db_datadict.t1; ---enable_warnings -CREATE DATABASE db_datadict; ---replace_result $engine_type -eval -CREATE TABLE db_datadict.t1 (f1 BIGINT) -ENGINE = $engine_type; - ---error ER_DBACCESS_DENIED_ERROR -INSERT INTO information_schema.key_column_usage - (constraint_schema, constraint_name, table_name) -VALUES ( 'mysql', 'primary', 'db'); ---error ER_DBACCESS_DENIED_ERROR -INSERT INTO information_schema.key_column_usage -SELECT * FROM information_schema.key_column_usage; - ---error ER_DBACCESS_DENIED_ERROR -UPDATE information_schema.key_column_usage -SET table_name = 'db1' WHERE constraint_name = 'primary'; - ---error ER_DBACCESS_DENIED_ERROR -DELETE FROM information_schema.key_column_usage WHERE table_name = 't1'; ---error ER_DBACCESS_DENIED_ERROR -TRUNCATE information_schema.key_column_usage; - ---error ER_DBACCESS_DENIED_ERROR -CREATE INDEX i3 ON information_schema.key_column_usage(table_name); - ---error ER_DBACCESS_DENIED_ERROR -ALTER TABLE information_schema.key_column_usage ADD f1 INT; - ---error ER_DBACCESS_DENIED_ERROR -DROP TABLE information_schema.key_column_usage; - ---error ER_DBACCESS_DENIED_ERROR -ALTER TABLE information_schema.key_column_usage -RENAME db_datadict.key_column_usage; ---error ER_DBACCESS_DENIED_ERROR -ALTER TABLE information_schema.key_column_usage -RENAME information_schema.xkey_column_usage; - -# Cleanup -DROP TABLE db_datadict.t1; -DROP DATABASE db_datadict; - +--source include/not_embedded.inc +--source suite/funcs_1/datadict/is_key_column_usage.inc diff --git a/mysql-test/suite/funcs_1/t/is_key_column_usage_embedded.test b/mysql-test/suite/funcs_1/t/is_key_column_usage_embedded.test new file mode 100644 index 00000000000..ccdc8dec3d9 --- /dev/null +++ b/mysql-test/suite/funcs_1/t/is_key_column_usage_embedded.test @@ -0,0 +1,20 @@ +# suite/funcs_1/t/is_key_column_usage_embedded.test +# +# Check the layout of information_schema.key_column_usage and the impact of +# CREATE/ALTER/DROP TABLE/VIEW/SCHEMA/COLUMN ... on it. +# Variant for the embedded server +# The expected results must equal is_key_column_usage except that all users +# have all privileges (affects some result sets). +# +# There is detailed information about this test within +# suite/funcs_1/datadict/is_key_column_usage.inc +# +# Author: +# 2008-06-06 mleich Create this this variant for the embedded server. +# + +if (`SELECT VERSION() NOT LIKE '%embedded%'`) +{ + --skip Test requires: embedded server +} +--source suite/funcs_1/datadict/is_key_column_usage.inc diff --git a/mysql-test/suite/funcs_1/t/is_routines.test b/mysql-test/suite/funcs_1/t/is_routines.test index 5f015b8624b..30a0e02c23a 100644 --- a/mysql-test/suite/funcs_1/t/is_routines.test +++ b/mysql-test/suite/funcs_1/t/is_routines.test @@ -2,13 +2,12 @@ # # Check the layout of information_schema.routines and the impact of # CREATE/ALTER/DROP PROCEDURE/FUNCTION ... on it. +# Variant for the non embedded server +# The expected results must equal is_routines_embedded except that +# that the privilege system works (affects some result sets). # -# Note: -# This test is not intended -# - to show information about the all time existing routines (there are no -# in the moment) within the databases information_schema and mysql -# - for checking storage engine properties -# Therefore please do not alter $engine_type and $other_engine_type. +# There is detailed information about this test within +# suite/funcs_1/datadict/is_routines.inc # # Author: # 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of @@ -16,456 +15,5 @@ # Create this script based on older scripts and new code. # -# --source suite/funcs_1/datadict/datadict.pre - -let $engine_type = MEMORY; -let $other_engine_type = MyISAM; - -let $is_table = ROUTINES; - -# The table INFORMATION_SCHEMA.TABLES must exist -eval SHOW TABLES FROM information_schema LIKE '$is_table'; - ---echo ####################################################################### ---echo # Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT ---echo ####################################################################### -# Ensure that every INFORMATION_SCHEMA table can be queried with a SELECT -# statement, just as if it were an ordinary user-defined table. -# ---source suite/funcs_1/datadict/is_table_query.inc - - ---echo ######################################################################### ---echo # Testcase 3.2.8.1: INFORMATION_SCHEMA.ROUTINES layout ---echo ######################################################################### -# Ensure that the INFORMATION_SCHEMA.ROUTINES table has the following columns, -# in the following order: -# -# SPECIFIC_NAME (shows the name of an accessible stored procedure, or routine), -# ROUTINE_CATALOG (always shows NULL), -# ROUTINE_SCHEMA (shows the database, or schema, in which the routine resides), -# ROUTINE_NAME (shows the same stored procedure name), -# ROUTINE_TYPE (shows whether the stored procedure is a procedure or a function), -# DTD_IDENTIFIER (shows, for a function, the complete data type definition of -# the value the function will return; otherwise NULL), -# ROUTINE_BODY (shows the language in which the stored procedure is written; -# currently always SQL), -# ROUTINE_DEFINITION (shows as much of the routine body as is possible in the -# allotted space), -# EXTERNAL_NAME (always shows NULL), -# EXTERNAL_LANGUAGE (always shows NULL), -# PARAMETER_STYLE (shows the routine's parameter style; always SQL), -# IS_DETERMINISTIC (shows whether the routine is deterministic), -# SQL_DATA_ACCESS (shows the routine's defined sql-data-access clause value), -# SQL_PATH (always shows NULL), -# SECURITY_TYPE (shows whether the routine's defined security_type is 'definer' -# or 'invoker'), -# CREATED (shows the timestamp of the time the routine was created), -# LAST_ALTERED (shows the timestamp of the time the routine was last altered), -# SQL_MODE (shows the sql_mode setting at the time the routine was created), -# ROUTINE_COMMENT (shows the comment, if any, defined for the routine; -# otherwise NULL), -# DEFINER (shows the user who created the routine). -# ---source suite/funcs_1/datadict/datadict_bug_12777.inc -eval DESCRIBE information_schema.$is_table; ---source suite/funcs_1/datadict/datadict_bug_12777.inc -eval SHOW CREATE TABLE information_schema.$is_table; ---source suite/funcs_1/datadict/datadict_bug_12777.inc -eval SHOW COLUMNS FROM information_schema.$is_table; - -USE test; ---disable_warnings -DROP PROCEDURE IF EXISTS sp_for_routines; -DROP FUNCTION IF EXISTS function_for_routines; ---enable_warnings -CREATE PROCEDURE sp_for_routines() SELECT 'db_datadict'; -CREATE FUNCTION function_for_routines() RETURNS INT RETURN 0; - -# Show that the column values of -# ROUTINE_CATALOG, EXTERNAL_NAME, EXTERNAL_LANGUAGE, SQL_PATH are always NULL -# and -# ROUTINE_BODY, PARAMETER_STYLE are 'SQL' -# and -# SPECIFIC_NAME = ROUTINE_NAME. -SELECT specific_name,routine_catalog,routine_schema,routine_name,routine_type, - routine_body,external_name,external_language,parameter_style,sql_path -FROM information_schema.routines -WHERE routine_catalog IS NOT NULL OR external_name IS NOT NULL - OR external_language IS NOT NULL OR sql_path IS NOT NULL - OR routine_body <> 'SQL' OR parameter_style <> 'SQL' - OR specific_name <> routine_name; - -DROP PROCEDURE sp_for_routines; -DROP FUNCTION function_for_routines; - - ---echo ################################################################################ ---echo # Testcase 3.2.8.2 + 3.2.8.3: INFORMATION_SCHEMA.ROUTINES accessible information ---echo ################################################################################ -# 3.2.8.2: Ensure that the table shows the relevant information on every SQL-invoked -# routine (i.e. stored procedure) which is accessible to the current user -# or to PUBLIC. -# 3.2.8.3: Ensure that the table does not show any information on any stored procedure -# that is not accessible to the current user or PUBLIC. -# ---disable_warnings -DROP DATABASE IF EXISTS db_datadict; -DROP DATABASE IF EXISTS db_datadict_2; ---enable_warnings - -CREATE DATABASE db_datadict; -USE db_datadict; ---replace_result $other_engine_type -eval -CREATE TABLE res_6_408002_1(f1 CHAR(3), f2 TEXT(25), f3 DATE, f4 INT) -ENGINE = $other_engine_type; -INSERT INTO res_6_408002_1(f1, f2, f3, f4) -VALUES('abc', 'xyz', '1989-11-09', 0815); ---disable_warnings -DROP PROCEDURE IF EXISTS sp_6_408002_1; ---enable_warnings -delimiter //; -CREATE PROCEDURE sp_6_408002_1() -BEGIN - SELECT * FROM db_datadict.res_6_408002_1; -END// -delimiter ;// - -CREATE DATABASE db_datadict_2; -USE db_datadict_2; ---replace_result $other_engine_type -eval -CREATE TABLE res_6_408002_2(f1 CHAR(3), f2 TEXT(25), f3 DATE, f4 INT) -ENGINE = $other_engine_type; -INSERT INTO res_6_408002_2(f1, f2, f3, f4) -VALUES('abc', 'xyz', '1990-10-03', 4711); ---disable_warnings -DROP PROCEDURE IF EXISTS sp_6_408002_2; ---enable_warnings -delimiter //; -CREATE PROCEDURE sp_6_408002_2() -BEGIN - SELECT * FROM db_datadict_2.res_6_408002_2; -END// -delimiter ;// - ---error 0,ER_CANNOT_USER -DROP USER 'testuser1'@'localhost'; -CREATE USER 'testuser1'@'localhost'; ---error 0,ER_CANNOT_USER -DROP USER 'testuser2'@'localhost'; -CREATE USER 'testuser2'@'localhost'; ---error 0,ER_CANNOT_USER -DROP USER 'testuser3'@'localhost'; -CREATE USER 'testuser3'@'localhost'; - - -GRANT SELECT ON db_datadict_2.* TO 'testuser1'@'localhost'; -GRANT EXECUTE ON db_datadict_2.* TO 'testuser1'@'localhost'; - -GRANT EXECUTE ON db_datadict.* TO 'testuser1'@'localhost'; -GRANT SELECT ON db_datadict.* TO 'testuser2'@'localhost'; - -GRANT EXECUTE ON PROCEDURE db_datadict_2.sp_6_408002_2 -TO 'testuser2'@'localhost'; -GRANT EXECUTE ON db_datadict_2.* TO 'testuser2'@'localhost'; -FLUSH PRIVILEGES; - ---echo # Establish connection testuser1 (user=testuser1) ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (testuser1, localhost, testuser1, , db_datadict); ---replace_column 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss" -SELECT * FROM information_schema.routines; - ---echo # Establish connection testuser2 (user=testuser2) ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (testuser2, localhost, testuser2, , db_datadict); ---replace_column 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss" -SELECT * FROM information_schema.routines; - ---echo # Establish connection testuser3 (user=testuser3) ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (testuser3, localhost, testuser3, , test); ---replace_column 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss" -SELECT * FROM information_schema.routines; - -# Cleanup ---echo # Switch to connection default and close connections testuser1,testuser2,testuser3 -connection default; -disconnect testuser1; -disconnect testuser2; -disconnect testuser3; - -DROP USER 'testuser1'@'localhost'; -DROP USER 'testuser2'@'localhost'; -DROP USER 'testuser3'@'localhost'; - -USE test; -DROP DATABASE db_datadict; -DROP DATABASE db_datadict_2; - - ---echo ######################################################################### ---echo # 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.ROUTINES modifications ---echo ######################################################################### -# 3.2.1.13: Ensure that the creation of any new database object (e.g. table or -# column) automatically inserts all relevant information on that -# object into every appropriate INFORMATION_SCHEMA table. -# 3.2.1.14: Ensure that the alteration of any existing database object -# automatically updates all relevant information on that object in -# every appropriate INFORMATION_SCHEMA table. -# 3.2.1.15: Ensure that the dropping of any existing database object -# automatically deletes all relevant information on that object from -# every appropriate INFORMATION_SCHEMA table. -# -# Some more tests are in t/information_schema_routines.test which exists -# in MySQL 5.1 and up only. -# ---disable_warnings -DROP DATABASE IF EXISTS db_datadict; ---enable_warnings -CREATE DATABASE db_datadict; - -SELECT * FROM information_schema.routines WHERE routine_schema = 'db_datadict'; -USE db_datadict; -CREATE PROCEDURE sp_for_routines() SELECT 'db_datadict'; -CREATE FUNCTION function_for_routines() RETURNS INT RETURN 0; ---vertical_results ---replace_column 16 17 -SELECT * FROM information_schema.routines WHERE routine_schema = 'db_datadict' -ORDER BY routine_name; ---horizontal_results - -ALTER PROCEDURE sp_for_routines SQL SECURITY INVOKER; -ALTER FUNCTION function_for_routines COMMENT 'updated comments'; ---vertical_results ---replace_column 16 17 -SELECT * FROM information_schema.routines WHERE routine_schema = 'db_datadict' -ORDER BY routine_name; ---horizontal_results - -DROP PROCEDURE sp_for_routines; -DROP FUNCTION function_for_routines; -SELECT * FROM information_schema.routines WHERE routine_schema = 'db_datadict'; - -CREATE PROCEDURE sp_for_routines() SELECT 'db_datadict'; -CREATE FUNCTION function_for_routines() RETURNS INT RETURN 0; ---vertical_results ---replace_column 16 17 -SELECT * FROM information_schema.routines WHERE routine_schema = 'db_datadict' -ORDER BY routine_name; ---horizontal_results -use test; -DROP DATABASE db_datadict; -SELECT * FROM information_schema.routines WHERE routine_schema = 'db_datadict'; - - ---echo ######################################################################### ---echo # 3.2.8.4: INFORMATION_SCHEMA.ROUTINES routine body too big for ---echo # ROUTINE_DEFINITION column ---echo ######################################################################### -# Ensure that a stored procedure with a routine body that is too large to fit -# into the INFORMATION_SCHEMA.ROUTINES.ROUTINE_DEFINITION column correctly shows -# as much of the information as is possible within the allotted size. -# ---disable_warnings -DROP DATABASE IF EXISTS db_datadict; ---enable_warnings -CREATE DATABASE db_datadict; -USE db_datadict; -# ---replace_result $other_engine_type -eval -CREATE TABLE db_datadict.res_6_408004_1 - (f1 LONGTEXT , f2 MEDIUMINT , f3 LONGBLOB , f4 REAL , f5 YEAR) -ENGINE = $other_engine_type; -INSERT INTO db_datadict.res_6_408004_1 -VALUES ('abc', 98765 , 99999999 , 98765, 10); -# ---replace_result $other_engine_type -eval -CREATE TABLE db_datadict.res_6_408004_2 - (f1 LONGTEXT , f2 MEDIUMINT , f3 LONGBLOB , f4 REAL , f5 YEAR) -ENGINE = $other_engine_type; -INSERT INTO db_datadict.res_6_408004_2 -VALUES ('abc', 98765 , 99999999 , 98765, 10); - ---echo # Checking the max. possible length of (currently) 4 GByte is not ---echo # in this environment here. - -delimiter //; -CREATE PROCEDURE sp_6_408004 () -BEGIN - DECLARE done INTEGER DEFAULt 0; - DECLARE variable_number_1 LONGTEXT; - DECLARE variable_number_2 MEDIUMINT; - DECLARE variable_number_3 LONGBLOB; - DECLARE variable_number_4 REAL; - DECLARE variable_number_5 YEAR; - DECLARE cursor_number_1 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10; - DECLARE cursor_number_2 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10; - DECLARE cursor_number_3 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10; - DECLARE cursor_number_4 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10; - DECLARE cursor_number_5 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10; - DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done = 1; - BEGIN - OPEN cursor_number_1; - WHILE done <> 1 DO - FETCH cursor_number_1 - INTO variable_number_1, variable_number_2, variable_number_3, - variable_number_4, variable_number_5; - IF done <> 0 THEN - INSERT INTO res_6_408004_2 - VALUES (variable_number_1, variable_number_2, variable_number_3, - variable_number_4, variable_number_5); - END IF; - END WHILE; - BEGIN - BEGIN - SET done = 0; - OPEN cursor_number_2; - WHILE done <> 1 DO - FETCH cursor_number_2 - INTO variable_number_1, variable_number_2, variable_number_3, - variable_number_4, variable_number_5; - IF done <> 0 THEN - INSERT INTO res_6_408004_2 - VALUES(variable_number_1, variable_number_2, variable_number_3, - variable_number_4, variable_number_5); - END IF; - END WHILE; - END; - SET done = 0; - OPEN cursor_number_3; - WHILE done <> 1 DO - FETCH cursor_number_3 - INTO variable_number_1, variable_number_2, variable_number_3, - variable_number_4, variable_number_5; - IF done <> 0 THEN - INSERT INTO res_6_408004_2 - VALUES(variable_number_1, variable_number_2, variable_number_3, - variable_number_4, variable_number_5); - END IF; - END WHILE; - END; - END; - BEGIN - SET done = 0; - OPEN cursor_number_4; - WHILE done <> 1 DO - FETCH cursor_number_4 - INTO variable_number_1, variable_number_2, variable_number_3, - variable_number_4, variable_number_5; - IF done <> 0 THEN - INSERT INTO res_6_408004_2 - VALUES (variable_number_1, variable_number_2, variable_number_3, - variable_number_4, variable_number_5); - END IF; - END WHILE; - END; - BEGIN - SET @a='test row'; - SELECT @a; - SELECT @a; - SELECT @a; - END; - BEGIN - SET done = 0; - OPEN cursor_number_5; - WHILE done <> 1 DO - FETCH cursor_number_5 - INTO variable_number_1, variable_number_2, variable_number_3, - variable_number_4, variable_number_5; - IF done <> 0 THEN - INSERT INTO res_6_408004_2 - VALUES (variable_number_1, variable_number_2, variable_number_3, - variable_number_4, variable_number_5); - END IF; - END WHILE; - END; - BEGIN - SET @a='test row'; - SELECT @a; - SELECT @a; - SELECT @a; - END; -END// -delimiter ;// - -CALL db_datadict.sp_6_408004 (); -SELECT * FROM db_datadict.res_6_408004_2; - ---vertical_results ---replace_column 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss" -SELECT *, LENGTH(routine_definition) FROM information_schema.routines -WHERE routine_schema = 'db_datadict'; ---horizontal_results - -# Cleanup -DROP DATABASE db_datadict; -# ---------------------------------------------------------------------------------------------- - - ---echo ######################################################################## ---echo # Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and ---echo # DDL on INFORMATION_SCHEMA table are not supported ---echo ######################################################################## -# 3.2.1.3: Ensure that no user may execute an INSERT statement on any -# INFORMATION_SCHEMA table. -# 3.2.1.4: Ensure that no user may execute an UPDATE statement on any -# INFORMATION_SCHEMA table. -# 3.2.1.5: Ensure that no user may execute a DELETE statement on any -# INFORMATION_SCHEMA table. -# 3.2.1.8: Ensure that no user may create an index on an INFORMATION_SCHEMA table. -# 3.2.1.9: Ensure that no user may alter the definition of an -# INFORMATION_SCHEMA table. -# 3.2.1.10: Ensure that no user may drop an INFORMATION_SCHEMA table. -# 3.2.1.11: Ensure that no user may move an INFORMATION_SCHEMA table to any -# other database. -# 3.2.1.12: Ensure that no user may directly add to, alter, or delete any data -# in an INFORMATION_SCHEMA table. -# ---disable_warnings -DROP DATABASE IF EXISTS db_datadict; ---enable_warnings -CREATE DATABASE db_datadict; -USE db_datadict; -CREATE PROCEDURE sp_for_routines() SELECT 'db_datadict'; -USE test; - ---error ER_DBACCESS_DENIED_ERROR -INSERT INTO information_schema.routines (routine_name, routine_type ) -VALUES ('p2', 'procedure'); - ---error ER_DBACCESS_DENIED_ERROR -UPDATE information_schema.routines SET routine_name = 'p2' -WHERE routine_body = 'sql'; - ---error ER_DBACCESS_DENIED_ERROR -DELETE FROM information_schema.routines ; -# ---error ER_DBACCESS_DENIED_ERROR -TRUNCATE information_schema.routines ; - ---error ER_DBACCESS_DENIED_ERROR -CREATE INDEX i7 ON information_schema.routines (routine_name); - ---error ER_DBACCESS_DENIED_ERROR -ALTER TABLE information_schema.routines ADD f1 INT; -# ---error ER_DBACCESS_DENIED_ERROR -ALTER TABLE information_schema.routines DISCARD TABLESPACE; - ---error ER_DBACCESS_DENIED_ERROR -DROP TABLE information_schema.routines ; - ---error ER_DBACCESS_DENIED_ERROR -ALTER TABLE information_schema.routines RENAME db_datadict.routines; -# ---error ER_DBACCESS_DENIED_ERROR -ALTER TABLE information_schema.routines RENAME information_schema.xroutines; - -# Cleanup -DROP DATABASE db_datadict; - +--source include/not_embedded.inc +--source suite/funcs_1/datadict/is_routines.inc diff --git a/mysql-test/suite/funcs_1/t/is_routines_embedded.test b/mysql-test/suite/funcs_1/t/is_routines_embedded.test new file mode 100644 index 00000000000..86e1145690d --- /dev/null +++ b/mysql-test/suite/funcs_1/t/is_routines_embedded.test @@ -0,0 +1,20 @@ +# suite/funcs_1/t/is_routines_embedded.test +# +# Check the layout of information_schema.routines and the impact of +# CREATE/ALTER/DROP PROCEDURE/FUNCTION ... on it. +# Variant for the embedded server +# The expected results must equal is_routines except that all users +# have all privileges (affects some result sets). +# +# There is detailed information about this test within +# suite/funcs_1/datadict/is_routines.inc +# +# Author: +# 2008-06-06 mleich Create this this variant for the embedded server. +# + +if (`SELECT VERSION() NOT LIKE '%embedded%'`) +{ + --skip Test requires: embedded server +} +--source suite/funcs_1/datadict/is_routines.inc diff --git a/mysql-test/suite/funcs_1/t/is_schema_privileges.test b/mysql-test/suite/funcs_1/t/is_schema_privileges.test index 4eb4a273362..1f408d71b39 100644 --- a/mysql-test/suite/funcs_1/t/is_schema_privileges.test +++ b/mysql-test/suite/funcs_1/t/is_schema_privileges.test @@ -16,7 +16,9 @@ # Create this script based on older scripts and new code. # -# --source suite/funcs_1/datadict/datadict.pre +# This test cannot be used for the embedded server because we check here +# privileges. +--source include/not_embedded.inc let $engine_type = MEMORY; let $other_engine_type = MyISAM; diff --git a/mysql-test/suite/funcs_1/t/is_schema_privileges_is_mysql_test.test b/mysql-test/suite/funcs_1/t/is_schema_privileges_is_mysql_test.test index cb34d1bad2d..3f60f71fe9a 100644 --- a/mysql-test/suite/funcs_1/t/is_schema_privileges_is_mysql_test.test +++ b/mysql-test/suite/funcs_1/t/is_schema_privileges_is_mysql_test.test @@ -8,7 +8,10 @@ # testsuite funcs_1 # Create this script based on older scripts and new code. # -# + +# This test cannot be used for the embedded server because we check here +# privileges. +--source include/not_embedded.inc --echo ############################################################################## --echo # Testcases 3.2.9.2+3.2.9.3 INFORMATION_SCHEMA.SCHEMATA accessible information diff --git a/mysql-test/suite/funcs_1/t/is_schemata.test b/mysql-test/suite/funcs_1/t/is_schemata.test index 7eb08dba463..e262869e6d4 100644 --- a/mysql-test/suite/funcs_1/t/is_schemata.test +++ b/mysql-test/suite/funcs_1/t/is_schemata.test @@ -2,12 +2,12 @@ # # Check the layout of information_schema.schemata, permissions and the impact of # CREATE/ALTER/DROP SCHEMA on it. +# Variant for the non embedded server +# The expected results must equal is_schemata_embedded except that +# that the privilege system works (affects some result sets). # -# Note: -# This test is not intended -# - to show information about the all time existing databases -# information_schema and mysql -# - for checking storage engine properties +# There is detailed information about this test within +# suite/funcs_1/datadict/is_schemata.inc # # Author: # 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of @@ -15,232 +15,5 @@ # Create this script based on older scripts and new code. # -# --source suite/funcs_1/datadict/datadict.pre - -let $is_table = SCHEMATA; - -# The table INFORMATION_SCHEMA.SCHEMATA must exist -eval SHOW TABLES FROM information_schema LIKE '$is_table'; - ---echo ####################################################################### ---echo # Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT ---echo ####################################################################### -# Ensure that every INFORMATION_SCHEMA table can be queried with a SELECT -# statement, just as if it were an ordinary user-defined table. -# ---source suite/funcs_1/datadict/is_table_query.inc - - ---echo ######################################################################### ---echo # Testcase 3.2.9.1: INFORMATION_SCHEMA.SCHEMATA layout; ---echo ######################################################################### -# Ensure that the INFORMATION_SCHEMA.SCHEMATA table has the following columns, -# in the following order: -# -# CATALOG_NAME (always shows NULL), -# SCHEMA_NAME (shows the name of a database, or schema, on which the current -# user or PUBLIC has privileges), -# DEFAULT_CHARACTER_SET_NAME (shows the name of that database's default -# character set), -# DEFAULT_COLLATION_NAME (shows the database defaul collation) -# SQL_PATH (always shows NULL). -# ---source suite/funcs_1/datadict/datadict_bug_12777.inc -eval DESCRIBE information_schema.$is_table; ---source suite/funcs_1/datadict/datadict_bug_12777.inc -eval SHOW CREATE TABLE information_schema.$is_table; ---source suite/funcs_1/datadict/datadict_bug_12777.inc -eval SHOW COLUMNS FROM information_schema.$is_table; - -# Note: Retrieval of information within information_schema.columns about -# information_schema.schemata is in is_columns_is.test. - -# Show that CATALOG_NAME and SQL_PATH are always NULL. -SELECT catalog_name, schema_name, sql_path -FROM information_schema.schemata -WHERE catalog_name IS NOT NULL or sql_path IS NOT NULL; - - ---echo ############################################################################### ---echo # Testcases 3.2.9.2+3.2.9.3: INFORMATION_SCHEMA.SCHEMATA accessible information ---echo ############################################################################### -# 3.2.9.2 Ensure that the table shows the relevant information for every -# database on which the current user or PUBLIC have privileges. -# 3.2.9.3 Ensure that the table does not show any information on any databases -# on which the current user and PUBLIC have no privileges. -# -# Note: Check of content within information_schema.schemata about the databases -# information_schema and mysql is in -# suite/funcs_1/t/is_schemata_is_mysql.test. -# ---disable_warnings -DROP DATABASE IF EXISTS db_datadict_1; -DROP DATABASE IF EXISTS db_datadict_2; ---enable_warnings -CREATE DATABASE db_datadict_1; -CREATE DATABASE db_datadict_2; - ---error 0,ER_CANNOT_USER -DROP USER 'testuser1'@'localhost'; -CREATE USER 'testuser1'@'localhost'; ---error 0,ER_CANNOT_USER -DROP USER 'testuser2'@'localhost'; -CREATE USER 'testuser2'@'localhost'; ---error 0,ER_CANNOT_USER -DROP USER 'testuser3'@'localhost'; -CREATE USER 'testuser3'@'localhost'; - -GRANT SELECT ON db_datadict_1.* to 'testuser1'@'localhost'; -GRANT SELECT ON db_datadict_1.* to 'testuser2'@'localhost'; -GRANT SELECT ON db_datadict_2.* to 'testuser2'@'localhost'; - -let $my_select = SELECT * FROM information_schema.schemata -WHERE schema_name LIKE 'db_datadict_%' ORDER BY schema_name; -let $my_show = SHOW DATABASES LIKE 'db_datadict_%'; - -eval $my_select; ---sorted_result -eval $my_show; - ---echo # Establish connection testuser1 (user=testuser1) ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (testuser1, localhost, testuser1, , db_datadict_1); -# Shows db_datadict_1 -eval $my_select; ---sorted_result -eval $my_show; - ---echo # Establish connection testuser2 (user=testuser2) ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (testuser2, localhost, testuser2, , db_datadict_2); -# Shows db_datadict_1 and db_datadict_2 -eval $my_select; ---sorted_result -eval $my_show; - ---echo # Establish connection testuser3 (user=testuser3) ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (testuser3, localhost, testuser3, , test); -# Shows neither db_datadict_1 nor db_datadict_2 -eval $my_select; ---sorted_result -eval $my_show; - -# Cleanup ---echo # Switch to connection default and close connections testuser1,testuser2,testuser3 -connection default; -disconnect testuser1; -disconnect testuser2; -disconnect testuser3; -DROP USER 'testuser1'@'localhost'; -DROP USER 'testuser2'@'localhost'; -DROP USER 'testuser3'@'localhost'; -DROP DATABASE db_datadict_1; -DROP DATABASE db_datadict_2; - - ---echo ################################################################################# ---echo # Testcases 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.SCHEMATA modifications ---echo ################################################################################# -# 3.2.1.13: Ensure that the creation of any new database object (e.g. table or -# column) automatically inserts all relevant information on that -# object into every appropriate INFORMATION_SCHEMA table. -# 3.2.1.14: Ensure that the alteration of any existing database object -# automatically updates all relevant information on that object in -# every appropriate INFORMATION_SCHEMA table. -# 3.2.1.15: Ensure that the dropping of any existing database object -# automatically deletes all relevant information on that object from -# every appropriate INFORMATION_SCHEMA table. -# ---disable_warnings -DROP DATABASE IF EXISTS db_datadict; ---enable_warnings - -SELECT * FROM information_schema.schemata WHERE schema_name = 'db_datadict'; -CREATE DATABASE db_datadict CHARACTER SET 'latin1' COLLATE 'latin1_swedish_ci'; -SELECT * FROM information_schema.schemata WHERE schema_name = 'db_datadict'; - -# Check modify default CHARACTER SET -SELECT schema_name, default_character_set_name -FROM information_schema.schemata WHERE schema_name = 'db_datadict'; -ALTER SCHEMA db_datadict CHARACTER SET 'utf8'; -SELECT schema_name, default_character_set_name -FROM information_schema.schemata WHERE schema_name = 'db_datadict'; -ALTER SCHEMA db_datadict CHARACTER SET 'latin1'; - -# Check modify default COLLATION -SELECT schema_name, default_collation_name FROM information_schema.schemata -WHERE schema_name = 'db_datadict'; -ALTER SCHEMA db_datadict COLLATE 'latin1_general_cs'; -SELECT schema_name, default_collation_name FROM information_schema.schemata -WHERE schema_name = 'db_datadict'; - -# Check DROP DATABASE -SELECT schema_name -FROM information_schema.schemata WHERE schema_name = 'db_datadict'; -DROP DATABASE db_datadict; -SELECT schema_name -FROM information_schema.schemata WHERE schema_name = 'db_datadict'; - - ---echo ######################################################################## ---echo # Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and ---echo # DDL on INFORMATION_SCHEMA tables are not supported ---echo ######################################################################## -# 3.2.1.3: Ensure that no user may execute an INSERT statement on any -# INFORMATION_SCHEMA table. -# 3.2.1.4: Ensure that no user may execute an UPDATE statement on any -# INFORMATION_SCHEMA table. -# 3.2.1.5: Ensure that no user may execute a DELETE statement on any -# INFORMATION_SCHEMA table. -# 3.2.1.8: Ensure that no user may create an index on an INFORMATION_SCHEMA table. -# 3.2.1.9: Ensure that no user may alter the definition of an -# INFORMATION_SCHEMA table. -# 3.2.1.10: Ensure that no user may drop an INFORMATION_SCHEMA table. -# 3.2.1.11: Ensure that no user may move an INFORMATION_SCHEMA table to any -# other database. -# 3.2.1.12: Ensure that no user may directly add to, alter, or delete any data -# in an INFORMATION_SCHEMA table. -# ---disable_warnings -DROP DATABASE IF EXISTS db_datadict; ---enable_warnings -CREATE DATABASE db_datadict CHARACTER SET 'latin1' COLLATE 'latin1_swedish_ci'; - ---error ER_DBACCESS_DENIED_ERROR -INSERT INTO information_schema.schemata - (catalog_name, schema_name, default_character_set_name, sql_path) -VALUES (NULL, 'db1', 'latin1', NULL); ---error ER_DBACCESS_DENIED_ERROR -INSERT INTO information_schema.schemata -SELECT * FROM information_schema.schemata; - ---error ER_DBACCESS_DENIED_ERROR -UPDATE information_schema.schemata -SET default_character_set_name = 'utf8' -WHERE schema_name = 'db_datadict'; ---error ER_DBACCESS_DENIED_ERROR -UPDATE information_schema.schemata SET catalog_name = 't_4711'; - ---error ER_DBACCESS_DENIED_ERROR -DELETE FROM information_schema.schemata WHERE schema_name = 'db_datadict'; ---error ER_DBACCESS_DENIED_ERROR -TRUNCATE information_schema.schemata; - ---error ER_DBACCESS_DENIED_ERROR -CREATE INDEX i1 ON information_schema.schemata(schema_name); - ---error ER_DBACCESS_DENIED_ERROR -ALTER TABLE information_schema.schemata ADD f1 INT; - ---error ER_DBACCESS_DENIED_ERROR -DROP TABLE information_schema.schemata; - ---error ER_DBACCESS_DENIED_ERROR -ALTER TABLE information_schema.schemata RENAME db_datadict.schemata; ---error ER_DBACCESS_DENIED_ERROR -ALTER TABLE information_schema.schemata RENAME information_schema.xschemata; - -# Cleanup -DROP DATABASE db_datadict; - +--source include/not_embedded.inc +--source suite/funcs_1/datadict/is_schemata.inc diff --git a/mysql-test/suite/funcs_1/t/is_schemata_embedded.test b/mysql-test/suite/funcs_1/t/is_schemata_embedded.test new file mode 100644 index 00000000000..5fbb023dd8e --- /dev/null +++ b/mysql-test/suite/funcs_1/t/is_schemata_embedded.test @@ -0,0 +1,20 @@ +# suite/funcs_1/t/is_schemata_embedded.test +# +# Check the layout of information_schema.schemata, permissions and the impact of +# CREATE/ALTER/DROP SCHEMA on it. +# Variant for the embedded server +# The expected results must equal is_schemata except that all users +# have all privileges (affects some result sets). +# +# There is detailed information about this test within +# suite/funcs_1/datadict/is_schemata.inc +# +# Author: +# 2008-06-06 mleich Create this this variant for the embedded server. +# + +if (`SELECT VERSION() NOT LIKE '%embedded%'`) +{ + --skip Test requires: embedded server +} +--source suite/funcs_1/datadict/is_schemata.inc diff --git a/mysql-test/suite/funcs_1/t/is_schemata_is_mysql_test.test b/mysql-test/suite/funcs_1/t/is_schemata_is_mysql_test.test index cabcfa640d7..9bfbf0cf335 100644 --- a/mysql-test/suite/funcs_1/t/is_schemata_is_mysql_test.test +++ b/mysql-test/suite/funcs_1/t/is_schemata_is_mysql_test.test @@ -8,7 +8,10 @@ # testsuite funcs_1 # Create this script based on older scripts and new code. # -# + +# This test cannot be used for the embedded server because we check here +# privileges. +--source include/not_embedded.inc --echo ################################################################################# --echo # Testcases 3.2.9.2 + 3.2.9.3: INFORMATION_SCHEMA.SCHEMATA accessible information diff --git a/mysql-test/suite/funcs_1/t/is_statistics.test b/mysql-test/suite/funcs_1/t/is_statistics.test index 5b17b711fff..458892a6d91 100644 --- a/mysql-test/suite/funcs_1/t/is_statistics.test +++ b/mysql-test/suite/funcs_1/t/is_statistics.test @@ -16,7 +16,9 @@ # Create this script based on older scripts and new code. # -# --source suite/funcs_1/datadict/datadict.pre +# This test cannot be used for the embedded server because we check here +# privileges. +--source include/not_embedded.inc let $engine_type = MEMORY; let $other_engine_type = MyISAM; diff --git a/mysql-test/suite/funcs_1/t/is_statistics_mysql.test b/mysql-test/suite/funcs_1/t/is_statistics_mysql.test index a75cc922777..a1250b67b8c 100644 --- a/mysql-test/suite/funcs_1/t/is_statistics_mysql.test +++ b/mysql-test/suite/funcs_1/t/is_statistics_mysql.test @@ -2,6 +2,9 @@ # # Check the content of information_schema.statistics about tables within # the database mysql for a high and a low privileged user. +# Variant for the non embedded server +# The expected results must equal is_statistics_mysql_embedded except that +# that the privilege system works (affects some result sets). # # Author: # 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of @@ -9,7 +12,7 @@ # Create this script based on older scripts and new code. # +--source include/not_embedded.inc let $database = mysql; let $my_where = WHERE table_schema = 'mysql'; --source suite/funcs_1/datadict/statistics.inc - diff --git a/mysql-test/suite/funcs_1/t/is_statistics_mysql_embedded.test b/mysql-test/suite/funcs_1/t/is_statistics_mysql_embedded.test new file mode 100644 index 00000000000..6fedbe4d3a8 --- /dev/null +++ b/mysql-test/suite/funcs_1/t/is_statistics_mysql_embedded.test @@ -0,0 +1,19 @@ +# suite/funcs_1/t/is_statistics_mysql_embedded.test +# +# Check the content of information_schema.statistics about tables within +# the database mysql for a high and a low privileged user. +# Variant for the embedded server +# The expected results must equal is_statistics_mysql except that all users +# have all privileges (affects some result sets). +# +# Author: +# 2008-06-06 mleich Create this this variant for the embedded server. +# + +if (`SELECT VERSION() NOT LIKE '%embedded%'`) +{ + --skip Test requires: embedded server +} +let $database = mysql; +let $my_where = WHERE table_schema = 'mysql'; +--source suite/funcs_1/datadict/statistics.inc diff --git a/mysql-test/suite/funcs_1/t/is_table_constraints.test b/mysql-test/suite/funcs_1/t/is_table_constraints.test index 60d5ebce703..a64b3bfaa6e 100644 --- a/mysql-test/suite/funcs_1/t/is_table_constraints.test +++ b/mysql-test/suite/funcs_1/t/is_table_constraints.test @@ -16,7 +16,9 @@ # Create this script based on older scripts and new code. # -# --source suite/funcs_1/datadict/datadict.pre +# This test cannot be used for the embedded server because we check here +# privileges. +--source include/not_embedded.inc let $engine_type = MyISAM; diff --git a/mysql-test/suite/funcs_1/t/is_table_constraints_mysql.test b/mysql-test/suite/funcs_1/t/is_table_constraints_mysql.test index 5ef1561ccdf..a909676943e 100644 --- a/mysql-test/suite/funcs_1/t/is_table_constraints_mysql.test +++ b/mysql-test/suite/funcs_1/t/is_table_constraints_mysql.test @@ -2,6 +2,9 @@ # # Check the content of information_schema.table_constraints about tables within # the database mysql (= the system tables) with different privileged users. +# Variant for the non embedded server +# The expected results must equal is_table_constraints_mysql_embedded +# except that the privilege system works (affects some result sets). # # Author: # 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of @@ -9,6 +12,6 @@ # Create this script based on older scripts and new code. # +--source include/not_embedded.inc let $table_schema = mysql; --source suite/funcs_1/datadict/table_constraints.inc - diff --git a/mysql-test/suite/funcs_1/t/is_table_constraints_mysql_embedded.test b/mysql-test/suite/funcs_1/t/is_table_constraints_mysql_embedded.test new file mode 100644 index 00000000000..8994be31be8 --- /dev/null +++ b/mysql-test/suite/funcs_1/t/is_table_constraints_mysql_embedded.test @@ -0,0 +1,18 @@ +# suite/funcs_1/t/is_table_constraints_mysql_embedded.test +# +# Check the content of information_schema.table_constraints about tables within +# the database mysql (= the system tables) with different privileged users. +# Variant for the embedded server +# The expected results must equal is_table_constraints_mysql +# except that all users have all privileges (affects some result sets). +# +# Author: +# 2008-06-06 mleich Create this this variant for the embedded server. +# + +if (`SELECT VERSION() NOT LIKE '%embedded%'`) +{ + --skip Test requires: embedded server +} +let $table_schema = mysql; +--source suite/funcs_1/datadict/table_constraints.inc diff --git a/mysql-test/suite/funcs_1/t/is_table_privileges.test b/mysql-test/suite/funcs_1/t/is_table_privileges.test index b095a5ddad6..5ea0dd7c6a7 100644 --- a/mysql-test/suite/funcs_1/t/is_table_privileges.test +++ b/mysql-test/suite/funcs_1/t/is_table_privileges.test @@ -16,7 +16,9 @@ # Create this script based on older scripts and new code. # -# --source suite/funcs_1/datadict/datadict.pre +# This test cannot be used for the embedded server because we check here +# privileges. +--source include/not_embedded.inc let $engine_type = MEMORY; let $other_engine_type = MyISAM; diff --git a/mysql-test/suite/funcs_1/t/is_tables.test b/mysql-test/suite/funcs_1/t/is_tables.test index 35b6b7ef007..1c7620ffd45 100644 --- a/mysql-test/suite/funcs_1/t/is_tables.test +++ b/mysql-test/suite/funcs_1/t/is_tables.test @@ -2,14 +2,12 @@ # # Check the layout of information_schema.tables and the impact of # CREATE/ALTER/DROP TABLE/VIEW/SCHEMA ... on it. +# Variant for the non embedded server +# The expected results must equal is_tables_embedded except that +# that the privilege system works (affects some result sets). # -# Note: -# This test is not intended -# - to show information about the all time existing tables -# within the databases information_schema and mysql -# - for checking storage engine properties -# Therefore please do not alter $engine_type and $other_engine_type. -# Some results of the subtests depend on the storage engines assigned. +# There is detailed information about this test within +# suite/funcs_1/datadict/is_tables.inc # # Author: # 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of @@ -17,458 +15,5 @@ # Create this script based on older scripts and new code. # -# --source suite/funcs_1/datadict/datadict.pre - -let $engine_type = MEMORY; -let $other_engine_type = MyISAM; - -let $is_table = TABLES; - -# The table INFORMATION_SCHEMA.TABLES must exist -eval SHOW TABLES FROM information_schema LIKE '$is_table'; - ---echo ####################################################################### ---echo # Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT ---echo ####################################################################### -# Ensure that every INFORMATION_SCHEMA table can be queried with a SELECT -# statement, just as if it were an ordinary user-defined table. -# ---source suite/funcs_1/datadict/is_table_query.inc - - ---echo ######################################################################### ---echo # Testcase 3.2.12.1: INFORMATION_SCHEMA.TABLES layout ---echo ######################################################################### -# Ensure that the INFORMATION_SCHEMA.TABLES table has the following columns, -# in the following order: -# -# TABLE_CATALOG (always shows NULL), -# TABLE_SCHEMA (shows the name of the database, or schema, in which an -# accessible table resides), -# TABLE_NAME (shows the name of a table which the current user may access), -# TABLE_TYPE (shows whether the table is a BASE TABLE, a TEMPORARY table, -# or a VIEW), -# ENGINE (shows the storage engine used for the table), -# VERSION (shows the version number of the table's .frm file), -# ROW_FORMAT (shows the table's row storage format; either FIXED, DYNAMIC -# or COMPRESSED), -# TABLE_ROWS (shows the number of rows in the table), -# AVG_ROW_LENGTH (shows the average length of the table's rows), -# DATA_LENGTH (shows the length of the table's data file), -# MAX_DATA_LENGTH (shows the maximum length of the table's data file), -# INDEX_LENGTH (shows the length of the index file associated with the table), -# DATA_FREE (shows the number of allocated, unused bytes), -# AUTO_INCREMENT (shows the next AUTO_INCREMENT value, where applicable), -# CREATE_TIME (shows the timestamp of the time the table was created), -# UPDATE_TIME (shows the timestamp of the time the table's data file was -# last updated), -# CHECK_TIME (shows the timestamp of the time the table was last checked), -# TABLE_COLLATION (shows the table's default collation), -# CHECKSUM (shows the live checksum value for the table, if any; otherwise NULL), -# CREATE_OPTIONS (shows any additional options used in the table's definition; -# otherwise NULL), -# TABLE_COMMENT (shows the comment added to the table's definition; -# otherwise NULL). -# ---source suite/funcs_1/datadict/datadict_bug_12777.inc -eval DESCRIBE information_schema.$is_table; ---source suite/funcs_1/datadict/datadict_bug_12777.inc -eval SHOW CREATE TABLE information_schema.$is_table; ---source suite/funcs_1/datadict/datadict_bug_12777.inc -eval SHOW COLUMNS FROM information_schema.$is_table; - -# Note: Retrieval of information within information_schema.columns about -# information_schema.tables is in is_columns_is.test. - -# Show that TABLE_CATALOG is always NULL. -SELECT table_catalog, table_schema, table_name -FROM information_schema.tables WHERE table_catalog IS NOT NULL; - - ---echo ################################################################################ ---echo # Testcase 3.2.12.2 + 3.2.12.3: INFORMATION_SCHEMA.TABLES accessible information ---echo ################################################################################ -# 3.2.12.2: Ensure that the table shows the relevant information on every base table -# and view on which the current user or PUBLIC has privileges. -# 3.2.12.3: Ensure that the table does not show any information on any tables -# on which the current user and public have no privileges. -# -# Note: Check of content within information_schema.tables about tables within -# database is in -# mysql is_tables_mysql.test -# information_schema is_tables_is.test -# test% is_tables_.test -# ---disable_warnings -DROP DATABASE IF EXISTS db_datadict; ---enable_warnings -CREATE DATABASE db_datadict; - ---error 0,ER_CANNOT_USER -DROP USER 'testuser1'@'localhost'; -CREATE USER 'testuser1'@'localhost'; -GRANT CREATE, CREATE VIEW, INSERT, SELECT ON db_datadict.* - TO 'testuser1'@'localhost' WITH GRANT OPTION; ---error 0,ER_CANNOT_USER -DROP USER 'testuser2'@'localhost'; -CREATE USER 'testuser2'@'localhost'; ---error 0,ER_CANNOT_USER -DROP USER 'testuser3'@'localhost'; -CREATE USER 'testuser3'@'localhost'; - ---replace_result $engine_type -eval -CREATE TABLE db_datadict.tb1 (f1 INT, f2 INT, f3 INT) -ENGINE = $engine_type; - -GRANT SELECT ON db_datadict.tb1 TO 'testuser1'@'localhost'; -GRANT ALL ON db_datadict.tb1 TO 'testuser2'@'localhost' WITH GRANT OPTION; - -let $my_select = SELECT * FROM information_schema.tables -WHERE table_schema = 'db_datadict' ORDER BY table_name; -let $my_show = SHOW TABLES FROM db_datadict; - ---echo # Establish connection testuser1 (user=testuser1) ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (testuser1, localhost, testuser1, , db_datadict); -# tb2 is not granted to anyone ---replace_result $engine_type -eval -CREATE TABLE tb2 (f1 DECIMAL) -ENGINE = $engine_type; ---replace_result $engine_type -eval -CREATE TABLE tb3 (f1 VARCHAR(200)) -ENGINE = $engine_type; -GRANT SELECT ON db_datadict.tb3 to 'testuser3'@'localhost'; -GRANT INSERT ON db_datadict.tb3 to 'testuser2'@'localhost'; -CREATE VIEW v3 AS SELECT * FROM tb3; -GRANT SELECT ON db_datadict.v3 to 'testuser3'@'localhost'; - -if ($have_bug_32285) -{ ---disable_ps_protocol -} -# We do not want to check here values affected by -# - the storage engine used -# - Operating system / Filesystem -# - start time of test -# 1 TABLE_CATALOG -# 2 TABLE_SCHEMA -# 3 TABLE_NAME -# 4 TABLE_TYPE -# 5 ENGINE affected by storage engine used -# 6 VERSION -# 7 ROW_FORMAT affected by storage engine used -# 8 TABLE_ROWS -# 9 AVG_ROW_LENGTH affected by storage engine used -# 10 DATA_LENGTH affected by storage engine used and maybe OS -# 11 MAX_DATA_LENGTH affected by storage engine used and maybe OS -# 12 INDEX_LENGTH affected by storage engine used and maybe OS -# 13 DATA_FREE affected by storage engine used and maybe OS -# 14 AUTO_INCREMENT -# 15 CREATE_TIME depends roughly on start time of test (*) -# 16 UPDATE_TIME depends roughly on start time of test (*) -# 17 CHECK_TIME depends roughly on start time of test and storage engine (*) -# 18 TABLE_COLLATION -# 19 CHECKSUM affected by storage engine used -# 20 CREATE_OPTIONS -# 21 TABLE_COMMENT affected by some storage engines -# (*) In case of view or temporary table NULL. ---replace_column 5 "#ENG#" 7 "#RF#" 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "#CRT" 16 "#UT#" 17 "#CT#" 19 "#CS#" -eval $my_select; ---enable_ps_protocol ---sorted_result -eval $my_show; - ---echo # Establish connection testuser2 (user=testuser2) ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (testuser2, localhost, testuser2, , db_datadict); -if ($have_bug_32285) -{ ---disable_ps_protocol -} ---replace_column 5 "#ENG#" 7 "#RF#" 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "#CRT" 16 "#UT#" 17 "#CT#" 19 "#CS#" -eval $my_select; ---enable_ps_protocol ---sorted_result -eval $my_show; - ---echo # Establish connection testuser3 (user=testuser3) ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (testuser3, localhost, testuser3, , db_datadict); -if ($have_bug_32285) -{ ---disable_ps_protocol -} ---replace_column 5 "#ENG#" 7 "#RF#" 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "#CRT" 16 "#UT#" 17 "#CT#" 19 "#CS#" -eval $my_select; ---enable_ps_protocol ---sorted_result -eval $my_show; - ---echo # Switch to connection default (user=root) -connection default; -# we see only 'public' tables -if ($have_bug_32285) -{ ---disable_ps_protocol -} ---replace_column 5 "#ENG#" 7 "#RF#" 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "#CRT" 16 "#UT#" 17 "#CT#" 19 "#CS#" -eval $my_select; ---enable_ps_protocol ---sorted_result -eval $my_show; - -# Cleanup ---echo # Close connection testuser1, testuser2, testuser3 -disconnect testuser1; -disconnect testuser2; -disconnect testuser3; -DROP USER 'testuser1'@'localhost'; -DROP USER 'testuser2'@'localhost'; -DROP USER 'testuser3'@'localhost'; -DROP DATABASE db_datadict; - - ---echo ######################################################################### ---echo # 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.TABLES modifications ---echo ######################################################################### -# 3.2.1.13: Ensure that the creation of any new database object (e.g. table or -# column) automatically inserts all relevant information on that -# object into every appropriate INFORMATION_SCHEMA table. -# 3.2.1.14: Ensure that the alteration of any existing database object -# automatically updates all relevant information on that object in -# every appropriate INFORMATION_SCHEMA table. -# 3.2.1.15: Ensure that the dropping of any existing database object -# automatically deletes all relevant information on that object from -# every appropriate INFORMATION_SCHEMA table. -# ---disable_warnings -DROP TABLE IF EXISTS test.t1_my_table; -DROP DATABASE IF EXISTS db_datadict; ---enable_warnings -CREATE DATABASE db_datadict; - -SELECT table_name FROM information_schema.tables -WHERE table_name LIKE 't1_my_table%'; ---replace_result $engine_type -eval -CREATE TABLE test.t1_my_table (f1 BIGINT) -DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci -COMMENT = 'Initial Comment' ENGINE = $engine_type; -# Settings used in CREATE TABLE must be visible in information_schema.tables. ---vertical_results ---replace_column 5 "#ENG#" 7 "#RF#" 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "#CRT" 16 "#UT#" 17 "#CT#" 19 "#CS#" -SELECT * FROM information_schema.tables -WHERE table_name = 't1_my_table'; ---horizontal_results -# -# Check modification of TABLE_NAME -SELECT table_name FROM information_schema.tables -WHERE table_name LIKE 't1_my_table%'; -RENAME TABLE test.t1_my_table TO test.t1_my_tablex; -SELECT table_name FROM information_schema.tables -WHERE table_name LIKE 't1_my_table%'; -# -# Check modification of TABLE_SCHEMA -SELECT table_schema,table_name FROM information_schema.tables -WHERE table_name = 't1_my_tablex'; -RENAME TABLE test.t1_my_tablex TO db_datadict.t1_my_tablex; -SELECT table_schema,table_name FROM information_schema.tables -WHERE table_name = 't1_my_tablex'; -# -# Check modification of ENGINE ---replace_result $engine_type -SELECT table_name, engine FROM information_schema.tables -WHERE table_name = 't1_my_tablex'; ---replace_result $other_engine_type -eval -ALTER TABLE db_datadict.t1_my_tablex -ENGINE = $other_engine_type; ---replace_result $other_engine_type -SELECT table_name, engine FROM information_schema.tables -WHERE table_name = 't1_my_tablex'; -# -# Check modification of TABLE_ROWS -SELECT table_name, table_rows FROM information_schema.tables -WHERE table_name = 't1_my_tablex'; -INSERT INTO db_datadict.t1_my_tablex VALUES(1),(2); -SELECT table_name, table_rows FROM information_schema.tables -WHERE table_name = 't1_my_tablex'; -# -# Check indirect modification of TABLE_COLLATION -SELECT table_name, table_collation FROM information_schema.tables -WHERE table_name = 't1_my_tablex'; -ALTER TABLE db_datadict.t1_my_tablex DEFAULT CHARACTER SET utf8; -SELECT table_name, table_collation FROM information_schema.tables -WHERE table_name = 't1_my_tablex'; -# Check direct modification of TABLE_COLLATION -SELECT table_name, table_collation FROM information_schema.tables -WHERE table_name = 't1_my_tablex'; -ALTER TABLE db_datadict.t1_my_tablex -DEFAULT CHARACTER SET latin1 COLLATE latin1_german1_ci; -SELECT table_name, table_collation FROM information_schema.tables -WHERE table_name = 't1_my_tablex'; -# -# Check modification of TABLE_COMMENT -SELECT table_name, TABLE_COMMENT FROM information_schema.tables -WHERE table_name = 't1_my_tablex'; -ALTER TABLE db_datadict.t1_my_tablex COMMENT 'Changed Comment'; -SELECT table_name, TABLE_COMMENT FROM information_schema.tables -WHERE table_name = 't1_my_tablex'; -# -# Check modification of AUTO_INCREMENT -SELECT table_name, AUTO_INCREMENT FROM information_schema.tables -WHERE table_name = 't1_my_tablex'; -ALTER TABLE db_datadict.t1_my_tablex -ADD f2 BIGINT AUTO_INCREMENT, ADD PRIMARY KEY (f2); -SELECT table_name, AUTO_INCREMENT FROM information_schema.tables -WHERE table_name = 't1_my_tablex'; -# -# Check modification of ROW_FORMAT -SELECT table_name, ROW_FORMAT FROM information_schema.tables -WHERE table_name = 't1_my_tablex'; -ALTER TABLE db_datadict.t1_my_tablex ROW_FORMAT = dynamic; -SELECT table_name, ROW_FORMAT FROM information_schema.tables -WHERE table_name = 't1_my_tablex'; -# -# Check "growth" of UPDATE_TIME and modification of CHECKSUM -SELECT table_name, checksum FROM information_schema.tables -WHERE table_name = 't1_my_tablex'; -ALTER TABLE db_datadict.t1_my_tablex CHECKSUM = 1; -SELECT table_name, checksum IS NOT NULL FROM information_schema.tables -WHERE table_name = 't1_my_tablex'; -SELECT UPDATE_TIME, checksum INTO @UPDATE_TIME, @checksum -FROM information_schema.tables -WHERE table_name = 't1_my_tablex'; -# Enforce a time difference bigger than the smallest unit (1 second). ---real_sleep 1.1 -INSERT INTO db_datadict.t1_my_tablex SET f1 = 3; -SELECT UPDATE_TIME > @UPDATE_TIME - AS "Is current UPDATE_TIME bigger than before last INSERT?" -FROM information_schema.tables -WHERE table_name = 't1_my_tablex'; -SELECT checksum <> @checksum - AS "Is current CHECKSUM different than before last INSERT?" -FROM information_schema.tables -WHERE table_name = 't1_my_tablex'; -# -# Information is used later -SELECT CREATE_TIME INTO @CREATE_TIME FROM information_schema.tables -WHERE table_name = 't1_my_tablex'; -# -# Check impact of DROP TABLE -SELECT table_name FROM information_schema.tables -WHERE table_name LIKE 't1_my_table%'; -DROP TABLE db_datadict.t1_my_tablex; -SELECT table_name FROM information_schema.tables -WHERE table_name LIKE 't1_my_table%'; -# -# Check "growth" of CREATE_TIME ---replace_result $other_engine_type -eval -CREATE TABLE test.t1_my_tablex (f1 BIGINT) -ENGINE = $other_engine_type; -SELECT CREATE_TIME > @CREATE_TIME - AS "Is current CREATE_TIME bigger than for the old dropped table?" -FROM information_schema.tables -WHERE table_name = 't1_my_tablex'; -DROP TABLE test.t1_my_tablex; -# -# Check a VIEW -CREATE VIEW test.t1_my_tablex AS SELECT 1; ---vertical_results -SELECT * FROM information_schema.tables -WHERE table_name = 't1_my_tablex'; ---horizontal_results -DROP VIEW test.t1_my_tablex; -SELECT table_name FROM information_schema.tables -WHERE table_name = 't1_my_tablex'; -# -# Check a temporary table ---replace_result $other_engine_type -eval -CREATE TEMPORARY TABLE test.t1_my_tablex -ENGINE = $other_engine_type - AS SELECT 1; ---vertical_results -SELECT table_name, table_type FROM information_schema.tables -WHERE table_name = 't1_my_tablex'; ---horizontal_results -DROP TEMPORARY TABLE test.t1_my_tablex; -# -# Check impact of DROP SCHEMA ---replace_result $engine_type -eval -CREATE TABLE db_datadict.t1_my_tablex -ENGINE = $engine_type AS -SELECT 1; -SELECT table_name FROM information_schema.tables -WHERE table_name = 't1_my_tablex'; -DROP DATABASE db_datadict; -SELECT table_name FROM information_schema.tables -WHERE table_name = 't1_my_tablex'; - - ---echo ######################################################################## ---echo # Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and ---echo # DDL on INFORMATION_SCHEMA tables are not supported ---echo ######################################################################## -# 3.2.1.3: Ensure that no user may execute an INSERT statement on any -# INFORMATION_SCHEMA table. -# 3.2.1.4: Ensure that no user may execute an UPDATE statement on any -# INFORMATION_SCHEMA table. -# 3.2.1.5: Ensure that no user may execute a DELETE statement on any -# INFORMATION_SCHEMA table. -# 3.2.1.8: Ensure that no user may create an index on an -# INFORMATION_SCHEMA table. -# 3.2.1.9: Ensure that no user may alter the definition of an -# INFORMATION_SCHEMA table. -# 3.2.1.10: Ensure that no user may drop an INFORMATION_SCHEMA table. -# 3.2.1.11: Ensure that no user may move an INFORMATION_SCHEMA table to any -# other database. -# 3.2.1.12: Ensure that no user may directly add to, alter, or delete any data -# in an INFORMATION_SCHEMA table. -# ---disable_warnings -DROP DATABASE IF EXISTS db_datadict; ---enable_warnings -CREATE DATABASE db_datadict; ---replace_result $engine_type -eval -CREATE TABLE db_datadict.t1 (f1 BIGINT) -ENGINE = $engine_type; - ---error ER_DBACCESS_DENIED_ERROR -INSERT INTO information_schema.tables -SELECT * FROM information_schema.tables; - ---error ER_DBACCESS_DENIED_ERROR -UPDATE information_schema.tables SET table_schema = 'test' -WHERE table_name = 't1'; - ---error ER_DBACCESS_DENIED_ERROR -DELETE FROM information_schema.tables WHERE table_name = 't1'; ---error ER_DBACCESS_DENIED_ERROR -TRUNCATE information_schema.tables; - ---error ER_DBACCESS_DENIED_ERROR -CREATE INDEX my_idx_on_tables ON information_schema.tables(table_schema); - ---error ER_DBACCESS_DENIED_ERROR -ALTER TABLE information_schema.tables DROP PRIMARY KEY; ---error ER_DBACCESS_DENIED_ERROR -ALTER TABLE information_schema.tables ADD f1 INT; - ---error ER_DBACCESS_DENIED_ERROR -DROP TABLE information_schema.tables; - ---error ER_DBACCESS_DENIED_ERROR -ALTER TABLE information_schema.tables RENAME db_datadict.tables; ---error ER_DBACCESS_DENIED_ERROR -ALTER TABLE information_schema.tables RENAME information_schema.xtables; - -# Cleanup -DROP DATABASE db_datadict; - +--source include/not_embedded.inc +--source suite/funcs_1/datadict/is_tables.inc diff --git a/mysql-test/suite/funcs_1/t/is_tables_embedded.test b/mysql-test/suite/funcs_1/t/is_tables_embedded.test new file mode 100644 index 00000000000..d3c59ffff36 --- /dev/null +++ b/mysql-test/suite/funcs_1/t/is_tables_embedded.test @@ -0,0 +1,20 @@ +# suite/funcs_1/t/is_tables_embedded.test +# +# Check the layout of information_schema.tables and the impact of +# CREATE/ALTER/DROP TABLE/VIEW/SCHEMA ... on it. +# Variant for the embedded server +# The expected results must equal is_tables except that all users +# have all privileges (affects some result sets). +# +# There is detailed information about this test within +# suite/funcs_1/datadict/is_tables.inc +# +# Author: +# 2008-06-06 mleich Create this this variant for the embedded server. +# + +if (`SELECT VERSION() NOT LIKE '%embedded%'`) +{ + --skip Test requires: embedded server +} +--source suite/funcs_1/datadict/is_tables.inc diff --git a/mysql-test/suite/funcs_1/t/is_tables_innodb.test b/mysql-test/suite/funcs_1/t/is_tables_innodb.test index 31a3900c7c3..ed6b7e60bbd 100644 --- a/mysql-test/suite/funcs_1/t/is_tables_innodb.test +++ b/mysql-test/suite/funcs_1/t/is_tables_innodb.test @@ -10,13 +10,13 @@ # Create this script based on older scripts and new code. # +# This test cannot be used for the embedded server because we check here +# privileges. +--source include/not_embedded.inc + --source include/have_innodb.inc let $engine_type= InnoDB; ---source suite/funcs_1/datadict/datadict_load.inc ---enable_abort_on_error -# We look only for the tables created by datadict_load.inc. +# We look only for the tables created by suite/funcs_1/datadict/tables.inc let $my_where = WHERE table_schema LIKE 'test%' AND table_type = 'BASE TABLE'; ---source suite/funcs_1/datadict/tables1.inc - ---source suite/funcs_1/include/cleanup.inc +--source suite/funcs_1/datadict/tables.inc diff --git a/mysql-test/suite/funcs_1/t/is_tables_memory.test b/mysql-test/suite/funcs_1/t/is_tables_memory.test index 8b5da595462..68909aee866 100644 --- a/mysql-test/suite/funcs_1/t/is_tables_memory.test +++ b/mysql-test/suite/funcs_1/t/is_tables_memory.test @@ -10,13 +10,13 @@ # Create this script based on older scripts and new code. # +# This test cannot be used for the embedded server because we check here +# privileges. +--source include/not_embedded.inc + let $engine_type= MEMORY; SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION'; ---source suite/funcs_1/datadict/datadict_load.inc ---enable_abort_on_error -# We look only for the tables created by datadict_load.inc. +# We look only for the tables created by suite/funcs_1/datadict/tables.inc let $my_where = WHERE table_schema LIKE 'test%' AND table_type = 'BASE TABLE'; ---source suite/funcs_1/datadict/tables1.inc - ---source suite/funcs_1/include/cleanup.inc +--source suite/funcs_1/datadict/tables.inc diff --git a/mysql-test/suite/funcs_1/t/is_tables_myisam.test b/mysql-test/suite/funcs_1/t/is_tables_myisam.test index 4fc88364d87..c3f7c87b0ed 100644 --- a/mysql-test/suite/funcs_1/t/is_tables_myisam.test +++ b/mysql-test/suite/funcs_1/t/is_tables_myisam.test @@ -2,7 +2,9 @@ # # Check the content of information_schema.tables about tables within # the databases created by the user. -# Variant for storage engine MyISAM +# Variant for storage engine MyISAM and the non embedded server +# The expected results must equal is_columns_myisam_embedded except that +# that the privilege system works (affects some result sets). # # Author: # 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of @@ -10,13 +12,10 @@ # Create this script based on older scripts and new code. # +--source include/not_embedded.inc let $engine_type= MyISAM; SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION'; ---source suite/funcs_1/datadict/datadict_load.inc ---enable_abort_on_error -# We look only for the tables created by datadict_load.inc. +# We look only for the tables created by suite/funcs_1/datadict/tables.inc let $my_where = WHERE table_schema LIKE 'test%' AND table_type = 'BASE TABLE'; ---source suite/funcs_1/datadict/tables1.inc - ---source suite/funcs_1/include/cleanup.inc +--source suite/funcs_1/datadict/tables.inc diff --git a/mysql-test/suite/funcs_1/t/is_tables_myisam_embedded.test b/mysql-test/suite/funcs_1/t/is_tables_myisam_embedded.test new file mode 100644 index 00000000000..d4595900939 --- /dev/null +++ b/mysql-test/suite/funcs_1/t/is_tables_myisam_embedded.test @@ -0,0 +1,22 @@ +# suite/funcs_1/t/is_tables_myisam_embedded.test +# +# Check the content of information_schema.tables about tables within +# the databases created by the user. +# Variant for storage engine MyISAM and the embedded server +# The expected results must equal is_tabless_myisam except that +# that the privilege system works (affects some result sets). +# +# Author: +# 2008-06-06 mleich Create this this variant for the embedded server. +# + +if (`SELECT VERSION() NOT LIKE '%embedded%'`) +{ + --skip Test requires: embedded server +} +let $engine_type= MyISAM; +SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION'; + +# We look only for the tables created by suite/funcs_1/datadict/tables.inc +let $my_where = WHERE table_schema LIKE 'test%' AND table_type = 'BASE TABLE'; +--source suite/funcs_1/datadict/tables.inc diff --git a/mysql-test/suite/funcs_1/t/is_tables_mysql.test b/mysql-test/suite/funcs_1/t/is_tables_mysql.test index a6c3a72a1cf..838704051f8 100644 --- a/mysql-test/suite/funcs_1/t/is_tables_mysql.test +++ b/mysql-test/suite/funcs_1/t/is_tables_mysql.test @@ -2,6 +2,9 @@ # # Check the content of information_schema.tables about tables within # the database mysql (= the system tables). +# Variant for the non embedded server +# The expected results must equal is_tables_mysql_embedded except that +# that the privilege system works (affects some result sets). # # Author: # 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of @@ -9,6 +12,6 @@ # Create this script based on older scripts and new code. # +--source include/not_embedded.inc let $my_where = WHERE table_schema = 'mysql'; --source suite/funcs_1/datadict/tables1.inc - diff --git a/mysql-test/suite/funcs_1/t/is_tables_mysql_embedded.test b/mysql-test/suite/funcs_1/t/is_tables_mysql_embedded.test new file mode 100644 index 00000000000..3f4ca17cdd3 --- /dev/null +++ b/mysql-test/suite/funcs_1/t/is_tables_mysql_embedded.test @@ -0,0 +1,18 @@ +# suite/funcs_1/t/is_tables_mysql_embedded.test +# +# Check the content of information_schema.tables about tables within +# the database mysql (= the system tables). +# Variant for the embedded server +# The expected results must equal is_tables_mysql except that all users +# have all privileges (affects some result sets). +# +# Author: +# 2008-06-06 mleich Create this this variant for the embedded server. +# + +if (`SELECT VERSION() NOT LIKE '%embedded%'`) +{ + --skip Test requires: embedded server +} +let $my_where = WHERE table_schema = 'mysql'; +--source suite/funcs_1/datadict/tables1.inc diff --git a/mysql-test/suite/funcs_1/t/is_tables_ndb.test b/mysql-test/suite/funcs_1/t/is_tables_ndb.test index 49ce60b08bd..d21831b75c8 100644 --- a/mysql-test/suite/funcs_1/t/is_tables_ndb.test +++ b/mysql-test/suite/funcs_1/t/is_tables_ndb.test @@ -10,25 +10,13 @@ # Create this script based on older scripts and new code. # +# This test cannot be used for the embedded server because we check here +# privileges. +--source include/not_embedded.inc + --source include/have_ndb.inc let $engine_type= NDB; ---source suite/funcs_1/datadict/datadict_load.inc ---enable_abort_on_error -# We look only for the tables created by datadict_load.inc. +# We look only for the tables created by suite/funcs_1/datadict/tables.inc let $my_where = WHERE table_schema LIKE 'test%' AND table_type = 'BASE TABLE'; ---source suite/funcs_1/datadict/tables1.inc - -# This test runs with a different set of tables. -# --source suite/funcs_1/include/cleanup.inc -DROP DATABASE test1; -DROP DATABASE test4; -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; -DROP TABLE test.t7; -DROP TABLE test.t8; -DROP TABLE test.t9; -DROP TABLE test.t10; -DROP TABLE test.t11; +--source suite/funcs_1/datadict/tables.inc diff --git a/mysql-test/suite/funcs_1/t/is_triggers.test b/mysql-test/suite/funcs_1/t/is_triggers.test index 261f082fb50..fd42cb4e734 100644 --- a/mysql-test/suite/funcs_1/t/is_triggers.test +++ b/mysql-test/suite/funcs_1/t/is_triggers.test @@ -2,14 +2,12 @@ # # Check the layout of information_schema.triggers and the impact of # CREATE/ALTER/DROP TABLE/VIEW/SCHEMA ... on it. +# Variant for the non embedded server +# The expected results must equal is_triggers_embedded except that +# that the privilege system works (affects some result sets). # -# Note: -# This test is not intended -# - to show information about the all time existing triggers -# (there are no in the moment) within the databases information_schema -# and mysql -# - for checking storage engine properties -# Therefore please do not alter $engine_type and $other_engine_type. +# There is detailed information about this test within +# suite/funcs_1/datadict/is_triggers.inc # # Author: # 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of @@ -17,237 +15,5 @@ # Create this script based on older scripts and new code. # -# --source suite/funcs_1/datadict/datadict.pre - -let $engine_type = MEMORY; -let $other_engine_type = MyISAM; - -let $is_table = TRIGGERS; - -# The table INFORMATION_SCHEMA.TRIGGERS must exist -eval SHOW TABLES FROM information_schema LIKE '$is_table'; - ---echo ####################################################################### ---echo # Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT ---echo ####################################################################### -# Ensure that every INFORMATION_SCHEMA table can be queried with a SELECT -# statement, just as if it were an ordinary user-defined table. -# ---source suite/funcs_1/datadict/is_table_query.inc - - ---echo ######################################################################### ---echo # Testcase 3.2.12.1: INFORMATION_SCHEMA.TRIGGERS layout ---echo ######################################################################### -# Ensure that the INFORMATION_SCHEMA.TRIGGERS table has the following columns, -# in the following order: -# -# TRIGGER_CATALOG NULL -# TRIGGER_SCHEMA name of the database in which the trigger occurs -# TRIGGER_NAME -# EVENT_MANIPULATION event associated with the trigger -# ('INSERT', 'DELETE', or 'UPDATE') -# EVENT_OBJECT_CATALOG NULL -# EVENT_OBJECT_SCHEMA database in which the table associated with the -# trigger occurs -# EVENT_OBJECT_TABLE name of the table associated with the trigger -# ACTION_ORDER 0 -# ACTION_CONDITION NULL -# ACTION_STATEMENT -# ACTION_ORIENTATION ROW -# ACTION_TIMING 'BEFORE' or 'AFTER' -# ACTION_REFERENCE_OLD_TABLE NULL -# ACTION_REFERENCE_NEW_TABLE NULL -# ACTION_REFERENCE_OLD_ROW OLD -# ACTION_REFERENCE_NEW_ROW NEW -# CREATED NULL (0) -# SQL_MODE server SQL mode that was in effect at the time -# when the trigger was created -# (also used during trigger execution) -# DEFINER who defined the trigger -# ---source suite/funcs_1/datadict/datadict_bug_12777.inc -eval DESCRIBE information_schema.$is_table; ---source suite/funcs_1/datadict/datadict_bug_12777.inc -eval SHOW CREATE TABLE information_schema.$is_table; ---source suite/funcs_1/datadict/datadict_bug_12777.inc -eval SHOW COLUMNS FROM information_schema.$is_table; - - -# Note: Retrieval of information within information_schema.columns about -# information_schema.tables is in is_columns_is.test. - -# Show that several columns are always NULL. -SELECT * FROM information_schema.triggers -WHERE trigger_catalog IS NOT NULL OR event_object_catalog IS NOT NULL - OR action_condition IS NOT NULL OR action_reference_old_table IS NOT NULL - OR action_reference_new_table IS NOT NULL; - - ---echo ################################################################################## ---echo # Testcase 3.2.18.2 + 3.2.18.3: INFORMATION_SCHEMA.TRIGGERS accessible information ---echo ################################################################################## -# 3.2.18.2: Ensure that the table shows the relevant information on every -# trigger on which the current user or PUBLIC has privileges. -# 3.2.18.3: Ensure that the table does not show any information on any trigger -# on which the current user and public have no privileges. -# The SUPER privilege is required for -# - creation of triggers -# - retrieval in INFORMATION_SCHEMA.TRIGGERS (affects size of result set) -# ---disable_warnings -DROP DATABASE IF EXISTS db_datadict; ---enable_warnings -CREATE DATABASE db_datadict; ---error 0,ER_CANNOT_USER -DROP USER 'testuser1'@'localhost'; -CREATE USER 'testuser1'@'localhost'; ---error 0,ER_CANNOT_USER -DROP USER 'testuser2'@'localhost'; -CREATE USER 'testuser2'@'localhost'; ---error 0,ER_CANNOT_USER -DROP USER 'testuser3'@'localhost'; -CREATE USER 'testuser3'@'localhost'; ---error 0,ER_CANNOT_USER -DROP USER 'testuser4'@'localhost'; -CREATE USER 'testuser4'@'localhost'; - -GRANT SUPER ON *.* TO 'testuser1'@'localhost'; -GRANT SUPER ON *.* TO 'testuser3'@'localhost'; -GRANT SUPER ON *.* TO 'testuser4'@'localhost'; -GRANT ALL ON db_datadict.* TO 'testuser1'@'localhost' WITH GRANT OPTION; - -let $my_select = SELECT * FROM information_schema.triggers -WHERE trigger_name = 'trg1'; -let $my_show = SHOW TRIGGERS FROM db_datadict; ---echo # Establish connection testuser1 (user=testuser1) ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (testuser1, localhost, testuser1, , db_datadict); ---replace_result $engine_type -eval -CREATE TABLE db_datadict.t1 (f1 INT, f2 INT, f3 INT) -ENGINE = $engine_type; -CREATE TRIGGER trg1 BEFORE INSERT -ON db_datadict.t1 FOR EACH ROW SET @test_before = 2, new.f1 = @test_before; -GRANT ALL ON db_datadict.t1 TO 'testuser2'@'localhost'; -GRANT SELECT ON db_datadict.t1 TO 'testuser3'@'localhost'; -eval $my_select; -eval $my_show; - ---echo # Establish connection testuser2 (user=testuser2) ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (testuser2, localhost, testuser2, , db_datadict); -SHOW GRANTS FOR 'testuser2'@'localhost'; ---echo # No SUPER Privilege --> no result for query -eval $my_select; -eval $my_show; - ---echo # Establish connection testuser3 (user=testuser3) ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (testuser3, localhost, testuser3, , test); -SHOW GRANTS FOR 'testuser3'@'localhost'; ---echo # SUPER Privilege + SELECT Privilege on t1 --> result for query -eval $my_select; -eval $my_show; - ---echo # Establish connection testuser4 (user=testuser4) ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (testuser4, localhost, testuser4, , test); -SHOW GRANTS FOR 'testuser4'@'localhost'; ---echo # SUPER Privilege + no SELECT Privilege on t1 --> no result for query -eval $my_select; -eval $my_show; - ---echo # Switch to connection default and close connections testuser1 - testuser4 -connection default; -disconnect testuser1; -disconnect testuser2; -disconnect testuser3; -disconnect testuser4; -eval $my_select; -eval $my_show; -DROP USER 'testuser1'@'localhost'; -DROP USER 'testuser2'@'localhost'; -DROP USER 'testuser3'@'localhost'; -DROP USER 'testuser4'@'localhost'; -DROP DATABASE db_datadict; - - ---echo ######################################################################### ---echo # 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.TRIGGERS modifications ---echo ######################################################################### -# 3.2.1.13: Ensure that the creation of any new database object (e.g. table or -# column) automatically inserts all relevant information on that -# object into every appropriate INFORMATION_SCHEMA table. -# 3.2.1.14: Ensure that the alteration of any existing database object -# automatically updates all relevant information on that object in -# every appropriate INFORMATION_SCHEMA table. -# 3.2.1.15: Ensure that the dropping of any existing database object -# automatically deletes all relevant information on that object from -# every appropriate INFORMATION_SCHEMA table. -# FIXME: To be implemented - - ---echo ######################################################################## ---echo # Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and ---echo # DDL on INFORMATION_SCHEMA tables are not supported ---echo ######################################################################## -# 3.2.1.3: Ensure that no user may execute an INSERT statement on any -# INFORMATION_SCHEMA table. -# 3.2.1.4: Ensure that no user may execute an UPDATE statement on any -# INFORMATION_SCHEMA table. -# 3.2.1.5: Ensure that no user may execute a DELETE statement on any -# INFORMATION_SCHEMA table. -# 3.2.1.8: Ensure that no user may create an index on an -# INFORMATION_SCHEMA table. -# 3.2.1.9: Ensure that no user may alter the definition of an -# INFORMATION_SCHEMA table. -# 3.2.1.10: Ensure that no user may drop an INFORMATION_SCHEMA table. -# 3.2.1.11: Ensure that no user may move an INFORMATION_SCHEMA table to any -# other database. -# 3.2.1.12: Ensure that no user may directly add to, alter, or delete any data -# in an INFORMATION_SCHEMA table. -# ---disable_warnings -DROP DATABASE IF EXISTS db_datadict; ---enable_warnings -CREATE DATABASE db_datadict; ---replace_result $engine_type -eval -CREATE TABLE db_datadict.t1 (f1 BIGINT) -ENGINE = $engine_type; -CREATE TRIGGER db_datadict.trg1 BEFORE INSERT -ON db_datadict.t1 FOR EACH ROW SET @test_before = 2, new.f1 = @test_before; - ---error ER_DBACCESS_DENIED_ERROR -INSERT INTO information_schema.triggers -SELECT * FROM information_schema.triggers; - ---error ER_DBACCESS_DENIED_ERROR -UPDATE information_schema.triggers SET trigger_schema = 'test' -WHERE table_name = 't1'; - ---error ER_DBACCESS_DENIED_ERROR -DELETE FROM information_schema.triggers WHERE trigger_name = 't1'; ---error ER_DBACCESS_DENIED_ERROR -TRUNCATE information_schema.triggers; - ---error ER_DBACCESS_DENIED_ERROR -CREATE INDEX my_idx_on_triggers ON information_schema.triggers(trigger_schema); - ---error ER_DBACCESS_DENIED_ERROR -ALTER TABLE information_schema.triggers DROP PRIMARY KEY; ---error ER_DBACCESS_DENIED_ERROR -ALTER TABLE information_schema.triggers ADD f1 INT; - ---error ER_DBACCESS_DENIED_ERROR -DROP TABLE information_schema.triggers; - ---error ER_DBACCESS_DENIED_ERROR -ALTER TABLE information_schema.triggers RENAME db_datadict.triggers; ---error ER_DBACCESS_DENIED_ERROR -ALTER TABLE information_schema.triggers RENAME information_schema.xtriggers; - -# Cleanup -DROP DATABASE db_datadict; - +--source include/not_embedded.inc +--source suite/funcs_1/datadict/is_triggers.inc diff --git a/mysql-test/suite/funcs_1/t/is_triggers_embedded.test b/mysql-test/suite/funcs_1/t/is_triggers_embedded.test new file mode 100644 index 00000000000..d8e99c77bff --- /dev/null +++ b/mysql-test/suite/funcs_1/t/is_triggers_embedded.test @@ -0,0 +1,20 @@ +# suite/funcs_1/t/is_triggers_embedded.test +# +# Check the layout of information_schema.triggers and the impact of +# CREATE/ALTER/DROP TABLE/VIEW/SCHEMA ... on it. +# Variant for the embedded server +# The expected results must equal is_triggers except that all users +# have all privileges (affects some result sets). +# +# There is detailed information about this test within +# suite/funcs_1/datadict/is_triggers.inc +# +# Author: +# 2008-06-06 mleich Create this this variant for the embedded server. +# + +if (`SELECT VERSION() NOT LIKE '%embedded%'`) +{ + --skip Test requires: embedded server +} +--source suite/funcs_1/datadict/is_triggers.inc diff --git a/mysql-test/suite/funcs_1/t/is_user_privileges.test b/mysql-test/suite/funcs_1/t/is_user_privileges.test index dc39ad6fe4f..1d0d3e51aae 100644 --- a/mysql-test/suite/funcs_1/t/is_user_privileges.test +++ b/mysql-test/suite/funcs_1/t/is_user_privileges.test @@ -16,7 +16,9 @@ # Create this script based on older scripts and new code. # -# --source suite/funcs_1/datadict/datadict.pre +# This test cannot be used for the embedded server because we check here +# privileges. +--source include/not_embedded.inc let $engine_type = MEMORY; let $other_engine_type = MyISAM; diff --git a/mysql-test/suite/funcs_1/t/is_views.test b/mysql-test/suite/funcs_1/t/is_views.test index 9819fe1ffe0..b8c9c114e5f 100644 --- a/mysql-test/suite/funcs_1/t/is_views.test +++ b/mysql-test/suite/funcs_1/t/is_views.test @@ -2,13 +2,12 @@ # # Check the layout of information_schema.views and the impact of # CREATE/ALTER/DROP TABLE/VIEW/SCHEMA ... on it. +# Variant for the non embedded server +# The expected results must equal is_views_embedded except that +# that the privilege system works (affects some result sets). # -# Note: -# - This test should not check storage engine properties. -# - Please do not change the storage engines used within this test -# except you know that the impact is acceptable. -# Some storage engines might not support the modification of -# properties like in the following tests. +# There is detailed information about this test within +# suite/funcs_1/datadict/is_views.inc # # Author: # 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of @@ -16,290 +15,5 @@ # Create this script based on older scripts and new code. # -# --source suite/funcs_1/datadict/datadict.pre - -let $engine_type = MEMORY; -let $other_engine_type = MyISAM; - -let $is_table = VIEWS; - -# The table INFORMATION_SCHEMA.VIEWS must exist -eval SHOW TABLES FROM information_schema LIKE '$is_table'; - ---echo ####################################################################### ---echo # Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT ---echo ####################################################################### -# Ensure that every INFORMATION_SCHEMA table can be queried with a SELECT -# statement, just as if it were an ordinary user-defined table. -# ---source suite/funcs_1/datadict/is_table_query.inc - - ---echo ######################################################################### ---echo # Testcase 3.2.13.1: INFORMATION_SCHEMA.VIEWS layout ---echo ######################################################################### -# Ensure that the INFORMATION_SCHEMA.VIEWS table has the following columns, -# in the following order: -# -# TABLE_CATALOG (always shows NULL), -# TABLE_SCHEMA (shows the database, or schema, in which an accessible -# view resides), -# TABLE_NAME (shows the name of a view accessible to the current user), -# VIEW_DEFINITION (shows the SELECT statement that makes up the -# view's definition), -# CHECK_OPTION (shows the value of the WITH CHECK OPTION clause used to define -# the view, either NONE, LOCAL or CASCADED), -# IS_UPDATABLE (shows whether the view is an updatable view), -# DEFINER (added with 5.0.14), -# SECURITY_TYPE (added with 5.0.14). -# ---source suite/funcs_1/datadict/datadict_bug_12777.inc -eval DESCRIBE information_schema.$is_table; ---source suite/funcs_1/datadict/datadict_bug_12777.inc -eval SHOW CREATE TABLE information_schema.$is_table; ---source suite/funcs_1/datadict/datadict_bug_12777.inc -eval SHOW COLUMNS FROM information_schema.$is_table; - -# Note: Retrieval of information within information_schema.columns about -# information_schema.views is in is_columns_is.test. - -# Show that TABLE_CATALOG is always NULL. -SELECT table_catalog, table_schema, table_name -FROM information_schema.views WHERE table_catalog IS NOT NULL; - - ---echo ################################################################################ ---echo # Testcase 3.2.13.2 + 3.2.13.3: INFORMATION_SCHEMA.VIEWS accessible information ---echo ################################################################################ -# 3.2.13.2: Ensure that the table shows the relevant information on every view for -# which the current user or PUBLIC has the SHOW CREATE VIEW privilege. -# 3.2.13.3: Ensure that the table does not show any information on any views for which -# the current user and PUBLIC have no SHOW CREATE VIEW privilege. -# ---disable_warnings -DROP DATABASE IF EXISTS db_datadict; ---enable_warnings -CREATE DATABASE db_datadict; - ---error 0,ER_CANNOT_USER -DROP USER 'testuser1'@'localhost'; -CREATE USER 'testuser1'@'localhost'; ---error 0,ER_CANNOT_USER -DROP USER 'testuser2'@'localhost'; -CREATE USER 'testuser2'@'localhost'; ---error 0,ER_CANNOT_USER -DROP USER 'test_no_views'@'localhost'; -CREATE USER 'test_no_views'@'localhost'; - ---replace_result $engine_type -eval -CREATE TABLE db_datadict.t1(f1 INT, f2 INT, f3 INT) -ENGINE = $engine_type; -CREATE VIEW db_datadict.v_granted_to_1 AS SELECT * FROM db_datadict.t1; -CREATE VIEW db_datadict.v_granted_glob AS SELECT f2, f3 FROM db_datadict.t1; - -GRANT SELECT ON db_datadict.t1 TO 'testuser1'@'localhost'; -GRANT SELECT ON db_datadict.v_granted_to_1 TO 'testuser1'@'localhost'; -GRANT SHOW VIEW, CREATE VIEW ON db_datadict.* TO 'testuser2'@'localhost'; - -let $select = SELECT * FROM information_schema.views -WHERE table_schema = 'db_datadict' ORDER BY table_name; -eval $select; - ---echo # Establish connection testuser1 (user=testuser1) ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (testuser1, localhost, testuser1, , test); -eval $select; - ---echo # Establish connection testuser2 (user=testuser2) ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (testuser2, localhost, testuser2, , test); -eval $select; - ---echo # Establish connection test_no_views (user=test_no_views) ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (test_no_views, localhost, test_no_views, , test); -eval $select; - -# Cleanup ---echo # Switch to connection default and close all other connections -connection default; -disconnect testuser1; -disconnect testuser2; -disconnect test_no_views; -DROP USER 'testuser1'@'localhost'; -DROP USER 'testuser2'@'localhost'; -DROP USER 'test_no_views'@'localhost'; -DROP DATABASE db_datadict; - ---echo ######################################################################### ---echo # 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.VIEWS modifications ---echo ######################################################################### -# 3.2.1.13: Ensure that the creation of any new database object (e.g. table or -# column) automatically inserts all relevant information on that -# object into every appropriate INFORMATION_SCHEMA table. -# 3.2.1.14: Ensure that the alteration of any existing database object -# automatically updates all relevant information on that object in -# every appropriate INFORMATION_SCHEMA table. -# 3.2.1.15: Ensure that the dropping of any existing database object -# automatically deletes all relevant information on that object from -# every appropriate INFORMATION_SCHEMA table. -# ---disable_warnings -DROP TABLE IF EXISTS test.t1_my_table; -DROP DATABASE IF EXISTS db_datadict; ---enable_warnings -CREATE DATABASE db_datadict; ---replace_result $engine_type -eval -CREATE TABLE test.t1_table (f1 BIGINT, f2 CHAR(10)) -DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci -ENGINE = $engine_type; ---error 0,ER_CANNOT_USER -DROP USER 'testuser1'@'localhost'; -CREATE USER 'testuser1'@'localhost'; - -# Check just created VIEW -SELECT * FROM information_schema.views -WHERE table_name LIKE 't1_%'; -CREATE VIEW test.t1_view AS SELECT DISTINCT f1 FROM test.t1_table; -SELECT * FROM information_schema.views -WHERE table_name LIKE 't1_%'; -# -# Check modification of DEFINER, SECURITY_TYPE, IS_UPDATABLE, VIEW_DEFINITION, -# CHECK_OPTION -SELECT table_name,definer FROM information_schema.views -WHERE table_name = 't1_view'; -ALTER DEFINER = 'testuser1'@'localhost' VIEW test.t1_view AS -SELECT DISTINCT f1 FROM test.t1_table; -# The next result set could suffer from -# Bug#22763 Disrepancy between SHOW CREATE VIEW and I_S.VIEWS -# because the VIEW definition is missing. -# Therefore we exclude the problematic columns from the result set. -SELECT table_name,definer,security_type FROM information_schema.views -WHERE table_name LIKE 't1_%'; -ALTER DEFINER = 'root'@'localhost' SQL SECURITY INVOKER VIEW test.t1_view AS -SELECT f1 FROM test.t1_table WITH LOCAL CHECK OPTION; -SELECT table_name,definer,security_type FROM information_schema.views -WHERE table_name LIKE 't1_%'; -# -# Check modification of TABLE_SCHEMA -SELECT table_schema,table_name FROM information_schema.views -WHERE table_name LIKE 't1_%' -ORDER BY table_schema,table_name; ---error ER_FORBID_SCHEMA_CHANGE -RENAME TABLE test.t1_view TO db_datadict.t1_view; -# Workaround for missing move to another database -DROP VIEW test.t1_view; -CREATE VIEW db_datadict.t1_view AS SELECT * FROM test.t1_table; -SELECT table_schema,table_name FROM information_schema.views -WHERE table_name LIKE 't1_%' -ORDER BY table_schema,table_name; -# -# Check modification of TABLE_NAME -SELECT table_name FROM information_schema.views -WHERE table_name LIKE 't1_%' -ORDER BY table_name; -RENAME TABLE db_datadict.t1_view TO db_datadict.t1_viewx; -SELECT table_name FROM information_schema.views -WHERE table_name LIKE 't1_%' -ORDER BY table_name; -# -# Check impact of DROP VIEW -SELECT table_name FROM information_schema.views -WHERE table_name LIKE 't1_%' -ORDER BY table_name; -DROP VIEW db_datadict.t1_viewx; -SELECT table_name FROM information_schema.views -WHERE table_name LIKE 't1_%' -ORDER BY table_name; -CREATE VIEW db_datadict.t1_view AS SELECT * FROM test.t1_table; -# -# Check impact of DROP base TABLE of VIEW -SELECT table_name FROM information_schema.views -WHERE table_name LIKE 't1_%' -ORDER BY table_name; -DROP TABLE test.t1_table; -SELECT table_name FROM information_schema.views -WHERE table_name LIKE 't1_%' -ORDER BY table_name; ---replace_result $engine_type -eval -CREATE TABLE test.t1_table (f1 BIGINT, f2 CHAR(10)) -DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci COMMENT = 'Initial Comment' -ENGINE = $engine_type; -# -# Check impact of DROP SCHEMA -SELECT table_name FROM information_schema.views -WHERE table_name LIKE 't1_%' -ORDER BY table_name; -DROP DATABASE db_datadict; -SELECT table_name FROM information_schema.views -WHERE table_name LIKE 't1_%' -ORDER BY table_name; - -# Cleanup -DROP USER 'testuser1'@'localhost'; -DROP TABLE test.t1_table; - ---echo ######################################################################## ---echo # Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and ---echo # DDL on INFORMATION_SCHEMA table are not supported ---echo ######################################################################## -# 3.2.1.3: Ensure that no user may execute an INSERT statement on any -# INFORMATION_SCHEMA table. -# 3.2.1.4: Ensure that no user may execute an UPDATE statement on any -# INFORMATION_SCHEMA table. -# 3.2.1.5: Ensure that no user may execute a DELETE statement on any -# INFORMATION_SCHEMA table. -# 3.2.1.8: Ensure that no user may create an index on an -# INFORMATION_SCHEMA table. -# 3.2.1.9: Ensure that no user may alter the definition of an -# INFORMATION_SCHEMA table. -# 3.2.1.10: Ensure that no user may drop an INFORMATION_SCHEMA table. -# 3.2.1.11: Ensure that no user may move an INFORMATION_SCHEMA table to any -# other database. -# 3.2.1.12: Ensure that no user may directly add to, alter, or delete any data -# in an INFORMATION_SCHEMA table. -# ---disable_warnings -DROP DATABASE IF EXISTS db_datadict; ---enable_warnings -CREATE DATABASE db_datadict; -CREATE VIEW db_datadict.v1 AS SELECT 1; - ---error ER_DBACCESS_DENIED_ERROR -INSERT INTO information_schema.views -SELECT * FROM information_schema.views; ---error ER_DBACCESS_DENIED_ERROR -INSERT INTO information_schema.views(table_schema, table_name) -VALUES ('db2', 'v2'); - ---error ER_DBACCESS_DENIED_ERROR -UPDATE information_schema.views SET table_schema = 'test' -WHERE table_name = 't1'; - ---error ER_DBACCESS_DENIED_ERROR -DELETE FROM information_schema.views WHERE table_name = 't1'; ---error ER_DBACCESS_DENIED_ERROR -TRUNCATE information_schema.views; - ---error ER_DBACCESS_DENIED_ERROR -CREATE INDEX my_idx_on_views ON information_schema.views(table_schema); - ---error ER_DBACCESS_DENIED_ERROR -ALTER TABLE information_schema.views DROP PRIMARY KEY; ---error ER_DBACCESS_DENIED_ERROR -ALTER TABLE information_schema.views ADD f1 INT; - ---error ER_DBACCESS_DENIED_ERROR -DROP TABLE information_schema.views; - ---error ER_DBACCESS_DENIED_ERROR -ALTER TABLE information_schema.views RENAME db_datadict.views; ---error ER_DBACCESS_DENIED_ERROR -ALTER TABLE information_schema.views RENAME information_schema.xviews; - -# Cleanup -DROP DATABASE db_datadict; - +--source include/not_embedded.inc +--source suite/funcs_1/datadict/is_views.inc diff --git a/mysql-test/suite/funcs_1/t/is_views_embedded.test b/mysql-test/suite/funcs_1/t/is_views_embedded.test new file mode 100644 index 00000000000..66b4f59e897 --- /dev/null +++ b/mysql-test/suite/funcs_1/t/is_views_embedded.test @@ -0,0 +1,20 @@ +# suite/funcs_1/t/is_views_embedded.test +# +# Check the layout of information_schema.views and the impact of +# CREATE/ALTER/DROP TABLE/VIEW/SCHEMA ... on it. +# Variant for the embedded server +# The expected results must equal is_views except that all users +# have all privileges (affects some result sets). +# +# There is detailed information about this test within +# suite/funcs_1/datadict/is_views.inc +# +# Author: +# 2008-06-06 mleich Create this this variant for the embedded server. +# + +if (`SELECT VERSION() NOT LIKE '%embedded%'`) +{ + --skip Test requires: embedded server +} +--source suite/funcs_1/datadict/is_views.inc diff --git a/mysql-test/suite/funcs_1/t/memory_trig_0102.test b/mysql-test/suite/funcs_1/t/memory_trig_0102.test index f13ca29e583..a9e4f1142d0 100644 --- a/mysql-test/suite/funcs_1/t/memory_trig_0102.test +++ b/mysql-test/suite/funcs_1/t/memory_trig_0102.test @@ -4,5 +4,6 @@ # # Set $engine_type let $engine_type= memory; +--source suite/funcs_1/include/bug28309_skip.inc --source suite/funcs_1/triggers/triggers_0102.inc diff --git a/mysql-test/suite/funcs_1/t/memory_trig_0407.test b/mysql-test/suite/funcs_1/t/memory_trig_0407.test index be87f191b2c..93efe2d0fe8 100644 --- a/mysql-test/suite/funcs_1/t/memory_trig_0407.test +++ b/mysql-test/suite/funcs_1/t/memory_trig_0407.test @@ -4,5 +4,6 @@ # # Set $engine_type let $engine_type= memory; +--source suite/funcs_1/include/bug28309_skip.inc --source suite/funcs_1/triggers/triggers_0407.inc diff --git a/mysql-test/suite/funcs_1/t/memory_trig_1011ext.test b/mysql-test/suite/funcs_1/t/memory_trig_1011ext.test index e604d172f75..339a5a9cd9a 100644 --- a/mysql-test/suite/funcs_1/t/memory_trig_1011ext.test +++ b/mysql-test/suite/funcs_1/t/memory_trig_1011ext.test @@ -4,5 +4,6 @@ # # Set $engine_type let $engine_type= memory; +--source suite/funcs_1/include/bug28309_skip.inc --source suite/funcs_1/triggers/triggers_1011ext.inc diff --git a/mysql-test/suite/funcs_1/t/memory_views.test b/mysql-test/suite/funcs_1/t/memory_views.test index b506f08cf31..9bf9af11dfa 100644 --- a/mysql-test/suite/funcs_1/t/memory_views.test +++ b/mysql-test/suite/funcs_1/t/memory_views.test @@ -4,6 +4,7 @@ # # Set $engine_type let $engine_type= memory; +--source suite/funcs_1/include/bug28309_skip.inc # Create some objects needed in many testcases USE test; diff --git a/mysql-test/suite/funcs_1/triggers/trig_frkey.inc b/mysql-test/suite/funcs_1/triggers/trig_frkey.inc index 5d6b6a72b1e..5aba368f531 100644 --- a/mysql-test/suite/funcs_1/triggers/trig_frkey.inc +++ b/mysql-test/suite/funcs_1/triggers/trig_frkey.inc @@ -1,50 +1,59 @@ ################################################################# -# This file inclde tests that address the foreign key cases of +# This file include tests that address the foreign key cases of # the following requirements since they are specific to innodb. # Other test cases for these requirements are included in the -# triggers_master.test file. +# triggers_*.inc files. ################################################################# --disable_abort_on_error -#Section x.x.x.1 +# Section x.x.x.1 # Test case: Verifing that a trigger that activates a primary key results in # the primary key acting correctly on the foreign key let $message= Testcase x.x.x.1:; --source include/show_msg.inc - --disable_warnings - DROP TABLE IF EXISTS t0, t1, t2; - --enable_warnings +--disable_warnings +DROP TABLE IF EXISTS t0, t1, t2; +--enable_warnings - eval CREATE TABLE t0 (col1 char(50)) ENGINE=$engine_type; - eval CREATE TABLE t1 (id INT NOT NULL, col1 char(50), - PRIMARY KEY (id)) ENGINE=$engine_type; - eval CREATE TABLE t2 (id INT PRIMARY KEY, f_id INT, - INDEX par_ind (f_id), col1 char(50), - FOREIGN KEY (f_id) REFERENCES t1(id) - ON DELETE SET NULL) ENGINE=$engine_type; +--replace_result $engine_type +eval +CREATE TABLE t0 (col1 CHAR(50)) +ENGINE = $engine_type; +--replace_result $engine_type +eval +CREATE TABLE t1 (id INT NOT NULL, col1 CHAR(50), PRIMARY KEY (id)) +ENGINE = $engine_type; +--replace_result $engine_type +eval +CREATE TABLE t2 (id INT PRIMARY KEY, f_id INT, + INDEX par_ind (f_id), col1 CHAR(50), + FOREIGN KEY (f_id) REFERENCES t1(id) ON DELETE SET NULL) +ENGINE = $engine_type; - insert into t1 values (1,'Department A'); - insert into t1 values (2,'Department B'); - insert into t1 values (3,'Department C'); - insert into t2 values (1,2,'Emp 1'); - insert into t2 values (2,2,'Emp 2'); - insert into t2 values (3,2,'Emp 3'); +INSERT INTO t1 VALUES (1,'Department A'); +INSERT INTO t1 VALUES (2,'Department B'); +INSERT INTO t1 VALUES (3,'Department C'); +INSERT INTO t2 VALUES (1,2,'Emp 1'); +INSERT INTO t2 VALUES (2,2,'Emp 2'); +INSERT INTO t2 VALUES (3,2,'Emp 3'); - create trigger trig after insert on t0 for each row - delete from t1 where col1=new.col1; +CREATE TRIGGER trig AFTER INSERT ON t0 FOR EACH ROW +DELETE FROM t1 WHERE col1 = new.col1; - select * from t2; -lock tables t0 write, t1 write; - insert into t0 values ('Department B'); -unlock tables; - select * from t2; +--sorted_result +SELECT * FROM t2; +LOCK TABLES t0 WRITE, t1 WRITE; +INSERT INTO t0 VALUES ('Department B'); +UNLOCK TABLES; +--sorted_result +SELECT * FROM t2; # Cleanup - drop trigger trig; - drop table t2, t1; +DROP TRIGGER trig; +DROP TABLE t2, t1; #Section x.x.x.2 @@ -53,41 +62,47 @@ unlock tables; let $message= Testcase x.x.x.2:; --source include/show_msg.inc - --disable_warnings - DROP TABLE IF EXISTS t1, t2; - --enable_warnings +--disable_warnings +DROP TABLE IF EXISTS t1, t2; +--enable_warnings - eval CREATE TABLE t1 (id INT NOT NULL, col1 char(50), - PRIMARY KEY (id)) ENGINE=$engine_type; - eval CREATE TABLE t2 (id INT PRIMARY KEY, f_id INT, - INDEX par_ind (f_id), col1 char(50), - FOREIGN KEY (f_id) REFERENCES t1(id) - ON UPDATE CASCADE) ENGINE=$engine_type; +--replace_result $engine_type +eval +CREATE TABLE t1 (id INT NOT NULL, col1 CHAR(50), PRIMARY KEY (id)) +ENGINE = $engine_type; +--replace_result $engine_type +eval +CREATE TABLE t2 (id INT PRIMARY KEY, f_id INT, + INDEX par_ind (f_id), col1 CHAR(50), + FOREIGN KEY (f_id) REFERENCES t1(id) ON UPDATE CASCADE) +ENGINE = $engine_type; - insert into t1 values (1,'Department A'); - insert into t1 values (2,'Department B'); - insert into t1 values (3,'Department C'); - insert into t2 values (1,2,'Emp 1'); - insert into t2 values (2,3,'Emp 2'); +INSERT INTO t1 VALUES (1,'Department A'); +INSERT INTO t1 VALUES (2,'Department B'); +INSERT INTO t1 VALUES (3,'Department C'); +INSERT INTO t2 VALUES (1,2,'Emp 1'); +INSERT INTO t2 VALUES (2,3,'Emp 2'); - --error 1452 - insert into t2 values (3,4,'Emp 3'); +--error ER_NO_REFERENCED_ROW_2 +insert into t2 VALUES (3,4,'Emp 3'); - create trigger tr_t2 before insert on t2 for each row - insert into t1 values(new.f_id, concat('New Department ', new.f_id)); +CREATE TRIGGER tr_t2 BEFORE INSERT ON t2 FOR EACH ROW +INSERT INTO t1 VALUES(new.f_id, CONCAT('New Department ', new.f_id)); -lock tables t1 write, t2 write; - insert into t2 values (3,4,'Emp 3'); -unlock tables; +LOCK TABLES t1 WRITE, t2 WRITE; +INSERT INTO t2 VALUES (3,4,'Emp 3'); +UNLOCK TABLES; - select * from t1; - select * from t2; +--sorted_result +SELECT * FROM t1; +--sorted_result +SELECT * FROM t2; # Cleanup - drop trigger tr_t2; - drop table t2, t1, t0; +DROP TRIGGER tr_t2; +DROP TABLE t2, t1, t0; -let $message= Foreign Key tests disabled (bug 11472 - stored in trig_frkey2.test); ---source include/show_msg.inc - +--echo +--echo Foreign Key tests disabled (bug 11472 - stored in trig_frkey2.test) +--echo ------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/triggers/triggers_03.inc b/mysql-test/suite/funcs_1/triggers/triggers_03.inc index b0b98bf27e5..d0bfc5e9c0e 100644 --- a/mysql-test/suite/funcs_1/triggers/triggers_03.inc +++ b/mysql-test/suite/funcs_1/triggers/triggers_03.inc @@ -5,6 +5,10 @@ # (test case numbering refer to requirement document TP v1.1) #====================================================================== +# This test cannot be used for the embedded server because we check here +# privilgeges. +--source include/not_embedded.inc + USE test; --source suite/funcs_1/include/tb3.inc diff --git a/mysql-test/suite/funcs_1/views/func_view.inc b/mysql-test/suite/funcs_1/views/func_view.inc index fee9fe190b2..709560cdf99 100644 --- a/mysql-test/suite/funcs_1/views/func_view.inc +++ b/mysql-test/suite/funcs_1/views/func_view.inc @@ -92,7 +92,7 @@ # ./mysql-test-run.pl --socket=var/tmp/master.sock --start-dirty # 3. Issue the statements needed by using "mysql" or "mysqltest". # -# Maybe an internal routine of this test fails. Please ask me (ML) or +# Maybe an internal routine of this test fails. Please ask me (mleich) or # enable the logging of auxiliary queries and try to analyze the # problem. # @@ -343,7 +343,7 @@ INSERT INTO t1_values SET # fv1.inc sets t1_selects.disable_result to 'No' and the effect will be, # that the result set will be logged. # -# If you do have the time to check the result sets do the insert of the +# If you do not have the time to check the result sets do the insert of the # SELECT with function via: # eval SET @my_select = # ''; @@ -406,11 +406,11 @@ eval INSERT INTO t1_values SET select_id = @select_id, # 1. Cast Functions and Operators # 1.1 CAST # -# Note(ML): I guess the CAST routines are used in many other functions. -# Therefore check also nearly all "ugly" variants like -# CAST( AS DECIMAL) here. +# Note(mleich): I guess the CAST routines are used in many other functions. +# Therefore check also nearly all "ugly" variants like +# CAST( AS DECIMAL) here. # -# suite/funcs_1/views/fv_cast.inc contains +# suite/funcs_1/views/fv_cast.inc contains # SELECT CAST($col_type AS $target_type), ... # # @@ -771,7 +771,7 @@ $col_type, id FROM t1_values'; # # 2.2.1 IF(expr1,expr2,expr3) with expr1 = # -# Note(ML): Strings, which do not contain a number -> FALSE +# Note(mleich): Strings, which do not contain a number -> FALSE # # suite/funcs_1/views/fv_if1.inc contains # SELECT IF($col_type, 'IS TRUE', 'IS NOT TRUE'), ... @@ -818,9 +818,10 @@ let $col_type= my_year; # suite/funcs_1/views/fv_if2.inc contains # SELECT IF($col_type IS NULL, 'IS NULL', 'IS NOT NULL'), ... # -# Note(ML): July 2005 IF($col_type IS NULL, ...) is mapped to a VIEW definition -# create ... view ... as -# select if(isnull(`test`.`t1`.`f1`),_latin1'IS NULL', +# Note(mleich): July 2005 +# IF($col_type IS NULL, ...) is mapped to a VIEW definition +# create ... view ... as +# select if(isnull(`test`.`t1`.`f1`),_latin1'IS NULL', # _latin1'IS NOT NULL'),... # # Bug#11689 success on Create view .. IF(col1 IS NULL,...), col2 ; but SELECT fails diff --git a/mysql-test/suite/funcs_1/views/views_master.inc b/mysql-test/suite/funcs_1/views/views_master.inc index b6628070705..bc475c6807c 100644 --- a/mysql-test/suite/funcs_1/views/views_master.inc +++ b/mysql-test/suite/funcs_1/views/views_master.inc @@ -3998,7 +3998,7 @@ DESCRIBE v1; SELECT * FROM t1 order by f1, f2; SELECT * FROM v1 order by 2; # Some statements for comparison -# - the ugly SQRT('DEF) as constant +# - the ugly SQRT('DEF') as constant SELECT SQRT('DEF'); # - Will a VIEW based on the same definition show the same result ? CREATE VIEW v2 AS SELECT SQRT('DEF'); From b1132821afb475cf64fad2c3010f38635a7f5083 Mon Sep 17 00:00:00 2001 From: "Tatiana A. Nurnberg" Date: Tue, 17 Jun 2008 09:31:29 +0200 Subject: [PATCH 22/46] Bug#36492: make dist and make install fails Ignore BitKeeper SCCS folders in make-dist mysql-test/Makefile.am: Ignore BitKeeper SCCS folders in make-dist (copy only .txt files). --- mysql-test/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mysql-test/Makefile.am b/mysql-test/Makefile.am index 0dee970cd58..0c4a708dd14 100644 --- a/mysql-test/Makefile.am +++ b/mysql-test/Makefile.am @@ -67,7 +67,7 @@ dist-hook: $(INSTALL_DATA) $(srcdir)/std_data/*.cnf $(distdir)/std_data $(INSTALL_DATA) $(srcdir)/std_data/ndb_backup50_data_be/BACKUP* $(distdir)/std_data/ndb_backup50_data_be $(INSTALL_DATA) $(srcdir)/std_data/ndb_backup50_data_le/BACKUP* $(distdir)/std_data/ndb_backup50_data_le - $(INSTALL_DATA) $(srcdir)/std_data/funcs_1/* $(distdir)/std_data/funcs_1 + $(INSTALL_DATA) $(srcdir)/std_data/funcs_1/*.txt $(distdir)/std_data/funcs_1 $(INSTALL_DATA) $(srcdir)/lib/*.pl $(distdir)/lib -rm -rf `find $(distdir)/suite -type d -name SCCS` @@ -106,7 +106,7 @@ install-data-local: $(INSTALL_DATA) $(srcdir)/std_data/*.cnf $(DESTDIR)$(testdir)/std_data $(INSTALL_DATA) $(srcdir)/std_data/ndb_backup50_data_be/BACKUP* $(DESTDIR)$(testdir)/std_data/ndb_backup50_data_be $(INSTALL_DATA) $(srcdir)/std_data/ndb_backup50_data_le/BACKUP* $(DESTDIR)$(testdir)/std_data/ndb_backup50_data_le - $(INSTALL_DATA) $(srcdir)/std_data/funcs_1/* $(DESTDIR)$(testdir)/std_data/funcs_1 + $(INSTALL_DATA) $(srcdir)/std_data/funcs_1/*.txt $(DESTDIR)$(testdir)/std_data/funcs_1 $(INSTALL_DATA) $(srcdir)/lib/*.pl $(DESTDIR)$(testdir)/lib for f in `(cd $(srcdir); find suite -type f | grep -v SCCS)`; \ do \ From 06f3c43478ace5d2592b421866b964061e5dfce1 Mon Sep 17 00:00:00 2001 From: Mattias Jonsson Date: Tue, 17 Jun 2008 12:41:06 +0200 Subject: [PATCH 23/46] Bug#35931 Index search of partitioned MyISAM table returns erroneous results Used the wrong function when fixing 30480 which lead to no stop on end_key resulting in duplicate results from index scan Includes test cases for the duplicates 37327 and 37329, Duplicate rows and bad performance/High Handler_read_next values Recommit after merge issues mysql-test/r/partition.result: Bug#35931 List partition MyISAM table returns erroneous results added test results. mysql-test/t/partition.test: Bug#35931 List partition MyISAM table returns erroneous results added test for 35931, 37327 and 37329. sql/ha_partition.cc: Bug#35931 List partition MyISAM table returns erroneous results HA_READ_ORDER is a index_flag, not a table_flag. Error made in 30480. --- mysql-test/r/partition.result | 204 +++++++++++++++++++++++++++++++++- mysql-test/t/partition.test | 138 ++++++++++++++++++++++- sql/ha_partition.cc | 4 +- 3 files changed, 342 insertions(+), 4 deletions(-) diff --git a/mysql-test/r/partition.result b/mysql-test/r/partition.result index b13010f8471..d34fad02832 100644 --- a/mysql-test/r/partition.result +++ b/mysql-test/r/partition.result @@ -1,4 +1,206 @@ -drop table if exists t1; +drop table if exists t1, t2; +CREATE TABLE t1 ( +a INT NOT NULL, +b MEDIUMINT NOT NULL, +c INT NOT NULL, +KEY b (b) +) ENGINE=MyISAM +PARTITION BY LIST (a) ( +PARTITION p0 VALUES IN (1) +); +INSERT INTO t1 VALUES (1,1,0), (1,1,1), (1,1,2), (1,1,53), (1,1,4), (1,1,5), +(1,1,6), (1,1,7), (1,1,8), (1,1,9), (1,1,10), (1,1,11), (1,1,12), (1,1,13), +(1,1,14), (1,1,15), (1,1,16), (1,1,67), (1,1,18), (1,1,19), (1,1,20), (1,1,21), +(1,1,22), (1,1,23), (1,1,24), (1,1,75), (1,1,26), (1,1,27), (1,1,128), +(1,1,79), (1,1,30), (1,1,31), (1,1,32), (1,1,33), (1,1,34), (1,1,85), (1,1,36), +(1,1,37), (1,1,38), (1,1,39), (1,1,40), (1,1,241), (1,1,42), (1,1,43), +(1,1,44), (1,1,45), (1,1,46), (1,1,147), (1,1,48), (1,1,49), (1,2,0), (1,2,1), +(1,2,2), (1,2,3), (1,2,4), (1,2,5), (1,2,6), (1,2,7), (1,2,8), (1,2,9), +(1,2,10), (1,2,11), (1,2,12), (1,2,13), (1,2,14), (1,2,15), (1,2,16), (1,2,17), +(1,2,18), (1,2,19), (1,2,20), (1,2,21), (1,2,22), (1,2,23), (1,2,24), (1,2,25), +(1,2,26), (1,2,27), (1,2,28), (1,2,29), (1,2,30), (1,2,31), (1,2,32), (1,2,33), +(1,2,34), (1,2,35), (1,2,36), (1,2,37), (1,2,38), (1,2,39), (1,2,40), (1,2,41), +(1,2,42), (1,2,43), (1,2,44), (1,2,45), (1,2,46), (1,2,47), (1,2,48), (1,2,49), +(1,6,0), (1,6,1), (1,6,2), (1,6,3), (1,6,4), (1,6,5), (1,6,6), (1,6,7), +(1,6,8), (1,6,9), (1,6,10), (1,6,11), (1,6,12), (1,6,13), (1,6,14), (1,6,15), +(1,6,16), (1,6,17), (1,6,18), (1,6,19), (1,6,20), (1,6,21), (1,6,22), (1,6,23), +(1,6,24), (1,6,25), (1,6,26), (1,6,27), (1,6,28), (1,6,29), (1,6,30), (1,6,31), +(1,6,32), (1,6,33), (1,6,34), (1,6,35), (1,6,36), (1,6,37), (1,6,38), (1,6,39), +(1,6,40), (1,6,41), (1,6,42), (1,6,43), (1,6,44), (1,6,45), (1,6,46), (1,6,47), +(1,6,48), (1,6,49), (1,7,0), (1,7,1), (1,7,2), (1,7,3), (1,7,4), (1,7,5), +(1,7,6), (1,7,7), (1,7,8), (1,7,9), (1,7,10), (1,7,11), (1,7,12), (1,7,13), +(1,7,14), (1,7,15), (1,7,16), (1,7,17), (1,7,18), (1,7,19), (1,7,20), (1,7,21), +(1,7,22), (1,7,23), (1,7,24), (1,7,25), (1,7,26), (1,7,27), (1,7,28), (1,7,29), +(1,7,30), (1,7,31), (1,7,32), (1,7,33), (1,7,34), (1,7,35), (1,7,38), (1,7,39), +(1,7,90), (1,7,41), (1,7,43), (1,7,48), (1,7,49), (1,9,0), (1,9,1), (1,9,2), +(1,9,3), (1,9,4), (1,9,5), (1,9,6), (1,9,7), (1,9,8), (1,9,9), (1,9,10), +(1,9,11), (1,9,12), (1,9,13), (1,9,14), (1,9,15), (1,9,16), (1,9,17), (1,9,18), +(1,9,19), (1,9,20), (1,9,21), (1,9,22), (1,9,23), (1,9,24), (1,9,25), (1,9,26), +(1,9,29), (1,9,32), (1,9,35), (1,9,38), (1,10,0), (1,10,1), (1,10,2), (1,10,3), +(1,10,4), (1,10,5), (1,10,6), (1,10,7), (1,10,8), (1,10,9), (1,10,10), +(1,10,11), (1,10,13), (1,10,14), (1,10,15), (1,10,16), (1,10,17), (1,10,18), +(1,10,22), (1,10,24), (1,10,25), (1,10,26), (1,10,28), (1,10,131), (1,10,33), +(1,10,84), (1,10,35), (1,10,40), (1,10,42), (1,10,49), (1,11,0), (1,11,1), +(1,11,2), (1,11,3), (1,11,4), (1,11,5), (1,11,6), (1,11,7), (1,11,8), (1,11,9), +(1,11,10), (1,11,11), (1,11,12), (1,11,13), (1,11,14), (1,11,15), (1,11,16), +(1,11,17), (1,11,18), (1,11,19), (1,11,20), (1,11,21), (1,11,22), (1,11,23), +(1,11,24), (1,11,25), (1,11,26), (1,11,27), (1,11,28), (1,11,30), (1,11,31), +(1,11,32), (1,11,33), (1,11,34), (1,11,35), (1,11,37), (1,11,39), (1,11,40), +(1,11,42), (1,11,44), (1,11,45), (1,11,47), (1,11,48), (1,14,104), (1,14,58), +(1,14,12), (1,14,13), (1,14,15), (1,14,16), (1,14,17), (1,14,34), (1,15,0), +(1,15,1), (1,15,2), (1,15,3), (1,15,4), (1,15,5), (1,15,7), (1,15,9), +(1,15,15), (1,15,27), (1,15,49), (1,16,0), (1,16,1), (1,16,3), (1,17,4), +(1,19,1); +SELECT COUNT(*) FROM t1 WHERE b NOT IN ( 1,2,6,7,9,10,11 ); +COUNT(*) +24 +SELECT SUM(c) FROM t1 WHERE b NOT IN ( 1,2,6,7,9,10,11 ); +SUM(c) +400 +ALTER TABLE t1 DROP INDEX b; +SELECT COUNT(*) FROM t1 WHERE b NOT IN ( 1,2,6,7,9,10,11 ); +COUNT(*) +24 +SELECT SUM(c) FROM t1 WHERE b NOT IN ( 1,2,6,7,9,10,11 ); +SUM(c) +400 +ALTER TABLE t1 ENGINE = Memory; +SELECT COUNT(*) FROM t1 WHERE b NOT IN ( 1,2,6,7,9,10,11 ); +COUNT(*) +24 +SELECT SUM(c) FROM t1 WHERE b NOT IN ( 1,2,6,7,9,10,11 ); +SUM(c) +400 +ALTER TABLE t1 ADD INDEX b USING HASH (b); +SELECT COUNT(*) FROM t1 WHERE b NOT IN ( 1,2,6,7,9,10,11 ); +COUNT(*) +24 +SELECT SUM(c) FROM t1 WHERE b NOT IN ( 1,2,6,7,9,10,11 ); +SUM(c) +400 +DROP TABLE t1; +CREATE TABLE `t1` ( +`c1` int(11) DEFAULT NULL, +KEY `c1` (`c1`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +CREATE TABLE `t2` ( +`c1` int(11) DEFAULT NULL, +KEY `c1` (`c1`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (c1) (PARTITION a VALUES LESS THAN (100) ENGINE = MyISAM, PARTITION b VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */; +INSERT INTO `t1` VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),(13),(14),(15),(16),(17),(18),(19),(20); +INSERT INTO `t2` VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),(13),(14),(15),(16),(17),(18),(19),(20); +EXPLAIN PARTITIONS SELECT c1 FROM t1 WHERE (c1 > 10 AND c1 < 13) OR (c1 > 17 AND c1 < 20); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range c1 c1 5 NULL 4 Using where; Using index +FLUSH STATUS; +SELECT c1 FROM t1 WHERE (c1 > 10 AND c1 < 13) OR (c1 > 17 AND c1 < 20); +c1 +11 +12 +18 +19 +SHOW STATUS LIKE 'Handler_read_%'; +Variable_name Value +Handler_read_first 0 +Handler_read_key 2 +Handler_read_next 4 +Handler_read_prev 0 +Handler_read_rnd 0 +Handler_read_rnd_next 0 +EXPLAIN PARTITIONS SELECT c1 FROM t2 WHERE (c1 > 10 AND c1 < 13) OR (c1 > 17 AND c1 < 20); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t2 a range c1 c1 5 NULL 4 Using where; Using index +FLUSH STATUS; +SELECT c1 FROM t2 WHERE (c1 > 10 AND c1 < 13) OR (c1 > 17 AND c1 < 20); +c1 +11 +12 +18 +19 +SHOW STATUS LIKE 'Handler_read_%'; +Variable_name Value +Handler_read_first 0 +Handler_read_key 2 +Handler_read_next 4 +Handler_read_prev 0 +Handler_read_rnd 0 +Handler_read_rnd_next 0 +DROP TABLE t1,t2; +CREATE TABLE `t1` ( +`c1` int(11) DEFAULT NULL, +KEY `c1` (`c1`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +CREATE TABLE `t2` ( +`c1` int(11) DEFAULT NULL, +KEY `c1` (`c1`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (c1) (PARTITION a VALUES LESS THAN (100) ENGINE = MyISAM, PARTITION b VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */; +INSERT INTO `t1` VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),(13),(14),(15),(16),(17),(18),(19),(20); +INSERT INTO `t2` VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),(13),(14),(15),(16),(17),(18),(19),(20); +EXPLAIN PARTITIONS SELECT c1 FROM t1 WHERE (c1 > 2 AND c1 < 5); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range c1 c1 5 NULL 2 Using where; Using index +FLUSH STATUS; +SELECT c1 FROM t1 WHERE (c1 > 2 AND c1 < 5); +c1 +3 +4 +SHOW STATUS LIKE 'Handler_read_%'; +Variable_name Value +Handler_read_first 0 +Handler_read_key 1 +Handler_read_next 2 +Handler_read_prev 0 +Handler_read_rnd 0 +Handler_read_rnd_next 0 +EXPLAIN PARTITIONS SELECT c1 FROM t2 WHERE (c1 > 2 AND c1 < 5); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t2 a range c1 c1 5 NULL 2 Using where; Using index +FLUSH STATUS; +SELECT c1 FROM t2 WHERE (c1 > 2 AND c1 < 5); +c1 +3 +4 +SHOW STATUS LIKE 'Handler_read_%'; +Variable_name Value +Handler_read_first 0 +Handler_read_key 1 +Handler_read_next 2 +Handler_read_prev 0 +Handler_read_rnd 0 +Handler_read_rnd_next 0 +EXPLAIN PARTITIONS SELECT c1 FROM t1 WHERE (c1 > 12 AND c1 < 15); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range c1 c1 5 NULL 2 Using where; Using index +FLUSH STATUS; +SELECT c1 FROM t1 WHERE (c1 > 12 AND c1 < 15); +c1 +13 +14 +SHOW STATUS LIKE 'Handler_read_%'; +Variable_name Value +Handler_read_first 0 +Handler_read_key 1 +Handler_read_next 2 +Handler_read_prev 0 +Handler_read_rnd 0 +Handler_read_rnd_next 0 +EXPLAIN PARTITIONS SELECT c1 FROM t2 WHERE (c1 > 12 AND c1 < 15); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t2 a range c1 c1 5 NULL 2 Using where; Using index +FLUSH STATUS; +SELECT c1 FROM t2 WHERE (c1 > 12 AND c1 < 15); +c1 +13 +14 +SHOW STATUS LIKE 'Handler_read_%'; +Variable_name Value +Handler_read_first 0 +Handler_read_key 1 +Handler_read_next 2 +Handler_read_prev 0 +Handler_read_rnd 0 +Handler_read_rnd_next 0 +DROP TABLE t1,t2; create table t1 (a int) partition by list ((a/3)*10 div 1) (partition p0 values in (0), partition p1 values in (1)); ERROR HY000: This partition function is not allowed diff --git a/mysql-test/t/partition.test b/mysql-test/t/partition.test index c4e447988db..669da7ee993 100644 --- a/mysql-test/t/partition.test +++ b/mysql-test/t/partition.test @@ -11,9 +11,145 @@ --source include/have_partition.inc --disable_warnings -drop table if exists t1; +drop table if exists t1, t2; --enable_warnings +# +# Bug35931: Index search may return duplicates +# +CREATE TABLE t1 ( + a INT NOT NULL, + b MEDIUMINT NOT NULL, + c INT NOT NULL, + KEY b (b) +) ENGINE=MyISAM +PARTITION BY LIST (a) ( + PARTITION p0 VALUES IN (1) +); +INSERT INTO t1 VALUES (1,1,0), (1,1,1), (1,1,2), (1,1,53), (1,1,4), (1,1,5), +(1,1,6), (1,1,7), (1,1,8), (1,1,9), (1,1,10), (1,1,11), (1,1,12), (1,1,13), +(1,1,14), (1,1,15), (1,1,16), (1,1,67), (1,1,18), (1,1,19), (1,1,20), (1,1,21), +(1,1,22), (1,1,23), (1,1,24), (1,1,75), (1,1,26), (1,1,27), (1,1,128), +(1,1,79), (1,1,30), (1,1,31), (1,1,32), (1,1,33), (1,1,34), (1,1,85), (1,1,36), +(1,1,37), (1,1,38), (1,1,39), (1,1,40), (1,1,241), (1,1,42), (1,1,43), +(1,1,44), (1,1,45), (1,1,46), (1,1,147), (1,1,48), (1,1,49), (1,2,0), (1,2,1), +(1,2,2), (1,2,3), (1,2,4), (1,2,5), (1,2,6), (1,2,7), (1,2,8), (1,2,9), +(1,2,10), (1,2,11), (1,2,12), (1,2,13), (1,2,14), (1,2,15), (1,2,16), (1,2,17), +(1,2,18), (1,2,19), (1,2,20), (1,2,21), (1,2,22), (1,2,23), (1,2,24), (1,2,25), +(1,2,26), (1,2,27), (1,2,28), (1,2,29), (1,2,30), (1,2,31), (1,2,32), (1,2,33), +(1,2,34), (1,2,35), (1,2,36), (1,2,37), (1,2,38), (1,2,39), (1,2,40), (1,2,41), +(1,2,42), (1,2,43), (1,2,44), (1,2,45), (1,2,46), (1,2,47), (1,2,48), (1,2,49), +(1,6,0), (1,6,1), (1,6,2), (1,6,3), (1,6,4), (1,6,5), (1,6,6), (1,6,7), +(1,6,8), (1,6,9), (1,6,10), (1,6,11), (1,6,12), (1,6,13), (1,6,14), (1,6,15), +(1,6,16), (1,6,17), (1,6,18), (1,6,19), (1,6,20), (1,6,21), (1,6,22), (1,6,23), +(1,6,24), (1,6,25), (1,6,26), (1,6,27), (1,6,28), (1,6,29), (1,6,30), (1,6,31), +(1,6,32), (1,6,33), (1,6,34), (1,6,35), (1,6,36), (1,6,37), (1,6,38), (1,6,39), +(1,6,40), (1,6,41), (1,6,42), (1,6,43), (1,6,44), (1,6,45), (1,6,46), (1,6,47), +(1,6,48), (1,6,49), (1,7,0), (1,7,1), (1,7,2), (1,7,3), (1,7,4), (1,7,5), +(1,7,6), (1,7,7), (1,7,8), (1,7,9), (1,7,10), (1,7,11), (1,7,12), (1,7,13), +(1,7,14), (1,7,15), (1,7,16), (1,7,17), (1,7,18), (1,7,19), (1,7,20), (1,7,21), +(1,7,22), (1,7,23), (1,7,24), (1,7,25), (1,7,26), (1,7,27), (1,7,28), (1,7,29), + (1,7,30), (1,7,31), (1,7,32), (1,7,33), (1,7,34), (1,7,35), (1,7,38), (1,7,39), +(1,7,90), (1,7,41), (1,7,43), (1,7,48), (1,7,49), (1,9,0), (1,9,1), (1,9,2), +(1,9,3), (1,9,4), (1,9,5), (1,9,6), (1,9,7), (1,9,8), (1,9,9), (1,9,10), +(1,9,11), (1,9,12), (1,9,13), (1,9,14), (1,9,15), (1,9,16), (1,9,17), (1,9,18), +(1,9,19), (1,9,20), (1,9,21), (1,9,22), (1,9,23), (1,9,24), (1,9,25), (1,9,26), +(1,9,29), (1,9,32), (1,9,35), (1,9,38), (1,10,0), (1,10,1), (1,10,2), (1,10,3), +(1,10,4), (1,10,5), (1,10,6), (1,10,7), (1,10,8), (1,10,9), (1,10,10), +(1,10,11), (1,10,13), (1,10,14), (1,10,15), (1,10,16), (1,10,17), (1,10,18), +(1,10,22), (1,10,24), (1,10,25), (1,10,26), (1,10,28), (1,10,131), (1,10,33), +(1,10,84), (1,10,35), (1,10,40), (1,10,42), (1,10,49), (1,11,0), (1,11,1), +(1,11,2), (1,11,3), (1,11,4), (1,11,5), (1,11,6), (1,11,7), (1,11,8), (1,11,9), +(1,11,10), (1,11,11), (1,11,12), (1,11,13), (1,11,14), (1,11,15), (1,11,16), +(1,11,17), (1,11,18), (1,11,19), (1,11,20), (1,11,21), (1,11,22), (1,11,23), +(1,11,24), (1,11,25), (1,11,26), (1,11,27), (1,11,28), (1,11,30), (1,11,31), +(1,11,32), (1,11,33), (1,11,34), (1,11,35), (1,11,37), (1,11,39), (1,11,40), +(1,11,42), (1,11,44), (1,11,45), (1,11,47), (1,11,48), (1,14,104), (1,14,58), +(1,14,12), (1,14,13), (1,14,15), (1,14,16), (1,14,17), (1,14,34), (1,15,0), +(1,15,1), (1,15,2), (1,15,3), (1,15,4), (1,15,5), (1,15,7), (1,15,9), +(1,15,15), (1,15,27), (1,15,49), (1,16,0), (1,16,1), (1,16,3), (1,17,4), +(1,19,1); +SELECT COUNT(*) FROM t1 WHERE b NOT IN ( 1,2,6,7,9,10,11 ); +SELECT SUM(c) FROM t1 WHERE b NOT IN ( 1,2,6,7,9,10,11 ); +ALTER TABLE t1 DROP INDEX b; +SELECT COUNT(*) FROM t1 WHERE b NOT IN ( 1,2,6,7,9,10,11 ); +SELECT SUM(c) FROM t1 WHERE b NOT IN ( 1,2,6,7,9,10,11 ); +ALTER TABLE t1 ENGINE = Memory; +SELECT COUNT(*) FROM t1 WHERE b NOT IN ( 1,2,6,7,9,10,11 ); +SELECT SUM(c) FROM t1 WHERE b NOT IN ( 1,2,6,7,9,10,11 ); +ALTER TABLE t1 ADD INDEX b USING HASH (b); +SELECT COUNT(*) FROM t1 WHERE b NOT IN ( 1,2,6,7,9,10,11 ); +SELECT SUM(c) FROM t1 WHERE b NOT IN ( 1,2,6,7,9,10,11 ); +DROP TABLE t1; + +# Bug#37327 Range scan on partitioned table returns duplicate rows +# (Duplicate of Bug#35931) +CREATE TABLE `t1` ( + `c1` int(11) DEFAULT NULL, + KEY `c1` (`c1`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; + +CREATE TABLE `t2` ( + `c1` int(11) DEFAULT NULL, + KEY `c1` (`c1`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (c1) (PARTITION a VALUES LESS THAN (100) ENGINE = MyISAM, PARTITION b VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */; + +INSERT INTO `t1` VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),(13),(14),(15),(16),(17),(18),(19),(20); +INSERT INTO `t2` VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),(13),(14),(15),(16),(17),(18),(19),(20); + +EXPLAIN PARTITIONS SELECT c1 FROM t1 WHERE (c1 > 10 AND c1 < 13) OR (c1 > 17 AND c1 < 20); + +FLUSH STATUS; +SELECT c1 FROM t1 WHERE (c1 > 10 AND c1 < 13) OR (c1 > 17 AND c1 < 20); +SHOW STATUS LIKE 'Handler_read_%'; + +EXPLAIN PARTITIONS SELECT c1 FROM t2 WHERE (c1 > 10 AND c1 < 13) OR (c1 > 17 AND c1 < 20); + +FLUSH STATUS; +SELECT c1 FROM t2 WHERE (c1 > 10 AND c1 < 13) OR (c1 > 17 AND c1 < 20); +SHOW STATUS LIKE 'Handler_read_%'; +DROP TABLE t1,t2; + +# Bug#37329 Range scan on partitioned tables shows higher Handler_read_next +# (marked as duplicate of Bug#35931) +CREATE TABLE `t1` ( + `c1` int(11) DEFAULT NULL, + KEY `c1` (`c1`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; + +CREATE TABLE `t2` ( + `c1` int(11) DEFAULT NULL, + KEY `c1` (`c1`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (c1) (PARTITION a VALUES LESS THAN (100) ENGINE = MyISAM, PARTITION b VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */; + +INSERT INTO `t1` VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),(13),(14),(15),(16),(17),(18),(19),(20); +INSERT INTO `t2` VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),(13),(14),(15),(16),(17),(18),(19),(20); + +EXPLAIN PARTITIONS SELECT c1 FROM t1 WHERE (c1 > 2 AND c1 < 5); + +FLUSH STATUS; +SELECT c1 FROM t1 WHERE (c1 > 2 AND c1 < 5); +SHOW STATUS LIKE 'Handler_read_%'; + +EXPLAIN PARTITIONS SELECT c1 FROM t2 WHERE (c1 > 2 AND c1 < 5); + +FLUSH STATUS; +SELECT c1 FROM t2 WHERE (c1 > 2 AND c1 < 5); +SHOW STATUS LIKE 'Handler_read_%'; + +EXPLAIN PARTITIONS SELECT c1 FROM t1 WHERE (c1 > 12 AND c1 < 15); + +FLUSH STATUS; +SELECT c1 FROM t1 WHERE (c1 > 12 AND c1 < 15); +SHOW STATUS LIKE 'Handler_read_%'; + +EXPLAIN PARTITIONS SELECT c1 FROM t2 WHERE (c1 > 12 AND c1 < 15); + +FLUSH STATUS; +SELECT c1 FROM t2 WHERE (c1 > 12 AND c1 < 15); +SHOW STATUS LIKE 'Handler_read_%'; +DROP TABLE t1,t2; + --error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED create table t1 (a int) partition by list ((a/3)*10 div 1) (partition p0 values in (0), partition p1 values in (1)); diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index 2e0bb090ad2..3a78e6601f0 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -4045,7 +4045,7 @@ int ha_partition::handle_unordered_next(uchar *buf, bool is_next_same) } else if (!(error= file->index_next(buf))) { - if (!(file->ha_table_flags() & HA_READ_ORDER) || + if (!(file->index_flags(active_index, 0, 1) & HA_READ_ORDER) || compare_key(end_range) <= 0) { m_last_part= m_part_spec.start_part; @@ -4123,7 +4123,7 @@ int ha_partition::handle_unordered_scan_next_partition(uchar * buf) } if (!error) { - if (!(file->ha_table_flags() & HA_READ_ORDER) || + if (!(file->index_flags(active_index, 0, 1) & HA_READ_ORDER) || compare_key(end_range) <= 0) { m_last_part= i; From 5d237db6f6719e7a1132bdb664ac2206c7bb8a9b Mon Sep 17 00:00:00 2001 From: Davi Arnaut Date: Tue, 17 Jun 2008 11:12:21 -0300 Subject: [PATCH 24/46] Bug#33873: Fast ALTER TABLE doesn't work with multibyte character sets The problem was that when comparing tables for a possible fast alter table, the comparison was being performed using the parsed information and not the final definition. The solution is to use the possible final table layout to compare if a fast alter is possible or not. mysql-test/include/mix1.inc: Disable test case for Bug 21704 as it hasn't been fixed. mysql-test/r/alter_table.result: Add test case result for Bug#33873 mysql-test/r/innodb_mysql.result: Update test case result mysql-test/t/alter_table.test: Add test case for Bug#33873 sql/sql_table.cc: Use updated (final) information to compare fields. --- mysql-test/include/mix1.inc | 50 +++++++++-------- mysql-test/r/alter_table.result | 39 +++++++++++++ mysql-test/r/innodb_mysql.result | 13 ----- mysql-test/t/alter_table.test | 34 +++++++++++ sql/sql_table.cc | 96 ++++++++++++++++++-------------- 5 files changed, 152 insertions(+), 80 deletions(-) diff --git a/mysql-test/include/mix1.inc b/mysql-test/include/mix1.inc index fdac8deb87e..c33cc5be588 100644 --- a/mysql-test/include/mix1.inc +++ b/mysql-test/include/mix1.inc @@ -1428,29 +1428,31 @@ DROP TABLE t1; # Bug#21704: Renaming column does not update FK definition. # ---disable_warnings -DROP TABLE IF EXISTS t1; -DROP TABLE IF EXISTS t2; ---enable_warnings - -CREATE TABLE t1(id INT PRIMARY KEY) - ENGINE=innodb; - -CREATE TABLE t2( - t1_id INT PRIMARY KEY, - CONSTRAINT fk1 FOREIGN KEY (t1_id) REFERENCES t1(id)) - ENGINE=innodb; - ---echo - ---disable_result_log ---error ER_ERROR_ON_RENAME -ALTER TABLE t1 CHANGE id id2 INT; ---enable_result_log - ---echo - -DROP TABLE t2; -DROP TABLE t1; +# +# --disable_warnings +# DROP TABLE IF EXISTS t1; +# DROP TABLE IF EXISTS t2; +# --enable_warnings +# +# CREATE TABLE t1(id INT PRIMARY KEY) +# ENGINE=innodb; +# +# CREATE TABLE t2( +# t1_id INT PRIMARY KEY, +# CONSTRAINT fk1 FOREIGN KEY (t1_id) REFERENCES t1(id)) +# ENGINE=innodb; +# +# --echo +# +# --disable_result_log +# --error ER_ERROR_ON_RENAME +# ALTER TABLE t1 CHANGE id id2 INT; +# --enable_result_log +# +# --echo +# +# DROP TABLE t2; +# DROP TABLE t1; +# --echo End of 5.1 tests diff --git a/mysql-test/r/alter_table.result b/mysql-test/r/alter_table.result index 3cec1f546d2..d6986f4a956 100644 --- a/mysql-test/r/alter_table.result +++ b/mysql-test/r/alter_table.result @@ -1184,3 +1184,42 @@ check table t1; Table Op Msg_type Msg_text test.t1 check status OK drop table t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (id int, c int) character set latin1; +INSERT INTO t1 VALUES (1,1); +ALTER TABLE t1 CHANGE c d int; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +ALTER TABLE t1 CHANGE d c int; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +ALTER TABLE t1 MODIFY c VARCHAR(10); +affected rows: 1 +info: Records: 1 Duplicates: 0 Warnings: 0 +ALTER TABLE t1 CHANGE c d varchar(10); +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +ALTER TABLE t1 CHANGE d c varchar(10); +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (id int, c int) character set utf8; +INSERT INTO t1 VALUES (1,1); +ALTER TABLE t1 CHANGE c d int; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +ALTER TABLE t1 CHANGE d c int; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +ALTER TABLE t1 MODIFY c VARCHAR(10); +affected rows: 1 +info: Records: 1 Duplicates: 0 Warnings: 0 +ALTER TABLE t1 CHANGE c d varchar(10); +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +ALTER TABLE t1 CHANGE d c varchar(10); +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +DROP TABLE t1; +End of 5.1 tests diff --git a/mysql-test/r/innodb_mysql.result b/mysql-test/r/innodb_mysql.result index ab279933853..b6bcd7b0ada 100644 --- a/mysql-test/r/innodb_mysql.result +++ b/mysql-test/r/innodb_mysql.result @@ -1640,19 +1640,6 @@ vid tid idx name type 3 1 2 c1 NULL 3 1 1 pk NULL DROP TABLE t1; -DROP TABLE IF EXISTS t1; -DROP TABLE IF EXISTS t2; -CREATE TABLE t1(id INT PRIMARY KEY) -ENGINE=innodb; -CREATE TABLE t2( -t1_id INT PRIMARY KEY, -CONSTRAINT fk1 FOREIGN KEY (t1_id) REFERENCES t1(id)) -ENGINE=innodb; - -ALTER TABLE t1 CHANGE id id2 INT; - -DROP TABLE t2; -DROP TABLE t1; End of 5.1 tests drop table if exists t1, t2, t3; create table t1(a int); diff --git a/mysql-test/t/alter_table.test b/mysql-test/t/alter_table.test index 99c9ae23801..662f9095810 100644 --- a/mysql-test/t/alter_table.test +++ b/mysql-test/t/alter_table.test @@ -914,3 +914,37 @@ unlock tables; select * from t1; check table t1; drop table t1; + +# +# Bug#33873: Fast ALTER TABLE doesn't work with multibyte character sets +# + +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings +CREATE TABLE t1 (id int, c int) character set latin1; +INSERT INTO t1 VALUES (1,1); +--enable_info +ALTER TABLE t1 CHANGE c d int; +ALTER TABLE t1 CHANGE d c int; +ALTER TABLE t1 MODIFY c VARCHAR(10); +ALTER TABLE t1 CHANGE c d varchar(10); +ALTER TABLE t1 CHANGE d c varchar(10); +--disable_info +DROP TABLE t1; + +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings +CREATE TABLE t1 (id int, c int) character set utf8; +INSERT INTO t1 VALUES (1,1); +--enable_info +ALTER TABLE t1 CHANGE c d int; +ALTER TABLE t1 CHANGE d c int; +ALTER TABLE t1 MODIFY c VARCHAR(10); +ALTER TABLE t1 CHANGE c d varchar(10); +ALTER TABLE t1 CHANGE d c varchar(10); +--disable_info +DROP TABLE t1; + +--echo End of 5.1 tests diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 7c847e0817c..77344aca987 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -5145,51 +5145,51 @@ compare_tables(TABLE *table, Field **f_ptr, *field; uint changes= 0, tmp; uint key_count; - List_iterator_fast new_field_it(alter_info->create_list); - Create_field *new_field; + List_iterator_fast new_field_it, tmp_new_field_it; + Create_field *new_field, *tmp_new_field; KEY_PART_INFO *key_part; KEY_PART_INFO *end; + THD *thd= table->in_use; /* Remember if the new definition has new VARCHAR column; create_info->varchar will be reset in mysql_prepare_create_table. */ bool varchar= create_info->varchar; + /* + Create a copy of alter_info. + To compare the new and old table definitions, we need to "prepare" + the new definition - transform it from parser output to a format + that describes the final table layout (all column defaults are + initialized, duplicate columns are removed). This is done by + mysql_prepare_create_table. Unfortunately, + mysql_prepare_create_table performs its transformations + "in-place", that is, modifies the argument. Since we would + like to keep compare_tables() idempotent (not altering any + of the arguments) we create a copy of alter_info here and + pass it to mysql_prepare_create_table, then use the result + to evaluate possibility of fast ALTER TABLE, and then + destroy the copy. + */ + Alter_info tmp_alter_info(*alter_info, thd->mem_root); + uint db_options= 0; /* not used */ + DBUG_ENTER("compare_tables"); - { - THD *thd= table->in_use; - /* - Create a copy of alter_info. - To compare the new and old table definitions, we need to "prepare" - the new definition - transform it from parser output to a format - that describes the final table layout (all column defaults are - initialized, duplicate columns are removed). This is done by - mysql_prepare_create_table. Unfortunately, - mysql_prepare_create_table performs its transformations - "in-place", that is, modifies the argument. Since we would - like to keep compare_tables() idempotent (not altering any - of the arguments) we create a copy of alter_info here and - pass it to mysql_prepare_create_table, then use the result - to evaluate possibility of fast ALTER TABLE, and then - destroy the copy. - */ - Alter_info tmp_alter_info(*alter_info, thd->mem_root); - uint db_options= 0; /* not used */ - /* Create the prepared information. */ - if (mysql_prepare_create_table(thd, create_info, - &tmp_alter_info, - (table->s->tmp_table != NO_TMP_TABLE), - &db_options, - table->file, key_info_buffer, - &key_count, 0)) - DBUG_RETURN(1); - /* Allocate result buffers. */ - if (! (*index_drop_buffer= - (uint*) thd->alloc(sizeof(uint) * table->s->keys)) || - ! (*index_add_buffer= - (uint*) thd->alloc(sizeof(uint) * tmp_alter_info.key_list.elements))) - DBUG_RETURN(1); - } + /* Create the prepared information. */ + if (mysql_prepare_create_table(thd, create_info, + &tmp_alter_info, + (table->s->tmp_table != NO_TMP_TABLE), + &db_options, + table->file, key_info_buffer, + &key_count, 0)) + DBUG_RETURN(1); + /* Allocate result buffers. */ + if (! (*index_drop_buffer= + (uint*) thd->alloc(sizeof(uint) * table->s->keys)) || + ! (*index_add_buffer= + (uint*) thd->alloc(sizeof(uint) * tmp_alter_info.key_list.elements))) + DBUG_RETURN(1); + /* Some very basic checks. If number of fields changes, or the handler, we need to run full ALTER TABLE. In the future @@ -5232,19 +5232,29 @@ compare_tables(TABLE *table, DBUG_RETURN(0); } + /* + Use transformed info to evaluate possibility of fast ALTER TABLE + but use the preserved field to persist modifications. + */ + new_field_it.init(alter_info->create_list); + tmp_new_field_it.init(tmp_alter_info.create_list); + /* Go through fields and check if the original ones are compatible with new table. */ - for (f_ptr= table->field, new_field= new_field_it++; - (field= *f_ptr); f_ptr++, new_field= new_field_it++) + for (f_ptr= table->field, new_field= new_field_it++, + tmp_new_field= tmp_new_field_it++; + (field= *f_ptr); + f_ptr++, new_field= new_field_it++, + tmp_new_field= tmp_new_field_it++) { /* Make sure we have at least the default charset in use. */ if (!new_field->charset) new_field->charset= create_info->default_table_charset; /* Check that NULL behavior is same for old and new fields */ - if ((new_field->flags & NOT_NULL_FLAG) != + if ((tmp_new_field->flags & NOT_NULL_FLAG) != (uint) (field->flags & NOT_NULL_FLAG)) { *need_copy_table= ALTER_TABLE_DATA_CHANGED; @@ -5253,8 +5263,8 @@ compare_tables(TABLE *table, /* Don't pack rows in old tables if the user has requested this. */ if (create_info->row_type == ROW_TYPE_DYNAMIC || - (new_field->flags & BLOB_FLAG) || - new_field->sql_type == MYSQL_TYPE_VARCHAR && + (tmp_new_field->flags & BLOB_FLAG) || + tmp_new_field->sql_type == MYSQL_TYPE_VARCHAR && create_info->row_type != ROW_TYPE_FIXED) create_info->table_options|= HA_OPTION_PACK_RECORD; @@ -5262,11 +5272,11 @@ compare_tables(TABLE *table, field->flags&= ~FIELD_IS_RENAMED; if (my_strcasecmp(system_charset_info, field->field_name, - new_field->field_name)) + tmp_new_field->field_name)) field->flags|= FIELD_IS_RENAMED; /* Evaluate changes bitmap and send to check_if_incompatible_data() */ - if (!(tmp= field->is_equal(new_field))) + if (!(tmp= field->is_equal(tmp_new_field))) { *need_copy_table= ALTER_TABLE_DATA_CHANGED; DBUG_RETURN(0); From fb8f32d0774876f79f7e3d9aa714c0ecb67adaca Mon Sep 17 00:00:00 2001 From: Davi Arnaut Date: Wed, 18 Jun 2008 13:17:15 -0300 Subject: [PATCH 25/46] Bug#37003 Tests sporadically crashes with embedded server The problem was that when a embedded linked version of mysqltest crashed there was no way to obtain a stack trace if no core file is available. Another problem is that the embedded version of libmysql was not behaving (crash) the same as the non-embedded with respect to sending commands to a explicitly closed connection. The solution is to generate a mysqltest's stack trace on crash and to enable "reconnect" if the connection handle was explicitly closed so the behavior matches the non-embedded one. client/CMakeLists.txt: Link mysys to mysqltest. client/Makefile.am: Link mysys to mysqltest. client/mysqltest.c: Add fatal signal handling with backtracing for Unix and Windows. configure.in: Add check for weak symbols support and remove a spurious word. include/Makefile.am: Add new header with prototype for stack tracing functions. include/my_stacktrace.h: Add new header with prototype for stack tracing functions. libmysqld/CMakeLists.txt: stack tracing is now part of mysys. libmysqld/Makefile.am: stack tracing is now part of mysys. libmysqld/lib_sql.cc: Re-connect if connection was explicitly closed. This is done to match the behavior of the non-embeded libmysql. mysql-test/t/sql_low_priority_updates_func.test: Test expects parallelism between queries that cannot be guaranteed under embedded. mysys/CMakeLists.txt: Add stacktrace to mysys. mysys/Makefile.am: Add stacktrace to mysys. mysys/stacktrace.c: Move stacktrace to mysys and add weak symbol for the C++ name de-mangling function so that it can later be overridden in C++ code. Also add my_ prefix to exported functions. sql/CMakeLists.txt: stacktrace was moved to mysys. sql/Makefile.am: stacktrace was moved to mysys. sql/mysqld.cc: Add my_ prefix to mysys functions. --- client/CMakeLists.txt | 8 +- client/Makefile.am | 12 ++- client/mysqltest.c | 92 +++++++++++++++++++ configure.in | 12 ++- include/Makefile.am | 2 +- include/my_stacktrace.h | 61 ++++++++++++ libmysqld/CMakeLists.txt | 3 +- libmysqld/Makefile.am | 2 +- libmysqld/lib_sql.cc | 9 ++ .../t/sql_low_priority_updates_func.test | 1 + mysys/CMakeLists.txt | 2 +- mysys/Makefile.am | 2 +- {sql => mysys}/stacktrace.c | 47 ++++++---- sql/CMakeLists.txt | 2 +- sql/Makefile.am | 4 +- sql/mysqld.cc | 14 +-- sql/stacktrace.h | 69 -------------- 17 files changed, 227 insertions(+), 115 deletions(-) create mode 100644 include/my_stacktrace.h rename {sql => mysys}/stacktrace.c (95%) delete mode 100644 sql/stacktrace.h diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index a20db4134c2..cbd4a1f306b 100755 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -15,7 +15,7 @@ INCLUDE("${PROJECT_SOURCE_DIR}/win/mysql_manifest.cmake") # We use the "mysqlclient_notls" library here just as safety, in case -# any of the clients here would go beond the client API and access the +# any of the clients here would go beyond the client API and access the # Thread Local Storage directly. SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX") @@ -32,9 +32,9 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ADD_EXECUTABLE(mysql completion_hash.cc mysql.cc readline.cc sql_string.cc ../mysys/my_conio.c) TARGET_LINK_LIBRARIES(mysql mysqlclient_notls wsock32) -ADD_EXECUTABLE(mysqltest mysqltest.c ../mysys/my_getsystime.c - ../mysys/my_copy.c ../mysys/my_mkdir.c) -TARGET_LINK_LIBRARIES(mysqltest mysqlclient_notls regex wsock32) +ADD_EXECUTABLE(mysqltest mysqltest.c) +SET_SOURCE_FILES_PROPERTIES(mysqltest.c PROPERTIES COMPILE_FLAGS "-DTHREADS") +TARGET_LINK_LIBRARIES(mysqltest mysqlclient mysys regex wsock32 dbug) ADD_EXECUTABLE(mysqlcheck mysqlcheck.c) TARGET_LINK_LIBRARIES(mysqlcheck mysqlclient_notls wsock32) diff --git a/client/Makefile.am b/client/Makefile.am index c57a5673367..940766ac66c 100644 --- a/client/Makefile.am +++ b/client/Makefile.am @@ -86,11 +86,13 @@ mysqlslap_LDADD = $(CXXLDFLAGS) $(CLIENT_THREAD_LIBS) \ $(LIBMYSQLCLIENT_LA) \ $(top_builddir)/mysys/libmysys.a -mysqltest_SOURCES= mysqltest.c \ - $(top_srcdir)/mysys/my_getsystime.c \ - $(top_srcdir)/mysys/my_copy.c \ - $(top_srcdir)/mysys/my_mkdir.c -mysqltest_LDADD = $(top_builddir)/regex/libregex.a $(LDADD) +mysqltest_SOURCES= mysqltest.c +mysqltest_CFLAGS= -DTHREAD -UUNDEF_THREADS_HACK +mysqltest_LDADD = $(CXXLDFLAGS) $(CLIENT_THREAD_LIBS) \ + @CLIENT_EXTRA_LDFLAGS@ \ + $(LIBMYSQLCLIENT_LA) \ + $(top_builddir)/mysys/libmysys.a \ + $(top_builddir)/regex/libregex.a mysql_upgrade_SOURCES= mysql_upgrade.c \ $(top_srcdir)/mysys/my_getpagesize.c diff --git a/client/mysqltest.c b/client/mysqltest.c index bd7a84e2d6a..5cc0951cdf5 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -48,7 +48,14 @@ #ifdef __WIN__ #include #endif +#include +#ifdef __WIN__ +#include +#define SIGNAL_FMT "exception 0x%x" +#else +#define SIGNAL_FMT "signal %d" +#endif /* Use cygwin for --exec and --system before 5.0 */ #if MYSQL_VERSION_ID < 50000 @@ -214,6 +221,7 @@ struct st_connection /* Used when creating views and sp, to avoid implicit commit */ MYSQL* util_mysql; char *name; + size_t name_len; MYSQL_STMT* stmt; #ifdef EMBEDDED_LIBRARY @@ -4436,6 +4444,7 @@ void do_connect(struct st_command *command) ds_connection_name.str)); if (!(con_slot->name= my_strdup(ds_connection_name.str, MYF(MY_WME)))) die("Out of memory"); + con_slot->name_len= strlen(con_slot->name); cur_con= con_slot; if (con_slot == next_con) @@ -6839,6 +6848,87 @@ void mark_progress(struct st_command* command __attribute__((unused)), } +static sig_handler dump_backtrace(int sig) +{ + struct st_connection *conn= cur_con; + + fprintf(stderr, "mysqltest got " SIGNAL_FMT "\n", sig); + my_safe_print_str("read_command_buf", read_command_buf, + sizeof(read_command_buf)); + if (conn) + { + my_safe_print_str("conn->name", conn->name, conn->name_len); +#ifdef EMBEDDED_LIBRARY + my_safe_print_str("conn->cur_query", conn->cur_query, conn->cur_query_len); +#endif + } + fputs("Attempting backtrace...\n", stderr); + my_print_stacktrace(NULL, my_thread_stack_size); +} + +#ifdef __WIN__ + +LONG WINAPI exception_filter(EXCEPTION_POINTERS *exp) +{ + __try + { + my_set_exception_pointers(exp); + dump_backtrace(exp->ExceptionRecord->ExceptionCode); + } + __except(EXCEPTION_EXECUTE_HANDLER) + { + fputs("Got exception in exception handler!\n", stderr); + } + + return EXCEPTION_CONTINUE_SEARCH; +} + + +static void init_signal_handling(void) +{ + UINT mode; + + /* Set output destination of messages to the standard error stream. */ + _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE); + _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR); + _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_FILE); + _CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDERR); + _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_FILE); + _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR); + + /* Do not not display the a error message box. */ + mode= SetErrorMode(0) | SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX; + SetErrorMode(mode); + + SetUnhandledExceptionFilter(exception_filter); +} + +#else /* __WIN__ */ + +static void init_signal_handling(void) +{ + struct sigaction sa; + DBUG_ENTER("init_signal_handling"); + + my_init_stacktrace(); + + sa.sa_flags = SA_RESETHAND | SA_NODEFER; + sigemptyset(&sa.sa_mask); + sigprocmask(SIG_SETMASK, &sa.sa_mask, NULL); + + sa.sa_handler= dump_backtrace; + + sigaction(SIGSEGV, &sa, NULL); + sigaction(SIGABRT, &sa, NULL); +#ifdef SIGBUS + sigaction(SIGBUS, &sa, NULL); +#endif + sigaction(SIGILL, &sa, NULL); + sigaction(SIGFPE, &sa, NULL); +} + +#endif /* !__WIN__ */ + int main(int argc, char **argv) { struct st_command *command; @@ -6851,6 +6941,8 @@ int main(int argc, char **argv) save_file[0]= 0; TMPDIR[0]= 0; + init_signal_handling(); + /* Init expected errors */ memset(&saved_expected_errors, 0, sizeof(saved_expected_errors)); diff --git a/configure.in b/configure.in index af23b6035eb..033cabf1875 100644 --- a/configure.in +++ b/configure.in @@ -2341,10 +2341,20 @@ then fi AC_MSG_RESULT("$netinet_inc") +AC_CACHE_CHECK([support for weak symbols], mysql_cv_weak_symbol, +[AC_TRY_LINK([],[ + extern void __attribute__((weak)) foo(void); +], [mysql_cv_weak_symbol=yes], [mysql_cv_weak_symbol=no])]) + +if test "x$mysql_cv_weak_symbol" = xyes; then + AC_DEFINE(HAVE_WEAK_SYMBOL, 1, + [Define to 1 if compiler supports weak symbol attribute.]) +fi + AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_CHECK_HEADERS(cxxabi.h) -AC_CACHE_CHECK([checking for abi::__cxa_demangle], mysql_cv_cxa_demangle, +AC_CACHE_CHECK([for abi::__cxa_demangle], mysql_cv_cxa_demangle, [AC_TRY_LINK([#include ], [ char *foo= 0; int bar= 0; foo= abi::__cxa_demangle(foo, foo, 0, &bar); diff --git a/include/Makefile.am b/include/Makefile.am index 6f3e559cb23..f04afa06cb1 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -36,7 +36,7 @@ noinst_HEADERS = config-win.h config-netware.h my_bit.h \ mysql_version.h.in my_handler.h my_time.h \ my_vle.h my_user.h my_atomic.h atomic/nolock.h \ atomic/rwlock.h atomic/x86-gcc.h atomic/x86-msvc.h \ - atomic/gcc_builtins.h my_libwrap.h + atomic/gcc_builtins.h my_libwrap.h my_stacktrace.h # Remove built files and the symlinked directories CLEANFILES = $(BUILT_SOURCES) readline openssl diff --git a/include/my_stacktrace.h b/include/my_stacktrace.h new file mode 100644 index 00000000000..3d51ba92ee1 --- /dev/null +++ b/include/my_stacktrace.h @@ -0,0 +1,61 @@ +/* Copyright (C) 2000 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#ifndef _my_stacktrace_h_ +#define _my_stacktrace_h_ + +#include + +#ifdef TARGET_OS_LINUX +#if defined (__x86_64__) || defined (__i386__) || \ + (defined(__alpha__) && defined(__GNUC__)) +#define HAVE_STACKTRACE 1 +#endif +#elif defined(__WIN__) +#define HAVE_STACKTRACE 1 +#endif + +#if !defined(__NETWARE__) +#define HAVE_WRITE_CORE +#endif + +#if HAVE_BACKTRACE && HAVE_BACKTRACE_SYMBOLS && \ + HAVE_CXXABI_H && HAVE_ABI_CXA_DEMANGLE && \ + HAVE_WEAK_SYMBOL +#define BACKTRACE_DEMANGLE 1 +#endif + +C_MODE_START + +#if defined(HAVE_STACKTRACE) || defined(HAVE_BACKTRACE) +void my_init_stacktrace(); +void my_print_stacktrace(uchar* stack_bottom, ulong thread_stack); +void my_safe_print_str(const char* name, const char* val, int max_len); +void my_write_core(int sig); +#if BACKTRACE_DEMANGLE +char *my_demangle(const char *mangled_name, int *status); +#endif +#ifdef __WIN__ +void my_set_exception_pointers(EXCEPTION_POINTERS *ep); +#endif +#endif + +#ifdef HAVE_WRITE_CORE +void my_write_core(int sig); +#endif + +C_MODE_END + +#endif /* _my_stacktrace_h_ */ diff --git a/libmysqld/CMakeLists.txt b/libmysqld/CMakeLists.txt index 97c718627d1..1582f0898d8 100644 --- a/libmysqld/CMakeLists.txt +++ b/libmysqld/CMakeLists.txt @@ -185,8 +185,7 @@ SET(LIBMYSQLD_SOURCES emb_qcache.cc libmysqld.c lib_sql.cc ../sql/strfunc.cc ../sql/table.cc ../sql/thr_malloc.cc ../sql/time.cc ../sql/tztime.cc ../sql/uniques.cc ../sql/unireg.cc ../sql/partition_info.cc ../sql/sql_connect.cc - ../sql/scheduler.cc ../sql/stacktrace.c - ../sql/event_parse_data.cc + ../sql/scheduler.cc ../sql/event_parse_data.cc ${GEN_SOURCES} ${LIB_SOURCES}) diff --git a/libmysqld/Makefile.am b/libmysqld/Makefile.am index 504980cbd07..ef2fab2da6d 100644 --- a/libmysqld/Makefile.am +++ b/libmysqld/Makefile.am @@ -69,7 +69,7 @@ sqlsources = derror.cc field.cc field_conv.cc strfunc.cc filesort.cc \ sql_select.cc sql_do.cc sql_show.cc set_var.cc \ sql_string.cc sql_table.cc sql_test.cc sql_udf.cc \ sql_update.cc sql_yacc.cc table.cc thr_malloc.cc time.cc \ - unireg.cc uniques.cc stacktrace.c sql_union.cc hash_filo.cc \ + unireg.cc uniques.cc sql_union.cc hash_filo.cc \ spatial.cc gstream.cc sql_help.cc tztime.cc sql_cursor.cc \ sp_head.cc sp_pcontext.cc sp.cc sp_cache.cc sp_rcontext.cc \ parse_file.cc sql_view.cc sql_trigger.cc my_decimal.cc \ diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc index 591b76f61ad..e1c8ab5abb4 100644 --- a/libmysqld/lib_sql.cc +++ b/libmysqld/lib_sql.cc @@ -79,6 +79,15 @@ emb_advanced_command(MYSQL *mysql, enum enum_server_command command, my_bool result= 1; THD *thd=(THD *) mysql->thd; NET *net= &mysql->net; + my_bool stmt_skip= stmt ? stmt->state != MYSQL_STMT_INIT_DONE : FALSE; + + if (!thd) + { + /* Do "reconnect" if possible */ + if (mysql_reconnect(mysql) || stmt_skip) + return 1; + thd= (THD *) mysql->thd; + } #if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER) thd->profiling.start_new_query(); diff --git a/mysql-test/t/sql_low_priority_updates_func.test b/mysql-test/t/sql_low_priority_updates_func.test index a427adf3ad3..6ff684af6cd 100644 --- a/mysql-test/t/sql_low_priority_updates_func.test +++ b/mysql-test/t/sql_low_priority_updates_func.test @@ -19,6 +19,7 @@ # # ############################################################################### +--source include/not_embedded.inc ################################################################ # sql_low_priority_updates was renamed to low_priority_updates # diff --git a/mysys/CMakeLists.txt b/mysys/CMakeLists.txt index 60e75c96b75..545278485d1 100755 --- a/mysys/CMakeLists.txt +++ b/mysys/CMakeLists.txt @@ -39,7 +39,7 @@ SET(MYSYS_SOURCES array.c charset-def.c charset.c checksum.c default.c default_ my_mkdir.c my_mmap.c my_net.c my_once.c my_open.c my_pread.c my_pthread.c my_quick.c my_read.c my_realloc.c my_redel.c my_rename.c my_seek.c my_sleep.c my_static.c my_symlink.c my_symlink2.c my_sync.c my_thr_init.c my_wincond.c - my_windac.c my_winthread.c my_write.c ptr_cmp.c queues.c + my_windac.c my_winthread.c my_write.c ptr_cmp.c queues.c stacktrace.c rijndael.c safemalloc.c sha1.c string.c thr_alarm.c thr_lock.c thr_mutex.c thr_rwlock.c tree.c typelib.c my_vle.c base64.c my_memmem.c my_getpagesize.c) diff --git a/mysys/Makefile.am b/mysys/Makefile.am index 1c50160c3f4..3312c692c09 100644 --- a/mysys/Makefile.am +++ b/mysys/Makefile.am @@ -51,7 +51,7 @@ libmysys_a_SOURCES = my_init.c my_getwd.c mf_getdate.c my_mmap.c \ charset.c charset-def.c my_bitmap.c my_bit.c md5.c \ my_gethostbyname.c rijndael.c my_aes.c sha1.c \ my_handler.c my_netware.c my_largepage.c \ - my_memmem.c \ + my_memmem.c stacktrace.c \ my_windac.c my_access.c base64.c my_libwrap.c EXTRA_DIST = thr_alarm.c thr_lock.c my_pthread.c my_thr_init.c \ thr_mutex.c thr_rwlock.c \ diff --git a/sql/stacktrace.c b/mysys/stacktrace.c similarity index 95% rename from sql/stacktrace.c rename to mysys/stacktrace.c index 5c3411aa8b1..7466dcb416e 100644 --- a/sql/stacktrace.c +++ b/mysys/stacktrace.c @@ -17,7 +17,7 @@ #define DONT_DEFINE_VOID 1 #include -#include "stacktrace.h" +#include #ifndef __WIN__ #include @@ -33,16 +33,22 @@ #define PTR_SANE(p) ((p) && (char*)(p) >= heap_start && (char*)(p) <= heap_end) -char *heap_start; +static char *heap_start; +extern char *__bss_start; -void safe_print_str(const char* name, const char* val, int max_len) +void my_init_stacktrace() +{ + heap_start = (char*) &__bss_start; +} + +void my_safe_print_str(const char* name, const char* val, int max_len) { char *heap_end= (char*) sbrk(0); fprintf(stderr, "%s at %p ", name, val); if (!PTR_SANE(val)) { - fprintf(stderr, " is invalid pointer\n"); + fprintf(stderr, "is an invalid pointer\n"); return; } @@ -103,6 +109,12 @@ inline uint32* find_prev_pc(uint32* pc, uchar** fp) #endif /* defined(__alpha__) && defined(__GNUC__) */ #if BACKTRACE_DEMANGLE + +char __attribute__ ((weak)) *my_demangle(const char *mangled_name, int *status) +{ + return NULL; +} + static void my_demangle_symbols(char **addrs, int n) { int status, i; @@ -158,7 +170,7 @@ static void backtrace_current_thread(void) #endif -void print_stacktrace(uchar* stack_bottom, ulong thread_stack) +void my_print_stacktrace(uchar* stack_bottom, ulong thread_stack) { #if HAVE_BACKTRACE backtrace_current_thread(); @@ -281,16 +293,7 @@ end: #endif /* HAVE_STACKTRACE */ /* Produce a core for the thread */ - -#ifdef NOT_USED /* HAVE_LINUXTHREADS */ -void write_core(int sig) -{ - signal(sig, SIG_DFL); - if (fork() != 0) exit(1); /* Abort main program */ - /* Core will be written at exit */ -} -#else -void write_core(int sig) +void my_write_core(int sig) { signal(sig, SIG_DFL); #ifdef HAVE_gcov @@ -308,7 +311,7 @@ void write_core(int sig) sigsend(P_PID,P_MYID,sig); #endif } -#endif + #else /* __WIN__*/ #include @@ -356,6 +359,10 @@ static EXCEPTION_POINTERS *exception_ptrs; #define MODULE64_SIZE_WINXP 576 #define STACKWALK_MAX_FRAMES 64 +void my_init_stacktrace() +{ +} + /* Dynamically load dbghelp functions */ @@ -395,7 +402,7 @@ BOOL init_dbghelp_functions() return rc; } -void set_exception_pointers(EXCEPTION_POINTERS *ep) +void my_set_exception_pointers(EXCEPTION_POINTERS *ep) { exception_ptrs = ep; } @@ -405,7 +412,7 @@ void set_exception_pointers(EXCEPTION_POINTERS *ep) #define SYMOPT_NO_PROMPTS 0 #endif -void print_stacktrace(uchar* unused1, ulong unused2) +void my_print_stacktrace(uchar* unused1, ulong unused2) { HANDLE hProcess= GetCurrentProcess(); HANDLE hThread= GetCurrentThread(); @@ -513,7 +520,7 @@ void print_stacktrace(uchar* unused1, ulong unused2) file name is constructed from executable name plus ".dmp" extension */ -void write_core(int unused) +void my_write_core(int unused) { char path[MAX_PATH]; char dump_fname[MAX_PATH]= "core.dmp"; @@ -560,7 +567,7 @@ void write_core(int unused) } -void safe_print_str(const char *name, const char *val, int len) +void my_safe_print_str(const char *name, const char *val, int len) { fprintf(stderr,"%s at %p", name, val); __try diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt index 128fcbeddf0..5ab29aff69c 100755 --- a/sql/CMakeLists.txt +++ b/sql/CMakeLists.txt @@ -43,7 +43,7 @@ ADD_DEFINITIONS(-DMYSQL_SERVER -D_CONSOLE -DHAVE_DLOPEN -DHAVE_EVENT_SCHEDULER) ADD_EXECUTABLE(mysqld ../sql-common/client.c derror.cc des_key_file.cc - discover.cc ../libmysql/errmsg.c field.cc stacktrace.c stacktrace.h field_conv.cc + discover.cc ../libmysql/errmsg.c field.cc field_conv.cc filesort.cc gstream.cc ha_partition.cc handler.cc hash_filo.cc hash_filo.h diff --git a/sql/Makefile.am b/sql/Makefile.am index 5b5f7aa1c5d..b9de9b279a3 100644 --- a/sql/Makefile.am +++ b/sql/Makefile.am @@ -66,7 +66,7 @@ noinst_HEADERS = item.h item_func.h item_sum.h item_cmpfunc.h \ sql_repl.h slave.h rpl_filter.h rpl_injector.h \ log_event.h rpl_record.h \ log_event_old.h rpl_record_old.h \ - stacktrace.h sql_sort.h sql_cache.h set_var.h \ + sql_sort.h sql_cache.h set_var.h \ spatial.h gstream.h client_settings.h tzfile.h \ tztime.h my_decimal.h\ sp_head.h sp_pcontext.h sp_rcontext.h sp.h sp_cache.h \ @@ -110,7 +110,7 @@ mysqld_SOURCES = sql_lex.cc sql_handler.cc sql_partition.cc \ rpl_reporting.cc \ sql_union.cc sql_derived.cc \ sql_client.cc \ - stacktrace.c repl_failsafe.h repl_failsafe.cc \ + repl_failsafe.h repl_failsafe.cc \ sql_olap.cc sql_view.cc \ gstream.cc spatial.cc sql_help.cc sql_cursor.cc \ tztime.cc my_decimal.cc\ diff --git a/sql/mysqld.cc b/sql/mysqld.cc index e34356215e2..0bbd0abe9b9 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -22,7 +22,7 @@ #include "sql_repl.h" #include "rpl_filter.h" #include "repl_failsafe.h" -#include "stacktrace.h" +#include #include "mysqld_suffix.h" #include "mysys_err.h" #include "events.h" @@ -2049,7 +2049,7 @@ LONG WINAPI my_unhandler_exception_filter(EXCEPTION_POINTERS *ex_pointers) #endif /* DEBUG_UNHANDLED_EXCEPTION_FILTER */ __try { - set_exception_pointers(ex_pointers); + my_set_exception_pointers(ex_pointers); handle_segfault(ex_pointers->ExceptionRecord->ExceptionCode); } __except(EXCEPTION_EXECUTE_HANDLER) @@ -2432,8 +2432,8 @@ the thread stack. Please read http://dev.mysql.com/doc/mysql/en/linux.html\n\n", Attempting backtrace. You can use the following information to find out\n\ where mysqld died. If you see no messages after this, something went\n\ terribly wrong...\n"); - print_stacktrace(thd ? (uchar*) thd->thread_stack : (uchar*) 0, - my_thread_stack_size); + my_print_stacktrace(thd ? (uchar*) thd->thread_stack : NULL, + my_thread_stack_size); } if (thd) { @@ -2457,7 +2457,7 @@ terribly wrong...\n"); } fprintf(stderr, "Trying to get some variables.\n\ Some pointers may be invalid and cause the dump to abort...\n"); - safe_print_str("thd->query", thd->query, 1024); + my_safe_print_str("thd->query", thd->query, 1024); fprintf(stderr, "thd->thread_id=%lu\n", (ulong) thd->thread_id); fprintf(stderr, "thd->killed=%s\n", kreason); } @@ -2504,7 +2504,7 @@ bugs.\n"); { fprintf(stderr, "Writing a core file\n"); fflush(stderr); - write_core(sig); + my_write_core(sig); } #endif @@ -2538,7 +2538,7 @@ static void init_signals(void) sigemptyset(&sa.sa_mask); sigprocmask(SIG_SETMASK,&sa.sa_mask,NULL); - init_stacktrace(); + my_init_stacktrace(); #if defined(__amiga__) sa.sa_handler=(void(*)())handle_segfault; #else diff --git a/sql/stacktrace.h b/sql/stacktrace.h deleted file mode 100644 index 498f4f197fc..00000000000 --- a/sql/stacktrace.h +++ /dev/null @@ -1,69 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifdef __cplusplus -extern "C" { -#endif - -#if HAVE_BACKTRACE && HAVE_BACKTRACE_SYMBOLS && HAVE_CXXABI_H && HAVE_ABI_CXA_DEMANGLE -#define BACKTRACE_DEMANGLE 1 -#endif - -#if BACKTRACE_DEMANGLE -char *my_demangle(const char *mangled_name, int *status); -#endif - -#ifdef TARGET_OS_LINUX -#if defined(HAVE_STACKTRACE) || (defined (__x86_64__) || defined (__i386__) || (defined(__alpha__) && defined(__GNUC__))) -#undef HAVE_STACKTRACE -#define HAVE_STACKTRACE - -extern char* __bss_start; -extern char* heap_start; - -#define init_stacktrace() do { \ - heap_start = (char*) &__bss_start; \ - } while(0); -void check_thread_lib(void); -#endif /* defined (__i386__) || (defined(__alpha__) && defined(__GNUC__))) */ -#elif defined (__WIN__) -#define HAVE_STACKTRACE -extern void set_exception_pointers(EXCEPTION_POINTERS *ep); -#define init_stacktrace() {} -#endif - -#ifdef HAVE_STACKTRACE -void print_stacktrace(uchar* stack_bottom, ulong thread_stack); -void safe_print_str(const char* name, const char* val, int max_len); -#else -/* Define empty prototypes for functions that are not implemented */ -#define init_stacktrace() {} -#define print_stacktrace(A,B) {} -#define safe_print_str(A,B,C) {} -#endif /* HAVE_STACKTRACE */ - - -#if !defined(__NETWARE__) -#define HAVE_WRITE_CORE -#endif - -#ifdef HAVE_WRITE_CORE -void write_core(int sig); -#endif - - -#ifdef __cplusplus -} -#endif From f13393db226d6bd77f02d1fac111f09a5126623d Mon Sep 17 00:00:00 2001 From: "Tatiana A. Nurnberg" Date: Thu, 19 Jun 2008 05:08:41 +0200 Subject: [PATCH 26/46] Fixed bug #37004. The value of JOIN::tables must be set to 0 when there is no matching min/max row. mysql-test/r/subselect.result: Added a test case for bug #37004. mysql-test/t/subselect.test: Added a test case for bug #37004. --- mysql-test/r/subselect.result | 7 +++++++ mysql-test/t/subselect.test | 12 ++++++++++++ sql/sql_select.cc | 2 ++ 3 files changed, 21 insertions(+) diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index ce4ac00b791..923bc2254bd 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -4391,3 +4391,10 @@ SELECT * FROM t1 WHERE _utf8'a' = ANY (SELECT s1 FROM t1); s1 a DROP TABLE t1; +CREATE TABLE t1(c int, KEY(c)); +CREATE TABLE t2(a int, b int); +INSERT INTO t2 VALUES (1, 10), (2, NULL); +INSERT INTO t1 VALUES (1), (3); +SELECT * FROM t2 WHERE b NOT IN (SELECT max(t.c) FROM t1, t1 t WHERE t.c>10); +a b +DROP TABLE t1,t2; diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test index ee3a7428d4a..daaba671f34 100644 --- a/mysql-test/t/subselect.test +++ b/mysql-test/t/subselect.test @@ -3273,3 +3273,15 @@ INSERT INTO t1 VALUES ('a'); SELECT * FROM t1 WHERE _utf8'a' = ANY (SELECT s1 FROM t1); DROP TABLE t1; +# +# Bug #37004: NOT IN subquery with MAX over an empty set +# + +CREATE TABLE t1(c int, KEY(c)); +CREATE TABLE t2(a int, b int); +INSERT INTO t2 VALUES (1, 10), (2, NULL); +INSERT INTO t1 VALUES (1), (3); + +SELECT * FROM t2 WHERE b NOT IN (SELECT max(t.c) FROM t1, t1 t WHERE t.c>10); + +DROP TABLE t1,t2; diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 2ef7aa13dd8..2ee92018410 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -888,6 +888,7 @@ JOIN::optimize() { DBUG_PRINT("info",("No matching min/max row")); zero_result_cause= "No matching min/max row"; + tables= 0; error=0; DBUG_RETURN(0); } @@ -901,6 +902,7 @@ JOIN::optimize() { DBUG_PRINT("info",("No matching min/max row")); zero_result_cause= "No matching min/max row"; + tables= 0; error=0; DBUG_RETURN(0); } From 7887a52d5ccd02b6fe39128d5474f5807b65c148 Mon Sep 17 00:00:00 2001 From: "Tatiana A. Nurnberg" Date: Thu, 19 Jun 2008 05:12:28 +0200 Subject: [PATCH 27/46] Bug#35480: BOM detection code crashes mysql CLI with zero-sized input MySQL client crashed if no input was passed to it. client/mysql.cc: Check if there's any data before reading it! --- client/mysql.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/mysql.cc b/client/mysql.cc index 234180c3c75..2ef987492b7 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -1821,7 +1821,7 @@ static int read_and_execute(bool interactive) the very beginning of a text file when you save the file using "Unicode UTF-8" format. */ - if (!line_number && + if (line && !line_number && (uchar) line[0] == 0xEF && (uchar) line[1] == 0xBB && (uchar) line[2] == 0xBF) From b564002d2b6ca01bd28362b76a2c3b199e051605 Mon Sep 17 00:00:00 2001 From: "Tatiana A. Nurnberg" Date: Thu, 19 Jun 2008 06:44:22 +0200 Subject: [PATCH 28/46] Bug#36434: ha_innodb.so is installed in the wrong directory ha_innodb.so was incorrectly installed in the lib/mysql directory rather than in lib/mysql/plugin. Amending CS for 31736. storage/innobase/Makefile.am: Install innobase to plugin-dir, not lib-dir. --- storage/innobase/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/innobase/Makefile.am b/storage/innobase/Makefile.am index 563522cd032..b5e5c5375dc 100644 --- a/storage/innobase/Makefile.am +++ b/storage/innobase/Makefile.am @@ -159,7 +159,7 @@ libinnobase_a_CXXFLAGS= $(AM_CFLAGS) libinnobase_a_CFLAGS = $(AM_CFLAGS) EXTRA_LTLIBRARIES = ha_innodb.la -pkglib_LTLIBRARIES = @plugin_innobase_shared_target@ +pkgplugin_LTLIBRARIES= @plugin_innobase_shared_target@ ha_innodb_la_LDFLAGS = -module -rpath $(pkgplugindir) ha_innodb_la_CXXFLAGS= $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN From b4a45a712179865d2415a9e7df6761aa126dab2a Mon Sep 17 00:00:00 2001 From: "Tatiana A. Nurnberg" Date: Thu, 19 Jun 2008 12:39:48 +0200 Subject: [PATCH 29/46] re 36818: rpl_server_id1 fails expecting slave has stopped On a slow environment like valgrind the test is vulnerable because it does not check if slave has stopped at time of the new session is requested `start slave;' -- disabling test till it is fixed. mysql-test/suite/rpl/t/disabled.def: disable rpl_server_id1 until test is fixed. --- mysql-test/suite/rpl/t/disabled.def | 1 + 1 file changed, 1 insertion(+) diff --git a/mysql-test/suite/rpl/t/disabled.def b/mysql-test/suite/rpl/t/disabled.def index e107651c6d0..a356d45c2cc 100644 --- a/mysql-test/suite/rpl/t/disabled.def +++ b/mysql-test/suite/rpl/t/disabled.def @@ -12,3 +12,4 @@ rpl_redirect : Failure is sporadic and and the test is superfluous (mats) rpl_innodb_bug28430 : Failure on Solaris Bug #36793 +rpl_server_id1 : Bug #36818 rpl_server_id1 fails expecting slave has stopped (azundris) From c8bc6a5d1bb53eb5231f229731a4429d8f0d2827 Mon Sep 17 00:00:00 2001 From: Gleb Shchepa Date: Thu, 19 Jun 2008 18:02:04 +0500 Subject: [PATCH 30/46] Fixed bug #37076: TIMESTAMP/DATETIME/DATE values are not replicated correctly between machines with mixed endiannes mysql-test/extra/rpl_tests/rpl_row_basic.test: Added regression test for bug#37076. mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result: Added regression test for bug#37076. mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result: Added regression test for bug#37076. mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result: Added regression test for bug#37076. sql/field.h: Fixed bug #37076: TIMESTAMP/DATETIME/DATE values are not replicated correctly between machines with mixed endiannes pack and unpack virtual methods have been overloaded for Field_timestamp (TIMESTAMP domain), Field_datetime (DATETIME domain) and Field_date (DATE domain) classes to replicate data between platforms with different endiannes in a correct way like in Field_long and Field_longlong classes. Common code have been moved to private handle_int32 and handle_int64 private methods. --- mysql-test/extra/rpl_tests/rpl_row_basic.test | 16 ++ .../suite/rpl/r/rpl_row_basic_2myisam.result | 10 + .../suite/rpl/r/rpl_row_basic_3innodb.result | 10 + .../suite/rpl_ndb/r/rpl_row_basic_7ndb.result | 10 + sql/field.h | 182 +++++++++++------- 5 files changed, 162 insertions(+), 66 deletions(-) diff --git a/mysql-test/extra/rpl_tests/rpl_row_basic.test b/mysql-test/extra/rpl_tests/rpl_row_basic.test index 48ddbaf244a..f2142ccc4d4 100644 --- a/mysql-test/extra/rpl_tests/rpl_row_basic.test +++ b/mysql-test/extra/rpl_tests/rpl_row_basic.test @@ -265,6 +265,22 @@ eval SELECT "$last_error" AS Last_SQL_Error; enable_query_log; query_vertical SELECT COUNT(*) FROM t1 ORDER BY c1,c2; +# BUG#37076: TIMESTAMP/DATETIME values are not replicated correctly +# between machines with mixed endiannes +# (regression test) + +--echo **** Test for BUG#37076 **** +--echo **** On Master **** +connection master; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (a TIMESTAMP, b DATETIME, c DATE); +INSERT INTO t1 VALUES( + '2005-11-14 01:01:01', '2005-11-14 01:01:02', '2005-11-14'); + +--echo **** On Slave **** +sync_slave_with_master slave; +SELECT * FROM t1; + # # cleanup # diff --git a/mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result b/mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result index 22284a26412..ecd59005b59 100644 --- a/mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result +++ b/mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result @@ -440,4 +440,14 @@ Last_SQL_Error 0 SELECT COUNT(*) FROM t1 ORDER BY c1,c2; COUNT(*) 0 +**** Test for BUG#37076 **** +**** On Master **** +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (a TIMESTAMP, b DATETIME, c DATE); +INSERT INTO t1 VALUES( +'2005-11-14 01:01:01', '2005-11-14 01:01:02', '2005-11-14'); +**** On Slave **** +SELECT * FROM t1; +a b c +2005-11-14 01:01:01 2005-11-14 01:01:02 2005-11-14 DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8; diff --git a/mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result b/mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result index f7b9e5d627a..4fc2bc6d714 100644 --- a/mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result +++ b/mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result @@ -440,4 +440,14 @@ Last_SQL_Error 0 SELECT COUNT(*) FROM t1 ORDER BY c1,c2; COUNT(*) 0 +**** Test for BUG#37076 **** +**** On Master **** +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (a TIMESTAMP, b DATETIME, c DATE); +INSERT INTO t1 VALUES( +'2005-11-14 01:01:01', '2005-11-14 01:01:02', '2005-11-14'); +**** On Slave **** +SELECT * FROM t1; +a b c +2005-11-14 01:01:01 2005-11-14 01:01:02 2005-11-14 DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result b/mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result index 08232817e92..b1554bec156 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result @@ -440,4 +440,14 @@ Last_SQL_Error 0 SELECT COUNT(*) FROM t1 ORDER BY c1,c2; COUNT(*) 0 +**** Test for BUG#37076 **** +**** On Master **** +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (a TIMESTAMP, b DATETIME, c DATE); +INSERT INTO t1 VALUES( +'2005-11-14 01:01:01', '2005-11-14 01:01:02', '2005-11-14'); +**** On Slave **** +SELECT * FROM t1; +a b c +2005-11-14 01:01:01 2005-11-14 01:01:02 2005-11-14 DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8; diff --git a/sql/field.h b/sql/field.h index 479a71dfee5..c71f54d8165 100644 --- a/sql/field.h +++ b/sql/field.h @@ -529,6 +529,77 @@ private: */ virtual int do_save_field_metadata(uchar *metadata_ptr) { return 0; } + +protected: + /* + Helper function to pack()/unpack() int32 values + */ + static void handle_int32(uchar *to, const uchar *from, + bool low_byte_first_from, bool low_byte_first_to) + { + int32 val; +#ifdef WORDS_BIGENDIAN + if (low_byte_first_from) + val = sint4korr(from); + else +#endif + longget(val, from); + +#ifdef WORDS_BIGENDIAN + if (low_byte_first_to) + int4store(to, val); + else +#endif + longstore(to, val); + } + + /* + Helper function to pack()/unpack() int64 values + */ + static void handle_int64(uchar* to, const uchar *from, + bool low_byte_first_from, bool low_byte_first_to) + { + int64 val; +#ifdef WORDS_BIGENDIAN + if (low_byte_first_from) + val = sint8korr(from); + else +#endif + longlongget(val, from); + +#ifdef WORDS_BIGENDIAN + if (low_byte_first_to) + int8store(to, val); + else +#endif + longlongstore(to, val); + } + + uchar *pack_int32(uchar *to, const uchar *from, bool low_byte_first_to) + { + handle_int32(to, from, table->s->db_low_byte_first, low_byte_first_to); + return to + sizeof(int32); + } + + const uchar *unpack_int32(uchar* to, const uchar *from, + bool low_byte_first_from) + { + handle_int32(to, from, low_byte_first_from, table->s->db_low_byte_first); + return from + sizeof(int32); + } + + uchar *pack_int64(uchar* to, const uchar *from, bool low_byte_first_to) + { + handle_int64(to, from, table->s->db_low_byte_first, low_byte_first_to); + return to + sizeof(int64); + } + + const uchar *unpack_int64(uchar* to, const uchar *from, + bool low_byte_first_from) + { + handle_int64(to, from, low_byte_first_from, table->s->db_low_byte_first); + return from + sizeof(int64); + } }; @@ -916,43 +987,16 @@ public: void sql_type(String &str) const; uint32 max_display_length() { return MY_INT32_NUM_DECIMAL_DIGITS; } virtual uchar *pack(uchar* to, const uchar *from, - uint max_length, bool low_byte_first) + uint max_length __attribute__((unused)), + bool low_byte_first) { - int32 val; -#ifdef WORDS_BIGENDIAN - if (table->s->db_low_byte_first) - val = sint4korr(from); - else -#endif - longget(val, from); - -#ifdef WORDS_BIGENDIAN - if (low_byte_first) - int4store(to, val); - else -#endif - longstore(to, val); - return to + sizeof(val); + return pack_int32(to, from, low_byte_first); } - virtual const uchar *unpack(uchar* to, const uchar *from, - uint param_data, bool low_byte_first) + uint param_data __attribute__((unused)), + bool low_byte_first) { - int32 val; -#ifdef WORDS_BIGENDIAN - if (low_byte_first) - val = sint4korr(from); - else -#endif - longget(val, from); - -#ifdef WORDS_BIGENDIAN - if (table->s->db_low_byte_first) - int4store(to, val); - else -#endif - longstore(to, val); - return from + sizeof(val); + return unpack_int32(to, from, low_byte_first); } }; @@ -997,43 +1041,16 @@ public: bool can_be_compared_as_longlong() const { return TRUE; } uint32 max_display_length() { return 20; } virtual uchar *pack(uchar* to, const uchar *from, - uint max_length, bool low_byte_first) + uint max_length __attribute__((unused)), + bool low_byte_first) { - int64 val; -#ifdef WORDS_BIGENDIAN - if (table->s->db_low_byte_first) - val = sint8korr(from); - else -#endif - longlongget(val, from); - -#ifdef WORDS_BIGENDIAN - if (low_byte_first) - int8store(to, val); - else -#endif - longlongstore(to, val); - return to + sizeof(val); + return pack_int64(to, from, low_byte_first); } - virtual const uchar *unpack(uchar* to, const uchar *from, - uint param_data, bool low_byte_first) + uint param_data __attribute__((unused)), + bool low_byte_first) { - int64 val; -#ifdef WORDS_BIGENDIAN - if (low_byte_first) - val = sint8korr(from); - else -#endif - longlongget(val, from); - -#ifdef WORDS_BIGENDIAN - if (table->s->db_low_byte_first) - int8store(to, val); - else -#endif - longlongstore(to, val); - return from + sizeof(val); + return unpack_int64(to, from, low_byte_first); } }; #endif @@ -1207,6 +1224,17 @@ public: bool get_date(MYSQL_TIME *ltime,uint fuzzydate); bool get_time(MYSQL_TIME *ltime); timestamp_auto_set_type get_auto_set_type() const; + uchar *pack(uchar *to, const uchar *from, + uint max_length __attribute__((unused)), bool low_byte_first) + { + return pack_int32(to, from, low_byte_first); + } + const uchar *unpack(uchar* to, const uchar *from, + uint param_data __attribute__((unused)), + bool low_byte_first) + { + return unpack_int32(to, from, low_byte_first); + } }; @@ -1261,6 +1289,17 @@ public: void sql_type(String &str) const; bool can_be_compared_as_longlong() const { return TRUE; } bool zero_pack() const { return 1; } + uchar *pack(uchar* to, const uchar *from, + uint max_length __attribute__((unused)), bool low_byte_first) + { + return pack_int32(to, from, low_byte_first); + } + const uchar *unpack(uchar* to, const uchar *from, + uint param_data __attribute__((unused)), + bool low_byte_first) + { + return unpack_int32(to, from, low_byte_first); + } }; @@ -1374,6 +1413,17 @@ public: bool zero_pack() const { return 1; } bool get_date(MYSQL_TIME *ltime,uint fuzzydate); bool get_time(MYSQL_TIME *ltime); + uchar *pack(uchar* to, const uchar *from, + uint max_length __attribute__((unused)), bool low_byte_first) + { + return pack_int64(to, from, low_byte_first); + } + const uchar *unpack(uchar* to, const uchar *from, + uint param_data __attribute__((unused)), + bool low_byte_first) + { + return unpack_int64(to, from, low_byte_first); + } }; From fcaaee631792b51ce7ea12db1d5f5c2019d0fa3b Mon Sep 17 00:00:00 2001 From: Davi Arnaut Date: Thu, 19 Jun 2008 11:02:32 -0300 Subject: [PATCH 31/46] Bug#37003 Tests sporadically crashes with embedded server Another problem is that the backtrace facility wasn't being enabled for non-Linux targets even if the target OS has the backtrace functions. Also, the stacktrace functions inside mysqltest were being used without proper checks for their presence in the build. client/mysqltest.c: Only use stacktrace functions if they are available. configure.in: Check if the compiler defines __bss_start include/my_stacktrace.h: Enable stacktrace if system has backtrace functions. mysys/stacktrace.c: Use backtrace functions if the system supports it. sql/mysqld.cc: Only use stacktrace functions if they are available. --- client/mysqltest.c | 26 ++++++-- configure.in | 11 ++++ include/my_stacktrace.h | 5 ++ mysys/stacktrace.c | 134 ++++++++++++++++++++-------------------- sql/mysqld.cc | 2 + 5 files changed, 107 insertions(+), 71 deletions(-) diff --git a/client/mysqltest.c b/client/mysqltest.c index 5cc0951cdf5..f5a5c05b236 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -48,6 +48,7 @@ #ifdef __WIN__ #include #endif +#include #include #ifdef __WIN__ @@ -6847,12 +6848,12 @@ void mark_progress(struct st_command* command __attribute__((unused)), } +#ifdef HAVE_STACKTRACE -static sig_handler dump_backtrace(int sig) +static void dump_backtrace(void) { struct st_connection *conn= cur_con; - fprintf(stderr, "mysqltest got " SIGNAL_FMT "\n", sig); my_safe_print_str("read_command_buf", read_command_buf, sizeof(read_command_buf)); if (conn) @@ -6866,6 +6867,21 @@ static sig_handler dump_backtrace(int sig) my_print_stacktrace(NULL, my_thread_stack_size); } +#else + +static void dump_backtrace(void) +{ + fputs("Backtrace not available.\n", stderr); +} + +#endif + +static sig_handler signal_handler(int sig) +{ + fprintf(stderr, "mysqltest got " SIGNAL_FMT "\n", sig); + dump_backtrace(); +} + #ifdef __WIN__ LONG WINAPI exception_filter(EXCEPTION_POINTERS *exp) @@ -6873,7 +6889,7 @@ LONG WINAPI exception_filter(EXCEPTION_POINTERS *exp) __try { my_set_exception_pointers(exp); - dump_backtrace(exp->ExceptionRecord->ExceptionCode); + signal_handler(exp->ExceptionRecord->ExceptionCode); } __except(EXCEPTION_EXECUTE_HANDLER) { @@ -6910,13 +6926,15 @@ static void init_signal_handling(void) struct sigaction sa; DBUG_ENTER("init_signal_handling"); +#ifdef HAVE_STACKTRACE my_init_stacktrace(); +#endif sa.sa_flags = SA_RESETHAND | SA_NODEFER; sigemptyset(&sa.sa_mask); sigprocmask(SIG_SETMASK, &sa.sa_mask, NULL); - sa.sa_handler= dump_backtrace; + sa.sa_handler= signal_handler; sigaction(SIGSEGV, &sa, NULL); sigaction(SIGABRT, &sa, NULL); diff --git a/configure.in b/configure.in index 033cabf1875..54817c3c253 100644 --- a/configure.in +++ b/configure.in @@ -2351,6 +2351,17 @@ if test "x$mysql_cv_weak_symbol" = xyes; then [Define to 1 if compiler supports weak symbol attribute.]) fi +AC_CACHE_CHECK([whether __bss_start is defined], mysql_cv_bss_start, +[AC_TRY_LINK([],[ + extern char *__bss_start; + return __bss_start ? 1 : 0; +], [mysql_cv_bss_start=yes], [mysql_cv_bss_start=no])]) + +if test "x$mysql_cv_bss_start" = xyes; then + AC_DEFINE(HAVE_BSS_START, 1, + [Define to 1 if compiler defines __bss_start.]) +fi + AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_CHECK_HEADERS(cxxabi.h) diff --git a/include/my_stacktrace.h b/include/my_stacktrace.h index 3d51ba92ee1..e7ce42c1f4f 100644 --- a/include/my_stacktrace.h +++ b/include/my_stacktrace.h @@ -27,6 +27,11 @@ #define HAVE_STACKTRACE 1 #endif +#if HAVE_BACKTRACE && (HAVE_BACKTRACE_SYMBOLS || HAVE_BACKTRACE_SYMBOLS_FD) +#undef HAVE_STACKTRACE +#define HAVE_STACKTRACE 1 +#endif + #if !defined(__NETWARE__) #define HAVE_WRITE_CORE #endif diff --git a/mysys/stacktrace.c b/mysys/stacktrace.c index 7466dcb416e..9ae3d88ef50 100644 --- a/mysys/stacktrace.c +++ b/mysys/stacktrace.c @@ -34,11 +34,16 @@ #define PTR_SANE(p) ((p) && (char*)(p) >= heap_start && (char*)(p) <= heap_end) static char *heap_start; + +#ifdef HAVE_BSS_START extern char *__bss_start; +#endif void my_init_stacktrace() { +#ifdef HAVE_BSS_START heap_start = (char*) &__bss_start; +#endif } void my_safe_print_str(const char* name, const char* val, int max_len) @@ -58,7 +63,68 @@ void my_safe_print_str(const char* name, const char* val, int max_len) fputc('\n', stderr); } -#ifdef TARGET_OS_LINUX +#if HAVE_BACKTRACE && (HAVE_BACKTRACE_SYMBOLS || HAVE_BACKTRACE_SYMBOLS_FD) + +#if BACKTRACE_DEMANGLE + +char __attribute__ ((weak)) *my_demangle(const char *mangled_name, int *status) +{ + return NULL; +} + +static void my_demangle_symbols(char **addrs, int n) +{ + int status, i; + char *begin, *end, *demangled; + + for (i= 0; i < n; i++) + { + demangled= NULL; + begin= strchr(addrs[i], '('); + end= begin ? strchr(begin, '+') : NULL; + + if (begin && end) + { + *begin++= *end++= '\0'; + demangled= my_demangle(begin, &status); + if (!demangled || status) + { + demangled= NULL; + begin[-1]= '('; + end[-1]= '+'; + } + } + + if (demangled) + fprintf(stderr, "%s(%s+%s\n", addrs[i], demangled, end); + else + fprintf(stderr, "%s\n", addrs[i]); + } +} + +#endif /* BACKTRACE_DEMANGLE */ + +void my_print_stacktrace(uchar* stack_bottom, ulong thread_stack) +{ + void *addrs[128]; + char **strings= NULL; + int n = backtrace(addrs, array_elements(addrs)); +#if BACKTRACE_DEMANGLE + if ((strings= backtrace_symbols(addrs, n))) + { + my_demangle_symbols(strings, n); + free(strings); + } +#endif +#if HAVE_BACKTRACE_SYMBOLS_FD + if (!strings) + { + backtrace_symbols_fd(addrs, n, fileno(stderr)); + } +#endif +} + +#elif defined(TARGET_OS_LINUX) #ifdef __i386__ #define SIGRETURN_FRAME_OFFSET 17 @@ -108,74 +174,8 @@ inline uint32* find_prev_pc(uint32* pc, uchar** fp) } #endif /* defined(__alpha__) && defined(__GNUC__) */ -#if BACKTRACE_DEMANGLE - -char __attribute__ ((weak)) *my_demangle(const char *mangled_name, int *status) -{ - return NULL; -} - -static void my_demangle_symbols(char **addrs, int n) -{ - int status, i; - char *begin, *end, *demangled; - - for (i= 0; i < n; i++) - { - demangled= NULL; - begin= strchr(addrs[i], '('); - end= begin ? strchr(begin, '+') : NULL; - - if (begin && end) - { - *begin++= *end++= '\0'; - demangled= my_demangle(begin, &status); - if (!demangled || status) - { - demangled= NULL; - begin[-1]= '('; - end[-1]= '+'; - } - } - - if (demangled) - fprintf(stderr, "%s(%s+%s\n", addrs[i], demangled, end); - else - fprintf(stderr, "%s\n", addrs[i]); - } -} -#endif - - -#if HAVE_BACKTRACE -static void backtrace_current_thread(void) -{ - void *addrs[128]; - char **strings= NULL; - int n = backtrace(addrs, array_elements(addrs)); -#if BACKTRACE_DEMANGLE - if ((strings= backtrace_symbols(addrs, n))) - { - my_demangle_symbols(strings, n); - free(strings); - } -#endif -#if HAVE_BACKTRACE_SYMBOLS_FD - if (!strings) - { - backtrace_symbols_fd(addrs, n, fileno(stderr)); - } -#endif -} -#endif - - void my_print_stacktrace(uchar* stack_bottom, ulong thread_stack) { -#if HAVE_BACKTRACE - backtrace_current_thread(); - return; -#endif uchar** fp; uint frame_count = 0, sigreturn_frame_count; #if defined(__alpha__) && defined(__GNUC__) diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 0bbd0abe9b9..d223b50c99f 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -2538,7 +2538,9 @@ static void init_signals(void) sigemptyset(&sa.sa_mask); sigprocmask(SIG_SETMASK,&sa.sa_mask,NULL); +#ifdef HAVE_STACKTRACE my_init_stacktrace(); +#endif #if defined(__amiga__) sa.sa_handler=(void(*)())handle_segfault; #else From 1d00bbe01bcd0bdc74961a225c78eb24e3e1b77b Mon Sep 17 00:00:00 2001 From: Davi Arnaut Date: Thu, 19 Jun 2008 13:00:53 -0300 Subject: [PATCH 32/46] Silence unused variable warning by printing the variables value. mysys/stacktrace.c: Print stack bottom and thread stack values as they might be useful. --- mysys/stacktrace.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mysys/stacktrace.c b/mysys/stacktrace.c index 9ae3d88ef50..5b941bbd7d6 100644 --- a/mysys/stacktrace.c +++ b/mysys/stacktrace.c @@ -109,6 +109,8 @@ void my_print_stacktrace(uchar* stack_bottom, ulong thread_stack) void *addrs[128]; char **strings= NULL; int n = backtrace(addrs, array_elements(addrs)); + fprintf(stderr, "stack_bottom = %p thread_stack 0x%lx\n", + stack_bottom, thread_stack); #if BACKTRACE_DEMANGLE if ((strings= backtrace_symbols(addrs, n))) { From e66ba2a74b59f6cb1b9fa876e75ce44fba7c1aee Mon Sep 17 00:00:00 2001 From: Andrei Elkin Date: Thu, 19 Jun 2008 21:47:59 +0300 Subject: [PATCH 33/46] Bug#36443 Server crashes when executing insert when insert trigger on table The crash appeared to be a result of allocating an instance of Discrete_interval automatically that that was referred in out-of-declaration scope. Fixed with correcting backing up and restoring scheme of auto_inc_intervals_forced, introduced by bug#33029, by means of shallow copying; added simulation code that forces executing those fixes of the former bug that targeted at master-and-slave having incompatible bug#33029-prone versions. mysql-test/suite/bugs/r/rpl_bug33029.result: new results file mysql-test/suite/bugs/t/rpl_bug33029.test: test merely checks no crash happens on slave. sql/slave.cc: forcing to execute special logics implemented for bug#33029 if simulate_bug33029 the debug option is set. sql/sql_class.cc: swaps of backed and the actual auto_inc_intervals_forced basing on shallow coping. sql/structs.h: Removing the deep _copy() and methods associated with it; adding methods to Discrete_intervals_list: private `=', copy constructor to prevent using; private set_members(); public copy_shallow(), swap(), get_{head, tail, current}(); empty_no_free() through set_members(). --- mysql-test/suite/bugs/r/rpl_bug33029.result | 15 ++++++ mysql-test/suite/bugs/t/rpl_bug33029.test | 25 ++++++++++ sql/slave.cc | 1 + sql/sql_class.cc | 8 ++-- sql/structs.h | 53 +++++++++++++-------- 5 files changed, 77 insertions(+), 25 deletions(-) create mode 100644 mysql-test/suite/bugs/r/rpl_bug33029.result create mode 100644 mysql-test/suite/bugs/t/rpl_bug33029.test diff --git a/mysql-test/suite/bugs/r/rpl_bug33029.result b/mysql-test/suite/bugs/r/rpl_bug33029.result new file mode 100644 index 00000000000..d11ae1cc0be --- /dev/null +++ b/mysql-test/suite/bugs/r/rpl_bug33029.result @@ -0,0 +1,15 @@ +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` (`id` int not null auto_increment primary key); +create trigger `trg` before insert on `t1` for each row begin end; +set @@global.debug="+d,simulate_bug33029"; +stop slave; +start slave; +insert into `t1` values (); +select * from t1; +id +1 diff --git a/mysql-test/suite/bugs/t/rpl_bug33029.test b/mysql-test/suite/bugs/t/rpl_bug33029.test new file mode 100644 index 00000000000..494cef42ce0 --- /dev/null +++ b/mysql-test/suite/bugs/t/rpl_bug33029.test @@ -0,0 +1,25 @@ +# +# Bug #36443 Server crashes when executing insert when insert trigger on table +# +# Emulating the former bug#33029 situation to see that there is no crash anymore. +# + + +source include/master-slave.inc; + +create table `t1` (`id` int not null auto_increment primary key); +create trigger `trg` before insert on `t1` for each row begin end; + +sync_slave_with_master; +set @@global.debug="+d,simulate_bug33029"; + +stop slave; +start slave; + +connection master; + +insert into `t1` values (); + +sync_slave_with_master; +select * from t1; + diff --git a/sql/slave.cc b/sql/slave.cc index dcc808625c0..a6d7758c8de 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -4136,6 +4136,7 @@ bool rpl_master_erroneous_autoinc(THD *thd) if (active_mi && active_mi->rli.sql_thd == thd) { Relay_log_info *rli= &active_mi->rli; + DBUG_EXECUTE_IF("simulate_bug33029", return TRUE;); return rpl_master_has_bug(rli, 33029, FALSE); } return FALSE; diff --git a/sql/sql_class.cc b/sql/sql_class.cc index afa9777e00a..b54aea94424 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -2882,8 +2882,8 @@ void THD::reset_sub_statement_state(Sub_statement_state *backup, */ if (rpl_master_erroneous_autoinc(this)) { - backup->auto_inc_intervals_forced= auto_inc_intervals_forced; - auto_inc_intervals_forced.empty(); + DBUG_ASSERT(backup->auto_inc_intervals_forced.nb_elements() == 0); + auto_inc_intervals_forced.swap(&backup->auto_inc_intervals_forced); } #endif @@ -2931,8 +2931,8 @@ void THD::restore_sub_statement_state(Sub_statement_state *backup) */ if (rpl_master_erroneous_autoinc(this)) { - auto_inc_intervals_forced= backup->auto_inc_intervals_forced; - backup->auto_inc_intervals_forced.empty(); + backup->auto_inc_intervals_forced.swap(&auto_inc_intervals_forced); + DBUG_ASSERT(backup->auto_inc_intervals_forced.nb_elements() == 0); } #endif diff --git a/sql/structs.h b/sql/structs.h index 809175fdde4..0a20eee0e9a 100644 --- a/sql/structs.h +++ b/sql/structs.h @@ -314,31 +314,22 @@ private: */ Discrete_interval *current; uint elements; // number of elements - - /* helper function for copy construct and assignment operator */ - void copy_(const Discrete_intervals_list& from) - { - for (Discrete_interval *i= from.head; i; i= i->next) - { - Discrete_interval j= *i; - append(&j); - } + void set_members(Discrete_interval *h, Discrete_interval *t, + Discrete_interval *c, uint el) + { + head= h; + tail= t; + current= c; + elements= el; } + void operator=(Discrete_intervals_list &); /* prevent use of these */ + Discrete_intervals_list(const Discrete_intervals_list &); + public: Discrete_intervals_list() : head(NULL), current(NULL), elements(0) {}; - Discrete_intervals_list(const Discrete_intervals_list& from) - { - copy_(from); - } - void operator=(const Discrete_intervals_list& from) - { - empty(); - copy_(from); - } void empty_no_free() { - head= current= NULL; - elements= 0; + set_members(NULL, NULL, NULL, 0); } void empty() { @@ -350,7 +341,24 @@ public: } empty_no_free(); } - + void copy_shallow(const Discrete_intervals_list * dli) + { + head= dli->get_head(); + tail= dli->get_tail(); + current= dli->get_current(); + elements= dli->nb_elements(); + } + void swap (Discrete_intervals_list * dli) + { + Discrete_interval *h, *t, *c; + uint el; + h= dli->get_head(); + t= dli->get_tail(); + c= dli->get_current(); + el= dli->nb_elements(); + dli->copy_shallow(this); + set_members(h, t, c, el); + } const Discrete_interval* get_next() { Discrete_interval *tmp= current; @@ -364,4 +372,7 @@ public: ulonglong minimum() const { return (head ? head->minimum() : 0); }; ulonglong maximum() const { return (head ? tail->maximum() : 0); }; uint nb_elements() const { return elements; } + Discrete_interval* get_head() const { return head; }; + Discrete_interval* get_tail() const { return tail; }; + Discrete_interval* get_current() const { return current; }; }; From 69860e7e358fe72780a09e222b773f08d20d7af3 Mon Sep 17 00:00:00 2001 From: Joerg Bruehe Date: Fri, 20 Jun 2008 14:54:48 +0200 Subject: [PATCH 34/46] Raise version number after cloning 5.1.26 --- configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.in b/configure.in index af23b6035eb..e684fad4584 100644 --- a/configure.in +++ b/configure.in @@ -10,7 +10,7 @@ AC_CANONICAL_SYSTEM # # When changing major version number please also check switch statement # in mysqlbinlog::check_master_version(). -AM_INIT_AUTOMAKE(mysql, 5.1.26-rc) +AM_INIT_AUTOMAKE(mysql, 5.1.28) AM_CONFIG_HEADER([include/config.h:config.h.in]) PROTOCOL_VERSION=10 From 574c57ccecb9f3131f7c2b5d5b0400cdaaaae41b Mon Sep 17 00:00:00 2001 From: "Tatiana A. Nurnberg" Date: Fri, 20 Jun 2008 18:58:14 +0200 Subject: [PATCH 35/46] Bug#33812: mysql client incorrectly parsing DELIMITER Remove unnecessary and incorrect code that tried to pull delimiter commands out of the middle of statements. client/mysql.cc: Remove unnecessary and incorrect code that tried to pull delimiter commands out of the middle of statements. mysql-test/r/mysql.result: show we no longer parse DELIMITER when we shouldn't. mysql-test/t/mysql_delimiter.sql: show we no longer parse DELIMITER when we shouldn't. --- client/mysql.cc | 31 ------------------------------- mysql-test/r/mysql.result | 2 ++ mysql-test/t/mysql_delimiter.sql | 6 ++++++ 3 files changed, 8 insertions(+), 31 deletions(-) diff --git a/client/mysql.cc b/client/mysql.cc index 2ef987492b7..20ad769e9b4 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -2101,37 +2101,6 @@ static bool add_line(String &buffer,char *line,char *in_string, continue; } } - else if (!*ml_comment && !*in_string && - (end_of_line - pos) >= 10 && - !my_strnncoll(charset_info, (uchar*) pos, 10, - (const uchar*) "delimiter ", 10)) - { - // Flush previously accepted characters - if (out != line) - { - buffer.append(line, (uint32) (out - line)); - out= line; - } - - // Flush possible comments in the buffer - if (!buffer.is_empty()) - { - if (com_go(&buffer, 0) > 0) // < 0 is not fatal - DBUG_RETURN(1); - buffer.length(0); - } - - /* - Delimiter wants the get rest of the given line as argument to - allow one to change ';' to ';;' and back - */ - buffer.append(pos); - if (com_delimiter(&buffer, pos) > 0) - DBUG_RETURN(1); - - buffer.length(0); - break; - } else if (!*ml_comment && !*in_string && is_prefix(pos, delimiter)) { // Found a statement. Continue parsing after the delimiter diff --git a/mysql-test/r/mysql.result b/mysql-test/r/mysql.result index a4d96c1c243..6fe35d5c9f9 100644 --- a/mysql-test/r/mysql.result +++ b/mysql-test/r/mysql.result @@ -38,6 +38,8 @@ t2 t3 Tables_in_test t1 +delimiter +1 _ Test delimiter : from command line a diff --git a/mysql-test/t/mysql_delimiter.sql b/mysql-test/t/mysql_delimiter.sql index db679c3b06b..8caa7cebc2f 100644 --- a/mysql-test/t/mysql_delimiter.sql +++ b/mysql-test/t/mysql_delimiter.sql @@ -59,3 +59,9 @@ source t/mysql_delimiter_19799.sql use test// show tables// delimiter ; # Reset delimiter + +# +# Bug #33812: mysql client incorrectly parsing DELIMITER +# +select a as delimiter from t1 +delimiter ; # Reset delimiter From 8152b54291ced9887c9628209f427a7492ac8234 Mon Sep 17 00:00:00 2001 From: Joerg Bruehe Date: Fri, 20 Jun 2008 19:06:03 +0200 Subject: [PATCH 36/46] Correct the version number, after cloning 5.1.26 the next one is 27 --- configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.in b/configure.in index e684fad4584..4441362020a 100644 --- a/configure.in +++ b/configure.in @@ -10,7 +10,7 @@ AC_CANONICAL_SYSTEM # # When changing major version number please also check switch statement # in mysqlbinlog::check_master_version(). -AM_INIT_AUTOMAKE(mysql, 5.1.28) +AM_INIT_AUTOMAKE(mysql, 5.1.27) AM_CONFIG_HEADER([include/config.h:config.h.in]) PROTOCOL_VERSION=10 From 6eb2e76abdbf903d6b3848961f942c7d41d640a0 Mon Sep 17 00:00:00 2001 From: Gleb Shchepa Date: Tue, 24 Jun 2008 19:32:06 +0500 Subject: [PATCH 37/46] Bug #36244: MySQL CLI doesn't recognize standalone -- as a commentary mysql client has been modified to interpret EOL after standalone -- commentary strings like whitespace character (according to http://dev.mysql.com/doc/refman/5.0/en/ansi-diff-comments.html) mysql-test/t/mysql_delimiter.sql: Added test case for bug #36244. --- client/mysql.cc | 9 ++++++++- mysql-test/t/mysql_delimiter.sql | 7 +++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/client/mysql.cc b/client/mysql.cc index a4706a1c580..5348941b92f 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -2156,7 +2156,14 @@ static bool add_line(String &buffer,char *line,char *in_string, } else if (!*ml_comment && (!*in_string && (inchar == '#' || inchar == '-' && pos[1] == '-' && - my_isspace(charset_info,pos[2])))) + /* + The third byte is either whitespace or is the + end of the line -- which would occur only + because of the user sending newline -- which is + itself whitespace and should also match. + */ + (my_isspace(charset_info,pos[2]) || + !pos[2])))) { // Flush previously accepted characters if (out != line) diff --git a/mysql-test/t/mysql_delimiter.sql b/mysql-test/t/mysql_delimiter.sql index db679c3b06b..533ac2ce093 100644 --- a/mysql-test/t/mysql_delimiter.sql +++ b/mysql-test/t/mysql_delimiter.sql @@ -59,3 +59,10 @@ source t/mysql_delimiter_19799.sql use test// show tables// delimiter ; # Reset delimiter + +# +# Bug #36244: MySQL CLI doesn't recognize standalone -- as comment +# before DELIMITER statement +# +-- +DELIMITER ; From 2c77798c7439f7464f371932888f6ac54217f981 Mon Sep 17 00:00:00 2001 From: Gleb Shchepa Date: Tue, 24 Jun 2008 21:03:17 +0500 Subject: [PATCH 38/46] back-port from 5.1. Bug#33812: mysql client incorrectly parsing DELIMITER Remove unnecessary and incorrect code that tried to pull delimiter commands out of the middle of statements. --- client/mysql.cc | 31 ------------------------------- mysql-test/r/mysql.result | 2 ++ mysql-test/t/mysql_delimiter.sql | 6 ++++++ 3 files changed, 8 insertions(+), 31 deletions(-) diff --git a/client/mysql.cc b/client/mysql.cc index 5348941b92f..b373b9125a0 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -2081,37 +2081,6 @@ static bool add_line(String &buffer,char *line,char *in_string, continue; } } - else if (!*ml_comment && !*in_string && - (end_of_line - pos) >= 10 && - !my_strnncoll(charset_info, (uchar*) pos, 10, - (const uchar*) "delimiter ", 10)) - { - // Flush previously accepted characters - if (out != line) - { - buffer.append(line, (uint32) (out - line)); - out= line; - } - - // Flush possible comments in the buffer - if (!buffer.is_empty()) - { - if (com_go(&buffer, 0) > 0) // < 0 is not fatal - DBUG_RETURN(1); - buffer.length(0); - } - - /* - Delimiter wants the get rest of the given line as argument to - allow one to change ';' to ';;' and back - */ - buffer.append(pos); - if (com_delimiter(&buffer, pos) > 0) - DBUG_RETURN(1); - - buffer.length(0); - break; - } else if (!*ml_comment && !*in_string && is_prefix(pos, delimiter)) { // Found a statement. Continue parsing after the delimiter diff --git a/mysql-test/r/mysql.result b/mysql-test/r/mysql.result index eded1a3fc3b..bc50c686ac6 100644 --- a/mysql-test/r/mysql.result +++ b/mysql-test/r/mysql.result @@ -38,6 +38,8 @@ t2 t3 Tables_in_test t1 +delimiter +1 _ Test delimiter : from command line a diff --git a/mysql-test/t/mysql_delimiter.sql b/mysql-test/t/mysql_delimiter.sql index 533ac2ce093..917401275a2 100644 --- a/mysql-test/t/mysql_delimiter.sql +++ b/mysql-test/t/mysql_delimiter.sql @@ -60,6 +60,12 @@ use test// show tables// delimiter ; # Reset delimiter +# +# Bug #33812: mysql client incorrectly parsing DELIMITER +# +select a as delimiter from t1 +delimiter ; # Reset delimiter + # # Bug #36244: MySQL CLI doesn't recognize standalone -- as comment # before DELIMITER statement From c6f67c6fd9140379eab070ffb1e2f2f9270d8fd5 Mon Sep 17 00:00:00 2001 From: Gleb Shchepa Date: Tue, 24 Jun 2008 21:05:56 +0500 Subject: [PATCH 39/46] back-port from 5.1. Bug#35480: BOM detection code crashes mysql CLI with zero-sized input MySQL client crashed if no input was passed to it. --- client/mysql.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/mysql.cc b/client/mysql.cc index b373b9125a0..c8d5522628d 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -1779,7 +1779,7 @@ static int read_and_execute(bool interactive) the very beginning of a text file when you save the file using "Unicode UTF-8" format. */ - if (!line_number && + if (line && !line_number && (uchar) line[0] == 0xEF && (uchar) line[1] == 0xBB && (uchar) line[2] == 0xBF) From 49417ad7c8e45792f5baafb9514b10684daba527 Mon Sep 17 00:00:00 2001 From: Matthias Leich Date: Wed, 25 Jun 2008 16:59:38 +0200 Subject: [PATCH 40/46] Fix for Bug#37492 timing bug in subselect.test + similar weaknesses found during testing + replace error numbers by error names --- mysql-test/include/wait_condition.inc | 59 +++++++ mysql-test/t/subselect.test | 229 ++++++++++++++------------ 2 files changed, 180 insertions(+), 108 deletions(-) create mode 100644 mysql-test/include/wait_condition.inc diff --git a/mysql-test/include/wait_condition.inc b/mysql-test/include/wait_condition.inc new file mode 100644 index 00000000000..a41d8080c9b --- /dev/null +++ b/mysql-test/include/wait_condition.inc @@ -0,0 +1,59 @@ +# 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; +} + +--enable_query_log diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test index 78b4de6e816..4d9507f1231 100644 --- a/mysql-test/t/subselect.test +++ b/mysql-test/t/subselect.test @@ -9,28 +9,28 @@ SELECT (SELECT 1) UNION SELECT (SELECT 2); explain extended SELECT (SELECT 1) UNION SELECT (SELECT 2); SELECT (SELECT (SELECT 0 UNION SELECT 0)); explain extended SELECT (SELECT (SELECT 0 UNION SELECT 0)); --- error 1247 +-- error ER_ILLEGAL_REFERENCE SELECT (SELECT 1 FROM (SELECT 1) as b HAVING a=1) as a; --- error 1247 +-- error ER_ILLEGAL_REFERENCE SELECT (SELECT 1 FROM (SELECT 1) as b HAVING b=1) as a,(SELECT 1 FROM (SELECT 1) as c HAVING a=1) as b; SELECT (SELECT 1),MAX(1) FROM (SELECT 1) as a; --- error 1247 +-- error ER_ILLEGAL_REFERENCE SELECT (SELECT a) as a; EXPLAIN EXTENDED SELECT 1 FROM (SELECT 1 as a) as b HAVING (SELECT a)=1; SELECT 1 FROM (SELECT 1 as a) as b HAVING (SELECT a)=1; --- error 1054 +-- error ER_BAD_FIELD_ERROR SELECT (SELECT 1), a; SELECT 1 as a FROM (SELECT 1) as b HAVING (SELECT a)=1; --- error 1054 +-- error ER_BAD_FIELD_ERROR SELECT 1 FROM (SELECT (SELECT a) b) c; SELECT * FROM (SELECT 1 as id) b WHERE id IN (SELECT * FROM (SELECT 1 as id) c ORDER BY id); --- error 1241 +-- error ER_OPERAND_COLUMNS SELECT * FROM (SELECT 1) a WHERE 1 IN (SELECT 1,1); SELECT 1 IN (SELECT 1); SELECT 1 FROM (SELECT 1 as a) b WHERE 1 IN (SELECT (SELECT a)); --- error 1221 +-- error ER_WRONG_USAGE select (SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE(1)); --- error 1108 +-- error ER_WRONG_PARAMETERS_TO_PROCEDURE SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE((SELECT 1)); -- error ER_BAD_FIELD_ERROR SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NULL; @@ -53,7 +53,7 @@ SELECT (SELECT 'b',2,'a') = ROW(1.5,2,'a'); SELECT (SELECT 1.5,2,'a') = ROW(1.5,'2','a'); SELECT (SELECT 1.5,'c','a') = ROW(1.5,2,'a'); --- error 1241 +-- error ER_OPERAND_COLUMNS SELECT (SELECT * FROM (SELECT 'test' a,'test' b) a); SELECT 1 as a,(SELECT a+a) b,(SELECT b); @@ -65,7 +65,7 @@ create table t4 (a int not null, b int not null); insert into t1 values (2); insert into t2 values (1,7),(2,7); insert into t4 values (4,8),(3,8),(5,9); --- error 1247 +-- error ER_ILLEGAL_REFERENCE select (select a from t1 where t1.a = a1) as a2, (select b from t2 where t2.b=a2) as a1; select (select a from t1 where t1.a=t2.a), a from t2; select (select a from t1 where t1.a=t2.b), a from t2; @@ -105,9 +105,9 @@ select * from t3 where a >= any (select b from t2); explain extended select * from t3 where a >= any (select b from t2); select * from t3 where a >= all (select b from t2); delete from t2 where a=100; --- error 1241 +-- error ER_OPERAND_COLUMNS select * from t3 where a in (select a,b from t2); --- error 1241 +-- error ER_OPERAND_COLUMNS select * from t3 where a in (select * from t2); insert into t4 values (12,7),(1,7),(10,9),(9,6),(7,6),(3,9),(1,10); # empty set @@ -123,7 +123,7 @@ select (select a from t1 where t1.a=t2.a union select a from t5 where t5.a=t2.a) insert into t5 values (2); select (select a from t1 where t1.a=t2.a union select a from t5 where t5.a=t2.a), a from t2; explain extended select (select a from t1 where t1.a=t2.a union select a from t5 where t5.a=t2.a), a from t2; --- error 1242 +-- error ER_SUBQUERY_NO_1_ROW select (select a from t1 where t1.a=t2.a union all select a from t5 where t5.a=t2.a), a from t2; create table t6 (patient_uq int, clinic_uq int, index i1 (clinic_uq)); create table t7( uq int primary key, name char(25)); @@ -133,7 +133,7 @@ select * from t6 where exists (select * from t7 where uq = clinic_uq); explain extended select * from t6 where exists (select * from t7 where uq = clinic_uq); # not unique fields --- error 1052 +-- error ER_NON_UNIQ_ERROR select * from t1 where a= (select a from t2,t4 where t2.b=t4.b); # different tipes & group functions @@ -160,14 +160,14 @@ INSERT INTO t8 (pseudo,email) VALUES ('joce','test'); INSERT INTO t8 (pseudo,email) VALUES ('joce1','test1'); INSERT INTO t8 (pseudo,email) VALUES ('2joce1','2test1'); EXPLAIN EXTENDED SELECT pseudo,(SELECT email FROM t8 WHERE pseudo=(SELECT pseudo FROM t8 WHERE pseudo='joce')) FROM t8 WHERE pseudo=(SELECT pseudo FROM t8 WHERE pseudo='joce'); --- error 1241 +-- error ER_OPERAND_COLUMNS SELECT pseudo FROM t8 WHERE pseudo=(SELECT pseudo,email FROM t8 WHERE pseudo='joce'); --- error 1241 +-- error ER_OPERAND_COLUMNS SELECT pseudo FROM t8 WHERE pseudo=(SELECT * FROM t8 WHERE pseudo='joce'); SELECT pseudo FROM t8 WHERE pseudo=(SELECT pseudo FROM t8 WHERE pseudo='joce'); --- error 1242 +-- error ER_SUBQUERY_NO_1_ROW SELECT pseudo FROM t8 WHERE pseudo=(SELECT pseudo FROM t8 WHERE pseudo LIKE '%joce%'); drop table if exists t1,t2,t3,t4,t5,t6,t7,t8; @@ -187,7 +187,7 @@ EXPLAIN EXTENDED SELECT (SELECT DISTINCT date FROM t1 WHERE date='2002-08-03'); SELECT DISTINCT date FROM t1 WHERE date='2002-08-03'; SELECT (SELECT DISTINCT date FROM t1 WHERE date='2002-08-03'); SELECT 1 FROM t1 WHERE 1=(SELECT 1 UNION SELECT 1) UNION ALL SELECT 1; --- error 1242 +-- error ER_SUBQUERY_NO_1_ROW SELECT 1 FROM t1 WHERE 1=(SELECT 1 UNION ALL SELECT 1) UNION SELECT 1; EXPLAIN EXTENDED SELECT 1 FROM t1 WHERE 1=(SELECT 1 UNION SELECT 1); drop table t1; @@ -213,9 +213,9 @@ CREATE TABLE `t2` ( INSERT INTO t2 (mot,topic,date,pseudo) VALUES ('joce','40143','2002-10-22','joce'), ('joce','43506','2002-10-22','joce'); select numeropost as a FROM t1 GROUP BY (SELECT 1 FROM t1 HAVING a=1); SELECT numeropost,maxnumrep FROM t1 WHERE exists (SELECT 1 FROM t2 WHERE (mot='joce') AND date >= '2002-10-21' AND t1.numeropost = t2.topic) ORDER BY maxnumrep DESC LIMIT 0, 20; --- error 1054 +-- error ER_BAD_FIELD_ERROR SELECT (SELECT 1) as a FROM (SELECT 1 FROM t1 HAVING a=1) b; --- error 1054 +-- error ER_BAD_FIELD_ERROR SELECT 1 IN (SELECT 1 FROM t2 HAVING a); SELECT * from t2 where topic IN (SELECT topic FROM t2 GROUP BY topic); @@ -244,9 +244,9 @@ CREATE TABLE `t1` ( ) ENGINE=MyISAM ROW_FORMAT=FIXED; INSERT INTO t1 (numeropost,maxnumrep) VALUES (1,0),(2,1); --- error 1242 +-- error ER_SUBQUERY_NO_1_ROW select numeropost as a FROM t1 GROUP BY (SELECT 1 FROM t1 HAVING a=1); --- error 1242 +-- error ER_SUBQUERY_NO_1_ROW select numeropost as a FROM t1 ORDER BY (SELECT 1 FROM t1 HAVING a=1); drop table t1; @@ -258,7 +258,7 @@ drop table t1; #iftest CREATE TABLE t1 (field char(1) NOT NULL DEFAULT 'b'); INSERT INTO t1 VALUES (); --- error 1242 +-- error ER_SUBQUERY_NO_1_ROW SELECT field FROM t1 WHERE 1=(SELECT 1 UNION ALL SELECT 1 FROM (SELECT 1) a HAVING field='b'); drop table t1; @@ -271,13 +271,13 @@ CREATE TABLE `t1` ( UNIQUE KEY `numreponse` (`numreponse`), KEY `pseudo` (`pseudo`,`numeropost`) ) ENGINE=MyISAM; --- error 1247 +-- error ER_ILLEGAL_REFERENCE SELECT (SELECT numeropost FROM t1 HAVING numreponse=a),numreponse FROM (SELECT * FROM t1) as a; --- error 1054 +-- error ER_BAD_FIELD_ERROR SELECT numreponse, (SELECT numeropost FROM t1 HAVING numreponse=a) FROM (SELECT * FROM t1) as a; SELECT numreponse, (SELECT numeropost FROM t1 HAVING numreponse=1) FROM (SELECT * FROM t1) as a; INSERT INTO t1 (numeropost,numreponse,pseudo) VALUES (1,1,'joce'),(1,2,'joce'),(1,3,'test'); --- error 1242 +-- error ER_SUBQUERY_NO_1_ROW EXPLAIN EXTENDED SELECT numreponse FROM t1 WHERE numeropost='1' AND numreponse=(SELECT 1 FROM t1 WHERE numeropost='1'); EXPLAIN EXTENDED SELECT MAX(numreponse) FROM t1 WHERE numeropost='1'; EXPLAIN EXTENDED SELECT numreponse FROM t1 WHERE numeropost='1' AND numreponse=(SELECT MAX(numreponse) FROM t1 WHERE numeropost='1'); @@ -294,9 +294,9 @@ create table t2 (a int NOT NULL, b int, primary key (a)); insert into t1 values (0, 10),(1, 11),(2, 12); insert into t2 values (1, 21),(2, 22),(3, 23); select * from t1; --- error 1093 +-- error ER_UPDATE_TABLE_USED update t1 set b= (select b from t1); --- error 1242 +-- error ER_SUBQUERY_NO_1_ROW update t1 set b= (select b from t2); update t1 set b= (select b from t2 where t1.a = t2.a); select * from t1; @@ -309,9 +309,9 @@ insert into t1 values (0, 10),(1, 11),(2, 12); insert into t2 values (1, 21),(2, 12),(3, 23); select * from t1; select * from t1 where b = (select b from t2 where t1.a = t2.a); --- error 1093 +-- error ER_UPDATE_TABLE_USED delete from t1 where b = (select b from t1); --- error 1242 +-- error ER_SUBQUERY_NO_1_ROW delete from t1 where b = (select b from t2); delete from t1 where b = (select b from t2 where t1.a = t2.a); select * from t1; @@ -327,9 +327,9 @@ insert into t12 values (33, 10),(22, 11),(2, 12); insert into t2 values (1, 21),(2, 12),(3, 23); select * from t11; select * from t12; --- error 1093 +-- error ER_UPDATE_TABLE_USED delete t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b = (select b from t12 where t11.a = t12.a); --- error 1242 +-- error ER_SUBQUERY_NO_1_ROW delete t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b = (select b from t2); delete t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b = (select b from t2 where t11.a = t2.a); select * from t11; @@ -342,25 +342,29 @@ create table t2 (a int); create table t3 (b int); insert into t2 values (1); insert into t3 values (1),(2); --- error 1093 +-- error ER_UPDATE_TABLE_USED INSERT INTO t1 (x) VALUES ((SELECT x FROM t1)); --- error 1242 +-- error ER_SUBQUERY_NO_1_ROW INSERT INTO t1 (x) VALUES ((SELECT b FROM t3)); INSERT INTO t1 (x) VALUES ((SELECT a FROM t2)); select * from t1; insert into t2 values (1); +let $row_count_before= `SELECT COUNT(*) FROM t1`; INSERT DELAYED INTO t1 (x) VALUES ((SELECT SUM(a) FROM t2)); --- sleep 1 +let $wait_condition= SELECT COUNT(*) <> $row_count_before FROM t1; +--source include/wait_condition.inc select * from t1; INSERT INTO t1 (x) select (SELECT SUM(a)+1 FROM t2) FROM t2; select * from t1; # After this, only data based on old t1 records should have been added. INSERT INTO t1 (x) select (SELECT SUM(x)+2 FROM t1) FROM t2; select * from t1; --- error 1054 +-- error ER_BAD_FIELD_ERROR INSERT DELAYED INTO t1 (x) VALUES ((SELECT SUM(x) FROM t2)); +let $row_count_before= `SELECT COUNT(*) FROM t1`; INSERT DELAYED INTO t1 (x) VALUES ((SELECT SUM(a) FROM t2)); --- sleep 1 +let $wait_condition= SELECT COUNT(*) <> $row_count_before FROM t1; +--source include/wait_condition.inc select * from t1; # #TODO: should be uncommented after bug 380 fix pushed @@ -375,25 +379,30 @@ create table t3 (a int); insert into t2 values (1); insert into t3 values (1),(2); select * from t1; --- error 1093 +-- error ER_UPDATE_TABLE_USED replace into t1 (x, y) VALUES ((SELECT x FROM t1), (SELECT a+1 FROM t2)); --- error 1242 +-- error ER_SUBQUERY_NO_1_ROW replace into t1 (x, y) VALUES ((SELECT a FROM t3), (SELECT a+1 FROM t2)); replace into t1 (x, y) VALUES ((SELECT a FROM t2), (SELECT a+1 FROM t2)); select * from t1; replace into t1 (x, y) VALUES ((SELECT a FROM t2), (SELECT a+2 FROM t2)); select * from t1; +let $row_count_before= `SELECT COUNT(*) FROM t1`; replace DELAYED into t1 (x, y) VALUES ((SELECT a+3 FROM t2), (SELECT a FROM t2)); --- sleep 1 +# We get one additional row +let $wait_condition= SELECT COUNT(*) <> $row_count_before FROM t1; +--source include/wait_condition.inc select * from t1; +let $row_count_before= `SELECT COUNT(*) FROM t1 WHERE y = 2`; replace DELAYED into t1 (x, y) VALUES ((SELECT a+3 FROM t2), (SELECT a+1 FROM t2)); --- sleep 1 +let $wait_condition= SELECT COUNT(*) <> $row_count_before FROM t1 WHERE y = 2; +--source include/wait_condition.inc select * from t1; replace LOW_PRIORITY into t1 (x, y) VALUES ((SELECT a+1 FROM t2), (SELECT a FROM t2)); select * from t1; drop table t1, t2, t3; --- error 1096 +-- error ER_NO_TABLES_USED SELECT * FROM (SELECT 1) b WHERE 1 IN (SELECT *); CREATE TABLE t2 (id int(11) default NULL, KEY id (id)) ENGINE=MyISAM CHARSET=latin1; @@ -406,14 +415,14 @@ EXPLAIN EXTENDED SELECT * FROM t2 WHERE id IN (SELECT 1+(select 1)); EXPLAIN EXTENDED SELECT * FROM t2 WHERE id IN (SELECT 1 UNION SELECT 3); SELECT * FROM t2 WHERE id IN (SELECT 5 UNION SELECT 3); SELECT * FROM t2 WHERE id IN (SELECT 5 UNION SELECT 2); --- error 1093 +-- error ER_UPDATE_TABLE_USED INSERT INTO t2 VALUES ((SELECT * FROM t2)); --- error 1093 +-- error ER_UPDATE_TABLE_USED INSERT INTO t2 VALUES ((SELECT id FROM t2)); SELECT * FROM t2; CREATE TABLE t1 (id int(11) default NULL, KEY id (id)) ENGINE=MyISAM CHARSET=latin1; INSERT INTO t1 values (1),(1); --- error 1242 +-- error ER_SUBQUERY_NO_1_ROW UPDATE t2 SET id=(SELECT * FROM t1); drop table t2, t1; @@ -481,9 +490,9 @@ drop table t1,t2,t3; #LIMIT is not supported now create table t1 (a float); --- error 1235 +-- error ER_NOT_SUPPORTED_YET select 10.5 IN (SELECT * from t1 LIMIT 1); --- error 1235 +-- error ER_NOT_SUPPORTED_YET select 10.5 IN (SELECT * from t1 LIMIT 1 UNION SELECT 1.5); drop table t1; @@ -507,7 +516,7 @@ select ROW(1, 1, 'a') IN (select b,a,c from t1 where a is not null); select ROW(1, 1, 'a') IN (select a,b,c from t1 where c='b' or c='a'); select ROW(1, 2, 'a') IN (select a,b,c from t1 where c='b' or c='a'); select ROW(1, 1, 'a') IN (select b,a,c from t1 where c='b' or c='a'); --- error 1235 +-- error ER_NOT_SUPPORTED_YET select ROW(1, 1, 'a') IN (select b,a,c from t1 limit 2); drop table t1; @@ -522,14 +531,14 @@ set @a:=2; set @a:=(SELECT a from t1); select @a; drop table t1; --- error 1146 +-- error ER_NO_SUCH_TABLE do (SELECT a from t1); --- error 1146 +-- error ER_NO_SUCH_TABLE set @a:=(SELECT a from t1); CREATE TABLE t1 (a int, KEY(a)); HANDLER t1 OPEN; --- error 1064 +-- error ER_PARSE_ERROR HANDLER t1 READ a=((SELECT 1)); HANDLER t1 CLOSE; drop table t1; @@ -627,7 +636,7 @@ drop table t1; # # error in IN # --- error 1146 +-- error ER_NO_SUCH_TABLE select t1.Continent, t2.Name, t2.Population from t1 LEFT JOIN t2 ON t1.Code = t2.Country where t2.Population IN (select max(t2.Population) AS Population from t2, t1 where t2.Country = t1.Code group by Continent); # @@ -698,7 +707,7 @@ CREATE TABLE `t1` ( INSERT INTO t1 VALUES (1); UPDATE t1 SET i=i+(SELECT MAX(i) FROM (SELECT 1) t) WHERE i=(SELECT MAX(i)); UPDATE t1 SET i=i+1 WHERE i=(SELECT MAX(i)); --- error 1054 +-- error ER_BAD_FIELD_ERROR UPDATE t1 SET t.i=i+(SELECT MAX(i) FROM (SELECT 1) t); select * from t1; drop table t1; @@ -855,7 +864,7 @@ create table t1 (s1 int); create table t2 (s1 int); insert into t1 values (1); insert into t2 values (1); --- error 1054 +-- error ER_BAD_FIELD_ERROR update t1 set s1 = s1 + 1 where 1 = (select x.s1 as A from t2 WHERE t2.s1 > t1.s1 order by A); DROP TABLE t1, t2; @@ -865,9 +874,9 @@ DROP TABLE t1, t2; CREATE TABLE t1 (s1 CHAR(5) COLLATE latin1_german1_ci, s2 CHAR(5) COLLATE latin1_swedish_ci); INSERT INTO t1 VALUES ('z','?'); --- error 1267 +-- error ER_CANT_AGGREGATE_2COLLATIONS select * from t1 where s1 > (select max(s2) from t1); --- error 1267 +-- error ER_CANT_AGGREGATE_2COLLATIONS select * from t1 where s1 > any (select max(s2) from t1); drop table t1; @@ -885,7 +894,7 @@ drop table t1, t2; # row union # create table t1 (s1 char(5)); --- error 1241 +-- error ER_OPERAND_COLUMNS select (select 'a','b' from t1 union select 'a','b' from t1) from t1; insert into t1 values ('tttt'); select * from t1 where ('a','b')=(select 'a','b' from t1 union select 'a','b' from t1); @@ -963,7 +972,7 @@ CREATE TABLE t1 (id int(11) default NULL) ENGINE=MyISAM CHARSET=latin1; INSERT INTO t1 VALUES (1),(5); CREATE TABLE t2 (id int(11) default NULL) ENGINE=MyISAM CHARSET=latin1; INSERT INTO t2 VALUES (2),(6); --- error 1241 +-- error ER_OPERAND_COLUMNS select * from t1 where (1,2,6) in (select * from t2); DROP TABLE t1,t2; @@ -973,7 +982,7 @@ DROP TABLE t1,t2; create table t1 (s1 int); insert into t1 values (1); insert into t1 values (2); --- error 1242 +-- error ER_SUBQUERY_NO_1_ROW set sort_buffer_size = (select s1 from t1); do (select * from t1); drop table t1; @@ -1003,11 +1012,11 @@ drop table t1, t2; # create table t1 (s1 int); create table t2 (s1 int); --- error 1054 +-- error ER_BAD_FIELD_ERROR select * from t1 where (select count(*) from t2 where t1.s2) = 1; --- error 1054 +-- error ER_BAD_FIELD_ERROR select * from t1 where (select count(*) from t2 group by t1.s2) = 1; --- error 1054 +-- error ER_BAD_FIELD_ERROR select count(*) from t2 group by t1.s2; drop table t1, t2; @@ -1032,9 +1041,13 @@ DROP TABLE t1; create table t1 (a int, b decimal(13, 3)); insert into t1 values (1, 0.123); +let $outfile = $MYSQLTEST_VARDIR/master-data/test/subselect.out.file.1; +--error 0,1 +--remove_file $outfile select a, (select max(b) from t1) into outfile "subselect.out.file.1" from t1; delete from t1; load data infile "subselect.out.file.1" into table t1; +--remove_file $outfile select * from t1; drop table t1; @@ -1123,7 +1136,7 @@ drop table t1; create table t1(id int); create table t2(id int); create table t3(flag int); --- error 1064 +-- error ER_PARSE_ERROR select (select * from t3 where id not null) from t1, t2; drop table t1,t2,t3; @@ -1212,31 +1225,31 @@ SELECT a FROM t1 WHERE a <= ALL (SELECT a FROM t1 HAVING a = 2 UNION SELECT a FR SELECT a FROM t1 WHERE a <> ALL (SELECT a FROM t1 HAVING a = 2 UNION SELECT a FROM t1 HAVING a = 2); # row tests # < > >= <= and = ALL/ <> ANY do not support row operation --- error 1241 +-- error ER_OPERAND_COLUMNS SELECT a FROM t1 WHERE (1,2) > ANY (SELECT a FROM t1 WHERE b = 2); --- error 1241 +-- error ER_OPERAND_COLUMNS SELECT a FROM t1 WHERE a > ANY (SELECT a,2 FROM t1 WHERE b = 2); --- error 1241 +-- error ER_OPERAND_COLUMNS SELECT a FROM t1 WHERE (1,2) > ANY (SELECT a,2 FROM t1 WHERE b = 2); --- error 1241 +-- error ER_OPERAND_COLUMNS SELECT a FROM t1 WHERE (1,2) > ALL (SELECT a FROM t1 WHERE b = 2); --- error 1241 +-- error ER_OPERAND_COLUMNS SELECT a FROM t1 WHERE a > ALL (SELECT a,2 FROM t1 WHERE b = 2); --- error 1241 +-- error ER_OPERAND_COLUMNS SELECT a FROM t1 WHERE (1,2) > ALL (SELECT a,2 FROM t1 WHERE b = 2); --- error 1241 +-- error ER_OPERAND_COLUMNS SELECT a FROM t1 WHERE (1,2) = ALL (SELECT a,2 FROM t1 WHERE b = 2); --- error 1241 +-- error ER_OPERAND_COLUMNS SELECT a FROM t1 WHERE (1,2) <> ANY (SELECT a,2 FROM t1 WHERE b = 2); # following should be converted to IN --- error 1241 +-- error ER_OPERAND_COLUMNS SELECT a FROM t1 WHERE (1,2) = ANY (SELECT a FROM t1 WHERE b = 2); --- error 1241 +-- error ER_OPERAND_COLUMNS SELECT a FROM t1 WHERE a = ANY (SELECT a,2 FROM t1 WHERE b = 2); SELECT a FROM t1 WHERE (1,2) = ANY (SELECT a,2 FROM t1 WHERE b = 2); --- error 1241 +-- error ER_OPERAND_COLUMNS SELECT a FROM t1 WHERE (1,2) <> ALL (SELECT a FROM t1 WHERE b = 2); --- error 1241 +-- error ER_OPERAND_COLUMNS SELECT a FROM t1 WHERE a <> ALL (SELECT a,2 FROM t1 WHERE b = 2); SELECT a FROM t1 WHERE (1,2) <> ALL (SELECT a,2 FROM t1 WHERE b = 2); SELECT a FROM t1 WHERE (a,1) = ANY (SELECT a,1 FROM t1 WHERE b = 2); @@ -1441,7 +1454,7 @@ CREATE TABLE `t1` ( `master` int(10) unsigned NOT NULL default '0', `map` smalli INSERT INTO `t1` VALUES (1,0,0,700),(1,1,1,400),(1,5,5,400),(1,12,12,400),(1,12,32,400),(4,12,32,400); CREATE TABLE `t2` ( `id` int(10) unsigned NOT NULL default '0', `pid` int(10) unsigned NOT NULL default '0', `map` smallint(6) unsigned NOT NULL default '0', `level` tinyint(4) unsigned NOT NULL default '0', `title` varchar(255) default NULL, PRIMARY KEY (`id`,`pid`,`map`), KEY `level` (`level`), KEY `id` (`id`,`map`)) ; INSERT INTO `t2` VALUES (6,5,12,7,'a'),(12,0,0,7,'a'),(12,1,0,7,'a'),(12,5,5,7,'a'),(12,5,12,7,'a'); --- error 1054 +-- error ER_BAD_FIELD_ERROR SELECT b.sc FROM (SELECT (SELECT a.access FROM t1 a WHERE a.map = op.map AND a.slave = op.pid AND a.master = 1) ac FROM t2 op WHERE op.id = 12 AND op.map = 0) b; SELECT b.ac FROM (SELECT (SELECT a.access FROM t1 a WHERE a.map = op.map AND a.slave = op.pid AND a.master = 1) ac FROM t2 op WHERE op.id = 12 AND op.map = 0) b; drop tables t1,t2; @@ -1545,7 +1558,7 @@ drop table t1; # create table t1 (a1 int); create table t2 (b1 int); ---error 1054 +--error ER_BAD_FIELD_ERROR select * from t1 where a2 > any(select b1 from t2); select * from t1 where a1 > any(select b1 from t2); drop table t1,t2; @@ -1566,11 +1579,11 @@ drop table t1; # Comparison subquery and row with nested rows # create table t1 (a integer, b integer); --- error 1241 +-- error ER_OPERAND_COLUMNS select row(1,(2,2)) in (select * from t1 ); --- error 1241 +-- error ER_OPERAND_COLUMNS select row(1,(2,2)) = (select * from t1 ); --- error 1241 +-- error ER_OPERAND_COLUMNS select (select * from t1) = row(1,(2,2)); drop table t1; @@ -1579,14 +1592,14 @@ drop table t1; # create table t1 (a integer); insert into t1 values (1); --- error 1247 +-- error ER_ILLEGAL_REFERENCE select 1 = ALL (select 1 from t1 where 1 = xx ), 1 as xx ; --- error 1247 +-- error ER_ILLEGAL_REFERENCE select 1 = ALL (select 1 from t1 where 1 = xx ), 1 as xx; select 1 as xx, 1 = ALL ( select 1 from t1 where 1 = xx ); --- error 1247 +-- error ER_ILLEGAL_REFERENCE select 1 = ALL (select 1 from t1 where 1 = xx ), 1 as xx; --- error 1247 +-- error ER_ILLEGAL_REFERENCE select 1 = ALL (select 1 from t1 where 1 = xx ), 1 as xx from DUAL; drop table t1; @@ -1723,17 +1736,17 @@ drop table t1, t2; # create table t1 (a int, b int); insert into t1 values (1,2); --- error 1241 +-- error ER_OPERAND_COLUMNS select 1 = (select * from t1); --- error 1241 +-- error ER_OPERAND_COLUMNS select (select * from t1) = 1; --- error 1241 +-- error ER_OPERAND_COLUMNS select (1,2) = (select a from t1); --- error 1241 +-- error ER_OPERAND_COLUMNS select (select a from t1) = (1,2); --- error 1241 +-- error ER_OPERAND_COLUMNS select (1,2,3) = (select * from t1); --- error 1241 +-- error ER_OPERAND_COLUMNS select (select * from t1) = (1,2,3); drop table t1; @@ -2014,21 +2027,21 @@ INSERT INTO t2 VALUES (2,1), (1,3), (2,1), (4,4), (2,2), (1,4); SELECT a FROM t1 ORDER BY (SELECT c FROM t2 WHERE b > 2 ); ---error 1242 +--error ER_SUBQUERY_NO_1_ROW SELECT a FROM t1 ORDER BY (SELECT c FROM t2 WHERE b > 1); SELECT a FROM t1 ORDER BY (SELECT c FROM t2 WHERE b > 2), a; ---error 1242 +--error ER_SUBQUERY_NO_1_ROW SELECT a FROM t1 ORDER BY (SELECT c FROM t2 WHERE b > 1), a; SELECT b, MAX(c) FROM t2 GROUP BY b, (SELECT c FROM t2 WHERE b > 2); ---error 1242 +--error ER_SUBQUERY_NO_1_ROW SELECT b, MAX(c) FROM t2 GROUP BY b, (SELECT c FROM t2 WHERE b > 1); SELECT a FROM t1 GROUP BY a HAVING IFNULL((SELECT b FROM t2 WHERE b > 2), (SELECT c FROM t2 WHERE c=a AND b > 2 ORDER BY b)) > 3; ---error 1242 +--error ER_SUBQUERY_NO_1_ROW SELECT a FROM t1 GROUP BY a HAVING IFNULL((SELECT b FROM t2 WHERE b > 1), (SELECT c FROM t2 WHERE c=a AND b > 2 ORDER BY b)) > 3; @@ -2036,7 +2049,7 @@ SELECT a FROM t1 GROUP BY a SELECT a FROM t1 GROUP BY a HAVING IFNULL((SELECT b FROM t2 WHERE b > 4), (SELECT c FROM t2 WHERE c=a AND b > 2 ORDER BY b)) > 3; ---error 1242 +--error ER_SUBQUERY_NO_1_ROW SELECT a FROM t1 GROUP BY a HAVING IFNULL((SELECT b FROM t2 WHERE b > 4), (SELECT c FROM t2 WHERE c=a AND b > 1 ORDER BY b)) > 3; @@ -2044,7 +2057,7 @@ SELECT a FROM t1 GROUP BY a SELECT a FROM t1 ORDER BY IFNULL((SELECT b FROM t2 WHERE b > 2), (SELECT c FROM t2 WHERE c=a AND b > 2 ORDER BY b)); ---error 1242 +--error ER_SUBQUERY_NO_1_ROW SELECT a FROM t1 ORDER BY IFNULL((SELECT b FROM t2 WHERE b > 1), (SELECT c FROM t2 WHERE c=a AND b > 1 ORDER BY b)); @@ -2052,7 +2065,7 @@ SELECT a FROM t1 SELECT a FROM t1 ORDER BY IFNULL((SELECT b FROM t2 WHERE b > 4), (SELECT c FROM t2 WHERE c=a AND b > 2 ORDER BY b)); ---error 1242 +--error ER_SUBQUERY_NO_1_ROW SELECT a FROM t1 ORDER BY IFNULL((SELECT b FROM t2 WHERE b > 4), (SELECT c FROM t2 WHERE c=a AND b > 1 ORDER BY b)); @@ -2263,12 +2276,12 @@ SELECT t1.a FROM t1 GROUP BY t1.a HAVING t1.a > ALL(SELECT t2.c FROM t2 WHERE EXISTS(SELECT t3.e FROM t3 GROUP BY t3.e HAVING SUM(t1.a+t2.c) < t3.e/4)); --- error 1111 +-- error ER_INVALID_GROUP_FUNC_USE SELECT t1.a FROM t1 GROUP BY t1.a HAVING t1.a > ALL(SELECT t2.c FROM t2 WHERE EXISTS(SELECT t3.e FROM t3 WHERE SUM(t1.a+t2.c) < t3.e/4)); --- error 1111 +-- error ER_INVALID_GROUP_FUNC_USE SELECT t1.a from t1 GROUP BY t1.a HAVING AVG(SUM(t1.b)) > 20; SELECT t1.a FROM t1 GROUP BY t1.a @@ -2330,11 +2343,11 @@ drop table t1, t2; CREATE TABLE t1 (a INT); ---error 1054 +--error ER_BAD_FIELD_ERROR CREATE VIEW v1 AS SELECT * FROM t1 WHERE no_such_column = ANY (SELECT 1); ---error 1054 +--error ER_BAD_FIELD_ERROR CREATE VIEW v2 AS SELECT * FROM t1 WHERE no_such_column = (SELECT 1); ---error 1054 +--error ER_BAD_FIELD_ERROR SELECT * FROM t1 WHERE no_such_column = ANY (SELECT 1); DROP TABLE t1; @@ -2469,7 +2482,7 @@ SELECT * FROM t1 WHERE NOT EXISTS (((SELECT i FROM t1) UNION (SELECT i FROM t1))); #TODO:not supported ---error 1064 +--error ER_PARSE_ERROR explain select ((select t11.i from t1 t11) union (select t12.i from t1 t12)) from t1; @@ -2839,12 +2852,12 @@ SELECT a FROM t1 t0 WHERE (SELECT COUNT(t0.b) FROM t1 t WHERE t.b>20) GROUP BY a; SET @@sql_mode='ansi'; ---error 1111 +--error ER_INVALID_GROUP_FUNC_USE SELECT a FROM t1 WHERE (SELECT COUNT(b) FROM DUAL) > 0 GROUP BY a; ---error 1111 +--error ER_INVALID_GROUP_FUNC_USE SELECT a FROM t1 WHERE (SELECT COUNT(b) FROM DUAL) > 1 GROUP BY a; ---error 1111 +--error ER_INVALID_GROUP_FUNC_USE SELECT a FROM t1 t0 WHERE (SELECT COUNT(t0.b) FROM t1 t WHERE t.b>20) GROUP BY a; @@ -3032,9 +3045,9 @@ while ($should_work_nesting) while ($nesting) { --echo $nesting ---error 0,1436 +--error 0,ER_STACK_OVERRUN_NEED_MORE eval $start $end; ---error 0,1436 +--error 0,ER_STACK_OVERRUN_NEED_MORE eval explain $start $end; let $start= $start $start_app; From 3f0fc6ec9bbaeab5836beba67b1b5d8b0e8f03c7 Mon Sep 17 00:00:00 2001 From: Joerg Bruehe Date: Mon, 30 Jun 2008 12:54:18 +0200 Subject: [PATCH 41/46] We may need 5.1.27 for selected pushes, so reserve the number. --- configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.in b/configure.in index 2b763e1992b..08d21a23e81 100644 --- a/configure.in +++ b/configure.in @@ -10,7 +10,7 @@ AC_CANONICAL_SYSTEM # # When changing major version number please also check switch statement # in mysqlbinlog::check_master_version(). -AM_INIT_AUTOMAKE(mysql, 5.1.27) +AM_INIT_AUTOMAKE(mysql, 5.1.28) AM_CONFIG_HEADER([include/config.h:config.h.in]) PROTOCOL_VERSION=10 From 52fee16e88653d6ef27cb38d92bfb14c39ad8752 Mon Sep 17 00:00:00 2001 From: Matthias Leich Date: Mon, 30 Jun 2008 22:16:06 +0200 Subject: [PATCH 42/46] Fix for Bug#36787 Test funcs_1.charset_collation_1 failing Details: 1. Skip charset_collation_1 if charset "ucs2_bin" is missing (property which distincts "vanilla" builds from the others) 2. Let builds with version_comment LIKE "%Advanced%" (found them for 5.1) execute charset_collation_3. 3. Update comments charset_collation.inc so that they reflect the current experiences. --- .../suite/funcs_1/datadict/charset_collation.inc | 14 +++++++++++++- .../suite/funcs_1/t/charset_collation_1.test | 6 ++++-- .../suite/funcs_1/t/charset_collation_3.test | 5 +++-- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/mysql-test/suite/funcs_1/datadict/charset_collation.inc b/mysql-test/suite/funcs_1/datadict/charset_collation.inc index f8fc58b082b..ae03996b073 100644 --- a/mysql-test/suite/funcs_1/datadict/charset_collation.inc +++ b/mysql-test/suite/funcs_1/datadict/charset_collation.inc @@ -8,7 +8,7 @@ # # The amount and properties of character_sets/collations depend on the # build type -# 2007-12 MySQL 5.0 +# 2007-12 MySQL 5.0, 2008-06 MySQL 5.1 # --------------------------------------------------------------------- # # Variant 1 fits to @@ -33,10 +33,22 @@ # Variant 3 fits to # version_comment MySQL Community Server (GPL) # version_comment MySQL Cluster Server (Commercial) +# version_comment MySQL Advanced Server (GPL) 5.1 +# version_comment MySQL Advanced Server (Commercial) 5.1 # # Difference between variant 3 and 2 is within the collation properties # IS_COMPILED and SORTLEN. # +# 2008-06 All time excluded variant is "vanilla". +# How to build "vanilla": +# ./BUILD/autorun.sh +# ./configure +# ./make +# Some properties of "vanilla" +# version_comment Source distribution +# Compared to the variants 1 to 3 a lot of character sets are missing. +# Example: "ucs2_bin" is in variant 1 to 3 but not in "vanilla". +# # Created: # 2007-12-18 mleich - remove the unstable character_set/collation subtests # from include/datadict-master.inc diff --git a/mysql-test/suite/funcs_1/t/charset_collation_1.test b/mysql-test/suite/funcs_1/t/charset_collation_1.test index 7415220455e..15777062a72 100644 --- a/mysql-test/suite/funcs_1/t/charset_collation_1.test +++ b/mysql-test/suite/funcs_1/t/charset_collation_1.test @@ -22,9 +22,11 @@ if (`SELECT EXISTS (SELECT 1 FROM information_schema.collations OR ( @@version_comment NOT LIKE '%Source%' AND @@version_comment NOT LIKE '%Enterprise%' AND @@version_comment NOT LIKE '%Classic%' - AND @@version_comment NOT LIKE '%Pushbuild%')`) + AND @@version_comment NOT LIKE '%Pushbuild%') + OR (SELECT count(*) = 0 FROM information_schema.collations + WHERE collation_name = 'ucs2_bin')`) { - skip Test needs Enterprise, Classic , Pushbuild or Source-without-max build; + skip Test needs Enterprise, Classic , regular Pushbuild or Source-without-max build; } --source suite/funcs_1/datadict/charset_collation.inc diff --git a/mysql-test/suite/funcs_1/t/charset_collation_3.test b/mysql-test/suite/funcs_1/t/charset_collation_3.test index 0701b96896f..e88b44e4a0f 100644 --- a/mysql-test/suite/funcs_1/t/charset_collation_3.test +++ b/mysql-test/suite/funcs_1/t/charset_collation_3.test @@ -16,9 +16,10 @@ # if (`SELECT @@version_comment NOT LIKE '%Community%' - AND @@version_comment NOT LIKE '%Cluster%'`) + AND @@version_comment NOT LIKE '%Cluster%' + AND @@version_comment NOT LIKE '%Advanced%'`) { - skip Test needs Community or Cluster build; + skip Test needs Community, Cluster or Advanced build; } --source suite/funcs_1/datadict/charset_collation.inc From fb17cbe42e9cb2e4a783bf6584a0ad887b782df4 Mon Sep 17 00:00:00 2001 From: Sven Sandberg Date: Fri, 4 Jul 2008 11:33:34 +0200 Subject: [PATCH 43/46] BUG#37858: loaddata,rpl_slave_skip,rpl_innodb_mixed_dml fail if datafile not world-readable Problem 1: main.loaddata tried to trigger an error caused by reading files outside the vardir, by reading itself. However, if loaddata.test is not world-readable (e.g., umask=0077), then another error is triggered. Fix 1: allow the other error too. Problem 2: rpl_slave_skip and rpl_innodb_mixed_dml tried to copy a file from mysql-test/suite/rpl/data to mysql-test/var and then read it. That failed too if umask=0077, since the file would not become world-readable. Fix 2: move the files from mysql-test/suite/rpl/data to mysql-test/std_data and update tests accordingly. Remove the directory mysql-test/suite/rpl/data. mysql-test/r/loaddata.result: Updated result file. mysql-test/std_data/rpl_bug28618.dat: Moved this file to std_data. mysql-test/std_data/rpl_mixed.dat: Moved this file to std_data. mysql-test/suite/rpl/data: Removed directory that is now unused. mysql-test/suite/rpl/include/rpl_mixed_dml.inc: The rpl_mixed.dat file has been moved. Updated the test to use the new location. mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result: Updated result file. mysql-test/suite/rpl/r/rpl_slave_skip.result: Updated result file. mysql-test/suite/rpl/t/rpl_slave_skip.test: The rpl_bug28618.dat file has been moved. Updated the test to use the new location. mysql-test/t/loaddata.test: Allow more error messages. ER_TEXTFILE_NOT_READABLE may happen if the file is not world-readable (which may happen, e.g., if the user has umask=0077). --- mysql-test/r/loaddata.result | 2 +- mysql-test/{suite/rpl/data => std_data}/rpl_bug28618.dat | 0 mysql-test/{suite/rpl/data => std_data}/rpl_mixed.dat | 0 mysql-test/suite/rpl/include/rpl_mixed_dml.inc | 6 +++--- mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result | 4 ++-- mysql-test/suite/rpl/r/rpl_slave_skip.result | 2 +- mysql-test/suite/rpl/t/rpl_slave_skip.test | 5 ++--- mysql-test/t/loaddata.test | 2 +- 8 files changed, 10 insertions(+), 11 deletions(-) rename mysql-test/{suite/rpl/data => std_data}/rpl_bug28618.dat (100%) rename mysql-test/{suite/rpl/data => std_data}/rpl_mixed.dat (100%) diff --git a/mysql-test/r/loaddata.result b/mysql-test/r/loaddata.result index 3aef9ef636d..967259013f6 100644 --- a/mysql-test/r/loaddata.result +++ b/mysql-test/r/loaddata.result @@ -212,7 +212,7 @@ set @@secure_file_priv= 0; ERROR HY000: Variable 'secure_file_priv' is a read only variable truncate table t1; load data infile 'MYSQL_TEST_DIR/t/loaddata.test' into table t1; -ERROR HY000: The MySQL server is running with the --secure-file-priv option so it cannot execute this statement +Got one of the listed errors select * from t1; a b c select load_file("MYSQL_TEST_DIR/t/loaddata.test"); diff --git a/mysql-test/suite/rpl/data/rpl_bug28618.dat b/mysql-test/std_data/rpl_bug28618.dat similarity index 100% rename from mysql-test/suite/rpl/data/rpl_bug28618.dat rename to mysql-test/std_data/rpl_bug28618.dat diff --git a/mysql-test/suite/rpl/data/rpl_mixed.dat b/mysql-test/std_data/rpl_mixed.dat similarity index 100% rename from mysql-test/suite/rpl/data/rpl_mixed.dat rename to mysql-test/std_data/rpl_mixed.dat diff --git a/mysql-test/suite/rpl/include/rpl_mixed_dml.inc b/mysql-test/suite/rpl/include/rpl_mixed_dml.inc index b76d45c0eb0..e9adb805c99 100644 --- a/mysql-test/suite/rpl/include/rpl_mixed_dml.inc +++ b/mysql-test/suite/rpl/include/rpl_mixed_dml.inc @@ -51,9 +51,8 @@ DELETE FROM t2 WHERE a = 2; --echo --echo ******************** LOAD DATA INFILE ******************** ---copy_file suite/rpl/data/rpl_mixed.dat $MYSQLTEST_VARDIR/tmp/rpl_mixed.dat -LOAD DATA INFILE '../../tmp/rpl_mixed.dat' INTO TABLE t1 FIELDS TERMINATED BY '|' ; ---remove_file $MYSQLTEST_VARDIR/tmp/rpl_mixed.dat +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/std_data/rpl_mixed.dat' INTO TABLE t1 FIELDS TERMINATED BY '|' ; SELECT * FROM t1 ORDER BY a; --source suite/rpl/include/rpl_mixed_check_select.inc --source suite/rpl/include/rpl_mixed_clear_tables.inc @@ -329,6 +328,7 @@ DROP VIEW v2; --echo ******************** SHOW BINLOG EVENTS ******************** --replace_column 2 # 5 # --replace_regex /Server ver: .+/Server ver: #/ /table_id: [0-9]+/table_id: #/ /COMMIT.+xid=[0-9]+.+/#/ /file_id=[0-9]+/file_id=#/ /block_len=[0-9]+/block_len=#/ +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR show binlog events from 1; sync_slave_with_master; # as we're using UUID we don't SELECT but use "diff" like in rpl_row_UUID diff --git a/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result b/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result index 9a6053ecedf..f780cb05599 100644 --- a/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result +++ b/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result @@ -103,7 +103,7 @@ DELETE FROM t1; DELETE FROM t2; ******************** LOAD DATA INFILE ******************** -LOAD DATA INFILE '../../tmp/rpl_mixed.dat' INTO TABLE t1 FIELDS TERMINATED BY '|' ; +LOAD DATA INFILE 'MYSQLTEST_VARDIR/std_data/rpl_mixed.dat' INTO TABLE t1 FIELDS TERMINATED BY '|' ; SELECT * FROM t1 ORDER BY a; a b 10 line A @@ -884,7 +884,7 @@ master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t2 master-bin.000001 # Xid 1 # # master-bin.000001 # Query 1 # use `test_rpl`; BEGIN master-bin.000001 # Begin_load_query 1 # ;file_id=#;block_len=# -master-bin.000001 # Execute_load_query 1 # use `test_rpl`; LOAD DATA INFILE '../../tmp/rpl_mixed.dat' INTO TABLE t1 FIELDS TERMINATED BY '|' ;file_id=# +master-bin.000001 # Execute_load_query 1 # use `test_rpl`; LOAD DATA INFILE 'MYSQLTEST_VARDIR/std_data/rpl_mixed.dat' INTO TABLE t1 FIELDS TERMINATED BY '|' ;file_id=# master-bin.000001 # Xid 1 # # master-bin.000001 # Query 1 # use `test_rpl`; BEGIN master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t1 diff --git a/mysql-test/suite/rpl/r/rpl_slave_skip.result b/mysql-test/suite/rpl/r/rpl_slave_skip.result index bb03c3b6cca..1f975b7dbcd 100644 --- a/mysql-test/suite/rpl/r/rpl_slave_skip.result +++ b/mysql-test/suite/rpl/r/rpl_slave_skip.result @@ -344,7 +344,7 @@ CREATE TABLE t10 (a INT, b VARCHAR(20)) ENGINE=myisam; STOP SLAVE; *** On Master *** SET SESSION BINLOG_FORMAT=STATEMENT; -LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/rpl_bug28618.dat' INTO TABLE t10 FIELDS TERMINATED BY '|'; +LOAD DATA INFILE 'MYSQLTEST_VARDIR/std_data/rpl_bug28618.dat' INTO TABLE t10 FIELDS TERMINATED BY '|'; SELECT * FROM t10 ORDER BY a; a b 1 master only diff --git a/mysql-test/suite/rpl/t/rpl_slave_skip.test b/mysql-test/suite/rpl/t/rpl_slave_skip.test index 8a5b1ae0ae4..ce308f975aa 100644 --- a/mysql-test/suite/rpl/t/rpl_slave_skip.test +++ b/mysql-test/suite/rpl/t/rpl_slave_skip.test @@ -286,10 +286,9 @@ source include/wait_for_slave_to_stop.inc; --echo *** On Master *** connection master; SET SESSION BINLOG_FORMAT=STATEMENT; -exec cp ./suite/rpl/data/rpl_bug28618.dat $MYSQLTEST_VARDIR/tmp/; + --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR -eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/rpl_bug28618.dat' INTO TABLE t10 FIELDS TERMINATED BY '|'; -remove_file $MYSQLTEST_VARDIR/tmp/rpl_bug28618.dat; +eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/std_data/rpl_bug28618.dat' INTO TABLE t10 FIELDS TERMINATED BY '|'; SELECT * FROM t10 ORDER BY a; diff --git a/mysql-test/t/loaddata.test b/mysql-test/t/loaddata.test index 9d319d4820c..bc35b652f57 100644 --- a/mysql-test/t/loaddata.test +++ b/mysql-test/t/loaddata.test @@ -163,7 +163,7 @@ set @@secure_file_priv= 0; # Test "load data" truncate table t1; --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR ---error 1290 +--error ER_OPTION_PREVENTS_STATEMENT, ER_TEXTFILE_NOT_READABLE eval load data infile '$MYSQL_TEST_DIR/t/loaddata.test' into table t1; select * from t1; From 39cb0a07e0d800112b28b3b72c326a48a2ee8310 Mon Sep 17 00:00:00 2001 From: Sven Sandberg Date: Sun, 6 Jul 2008 19:14:41 +0200 Subject: [PATCH 44/46] BUG#37906: innodb_max_dirty_pages_pct_func does not clean up after itself Made the test innodb_max_dirty_pages_pct_func clean up after itself. mysql-test/r/innodb_max_dirty_pages_pct_func.result: Updated result file. mysql-test/t/disabled.def: Fixed BUG#37906 mysql-test/t/innodb_max_dirty_pages_pct_func.test: Made the test clean up after itself. --- mysql-test/r/innodb_max_dirty_pages_pct_func.result | 3 +++ mysql-test/t/disabled.def | 1 - mysql-test/t/innodb_max_dirty_pages_pct_func.test | 4 ++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/innodb_max_dirty_pages_pct_func.result b/mysql-test/r/innodb_max_dirty_pages_pct_func.result index 4f6d42fb716..2f1467af94e 100644 --- a/mysql-test/r/innodb_max_dirty_pages_pct_func.result +++ b/mysql-test/r/innodb_max_dirty_pages_pct_func.result @@ -1,4 +1,5 @@ '#--------------------FN_DYNVARS_044_02-------------------------#' +SET @old_innodb_max_dirty_pages_pct= @@global.innodb_max_dirty_pages_pct; SET @@global.innodb_max_dirty_pages_pct = 80; 'connect (con1,localhost,root,,,,)' 'connection con1' @@ -28,3 +29,5 @@ DROP PROCEDURE add_records; DROP PROCEDURE add_until; DROP PROCEDURE check_pct; DROP FUNCTION dirty_pct; +DROP TABLE t1; +SET @@global.innodb_max_dirty_pages_pct = @old_innodb_max_dirty_pages_pct; diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index 67ec9d2fe4d..d5f90b1ffa7 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -96,4 +96,3 @@ transaction_alloc_block_size_basic_64 : Bug #36522: Some tests of system variabl transaction_prealloc_size_basic_64 : Bug #36522: Some tests of system variables have diffs on 64bit platorms wait_timeout_basic_64 : Bug #36522: Some tests of system variables have diffs on 64bit platorms wait_timeout_func : BUG#36873 2008-07-06 sven wait_timeout_func.test fails randomly -innodb_max_dirty_pages_pct_func : BUG#37906 2008-07-06 sven innodb_max_dirty_pages_pct_func does not clean up after itself diff --git a/mysql-test/t/innodb_max_dirty_pages_pct_func.test b/mysql-test/t/innodb_max_dirty_pages_pct_func.test index 5d7b9754843..4b2af554810 100644 --- a/mysql-test/t/innodb_max_dirty_pages_pct_func.test +++ b/mysql-test/t/innodb_max_dirty_pages_pct_func.test @@ -25,6 +25,8 @@ # Check if setting innodb_max_dirty_pages_pct is changed in new connection# ########################################################################### +SET @old_innodb_max_dirty_pages_pct= @@global.innodb_max_dirty_pages_pct; + SET @@global.innodb_max_dirty_pages_pct = 80; --echo 'connect (con1,localhost,root,,,,)' connect (con1,localhost,root,,,,); @@ -157,6 +159,8 @@ DROP PROCEDURE add_records; DROP PROCEDURE add_until; DROP PROCEDURE check_pct; DROP FUNCTION dirty_pct; +DROP TABLE t1; +SET @@global.innodb_max_dirty_pages_pct = @old_innodb_max_dirty_pages_pct; ################################################################## # End of functionality Testing for innodb_max_dirty_pages_pct # From 1bcd20bf7c11a3687f337ea8bb008136f1e52e1e Mon Sep 17 00:00:00 2001 From: Sven Sandberg Date: Mon, 7 Jul 2008 11:18:09 +0200 Subject: [PATCH 45/46] rpl_row_inexist_tbl gave a merge conflict because the binlog positions changed. Fixed by removing binlog positions from output, and also: - removed code not used to verify the tested property - added comments mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result: Updated result file. mysql-test/suite/rpl/t/rpl_row_inexist_tbl-slave.opt: Removed option file: it's not needed any more. mysql-test/suite/rpl/t/rpl_row_inexist_tbl.test: Improved the test in the following ways: - The table t2 was not used to verify the property to test, so t2 has been removed. - Now printing only the relevant column from SHOW SLAVE STATUS - Added comments. --- .../suite/rpl/r/rpl_row_inexist_tbl.result | 68 ++++--------------- .../suite/rpl/t/rpl_row_inexist_tbl-slave.opt | 1 - .../suite/rpl/t/rpl_row_inexist_tbl.test | 46 ++++++++----- 3 files changed, 43 insertions(+), 72 deletions(-) delete mode 100644 mysql-test/suite/rpl/t/rpl_row_inexist_tbl-slave.opt diff --git a/mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result b/mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result index 1dd97878666..b32da2715e3 100644 --- a/mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result +++ b/mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result @@ -4,56 +4,18 @@ reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; -create table t1 (a int not null primary key); -insert into t1 values (1); -create table t2 (a int); -insert into t2 values (1); -update t1, t2 set t1.a = 0 where t1.a = t2.a; -show tables; -Tables_in_test -t1 -select * from t1; -a -0 -drop table t1; -insert into t1 values (1); -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos 1153 -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table # -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 1146 -Last_Error Error 'Table 'test.t1' doesn't exist' on opening tables -Skip_Counter 0 -Exec_Master_Log_Pos 941 -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -Last_IO_Errno # -Last_IO_Error # -Last_SQL_Errno 1146 -Last_SQL_Error Error 'Table 'test.t1' doesn't exist' on opening tables -drop table t1, t2; +==== Setup table on master but not on slave ==== +[on master] +CREATE TABLE t1 (a INT); +[on slave] +DROP TABLE t1; +==== Modify table on master ==== +[on master] +INSERT INTO t1 VALUES (1); +==== Verify error on slave ==== +[on slave] +Last_SQL_Error = Error 'Table 'test.t1' doesn't exist' on opening tables +==== Clean up ==== +STOP SLAVE; +[on master] +DROP TABLE t1; diff --git a/mysql-test/suite/rpl/t/rpl_row_inexist_tbl-slave.opt b/mysql-test/suite/rpl/t/rpl_row_inexist_tbl-slave.opt deleted file mode 100644 index abd717f8222..00000000000 --- a/mysql-test/suite/rpl/t/rpl_row_inexist_tbl-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---replicate-ignore-table=test.t2 diff --git a/mysql-test/suite/rpl/t/rpl_row_inexist_tbl.test b/mysql-test/suite/rpl/t/rpl_row_inexist_tbl.test index 25a8c0e744e..6add7302f55 100644 --- a/mysql-test/suite/rpl/t/rpl_row_inexist_tbl.test +++ b/mysql-test/suite/rpl/t/rpl_row_inexist_tbl.test @@ -1,33 +1,43 @@ -# Test to see what slave says when master is updating a table it does -# not have +# ==== Purpose ==== +# +# Verify that slave gives an error message if master updates a table +# that slave does not have. +# +# ==== Method ==== +# +# Create a table on master, wait till it's on slave, remove it from +# slave. Then update the table on master. + --source include/have_binlog_format_row.inc source include/master-slave.inc; -connection master; -create table t1 (a int not null primary key); -insert into t1 values (1); -create table t2 (a int); -insert into t2 values (1); -update t1, t2 set t1.a = 0 where t1.a = t2.a; +--echo ==== Setup table on master but not on slave ==== +--echo [on master] +CREATE TABLE t1 (a INT); +--echo [on slave] sync_slave_with_master; -# t2 should not have been replicated -# t1 should have been properly updated -show tables; -select * from t1; -drop table t1; +DROP TABLE t1; +--echo ==== Modify table on master ==== +--echo [on master] connection master; -insert into t1 values (1); +INSERT INTO t1 VALUES (1); +--echo ==== Verify error on slave ==== +--echo [on slave] connection slave; # slave should have stopped because can't find table t1 --source include/wait_for_slave_sql_to_stop.inc # see if we have a good error message: ---replace_column 7 # -source include/show_slave_status.inc; +let $err= query_get_value(SHOW SLAVE STATUS, Last_SQL_Error, 1); +--echo Last_SQL_Error = $err -# cleanup +--echo ==== Clean up ==== +STOP SLAVE; +source include/wait_for_slave_to_stop.inc; + +--echo [on master] connection master; -drop table t1, t2; +DROP TABLE t1; From 1fc4954d30ae36788ae0ad3bec40e2b70ab4d7d1 Mon Sep 17 00:00:00 2001 From: Sven Sandberg Date: Mon, 7 Jul 2008 14:20:08 +0200 Subject: [PATCH 46/46] Post-merge fixes. The file tree in mtr's vardir has changed so an old hard-coded path in mysql-test/t/subselect.test didn't work. Fix: update the paths in the test. mysql-test/r/subselect.result: Updated result file. mysql-test/t/subselect.test: Problem: The file tree in mtr's vardir has changed so an old hard-coded path didn't work. Fix: update the paths in the test. --- mysql-test/r/subselect.result | 4 ++-- mysql-test/t/subselect.test | 11 ++++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index 923bc2254bd..16d7cb65059 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -1658,9 +1658,9 @@ SELECT DISTINCT (SELECT a) FROM t1 LIMIT 100; DROP TABLE t1; create table t1 (a int, b decimal(13, 3)); insert into t1 values (1, 0.123); -select a, (select max(b) from t1) into outfile "subselect.out.file.1" from t1; +select a, (select max(b) from t1) into outfile "../../tmp/subselect.out.file.1" from t1; delete from t1; -load data infile "subselect.out.file.1" into table t1; +load data infile "../../tmp/subselect.out.file.1" into table t1; select * from t1; a b 1 0.123 diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test index 85b21c83612..3104c229985 100644 --- a/mysql-test/t/subselect.test +++ b/mysql-test/t/subselect.test @@ -1041,13 +1041,14 @@ DROP TABLE t1; create table t1 (a int, b decimal(13, 3)); insert into t1 values (1, 0.123); -let $outfile = $MYSQLTEST_VARDIR/master-data/test/subselect.out.file.1; +let $outfile_abs= $MYSQLTEST_VARDIR/tmp/subselect.out.file.1; +let $outfile_rel= ../../tmp/subselect.out.file.1; --error 0,1 ---remove_file $outfile -select a, (select max(b) from t1) into outfile "subselect.out.file.1" from t1; +--remove_file $outfile_abs +eval select a, (select max(b) from t1) into outfile "$outfile_rel" from t1; delete from t1; -load data infile "subselect.out.file.1" into table t1; ---remove_file $outfile +eval load data infile "$outfile_rel" into table t1; +--remove_file $outfile_abs select * from t1; drop table t1;