#At file:///home/kgeorge/mysql/bzr/merge-6.0-bugteam/
2820 Georgi Kodinov 2008-09-03 [merge]
merge mysql-5.1-bugteam -> 6.0-bugteam
removed:
mysql-test/r/innodb_bug34053.result
mysql-test/t/innodb_bug34053.test
win/build-vs9.bat
win/build-vs9_x64.bat
added:
mysql-test/r/innodb_bug34053.result
mysql-test/r/log_bin_trust_routine_creators_basic.result
mysql-test/t/innodb_bug34053.test
mysql-test/t/log_bin_trust_routine_creators_basic.test
win/build-vs9.bat
win/build-vs9_x64.bat
renamed:
mysql-test/r/rpl_slave_allow_batching_basic.result => mysql-test/r/slave_allow_batching_basic.result
mysql-test/r/rpl_slave_compressed_protocol_basic.result => mysql-test/r/slave_compressed_protocol_basic.result
mysql-test/r/rpl_slave_exec_mode_basic.result => mysql-test/r/slave_exec_mode_basic.result
mysql-test/r/rpl_slave_net_timeout_basic.result => mysql-test/r/slave_net_timeout_basic.result
mysql-test/suite/funcs_1/r/is_collation_charset_applic.result => mysql-test/suite/funcs_1/r/is_collation_character_set_applicability.result
mysql-test/suite/funcs_1/t/is_collation_charset_applic.test => mysql-test/suite/funcs_1/t/is_collation_character_set_applicability.test
mysql-test/t/rpl_slave_allow_batching_basic.test => mysql-test/t/slave_allow_batching_basic.test
mysql-test/t/rpl_slave_compressed_protocol_basic.test => mysql-test/t/slave_compressed_protocol_basic.test
mysql-test/t/rpl_slave_exec_mode_basic.test => mysql-test/t/slave_exec_mode_basic.test
mysql-test/t/rpl_slave_net_timeout_basic.test => mysql-test/t/slave_net_timeout_basic.test
modified:
.bzrignore
mysql-test/t/union.test
=== modified file '.bzrignore'
--- a/.bzrignore 2008-08-26 10:20:41 +0000
+++ b/.bzrignore 2008-09-03 10:13:40 +0000
@@ -1891,3 +1891,8 @@ zlib/*.vcproj
extra/libevent/event-config.h
libmysqld/ddl_blocker.cc
libmysqld/mdl.cc
+mysql-test/bug36522-64.tar
+mysql-test/bug36522.tar
+mysql-test/t.log
+mysql-test/tps.log
+libmysqld/event_parse_data.cc
=== added file 'mysql-test/r/innodb_bug34053.result'
--- a/mysql-test/r/innodb_bug34053.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/r/innodb_bug34053.result 2008-02-19 16:44:09 +0000
@@ -0,0 +1 @@
+SET storage_engine=InnoDB;
=== removed file 'mysql-test/r/innodb_bug34053.result'
--- a/mysql-test/r/innodb_bug34053.result 2008-06-12 00:08:07 +0000
+++ b/mysql-test/r/innodb_bug34053.result 1970-01-01 00:00:00 +0000
@@ -1 +0,0 @@
-SET storage_engine=InnoDB;
=== added file 'mysql-test/r/log_bin_trust_routine_creators_basic.result'
--- a/mysql-test/r/log_bin_trust_routine_creators_basic.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/r/log_bin_trust_routine_creators_basic.result 2008-04-10 13:14:28 +0000
@@ -0,0 +1,121 @@
+SET @start_global_value = @@global.log_bin_trust_routine_creators;
+SELECT @start_global_value;
+@start_global_value
+1
+'#--------------------FN_DYNVARS_064_01-------------------------#'
+SET @@global.log_bin_trust_routine_creators = TRUE;
+Warnings:
+Warning 1287 The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
+SET @@global.log_bin_trust_routine_creators = DEFAULT;
+Warnings:
+Warning 1287 The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
+SELECT @@global.log_bin_trust_routine_creators;
+@@global.log_bin_trust_routine_creators
+0
+'#--------------------FN_DYNVARS_064_02-------------------------#'
+SET @@global.log_bin_trust_routine_creators = DEFAULT;
+Warnings:
+Warning 1287 The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
+SELECT @@global.log_bin_trust_routine_creators = 'FALSE';
+@@global.log_bin_trust_routine_creators = 'FALSE'
+1
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: 'FALSE'
+'#--------------------FN_DYNVARS_064_03-------------------------#'
+SET @@global.log_bin_trust_routine_creators = ON;
+Warnings:
+Warning 1287 The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
+SELECT @@global.log_bin_trust_routine_creators;
+@@global.log_bin_trust_routine_creators
+1
+SET @@global.log_bin_trust_routine_creators = OFF;
+Warnings:
+Warning 1287 The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
+SELECT @@global.log_bin_trust_routine_creators;
+@@global.log_bin_trust_routine_creators
+0
+SET @@global.log_bin_trust_routine_creators = 0;
+Warnings:
+Warning 1287 The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
+SELECT @@global.log_bin_trust_routine_creators;
+@@global.log_bin_trust_routine_creators
+0
+SET @@global.log_bin_trust_routine_creators = 1;
+Warnings:
+Warning 1287 The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
+SELECT @@global.log_bin_trust_routine_creators;
+@@global.log_bin_trust_routine_creators
+1
+SET @@global.log_bin_trust_routine_creators = TRUE;
+Warnings:
+Warning 1287 The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
+SELECT @@global.log_bin_trust_routine_creators;
+@@global.log_bin_trust_routine_creators
+1
+SET @@global.log_bin_trust_routine_creators = FALSE;
+Warnings:
+Warning 1287 The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
+SELECT @@global.log_bin_trust_routine_creators;
+@@global.log_bin_trust_routine_creators
+0
+'#-------------------FN_DYNVARS_064_04----------------------------#'
+SET @@session.log_bin_trust_routine_creators = 0;
+ERROR HY000: Variable 'log_bin_trust_routine_creators' is a GLOBAL variable and should be set with SET GLOBAL
+SELECT @@session.log_bin_trust_routine_creators;
+ERROR HY000: Variable 'log_bin_trust_routine_creators' is a GLOBAL variable
+'#------------------FN_DYNVARS_064_05-----------------------#'
+SET @@global.log_bin_trust_routine_creators = 'ONN';
+ERROR 42000: Variable 'log_bin_trust_routine_creators' can't be set to the value of 'ONN'
+SET @@global.log_bin_trust_routine_creators = "OFFF";
+ERROR 42000: Variable 'log_bin_trust_routine_creators' can't be set to the value of 'OFFF'
+SET @@global.log_bin_trust_routine_creators = OF;
+Warnings:
+Warning 1287 The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
+SELECT @@global.log_bin_trust_routine_creators;
+@@global.log_bin_trust_routine_creators
+0
+'Bug# 34828: OF is also working as OFF and no error is coming';
+SET @@global.log_bin_trust_routine_creators = TTRUE;
+ERROR 42000: Variable 'log_bin_trust_routine_creators' can't be set to the value of 'TTRUE'
+SET @@global.log_bin_trust_routine_creators = FELSE;
+ERROR 42000: Variable 'log_bin_trust_routine_creators' can't be set to the value of 'FELSE'
+SET @@global.log_bin_trust_routine_creators = -1024;
+ERROR 42000: Variable 'log_bin_trust_routine_creators' can't be set to the value of '-1024'
+SET @@global.log_bin_trust_routine_creators = 65536;
+ERROR 42000: Variable 'log_bin_trust_routine_creators' can't be set to the value of '65536'
+SET @@global.log_bin_trust_routine_creators = 65530.34;
+ERROR 42000: Variable 'log_bin_trust_routine_creators' can't be set to the value of '65530'
+SET @@global.log_bin_trust_routine_creators = test;
+ERROR 42000: Variable 'log_bin_trust_routine_creators' can't be set to the value of 'test'
+'#------------------FN_DYNVARS_064_06-----------------------#'
+SELECT @@global.log_bin_trust_routine_creators = VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='log_bin_trust_routine_creators';
+@@global.log_bin_trust_routine_creators = VARIABLE_VALUE
+1
+SELECT @@session.log_bin_trust_routine_creators = VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='log_bin_trust_routine_creators';
+ERROR HY000: Variable 'log_bin_trust_routine_creators' is a GLOBAL variable
+'#---------------------FN_DYNVARS_064_07----------------------#'
+SET @@global.log_bin_trust_routine_creators = TRUE;
+Warnings:
+Warning 1287 The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
+SELECT @@log_bin_trust_routine_creators = @@global.log_bin_trust_routine_creators;
+@@log_bin_trust_routine_creators = @@global.log_bin_trust_routine_creators
+1
+'#---------------------FN_DYNVARS_064_08----------------------#'
+SET @@global.log_bin_trust_routine_creators = TRUE;
+Warnings:
+Warning 1287 The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
+SELECT @@log_bin_trust_routine_creators;
+@@log_bin_trust_routine_creators
+1
+SELECT local.log_bin_trust_routine_creators;
+ERROR 42S02: Unknown table 'local' in field list
+SELECT session.log_bin_trust_routine_creators;
+ERROR 42S02: Unknown table 'session' in field list
+SELECT log_bin_trust_routine_creators = @@session.log_bin_trust_routine_creators;
+ERROR 42S22: Unknown column 'log_bin_trust_routine_creators' in 'field list'
+SET @@global.log_bin_trust_routine_creators = @start_global_value;
+Warnings:
+Warning 1287 The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
+SELECT @@global.log_bin_trust_routine_creators;
+@@global.log_bin_trust_routine_creators
+1
=== renamed file 'mysql-test/r/rpl_slave_allow_batching_basic.result' => 'mysql-test/r/slave_allow_batching_basic.result'
=== renamed file 'mysql-test/r/rpl_slave_compressed_protocol_basic.result' => 'mysql-test/r/slave_compressed_protocol_basic.result'
=== renamed file 'mysql-test/r/rpl_slave_exec_mode_basic.result' => 'mysql-test/r/slave_exec_mode_basic.result'
=== renamed file 'mysql-test/r/rpl_slave_net_timeout_basic.result' => 'mysql-test/r/slave_net_timeout_basic.result'
=== renamed file 'mysql-test/suite/funcs_1/r/is_collation_charset_applic.result' => 'mysql-test/suite/funcs_1/r/is_collation_character_set_applicability.result'
=== renamed file 'mysql-test/suite/funcs_1/t/is_collation_charset_applic.test' => 'mysql-test/suite/funcs_1/t/is_collation_character_set_applicability.test'
=== added file 'mysql-test/t/innodb_bug34053.test'
--- a/mysql-test/t/innodb_bug34053.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/t/innodb_bug34053.test 2008-02-22 23:56:34 +0000
@@ -0,0 +1,50 @@
+#
+# Make sure http://bugs.mysql.com/34053 remains fixed.
+#
+
+-- source include/not_embedded.inc
+-- source include/have_innodb.inc
+
+SET storage_engine=InnoDB;
+
+# we do not really care about what gets printed, we are only
+# interested in getting success or failure according to our
+# expectations
+-- disable_query_log
+-- disable_result_log
+
+GRANT USAGE ON *.* TO 'shane'@'localhost' IDENTIFIED BY '12345';
+FLUSH PRIVILEGES;
+
+-- connect (con1,localhost,shane,12345,)
+
+-- connection con1
+-- error ER_SPECIFIC_ACCESS_DENIED_ERROR
+CREATE TABLE innodb_monitor (a INT) ENGINE=INNODB;
+-- error ER_SPECIFIC_ACCESS_DENIED_ERROR
+CREATE TABLE innodb_mem_validate (a INT) ENGINE=INNODB;
+CREATE TABLE innodb_monitorx (a INT) ENGINE=INNODB;
+DROP TABLE innodb_monitorx;
+CREATE TABLE innodb_monito (a INT) ENGINE=INNODB;
+DROP TABLE innodb_monito;
+CREATE TABLE xinnodb_monitor (a INT) ENGINE=INNODB;
+DROP TABLE xinnodb_monitor;
+CREATE TABLE nnodb_monitor (a INT) ENGINE=INNODB;
+DROP TABLE nnodb_monitor;
+
+-- connection default
+CREATE TABLE innodb_monitor (a INT) ENGINE=INNODB;
+CREATE TABLE innodb_mem_validate (a INT) ENGINE=INNODB;
+
+-- connection con1
+-- error ER_SPECIFIC_ACCESS_DENIED_ERROR
+DROP TABLE innodb_monitor;
+-- error ER_SPECIFIC_ACCESS_DENIED_ERROR
+DROP TABLE innodb_mem_validate;
+
+-- connection default
+DROP TABLE innodb_monitor;
+DROP TABLE innodb_mem_validate;
+DROP USER 'shane'@'localhost';
+
+-- disconnect con1
=== removed file 'mysql-test/t/innodb_bug34053.test'
--- a/mysql-test/t/innodb_bug34053.test 2008-06-12 00:08:07 +0000
+++ b/mysql-test/t/innodb_bug34053.test 1970-01-01 00:00:00 +0000
@@ -1,50 +0,0 @@
-#
-# Make sure http://bugs.mysql.com/34053 remains fixed.
-#
-
--- source include/not_embedded.inc
--- source include/have_innodb.inc
-
-SET storage_engine=InnoDB;
-
-# we do not really care about what gets printed, we are only
-# interested in getting success or failure according to our
-# expectations
--- disable_query_log
--- disable_result_log
-
-GRANT USAGE ON *.* TO 'shane'@'localhost' IDENTIFIED BY '12345';
-FLUSH PRIVILEGES;
-
--- connect (con1,localhost,shane,12345,)
-
--- connection con1
--- error ER_SPECIFIC_ACCESS_DENIED_ERROR
-CREATE TABLE innodb_monitor (a INT) ENGINE=INNODB;
--- error ER_SPECIFIC_ACCESS_DENIED_ERROR
-CREATE TABLE innodb_mem_validate (a INT) ENGINE=INNODB;
-CREATE TABLE innodb_monitorx (a INT) ENGINE=INNODB;
-DROP TABLE innodb_monitorx;
-CREATE TABLE innodb_monito (a INT) ENGINE=INNODB;
-DROP TABLE innodb_monito;
-CREATE TABLE xinnodb_monitor (a INT) ENGINE=INNODB;
-DROP TABLE xinnodb_monitor;
-CREATE TABLE nnodb_monitor (a INT) ENGINE=INNODB;
-DROP TABLE nnodb_monitor;
-
--- connection default
-CREATE TABLE innodb_monitor (a INT) ENGINE=INNODB;
-CREATE TABLE innodb_mem_validate (a INT) ENGINE=INNODB;
-
--- connection con1
--- error ER_SPECIFIC_ACCESS_DENIED_ERROR
-DROP TABLE innodb_monitor;
--- error ER_SPECIFIC_ACCESS_DENIED_ERROR
-DROP TABLE innodb_mem_validate;
-
--- connection default
-DROP TABLE innodb_monitor;
-DROP TABLE innodb_mem_validate;
-DROP USER 'shane'@'localhost';
-
--- disconnect con1
=== added file 'mysql-test/t/log_bin_trust_routine_creators_basic.test'
--- a/mysql-test/t/log_bin_trust_routine_creators_basic.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/t/log_bin_trust_routine_creators_basic.test 2008-04-10 13:14:28 +0000
@@ -0,0 +1,164 @@
+############## mysql-test\t\log_bin_trust_routine_creators_basic.test #########
+# #
+# Variable Name: log_bin_trust_routine_creators #
+# Scope: GLOBAL #
+# Access Type: Dynamic #
+# Data Type: boolean #
+# Default Value: False #
+# Range: #
+# #
+# #
+# Creation Date: 2008-02-12 #
+# Author: Salman #
+# #
+# Description: Test Cases of Dynamic System Variable #
+# log_bin_trust_routine_creators that checks the #
+# behavior of this variable in the following ways #
+# * Default Value #
+# * Valid & Invalid values #
+# * Scope & Access method #
+# * Data Integrity #
+# #
+# Reference: (Not given on website) #
+# #
+###############################################################################
+
+--source include/load_sysvars.inc
+####################################################################
+# START OF log_bin_trust_routine_creators TESTS #
+####################################################################
+
+
+#############################################################
+# Save initial value #
+#############################################################
+
+SET @start_global_value = @@global.log_bin_trust_routine_creators;
+SELECT @start_global_value;
+
+
+--echo '#--------------------FN_DYNVARS_064_01-------------------------#'
+########################################################################
+# Display the DEFAULT value of log_bin_trust_routine_creators #
+########################################################################
+
+SET @@global.log_bin_trust_routine_creators = TRUE;
+SET @@global.log_bin_trust_routine_creators = DEFAULT;
+SELECT @@global.log_bin_trust_routine_creators;
+
+
+--echo '#--------------------FN_DYNVARS_064_02-------------------------#'
+##############################################################################
+# Check the DEFAULT value of log_bin_trust_routine_creators #
+##############################################################################
+
+SET @@global.log_bin_trust_routine_creators = DEFAULT;
+SELECT @@global.log_bin_trust_routine_creators = 'FALSE';
+
+
+--echo '#--------------------FN_DYNVARS_064_03-------------------------#'
+##################################################################
+# Change the value of variable to a valid value for GLOBAL Scope #
+##################################################################
+
+SET @@global.log_bin_trust_routine_creators = ON;
+SELECT @@global.log_bin_trust_routine_creators;
+SET @@global.log_bin_trust_routine_creators = OFF;
+SELECT @@global.log_bin_trust_routine_creators;
+SET @@global.log_bin_trust_routine_creators = 0;
+SELECT @@global.log_bin_trust_routine_creators;
+SET @@global.log_bin_trust_routine_creators = 1;
+SELECT @@global.log_bin_trust_routine_creators;
+SET @@global.log_bin_trust_routine_creators = TRUE;
+SELECT @@global.log_bin_trust_routine_creators;
+SET @@global.log_bin_trust_routine_creators = FALSE;
+SELECT @@global.log_bin_trust_routine_creators;
+
+
+--echo '#-------------------FN_DYNVARS_064_04----------------------------#'
+###########################################################################
+# Test if accessing session log_bin_trust_routine_creators gives error #
+###########################################################################
+
+--Error ER_GLOBAL_VARIABLE
+SET @@session.log_bin_trust_routine_creators = 0;
+--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SELECT @@session.log_bin_trust_routine_creators;
+
+
+--echo '#------------------FN_DYNVARS_064_05-----------------------#'
+##########################################################################
+# Change the value of log_bin_trust_routine_creators to an invalid value #
+##########################################################################
+
+--Error ER_WRONG_VALUE_FOR_VAR
+SET @@global.log_bin_trust_routine_creators = 'ONN';
+--Error ER_WRONG_VALUE_FOR_VAR
+SET @@global.log_bin_trust_routine_creators = "OFFF";
+SET @@global.log_bin_trust_routine_creators = OF;
+SELECT @@global.log_bin_trust_routine_creators;
+--echo 'Bug# 34828: OF is also working as OFF and no error is coming';
+
+--Error ER_WRONG_VALUE_FOR_VAR
+SET @@global.log_bin_trust_routine_creators = TTRUE;
+--Error ER_WRONG_VALUE_FOR_VAR
+SET @@global.log_bin_trust_routine_creators = FELSE;
+--Error ER_WRONG_VALUE_FOR_VAR
+SET @@global.log_bin_trust_routine_creators = -1024;
+--Error ER_WRONG_VALUE_FOR_VAR
+SET @@global.log_bin_trust_routine_creators = 65536;
+--Error ER_WRONG_VALUE_FOR_VAR
+SET @@global.log_bin_trust_routine_creators = 65530.34;
+--Error ER_WRONG_VALUE_FOR_VAR
+SET @@global.log_bin_trust_routine_creators = test;
+
+
+--echo '#------------------FN_DYNVARS_064_06-----------------------#'
+###############################################################################
+# Check if the value in GLOBAL & SESSION Tables matches value in variable #
+###############################################################################
+
+
+SELECT @@global.log_bin_trust_routine_creators = VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='log_bin_trust_routine_creators';
+
+--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SELECT @@session.log_bin_trust_routine_creators = VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='log_bin_trust_routine_creators';
+
+
+--echo '#---------------------FN_DYNVARS_064_07----------------------#'
+#################################################################################
+# Check if accessing variable with and without GLOBAL point to same variable #
+#################################################################################
+
+
+SET @@global.log_bin_trust_routine_creators = TRUE;
+SELECT @@log_bin_trust_routine_creators = @@global.log_bin_trust_routine_creators;
+
+
+--echo '#---------------------FN_DYNVARS_064_08----------------------#'
+###################################################################
+# Check if variable can be accessed with and without @@ sign #
+###################################################################
+
+SET @@global.log_bin_trust_routine_creators = TRUE;
+SELECT @@log_bin_trust_routine_creators;
+--Error ER_UNKNOWN_TABLE
+SELECT local.log_bin_trust_routine_creators;
+--Error ER_UNKNOWN_TABLE
+SELECT session.log_bin_trust_routine_creators;
+--Error ER_BAD_FIELD_ERROR
+SELECT log_bin_trust_routine_creators = @@session.log_bin_trust_routine_creators;
+
+
+####################################
+# Restore initial value #
+####################################
+
+SET @@global.log_bin_trust_routine_creators = @start_global_value;
+SELECT @@global.log_bin_trust_routine_creators;
+
+
+###################################################################
+# END OF log_bin_trust_routine_creators TESTS #
+###################################################################
+
=== renamed file 'mysql-test/t/rpl_slave_allow_batching_basic.test' => 'mysql-test/t/slave_allow_batching_basic.test'
=== renamed file 'mysql-test/t/rpl_slave_compressed_protocol_basic.test' => 'mysql-test/t/slave_compressed_protocol_basic.test'
=== renamed file 'mysql-test/t/rpl_slave_exec_mode_basic.test' => 'mysql-test/t/slave_exec_mode_basic.test'
=== renamed file 'mysql-test/t/rpl_slave_net_timeout_basic.test' => 'mysql-test/t/slave_net_timeout_basic.test'
=== modified file 'mysql-test/t/union.test'
--- a/mysql-test/t/union.test 2008-05-13 15:15:40 +0000
+++ b/mysql-test/t/union.test 2008-09-03 10:13:40 +0000
@@ -91,6 +91,65 @@ SELECT @a:=1 UNION SELECT @a:=@a+1;
(SELECT 1) UNION (SELECT 2) ORDER BY (SELECT a);
(SELECT 1,3) UNION (SELECT 2,1) ORDER BY (SELECT 2);
+
+#
+# Bug#32858: Erro: "Incorrect usage of UNION and INTO" does not take subselects
+# into account
+#
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1);
+
+SELECT a INTO @v FROM (
+ SELECT a FROM t1
+ UNION
+ SELECT a FROM t1
+) alias;
+
+SELECT a INTO OUTFILE 'union.out.file' FROM (
+ SELECT a FROM t1
+ UNION
+ SELECT a FROM t1 WHERE 0
+) alias;
+
+SELECT a INTO DUMPFILE 'union.out.file2' FROM (
+ SELECT a FROM t1
+ UNION
+ SELECT a FROM t1 WHERE 0
+) alias;
+
+#
+# INTO will not be allowed in subqueries in version 5.1 and above.
+#
+SELECT a FROM (
+ SELECT a FROM t1
+ UNION
+ SELECT a INTO @v FROM t1
+) alias;
+
+SELECT a FROM (
+ SELECT a FROM t1
+ UNION
+ SELECT a INTO OUTFILE 'union.out.file3' FROM t1
+) alias;
+
+SELECT a FROM (
+ SELECT a FROM t1
+ UNION
+ SELECT a INTO DUMPFILE 'union.out.file4' FROM t1
+) alias;
+
+SELECT a FROM t1 UNION SELECT a INTO @v FROM t1;
+SELECT a FROM t1 UNION SELECT a INTO OUTFILE 'union.out.file5' FROM t1;
+SELECT a FROM t1 UNION SELECT a INTO OUTFILE 'union.out.file6' FROM t1;
+--error ER_WRONG_USAGE
+SELECT a INTO @v FROM t1 UNION SELECT a FROM t1;
+--error ER_WRONG_USAGE
+SELECT a INTO OUTFILE 'union.out.file7' FROM t1 UNION SELECT a FROM t1;
+--error ER_WRONG_USAGE
+SELECT a INTO DUMPFILE 'union.out.file8' FROM t1 UNION SELECT a FROM t1;
+
+DROP TABLE t1;
+
#
# Test bug reported by joc@stripped
#
=== added file 'win/build-vs9.bat'
--- a/win/build-vs9.bat 1970-01-01 00:00:00 +0000
+++ b/win/build-vs9.bat 2008-08-21 17:11:17 +0000
@@ -0,0 +1,18 @@
+@echo off
+
+REM Copyright (C) 2006 MySQL AB
+REM
+REM This program is free software; you can redistribute it and/or modify
+REM it under the terms of the GNU General Public License as published by
+REM the Free Software Foundation; version 2 of the License.
+REM
+REM This program is distributed in the hope that it will be useful,
+REM but WITHOUT ANY WARRANTY; without even the implied warranty of
+REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+REM GNU General Public License for more details.
+REM
+REM You should have received a copy of the GNU General Public License
+REM along with this program; if not, write to the Free Software
+REM Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+cmake -G "Visual Studio 9 2008"
+
=== removed file 'win/build-vs9.bat'
--- a/win/build-vs9.bat 2008-09-01 10:52:11 +0000
+++ b/win/build-vs9.bat 1970-01-01 00:00:00 +0000
@@ -1,18 +0,0 @@
-@echo off
-
-REM Copyright (C) 2006 MySQL AB
-REM
-REM This program is free software; you can redistribute it and/or modify
-REM it under the terms of the GNU General Public License as published by
-REM the Free Software Foundation; version 2 of the License.
-REM
-REM This program is distributed in the hope that it will be useful,
-REM but WITHOUT ANY WARRANTY; without even the implied warranty of
-REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-REM GNU General Public License for more details.
-REM
-REM You should have received a copy of the GNU General Public License
-REM along with this program; if not, write to the Free Software
-REM Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-cmake -G "Visual Studio 9 2008"
-
=== added file 'win/build-vs9_x64.bat'
--- a/win/build-vs9_x64.bat 1970-01-01 00:00:00 +0000
+++ b/win/build-vs9_x64.bat 2008-08-21 17:11:17 +0000
@@ -0,0 +1,18 @@
+@echo off
+
+REM Copyright (C) 2006 MySQL AB
+REM
+REM This program is free software; you can redistribute it and/or modify
+REM it under the terms of the GNU General Public License as published by
+REM the Free Software Foundation; version 2 of the License.
+REM
+REM This program is distributed in the hope that it will be useful,
+REM but WITHOUT ANY WARRANTY; without even the implied warranty of
+REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+REM GNU General Public License for more details.
+REM
+REM You should have received a copy of the GNU General Public License
+REM along with this program; if not, write to the Free Software
+REM Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+cmake -G "Visual Studio 9 2008 Win64"
+
=== removed file 'win/build-vs9_x64.bat'
--- a/win/build-vs9_x64.bat 2008-09-01 10:52:11 +0000
+++ b/win/build-vs9_x64.bat 1970-01-01 00:00:00 +0000
@@ -1,18 +0,0 @@
-@echo off
-
-REM Copyright (C) 2006 MySQL AB
-REM
-REM This program is free software; you can redistribute it and/or modify
-REM it under the terms of the GNU General Public License as published by
-REM the Free Software Foundation; version 2 of the License.
-REM
-REM This program is distributed in the hope that it will be useful,
-REM but WITHOUT ANY WARRANTY; without even the implied warranty of
-REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-REM GNU General Public License for more details.
-REM
-REM You should have received a copy of the GNU General Public License
-REM along with this program; if not, write to the Free Software
-REM Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-cmake -G "Visual Studio 9 2008 Win64"
-
| Thread |
|---|
| • bzr commit into mysql-6.0 branch (kgeorge:2820) | Georgi Kodinov | 3 Sep |