summaryrefslogtreecommitdiff
path: root/mysql-test/r
diff options
context:
space:
mode:
authorJon Olav Hauglid <jon.hauglid@oracle.com>2010-07-13 10:39:24 +0200
committerJon Olav Hauglid <jon.hauglid@oracle.com>2010-07-13 10:39:24 +0200
commitf45523188e57575eeed5f7fbe8fbefc06de4b6f3 (patch)
tree74d63cef81d432cda2315d47976755590872f3bd /mysql-test/r
parent7f0f32d659c5e3eff1d6ed6249cad59ff6df5723 (diff)
parent071636d6fa25909510e3d222d2ed1d919625f55d (diff)
downloadmariadb-git-f45523188e57575eeed5f7fbe8fbefc06de4b6f3.tar.gz
merge from mysql-trunk-bugfixing
Diffstat (limited to 'mysql-test/r')
-rw-r--r--mysql-test/r/ctype_binary.result51
-rw-r--r--mysql-test/r/ctype_cp1251.result51
-rw-r--r--mysql-test/r/ctype_latin1.result51
-rw-r--r--mysql-test/r/ctype_ucs.result51
-rw-r--r--mysql-test/r/func_analyse.result (renamed from mysql-test/r/analyse.result)0
-rw-r--r--mysql-test/r/func_digest.result21
-rw-r--r--mysql-test/r/information_schema.result2
-rw-r--r--mysql-test/r/partition_innodb.result18
-rw-r--r--mysql-test/r/select.result19
-rw-r--r--mysql-test/r/sp_trans_log.result2
10 files changed, 264 insertions, 2 deletions
diff --git a/mysql-test/r/ctype_binary.result b/mysql-test/r/ctype_binary.result
index 3ffb087c1d3..76a4d0f3cf3 100644
--- a/mysql-test/r/ctype_binary.result
+++ b/mysql-test/r/ctype_binary.result
@@ -2567,5 +2567,56 @@ drop function f1;
# End of WL#2649 Number-to-string conversions
#
#
+# Bug#54668 User variable assignments get wrong type
+#
+SET @x=md5('a');
+SELECT charset(@x), collation(@x);
+charset(@x) collation(@x)
+binary binary
+SET @x=old_password('a');
+SELECT charset(@x), collation(@x);
+charset(@x) collation(@x)
+binary binary
+SET @x=password('a');
+SELECT charset(@x), collation(@x);
+charset(@x) collation(@x)
+binary binary
+SET @x=sha('a');
+SELECT charset(@x), collation(@x);
+charset(@x) collation(@x)
+binary binary
+SET @x=sha1('a');
+SELECT charset(@x), collation(@x);
+charset(@x) collation(@x)
+binary binary
+SET @x=astext(point(1,2));
+SELECT charset(@x), collation(@x);
+charset(@x) collation(@x)
+binary binary
+SET @x=aswkt(point(1,2));
+SELECT charset(@x), collation(@x);
+charset(@x) collation(@x)
+binary binary
+#
+# Bug#52159 returning time type from function and empty left join causes debug assertion
+#
+CREATE FUNCTION f1() RETURNS TIME RETURN 1;
+CREATE TABLE t1 (b INT);
+INSERT INTO t1 VALUES (0);
+SELECT f1() FROM t1 LEFT JOIN (SELECT 1 AS a FROM t1 LIMIT 0) AS d ON 1 GROUP BY a;
+f1()
+00:00:01
+DROP FUNCTION f1;
+DROP TABLE t1;
+SET NAMES latin1;
+SET sql_mode='';
+CREATE TABLE t1(a char(215) CHARACTER SET utf8 NOT NULL DEFAULT '', KEY(a));
+INSERT INTO t1 VALUES ();
+SELECT maketime(`a`,`a`,`a`) FROM t1 GROUP BY 1;
+maketime(`a`,`a`,`a`)
+00:00:00
+DROP TABLE t1;
+SET sql_mode=default;
+#
# End of 5.5 tests
#
diff --git a/mysql-test/r/ctype_cp1251.result b/mysql-test/r/ctype_cp1251.result
index e0339ee2109..f93cb5f9a12 100644
--- a/mysql-test/r/ctype_cp1251.result
+++ b/mysql-test/r/ctype_cp1251.result
@@ -2649,5 +2649,56 @@ drop function f1;
# End of WL#2649 Number-to-string conversions
#
#
+# Bug#54668 User variable assignments get wrong type
+#
+SET @x=md5('a');
+SELECT charset(@x), collation(@x);
+charset(@x) collation(@x)
+cp1251 cp1251_general_ci
+SET @x=old_password('a');
+SELECT charset(@x), collation(@x);
+charset(@x) collation(@x)
+cp1251 cp1251_general_ci
+SET @x=password('a');
+SELECT charset(@x), collation(@x);
+charset(@x) collation(@x)
+cp1251 cp1251_general_ci
+SET @x=sha('a');
+SELECT charset(@x), collation(@x);
+charset(@x) collation(@x)
+cp1251 cp1251_general_ci
+SET @x=sha1('a');
+SELECT charset(@x), collation(@x);
+charset(@x) collation(@x)
+cp1251 cp1251_general_ci
+SET @x=astext(point(1,2));
+SELECT charset(@x), collation(@x);
+charset(@x) collation(@x)
+cp1251 cp1251_general_ci
+SET @x=aswkt(point(1,2));
+SELECT charset(@x), collation(@x);
+charset(@x) collation(@x)
+cp1251 cp1251_general_ci
+#
+# Bug#52159 returning time type from function and empty left join causes debug assertion
+#
+CREATE FUNCTION f1() RETURNS TIME RETURN 1;
+CREATE TABLE t1 (b INT);
+INSERT INTO t1 VALUES (0);
+SELECT f1() FROM t1 LEFT JOIN (SELECT 1 AS a FROM t1 LIMIT 0) AS d ON 1 GROUP BY a;
+f1()
+00:00:01
+DROP FUNCTION f1;
+DROP TABLE t1;
+SET NAMES latin1;
+SET sql_mode='';
+CREATE TABLE t1(a char(215) CHARACTER SET utf8 NOT NULL DEFAULT '', KEY(a));
+INSERT INTO t1 VALUES ();
+SELECT maketime(`a`,`a`,`a`) FROM t1 GROUP BY 1;
+maketime(`a`,`a`,`a`)
+00:00:00
+DROP TABLE t1;
+SET sql_mode=default;
+#
# End of 5.5 tests
#
diff --git a/mysql-test/r/ctype_latin1.result b/mysql-test/r/ctype_latin1.result
index 4f0e863bfca..43ee365cd53 100644
--- a/mysql-test/r/ctype_latin1.result
+++ b/mysql-test/r/ctype_latin1.result
@@ -2977,5 +2977,56 @@ drop function f1;
# End of WL#2649 Number-to-string conversions
#
#
+# Bug#54668 User variable assignments get wrong type
+#
+SET @x=md5('a');
+SELECT charset(@x), collation(@x);
+charset(@x) collation(@x)
+latin1 latin1_swedish_ci
+SET @x=old_password('a');
+SELECT charset(@x), collation(@x);
+charset(@x) collation(@x)
+latin1 latin1_swedish_ci
+SET @x=password('a');
+SELECT charset(@x), collation(@x);
+charset(@x) collation(@x)
+latin1 latin1_swedish_ci
+SET @x=sha('a');
+SELECT charset(@x), collation(@x);
+charset(@x) collation(@x)
+latin1 latin1_swedish_ci
+SET @x=sha1('a');
+SELECT charset(@x), collation(@x);
+charset(@x) collation(@x)
+latin1 latin1_swedish_ci
+SET @x=astext(point(1,2));
+SELECT charset(@x), collation(@x);
+charset(@x) collation(@x)
+latin1 latin1_swedish_ci
+SET @x=aswkt(point(1,2));
+SELECT charset(@x), collation(@x);
+charset(@x) collation(@x)
+latin1 latin1_swedish_ci
+#
+# Bug#52159 returning time type from function and empty left join causes debug assertion
+#
+CREATE FUNCTION f1() RETURNS TIME RETURN 1;
+CREATE TABLE t1 (b INT);
+INSERT INTO t1 VALUES (0);
+SELECT f1() FROM t1 LEFT JOIN (SELECT 1 AS a FROM t1 LIMIT 0) AS d ON 1 GROUP BY a;
+f1()
+00:00:01
+DROP FUNCTION f1;
+DROP TABLE t1;
+SET NAMES latin1;
+SET sql_mode='';
+CREATE TABLE t1(a char(215) CHARACTER SET utf8 NOT NULL DEFAULT '', KEY(a));
+INSERT INTO t1 VALUES ();
+SELECT maketime(`a`,`a`,`a`) FROM t1 GROUP BY 1;
+maketime(`a`,`a`,`a`)
+00:00:00
+DROP TABLE t1;
+SET sql_mode=default;
+#
# End of 5.5 tests
#
diff --git a/mysql-test/r/ctype_ucs.result b/mysql-test/r/ctype_ucs.result
index 4f033d54043..7bb27e03acc 100644
--- a/mysql-test/r/ctype_ucs.result
+++ b/mysql-test/r/ctype_ucs.result
@@ -3808,6 +3808,57 @@ drop function f1;
#
# End of WL#2649 Number-to-string conversions
#
+#
+# Bug#54668 User variable assignments get wrong type
+#
+SET @x=md5('a');
+SELECT charset(@x), collation(@x);
+charset(@x) collation(@x)
+ucs2 ucs2_general_ci
+SET @x=old_password('a');
+SELECT charset(@x), collation(@x);
+charset(@x) collation(@x)
+ucs2 ucs2_general_ci
+SET @x=password('a');
+SELECT charset(@x), collation(@x);
+charset(@x) collation(@x)
+ucs2 ucs2_general_ci
+SET @x=sha('a');
+SELECT charset(@x), collation(@x);
+charset(@x) collation(@x)
+ucs2 ucs2_general_ci
+SET @x=sha1('a');
+SELECT charset(@x), collation(@x);
+charset(@x) collation(@x)
+ucs2 ucs2_general_ci
+SET @x=astext(point(1,2));
+SELECT charset(@x), collation(@x);
+charset(@x) collation(@x)
+ucs2 ucs2_general_ci
+SET @x=aswkt(point(1,2));
+SELECT charset(@x), collation(@x);
+charset(@x) collation(@x)
+ucs2 ucs2_general_ci
+#
+# Bug#52159 returning time type from function and empty left join causes debug assertion
+#
+CREATE FUNCTION f1() RETURNS TIME RETURN 1;
+CREATE TABLE t1 (b INT);
+INSERT INTO t1 VALUES (0);
+SELECT f1() FROM t1 LEFT JOIN (SELECT 1 AS a FROM t1 LIMIT 0) AS d ON 1 GROUP BY a;
+f1()
+00:00:01
+DROP FUNCTION f1;
+DROP TABLE t1;
+SET NAMES latin1;
+SET sql_mode='';
+CREATE TABLE t1(a char(215) CHARACTER SET utf8 NOT NULL DEFAULT '', KEY(a));
+INSERT INTO t1 VALUES ();
+SELECT maketime(`a`,`a`,`a`) FROM t1 GROUP BY 1;
+maketime(`a`,`a`,`a`)
+00:00:00
+DROP TABLE t1;
+SET sql_mode=default;
SET NAMES latin1;
#
# End of 5.5 tests
diff --git a/mysql-test/r/analyse.result b/mysql-test/r/func_analyse.result
index 1820782d2f8..1820782d2f8 100644
--- a/mysql-test/r/analyse.result
+++ b/mysql-test/r/func_analyse.result
diff --git a/mysql-test/r/func_digest.result b/mysql-test/r/func_digest.result
index ff3a4dcf79a..095b69363ce 100644
--- a/mysql-test/r/func_digest.result
+++ b/mysql-test/r/func_digest.result
@@ -1405,3 +1405,24 @@ LENGTH(SHA2( 'size', 384 )) / 2 * 8 = 384
SELECT LENGTH(SHA2( 'computed', 512 )) / 2 * 8 = 512;
LENGTH(SHA2( 'computed', 512 )) / 2 * 8 = 512
1
+#
+# Bug#54661 sha2() returns BINARY result
+#
+SET NAMES binary;
+SELECT sha2('1',224);
+Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
+def sha2('1',224) 253 56 56 Y 128 31 63
+sha2('1',224)
+e25388fde8290dc286a6164fa2d97e551b53498dcbf7bc378eb1f178
+SET NAMES utf8;
+SELECT sha2('1',224);
+Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
+def sha2('1',224) 253 168 56 Y 0 31 33
+sha2('1',224)
+e25388fde8290dc286a6164fa2d97e551b53498dcbf7bc378eb1f178
+SET NAMES latin1;
+SELECT sha2('1',224);
+Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
+def sha2('1',224) 253 56 56 Y 0 31 8
+sha2('1',224)
+e25388fde8290dc286a6164fa2d97e551b53498dcbf7bc378eb1f178
diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result
index 86fa9d76864..eb3abc3f0c9 100644
--- a/mysql-test/r/information_schema.result
+++ b/mysql-test/r/information_schema.result
@@ -1427,7 +1427,7 @@ USE test;
End of 5.0 tests.
select * from information_schema.engines WHERE ENGINE="MyISAM";
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
-MyISAM DEFAULT Default engine as of MySQL 3.23 with great performance NO NO NO
+MyISAM DEFAULT MyISAM storage engine NO NO NO
grant select on *.* to user3148@localhost;
select user,db from information_schema.processlist;
user db
diff --git a/mysql-test/r/partition_innodb.result b/mysql-test/r/partition_innodb.result
index 8ae16238a18..58d014938bf 100644
--- a/mysql-test/r/partition_innodb.result
+++ b/mysql-test/r/partition_innodb.result
@@ -373,3 +373,21 @@ CREATE TABLE t1 (a INT) ENGINE=InnoDB
PARTITION BY list(a) (PARTITION p1 VALUES IN (1));
CREATE INDEX i1 ON t1 (a);
DROP TABLE t1;
+#
+# Bug#54783: optimize table crashes with invalid timestamp default value and NO_ZERO_DATE
+#
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1 (a INT, b TIMESTAMP DEFAULT '0000-00-00 00:00:00')
+ENGINE=INNODB PARTITION BY LINEAR HASH (a) PARTITIONS 1;
+SET @old_mode = @@sql_mode;
+SET SESSION sql_mode = 'NO_ZERO_DATE';
+OPTIMIZE TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
+test.t1 optimize error Invalid default value for 'b'
+test.t1 optimize status Operation failed
+Warnings:
+Warning 1265 Data truncated for column 'b' at row 1
+Error 1067 Invalid default value for 'b'
+SET SESSION sql_mode = @old_mode;
+DROP TABLE t1;
diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result
index e594e87694f..b518522e2bf 100644
--- a/mysql-test/r/select.result
+++ b/mysql-test/r/select.result
@@ -4857,3 +4857,22 @@ SELECT * FROM t1 WHERE 102 < c;
a b c
DROP TABLE t1;
End of 5.1 tests
+#
+# Bug#54515: Crash in opt_range.cc::get_best_group_min_max on
+# SELECT from VIEW with GROUP BY
+#
+CREATE TABLE t1 (
+col_int_key int DEFAULT NULL,
+KEY int_key (col_int_key)
+) ;
+INSERT INTO t1 VALUES (1),(2);
+CREATE VIEW view_t1 AS
+SELECT t1.col_int_key AS col_int_key
+FROM t1;
+SELECT col_int_key FROM view_t1 GROUP BY col_int_key;
+col_int_key
+1
+2
+DROP VIEW view_t1;
+DROP TABLE t1;
+# End of test BUG#54515
diff --git a/mysql-test/r/sp_trans_log.result b/mysql-test/r/sp_trans_log.result
index 34d24f70848..e3463dec571 100644
--- a/mysql-test/r/sp_trans_log.result
+++ b/mysql-test/r/sp_trans_log.result
@@ -14,7 +14,7 @@ end|
reset master|
insert into t2 values (bug23333(),1)|
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
-show binlog events from <binlog_start>|
+show binlog events from <binlog_start> limit 0, 4|
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1)