summaryrefslogtreecommitdiff
path: root/mysql-test/r
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2010-09-11 20:43:48 +0200
committerSergei Golubchik <sergii@pisem.net>2010-09-11 20:43:48 +0200
commitdd2e3dc2ed85799364926e432eddb3f4eb20d2fa (patch)
tree0d72ee69e037cdd09618ddb53652dd1b220890dc /mysql-test/r
parent2b5f744ca48113207e97fd335acd68a61bb5b8a4 (diff)
parent17f3a09477f9c208a9248c8ed26268cb86a35bf0 (diff)
downloadmariadb-git-dd2e3dc2ed85799364926e432eddb3f4eb20d2fa.tar.gz
merge with 5.1
Diffstat (limited to 'mysql-test/r')
-rw-r--r--mysql-test/r/archive.result12
-rw-r--r--mysql-test/r/commit_1innodb.result4
-rw-r--r--mysql-test/r/drop.result11
-rw-r--r--mysql-test/r/func_gconcat.result21
-rw-r--r--mysql-test/r/func_misc.result15
-rw-r--r--mysql-test/r/grant.result2
-rw-r--r--mysql-test/r/group_by.result35
-rw-r--r--mysql-test/r/having.result26
-rw-r--r--mysql-test/r/information_schema.result19
-rw-r--r--mysql-test/r/information_schema_all_engines.result22
-rw-r--r--mysql-test/r/loaddata.result29
-rw-r--r--mysql-test/r/log_tables_upgrade.result15
-rw-r--r--mysql-test/r/lowercase_table2.result3
-rw-r--r--mysql-test/r/lowercase_view.result17
-rw-r--r--mysql-test/r/mysql_client_test.result2
-rw-r--r--mysql-test/r/mysql_upgrade.result121
-rw-r--r--mysql-test/r/mysqlcheck.result8
-rw-r--r--mysql-test/r/not_partition.result26
-rw-r--r--mysql-test/r/show_check.result2
-rw-r--r--mysql-test/r/update.result14
-rw-r--r--mysql-test/r/upgrade.result8
21 files changed, 329 insertions, 83 deletions
diff --git a/mysql-test/r/archive.result b/mysql-test/r/archive.result
index f90bcb521e1..5a731e6476c 100644
--- a/mysql-test/r/archive.result
+++ b/mysql-test/r/archive.result
@@ -12725,8 +12725,7 @@ INSERT INTO t1 (col1, col2) VALUES (1, "value");
ERROR HY000: Table upgrade required. Please do "REPAIR TABLE `t1`" or dump/reload to fix it!
REPAIR TABLE t1;
Table Op Msg_type Msg_text
-test.t1 repair Error Table upgrade required. Please do "REPAIR TABLE `t1`" or dump/reload to fix it!
-test.t1 repair error Corrupt
+test.t1 repair status OK
DROP TABLE t1;
#
# BUG#48757 - missing .ARZ file causes server crash
@@ -12756,3 +12755,12 @@ a
1
2
DROP TABLE t1;
+select * from t1;
+ERROR HY000: Table upgrade required. Please do "REPAIR TABLE `t1`" or dump/reload to fix it!
+repair table t1;
+Table Op Msg_type Msg_text
+test.t1 repair status OK
+select sum(length(a)),sum(b) from t1;
+sum(length(a)) sum(b)
+8670 187
+drop table t1;
diff --git a/mysql-test/r/commit_1innodb.result b/mysql-test/r/commit_1innodb.result
index 51c4ac3002c..1f0b2c8019b 100644
--- a/mysql-test/r/commit_1innodb.result
+++ b/mysql-test/r/commit_1innodb.result
@@ -841,11 +841,11 @@ call p_verify_status_increment(2, 0, 2, 0);
SUCCESS
alter table t3 rename t4;
-call p_verify_status_increment(2, 2, 2, 2);
+call p_verify_status_increment(1, 0, 1, 0);
SUCCESS
rename table t4 to t3;
-call p_verify_status_increment(2, 2, 2, 2);
+call p_verify_status_increment(1, 0, 1, 0);
SUCCESS
truncate table t3;
diff --git a/mysql-test/r/drop.result b/mysql-test/r/drop.result
index b798b49dd34..602b2d03d80 100644
--- a/mysql-test/r/drop.result
+++ b/mysql-test/r/drop.result
@@ -115,9 +115,14 @@ create table `#mysql50#abc``def` ( id int );
create table `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` (a int);
ERROR 42000: Incorrect table name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
create table `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` (a int);
-create table `#mysql50#aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` (a int);
-create table `#mysql50#aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` (a int);
-ERROR 42000: Incorrect table name '#mysql50#aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
+create table `#mysql50#aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1234` (a int);
+create table `#mysql50#aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa12345` (a int);
+ERROR 42000: Incorrect table name '#mysql50#aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa12345'
+show tables;
+Tables_in_mysqltestbug26703
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1234
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+#mysql50#abc`def
use test;
drop database mysqltestbug26703;
End of 5.1 tests
diff --git a/mysql-test/r/func_gconcat.result b/mysql-test/r/func_gconcat.result
index 766f3b6bfaa..ae48eb1e0ff 100644
--- a/mysql-test/r/func_gconcat.result
+++ b/mysql-test/r/func_gconcat.result
@@ -995,6 +995,7 @@ SELECT 1 FROM
1
1
DROP TABLE t1;
+End of 5.0 tests
#
# Bug #52397: another crash with explain extended and group_concat
#
@@ -1010,4 +1011,22 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
Warnings:
Note 1003 select 1 AS `1` from (select group_concat(`test`.`t1`.`a` order by `test`.`t1`.`a` ASC separator ',') AS `GROUP_CONCAT(t1.a ORDER BY t1.a ASC)` from `test`.`t1` `t2` join `test`.`t1` group by `test`.`t1`.`a`) `d`
DROP TABLE t1;
-End of 5.0 tests
+#
+# Bug #54476: crash when group_concat and 'with rollup' in prepared statements
+#
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1), (2);
+PREPARE stmt FROM "SELECT GROUP_CONCAT(t1.a ORDER BY t1.a) FROM t1 JOIN t1 t2 GROUP BY t1.a WITH ROLLUP";
+EXECUTE stmt;
+GROUP_CONCAT(t1.a ORDER BY t1.a)
+1,1
+2,2
+1,1,2,2
+EXECUTE stmt;
+GROUP_CONCAT(t1.a ORDER BY t1.a)
+1,1
+2,2
+1,1,2,2
+DEALLOCATE PREPARE stmt;
+DROP TABLE t1;
+End of 5.1 tests
diff --git a/mysql-test/r/func_misc.result b/mysql-test/r/func_misc.result
index 828d4bafc53..2f768140b33 100644
--- a/mysql-test/r/func_misc.result
+++ b/mysql-test/r/func_misc.result
@@ -243,4 +243,19 @@ End of 5.0 tests
select connection_id() > 0;
connection_id() > 0
1
+#
+# Bug #54461: crash with longblob and union or update with subquery
+#
+CREATE TABLE t1 (a INT, b LONGBLOB);
+INSERT INTO t1 VALUES (1, '2'), (2, '3'), (3, '2');
+SELECT DISTINCT LEAST(a, (SELECT b FROM t1 LIMIT 1)) FROM t1 UNION SELECT 1;
+LEAST(a, (SELECT b FROM t1 LIMIT 1))
+1
+2
+SELECT DISTINCT GREATEST(a, (SELECT b FROM t1 LIMIT 1)) FROM t1 UNION SELECT 1;
+GREATEST(a, (SELECT b FROM t1 LIMIT 1))
+2
+3
+1
+DROP TABLE t1;
End of tests
diff --git a/mysql-test/r/grant.result b/mysql-test/r/grant.result
index f410b26a1fe..b3cab2f409a 100644
--- a/mysql-test/r/grant.result
+++ b/mysql-test/r/grant.result
@@ -1425,7 +1425,7 @@ ERROR 42S02: Table 'db1.../db2/tb2' doesn't exist
SELECT * FROM `../db2`.tb2;
ERROR 42000: SELECT command denied to user 'testbug'@'localhost' for table 'tb2'
SELECT * FROM `#mysql50#/../db2/tb2`;
-ERROR 42S02: Table 'db1.#mysql50#/../db2/tb2' doesn't exist
+ERROR 42000: Incorrect table name '#mysql50#/../db2/tb2'
DROP USER 'testbug'@localhost;
DROP TABLE db2.t1;
DROP DATABASE db1;
diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result
index deda00364aa..e04819fcbf9 100644
--- a/mysql-test/r/group_by.result
+++ b/mysql-test/r/group_by.result
@@ -1827,4 +1827,39 @@ min(t2.key_col)+1
NULL
drop table t1,t2;
#
+# Bug#55188: GROUP BY, GROUP_CONCAT and TEXT - inconsistent results
+#
+CREATE TABLE t1 (a text, b varchar(10));
+INSERT INTO t1 VALUES (repeat('1', 1300),'one'), (repeat('1', 1300),'two');
+EXPLAIN
+SELECT SUBSTRING(a,1,10), LENGTH(a), GROUP_CONCAT(b) FROM t1 GROUP BY a;
+id 1
+select_type SIMPLE
+table t1
+type ALL
+possible_keys NULL
+key NULL
+key_len NULL
+ref NULL
+rows 2
+Extra Using filesort
+SELECT SUBSTRING(a,1,10), LENGTH(a), GROUP_CONCAT(b) FROM t1 GROUP BY a;
+SUBSTRING(a,1,10) LENGTH(a) GROUP_CONCAT(b)
+1111111111 1300 one,two
+EXPLAIN
+SELECT SUBSTRING(a,1,10), LENGTH(a) FROM t1 GROUP BY a;
+id 1
+select_type SIMPLE
+table t1
+type ALL
+possible_keys NULL
+key NULL
+key_len NULL
+ref NULL
+rows 2
+Extra Using temporary; Using filesort
+SELECT SUBSTRING(a,1,10), LENGTH(a) FROM t1 GROUP BY a;
+SUBSTRING(a,1,10) LENGTH(a)
+1111111111 1300
+DROP TABLE t1;
# End of 5.1 tests
diff --git a/mysql-test/r/having.result b/mysql-test/r/having.result
index 19c23df1e84..cd1b4ae0218 100644
--- a/mysql-test/r/having.result
+++ b/mysql-test/r/having.result
@@ -470,10 +470,9 @@ WHERE table2.f1 = 2
GROUP BY table1.f1, table2.f2
HAVING (table2.f2 = 8 AND table1.f1 >= 6);
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE table2 const PRIMARY PRIMARY 4 const 1 100.00 Using filesort
-1 SIMPLE table1 ALL NULL NULL NULL NULL 4 100.00 Using where
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible HAVING noticed after reading const tables
Warnings:
-Note 1003 select `test`.`table1`.`f1` AS `f1`,'7' AS `f2` from `test`.`t1` `table1` join `test`.`t1` `table2` where ((`test`.`table1`.`f3` = '9')) group by `test`.`table1`.`f1`,'7' having (('7' = 8) and (`test`.`table1`.`f1` >= 6))
+Note 1003 select `test`.`table1`.`f1` AS `f1`,'7' AS `f2` from `test`.`t1` `table1` join `test`.`t1` `table2` where ((`test`.`table1`.`f3` = '9')) group by `test`.`table1`.`f1`,'7' having 0
EXPLAIN EXTENDED
SELECT table1.f1, table2.f2
FROM t1 AS table1
@@ -482,10 +481,9 @@ WHERE table2.f1 = 2
GROUP BY table1.f1, table2.f2
HAVING (table2.f2 = 8);
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE table2 const PRIMARY PRIMARY 4 const 1 100.00 Using filesort
-1 SIMPLE table1 ALL NULL NULL NULL NULL 4 100.00 Using where
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible HAVING noticed after reading const tables
Warnings:
-Note 1003 select `test`.`table1`.`f1` AS `f1`,'7' AS `f2` from `test`.`t1` `table1` join `test`.`t1` `table2` where ((`test`.`table1`.`f3` = '9')) group by `test`.`table1`.`f1`,'7' having ('7' = 8)
+Note 1003 select `test`.`table1`.`f1` AS `f1`,'7' AS `f2` from `test`.`t1` `table1` join `test`.`t1` `table2` where ((`test`.`table1`.`f3` = '9')) group by `test`.`table1`.`f1`,'7' having 0
DROP TABLE t1;
#
# Bug#52336 Segfault / crash in 5.1 copy_fields (param=0x9872980) at sql_select.cc:15355
@@ -532,3 +530,19 @@ MAX(t2.f2)
NULL
DROP TABLE t1,t2;
End of 5.0 tests
+#
+# Bug#54416 MAX from JOIN with HAVING returning NULL with 5.1 and Empty set
+#
+CREATE TABLE t1 (f1 INT(11), f2 VARCHAR(1), PRIMARY KEY (f1));
+INSERT INTO t1 VALUES (1,'f');
+CREATE TABLE t2 (f1 INT(11), f2 VARCHAR(1));
+INSERT INTO t2 VALUES (2,'m');
+INSERT INTO t2 VALUES (3,'m');
+INSERT INTO t2 VALUES (11,NULL);
+INSERT INTO t2 VALUES (12,'k');
+SELECT MAX(t1.f1) field1
+FROM t1 JOIN t2 ON t2.f2 LIKE 'x'
+HAVING field1 < 7;
+field1
+DROP TABLE t1,t2;
+End of 5.1 tests
diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result
index ee8b91631bb..8a2b258e356 100644
--- a/mysql-test/r/information_schema.result
+++ b/mysql-test/r/information_schema.result
@@ -68,6 +68,7 @@ INNODB_LOCKS
INNODB_LOCK_WAITS
INNODB_RSEG
INNODB_SYS_INDEXES
+INNODB_SYS_STATS
INNODB_SYS_TABLES
INNODB_TABLE_STATS
INNODB_TRX
@@ -871,7 +872,6 @@ COLUMNS TABLE_NAME select
COLUMN_PRIVILEGES TABLE_NAME select
FILES TABLE_NAME select
INDEX_STATISTICS TABLE_NAME select
-INNODB_BUFFER_POOL_PAGES_INDEX table_name select
INNODB_INDEX_STATS table_name select
INNODB_TABLE_STATS table_name select
KEY_COLUMN_USAGE TABLE_NAME select
@@ -1664,4 +1664,21 @@ WHERE INFORMATION_SCHEMA.COLUMNS.TABLE_NAME = 'variables';
COLUMN_DEFAULT TABLE_NAME
NULL variables
DROP TABLE variables;
+#
+# Bug #53814: NUMERIC_PRECISION for unsigned bigint field is 19,
+# should be 20
+#
+CREATE TABLE ubig (a BIGINT, b BIGINT UNSIGNED);
+SELECT TABLE_NAME, COLUMN_NAME, NUMERIC_PRECISION
+FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='ubig';
+TABLE_NAME COLUMN_NAME NUMERIC_PRECISION
+ubig a 19
+ubig b 20
+INSERT INTO ubig VALUES (0xFFFFFFFFFFFFFFFF,0xFFFFFFFFFFFFFFFF);
+Warnings:
+Warning 1264 Out of range value for column 'a' at row 1
+SELECT length(CAST(b AS CHAR)) FROM ubig;
+length(CAST(b AS CHAR))
+20
+DROP TABLE ubig;
End of 5.1 tests.
diff --git a/mysql-test/r/information_schema_all_engines.result b/mysql-test/r/information_schema_all_engines.result
index dfe7570266c..7a2c548a329 100644
--- a/mysql-test/r/information_schema_all_engines.result
+++ b/mysql-test/r/information_schema_all_engines.result
@@ -44,13 +44,14 @@ XTRADB_ADMIN_COMMAND
INNODB_TRX
INNODB_SYS_TABLES
INNODB_LOCK_WAITS
-INNODB_CMPMEM_RESET
+INNODB_SYS_STATS
INNODB_LOCKS
INNODB_CMPMEM
INNODB_TABLE_STATS
INNODB_SYS_INDEXES
INNODB_CMP_RESET
INNODB_BUFFER_POOL_PAGES_BLOB
+INNODB_CMPMEM_RESET
INNODB_INDEX_STATS
SELECT t.table_name, c1.column_name
FROM information_schema.tables t
@@ -105,18 +106,19 @@ PBXT_STATISTICS ID
INNODB_CMP page_size
INNODB_RSEG rseg_id
XTRADB_ENHANCEMENTS name
-INNODB_BUFFER_POOL_PAGES_INDEX schema_name
+INNODB_BUFFER_POOL_PAGES_INDEX index_id
XTRADB_ADMIN_COMMAND result_message
INNODB_TRX trx_id
INNODB_SYS_TABLES SCHEMA
INNODB_LOCK_WAITS requesting_trx_id
-INNODB_CMPMEM_RESET page_size
+INNODB_SYS_STATS INDEX_ID
INNODB_LOCKS lock_id
INNODB_CMPMEM page_size
INNODB_TABLE_STATS table_schema
INNODB_SYS_INDEXES TABLE_ID
INNODB_CMP_RESET page_size
INNODB_BUFFER_POOL_PAGES_BLOB space_id
+INNODB_CMPMEM_RESET page_size
INNODB_INDEX_STATS table_schema
SELECT t.table_name, c1.column_name
FROM information_schema.tables t
@@ -171,18 +173,19 @@ PBXT_STATISTICS ID
INNODB_CMP page_size
INNODB_RSEG rseg_id
XTRADB_ENHANCEMENTS name
-INNODB_BUFFER_POOL_PAGES_INDEX schema_name
+INNODB_BUFFER_POOL_PAGES_INDEX index_id
XTRADB_ADMIN_COMMAND result_message
INNODB_TRX trx_id
INNODB_SYS_TABLES SCHEMA
INNODB_LOCK_WAITS requesting_trx_id
-INNODB_CMPMEM_RESET page_size
+INNODB_SYS_STATS INDEX_ID
INNODB_LOCKS lock_id
INNODB_CMPMEM page_size
INNODB_TABLE_STATS table_schema
INNODB_SYS_INDEXES TABLE_ID
INNODB_CMP_RESET page_size
INNODB_BUFFER_POOL_PAGES_BLOB space_id
+INNODB_CMPMEM_RESET page_size
INNODB_INDEX_STATS table_schema
select 1 as f1 from information_schema.tables where "CHARACTER_SETS"=
(select cast(table_name as char) from information_schema.tables
@@ -229,6 +232,7 @@ INNODB_LOCKS information_schema.INNODB_LOCKS 1
INNODB_LOCK_WAITS information_schema.INNODB_LOCK_WAITS 1
INNODB_RSEG information_schema.INNODB_RSEG 1
INNODB_SYS_INDEXES information_schema.INNODB_SYS_INDEXES 1
+INNODB_SYS_STATS information_schema.INNODB_SYS_STATS 1
INNODB_SYS_TABLES information_schema.INNODB_SYS_TABLES 1
INNODB_TABLE_STATS information_schema.INNODB_TABLE_STATS 1
INNODB_TRX information_schema.INNODB_TRX 1
@@ -302,13 +306,14 @@ Database: information_schema
| INNODB_TRX |
| INNODB_SYS_TABLES |
| INNODB_LOCK_WAITS |
-| INNODB_CMPMEM_RESET |
+| INNODB_SYS_STATS |
| INNODB_LOCKS |
| INNODB_CMPMEM |
| INNODB_TABLE_STATS |
| INNODB_SYS_INDEXES |
| INNODB_CMP_RESET |
| INNODB_BUFFER_POOL_PAGES_BLOB |
+| INNODB_CMPMEM_RESET |
| INNODB_INDEX_STATS |
+---------------------------------------+
Database: INFORMATION_SCHEMA
@@ -358,13 +363,14 @@ Database: INFORMATION_SCHEMA
| INNODB_TRX |
| INNODB_SYS_TABLES |
| INNODB_LOCK_WAITS |
-| INNODB_CMPMEM_RESET |
+| INNODB_SYS_STATS |
| INNODB_LOCKS |
| INNODB_CMPMEM |
| INNODB_TABLE_STATS |
| INNODB_SYS_INDEXES |
| INNODB_CMP_RESET |
| INNODB_BUFFER_POOL_PAGES_BLOB |
+| INNODB_CMPMEM_RESET |
| INNODB_INDEX_STATS |
+---------------------------------------+
Wildcard: inf_rmation_schema
@@ -375,5 +381,5 @@ Wildcard: inf_rmation_schema
+--------------------+
SELECT table_schema, count(*) FROM information_schema.TABLES WHERE table_schema IN ('mysql', 'INFORMATION_SCHEMA', 'test', 'mysqltest') AND table_name<>'ndb_binlog_index' AND table_name<>'ndb_apply_status' GROUP BY TABLE_SCHEMA;
table_schema count(*)
-information_schema 51
+information_schema 52
mysql 22
diff --git a/mysql-test/r/loaddata.result b/mysql-test/r/loaddata.result
index 665e80b8ba2..40c278380b1 100644
--- a/mysql-test/r/loaddata.result
+++ b/mysql-test/r/loaddata.result
@@ -503,4 +503,33 @@ DROP TABLE t1;
CREATE TABLE t1 (id INT NOT NULL);
LOAD DATA LOCAL INFILE 'tb.txt' INTO TABLE t1;
DROP TABLE t1;
+#
+# Bug #51876 : crash/memory underrun when loading data with ucs2
+# and reverse() function
+#
+# Problem # 1 (original report): wrong parsing of ucs2 data
+SELECT '00' UNION SELECT '10' INTO OUTFILE 'tmpp.txt';
+CREATE TABLE t1(a INT);
+LOAD DATA INFILE 'tmpp.txt' INTO TABLE t1 CHARACTER SET ucs2
+(@b) SET a=REVERSE(@b);
+Warnings:
+Warning 1366 Incorrect integer value: '00' for column 'a' at row 1
+Warning 1366 Incorrect integer value: '10' for column 'a' at row 2
+# should return 2 zeroes (as the value is truncated)
+SELECT * FROM t1;
+a
+0
+0
+DROP TABLE t1;
+# Problem # 2 : if you write and read ucs2 data to a file they're lost
+SELECT '00' UNION SELECT '10' INTO OUTFILE 'tmpp2.txt' CHARACTER SET ucs2;
+CREATE TABLE t1(a INT);
+LOAD DATA INFILE 'tmpp2.txt' INTO TABLE t1 CHARACTER SET ucs2
+(@b) SET a=REVERSE(@b);
+# should return 0 and 1 (10 reversed)
+SELECT * FROM t1;
+a
+0
+1
+DROP TABLE t1;
End of 5.1 tests
diff --git a/mysql-test/r/log_tables_upgrade.result b/mysql-test/r/log_tables_upgrade.result
index 5d9be85a48a..a9d1b41cf2c 100644
--- a/mysql-test/r/log_tables_upgrade.result
+++ b/mysql-test/r/log_tables_upgrade.result
@@ -11,15 +11,18 @@ Table Op Msg_type Msg_text
test.bug49823 repair status OK
RENAME TABLE general_log TO renamed_general_log;
RENAME TABLE test.bug49823 TO general_log;
+Phase 1/3: Fixing table and database names
+Phase 2/3: Checking and upgrading tables
+Processing databases
+information_schema
+mtr
mtr.global_suppressions OK
mtr.test_suppressions OK
+mysql
mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
-mysql.general_log
-Error : You can't use locks with log tables.
-status : OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
@@ -31,9 +34,6 @@ mysql.proc OK
mysql.procs_priv OK
mysql.renamed_general_log OK
mysql.servers OK
-mysql.slow_log
-Error : You can't use locks with log tables.
-status : OK
mysql.tables_priv OK
mysql.time_zone OK
mysql.time_zone_leap_second OK
@@ -41,6 +41,9 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
+test
+Phase 3/3: Running 'mysql_fix_privilege_tables'...
+OK
DROP TABLE general_log;
RENAME TABLE renamed_general_log TO general_log;
SET GLOBAL general_log = @saved_general_log;
diff --git a/mysql-test/r/lowercase_table2.result b/mysql-test/r/lowercase_table2.result
index 51c2ac0faf5..c9a46b70fab 100644
--- a/mysql-test/r/lowercase_table2.result
+++ b/mysql-test/r/lowercase_table2.result
@@ -56,6 +56,7 @@ CREATE DATABASE `TEST_$1`;
SHOW DATABASES LIKE "TEST%";
Database (TEST%)
TEST_$1
+test
DROP DATABASE `test_$1`;
CREATE TABLE T1 (a int) engine=innodb;
INSERT INTO T1 VALUES (1);
@@ -171,6 +172,6 @@ create table myUC (i int);
select TABLE_SCHEMA,TABLE_NAME FROM information_schema.TABLES
where TABLE_SCHEMA ='mysqltest_LC2';
TABLE_SCHEMA TABLE_NAME
-mysqltest_LC2 myUC
+mysqltest_lc2 myUC
use test;
drop database mysqltest_LC2;
diff --git a/mysql-test/r/lowercase_view.result b/mysql-test/r/lowercase_view.result
index c37dc41c495..33c87ec101c 100644
--- a/mysql-test/r/lowercase_view.result
+++ b/mysql-test/r/lowercase_view.result
@@ -148,3 +148,20 @@ a
DROP VIEW v1;
DROP TABLE t1;
End of 5.0 tests.
+#
+# Bug #53095: SELECT column_name FROM INFORMATION_SCHEMA.STATISTICS
+# returns nothing
+#
+CREATE TABLE `ttt` (
+`f1` char(3) NOT NULL,
+PRIMARY KEY (`f1`)
+) ENGINE=myisam DEFAULT CHARSET=latin1;
+SELECT count(COLUMN_NAME) FROM INFORMATION_SCHEMA.STATISTICS WHERE TABLE_NAME =
+'TTT';
+count(COLUMN_NAME)
+1
+SELECT count(*) FROM INFORMATION_SCHEMA.STATISTICS WHERE TABLE_NAME = 'TTT';
+count(*)
+1
+DROP TABLE `ttt`;
+End of 5.0 tests.
diff --git a/mysql-test/r/mysql_client_test.result b/mysql-test/r/mysql_client_test.result
index 08d982c85e3..edda7980e97 100644
--- a/mysql-test/r/mysql_client_test.result
+++ b/mysql-test/r/mysql_client_test.result
@@ -1,3 +1,5 @@
SET @old_general_log= @@global.general_log;
+SET @old_slow_query_log= @@global.slow_query_log;
ok
SET @@global.general_log= @old_general_log;
+SET @@global.slow_query_log= @old_slow_query_log;
diff --git a/mysql-test/r/mysql_upgrade.result b/mysql-test/r/mysql_upgrade.result
index 821ad31871f..ca23dc9cca1 100644
--- a/mysql-test/r/mysql_upgrade.result
+++ b/mysql-test/r/mysql_upgrade.result
@@ -1,13 +1,16 @@
Run mysql_upgrade once
+Phase 1/3: Fixing table and database names
+Phase 2/3: Checking and upgrading tables
+Processing databases
+information_schema
+mtr
mtr.global_suppressions OK
mtr.test_suppressions OK
+mysql
mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
-mysql.general_log
-Error : You can't use locks with log tables.
-status : OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
@@ -18,9 +21,6 @@ mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.servers OK
-mysql.slow_log
-Error : You can't use locks with log tables.
-status : OK
mysql.tables_priv OK
mysql.time_zone OK
mysql.time_zone_leap_second OK
@@ -28,18 +28,24 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
+test
+Phase 3/3: Running 'mysql_fix_privilege_tables'...
+OK
Run it again - should say already completed
This installation of MySQL is already upgraded to VERSION, use --force if you still need to run mysql_upgrade
Force should run it regardless of wether it's been run before
+Phase 1/3: Fixing table and database names
+Phase 2/3: Checking and upgrading tables
+Processing databases
+information_schema
+mtr
mtr.global_suppressions OK
mtr.test_suppressions OK
+mysql
mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
-mysql.general_log
-Error : You can't use locks with log tables.
-status : OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
@@ -50,9 +56,6 @@ mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.servers OK
-mysql.slow_log
-Error : You can't use locks with log tables.
-status : OK
mysql.tables_priv OK
mysql.time_zone OK
mysql.time_zone_leap_second OK
@@ -60,18 +63,24 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
+test
+Phase 3/3: Running 'mysql_fix_privilege_tables'...
+OK
CREATE USER mysqltest1@'%' IDENTIFIED by 'sakila';
GRANT ALL ON *.* TO mysqltest1@'%';
Run mysql_upgrade with password protected account
+Phase 1/3: Fixing table and database names
+Phase 2/3: Checking and upgrading tables
+Processing databases
+information_schema
+mtr
mtr.global_suppressions OK
mtr.test_suppressions OK
+mysql
mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
-mysql.general_log
-Error : You can't use locks with log tables.
-status : OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
@@ -82,9 +91,6 @@ mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.servers OK
-mysql.slow_log
-Error : You can't use locks with log tables.
-status : OK
mysql.tables_priv OK
mysql.time_zone OK
mysql.time_zone_leap_second OK
@@ -92,20 +98,27 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
+test
+Phase 3/3: Running 'mysql_fix_privilege_tables'...
+OK
DROP USER mysqltest1@'%';
Run mysql_upgrade with a non existing server socket
+Phase 1/3: Fixing table and database names
mysqlcheck: Got error: 2005: Unknown MySQL server host 'not_existing_host' (errno) when trying to connect
FATAL ERROR: Upgrade failed
set GLOBAL sql_mode='STRICT_ALL_TABLES,ANSI_QUOTES,NO_ZERO_DATE';
+Phase 1/3: Fixing table and database names
+Phase 2/3: Checking and upgrading tables
+Processing databases
+information_schema
+mtr
mtr.global_suppressions OK
mtr.test_suppressions OK
+mysql
mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
-mysql.general_log
-Error : You can't use locks with log tables.
-status : OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
@@ -116,9 +129,6 @@ mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.servers OK
-mysql.slow_log
-Error : You can't use locks with log tables.
-status : OK
mysql.tables_priv OK
mysql.time_zone OK
mysql.time_zone_leap_second OK
@@ -126,6 +136,9 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
+test
+Phase 3/3: Running 'mysql_fix_privilege_tables'...
+OK
set GLOBAL sql_mode=default;
#
# Bug #41569 mysql_upgrade (ver 5.1) add 3 fields to mysql.proc table
@@ -135,15 +148,18 @@ CREATE PROCEDURE testproc() BEGIN END;
UPDATE mysql.proc SET character_set_client = NULL WHERE name LIKE 'testproc';
UPDATE mysql.proc SET collation_connection = NULL WHERE name LIKE 'testproc';
UPDATE mysql.proc SET db_collation = NULL WHERE name LIKE 'testproc';
+Phase 1/3: Fixing table and database names
+Phase 2/3: Checking and upgrading tables
+Processing databases
+information_schema
+mtr
mtr.global_suppressions OK
mtr.test_suppressions OK
+mysql
mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
-mysql.general_log
-Error : You can't use locks with log tables.
-status : OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
@@ -154,9 +170,6 @@ mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.servers OK
-mysql.slow_log
-Error : You can't use locks with log tables.
-status : OK
mysql.tables_priv OK
mysql.time_zone OK
mysql.time_zone_leap_second OK
@@ -164,8 +177,56 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
+test
+Phase 3/3: Running 'mysql_fix_privilege_tables'...
+OK
CALL testproc();
DROP PROCEDURE testproc;
WARNING: NULL values of the 'character_set_client' column ('mysql.proc' table) have been updated with a default value (latin1). Please verify if necessary.
WARNING: NULL values of the 'collation_connection' column ('mysql.proc' table) have been updated with a default value (latin1_swedish_ci). Please verify if necessary.
WARNING: NULL values of the 'db_collation' column ('mysql.proc' table) have been updated with default values. Please verify if necessary.
+#
+# Bug #53613: mysql_upgrade incorrectly revokes
+# TRIGGER privilege on given table
+#
+GRANT USAGE ON *.* TO 'user3'@'%';
+GRANT ALL PRIVILEGES ON `roelt`.`test2` TO 'user3'@'%';
+Run mysql_upgrade with all privileges on a user
+Phase 1/3: Fixing table and database names
+Phase 2/3: Checking and upgrading tables
+Processing databases
+information_schema
+mtr
+mtr.global_suppressions OK
+mtr.test_suppressions OK
+mysql
+mysql.columns_priv OK
+mysql.db OK
+mysql.event OK
+mysql.func OK
+mysql.help_category OK
+mysql.help_keyword OK
+mysql.help_relation OK
+mysql.help_topic OK
+mysql.host OK
+mysql.ndb_binlog_index OK
+mysql.plugin OK
+mysql.proc OK
+mysql.procs_priv OK
+mysql.servers OK
+mysql.tables_priv OK
+mysql.time_zone OK
+mysql.time_zone_leap_second OK
+mysql.time_zone_name OK
+mysql.time_zone_transition OK
+mysql.time_zone_transition_type OK
+mysql.user OK
+test
+Phase 3/3: Running 'mysql_fix_privilege_tables'...
+OK
+SHOW GRANTS FOR 'user3'@'%';
+Grants for user3@%
+GRANT USAGE ON *.* TO 'user3'@'%'
+GRANT ALL PRIVILEGES ON `roelt`.`test2` TO 'user3'@'%'
+DROP USER 'user3'@'%';
+End of 5.1 tests
diff --git a/mysql-test/r/mysqlcheck.result b/mysql-test/r/mysqlcheck.result
index 5f1a0565b10..812fd12e197 100644
--- a/mysql-test/r/mysqlcheck.result
+++ b/mysql-test/r/mysqlcheck.result
@@ -7,8 +7,6 @@ mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
-mysql.general_log
-note : The storage engine for the table doesn't support optimize
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
@@ -19,8 +17,6 @@ mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.servers OK
-mysql.slow_log
-note : The storage engine for the table doesn't support optimize
mysql.tables_priv OK
mysql.time_zone OK
mysql.time_zone_leap_second OK
@@ -32,8 +28,6 @@ mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
-mysql.general_log
-note : The storage engine for the table doesn't support optimize
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
@@ -44,8 +38,6 @@ mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.servers OK
-mysql.slow_log
-note : The storage engine for the table doesn't support optimize
mysql.tables_priv OK
mysql.time_zone OK
mysql.time_zone_leap_second OK
diff --git a/mysql-test/r/not_partition.result b/mysql-test/r/not_partition.result
index f516f8634ce..b17594d0ded 100644
--- a/mysql-test/r/not_partition.result
+++ b/mysql-test/r/not_partition.result
@@ -1,47 +1,47 @@
DROP TABLE IF EXISTS t1;
FLUSH TABLES;
SELECT * FROM t1;
-ERROR 42000: Unknown table engine 'partition'
+ERROR 42000: Unknown table engine 'partition'
TRUNCATE TABLE t1;
-ERROR 42000: Unknown table engine 'partition'
+ERROR 42000: Unknown table engine 'partition'
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
-test.t1 analyze Error Unknown table engine 'partition'
+test.t1 analyze Error Unknown table engine 'partition'
test.t1 analyze error Corrupt
CHECK TABLE t1;
Table Op Msg_type Msg_text
-test.t1 check Error Unknown table engine 'partition'
+test.t1 check Error Unknown table engine 'partition'
test.t1 check error Corrupt
OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
-test.t1 optimize Error Unknown table engine 'partition'
+test.t1 optimize Error Unknown table engine 'partition'
test.t1 optimize error Corrupt
REPAIR TABLE t1;
Table Op Msg_type Msg_text
-test.t1 repair Error Unknown table engine 'partition'
+test.t1 repair Error Unknown table engine 'partition'
test.t1 repair error Corrupt
ALTER TABLE t1 REPAIR PARTITION ALL;
Table Op Msg_type Msg_text
-test.t1 repair Error Unknown table engine 'partition'
+test.t1 repair Error Unknown table engine 'partition'
test.t1 repair error Corrupt
ALTER TABLE t1 CHECK PARTITION ALL;
Table Op Msg_type Msg_text
-test.t1 check Error Unknown table engine 'partition'
+test.t1 check Error Unknown table engine 'partition'
test.t1 check error Corrupt
ALTER TABLE t1 OPTIMIZE PARTITION ALL;
Table Op Msg_type Msg_text
-test.t1 optimize Error Unknown table engine 'partition'
+test.t1 optimize Error Unknown table engine 'partition'
test.t1 optimize error Corrupt
ALTER TABLE t1 ANALYZE PARTITION ALL;
Table Op Msg_type Msg_text
-test.t1 analyze Error Unknown table engine 'partition'
+test.t1 analyze Error Unknown table engine 'partition'
test.t1 analyze error Corrupt
ALTER TABLE t1 REBUILD PARTITION ALL;
-ERROR 42000: Unknown table engine 'partition'
+ERROR 42000: Unknown table engine 'partition'
ALTER TABLE t1 ENGINE Memory;
-ERROR 42000: Unknown table engine 'partition'
+ERROR 42000: Unknown table engine 'partition'
ALTER TABLE t1 ADD (new INT);
-ERROR 42000: Unknown table engine 'partition'
+ERROR 42000: Unknown table engine 'partition'
DROP TABLE t1;
CREATE TABLE t1 (
firstname VARCHAR(25) NOT NULL,
diff --git a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result
index 4da176aa1a6..31c612500d9 100644
--- a/mysql-test/r/show_check.result
+++ b/mysql-test/r/show_check.result
@@ -977,7 +977,7 @@ NULL test t1 c NULL NO int NULL NULL int(11) PRI select,insert,update,reference
----------------------------------------------------------------
SHOW TABLES LIKE 't1';
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def TABLE_NAMES TABLE_NAME Tables_in_test (t1) 253 192 2 N 1 0 33
+def TABLE_NAMES TABLE_NAME Tables_in_test (t1) 253 219 2 N 1 0 33
Tables_in_test (t1)
t1
----------------------------------------------------------------
diff --git a/mysql-test/r/update.result b/mysql-test/r/update.result
index 006eaba4e69..63baf639487 100644
--- a/mysql-test/r/update.result
+++ b/mysql-test/r/update.result
@@ -527,3 +527,17 @@ ERROR HY000: You are using safe update mode and you tried to update a table with
SET SESSION sql_safe_updates = DEFAULT;
DROP TABLE t1;
DROP VIEW v1;
+#
+# Bug#54734 assert in Diagnostics_area::set_ok_status
+#
+DROP TABLE IF EXISTS t1, not_exists;
+DROP FUNCTION IF EXISTS f1;
+DROP VIEW IF EXISTS v1;
+CREATE TABLE t1 (PRIMARY KEY(pk)) AS SELECT 1 AS pk;
+CREATE FUNCTION f1() RETURNS INTEGER RETURN (SELECT 1 FROM not_exists);
+CREATE VIEW v1 AS SELECT pk FROM t1 WHERE f1() = 13;
+UPDATE v1 SET pk = 7 WHERE pk > 0;
+ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+DROP VIEW v1;
+DROP FUNCTION f1;
+DROP TABLE t1;
diff --git a/mysql-test/r/upgrade.result b/mysql-test/r/upgrade.result
index da2f55b5bb1..bdfac990a9a 100644
--- a/mysql-test/r/upgrade.result
+++ b/mysql-test/r/upgrade.result
@@ -139,4 +139,12 @@ USE `#mysql50#.`;
ERROR 42000: Incorrect database name '#mysql50#.'
USE `#mysql50#../blablabla`;
ERROR 42000: Incorrect database name '#mysql50#../blablabla'
+show full tables;
+Tables_in_test Table_type
+#mysql50#ltoriaeinnovacionendesarrolloempres?9120761097220077376?cio_com BASE TABLE
+rename table `#mysql50#ltoriaeinnovacionendesarrolloempres?9120761097220077376?cio_com` to `ltoriaeinnovacionendesarrolloempres?9120761097220077376?cio_com`;
+show full tables;
+Tables_in_test Table_type
+ltoriaeinnovacionendesarrolloempres?9120761097220077376?cio_com BASE TABLE
+drop table `ltoriaeinnovacionendesarrolloempres?9120761097220077376?cio_com`;
# End of 5.1 tests