mirror of
https://github.com/MariaDB/server.git
synced 2025-12-09 08:01:34 +03:00
Merge with MySQL 5.1.60
This commit is contained in:
@@ -83,5 +83,18 @@ a a b filler
|
||||
SET SESSION debug = DEFAULT;
|
||||
DROP TABLE t1, t2;
|
||||
#
|
||||
# Bug#11747970 34660: CRASH WHEN FEDERATED TABLE LOSES CONNECTION DURING INSERT ... SELECT
|
||||
#
|
||||
CREATE TABLE t1(f1 INT, KEY(f1));
|
||||
CREATE TABLE t2(f1 INT);
|
||||
INSERT INTO t1 VALUES (1),(2);
|
||||
INSERT INTO t2 VALUES (1),(2);
|
||||
SET SESSION debug='d,bug11747970_simulate_error';
|
||||
INSERT IGNORE INTO t2 SELECT f1 FROM t1 a WHERE NOT EXISTS (SELECT 1 FROM t2 b WHERE a.f1 = b.f1);
|
||||
Warnings:
|
||||
Error 1105 Unknown error
|
||||
SET SESSION debug = DEFAULT;
|
||||
DROP TABLE t1,t2;
|
||||
#
|
||||
# End of 5.1 tests
|
||||
#
|
||||
|
||||
@@ -715,8 +715,8 @@ create table t1 (c char(10)) engine=memory;
|
||||
create table t2 (c varchar(10)) engine=memory;
|
||||
show table status like 't_';
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 MEMORY 10 Fixed 0 11 0 # 0 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 0 12 0 # 0 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t1 MEMORY 10 Fixed 0 11 0 # 0 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 0 12 0 # 0 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
drop table t1, t2;
|
||||
CREATE TABLE t1(a VARCHAR(1), b VARCHAR(2), c VARCHAR(256),
|
||||
KEY(a), KEY(b), KEY(c)) ENGINE=MEMORY;
|
||||
|
||||
@@ -2444,4 +2444,28 @@ CARDINALITY
|
||||
DROP TABLE t1;
|
||||
SET myisam_sort_buffer_size=@@global.myisam_sort_buffer_size;
|
||||
SET myisam_repair_threads=@@global.myisam_repair_threads;
|
||||
#
|
||||
# BUG#11757032 - 49030: OPTIMIZE TABLE BREAKS MYISAM TABLE WHEN
|
||||
# USING MYISAM_USE_MMAP ON WINDOWS
|
||||
#
|
||||
SET GLOBAL myisam_use_mmap=1;
|
||||
CREATE TABLE t1(a INT);
|
||||
INSERT INTO t1 VALUES(1),(2);
|
||||
DELETE FROM t1 WHERE a=1;
|
||||
FLUSH TABLE t1;
|
||||
LOCK TABLE t1 WRITE;
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize status OK
|
||||
INSERT INTO t1 VALUES(3);
|
||||
UNLOCK TABLES;
|
||||
SELECT * FROM t1;
|
||||
a
|
||||
2
|
||||
3
|
||||
CHECK TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
DROP TABLE t1;
|
||||
SET GLOBAL myisam_use_mmap=default;
|
||||
End of 5.1 tests
|
||||
|
||||
@@ -87,3 +87,35 @@ COUNT(*)
|
||||
128
|
||||
DROP TABLE mysql_db1.t1;
|
||||
DROP DATABASE mysql_db1;
|
||||
#
|
||||
# BUG#11761180 - 53646: MYISAMPACK CORRUPTS TABLES WITH FULLTEXT INDEXES
|
||||
#
|
||||
CREATE TABLE t1(a CHAR(4), FULLTEXT(a));
|
||||
INSERT INTO t1 VALUES('aaaa'),('bbbb'),('cccc');
|
||||
FLUSH TABLE t1;
|
||||
CHECK TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
SELECT * FROM t1 WHERE MATCH(a) AGAINST('aaaa' IN BOOLEAN MODE);
|
||||
a
|
||||
aaaa
|
||||
SELECT * FROM t1 WHERE MATCH(a) AGAINST('aaaa');
|
||||
a
|
||||
aaaa
|
||||
DROP TABLE t1;
|
||||
# Test table with key_reflength > rec_reflength
|
||||
CREATE TABLE t1(a CHAR(30), FULLTEXT(a));
|
||||
# Populating a table, so it's index file exceeds 65K
|
||||
# Populating a table, so index file has second level fulltext tree
|
||||
FLUSH TABLE t1;
|
||||
# Compressing table
|
||||
# Fixing index (repair by sort)
|
||||
CHECK TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
FLUSH TABLE t1;
|
||||
# Fixing index (repair with keycache)
|
||||
CHECK TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
DROP TABLE t1;
|
||||
|
||||
@@ -136,6 +136,10 @@ select 1146 as "after_!errno_masked_error" ;
|
||||
after_!errno_masked_error
|
||||
1146
|
||||
mysqltest: At line 1: query 'select 3 from t1' failed with wrong errno 1146: 'Table 'test.t1' doesn't exist', instead of 1000...
|
||||
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 'garbage' at line 1
|
||||
is empty
|
||||
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 'nonsense' at line 1
|
||||
is empty
|
||||
garbage ;
|
||||
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 'garbage' at line 1
|
||||
select 1064 as "after_--enable_abort_on_error" ;
|
||||
@@ -144,6 +148,9 @@ after_--enable_abort_on_error
|
||||
select 3 from t1 ;
|
||||
ERROR 42S02: Table 'test.t1' doesn't exist
|
||||
mysqltest: At line 1: query 'select 3 from t1' failed with wrong errno 1146: 'Table 'test.t1' doesn't exist', instead of 1064...
|
||||
is empty
|
||||
is empty
|
||||
"Yes it's empty"
|
||||
hello
|
||||
hello
|
||||
;;;;;;;;
|
||||
@@ -316,7 +323,7 @@ insert into t1 values ('$dollar');
|
||||
$dollar
|
||||
`select 42`
|
||||
drop table t1;
|
||||
mysqltest: At line 1: Error running query 'failing query': 1064 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 'failing query' at line 1
|
||||
mysqltest: At line 1: query 'let $var2= `failing query`' failed: 1064: 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 'failing query' at line 1
|
||||
mysqltest: At line 1: Missing required argument 'filename' to command 'source'
|
||||
mysqltest: At line 1: Could not open './non_existingFile' for reading, errno: 2
|
||||
mysqltest: In included file "MYSQLTEST_VARDIR/tmp/recursive.sql":
|
||||
@@ -814,7 +821,7 @@ mysqltest: At line 1: Could not find column 'column_not_exists' in the result of
|
||||
mysqltest: At line 1: Query 'SET @A = 1' didn't return a result set
|
||||
mysqltest: At line 1: Could not find column '1 AS B' in the result of 'SELECT 1 AS A'
|
||||
value= No such row
|
||||
mysqltest: At line 1: Error running query 'SHOW COLNS FROM t1': 1064 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 'COLNS FROM t1' at line 1
|
||||
mysqltest: At line 1: query 'let $value= query_get_value(SHOW COLNS FROM t1, Field, 1)' failed: 1064: 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 'COLNS FROM t1' at line 1
|
||||
|
||||
Field Type Null Key Default Extra
|
||||
a int(11) YES -><- NULL
|
||||
|
||||
@@ -1664,4 +1664,11 @@ a 1
|
||||
3 1
|
||||
2 1
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#11765255 58201:
|
||||
# VALGRIND/CRASH WHEN ORDERING BY MULTIPLE AGGREGATE FUNCTIONS
|
||||
#
|
||||
select 1 order by max(1) + min(1);
|
||||
1
|
||||
1
|
||||
End of 5.1 tests
|
||||
|
||||
@@ -1,8 +1,30 @@
|
||||
#
|
||||
# Bug#11766879/Bug#60106: DIFF BETWEEN # OF INDEXES IN MYSQL VS INNODB,
|
||||
# PARTITONING, ON INDEX CREATE
|
||||
#
|
||||
call mtr.add_suppression("contains 2 indexes inside InnoDB, which is different from the number of indexes 1 defined in the MySQL");
|
||||
CREATE TABLE t1 (
|
||||
id bigint NOT NULL AUTO_INCREMENT,
|
||||
time date,
|
||||
id2 bigint not null,
|
||||
PRIMARY KEY (id,time)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8
|
||||
/*!50100 PARTITION BY RANGE(TO_DAYS(time))
|
||||
(PARTITION p10 VALUES LESS THAN (734708) ENGINE = InnoDB,
|
||||
PARTITION p20 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */;
|
||||
INSERT INTO t1 (time,id2) VALUES ('2011-07-24',1);
|
||||
INSERT INTO t1 (time,id2) VALUES ('2011-07-25',1);
|
||||
INSERT INTO t1 (time,id2) VALUES ('2011-07-25',1);
|
||||
CREATE UNIQUE INDEX uk_time_id2 on t1(time,id2);
|
||||
ERROR 23000: Duplicate entry '2011-07-25-1' for key 'uk_time_id2'
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
3
|
||||
DROP TABLE t1;
|
||||
call mtr.add_suppression("nnoDB: Error: table `test`.`t1` .* Partition.* InnoDB internal");
|
||||
#
|
||||
# Bug#55091: Server crashes on ADD PARTITION after a failed attempt
|
||||
#
|
||||
SET @old_innodb_file_format_check = @@global.innodb_file_format_check;
|
||||
SET @old_innodb_file_format = @@global.innodb_file_format;
|
||||
SET @old_innodb_file_per_table = @@global.innodb_file_per_table;
|
||||
SET @old_innodb_strict_mode = @@global.innodb_strict_mode;
|
||||
@@ -70,7 +92,6 @@ DROP TABLE t1;
|
||||
SET @@global.innodb_strict_mode = @old_innodb_strict_mode;
|
||||
SET @@global.innodb_file_format = @old_innodb_file_format;
|
||||
SET @@global.innodb_file_per_table = @old_innodb_file_per_table;
|
||||
SET @@global.innodb_file_format_check = @old_innodb_file_format_check;
|
||||
SET NAMES utf8;
|
||||
CREATE TABLE `t``\""e` (a INT, PRIMARY KEY (a))
|
||||
ENGINE=InnoDB
|
||||
|
||||
@@ -30,7 +30,7 @@ ERROR HY000: You are using safe update mode and you tried to update a table with
|
||||
delete from t1 where a+0=1;
|
||||
ERROR HY000: You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column
|
||||
select 1 from t1,t1 as t2,t1 as t3,t1 as t4,t1 as t5;
|
||||
ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay
|
||||
ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay
|
||||
update t1 set b="a" limit 1;
|
||||
update t1 set b="a" where b="b" limit 2;
|
||||
delete from t1 where b="test" limit 1;
|
||||
@@ -42,7 +42,7 @@ SELECT @@MAX_JOIN_SIZE, @@SQL_BIG_SELECTS;
|
||||
2 0
|
||||
insert into t1 values (null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a");
|
||||
SELECT * from t1 order by a;
|
||||
ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay
|
||||
ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay
|
||||
SET SQL_BIG_SELECTS=1;
|
||||
SELECT * from t1 order by a;
|
||||
a b
|
||||
@@ -52,7 +52,7 @@ a b
|
||||
5 a
|
||||
SET MAX_JOIN_SIZE=2;
|
||||
SELECT * from t1;
|
||||
ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay
|
||||
ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay
|
||||
SET MAX_JOIN_SIZE=DEFAULT;
|
||||
SELECT * from t1;
|
||||
a b
|
||||
@@ -82,12 +82,12 @@ insert into t1 select * from t1;
|
||||
insert into t1 select * from t1;
|
||||
set local max_join_size=8;
|
||||
select * from (select * from t1) x;
|
||||
ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay
|
||||
ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay
|
||||
set local max_join_size=1;
|
||||
select * from (select a.a as aa, b.a as ba from t1 a, t1 b) x;
|
||||
ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay
|
||||
ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay
|
||||
set local max_join_size=1;
|
||||
select * from (select 1 union select 2 union select 3) x;
|
||||
ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay
|
||||
ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay
|
||||
drop table t1;
|
||||
SET SQL_SAFE_UPDATES=0,SQL_SELECT_LIMIT=DEFAULT, SQL_MAX_JOIN_SIZE=DEFAULT;
|
||||
|
||||
@@ -456,57 +456,57 @@ insert into t2 values (1),(2);
|
||||
insert into t3 values (1,1),(2,2);
|
||||
show table status;
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 MEMORY 10 Fixed 2 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 2 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t3 MEMORY 10 Fixed 2 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t1 MEMORY 10 Fixed 2 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 2 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t3 MEMORY 10 Fixed 2 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
insert into t1 values (3),(4);
|
||||
insert into t2 values (3),(4);
|
||||
insert into t3 values (3,3),(4,4);
|
||||
show table status;
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 MEMORY 10 Fixed 4 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 4 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t3 MEMORY 10 Fixed 4 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t1 MEMORY 10 Fixed 4 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 4 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t3 MEMORY 10 Fixed 4 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
insert into t1 values (5);
|
||||
insert into t2 values (5);
|
||||
insert into t3 values (5,5);
|
||||
show table status;
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 MEMORY 10 Fixed 5 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 5 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t3 MEMORY 10 Fixed 5 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t1 MEMORY 10 Fixed 5 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 5 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t3 MEMORY 10 Fixed 5 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
delete from t1 where a=3;
|
||||
delete from t2 where b=3;
|
||||
delete from t3 where a=3;
|
||||
show table status;
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 MEMORY 10 Fixed 4 # # # # # NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 4 # # # # # NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t3 MEMORY 10 Fixed 4 # # # # # NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t1 MEMORY 10 Fixed 4 # # # # # NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 4 # # # # # NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t3 MEMORY 10 Fixed 4 # # # # # NULL # NULL NULL latin1_swedish_ci NULL
|
||||
truncate table t1;
|
||||
truncate table t2;
|
||||
truncate table t3;
|
||||
show table status;
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 MEMORY 10 Fixed 0 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 0 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t3 MEMORY 10 Fixed 0 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t1 MEMORY 10 Fixed 0 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 0 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t3 MEMORY 10 Fixed 0 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
insert into t1 values (5);
|
||||
insert into t2 values (5);
|
||||
insert into t3 values (5,5);
|
||||
show table status;
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 MEMORY 10 Fixed 1 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 1 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t3 MEMORY 10 Fixed 1 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t1 MEMORY 10 Fixed 1 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 1 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t3 MEMORY 10 Fixed 1 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
delete from t1 where a=5;
|
||||
delete from t2 where b=5;
|
||||
delete from t3 where a=5;
|
||||
show table status;
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 MEMORY 10 Fixed 0 # # # # # NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 0 # # # # # NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t3 MEMORY 10 Fixed 0 # # # # # NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t1 MEMORY 10 Fixed 0 # # # # # NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 0 # # # # # NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t3 MEMORY 10 Fixed 0 # # # # # NULL # NULL NULL latin1_swedish_ci NULL
|
||||
drop table t1, t2, t3;
|
||||
create database mysqltest;
|
||||
show create database mysqltest;
|
||||
@@ -657,7 +657,7 @@ DROP TABLE t1;
|
||||
flush tables;
|
||||
SHOW TABLE STATUS like 't1';
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 NULL NULL NULL NULL # # # # NULL NULL NULL NULL NULL NULL NULL NULL Incorrect information in file: './test/t1.frm'
|
||||
t1 NULL NULL NULL NULL # # # # NULL NULL # NULL NULL NULL NULL NULL Incorrect information in file: './test/t1.frm'
|
||||
Warnings:
|
||||
Warning 1033 Incorrect information in file: './test/t1.frm'
|
||||
show create table t1;
|
||||
|
||||
@@ -1685,4 +1685,20 @@ ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function
|
||||
DROP PROCEDURE p1;
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#12428824 - PARSER STACK OVERFLOW AND CRASH IN SP_ADD_USED_ROUTINE
|
||||
# WITH OBSCURE QUERY
|
||||
#
|
||||
SELECT very_long_fn_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222225555555555555555555555555577777777777777777777777777777777777777777777777777777777777777777777777788888888999999999999999999999();
|
||||
ERROR 42000: Identifier name 'very_long_fn_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222' is too long
|
||||
CALL very_long_pr_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222225555555555555555555555555577777777777777777777777777777777777777777777777777777777777777777777777788888888999999999999999999999();
|
||||
ERROR 42000: Identifier name 'very_long_pr_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222' is too long
|
||||
SELECT very_long_db_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222225555555555555555555555555577777777777777777777777777777777777777777777777777777777777777777777777788888888999999999999999999999.simple_func();
|
||||
ERROR 42000: Incorrect database name 'very_long_db_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222'
|
||||
CALL very_long_db_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222225555555555555555555555555577777777777777777777777777777777777777777777777777777777777777777777777788888888999999999999999999999.simple_proc();
|
||||
ERROR 42000: Incorrect database name 'very_long_db_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222'
|
||||
SELECT db_name.very_long_fn_name_111111111111111111111111111111111111111111111111111111111111111111111111122222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999999999999999999();
|
||||
ERROR 42000: Identifier name 'very_long_fn_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222' is too long
|
||||
CALL db_name.very_long_pr_name_111111111111111111111111111111111111111111111111111111111111111111111111122222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999999999999999999();
|
||||
ERROR 42000: Identifier name 'very_long_pr_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222' is too long
|
||||
End of 5.1 tests
|
||||
|
||||
@@ -7054,6 +7054,21 @@ SET @@GLOBAL.init_connect= @old_init_connect;
|
||||
DROP PROCEDURE p2;
|
||||
DROP PROCEDURE p5;
|
||||
#
|
||||
# Bug#11840395 (formerly known as bug#60347):
|
||||
# The string "versiondata" seems
|
||||
# to be 'leaking' into the schema name space
|
||||
#
|
||||
DROP DATABASE IF EXISTS mixedCaseDbName;
|
||||
CREATE DATABASE mixedCaseDbName;
|
||||
CREATE PROCEDURE mixedCaseDbName.tryMyProc() begin end|
|
||||
CREATE FUNCTION mixedCaseDbName.tryMyFunc() returns text begin return 'IT WORKS'; end
|
||||
|
|
||||
call mixedCaseDbName.tryMyProc();
|
||||
select mixedCaseDbName.tryMyFunc();
|
||||
mixedCaseDbName.tryMyFunc()
|
||||
IT WORKS
|
||||
DROP DATABASE mixedCaseDbName;
|
||||
#
|
||||
# Bug#11766594 59736: SELECT DISTINCT.. INCORRECT RESULT WITH DETERMINISTIC FUNCTION IN WHERE C
|
||||
#
|
||||
CREATE TABLE t1 (a INT, b INT, KEY(b));
|
||||
|
||||
@@ -407,4 +407,13 @@ SELECT f1 FROM t1;
|
||||
f1
|
||||
-1.79769313486231e+308
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#12406055 BUFFER OVERFLOW OF VARIABLE 'BUFF' IN STRING::SET_REAL
|
||||
#
|
||||
# Ignoring output from misc. float operations
|
||||
select format(-1.7976931348623157E+307,256) as foo;
|
||||
select least(-1.1111111111111111111111111,
|
||||
- group_concat(1.7976931348623157E+308)) as foo;
|
||||
select concat((truncate((-1.7976931348623157E+307),(0x1e))),
|
||||
(99999999999999999999999999999999999999999999999999999999999999999)) into @a;
|
||||
End of 5.0 tests
|
||||
|
||||
@@ -1549,6 +1549,50 @@ select * from t1;
|
||||
5.05 / 0.014
|
||||
360.714286
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#12563865
|
||||
# ROUNDED,TMP_BUF,DECIMAL_VALUE STACK CORRUPTION IN ALL VERSIONS >=5.0
|
||||
#
|
||||
SELECT substring(('M') FROM (999999999999999999999999999999999999999999999999999999999999999999999999999999999)) AS foo;
|
||||
foo
|
||||
|
||||
Warnings:
|
||||
Error 1292 Truncated incorrect DECIMAL value: ''
|
||||
Error 1292 Truncated incorrect DECIMAL value: ''
|
||||
SELECT min(999999999999999999999999999999999999999999999999999999999999999999999999999999999) AS foo;
|
||||
foo
|
||||
999999999999999999999999999999999999999999999999999999999999999999999999999999999
|
||||
SELECT multipolygonfromtext(('4294967294.1'),(999999999999999999999999999999999999999999999999999999999999999999999999999999999)) AS foo;
|
||||
foo
|
||||
NULL
|
||||
Warnings:
|
||||
Error 1292 Truncated incorrect DECIMAL value: ''
|
||||
SELECT convert((999999999999999999999999999999999999999999999999999999999999999999999999999999999), decimal(30,30)) AS foo;
|
||||
foo
|
||||
0.999999999999999999999999999999
|
||||
Warnings:
|
||||
Error 1264 Out of range value for column 'foo' at row 1
|
||||
SELECT bit_xor(999999999999999999999999999999999999999999999999999999999999999999999999999999999) AS foo;
|
||||
foo
|
||||
9223372036854775807
|
||||
Warnings:
|
||||
Error 1292 Truncated incorrect DECIMAL value: ''
|
||||
SELECT -(999999999999999999999999999999999999999999999999999999999999999999999999999999999) AS foo;
|
||||
foo
|
||||
-999999999999999999999999999999999999999999999999999999999999999999999999999999999
|
||||
SELECT date_sub((999999999999999999999999999999999999999999999999999999999999999999999999999999999),
|
||||
interval ((SELECT date_add((0x77500000),
|
||||
interval ('Oml') second)))
|
||||
day_minute)
|
||||
AS foo;
|
||||
foo
|
||||
NULL
|
||||
Warnings:
|
||||
Error 1292 Truncated incorrect DECIMAL value: ''
|
||||
Warning 1292 Incorrect datetime value: '9223372036854775807'
|
||||
SELECT truncate(999999999999999999999999999999999999999999999999999999999999999999999999999999999, 28) AS foo;
|
||||
foo
|
||||
999999999999999999999999999999999999999999999999999999999999999999999999999999999
|
||||
End of 5.0 tests
|
||||
select cast(143.481 as decimal(4,1));
|
||||
cast(143.481 as decimal(4,1))
|
||||
|
||||
@@ -1663,4 +1663,61 @@ a
|
||||
7
|
||||
8
|
||||
drop table t1;
|
||||
#
|
||||
# Bug#11765255 58201:
|
||||
# VALGRIND/CRASH WHEN ORDERING BY MULTIPLE AGGREGATE FUNCTIONS
|
||||
#
|
||||
select 1 as foo
|
||||
union
|
||||
select 2
|
||||
union
|
||||
select 3
|
||||
union
|
||||
select 4
|
||||
order by max(42) + max(1) + max(1) + max(1) + max(1) + max(1)
|
||||
;
|
||||
foo
|
||||
1
|
||||
prepare stmt1 from 'select 1 as foo
|
||||
union
|
||||
select 2
|
||||
union
|
||||
select 3
|
||||
union
|
||||
select 4
|
||||
order by max(42) + max(1) + max(1) + max(1) + max(1) + max(1)
|
||||
';
|
||||
execute stmt1;
|
||||
foo
|
||||
1
|
||||
execute stmt1;
|
||||
foo
|
||||
1
|
||||
select 1 as foo
|
||||
union
|
||||
select 2
|
||||
union
|
||||
select 3
|
||||
union
|
||||
(select 4)
|
||||
order by max(42) + max(1) + max(1) + max(1) + max(1) + max(1)
|
||||
;
|
||||
foo
|
||||
1
|
||||
prepare stmt1 from 'select 1 as foo
|
||||
union
|
||||
select 2
|
||||
union
|
||||
select 3
|
||||
union
|
||||
(select 4)
|
||||
order by max(42) + max(1) + max(1) + max(1) + max(1) + max(1)
|
||||
';
|
||||
execute stmt1;
|
||||
foo
|
||||
1
|
||||
execute stmt1;
|
||||
foo
|
||||
1
|
||||
deallocate prepare stmt1;
|
||||
End of 5.1 tests
|
||||
|
||||
@@ -66,10 +66,12 @@ create view mysqltest.v1 (c,d) as select a+1,b+1 from mysqltest.t1;
|
||||
create algorithm=temptable view mysqltest.v2 (c,d) as select a+1,b+1 from mysqltest.t1;
|
||||
create view mysqltest.v3 (c,d) as select a+1,b+1 from mysqltest.t2;
|
||||
create algorithm=temptable view mysqltest.v4 (c,d) as select a+1,b+1 from mysqltest.t2;
|
||||
create view mysqltest.v5 (c,d) as select a+1,b+1 from mysqltest.t1;
|
||||
grant select on mysqltest.v1 to mysqltest_1@localhost;
|
||||
grant select on mysqltest.v2 to mysqltest_1@localhost;
|
||||
grant select on mysqltest.v3 to mysqltest_1@localhost;
|
||||
grant select on mysqltest.v4 to mysqltest_1@localhost;
|
||||
grant show view on mysqltest.v5 to mysqltest_1@localhost;
|
||||
select c from mysqltest.v1;
|
||||
c
|
||||
select c from mysqltest.v2;
|
||||
@@ -78,6 +80,8 @@ select c from mysqltest.v3;
|
||||
c
|
||||
select c from mysqltest.v4;
|
||||
c
|
||||
select c from mysqltest.v5;
|
||||
ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 'v5'
|
||||
show columns from mysqltest.v1;
|
||||
Field Type Null Key Default Extra
|
||||
c bigint(12) YES NULL
|
||||
@@ -102,16 +106,25 @@ explain select c from mysqltest.v4;
|
||||
ERROR HY000: EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
|
||||
show create view mysqltest.v4;
|
||||
ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table 'v4'
|
||||
explain select c from mysqltest.v5;
|
||||
ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 'v5'
|
||||
show create view mysqltest.v5;
|
||||
View Create View character_set_client collation_connection
|
||||
v5 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `mysqltest`.`v5` AS select (`mysqltest`.`t1`.`a` + 1) AS `c`,(`mysqltest`.`t1`.`b` + 1) AS `d` from `mysqltest`.`t1` latin1 latin1_swedish_ci
|
||||
explain select c from mysqltest.v1;
|
||||
ERROR HY000: EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
|
||||
show create view mysqltest.v1;
|
||||
ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table 'v1'
|
||||
grant show view on mysqltest.v1 to mysqltest_1@localhost;
|
||||
grant select on mysqltest.t1 to mysqltest_1@localhost;
|
||||
explain select c from mysqltest.v1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 system NULL NULL NULL NULL 0 const row not found
|
||||
show create view mysqltest.v1;
|
||||
ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table 'v1'
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `mysqltest`.`v1` AS select (`mysqltest`.`t1`.`a` + 1) AS `c`,(`mysqltest`.`t1`.`b` + 1) AS `d` from `mysqltest`.`t1` latin1 latin1_swedish_ci
|
||||
explain select c from mysqltest.v2;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY <derived2> system NULL NULL NULL NULL 0 const row not found
|
||||
2 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
|
||||
ERROR HY000: EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
|
||||
show create view mysqltest.v2;
|
||||
ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table 'v2'
|
||||
explain select c from mysqltest.v3;
|
||||
@@ -122,6 +135,11 @@ explain select c from mysqltest.v4;
|
||||
ERROR HY000: EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
|
||||
show create view mysqltest.v4;
|
||||
ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table 'v4'
|
||||
explain select c from mysqltest.v5;
|
||||
ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 'v5'
|
||||
show create view mysqltest.v5;
|
||||
View Create View character_set_client collation_connection
|
||||
v5 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `mysqltest`.`v5` AS select (`mysqltest`.`t1`.`a` + 1) AS `c`,(`mysqltest`.`t1`.`b` + 1) AS `d` from `mysqltest`.`t1` latin1 latin1_swedish_ci
|
||||
grant show view on mysqltest.* to mysqltest_1@localhost;
|
||||
explain select c from mysqltest.v1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
@@ -137,15 +155,12 @@ show create view mysqltest.v2;
|
||||
View Create View character_set_client collation_connection
|
||||
v2 CREATE ALGORITHM=TEMPTABLE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `mysqltest`.`v2` AS select (`mysqltest`.`t1`.`a` + 1) AS `c`,(`mysqltest`.`t1`.`b` + 1) AS `d` from `mysqltest`.`t1` latin1 latin1_swedish_ci
|
||||
explain select c from mysqltest.v3;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 system NULL NULL NULL NULL 0 const row not found
|
||||
ERROR HY000: EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
|
||||
show create view mysqltest.v3;
|
||||
View Create View character_set_client collation_connection
|
||||
v3 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `mysqltest`.`v3` AS select (`mysqltest`.`t2`.`a` + 1) AS `c`,(`mysqltest`.`t2`.`b` + 1) AS `d` from `mysqltest`.`t2` latin1 latin1_swedish_ci
|
||||
explain select c from mysqltest.v4;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY <derived2> system NULL NULL NULL NULL 0 const row not found
|
||||
2 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
|
||||
ERROR HY000: EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
|
||||
show create view mysqltest.v4;
|
||||
View Create View character_set_client collation_connection
|
||||
v4 CREATE ALGORITHM=TEMPTABLE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `mysqltest`.`v4` AS select (`mysqltest`.`t2`.`a` + 1) AS `c`,(`mysqltest`.`t2`.`b` + 1) AS `d` from `mysqltest`.`t2` latin1 latin1_swedish_ci
|
||||
@@ -947,6 +962,197 @@ DROP USER foo;
|
||||
DROP VIEW db1.v1;
|
||||
DROP TABLE db1.t1;
|
||||
DROP DATABASE db1;
|
||||
Bug #11765687/#58677:
|
||||
No privilege on table/view, but can know #rows / underlying table's name
|
||||
create database mysqltest1;
|
||||
create table mysqltest1.t1 (i int);
|
||||
create table mysqltest1.t2 (j int);
|
||||
create table mysqltest1.t3 (k int, secret int);
|
||||
create user alice@localhost;
|
||||
create user bob@localhost;
|
||||
create user cecil@localhost;
|
||||
create user dan@localhost;
|
||||
create user eugene@localhost;
|
||||
create user fiona@localhost;
|
||||
create user greg@localhost;
|
||||
create user han@localhost;
|
||||
create user inga@localhost;
|
||||
create user jamie@localhost;
|
||||
create user karl@localhost;
|
||||
create user lena@localhost;
|
||||
create user mhairi@localhost;
|
||||
create user noam@localhost;
|
||||
create user olga@localhost;
|
||||
create user pjotr@localhost;
|
||||
create user quintessa@localhost;
|
||||
grant all privileges on mysqltest1.* to alice@localhost with grant option;
|
||||
... as alice
|
||||
create view v1 as select * from t1;
|
||||
create view v2 as select * from v1, t2;
|
||||
create view v3 as select k from t3;
|
||||
grant select on mysqltest1.v1 to bob@localhost;
|
||||
grant show view on mysqltest1.v1 to cecil@localhost;
|
||||
grant select, show view on mysqltest1.v1 to dan@localhost;
|
||||
grant select on mysqltest1.t1 to dan@localhost;
|
||||
grant select on mysqltest1.* to eugene@localhost;
|
||||
grant select, show view on mysqltest1.v2 to fiona@localhost;
|
||||
grant select, show view on mysqltest1.v2 to greg@localhost;
|
||||
grant show view on mysqltest1.v1 to greg@localhost;
|
||||
grant select(k) on mysqltest1.t3 to han@localhost;
|
||||
grant select, show view on mysqltest1.v3 to han@localhost;
|
||||
grant select on mysqltest1.t1 to inga@localhost;
|
||||
grant select on mysqltest1.t2 to inga@localhost;
|
||||
grant select on mysqltest1.v1 to inga@localhost;
|
||||
grant select, show view on mysqltest1.v2 to inga@localhost;
|
||||
grant select on mysqltest1.t1 to jamie@localhost;
|
||||
grant select on mysqltest1.t2 to jamie@localhost;
|
||||
grant show view on mysqltest1.v1 to jamie@localhost;
|
||||
grant select, show view on mysqltest1.v2 to jamie@localhost;
|
||||
grant select on mysqltest1.t1 to karl@localhost;
|
||||
grant select on mysqltest1.t2 to karl@localhost;
|
||||
grant select, show view on mysqltest1.v1 to karl@localhost;
|
||||
grant select on mysqltest1.v2 to karl@localhost;
|
||||
grant select on mysqltest1.t1 to lena@localhost;
|
||||
grant select on mysqltest1.t2 to lena@localhost;
|
||||
grant select, show view on mysqltest1.v1 to lena@localhost;
|
||||
grant show view on mysqltest1.v2 to lena@localhost;
|
||||
grant select on mysqltest1.t1 to mhairi@localhost;
|
||||
grant select on mysqltest1.t2 to mhairi@localhost;
|
||||
grant select, show view on mysqltest1.v1 to mhairi@localhost;
|
||||
grant select, show view on mysqltest1.v2 to mhairi@localhost;
|
||||
grant select on mysqltest1.t1 to noam@localhost;
|
||||
grant select, show view on mysqltest1.v1 to noam@localhost;
|
||||
grant select, show view on mysqltest1.v2 to noam@localhost;
|
||||
grant select on mysqltest1.t2 to olga@localhost;
|
||||
grant select, show view on mysqltest1.v1 to olga@localhost;
|
||||
grant select, show view on mysqltest1.v2 to olga@localhost;
|
||||
grant select on mysqltest1.t1 to pjotr@localhost;
|
||||
grant select on mysqltest1.t2 to pjotr@localhost;
|
||||
grant select, show view on mysqltest1.v2 to pjotr@localhost;
|
||||
grant select, show view on mysqltest1.v1 to quintessa@localhost;
|
||||
... as bob
|
||||
select * from v1;
|
||||
i
|
||||
explain select * from v1;
|
||||
ERROR HY000: EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
|
||||
... as cecil
|
||||
select * from v1;
|
||||
ERROR 42000: SELECT command denied to user 'cecil'@'localhost' for table 'v1'
|
||||
explain select * from v1;
|
||||
ERROR 42000: SELECT command denied to user 'cecil'@'localhost' for table 'v1'
|
||||
... as dan
|
||||
select * from v1;
|
||||
i
|
||||
explain select * from v1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 system NULL NULL NULL NULL 0 const row not found
|
||||
... as eugene
|
||||
select * from v1;
|
||||
i
|
||||
explain select * from v1;
|
||||
ERROR HY000: EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
|
||||
... as fiona
|
||||
select * from v2;
|
||||
i j
|
||||
show create view v2;
|
||||
View Create View character_set_client collation_connection
|
||||
v2 CREATE ALGORITHM=UNDEFINED DEFINER=`alice`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS select `v1`.`i` AS `i`,`t2`.`j` AS `j` from (`v1` join `t2`) latin1 latin1_swedish_ci
|
||||
explain select * from t1;
|
||||
ERROR 42000: SELECT command denied to user 'fiona'@'localhost' for table 't1'
|
||||
explain select * from v1;
|
||||
ERROR 42000: SELECT command denied to user 'fiona'@'localhost' for table 'v1'
|
||||
explain select * from t2;
|
||||
ERROR 42000: SELECT command denied to user 'fiona'@'localhost' for table 't2'
|
||||
explain select * from v2;
|
||||
ERROR HY000: EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
|
||||
... as greg
|
||||
select * from v2;
|
||||
i j
|
||||
explain select * from v1;
|
||||
ERROR 42000: SELECT command denied to user 'greg'@'localhost' for table 'v1'
|
||||
explain select * from v2;
|
||||
ERROR HY000: EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
|
||||
... as han
|
||||
select * from t3;
|
||||
ERROR 42000: SELECT command denied to user 'han'@'localhost' for table 't3'
|
||||
explain select * from t3;
|
||||
ERROR 42000: SELECT command denied to user 'han'@'localhost' for table 't3'
|
||||
select k from t3;
|
||||
k
|
||||
explain select k from t3;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t3 system NULL NULL NULL NULL 0 const row not found
|
||||
select * from v3;
|
||||
k
|
||||
explain select * from v3;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t3 system NULL NULL NULL NULL 0 const row not found
|
||||
... as inga
|
||||
select * from v2;
|
||||
i j
|
||||
explain select * from v2;
|
||||
ERROR HY000: EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
|
||||
... as jamie
|
||||
select * from v2;
|
||||
i j
|
||||
explain select * from v2;
|
||||
ERROR HY000: EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
|
||||
... as karl
|
||||
select * from v2;
|
||||
i j
|
||||
explain select * from v2;
|
||||
ERROR HY000: EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
|
||||
... as lena
|
||||
select * from v2;
|
||||
ERROR 42000: SELECT command denied to user 'lena'@'localhost' for table 'v2'
|
||||
explain select * from v2;
|
||||
ERROR 42000: SELECT command denied to user 'lena'@'localhost' for table 'v2'
|
||||
... as mhairi
|
||||
select * from v2;
|
||||
i j
|
||||
explain select * from v2;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 system NULL NULL NULL NULL 0 const row not found
|
||||
1 SIMPLE t2 system NULL NULL NULL NULL 0 const row not found
|
||||
... as noam
|
||||
select * from v2;
|
||||
i j
|
||||
explain select * from v2;
|
||||
ERROR HY000: EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
|
||||
... as olga
|
||||
select * from v2;
|
||||
i j
|
||||
explain select * from v2;
|
||||
ERROR HY000: EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
|
||||
... as pjotr
|
||||
select * from v2;
|
||||
i j
|
||||
explain select * from v2;
|
||||
ERROR HY000: EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
|
||||
... as quintessa
|
||||
select * from v1;
|
||||
i
|
||||
explain select * from v1;
|
||||
ERROR HY000: EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
|
||||
... as root again at last: clean-up time!
|
||||
drop user alice@localhost;
|
||||
drop user bob@localhost;
|
||||
drop user cecil@localhost;
|
||||
drop user dan@localhost;
|
||||
drop user eugene@localhost;
|
||||
drop user fiona@localhost;
|
||||
drop user greg@localhost;
|
||||
drop user han@localhost;
|
||||
drop user inga@localhost;
|
||||
drop user jamie@localhost;
|
||||
drop user karl@localhost;
|
||||
drop user lena@localhost;
|
||||
drop user mhairi@localhost;
|
||||
drop user noam@localhost;
|
||||
drop user olga@localhost;
|
||||
drop user pjotr@localhost;
|
||||
drop user quintessa@localhost;
|
||||
drop database mysqltest1;
|
||||
End of 5.0 tests.
|
||||
DROP VIEW IF EXISTS v1;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
|
||||
Reference in New Issue
Block a user