Commit 0772b6a8 authored by Leonard Zhou's avatar Leonard Zhou

merge

parents d3b37784 6361df87
...@@ -2020,7 +2020,7 @@ static bool add_line(String &buffer,char *line,char *in_string, ...@@ -2020,7 +2020,7 @@ static bool add_line(String &buffer,char *line,char *in_string,
{ {
if (!preserve_comments) if (!preserve_comments)
{ {
// Skip spaces at the beggining of a statement // Skip spaces at the beginning of a statement
if (my_isspace(charset_info,inchar) && (out == line) && if (my_isspace(charset_info,inchar) && (out == line) &&
buffer.is_empty()) buffer.is_empty())
continue; continue;
...@@ -2103,37 +2103,6 @@ static bool add_line(String &buffer,char *line,char *in_string, ...@@ -2103,37 +2103,6 @@ static bool add_line(String &buffer,char *line,char *in_string,
continue; 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)) else if (!*ml_comment && !*in_string && is_prefix(pos, delimiter))
{ {
// Found a statement. Continue parsing after the delimiter // Found a statement. Continue parsing after the delimiter
...@@ -2196,8 +2165,24 @@ static bool add_line(String &buffer,char *line,char *in_string, ...@@ -2196,8 +2165,24 @@ static bool add_line(String &buffer,char *line,char *in_string,
// comment to end of line // comment to end of line
if (preserve_comments) if (preserve_comments)
{
bool started_with_nothing= !buffer.length();
buffer.append(pos); buffer.append(pos);
/*
A single-line comment by itself gets sent immediately so that
client commands (delimiter, status, etc) will be interpreted on
the next line.
*/
if (started_with_nothing)
{
if (com_go(&buffer, 0) > 0) // < 0 is not fatal
DBUG_RETURN(1);
buffer.length(0);
}
}
break; break;
} }
else if (!*in_string && inchar == '/' && *(pos+1) == '*' && else if (!*in_string && inchar == '/' && *(pos+1) == '*' &&
......
...@@ -671,8 +671,11 @@ call p_verify_status_increment(2, 2, 2, 2); ...@@ -671,8 +671,11 @@ call p_verify_status_increment(2, 2, 2, 2);
savepoint a; savepoint a;
call p_verify_status_increment(0, 0, 0, 0); call p_verify_status_increment(0, 0, 0, 0);
insert t1 set a=4; insert t1 set a=4;
--echo # Sic: a bug. Binlog did not register itself this time. --echo # Binlog does not register itself this time for other than the 1st
call p_verify_status_increment(1, 0, 1, 0); --echo # statement of the transaction with MIXED/STATEMENT binlog_format.
--echo # It needs registering with the ROW format. Therefore 1,0,2,2 are
--echo # the correct arguments to this test after bug#40221 fixed.
call p_verify_status_increment(1, 0, 2, 2);
release savepoint a; release savepoint a;
rollback; rollback;
call p_verify_status_increment(0, 0, 0, 0); call p_verify_status_increment(0, 0, 0, 0);
......
...@@ -9,7 +9,6 @@ SET @min_flush_time = 0; ...@@ -9,7 +9,6 @@ SET @min_flush_time = 0;
#SET @max_flush_time = 0; #SET @max_flush_time = 0;
SET @default_key_buffer_size = 131072; SET @default_key_buffer_size = 131072;
SET @min_key_buffer_size = 36;
#SET @default_join_buffer_size = 131072; #SET @default_join_buffer_size = 131072;
#SET @min_join_buffer_size = 8200; #SET @min_join_buffer_size = 8200;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
let $counter= 500; let $counter= 500;
while ($mysql_errno) while ($mysql_errno)
{ {
--error 0,2002,2006 --error 0,2002,2003,2006,2013
show status; show status;
dec $counter; dec $counter;
......
...@@ -9,7 +9,6 @@ SET @min_flush_time = 0; ...@@ -9,7 +9,6 @@ SET @min_flush_time = 0;
#SET @max_flush_time = 0; #SET @max_flush_time = 0;
SET @default_key_buffer_size= 131072; SET @default_key_buffer_size= 131072;
SET @min_key_buffer_size= 8;
#SET @default_join_buffer_size = 131072; #SET @default_join_buffer_size = 131072;
#SET @min_join_buffer_size = 8200; #SET @min_join_buffer_size = 8200;
......
...@@ -996,6 +996,22 @@ SELECT * FROM t1; ...@@ -996,6 +996,22 @@ SELECT * FROM t1;
v b v b
abc 5 abc 5
DROP TABLE t1; DROP TABLE t1;
create table t1 (a tinytext character set latin1);
alter table t1 convert to character set utf8;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` text
) ENGINE=MyISAM DEFAULT CHARSET=utf8
drop table t1;
create table t1 (a mediumtext character set latin1);
alter table t1 convert to character set utf8;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` longtext
) ENGINE=MyISAM DEFAULT CHARSET=utf8
drop table t1;
End of 5.0 tests End of 5.0 tests
drop table if exists t1, t2, t3; drop table if exists t1, t2, t3;
create table t1 (i int); create table t1 (i int);
......
...@@ -21,6 +21,7 @@ flush logs; ...@@ -21,6 +21,7 @@ flush logs;
*** must be a warning master-bin.000001 was not found *** *** must be a warning master-bin.000001 was not found ***
Warnings: Warnings:
Warning 1612 Being purged log MYSQLTEST_VARDIR/log/master-bin.000001 was not found Warning 1612 Being purged log MYSQLTEST_VARDIR/log/master-bin.000001 was not found
Warning 1612 Being purged log MYSQLTEST_VARDIR/log/master-bin.000001 was not found
*** must show one record, of the active binlog, left in the index file after PURGE *** *** must show one record, of the active binlog, left in the index file after PURGE ***
show binary logs; show binary logs;
Log_name File_size Log_name File_size
......
...@@ -770,8 +770,11 @@ call p_verify_status_increment(0, 0, 0, 0); ...@@ -770,8 +770,11 @@ call p_verify_status_increment(0, 0, 0, 0);
SUCCESS SUCCESS
insert t1 set a=4; insert t1 set a=4;
# Sic: a bug. Binlog did not register itself this time. # Binlog does not register itself this time for other than the 1st
call p_verify_status_increment(1, 0, 1, 0); # statement of the transaction with MIXED/STATEMENT binlog_format.
# It needs registering with the ROW format. Therefore 1,0,2,2 are
# the correct arguments to this test after bug#40221 fixed.
call p_verify_status_increment(1, 0, 2, 2);
SUCCESS SUCCESS
release savepoint a; release savepoint a;
......
...@@ -522,3 +522,12 @@ WHERE MATCH(a) AGAINST('test' IN BOOLEAN MODE) AND b=1; ...@@ -522,3 +522,12 @@ WHERE MATCH(a) AGAINST('test' IN BOOLEAN MODE) AND b=1;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref b b 5 const 4 Using where 1 SIMPLE t1 ref b b 5 const 4 Using where
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1(a CHAR(10));
INSERT INTO t1 VALUES('aaa15');
SELECT MATCH(a) AGAINST('aaa1* aaa14 aaa16' IN BOOLEAN MODE) FROM t1;
MATCH(a) AGAINST('aaa1* aaa14 aaa16' IN BOOLEAN MODE)
1
SELECT MATCH(a) AGAINST('aaa1* aaa14 aaa15 aaa16' IN BOOLEAN MODE) FROM t1;
MATCH(a) AGAINST('aaa1* aaa14 aaa15 aaa16' IN BOOLEAN MODE)
2
DROP TABLE t1;
...@@ -176,4 +176,13 @@ IF((ROUND(t1.a,2)=1), 2, ...@@ -176,4 +176,13 @@ IF((ROUND(t1.a,2)=1), 2,
IF((ROUND(t1.a,2)=1), 2, IF((ROUND(t1.a,2)=1), 2,
IF((R IF((R
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1 (c LONGTEXT);
INSERT INTO t1 VALUES(1), (2), (3), (4), ('12345678901234567890');
SELECT * FROM (SELECT MAX(IF(1, CAST(c AS UNSIGNED), 0)) FROM t1) AS te;
MAX(IF(1, CAST(c AS UNSIGNED), 0))
12345678901234567890
SELECT * FROM (SELECT MAX(IFNULL(CAST(c AS UNSIGNED), 0)) FROM t1) AS te;
MAX(IFNULL(CAST(c AS UNSIGNED), 0))
12345678901234567890
DROP TABLE t1;
End of 5.0 tests End of 5.0 tests
...@@ -717,8 +717,6 @@ insert(_latin2'abcd',2,3,_latin2'ef'), ...@@ -717,8 +717,6 @@ insert(_latin2'abcd',2,3,_latin2'ef'),
replace(_latin2'abcd',_latin2'b',_latin2'B'), replace(_latin2'abcd',_latin2'b',_latin2'B'),
encode('abcd','ab') encode('abcd','ab')
; ;
Warnings:
Warning 1265 Data truncated for column 'format(130,10)' at row 1
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
...@@ -727,7 +725,7 @@ t1 CREATE TABLE `t1` ( ...@@ -727,7 +725,7 @@ t1 CREATE TABLE `t1` (
`conv(130,16,10)` varchar(64) DEFAULT NULL, `conv(130,16,10)` varchar(64) DEFAULT NULL,
`hex(130)` varchar(6) NOT NULL DEFAULT '', `hex(130)` varchar(6) NOT NULL DEFAULT '',
`char(130)` varbinary(4) NOT NULL DEFAULT '', `char(130)` varbinary(4) NOT NULL DEFAULT '',
`format(130,10)` varchar(4) NOT NULL DEFAULT '', `format(130,10)` varchar(37) NOT NULL DEFAULT '',
`left(_latin2'a',1)` varchar(1) CHARACTER SET latin2 NOT NULL DEFAULT '', `left(_latin2'a',1)` varchar(1) CHARACTER SET latin2 NOT NULL DEFAULT '',
`right(_latin2'a',1)` varchar(1) CHARACTER SET latin2 NOT NULL DEFAULT '', `right(_latin2'a',1)` varchar(1) CHARACTER SET latin2 NOT NULL DEFAULT '',
`lcase(_latin2'a')` varchar(1) CHARACTER SET latin2 NOT NULL DEFAULT '', `lcase(_latin2'a')` varchar(1) CHARACTER SET latin2 NOT NULL DEFAULT '',
...@@ -2513,4 +2511,12 @@ SELECT HEX(c1) from v1; ...@@ -2513,4 +2511,12 @@ SELECT HEX(c1) from v1;
HEX(c1) HEX(c1)
414243 414243
DROP VIEW v1; DROP VIEW v1;
create table t1(a float);
insert into t1 values (1.33);
select format(a, 2) from t1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def format(a, 2) 253 49 4 Y 0 31 8
format(a, 2)
1.33
drop table t1;
End of 5.0 tests End of 5.0 tests
...@@ -1707,4 +1707,9 @@ where a.VARIABLE_NAME = b.VARIABLE_NAME; ...@@ -1707,4 +1707,9 @@ where a.VARIABLE_NAME = b.VARIABLE_NAME;
a.VARIABLE_VALUE - b.VARIABLE_VALUE a.VARIABLE_VALUE - b.VARIABLE_VALUE
2 2
drop table t0; drop table t0;
CREATE TABLE t1(a INT) KEY_BLOCK_SIZE=1;
SELECT CREATE_OPTIONS FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='t1';
CREATE_OPTIONS
KEY_BLOCK_SIZE=1
DROP TABLE t1;
End of 5.1 tests. End of 5.1 tests.
...@@ -10,10 +10,7 @@ create table t2 (a INT); ...@@ -10,10 +10,7 @@ create table t2 (a INT);
SELECT @@log_bin_trust_function_creators; SELECT @@log_bin_trust_function_creators;
@@log_bin_trust_function_creators @@log_bin_trust_function_creators
0 0
SELECT @@sql_log_bin; ## Creating new function f1 fails because no DETERMINISTIC ###
@@sql_log_bin
1
## Creating new function f1 ##
CREATE FUNCTION f1(a INT) RETURNS INT CREATE FUNCTION f1(a INT) RETURNS INT
BEGIN BEGIN
IF (a < 3) THEN IF (a < 3) THEN
...@@ -21,8 +18,24 @@ INSERT INTO t2 VALUES (a); ...@@ -21,8 +18,24 @@ INSERT INTO t2 VALUES (a);
END IF; END IF;
RETURN 1; RETURN 1;
END| END|
'Bug: Create Function should give error here because non-super user'; ERROR HY000: This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)
'is creating function here'; ## Creating new function f1 fails because non-super user ##
CREATE FUNCTION f1(a INT) RETURNS INT DETERMINISTIC
BEGIN
IF (a < 3) THEN
INSERT INTO t2 VALUES (a);
END IF;
RETURN 1;
END|
ERROR HY000: You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)
## Creating new function f1 succeeds ##
CREATE FUNCTION f1(a INT) RETURNS INT DETERMINISTIC
BEGIN
IF (a < 3) THEN
INSERT INTO t2 VALUES (a);
END IF;
RETURN 1;
END|
## Creating new table t1 ## ## Creating new table t1 ##
CREATE TABLE t1 (a INT); CREATE TABLE t1 (a INT);
## Inserting some records in t1 ## ## Inserting some records in t1 ##
......
...@@ -40,3 +40,4 @@ count(*) ...@@ -40,3 +40,4 @@ count(*)
65536 65536
DROP PROCEDURE sp_addRec; DROP PROCEDURE sp_addRec;
DROP TABLE t1; DROP TABLE t1;
SET @@global.myisam_data_pointer_size = default;
...@@ -180,6 +180,12 @@ ERROR at line 1: DELIMITER cannot contain a backslash character ...@@ -180,6 +180,12 @@ ERROR at line 1: DELIMITER cannot contain a backslash character
1 1
This is a file starting with UTF8 BOM 0xEFBBBF This is a file starting with UTF8 BOM 0xEFBBBF
This is a file starting with UTF8 BOM 0xEFBBBF This is a file starting with UTF8 BOM 0xEFBBBF
delimiter
1
2
2
2
2
End of 5.0 tests End of 5.0 tests
WARNING: --server-arg option not supported in this configuration. WARNING: --server-arg option not supported in this configuration.
Warning (Code 1286): Unknown table engine 'nonexistent' Warning (Code 1286): Unknown table engine 'nonexistent'
......
...@@ -324,7 +324,7 @@ partition by hash (a) ...@@ -324,7 +324,7 @@ partition by hash (a)
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` bit(27) NOT NULL DEFAULT '\0\0\0\0', `a` bit(27) NOT NULL DEFAULT b'0',
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY HASH (a) /*!50100 PARTITION BY HASH (a)
......
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a INT PRIMARY KEY)
ENGINE MYISAM
PARTITION BY HASH (a)
PARTITIONS 1;
INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
ALTER TABLE t1 REORGANIZE PARTITION;
DROP TABLE t1;
create table t1 (a int) create table t1 (a int)
partition by range (a) partition by range (a)
subpartition by key (a) subpartition by key (a)
......
...@@ -4358,3 +4358,29 @@ a ...@@ -4358,3 +4358,29 @@ a
4 4
5 5
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE A (date_key date);
CREATE TABLE C (
pk int,
int_nokey int,
int_key int,
date_key date NOT NULL,
date_nokey date,
varchar_key varchar(1)
);
INSERT INTO C VALUES
(1,1,1,'0000-00-00',NULL,NULL),
(1,1,1,'0000-00-00',NULL,NULL);
SELECT 1 FROM C WHERE pk > ANY (SELECT 1 FROM C);
1
SELECT COUNT(DISTINCT 1) FROM C
WHERE date_key = (SELECT 1 FROM A WHERE C.date_key IS NULL) GROUP BY pk;
COUNT(DISTINCT 1)
SELECT date_nokey FROM C
WHERE int_key IN (SELECT 1 FROM A)
HAVING date_nokey = '10:41:7'
ORDER BY date_key;
date_nokey
Warnings:
Warning 1292 Incorrect date value: '10:41:7' for column 'date_nokey' at row 1
DROP TABLE A,C;
End of 5.1 tests
...@@ -708,6 +708,47 @@ HEX(b1) HEX(b2) i2 ...@@ -708,6 +708,47 @@ HEX(b1) HEX(b2) i2
1 0 100 1 0 100
1 0 200 1 0 200
DROP TABLE t1, t2; DROP TABLE t1, t2;
CREATE TABLE IF NOT EXISTS t1 (
f1 bit(2) NOT NULL default b'10',
f2 bit(14) NOT NULL default b'11110000111100'
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`f1` bit(2) NOT NULL DEFAULT b'10',
`f2` bit(14) NOT NULL DEFAULT b'11110000111100'
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci
DROP TABLE t1;
CREATE TABLE IF NOT EXISTS t1 (
f1 bit(2) NOT NULL default b''
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
ERROR 42000: Invalid default value for 'f1'
create table t1bit7 (a1 bit(7) not null) engine=MyISAM;
create table t2bit7 (b1 bit(7)) engine=MyISAM;
insert into t1bit7 values (b'1100000');
insert into t1bit7 values (b'1100001');
insert into t1bit7 values (b'1100010');
insert into t2bit7 values (b'1100001');
insert into t2bit7 values (b'1100010');
insert into t2bit7 values (b'1100110');
select bin(a1) from t1bit7, t2bit7 where t1bit7.a1=t2bit7.b1;
bin(a1)
1100001
1100010
drop table t1bit7, t2bit7;
create table t1bit7 (a1 bit(15) not null) engine=MyISAM;
create table t2bit7 (b1 bit(15)) engine=MyISAM;
insert into t1bit7 values (b'110000011111111');
insert into t1bit7 values (b'110000111111111');
insert into t1bit7 values (b'110001011111111');
insert into t2bit7 values (b'110000111111111');
insert into t2bit7 values (b'110001011111111');
insert into t2bit7 values (b'110011011111111');
select bin(a1) from t1bit7, t2bit7 where t1bit7.a1=t2bit7.b1;
bin(a1)
110000111111111
110001011111111
drop table t1bit7, t2bit7;
End of 5.0 tests End of 5.0 tests
create table t1(a bit(7)); create table t1(a bit(7));
insert into t1 values(0x40); insert into t1 values(0x40);
......
...@@ -393,15 +393,11 @@ f1 + 0e0 ...@@ -393,15 +393,11 @@ f1 + 0e0
-1.0000000150475e+30 -1.0000000150475e+30
drop table t1; drop table t1;
create table t1(d double, u bigint unsigned); create table t1(d double, u bigint unsigned);
insert into t1(d) values (9.2233720368547777e+18), insert into t1(d) values (9.22337203685479e18),
(9.223372036854779e18),
(9.22337203685479e18),
(1.84e19); (1.84e19);
update t1 set u = d; update t1 set u = d;
select u from t1; select u from t1;
u u
9223372036854775808
9223372036854779904
9223372036854790144 9223372036854790144
18400000000000000000 18400000000000000000
drop table t1; drop table t1;
......
...@@ -1029,4 +1029,28 @@ SELECT 1 FROM t1 ORDER BY(UPDATEXML(a, '1', '1')); ...@@ -1029,4 +1029,28 @@ SELECT 1 FROM t1 ORDER BY(UPDATEXML(a, '1', '1'));
1 1
1 1
DROP TABLE t1; DROP TABLE t1;
SET @xml=
'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title> Title - document with document declaration</title>
</head>
<body> Hi, Im a webpage with document a declaration </body>
</html>';
SELECT ExtractValue(@xml, 'html/head/title');
ExtractValue(@xml, 'html/head/title')
Title - document with document declaration
SELECT ExtractValue(@xml, 'html/body');
ExtractValue(@xml, 'html/body')
Hi, Im a webpage with document a declaration
SELECT ExtractValue('<xml "xxx" "yyy">CharData</xml>', '/xml');
ExtractValue('<xml "xxx" "yyy">CharData</xml>', '/xml')
NULL
Warnings:
Warning 1525 Incorrect XML value: 'parse error at line 1 pos 11: STRING unexpected ('>' wanted)'
SELECT ExtractValue('<xml xxx "yyy">CharData</xml>', '/xml');
ExtractValue('<xml xxx "yyy">CharData</xml>', '/xml')
NULL
Warnings:
Warning 1525 Incorrect XML value: 'parse error at line 1 pos 17: STRING unexpected ('>' wanted)'
End of 5.1 tests End of 5.1 tests
...@@ -16,15 +16,32 @@ ...@@ -16,15 +16,32 @@
# Created: # Created:
# 2008-08-27 mleich # 2008-08-27 mleich
# #
# Modified:
# 2008-11-17 pcrews
# added --disable / --enable_warning statements to minimize differences
# between platforms (Bug#40177 Test funcs_1.storedproc failing on Pushbuild)
#
# TODO: (After 5.1 GA)
# 1) Examine reordering statements in this file to minimize the number of
# --disable / --enable_warning statements. Unsure if performance gains
# warrant the working time
# 2) We could probably add a comparison of the # of warnings before the
# assignment of @v1_proc and @v1_func to the # of warnings after assignment
# The difference of these values should be zero
# Refer to Bug#40177 - http://bugs.mysql.com/bug.php?id=40177 for notes as well
eval UPDATE t1_aux SET f1 = NULL; eval UPDATE t1_aux SET f1 = NULL;
# Enforce that all user variables have the same data type and initial value. # Enforce that all user variables have the same data type and initial value.
SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
--disable_warnings
eval UPDATE t1_aux SET f1 = $test_value; eval UPDATE t1_aux SET f1 = $test_value;
--enable_warnings
SELECT f1 INTO @v1_tab FROM t1_aux; SELECT f1 INTO @v1_tab FROM t1_aux;
--disable_warnings
eval CALL sproc_1($test_value, @v1_proc); eval CALL sproc_1($test_value, @v1_proc);
eval SET @v1_func = func_1($test_value); eval SET @v1_func = func_1($test_value);
--enable_warnings
if (`SELECT @v1_tab <> @v1_proc OR @v1_tab <> @v2_proc OR @v1_tab <> @v1_func`) if (`SELECT @v1_tab <> @v1_proc OR @v1_tab <> @v2_proc OR @v1_tab <> @v1_func`)
{ {
......
# Disabled by hhunger (2008-03-03) due to WL4204 # Disabled by hhunger (2008-03-03) due to WL4204
innodb_charset : Due to bug#20447 innodb_charset : Bug#20447 Problem with prefix keys with contractions and expansions
myisam_charset : Due to bug#20477 myisam_charset : Bug#20447 Problem with prefix keys with contractions and expansions
memory_charset : Due to bug#20447 memory_charset : Bug#20447 Problem with prefix keys with contractions and expansions
ndb_charset : Due to bug#20447 ndb_charset : Bug#20447 Problem with prefix keys with contractions and expansions
...@@ -9,8 +9,7 @@ ...@@ -9,8 +9,7 @@
# Do not use any TAB characters for whitespace. # Do not use any TAB characters for whitespace.
# #
############################################################################## ##############################################################################
partition_03ndb : BUG#16385 2006-03-24 mikael Partitions: crash when updating a range partitioned NDB table
ndb_partition_error2 : HF is not sure if the test can work as internded on all the platforms ndb_partition_error2 : Bug#40989 ndb_partition_error2 needs maintenance
# the below testcase have been reworked to avoid the bug, test contains comment, keep bug open # the below testcase have been reworked to avoid the bug, test contains comment, keep bug open
...@@ -6,7 +6,7 @@ create table t1 (a bit(0), primary key (a)) engine='INNODB' partition by key (a) ...@@ -6,7 +6,7 @@ create table t1 (a bit(0), primary key (a)) engine='INNODB' partition by key (a)
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` bit(1) NOT NULL DEFAULT '\0', `a` bit(1) NOT NULL DEFAULT b'0',
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY (a) */ /*!50100 PARTITION BY KEY (a) */
...@@ -18,7 +18,7 @@ partition pa2); ...@@ -18,7 +18,7 @@ partition pa2);
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` bit(1) NOT NULL DEFAULT '\0', `a` bit(1) NOT NULL DEFAULT b'0',
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY (a) /*!50100 PARTITION BY KEY (a)
...@@ -30,7 +30,7 @@ partition by key (a) partitions 2; ...@@ -30,7 +30,7 @@ partition by key (a) partitions 2;
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` bit(64) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0', `a` bit(64) NOT NULL DEFAULT b'0',
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY (a) /*!50100 PARTITION BY KEY (a)
...@@ -58,7 +58,7 @@ partition pa4 max_rows=40 min_rows=2); ...@@ -58,7 +58,7 @@ partition pa4 max_rows=40 min_rows=2);
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` bit(64) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0', `a` bit(64) NOT NULL DEFAULT b'0',
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY (a) /*!50100 PARTITION BY KEY (a)
...@@ -88,7 +88,7 @@ partition by key (a) partitions 4; ...@@ -88,7 +88,7 @@ partition by key (a) partitions 4;
show create table t2; show create table t2;
Table Create Table Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
`a` bit(1) NOT NULL DEFAULT '\0', `a` bit(1) NOT NULL DEFAULT b'0',
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY (a) /*!50100 PARTITION BY KEY (a)
...@@ -102,7 +102,7 @@ alter table t2 drop primary key; ...@@ -102,7 +102,7 @@ alter table t2 drop primary key;
show create table t2; show create table t2;
Table Create Table Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
`a` bit(1) NOT NULL DEFAULT '\0' `a` bit(1) NOT NULL DEFAULT b'0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY (a) /*!50100 PARTITION BY KEY (a)
PARTITIONS 4 */ PARTITIONS 4 */
...@@ -114,7 +114,7 @@ alter table t2 add primary key (a); ...@@ -114,7 +114,7 @@ alter table t2 add primary key (a);
show create table t2; show create table t2;
Table Create Table Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
`a` bit(1) NOT NULL DEFAULT '\0', `a` bit(1) NOT NULL DEFAULT b'0',
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY (a) /*!50100 PARTITION BY KEY (a)
...@@ -133,7 +133,7 @@ partition pa4 values less than (256)); ...@@ -133,7 +133,7 @@ partition pa4 values less than (256));
show create table t3; show create table t3;
Table Create Table Table Create Table
t3 CREATE TABLE `t3` ( t3 CREATE TABLE `t3` (
`a` bit(8) NOT NULL DEFAULT '\0', `a` bit(8) NOT NULL DEFAULT b'0',
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY RANGE (a) /*!50100 PARTITION BY RANGE (a)
...@@ -416,7 +416,7 @@ partition pa3 values in (17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32)); ...@@ -416,7 +416,7 @@ partition pa3 values in (17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32));
show create table t4; show create table t4;
Table Create Table Table Create Table
t4 CREATE TABLE `t4` ( t4 CREATE TABLE `t4` (
`a` bit(8) NOT NULL DEFAULT '\0', `a` bit(8) NOT NULL DEFAULT b'0',
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY LIST (a) /*!50100 PARTITION BY LIST (a)
......
...@@ -6,7 +6,7 @@ create table t1 (a bit(0), primary key (a)) engine='MyISAM' partition by key (a) ...@@ -6,7 +6,7 @@ create table t1 (a bit(0), primary key (a)) engine='MyISAM' partition by key (a)
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` bit(1) NOT NULL DEFAULT '\0', `a` bit(1) NOT NULL DEFAULT b'0',
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY (a) */ /*!50100 PARTITION BY KEY (a) */
...@@ -18,7 +18,7 @@ partition pa2); ...@@ -18,7 +18,7 @@ partition pa2);
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` bit(1) NOT NULL DEFAULT '\0', `a` bit(1) NOT NULL DEFAULT b'0',
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY (a) /*!50100 PARTITION BY KEY (a)
...@@ -30,7 +30,7 @@ partition by key (a) partitions 2; ...@@ -30,7 +30,7 @@ partition by key (a) partitions 2;
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` bit(64) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0', `a` bit(64) NOT NULL DEFAULT b'0',
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY (a) /*!50100 PARTITION BY KEY (a)
...@@ -58,7 +58,7 @@ partition pa4 max_rows=40 min_rows=2); ...@@ -58,7 +58,7 @@ partition pa4 max_rows=40 min_rows=2);
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` bit(64) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0', `a` bit(64) NOT NULL DEFAULT b'0',
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY (a) /*!50100 PARTITION BY KEY (a)
...@@ -88,7 +88,7 @@ partition by key (a) partitions 4; ...@@ -88,7 +88,7 @@ partition by key (a) partitions 4;
show create table t2; show create table t2;
Table Create Table Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
`a` bit(1) NOT NULL DEFAULT '\0', `a` bit(1) NOT NULL DEFAULT b'0',
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY (a) /*!50100 PARTITION BY KEY (a)
...@@ -102,7 +102,7 @@ alter table t2 drop primary key; ...@@ -102,7 +102,7 @@ alter table t2 drop primary key;
show create table t2; show create table t2;
Table Create Table Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
`a` bit(1) NOT NULL DEFAULT '\0' `a` bit(1) NOT NULL DEFAULT b'0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY (a) /*!50100 PARTITION BY KEY (a)
PARTITIONS 4 */ PARTITIONS 4 */
...@@ -114,7 +114,7 @@ alter table t2 add primary key (a); ...@@ -114,7 +114,7 @@ alter table t2 add primary key (a);
show create table t2; show create table t2;
Table Create Table Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
`a` bit(1) NOT NULL DEFAULT '\0', `a` bit(1) NOT NULL DEFAULT b'0',
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY (a) /*!50100 PARTITION BY KEY (a)
...@@ -133,7 +133,7 @@ partition pa4 values less than (256)); ...@@ -133,7 +133,7 @@ partition pa4 values less than (256));
show create table t3; show create table t3;
Table Create Table Table Create Table
t3 CREATE TABLE `t3` ( t3 CREATE TABLE `t3` (
`a` bit(8) NOT NULL DEFAULT '\0', `a` bit(8) NOT NULL DEFAULT b'0',
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY RANGE (a) /*!50100 PARTITION BY RANGE (a)
...@@ -416,7 +416,7 @@ partition pa3 values in (17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32)); ...@@ -416,7 +416,7 @@ partition pa3 values in (17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32));
show create table t4; show create table t4;
Table Create Table Table Create Table
t4 CREATE TABLE `t4` ( t4 CREATE TABLE `t4` (
`a` bit(8) NOT NULL DEFAULT '\0', `a` bit(8) NOT NULL DEFAULT b'0',
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY LIST (a) /*!50100 PARTITION BY LIST (a)
......
SET @max_row = 20;
create table t1 (a bit(65), primary key (a)) partition by key (a);
ERROR 42000: Display width out of range for column 'a' (max = 64)
create table t1 (a bit(0), primary key (a)) partition by key (a);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bit(1) NOT NULL DEFAULT '\0',
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY (a) */
drop table t1;
create table t1 (a bit(0), primary key (a)) partition by key (a) (
partition pa1 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp',
partition pa2 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp');
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bit(1) NOT NULL DEFAULT '\0',
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/'
/*!50100 PARTITION BY KEY (a)
(PARTITION pa1 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM,
PARTITION pa2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
drop table t1;
create table t1 (a bit(64), primary key (a)) partition by key (a);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bit(64) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0',
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY (a) */
insert into t1 values
(b'1111111111111111111111111111111111111111111111111111111111111111'),
(b'1000000000000000000000000000000000000000000000000000000000000000'),
(b'0000000000000000000000000000000000000000000000000000000000000001'),
(b'1010101010101010101010101010101010101010101010101010101010101010'),
(b'0101010101010101010101010101010101010101010101010101010101010101');
select hex(a) from t1;
hex(a)
1
5555555555555555
8000000000000000
AAAAAAAAAAAAAAAA
FFFFFFFFFFFFFFFF
drop table t1;
create table t1 (a bit(64), primary key (a)) partition by key (a)(
partition pa1 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=20 min_rows=2,
partition pa2 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=3,
partition pa3 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=4,
partition pa4 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=40 min_rows=2);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bit(64) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0',
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/'
/*!50100 PARTITION BY KEY (a)
(PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM,
PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM,
PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM,
PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
insert into t1 values
(b'1111111111111111111111111111111111111111111111111111111111111111'),
(b'1000000000000000000000000000000000000000000000000000000000000000'),
(b'0000000000000000000000000000000000000000000000000000000000000001'),
(b'1010101010101010101010101010101010101010101010101010101010101010'),
(b'0101010101010101010101010101010101010101010101010101010101010101');
select hex(a) from t1;
hex(a)
1
5555555555555555
8000000000000000
AAAAAAAAAAAAAAAA
FFFFFFFFFFFFFFFF
drop table t1;
create table t1 (a bit, primary key (a)) partition by key (a);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bit(1) NOT NULL DEFAULT '\0',
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY (a) */
insert into t1 values (b'0'), (b'1');
select hex(a) from t1;
hex(a)
0
1
alter table t1 drop primary key;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bit(1) NOT NULL DEFAULT '\0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY (a) */
select hex(a) from t1;
hex(a)
0
1
alter table t1 add primary key (a);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bit(1) NOT NULL DEFAULT '\0',
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY (a) */
select hex(a) from t1;
hex(a)
0
1
drop table t1;
...@@ -213,5 +213,10 @@ START TRANSACTION; ...@@ -213,5 +213,10 @@ START TRANSACTION;
INSERT INTO t1 VALUES (NULL, 'first row t2'); INSERT INTO t1 VALUES (NULL, 'first row t2');
SET autocommit=OFF; SET autocommit=OFF;
ALTER TABLE t1 AUTO_INCREMENT = 10; ALTER TABLE t1 AUTO_INCREMENT = 10;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
INSERT INTO t1 VALUES (NULL, 'second row t2'); INSERT INTO t1 VALUES (NULL, 'second row t2');
SELECT a,b FROM t1 ORDER BY a;
a b
1 first row t2
2 second row t2
DROP TABLE t1; DROP TABLE t1;
partition_basic_ndb : Bug#19899 Crashing the server partition_basic_ndb : Bug#19899 Crashing the server
# http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-limitations-syntax.html # http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-limitations-syntax.html
partition_bit_ndb : NDB does not support bit column in index
partition_sessions : needs system_3_init.inc
partition_syntax_ndb : Bug#36735 Not supported partition_syntax_ndb : Bug#36735 Not supported
partition_value_innodb : Bug#30581 partition_value tests use disallowed CAST() function
partition_value_myisam : Bug#30581 partition_value tests use disallowed CAST() function
partition_value_ndb : Bug#30581 partition_value tests use disallowed CAST() function
################################################################################
# t/partition_bit_ndb.test #
# #
# Purpose: #
# Tests around bit type #
# NDB branch #
# #
#------------------------------------------------------------------------------#
# Original Author: HH #
# Original Date: 2006-08-01 #
# Change Author: #
# Change Date: #
# Change: #
################################################################################
#
# NOTE: PLEASE DO NOT ADD NOT MYISAM SPECIFIC TESTCASES HERE !
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY.
#
# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
#------------------------------------------------------------------------------#
# General not engine specific settings and requirements
##### Options, for debugging support #####
let $debug= 0;
let $with_partitioning= 1;
##### Option, for displaying files #####
let $ls= 1;
##### Number of rows for the INSERT/UPDATE/DELETE/SELECT experiments #####
# on partioned tables
SET @max_row = 20;
# The server must support partitioning.
--source include/have_partition.inc
#------------------------------------------------------------------------------#
# Engine specific settings and requirements
##### Storage engine to be tested
--source include/have_ndb.inc
let $engine= 'NDB';
connection default;
# range, list and hash partitioning in ndb requires new_mode
--disable_query_log
set new=on;
--enable_query_log
##### Assign a big number smaller than the maximum value for partitions #####
# and smaller than the maximum value of SIGNED INTEGER
let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_bit.inc
This diff is collapsed.
...@@ -68,10 +68,12 @@ INSERT INTO t1 VALUES (NULL, 'first row t2'); ...@@ -68,10 +68,12 @@ INSERT INTO t1 VALUES (NULL, 'first row t2');
--connection con2 --connection con2
SET autocommit=OFF; SET autocommit=OFF;
--error ER_LOCK_WAIT_TIMEOUT
ALTER TABLE t1 AUTO_INCREMENT = 10; ALTER TABLE t1 AUTO_INCREMENT = 10;
--connection con1 --connection con1
INSERT INTO t1 VALUES (NULL, 'second row t2'); INSERT INTO t1 VALUES (NULL, 'second row t2');
SELECT a,b FROM t1 ORDER BY a;
--disconnect con2 --disconnect con2
--disconnect con1 --disconnect con1
--connection default --connection default
......
...@@ -8,9 +8,9 @@ ...@@ -8,9 +8,9 @@
#------------------------------------------------------------------------------# #------------------------------------------------------------------------------#
# Original Author: mleich # # Original Author: mleich #
# Original Date: 2006-04-11 # # Original Date: 2006-04-11 #
# Change Author: # # Change Author: mleich #
# Change Date: # # Change Date: 2008-12-08 #
# Change: # # Change: Remove test from disabled.def + change test that it gets skipped #
################################################################################ ################################################################################
# #
...@@ -22,6 +22,12 @@ ...@@ -22,6 +22,12 @@
# any of the variables. # any of the variables.
# #
#
# CAST() within the partitioning function si no more supported, but we get
# this functionality probably soon again. Therefor we do not delete this test.
--skip # CAST() in partitioning function is currently not supported.
#------------------------------------------------------------------------------# #------------------------------------------------------------------------------#
# General not engine specific settings and requirements # General not engine specific settings and requirements
......
...@@ -8,9 +8,9 @@ ...@@ -8,9 +8,9 @@
#------------------------------------------------------------------------------# #------------------------------------------------------------------------------#
# Original Author: mleich # # Original Author: mleich #
# Original Date: 2006-04-11 # # Original Date: 2006-04-11 #
# Change Author: # # Change Author: mleich #
# Change Date: # # Change Date: 2008-12-08 #
# Change: # # Change: Remove test from disabled.def + change test that it gets skipped #
################################################################################ ################################################################################
# #
...@@ -22,6 +22,12 @@ ...@@ -22,6 +22,12 @@
# any of the variables. # any of the variables.
# #
#
# CAST() within the partitioning function si no more supported, but we get
# this functionality probably soon again. Therefor we do not delete this test.
--skip # CAST() in partitioning function is currently not supported.
#------------------------------------------------------------------------------# #------------------------------------------------------------------------------#
# General not engine specific settings and requirements # General not engine specific settings and requirements
......
...@@ -8,9 +8,9 @@ ...@@ -8,9 +8,9 @@
#------------------------------------------------------------------------------# #------------------------------------------------------------------------------#
# Original Author: mleich # # Original Author: mleich #
# Original Date: 2006-04-11 # # Original Date: 2006-04-11 #
# Change Author: # # Change Author: mleich #
# Change Date: # # Change Date: 2008-12-08 #
# Change: # # Change: Remove test from disabled.def + change test that it gets skipped #
################################################################################ ################################################################################
# #
...@@ -22,6 +22,12 @@ ...@@ -22,6 +22,12 @@
# any of the variables. # any of the variables.
# #
#
# CAST() within the partitioning function si no more supported, but we get
# this functionality probably soon again. Therefor we do not delete this test.
--skip # CAST() in partitioning function is currently not supported.
#------------------------------------------------------------------------------# #------------------------------------------------------------------------------#
# General not engine specific settings and requirements # General not engine specific settings and requirements
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
# #
############################################################################## ##############################################################################
rpl_ndb_circular : Bug#33849 COMMIT event missing in cluster circular replication. rpl_ndb_circular : Bug#41183 rpl_ndb_circular, rpl_ndb_circular_simplex need maintenance, crash
rpl_ndb_circular_simplex : Bug#33849 COMMIT event missing in cluster circular replication. rpl_ndb_circular_simplex : Bug#41183 rpl_ndb_circular, rpl_ndb_circular_simplex need maintenance, crash
# the below testcase have been reworked to avoid the bug, test contains comment, keep bug open # the below testcase have been reworked to avoid the bug, test contains comment, keep bug open
...@@ -17,14 +17,14 @@ ...@@ -17,14 +17,14 @@
# * Valid & Invalid values # # * Valid & Invalid values #
# * Scope & Access method # # * Scope & Access method #
# * Data Integrity # # * Data Integrity #
# Modified: Horst Hunger 2008-11-27 #
# Due to OS depending values the check has been changed #
# from concrete values to ranges. #
# # # #
# Reference: http://dev.mysql.com/doc/refman/5.1/en/ # # Reference: #
# server-system-variables.html # # http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html #
# # # #
############################################################################### ###############################################################################
# Changes: #
# 2008-03-06 hhunger Got "lost connections with 5.1.24 #
########################################################################
--source include/load_sysvars.inc --source include/load_sysvars.inc
...@@ -38,8 +38,6 @@ ...@@ -38,8 +38,6 @@
######################################################################## ########################################################################
SET @start_value = @@global.key_buffer_size; SET @start_value = @@global.key_buffer_size;
SELECT @start_value;
--echo '#--------------------FN_DYNVARS_055_01------------------------#' --echo '#--------------------FN_DYNVARS_055_01------------------------#'
######################################################################## ########################################################################
...@@ -49,9 +47,7 @@ SELECT @start_value; ...@@ -49,9 +47,7 @@ SELECT @start_value;
SET @@global.key_buffer_size = 99; SET @@global.key_buffer_size = 99;
--Error ER_NO_DEFAULT --Error ER_NO_DEFAULT
SET @@global.key_buffer_size = DEFAULT; SET @@global.key_buffer_size = DEFAULT;
--echo 'Bug# 34878: This variable has default value according to documentation'; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
SELECT @@global.key_buffer_size = @min_key_buffer_size;
--echo '#---------------------FN_DYNVARS_055_02-------------------------#' --echo '#---------------------FN_DYNVARS_055_02-------------------------#'
############################################### ###############################################
...@@ -66,26 +62,25 @@ SELECT @@global.key_buffer_size = @start_value; ...@@ -66,26 +62,25 @@ SELECT @@global.key_buffer_size = @start_value;
# Change the value of key_buffer_size to a valid value # # Change the value of key_buffer_size to a valid value #
######################################################################## ########################################################################
SET @@global.key_buffer_size = @min_key_buffer_size; SET @@global.key_buffer_size = 8 ;
SELECT @@global.key_buffer_size= @min_key_buffer_size; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
--disable_warnings --disable_warnings
#Due to "lost connection" #Due to increasing the runtime significantly and allocating the buffer instantly.
#SET @@global.key_buffer_size = 4294967295; #SET @@global.key_buffer_size = 4294967295;
--enable_warnings --enable_warnings
#SELECT @@global.key_buffer_size; #SELECT @@global.key_buffer_size;
SET @@global.key_buffer_size = 1800; SET @@global.key_buffer_size = 1800;
SELECT @@global.key_buffer_size = @min_key_buffer_size; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
SET @@global.key_buffer_size = 65535; SET @@global.key_buffer_size = 65535;
SELECT @@global.key_buffer_size; SELECT @@global.key_buffer_size;
echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--echo '#--------------------FN_DYNVARS_055_04-------------------------#' --echo '#--------------------FN_DYNVARS_055_04-------------------------#'
########################################################################### ###########################################################################
# Change the value of key_buffer_size to invalid value # # Change the value of key_buffer_size to invalid value #
########################################################################### ###########################################################################
# Due to "lost connection" # Due to increasing the runtime significantly and allocating the buffer instantly
# with a size of 18446744073709551615 bytes with 32bit exec.
#SET @@global.key_buffer_size = -1; #SET @@global.key_buffer_size = -1;
#SELECT @@global.key_buffer_size; #SELECT @@global.key_buffer_size;
#SET @@global.key_buffer_size = 100000000000; #SET @@global.key_buffer_size = 100000000000;
...@@ -96,16 +91,14 @@ SELECT @@global.key_buffer_size; ...@@ -96,16 +91,14 @@ SELECT @@global.key_buffer_size;
#SET @@global.key_buffer_size = -1024; #SET @@global.key_buffer_size = -1024;
#SELECT @@global.key_buffer_size; #SELECT @@global.key_buffer_size;
SET @@global.key_buffer_size = 4; SET @@global.key_buffer_size = 4;
SELECT @@global.key_buffer_size = @min_key_buffer_size; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
--echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--Error ER_WRONG_TYPE_FOR_VAR --Error ER_WRONG_TYPE_FOR_VAR
SET @@global.key_buffer_size = ON; SET @@global.key_buffer_size = ON;
SELECT @@global.key_buffer_size = @min_key_buffer_size; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
--Error ER_WRONG_TYPE_FOR_VAR --Error ER_WRONG_TYPE_FOR_VAR
SET @@global.key_buffer_size = 'test'; SET @@global.key_buffer_size = 'test';
SELECT @@global.key_buffer_size = @min_key_buffer_size; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
--echo '#-------------------FN_DYNVARS_055_05----------------------------#' --echo '#-------------------FN_DYNVARS_055_05----------------------------#'
########################################################################### ###########################################################################
...@@ -114,8 +107,7 @@ SELECT @@global.key_buffer_size = @min_key_buffer_size; ...@@ -114,8 +107,7 @@ SELECT @@global.key_buffer_size = @min_key_buffer_size;
--Error ER_GLOBAL_VARIABLE --Error ER_GLOBAL_VARIABLE
SET @@session.key_buffer_size = 0; SET @@session.key_buffer_size = 0;
SELECT @@key_buffer_size = @min_key_buffer_size; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
--echo '#----------------------FN_DYNVARS_055_06------------------------#' --echo '#----------------------FN_DYNVARS_055_06------------------------#'
############################################################################## ##############################################################################
...@@ -130,17 +122,15 @@ SELECT @@key_buffer_size = VARIABLE_VALUE ...@@ -130,17 +122,15 @@ SELECT @@key_buffer_size = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='key_buffer_size'; WHERE VARIABLE_NAME='key_buffer_size';
--echo '#---------------------FN_DYNVARS_055_07----------------------#' --echo '#---------------------FN_DYNVARS_055_07----------------------#'
################################################################### ###################################################################
# Check if TRUE and FALSE values can be used on variable # # Check if TRUE and FALSE values can be used on variable #
################################################################### ###################################################################
SET @@global.key_buffer_size = TRUE; SET @@global.key_buffer_size = TRUE;
SELECT @@global.key_buffer_size = @min_key_buffer_size; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
SET @@global.key_buffer_size = FALSE; SET @@global.key_buffer_size = FALSE;
SELECT @@global.key_buffer_size = @min_key_buffer_size; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
--echo '#---------------------FN_DYNVARS_055_08----------------------#' --echo '#---------------------FN_DYNVARS_055_08----------------------#'
##################################################################### #####################################################################
...@@ -150,7 +140,7 @@ SELECT @@global.key_buffer_size = @min_key_buffer_size; ...@@ -150,7 +140,7 @@ SELECT @@global.key_buffer_size = @min_key_buffer_size;
# due to differences in contents of the warnings # due to differences in contents of the warnings
--disable_warnings --disable_warnings
SET @@global.key_buffer_size = @min_key_buffer_size; SET @@global.key_buffer_size = 8 ;
SELECT @@key_buffer_size = @@global.key_buffer_size; SELECT @@key_buffer_size = @@global.key_buffer_size;
--enable_warnings --enable_warnings
...@@ -160,8 +150,8 @@ SELECT @@key_buffer_size = @@global.key_buffer_size; ...@@ -160,8 +150,8 @@ SELECT @@key_buffer_size = @@global.key_buffer_size;
########################################################################## ##########################################################################
--Error ER_GLOBAL_VARIABLE --Error ER_GLOBAL_VARIABLE
SET key_buffer_size = @min_key_buffer_size; SET key_buffer_size = 8 ;
SELECT @@key_buffer_size = @min_key_buffer_size; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
--Error ER_PARSE_ERROR --Error ER_PARSE_ERROR
SET local.key_buffer_size = 10; SET local.key_buffer_size = 10;
--Error ER_UNKNOWN_TABLE --Error ER_UNKNOWN_TABLE
...@@ -179,9 +169,9 @@ SELECT key_buffer_size = @@session.key_buffer_size; ...@@ -179,9 +169,9 @@ SELECT key_buffer_size = @@session.key_buffer_size;
############################## ##############################
SET @@global.key_buffer_size = @start_value; SET @@global.key_buffer_size = @start_value;
SELECT @@global.key_buffer_size;
--enable_warnings --enable_warnings
####################################################################### #######################################################################
# END OF key_buffer_size TESTS # # END OF key_buffer_size TESTS #
####################################################################### #######################################################################
...@@ -17,9 +17,12 @@ ...@@ -17,9 +17,12 @@
# * Valid & Invalid values # # * Valid & Invalid values #
# * Scope & Access method # # * Scope & Access method #
# * Data Integrity # # * Data Integrity #
# Modified: Horst Hunger, 2008-11-28 #
# disabled warnings as they contain the values of this variable, #
# modified the check of the value only checking a range. #
# # # #
# Reference: http://dev.mysql.com/doc/refman/5.1/en/ # # Reference: #
# server-system-variables.html # # http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html #
# # # #
############################################################################### ###############################################################################
...@@ -37,14 +40,13 @@ ...@@ -37,14 +40,13 @@
# Save initial value # # Save initial value #
############################################################# #############################################################
# due to difference when running on Windows (bug filed) # due to differences when running on Windows (bug filed)
--source include/not_windows.inc --source include/not_windows.inc
--disable_warnings
SET @start_global_value = @@global.sort_buffer_size; SET @start_global_value = @@global.sort_buffer_size;
SELECT @start_global_value;
SET @start_session_value = @@session.sort_buffer_size; SET @start_session_value = @@session.sort_buffer_size;
SELECT @start_session_value;
--echo '#--------------------FN_DYNVARS_151_01-------------------------#' --echo '#--------------------FN_DYNVARS_151_01-------------------------#'
###################################################################### ######################################################################
...@@ -53,11 +55,11 @@ SELECT @start_session_value; ...@@ -53,11 +55,11 @@ SELECT @start_session_value;
SET @@global.sort_buffer_size = 1000; SET @@global.sort_buffer_size = 1000;
SET @@global.sort_buffer_size = DEFAULT; SET @@global.sort_buffer_size = DEFAULT;
SELECT @@global.sort_buffer_size= 2097144 OR @@global.sort_buffer_size= 2097116; SELECT @@global.sort_buffer_size >= 2097116 AND @@global.sort_buffer_size < 3000000;
SET @@session.sort_buffer_size = 2000; SET @@session.sort_buffer_size = 2000;
SET @@session.sort_buffer_size = DEFAULT; SET @@session.sort_buffer_size = DEFAULT;
SELECT @@session.sort_buffer_size= 2097144 OR @@session.sort_buffer_size= 2097116; SELECT @@session.sort_buffer_size >= 2097116 AND @@session.sort_buffer_size < 3000000;
--echo '#--------------------FN_DYNVARS_151_02-------------------------#' --echo '#--------------------FN_DYNVARS_151_02-------------------------#'
...@@ -66,10 +68,10 @@ SELECT @@session.sort_buffer_size= 2097144 OR @@session.sort_buffer_size= 209711 ...@@ -66,10 +68,10 @@ SELECT @@session.sort_buffer_size= 2097144 OR @@session.sort_buffer_size= 209711
###################################################################### ######################################################################
SET @@global.sort_buffer_size = DEFAULT; SET @@global.sort_buffer_size = DEFAULT;
SELECT @@global.sort_buffer_size = 2097144 OR @@global.sort_buffer_size= 2097116; SELECT @@global.sort_buffer_size >= 2097116 AND @@global.sort_buffer_size < 3000000;
SET @@session.sort_buffer_size = DEFAULT; SET @@session.sort_buffer_size = DEFAULT;
SELECT @@session.sort_buffer_size = 2097144 OR @@session.sort_buffer_size= 2097116; SELECT @@session.sort_buffer_size >= 2097116 AND @@session.sort_buffer_size < 3000000;
--echo '#--------------------FN_DYNVARS_151_03-------------------------#' --echo '#--------------------FN_DYNVARS_151_03-------------------------#'
...@@ -78,14 +80,13 @@ SELECT @@session.sort_buffer_size = 2097144 OR @@session.sort_buffer_size= 20971 ...@@ -78,14 +80,13 @@ SELECT @@session.sort_buffer_size = 2097144 OR @@session.sort_buffer_size= 20971
################################################################################ ################################################################################
SET @@global.sort_buffer_size = 32776; SET @@global.sort_buffer_size = 32776;
SELECT @@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804; SELECT @@global.sort_buffer_size >= 32776 AND @@global.sort_buffer_size < 33000;
SET @@global.sort_buffer_size = 32777; SET @@global.sort_buffer_size = 32777;
SELECT @@global.sort_buffer_size= 32777 OR @@global.sort_buffer_size= 32804; SELECT @@global.sort_buffer_size >= 32776 AND @@global.sort_buffer_size < 33000;
SET @@global.sort_buffer_size = 4294967295; SET @@global.sort_buffer_size = 4294967295;
SELECT @@global.sort_buffer_size; SELECT @@global.sort_buffer_size;
SET @@global.sort_buffer_size = 4294967294; SET @@global.sort_buffer_size = 4294967294;
SELECT @@global.sort_buffer_size; SELECT @@global.sort_buffer_size;
--echo 'Bug# 34877: Invalid Values are showing in variable on assigning valid values.';
--echo '#--------------------FN_DYNVARS_151_04-------------------------#' --echo '#--------------------FN_DYNVARS_151_04-------------------------#'
################################################################################### ###################################################################################
...@@ -93,9 +94,9 @@ SELECT @@global.sort_buffer_size; ...@@ -93,9 +94,9 @@ SELECT @@global.sort_buffer_size;
################################################################################### ###################################################################################
SET @@session.sort_buffer_size = 32776; SET @@session.sort_buffer_size = 32776;
SELECT @@session.sort_buffer_size= 32776 OR @@session.sort_buffer_size= 32804; SELECT @@session.sort_buffer_size >= 32776 AND @@session.sort_buffer_size < 33000;
SET @@session.sort_buffer_size = 32777; SET @@session.sort_buffer_size = 32777;
SELECT @@session.sort_buffer_size= 32777 OR @@session.sort_buffer_size= 32804; SELECT @@session.sort_buffer_size >= 32776 AND @@session.sort_buffer_size < 33000;
SET @@session.sort_buffer_size = 4294967295; SET @@session.sort_buffer_size = 4294967295;
SELECT @@session.sort_buffer_size; SELECT @@session.sort_buffer_size;
SET @@session.sort_buffer_size = 4294967294; SET @@session.sort_buffer_size = 4294967294;
...@@ -108,9 +109,9 @@ SELECT @@session.sort_buffer_size; ...@@ -108,9 +109,9 @@ SELECT @@session.sort_buffer_size;
################################################################## ##################################################################
SET @@global.sort_buffer_size = 32775; SET @@global.sort_buffer_size = 32775;
SELECT @@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804; SELECT @@global.sort_buffer_size >= 32776 AND @@global.sort_buffer_size < 33000;
SET @@global.sort_buffer_size = -1024; SET @@global.sort_buffer_size = -1024;
SELECT @@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804; SELECT @@global.sort_buffer_size >= 32776 AND @@global.sort_buffer_size < 33000;
SET @@global.sort_buffer_size = 4294967296; SET @@global.sort_buffer_size = 4294967296;
SELECT @@global.sort_buffer_size; SELECT @@global.sort_buffer_size;
--Error ER_PARSE_ERROR --Error ER_PARSE_ERROR
...@@ -121,19 +122,16 @@ SET @@global.sort_buffer_size = test; ...@@ -121,19 +122,16 @@ SET @@global.sort_buffer_size = test;
SELECT @@global.sort_buffer_size; SELECT @@global.sort_buffer_size;
SET @@session.sort_buffer_size = 32775; SET @@session.sort_buffer_size = 32775;
SELECT @@session.sort_buffer_size= 32776 OR @@session.sort_buffer_size= 32804; SELECT @@session.sort_buffer_size >= 32776 AND @@session.sort_buffer_size < 33000;
SET @@session.sort_buffer_size = -2; SET @@session.sort_buffer_size = -2;
SELECT @@session.sort_buffer_size= 32776 OR @@session.sort_buffer_size= 32804; SELECT @@session.sort_buffer_size >= 32776 AND @@session.sort_buffer_size < 33000;
--Error ER_PARSE_ERROR --Error ER_PARSE_ERROR
SET @@session.sort_buffer_size = 65530.34.; SET @@session.sort_buffer_size = 65530.34.;
SET @@session.sort_buffer_size = 4294967296; SET @@session.sort_buffer_size = 4294967296;
SELECT @@session.sort_buffer_size; SELECT @@session.sort_buffer_size;
--echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--Error ER_WRONG_TYPE_FOR_VAR --Error ER_WRONG_TYPE_FOR_VAR
SET @@session.sort_buffer_size = test; SET @@session.sort_buffer_size = test;
SELECT @@session.sort_buffer_size;
--echo '#------------------FN_DYNVARS_151_06-----------------------#' --echo '#------------------FN_DYNVARS_151_06-----------------------#'
#################################################################### ####################################################################
...@@ -141,14 +139,16 @@ SELECT @@session.sort_buffer_size; ...@@ -141,14 +139,16 @@ SELECT @@session.sort_buffer_size;
#################################################################### ####################################################################
SELECT @@global.sort_buffer_size = VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='sort_buffer_size'; SELECT @@global.sort_buffer_size = VARIABLE_VALUE FROM
INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='sort_buffer_size';
--echo '#------------------FN_DYNVARS_151_07-----------------------#' --echo '#------------------FN_DYNVARS_151_07-----------------------#'
#################################################################### ####################################################################
# Check if the value in SESSION Table matches value in variable # # Check if the value in SESSION Table matches value in variable #
#################################################################### ####################################################################
SELECT @@session.sort_buffer_size = VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='sort_buffer_size'; SELECT @@session.sort_buffer_size = VARIABLE_VALUE FROM
INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='sort_buffer_size';
--echo '#------------------FN_DYNVARS_151_08-----------------------#' --echo '#------------------FN_DYNVARS_151_08-----------------------#'
...@@ -157,11 +157,9 @@ SELECT @@session.sort_buffer_size = VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSI ...@@ -157,11 +157,9 @@ SELECT @@session.sort_buffer_size = VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSI
#################################################################### ####################################################################
SET @@global.sort_buffer_size = TRUE; SET @@global.sort_buffer_size = TRUE;
SELECT @@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804; SELECT @@global.sort_buffer_size >= 32776 AND @@global.sort_buffer_size < 33000;
SET @@global.sort_buffer_size = FALSE; SET @@global.sort_buffer_size = FALSE;
SELECT @@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804; SELECT @@global.sort_buffer_size >= 32776 AND @@global.sort_buffer_size < 33000;
echo 'Bug: Errors should be displayed on assigning TRUE/FALSE to variable';
--echo '#---------------------FN_DYNVARS_151_09----------------------#' --echo '#---------------------FN_DYNVARS_151_09----------------------#'
#################################################################################### ####################################################################################
...@@ -171,11 +169,10 @@ echo 'Bug: Errors should be displayed on assigning TRUE/FALSE to variable'; ...@@ -171,11 +169,10 @@ echo 'Bug: Errors should be displayed on assigning TRUE/FALSE to variable';
SET @@global.sort_buffer_size = 9000; SET @@global.sort_buffer_size = 9000;
SELECT @@sort_buffer_size = @@global.sort_buffer_size; SELECT @@sort_buffer_size = @@global.sort_buffer_size;
--echo '#---------------------FN_DYNVARS_151_10----------------------#' --echo '#---------------------FN_DYNVARS_151_10----------------------#'
######################################################################################################## ###################################################################################################
# Check if accessing variable with SESSION,LOCAL and without SCOPE points to same session variable # # Check if accessing variable with SESSION,LOCAL and without SCOPE points to same session variable#
######################################################################################################## ###################################################################################################
SET @@sort_buffer_size = 9000; SET @@sort_buffer_size = 9000;
SELECT @@sort_buffer_size = @@local.sort_buffer_size; SELECT @@sort_buffer_size = @@local.sort_buffer_size;
...@@ -188,8 +185,7 @@ SELECT @@local.sort_buffer_size = @@session.sort_buffer_size; ...@@ -188,8 +185,7 @@ SELECT @@local.sort_buffer_size = @@session.sort_buffer_size;
################################################################################### ###################################################################################
SET sort_buffer_size = 9100; SET sort_buffer_size = 9100;
SELECT @sort_buffer_size= 32776 OR @@sort_buffer_size= 32804; SELECT @@sort_buffer_size >= 32776 AND @@sort_buffer_size < 33000;
SELECT @@sort_buffer_size;
--Error ER_UNKNOWN_TABLE --Error ER_UNKNOWN_TABLE
SELECT local.sort_buffer_size; SELECT local.sort_buffer_size;
--Error ER_UNKNOWN_TABLE --Error ER_UNKNOWN_TABLE
...@@ -203,11 +199,11 @@ SELECT sort_buffer_size = @@session.sort_buffer_size; ...@@ -203,11 +199,11 @@ SELECT sort_buffer_size = @@session.sort_buffer_size;
#################################### ####################################
SET @@global.sort_buffer_size = @start_global_value; SET @@global.sort_buffer_size = @start_global_value;
SELECT @@global.sort_buffer_size;
SET @@session.sort_buffer_size = @start_session_value; SET @@session.sort_buffer_size = @start_session_value;
SELECT @@session.sort_buffer_size;
--enable_warnings
############################################################# #############################################################
# END OF sort_buffer_size TESTS # # END OF sort_buffer_size TESTS #
############################################################# #############################################################
SET @start_value = @@global.key_buffer_size; SET @start_value = @@global.key_buffer_size;
SELECT @start_value;
@start_value
1048576
'#--------------------FN_DYNVARS_055_01------------------------#' '#--------------------FN_DYNVARS_055_01------------------------#'
SET @@global.key_buffer_size = 99; SET @@global.key_buffer_size = 99;
SET @@global.key_buffer_size = DEFAULT; SET @@global.key_buffer_size = DEFAULT;
ERROR 42000: Variable 'key_buffer_size' doesn't have a default value ERROR 42000: Variable 'key_buffer_size' doesn't have a default value
'Bug# 34878: This variable has default value according to documentation'; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
SELECT @@global.key_buffer_size = @min_key_buffer_size; @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
@@global.key_buffer_size = @min_key_buffer_size
1 1
'#---------------------FN_DYNVARS_055_02-------------------------#' '#---------------------FN_DYNVARS_055_02-------------------------#'
SET @@global.key_buffer_size = @start_value; SET @@global.key_buffer_size = @start_value;
...@@ -16,21 +12,20 @@ SELECT @@global.key_buffer_size = @start_value; ...@@ -16,21 +12,20 @@ SELECT @@global.key_buffer_size = @start_value;
@@global.key_buffer_size = @start_value @@global.key_buffer_size = @start_value
1 1
'#--------------------FN_DYNVARS_055_03------------------------#' '#--------------------FN_DYNVARS_055_03------------------------#'
SET @@global.key_buffer_size = @min_key_buffer_size; SET @@global.key_buffer_size = 8 ;
SELECT @@global.key_buffer_size= @min_key_buffer_size; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
@@global.key_buffer_size= @min_key_buffer_size @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
1 1
SET @@global.key_buffer_size = 1800; SET @@global.key_buffer_size = 1800;
Warnings: Warnings:
Warning 1292 Truncated incorrect key_buffer_size value: '1800' Warning 1292 Truncated incorrect key_buffer_size value: '1800'
SELECT @@global.key_buffer_size = @min_key_buffer_size; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
@@global.key_buffer_size = @min_key_buffer_size @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
1 1
SET @@global.key_buffer_size = 65535; SET @@global.key_buffer_size = 65535;
SELECT @@global.key_buffer_size; SELECT @@global.key_buffer_size;
@@global.key_buffer_size @@global.key_buffer_size
61440 61440
'Bug # 34837: Errors are not coming on assigning invalid values to variable'
'#--------------------FN_DYNVARS_055_04-------------------------#' '#--------------------FN_DYNVARS_055_04-------------------------#'
SET @@global.key_buffer_size = 10000.01; SET @@global.key_buffer_size = 10000.01;
ERROR 42000: Incorrect argument type to variable 'key_buffer_size' ERROR 42000: Incorrect argument type to variable 'key_buffer_size'
...@@ -40,25 +35,24 @@ SELECT @@global.key_buffer_size; ...@@ -40,25 +35,24 @@ SELECT @@global.key_buffer_size;
SET @@global.key_buffer_size = 4; SET @@global.key_buffer_size = 4;
Warnings: Warnings:
Warning 1292 Truncated incorrect key_buffer_size value: '4' Warning 1292 Truncated incorrect key_buffer_size value: '4'
SELECT @@global.key_buffer_size = @min_key_buffer_size; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
@@global.key_buffer_size = @min_key_buffer_size @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
1 1
'Bug # 34837: Errors are not coming on assigning invalid values to variable';
SET @@global.key_buffer_size = ON; SET @@global.key_buffer_size = ON;
ERROR 42000: Incorrect argument type to variable 'key_buffer_size' ERROR 42000: Incorrect argument type to variable 'key_buffer_size'
SELECT @@global.key_buffer_size = @min_key_buffer_size; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
@@global.key_buffer_size = @min_key_buffer_size @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
1 1
SET @@global.key_buffer_size = 'test'; SET @@global.key_buffer_size = 'test';
ERROR 42000: Incorrect argument type to variable 'key_buffer_size' ERROR 42000: Incorrect argument type to variable 'key_buffer_size'
SELECT @@global.key_buffer_size = @min_key_buffer_size; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
@@global.key_buffer_size = @min_key_buffer_size @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
1 1
'#-------------------FN_DYNVARS_055_05----------------------------#' '#-------------------FN_DYNVARS_055_05----------------------------#'
SET @@session.key_buffer_size = 0; SET @@session.key_buffer_size = 0;
ERROR HY000: Variable 'key_buffer_size' is a GLOBAL variable and should be set with SET GLOBAL ERROR HY000: Variable 'key_buffer_size' is a GLOBAL variable and should be set with SET GLOBAL
SELECT @@key_buffer_size = @min_key_buffer_size; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
@@key_buffer_size = @min_key_buffer_size @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
1 1
'#----------------------FN_DYNVARS_055_06------------------------#' '#----------------------FN_DYNVARS_055_06------------------------#'
SELECT @@global.key_buffer_size = VARIABLE_VALUE SELECT @@global.key_buffer_size = VARIABLE_VALUE
...@@ -75,25 +69,25 @@ WHERE VARIABLE_NAME='key_buffer_size'; ...@@ -75,25 +69,25 @@ WHERE VARIABLE_NAME='key_buffer_size';
SET @@global.key_buffer_size = TRUE; SET @@global.key_buffer_size = TRUE;
Warnings: Warnings:
Warning 1292 Truncated incorrect key_buffer_size value: '1' Warning 1292 Truncated incorrect key_buffer_size value: '1'
SELECT @@global.key_buffer_size = @min_key_buffer_size; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
@@global.key_buffer_size = @min_key_buffer_size @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
1 1
SET @@global.key_buffer_size = FALSE; SET @@global.key_buffer_size = FALSE;
Warnings: Warnings:
Warning 1438 Cannot drop default keycache Warning 1438 Cannot drop default keycache
SELECT @@global.key_buffer_size = @min_key_buffer_size; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
@@global.key_buffer_size = @min_key_buffer_size @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
1 1
'#---------------------FN_DYNVARS_055_08----------------------#' '#---------------------FN_DYNVARS_055_08----------------------#'
SET @@global.key_buffer_size = @min_key_buffer_size; SET @@global.key_buffer_size = 8 ;
SELECT @@key_buffer_size = @@global.key_buffer_size; SELECT @@key_buffer_size = @@global.key_buffer_size;
@@key_buffer_size = @@global.key_buffer_size @@key_buffer_size = @@global.key_buffer_size
1 1
'#---------------------FN_DYNVARS_055_09----------------------#' '#---------------------FN_DYNVARS_055_09----------------------#'
SET key_buffer_size = @min_key_buffer_size; SET key_buffer_size = 8 ;
ERROR HY000: Variable 'key_buffer_size' is a GLOBAL variable and should be set with SET GLOBAL ERROR HY000: Variable 'key_buffer_size' is a GLOBAL variable and should be set with SET GLOBAL
SELECT @@key_buffer_size = @min_key_buffer_size; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
@@key_buffer_size = @min_key_buffer_size @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
1 1
SET local.key_buffer_size = 10; SET local.key_buffer_size = 10;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key_buffer_size = 10' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key_buffer_size = 10' at line 1
...@@ -106,6 +100,3 @@ ERROR 42S02: Unknown table 'global' in field list ...@@ -106,6 +100,3 @@ ERROR 42S02: Unknown table 'global' in field list
SELECT key_buffer_size = @@session.key_buffer_size; SELECT key_buffer_size = @@session.key_buffer_size;
ERROR 42S22: Unknown column 'key_buffer_size' in 'field list' ERROR 42S22: Unknown column 'key_buffer_size' in 'field list'
SET @@global.key_buffer_size = @start_value; SET @@global.key_buffer_size = @start_value;
SELECT @@global.key_buffer_size;
@@global.key_buffer_size
1048576
SET @start_value = @@global.key_buffer_size; SET @start_value = @@global.key_buffer_size;
SELECT @start_value;
@start_value
1048576
'#--------------------FN_DYNVARS_055_01------------------------#' '#--------------------FN_DYNVARS_055_01------------------------#'
SET @@global.key_buffer_size = 99; SET @@global.key_buffer_size = 99;
SET @@global.key_buffer_size = DEFAULT; SET @@global.key_buffer_size = DEFAULT;
ERROR 42000: Variable 'key_buffer_size' doesn't have a default value ERROR 42000: Variable 'key_buffer_size' doesn't have a default value
'Bug# 34878: This variable has default value according to documentation'; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
SELECT @@global.key_buffer_size = @min_key_buffer_size; @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
@@global.key_buffer_size = @min_key_buffer_size
1 1
'#---------------------FN_DYNVARS_055_02-------------------------#' '#---------------------FN_DYNVARS_055_02-------------------------#'
SET @@global.key_buffer_size = @start_value; SET @@global.key_buffer_size = @start_value;
...@@ -16,21 +12,20 @@ SELECT @@global.key_buffer_size = @start_value; ...@@ -16,21 +12,20 @@ SELECT @@global.key_buffer_size = @start_value;
@@global.key_buffer_size = @start_value @@global.key_buffer_size = @start_value
1 1
'#--------------------FN_DYNVARS_055_03------------------------#' '#--------------------FN_DYNVARS_055_03------------------------#'
SET @@global.key_buffer_size = @min_key_buffer_size; SET @@global.key_buffer_size = 8 ;
SELECT @@global.key_buffer_size= @min_key_buffer_size; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
@@global.key_buffer_size= @min_key_buffer_size @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
1 1
SET @@global.key_buffer_size = 1800; SET @@global.key_buffer_size = 1800;
Warnings: Warnings:
Warning 1292 Truncated incorrect key_buffer_size value: '1800' Warning 1292 Truncated incorrect key_buffer_size value: '1800'
SELECT @@global.key_buffer_size = @min_key_buffer_size; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
@@global.key_buffer_size = @min_key_buffer_size @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
1 1
SET @@global.key_buffer_size = 65535; SET @@global.key_buffer_size = 65535;
SELECT @@global.key_buffer_size; SELECT @@global.key_buffer_size;
@@global.key_buffer_size @@global.key_buffer_size
61440 61440
'Bug # 34837: Errors are not coming on assigning invalid values to variable'
'#--------------------FN_DYNVARS_055_04-------------------------#' '#--------------------FN_DYNVARS_055_04-------------------------#'
SET @@global.key_buffer_size = 10000.01; SET @@global.key_buffer_size = 10000.01;
ERROR 42000: Incorrect argument type to variable 'key_buffer_size' ERROR 42000: Incorrect argument type to variable 'key_buffer_size'
...@@ -40,25 +35,24 @@ SELECT @@global.key_buffer_size; ...@@ -40,25 +35,24 @@ SELECT @@global.key_buffer_size;
SET @@global.key_buffer_size = 4; SET @@global.key_buffer_size = 4;
Warnings: Warnings:
Warning 1292 Truncated incorrect key_buffer_size value: '4' Warning 1292 Truncated incorrect key_buffer_size value: '4'
SELECT @@global.key_buffer_size = @min_key_buffer_size; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
@@global.key_buffer_size = @min_key_buffer_size @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
1 1
'Bug # 34837: Errors are not coming on assigning invalid values to variable';
SET @@global.key_buffer_size = ON; SET @@global.key_buffer_size = ON;
ERROR 42000: Incorrect argument type to variable 'key_buffer_size' ERROR 42000: Incorrect argument type to variable 'key_buffer_size'
SELECT @@global.key_buffer_size = @min_key_buffer_size; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
@@global.key_buffer_size = @min_key_buffer_size @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
1 1
SET @@global.key_buffer_size = 'test'; SET @@global.key_buffer_size = 'test';
ERROR 42000: Incorrect argument type to variable 'key_buffer_size' ERROR 42000: Incorrect argument type to variable 'key_buffer_size'
SELECT @@global.key_buffer_size = @min_key_buffer_size; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
@@global.key_buffer_size = @min_key_buffer_size @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
1 1
'#-------------------FN_DYNVARS_055_05----------------------------#' '#-------------------FN_DYNVARS_055_05----------------------------#'
SET @@session.key_buffer_size = 0; SET @@session.key_buffer_size = 0;
ERROR HY000: Variable 'key_buffer_size' is a GLOBAL variable and should be set with SET GLOBAL ERROR HY000: Variable 'key_buffer_size' is a GLOBAL variable and should be set with SET GLOBAL
SELECT @@key_buffer_size = @min_key_buffer_size; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
@@key_buffer_size = @min_key_buffer_size @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
1 1
'#----------------------FN_DYNVARS_055_06------------------------#' '#----------------------FN_DYNVARS_055_06------------------------#'
SELECT @@global.key_buffer_size = VARIABLE_VALUE SELECT @@global.key_buffer_size = VARIABLE_VALUE
...@@ -75,25 +69,25 @@ WHERE VARIABLE_NAME='key_buffer_size'; ...@@ -75,25 +69,25 @@ WHERE VARIABLE_NAME='key_buffer_size';
SET @@global.key_buffer_size = TRUE; SET @@global.key_buffer_size = TRUE;
Warnings: Warnings:
Warning 1292 Truncated incorrect key_buffer_size value: '1' Warning 1292 Truncated incorrect key_buffer_size value: '1'
SELECT @@global.key_buffer_size = @min_key_buffer_size; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
@@global.key_buffer_size = @min_key_buffer_size @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
1 1
SET @@global.key_buffer_size = FALSE; SET @@global.key_buffer_size = FALSE;
Warnings: Warnings:
Warning 1438 Cannot drop default keycache Warning 1438 Cannot drop default keycache
SELECT @@global.key_buffer_size = @min_key_buffer_size; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
@@global.key_buffer_size = @min_key_buffer_size @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
1 1
'#---------------------FN_DYNVARS_055_08----------------------#' '#---------------------FN_DYNVARS_055_08----------------------#'
SET @@global.key_buffer_size = @min_key_buffer_size; SET @@global.key_buffer_size = 8 ;
SELECT @@key_buffer_size = @@global.key_buffer_size; SELECT @@key_buffer_size = @@global.key_buffer_size;
@@key_buffer_size = @@global.key_buffer_size @@key_buffer_size = @@global.key_buffer_size
1 1
'#---------------------FN_DYNVARS_055_09----------------------#' '#---------------------FN_DYNVARS_055_09----------------------#'
SET key_buffer_size = @min_key_buffer_size; SET key_buffer_size = 8 ;
ERROR HY000: Variable 'key_buffer_size' is a GLOBAL variable and should be set with SET GLOBAL ERROR HY000: Variable 'key_buffer_size' is a GLOBAL variable and should be set with SET GLOBAL
SELECT @@key_buffer_size = @min_key_buffer_size; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
@@key_buffer_size = @min_key_buffer_size @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
1 1
SET local.key_buffer_size = 10; SET local.key_buffer_size = 10;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key_buffer_size = 10' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key_buffer_size = 10' at line 1
...@@ -106,6 +100,3 @@ ERROR 42S02: Unknown table 'global' in field list ...@@ -106,6 +100,3 @@ ERROR 42S02: Unknown table 'global' in field list
SELECT key_buffer_size = @@session.key_buffer_size; SELECT key_buffer_size = @@session.key_buffer_size;
ERROR 42S22: Unknown column 'key_buffer_size' in 'field list' ERROR 42S22: Unknown column 'key_buffer_size' in 'field list'
SET @@global.key_buffer_size = @start_value; SET @@global.key_buffer_size = @start_value;
SELECT @@global.key_buffer_size;
@@global.key_buffer_size
1048576
SET @start_global_value = @@global.tmp_table_size; SET @start_global_value = @@global.tmp_table_size;
SELECT @start_global_value;
@start_global_value
16777216
SET @start_session_value = @@session.tmp_table_size; SET @start_session_value = @@session.tmp_table_size;
SELECT @start_session_value;
@start_session_value
16777216
'Bug# 34876: This variable has invalid default value as compared to documentation';
'#--------------------FN_DYNVARS_005_01-------------------------#' '#--------------------FN_DYNVARS_005_01-------------------------#'
SET @@global.tmp_table_size = 100; SET @@global.tmp_table_size = 100;
Warnings: Warnings:
Warning 1292 Truncated incorrect tmp_table_size value: '100' Warning 1292 Truncated incorrect tmp_table_size value: '100'
SET @@global.tmp_table_size = DEFAULT; SET @@global.tmp_table_size = DEFAULT;
SELECT @@global.tmp_table_size;
@@global.tmp_table_size
16777216
'Bug# 34876: This variable has invalid default value as compared to documentation';
SET @@session.tmp_table_size = 200; SET @@session.tmp_table_size = 200;
Warnings: Warnings:
Warning 1292 Truncated incorrect tmp_table_size value: '200' Warning 1292 Truncated incorrect tmp_table_size value: '200'
SET @@session.tmp_table_size = DEFAULT; SET @@session.tmp_table_size = DEFAULT;
SELECT @@session.tmp_table_size;
@@session.tmp_table_size
16777216
'Bug# 34876: This variable has invalid default value as compared to documentation';
'#--------------------FN_DYNVARS_005_02-------------------------#' '#--------------------FN_DYNVARS_005_02-------------------------#'
SET @@global.tmp_table_size = DEFAULT; SELECT @@global.tmp_table_size >= 16777216;
SELECT @@global.tmp_table_size = 33554432; @@global.tmp_table_size >= 16777216
@@global.tmp_table_size = 33554432 1
0 SELECT @@session.tmp_table_size >= 16777216;
SET @@session.tmp_table_size = DEFAULT; @@session.tmp_table_size >= 16777216
SELECT @@session.tmp_table_size = 33554432; 1
@@session.tmp_table_size = 33554432
0
'Bug# 34876: This variable has invalid default value as compared to documentation';
'#--------------------FN_DYNVARS_005_03-------------------------#' '#--------------------FN_DYNVARS_005_03-------------------------#'
SET @@global.tmp_table_size = 1024; SET @@global.tmp_table_size = 1024;
SELECT @@global.tmp_table_size; SELECT @@global.tmp_table_size;
...@@ -52,7 +34,7 @@ SET @@session.tmp_table_size = 1024; ...@@ -52,7 +34,7 @@ SET @@session.tmp_table_size = 1024;
SELECT @@session.tmp_table_size; SELECT @@session.tmp_table_size;
@@session.tmp_table_size @@session.tmp_table_size
1024 1024
SET @@session.tmp_table_size =4294967295; SET @@session.tmp_table_size = 4294967295;
SELECT @@session.tmp_table_size; SELECT @@session.tmp_table_size;
@@session.tmp_table_size @@session.tmp_table_size
4294967295 4294967295
...@@ -79,7 +61,6 @@ Warning 1292 Truncated incorrect tmp_table_size value: '1000' ...@@ -79,7 +61,6 @@ Warning 1292 Truncated incorrect tmp_table_size value: '1000'
SELECT @@global.tmp_table_size; SELECT @@global.tmp_table_size;
@@global.tmp_table_size @@global.tmp_table_size
1024 1024
'Bug # 34837: Errors are not coming on assigning invalid values to variable';
SET @@global.tmp_table_size = ON; SET @@global.tmp_table_size = ON;
ERROR 42000: Incorrect argument type to variable 'tmp_table_size' ERROR 42000: Incorrect argument type to variable 'tmp_table_size'
SET @@global.tmp_table_size = OFF; SET @@global.tmp_table_size = OFF;
...@@ -96,7 +77,6 @@ Warning 1292 Truncated incorrect tmp_table_size value: '0' ...@@ -96,7 +77,6 @@ Warning 1292 Truncated incorrect tmp_table_size value: '0'
SELECT @@global.tmp_table_size; SELECT @@global.tmp_table_size;
@@global.tmp_table_size @@global.tmp_table_size
1024 1024
'Bug:Error should be shown that variable is numeric and can not assigned boolean value';
SET @@global.tmp_table_size = 65530.34; SET @@global.tmp_table_size = 65530.34;
ERROR 42000: Incorrect argument type to variable 'tmp_table_size' ERROR 42000: Incorrect argument type to variable 'tmp_table_size'
SET @@global.tmp_table_size ="Test"; SET @@global.tmp_table_size ="Test";
...@@ -120,9 +100,9 @@ SELECT @@session.tmp_table_size; ...@@ -120,9 +100,9 @@ SELECT @@session.tmp_table_size;
SET @@session.tmp_table_size = "Test"; SET @@session.tmp_table_size = "Test";
ERROR 42000: Incorrect argument type to variable 'tmp_table_size' ERROR 42000: Incorrect argument type to variable 'tmp_table_size'
SET @@session.tmp_table_size = 12345678901; SET @@session.tmp_table_size = 12345678901;
SELECT @@session.tmp_table_size; SELECT @@session.tmp_table_size IN (12345678901,4294967295);
@@session.tmp_table_size @@session.tmp_table_size IN (12345678901,4294967295)
4294967295 1
'#------------------FN_DYNVARS_005_06-----------------------#' '#------------------FN_DYNVARS_005_06-----------------------#'
SELECT @@global.tmp_table_size = VARIABLE_VALUE SELECT @@global.tmp_table_size = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
...@@ -163,10 +143,4 @@ ERROR 42S02: Unknown table 'global' in field list ...@@ -163,10 +143,4 @@ ERROR 42S02: Unknown table 'global' in field list
SELECT tmp_table_size = @@session.tmp_table_size; SELECT tmp_table_size = @@session.tmp_table_size;
ERROR 42S22: Unknown column 'tmp_table_size' in 'field list' ERROR 42S22: Unknown column 'tmp_table_size' in 'field list'
SET @@global.tmp_table_size = @start_global_value; SET @@global.tmp_table_size = @start_global_value;
SELECT @@global.tmp_table_size;
@@global.tmp_table_size
16777216
SET @@session.tmp_table_size = @start_session_value; SET @@session.tmp_table_size = @start_session_value;
SELECT @@session.tmp_table_size;
@@session.tmp_table_size
16777216
SET @start_global_value = @@global.tmp_table_size;
SELECT @start_global_value;
@start_global_value
16777216
SET @start_session_value = @@session.tmp_table_size;
SELECT @start_session_value;
@start_session_value
16777216
'Bug# 34876: This variable has invalid default value as compared to documentation';
'#--------------------FN_DYNVARS_005_01-------------------------#'
SET @@global.tmp_table_size = 100;
Warnings:
Warning 1292 Truncated incorrect tmp_table_size value: '100'
SET @@global.tmp_table_size = DEFAULT;
SELECT @@global.tmp_table_size;
@@global.tmp_table_size
16777216
'Bug# 34876: This variable has invalid default value as compared to documentation';
SET @@session.tmp_table_size = 200;
Warnings:
Warning 1292 Truncated incorrect tmp_table_size value: '200'
SET @@session.tmp_table_size = DEFAULT;
SELECT @@session.tmp_table_size;
@@session.tmp_table_size
16777216
'Bug# 34876: This variable has invalid default value as compared to documentation';
'#--------------------FN_DYNVARS_005_02-------------------------#'
SET @@global.tmp_table_size = DEFAULT;
SELECT @@global.tmp_table_size = 33554432;
@@global.tmp_table_size = 33554432
0
SET @@session.tmp_table_size = DEFAULT;
SELECT @@session.tmp_table_size = 33554432;
@@session.tmp_table_size = 33554432
0
'Bug# 34876: This variable has invalid default value as compared to documentation';
'#--------------------FN_DYNVARS_005_03-------------------------#'
SET @@global.tmp_table_size = 1024;
SELECT @@global.tmp_table_size;
@@global.tmp_table_size
1024
SET @@global.tmp_table_size = 60020;
SELECT @@global.tmp_table_size;
@@global.tmp_table_size
60020
SET @@global.tmp_table_size = 4294967295;
SELECT @@global.tmp_table_size;
@@global.tmp_table_size
4294967295
'#--------------------FN_DYNVARS_005_04-------------------------#'
SET @@session.tmp_table_size = 1024;
SELECT @@session.tmp_table_size;
@@session.tmp_table_size
1024
SET @@session.tmp_table_size =4294967295;
SELECT @@session.tmp_table_size;
@@session.tmp_table_size
4294967295
SET @@session.tmp_table_size = 65535;
SELECT @@session.tmp_table_size;
@@session.tmp_table_size
65535
'#------------------FN_DYNVARS_005_05-----------------------#'
SET @@global.tmp_table_size = 0;
Warnings:
Warning 1292 Truncated incorrect tmp_table_size value: '0'
SELECT @@global.tmp_table_size;
@@global.tmp_table_size
1024
SET @@global.tmp_table_size = -1024;
Warnings:
Warning 1292 Truncated incorrect tmp_table_size value: '0'
SELECT @@global.tmp_table_size;
@@global.tmp_table_size
1024
SET @@global.tmp_table_size = 1000;
Warnings:
Warning 1292 Truncated incorrect tmp_table_size value: '1000'
SELECT @@global.tmp_table_size;
@@global.tmp_table_size
1024
'Bug # 34837: Errors are not coming on assigning invalid values to variable';
SET @@global.tmp_table_size = ON;
ERROR 42000: Incorrect argument type to variable 'tmp_table_size'
SET @@global.tmp_table_size = OFF;
ERROR 42000: Incorrect argument type to variable 'tmp_table_size'
SET @@global.tmp_table_size = True;
Warnings:
Warning 1292 Truncated incorrect tmp_table_size value: '1'
SELECT @@global.tmp_table_size;
@@global.tmp_table_size
1024
SET @@global.tmp_table_size = False;
Warnings:
Warning 1292 Truncated incorrect tmp_table_size value: '0'
SELECT @@global.tmp_table_size;
@@global.tmp_table_size
1024
'Bug:Error should be shown that variable is numeric and can not assigned boolean value';
SET @@global.tmp_table_size = 65530.34;
ERROR 42000: Incorrect argument type to variable 'tmp_table_size'
SET @@global.tmp_table_size ="Test";
ERROR 42000: Incorrect argument type to variable 'tmp_table_size'
SET @@session.tmp_table_size = ON;
ERROR 42000: Incorrect argument type to variable 'tmp_table_size'
SET @@session.tmp_table_size = OFF;
ERROR 42000: Incorrect argument type to variable 'tmp_table_size'
SET @@session.tmp_table_size = True;
Warnings:
Warning 1292 Truncated incorrect tmp_table_size value: '1'
SELECT @@session.tmp_table_size;
@@session.tmp_table_size
1024
SET @@session.tmp_table_size = False;
Warnings:
Warning 1292 Truncated incorrect tmp_table_size value: '0'
SELECT @@session.tmp_table_size;
@@session.tmp_table_size
1024
SET @@session.tmp_table_size = "Test";
ERROR 42000: Incorrect argument type to variable 'tmp_table_size'
SET @@session.tmp_table_size = 12345678901;
SELECT @@session.tmp_table_size;
@@session.tmp_table_size
12345678901
'#------------------FN_DYNVARS_005_06-----------------------#'
SELECT @@global.tmp_table_size = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='tmp_table_size';
@@global.tmp_table_size = VARIABLE_VALUE
1
'#------------------FN_DYNVARS_005_07-----------------------#'
SELECT @@session.tmp_table_size = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='tmp_table_size';
@@session.tmp_table_size = VARIABLE_VALUE
1
'#---------------------FN_DYNVARS_001_09----------------------#'
SET @@global.tmp_table_size = 1024;
SET @@tmp_table_size = 4294967295;
SELECT @@tmp_table_size = @@global.tmp_table_size;
@@tmp_table_size = @@global.tmp_table_size
0
'#---------------------FN_DYNVARS_001_10----------------------#'
SET @@tmp_table_size = 100;
Warnings:
Warning 1292 Truncated incorrect tmp_table_size value: '100'
SELECT @@tmp_table_size = @@local.tmp_table_size;
@@tmp_table_size = @@local.tmp_table_size
1
SELECT @@local.tmp_table_size = @@session.tmp_table_size;
@@local.tmp_table_size = @@session.tmp_table_size
1
'#---------------------FN_DYNVARS_001_11----------------------#'
SET tmp_table_size = 1027;
SELECT @@tmp_table_size;
@@tmp_table_size
1027
SELECT local.tmp_table_size;
ERROR 42S02: Unknown table 'local' in field list
SELECT global.tmp_table_size;
ERROR 42S02: Unknown table 'global' in field list
SELECT tmp_table_size = @@session.tmp_table_size;
ERROR 42S22: Unknown column 'tmp_table_size' in 'field list'
SET @@global.tmp_table_size = @start_global_value;
SELECT @@global.tmp_table_size;
@@global.tmp_table_size
16777216
SET @@session.tmp_table_size = @start_session_value;
SELECT @@session.tmp_table_size;
@@session.tmp_table_size
16777216
################################################################################
# Created by Horst Hunger 2008-05-07 #
# #
# Wrapper for 32 bit machines #
################################################################################
--source include/have_32bit.inc
--source suite/sys_vars/inc/tmp_table_size_basic.inc
################################################################################
# Created by Horst Hunger 2008-05-07 #
# #
# Wrapper for 64 bit machines #
################################################################################
--source include/have_64bit.inc
--source suite/sys_vars/inc/tmp_table_size_basic.inc
...@@ -751,6 +751,19 @@ ALTER TABLE t1 MODIFY COLUMN v VARCHAR(4); ...@@ -751,6 +751,19 @@ ALTER TABLE t1 MODIFY COLUMN v VARCHAR(4);
SELECT * FROM t1; SELECT * FROM t1;
DROP TABLE t1; DROP TABLE t1;
#
# Bug#31291 ALTER TABLE CONVERT TO CHARACTER SET does not change some data types
#
create table t1 (a tinytext character set latin1);
alter table t1 convert to character set utf8;
show create table t1;
drop table t1;
create table t1 (a mediumtext character set latin1);
alter table t1 convert to character set utf8;
show create table t1;
drop table t1;
--echo End of 5.0 tests --echo End of 5.0 tests
# #
......
...@@ -10,6 +10,6 @@ ...@@ -10,6 +10,6 @@
# #
############################################################################## ##############################################################################
federated_transactions : Bug#29523 Transactions do not work federated_transactions : Bug#29523 Transactions do not work
log_tables.test : Bug #37798: main.log_tables fails randomly on powermacg5 and windows slow_query_log_func : Bug #37962: *_func tests containing sleeps/race conditions
slow_query_log_func.test : Bug #37962: *_func tests containing sleeps/race conditions
wait_timeout_func : Bug #41225 joro wait_timeout_func fails wait_timeout_func : Bug #41225 joro wait_timeout_func fails
kill : Bug#37780 2008-12-03 HHunger need some changes to be robust enoiugh for pushbuild.
...@@ -445,3 +445,12 @@ EXPLAIN SELECT * FROM t1 FORCE INDEX(b) ...@@ -445,3 +445,12 @@ EXPLAIN SELECT * FROM t1 FORCE INDEX(b)
WHERE MATCH(a) AGAINST('test' IN BOOLEAN MODE) AND b=1; WHERE MATCH(a) AGAINST('test' IN BOOLEAN MODE) AND b=1;
DROP TABLE t1; DROP TABLE t1;
#
# BUG#37245 - Full text search problem
#
CREATE TABLE t1(a CHAR(10));
INSERT INTO t1 VALUES('aaa15');
SELECT MATCH(a) AGAINST('aaa1* aaa14 aaa16' IN BOOLEAN MODE) FROM t1;
SELECT MATCH(a) AGAINST('aaa1* aaa14 aaa15 aaa16' IN BOOLEAN MODE) FROM t1;
DROP TABLE t1;
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
--source include/have_partition.inc
--source include/have_binlog_format_statement.inc --source include/have_binlog_format_statement.inc
--source include/have_innodb.inc --source include/have_innodb.inc
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment