mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
merging 5.0-bt to local branch with bug@47210
This commit is contained in:
@@ -10,36 +10,13 @@ insert into t1 values (1,2,"","Y","2002-03-03"), (3,4,"","N","2002-03-04"), (5,6
|
||||
select count(*) from t1 procedure analyse();
|
||||
select * from t1 procedure analyse();
|
||||
select * from t1 procedure analyse(2);
|
||||
--error ER_WRONG_USAGE
|
||||
create table t2 select * from t1 procedure analyse();
|
||||
select * from t2;
|
||||
drop table t1,t2;
|
||||
drop table t1;
|
||||
|
||||
--error ER_WRONG_USAGE
|
||||
EXPLAIN SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE();
|
||||
|
||||
#
|
||||
# Test with impossible where
|
||||
#
|
||||
create table t1 (a int not null);
|
||||
create table t2 select * from t1 where 0=1 procedure analyse();
|
||||
show create table t2;
|
||||
select * from t1 where 0=1 procedure analyse();
|
||||
insert into t1 values(1);
|
||||
drop table t2;
|
||||
create table t2 select * from t1 where 0=1 procedure analyse();
|
||||
show create table t2;
|
||||
select * from t2;
|
||||
insert into t2 select * from t1 procedure analyse();
|
||||
select * from t2;
|
||||
insert into t1 values(2);
|
||||
drop table t2;
|
||||
create table t2 select * from t1 where 0=1 procedure analyse();
|
||||
show create table t2;
|
||||
select * from t2;
|
||||
insert into t2 select * from t1 procedure analyse();
|
||||
select * from t2;
|
||||
drop table t1,t2;
|
||||
|
||||
#
|
||||
# Bug#2813 - analyse does not quote string values in enums from string
|
||||
#
|
||||
@@ -113,3 +90,46 @@ SELECT * FROM (SELECT * FROM t1) d PROCEDURE ANALYSE();
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo End of 4.1 tests
|
||||
|
||||
--echo #
|
||||
--echo # Bug #48293: crash with procedure analyse, view with > 10 columns,
|
||||
--echo # having clause...
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1(a INT, b INT, c INT, d INT, e INT,
|
||||
f INT, g INT, h INT, i INT, j INT,k INT);
|
||||
INSERT INTO t1 VALUES (),();
|
||||
|
||||
CREATE ALGORITHM=TEMPTABLE VIEW v1 AS SELECT * FROM t1;
|
||||
--echo #should have a derived table
|
||||
EXPLAIN SELECT * FROM v1;
|
||||
--echo #should not crash
|
||||
--error ER_WRONG_USAGE
|
||||
SELECT * FROM v1 PROCEDURE analyse();
|
||||
--echo #should not crash
|
||||
--error ER_WRONG_USAGE
|
||||
SELECT * FROM t1 a, v1, t1 b PROCEDURE analyse();
|
||||
--echo #should not crash
|
||||
--error ER_WRONG_USAGE
|
||||
SELECT * FROM (SELECT * FROM t1 having a > 1) x PROCEDURE analyse();
|
||||
--echo #should not crash
|
||||
--error ER_WRONG_USAGE
|
||||
SELECT * FROM t1 a, (SELECT * FROM t1 having a > 1) x, t1 b PROCEDURE analyse();
|
||||
--echo #should not crash
|
||||
--error ER_ORDER_WITH_PROC
|
||||
SELECT 1 FROM t1 group by a having a > 1 order by 1 PROCEDURE analyse();
|
||||
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1;
|
||||
|
||||
CREATE TABLE t1(a INT);
|
||||
INSERT INTO t1 VALUES (1),(2);
|
||||
|
||||
--echo # should not crash
|
||||
--error ER_WRONG_USAGE
|
||||
CREATE TABLE t2 SELECT 1 FROM t1, t1 t3 GROUP BY t3.a PROCEDURE ANALYSE();
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
|
||||
--echo End of 5.0 tests
|
||||
|
||||
2
mysql-test/t/bug41756-master.opt
Normal file
2
mysql-test/t/bug41756-master.opt
Normal file
@@ -0,0 +1,2 @@
|
||||
--innodb_lock_wait_timeout=1
|
||||
--innodb-locks-unsafe-for-binlog
|
||||
153
mysql-test/t/bug41756.test
Normal file
153
mysql-test/t/bug41756.test
Normal file
@@ -0,0 +1,153 @@
|
||||
--source include/have_innodb.inc
|
||||
--echo #
|
||||
--echo # Bug#41756 Strange error messages about locks from InnoDB
|
||||
--echo #
|
||||
--disable_warnings
|
||||
drop table if exists t1;
|
||||
--enable_warnings
|
||||
--echo # In the default transaction isolation mode, and/or with
|
||||
--echo # innodb_locks_unsafe_for_binlog=OFF, handler::unlock_row()
|
||||
--echo # in InnoDB does nothing.
|
||||
--echo # Thus in order to reproduce the condition that led to the
|
||||
--echo # warning, one needs to relax isolation by either
|
||||
--echo # setting a weaker tx_isolation value, or by turning on
|
||||
--echo # the unsafe replication switch.
|
||||
--echo # For testing purposes, choose to tweak the isolation level,
|
||||
--echo # since it's settable at runtime, unlike
|
||||
--echo # innodb_locks_unsafe_for_binlog, which is
|
||||
--echo # only a command-line switch.
|
||||
--echo #
|
||||
set @@session.tx_isolation="read-committed";
|
||||
|
||||
--echo # Prepare data. We need a table with a unique index,
|
||||
--echo # for join_read_key to be used. The other column
|
||||
--echo # allows to control what passes WHERE clause filter.
|
||||
create table t1 (a int primary key, b int) engine=innodb;
|
||||
--echo # Let's make sure t1 has sufficient amount of rows
|
||||
--echo # to exclude JT_ALL access method when reading it,
|
||||
--echo # i.e. make sure that JT_EQ_REF(a) is always preferred.
|
||||
insert into t1 values (1,1), (2,null), (3,1), (4,1),
|
||||
(5,1), (6,1), (7,1), (8,1), (9,1), (10,1),
|
||||
(11,1), (12,1);
|
||||
--echo #
|
||||
--echo # Demonstrate that for the SELECT statement
|
||||
--echo # used later in the test JT_EQ_REF access method is used.
|
||||
--echo #
|
||||
--vertical_results
|
||||
explain
|
||||
select 1 from t1 natural join (select 2 as a, 1 as b union all
|
||||
select 2 as a, 2 as b) as t2 for update;
|
||||
--horizontal_results
|
||||
--echo #
|
||||
--echo # Demonstrate that the reported SELECT statement
|
||||
--echo # no longer produces warnings.
|
||||
--echo #
|
||||
select 1 from t1 natural join (select 2 as a, 1 as b union all
|
||||
select 2 as a, 2 as b) as t2 for update;
|
||||
commit;
|
||||
--echo #
|
||||
--echo # Demonstrate that due to lack of inter-sweep "reset" function,
|
||||
--echo # we keep some non-matching records locked, even though we know
|
||||
--echo # we could unlock them.
|
||||
--echo # To do that, show that if there is only one distinct value
|
||||
--echo # for a in t2 (a=2), we will keep record (2,null) in t1 locked.
|
||||
--echo # But if we add another value for "a" to t2, say 6,
|
||||
--echo # join_read_key cache will be pruned at least once,
|
||||
--echo # and thus record (2, null) in t1 will get unlocked.
|
||||
--echo #
|
||||
begin;
|
||||
select 1 from t1 natural join (select 2 as a, 1 as b union all
|
||||
select 2 as a, 2 as b) as t2 for update;
|
||||
connect (con1,localhost,root,,);
|
||||
--echo #
|
||||
--echo # Switching to connection con1
|
||||
connection con1;
|
||||
--echo # We should be able to delete all records from t1 except (2, null),
|
||||
--echo # since they were not locked.
|
||||
begin;
|
||||
delete from t1 where a in (1,3,4);
|
||||
delete from t1 where a in (5,6,7);
|
||||
delete from t1 where a in (8,9,10);
|
||||
delete from t1 where a in (11,12);
|
||||
--echo #
|
||||
--echo # Record (2, null) is locked. This is actually unnecessary,
|
||||
--echo # because the previous select returned no rows.
|
||||
--echo # Just demonstrate the effect.
|
||||
--echo #
|
||||
--error ER_LOCK_WAIT_TIMEOUT
|
||||
delete from t1;
|
||||
rollback;
|
||||
--echo #
|
||||
--echo # Switching to connection default
|
||||
connection default;
|
||||
--echo #
|
||||
--echo # Show that the original contents of t1 is intact:
|
||||
select * from t1;
|
||||
commit;
|
||||
--echo #
|
||||
--echo # Have a one more record in t2 to show that
|
||||
--echo # if join_read_key cache is purned, the current
|
||||
--echo # row under the cursor is unlocked (provided, this row didn't
|
||||
--echo # match the partial WHERE clause, of course).
|
||||
--echo # Sic: the result of this test dependent on the order of retrieval
|
||||
--echo # of records --echo # from the derived table, if !
|
||||
--echo # We use DELETE to disable the JOIN CACHE. This DELETE modifies no
|
||||
--echo # records. It also should leave no InnoDB row locks.
|
||||
--echo #
|
||||
begin;
|
||||
delete t1.* from t1 natural join (select 2 as a, 2 as b union all
|
||||
select 0 as a, 0 as b) as t2;
|
||||
--echo # Demonstrate that nothing was deleted form t1
|
||||
select * from t1;
|
||||
--echo #
|
||||
--echo # Switching to connection con1
|
||||
connection con1;
|
||||
begin;
|
||||
--echo # Since there is another distinct record in the derived table
|
||||
--echo # the previous matching record in t1 -- (2,null) -- was unlocked.
|
||||
delete from t1;
|
||||
--echo # We will need the contents of the table again.
|
||||
rollback;
|
||||
select * from t1;
|
||||
commit;
|
||||
--echo #
|
||||
--echo # Switching to connection default
|
||||
connection default;
|
||||
commit;
|
||||
begin;
|
||||
--echo #
|
||||
--echo # Before this patch, we could wrongly unlock a record
|
||||
--echo # that was cached and later used in a join. Demonstrate that
|
||||
--echo # this is no longer the case.
|
||||
--echo # Sic: this test is also order-dependent (i.e. the
|
||||
--echo # the bug would show up only if the first record in the union
|
||||
--echo # is retreived and processed first.
|
||||
--echo #
|
||||
--echo # Verify that JT_EQ_REF is used.
|
||||
--vertical_results
|
||||
explain
|
||||
select 1 from t1 natural join (select 3 as a, 3 as b union all
|
||||
select 3 as a, 1 as b) as t2 for update;
|
||||
--horizontal_results
|
||||
--echo # Lock the record.
|
||||
select 1 from t1 natural join (select 3 as a, 3 as b union all
|
||||
select 3 as a, 2 as b) as t2 for update;
|
||||
--echo # Switching to connection con1
|
||||
connection con1;
|
||||
--echo #
|
||||
--echo # We should not be able to delete record (3,1) from t1,
|
||||
--echo # (previously it was possible).
|
||||
--echo #
|
||||
--error ER_LOCK_WAIT_TIMEOUT
|
||||
delete from t1 where a=3;
|
||||
--echo # Switching to connection default
|
||||
connection default;
|
||||
commit;
|
||||
|
||||
disconnect con1;
|
||||
set @@session.tx_isolation=default;
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # End of 5.0 tests
|
||||
--echo #
|
||||
@@ -14,6 +14,17 @@ create temporary table shortn1 (a int);
|
||||
create temporary table `table:name` (a int);
|
||||
create temporary table shortn2 (a int);
|
||||
select get_lock("a",10);
|
||||
|
||||
#
|
||||
# BUG48216 Replication fails on all slaves after upgrade to 5.0.86 on master
|
||||
#
|
||||
# When the session is closed, any temporary tables of the session are dropped
|
||||
# and are binlogged. But it will be binlogged with a wrong database name when
|
||||
# the length of the database name('drop-temp-table-test') is greater than the
|
||||
# current database name('test').
|
||||
#
|
||||
USE test;
|
||||
|
||||
disconnect con1;
|
||||
|
||||
connection con2;
|
||||
|
||||
@@ -50,7 +50,7 @@ connection con1;
|
||||
# debug build running without our --debug=make_global..., will be
|
||||
# error 0 (no error). The only important thing to test is that on
|
||||
# debug builds with our --debug=make_global... we don't hang forever.
|
||||
--error 0,1053,2013
|
||||
--error 0,1317,2013
|
||||
reap;
|
||||
|
||||
connection con2;
|
||||
|
||||
@@ -455,3 +455,20 @@ EXECUTE s;
|
||||
DEALLOCATE PREPARE s;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug #49250 : spatial btree index corruption and crash
|
||||
--echo # Part two : fulltext syntax check
|
||||
--echo #
|
||||
|
||||
--error ER_PARSE_ERROR
|
||||
CREATE TABLE t1(col1 TEXT,
|
||||
FULLTEXT INDEX USING BTREE (col1));
|
||||
CREATE TABLE t2(col1 TEXT);
|
||||
--error ER_PARSE_ERROR
|
||||
CREATE FULLTEXT INDEX USING BTREE ON t2(col);
|
||||
--error ER_PARSE_ERROR
|
||||
ALTER TABLE t2 ADD FULLTEXT INDEX USING BTREE (col1);
|
||||
|
||||
DROP TABLE t2;
|
||||
|
||||
--echo End of 5.0 tests
|
||||
|
||||
@@ -881,4 +881,25 @@ SELECT COUNT(*) FROM t1 IGNORE INDEX (b) WHERE
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Bug #48258: Assertion failed when using a spatial index
|
||||
--echo #
|
||||
CREATE TABLE t1(a LINESTRING NOT NULL, SPATIAL KEY(a));
|
||||
INSERT INTO t1 VALUES
|
||||
(GEOMFROMTEXT('LINESTRING(-1 -1, 1 -1, -1 -1, -1 1, 1 1)')),
|
||||
(GEOMFROMTEXT('LINESTRING(-1 -1, 1 -1, -1 -1, -1 1, 1 1)'));
|
||||
EXPLAIN SELECT 1 FROM t1 WHERE a = GEOMFROMTEXT('LINESTRING(-1 -1, 1 -1, -1 -1, -1 1, 1 1)');
|
||||
SELECT 1 FROM t1 WHERE a = GEOMFROMTEXT('LINESTRING(-1 -1, 1 -1, -1 -1, -1 1, 1 1)');
|
||||
EXPLAIN SELECT 1 FROM t1 WHERE a < GEOMFROMTEXT('LINESTRING(-1 -1, 1 -1, -1 -1, -1 1, 1 1)');
|
||||
SELECT 1 FROM t1 WHERE a < GEOMFROMTEXT('LINESTRING(-1 -1, 1 -1, -1 -1, -1 1, 1 1)');
|
||||
EXPLAIN SELECT 1 FROM t1 WHERE a <= GEOMFROMTEXT('LINESTRING(-1 -1, 1 -1, -1 -1, -1 1, 1 1)');
|
||||
SELECT 1 FROM t1 WHERE a <= GEOMFROMTEXT('LINESTRING(-1 -1, 1 -1, -1 -1, -1 1, 1 1)');
|
||||
EXPLAIN SELECT 1 FROM t1 WHERE a > GEOMFROMTEXT('LINESTRING(-1 -1, 1 -1, -1 -1, -1 1, 1 1)');
|
||||
SELECT 1 FROM t1 WHERE a > GEOMFROMTEXT('LINESTRING(-1 -1, 1 -1, -1 -1, -1 1, 1 1)');
|
||||
EXPLAIN SELECT 1 FROM t1 WHERE a >= GEOMFROMTEXT('LINESTRING(-1 -1, 1 -1, -1 -1, -1 1, 1 1)');
|
||||
SELECT 1 FROM t1 WHERE a >= GEOMFROMTEXT('LINESTRING(-1 -1, 1 -1, -1 -1, -1 1, 1 1)');
|
||||
DROP TABLE t1;
|
||||
|
||||
|
||||
--echo End of 5.0 tests.
|
||||
|
||||
@@ -654,4 +654,35 @@ insert into t1 values (),(),();
|
||||
select min(`col002`) from t1 union select `col002` from t1;
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug #47780: crash when comparing GIS items from subquery
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1(a INT, b MULTIPOLYGON);
|
||||
INSERT INTO t1 VALUES
|
||||
(0,
|
||||
GEOMFROMTEXT(
|
||||
'multipolygon(((1 2,3 4,5 6,7 8,9 8),(7 6,5 4,3 2,1 2,3 4)))'));
|
||||
|
||||
--echo # must not crash
|
||||
SELECT 1 FROM t1 WHERE a <> (SELECT GEOMETRYCOLLECTIONFROMWKB(b) FROM t1);
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug #49250 : spatial btree index corruption and crash
|
||||
--echo # Part one : spatial syntax check
|
||||
--echo #
|
||||
|
||||
--error ER_PARSE_ERROR
|
||||
CREATE TABLE t1(col1 MULTIPOLYGON NOT NULL,
|
||||
SPATIAL INDEX USING BTREE (col1));
|
||||
CREATE TABLE t2(col1 MULTIPOLYGON NOT NULL);
|
||||
--error ER_PARSE_ERROR
|
||||
CREATE SPATIAL INDEX USING BTREE ON t2(col);
|
||||
--error ER_PARSE_ERROR
|
||||
ALTER TABLE t2 ADD SPATIAL INDEX USING BTREE (col1);
|
||||
|
||||
DROP TABLE t2;
|
||||
|
||||
--echo End of 5.0 tests
|
||||
|
||||
@@ -163,6 +163,41 @@ connection default;
|
||||
DROP USER 'mysqltest1'@'%';
|
||||
DROP DATABASE mysqltest_1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug#41597 - After rename of user, there are additional grants
|
||||
--echo # when grants are reapplied.
|
||||
--echo #
|
||||
|
||||
CREATE DATABASE temp;
|
||||
CREATE TABLE temp.t1(a INT, b VARCHAR(10));
|
||||
INSERT INTO temp.t1 VALUES(1, 'name1');
|
||||
INSERT INTO temp.t1 VALUES(2, 'name2');
|
||||
INSERT INTO temp.t1 VALUES(3, 'name3');
|
||||
|
||||
|
||||
CREATE USER 'user1'@'%';
|
||||
RENAME USER 'user1'@'%' TO 'user2'@'%';
|
||||
--echo # Show privileges after rename and BEFORE grant
|
||||
SHOW GRANTS FOR 'user2'@'%';
|
||||
GRANT SELECT (a), INSERT (b) ON `temp`.`t1` TO 'user2'@'%';
|
||||
--echo # Show privileges after rename and grant
|
||||
SHOW GRANTS FOR 'user2'@'%';
|
||||
|
||||
--echo # Connect as the renamed user
|
||||
connect (conn1, localhost, user2,,);
|
||||
connection conn1;
|
||||
SHOW GRANTS;
|
||||
SELECT a FROM temp.t1;
|
||||
--echo # Check for additional privileges by accessing a
|
||||
--echo # non privileged column. We shouldn't be able to
|
||||
--echo # access this column.
|
||||
--error ER_COLUMNACCESS_DENIED_ERROR
|
||||
SELECT b FROM temp.t1;
|
||||
disconnect conn1;
|
||||
|
||||
connection default;
|
||||
DROP USER 'user2'@'%';
|
||||
DROP DATABASE temp;
|
||||
|
||||
--echo End of 5.0 tests
|
||||
|
||||
|
||||
30
mysql-test/t/grant_lowercase_fs.test
Normal file
30
mysql-test/t/grant_lowercase_fs.test
Normal file
@@ -0,0 +1,30 @@
|
||||
-- source include/have_case_insensitive_fs.inc
|
||||
-- source include/not_embedded.inc
|
||||
|
||||
|
||||
#
|
||||
# Bug#41049 does syntax "grant" case insensitive?
|
||||
#
|
||||
create database db1;
|
||||
GRANT CREATE ON db1.* to user_1@localhost;
|
||||
GRANT SELECT ON db1.* to USER_1@localhost;
|
||||
|
||||
connect (con1,localhost,user_1,,db1);
|
||||
CREATE TABLE t1(f1 int);
|
||||
--error 1142
|
||||
SELECT * FROM t1;
|
||||
connect (con2,localhost,USER_1,,db1);
|
||||
SELECT * FROM t1;
|
||||
--error 1142
|
||||
CREATE TABLE t2(f1 int);
|
||||
|
||||
connection default;
|
||||
disconnect con1;
|
||||
disconnect con2;
|
||||
|
||||
REVOKE ALL PRIVILEGES, GRANT OPTION FROM user_1@localhost;
|
||||
REVOKE ALL PRIVILEGES, GRANT OPTION FROM USER_1@localhost;
|
||||
DROP USER user_1@localhost;
|
||||
DROP USER USER_1@localhost;
|
||||
DROP DATABASE db1;
|
||||
use test;
|
||||
@@ -991,5 +991,17 @@ SELECT a, MAX(b) FROM t WHERE b > 0 AND b < 2 GROUP BY a;
|
||||
|
||||
DROP TABLE t;
|
||||
|
||||
--echo #
|
||||
--echo # Bug #48472: Loose index scan inappropriately chosen for some WHERE
|
||||
--echo # conditions
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t (a INT, b INT, INDEX (a,b));
|
||||
INSERT INTO t VALUES (2,0), (2,0), (2,1), (2,1);
|
||||
INSERT INTO t SELECT * FROM t;
|
||||
|
||||
SELECT a, MAX(b) FROM t WHERE 0=b+0 GROUP BY a;
|
||||
|
||||
DROP TABLE t;
|
||||
|
||||
--echo End of 5.0 tests
|
||||
|
||||
34
mysql-test/t/innodb_bug46000.test
Normal file
34
mysql-test/t/innodb_bug46000.test
Normal file
@@ -0,0 +1,34 @@
|
||||
# This is the test for bug 46000. We shall
|
||||
# block any index creation with the name of
|
||||
# "GEN_CLUST_INDEX", which is the reserved
|
||||
# name for innodb default primary index.
|
||||
|
||||
--source include/have_innodb.inc
|
||||
|
||||
# This 'create table' operation should fail because of
|
||||
# using the reserve name as its index name.
|
||||
--replace_regex /'[^']*test\///
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
create table bug46000(`id` int,key `GEN_CLUST_INDEX`(`id`))engine=innodb;
|
||||
|
||||
--replace_regex /'[^']*test\///
|
||||
show warnings;
|
||||
|
||||
# Mixed upper/lower case of the reserved key words
|
||||
--replace_regex /'[^']*test\///
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
create table bug46000(`id` int, key `GEN_clust_INDEX`(`id`))engine=innodb;
|
||||
|
||||
create table bug46000(id int) engine=innodb;
|
||||
|
||||
# This 'create index' operation should fail.
|
||||
--replace_regex /'[^']*test\/#sql-[0-9a-f_]*.frm/#sql-temporary/
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
create index GEN_CLUST_INDEX on bug46000(id);
|
||||
|
||||
# This 'create index' operation should succeed, no
|
||||
# temp table left from last failed create index
|
||||
# operation.
|
||||
create index idx on bug46000(id);
|
||||
|
||||
drop table bug46000;
|
||||
24
mysql-test/t/innodb_bug47777.test
Normal file
24
mysql-test/t/innodb_bug47777.test
Normal file
@@ -0,0 +1,24 @@
|
||||
# This is the test for bug 47777. GEOMETRY
|
||||
# data is treated as BLOB data in innodb.
|
||||
# Consequently, its key value generation/storing
|
||||
# should follow the process for the BLOB
|
||||
# datatype as well.
|
||||
|
||||
--source include/have_innodb.inc
|
||||
|
||||
create table bug47777(c2 linestring not null, primary key (c2(1))) engine=innodb;
|
||||
|
||||
insert into bug47777 values (geomfromtext('linestring(1 2,3 4,5 6,7 8,9 10)'));
|
||||
|
||||
# Verify correct row get inserted.
|
||||
select count(*) from bug47777 where c2 =geomfromtext('linestring(1 2,3 4,5 6,7 8,9 10)');
|
||||
|
||||
# Update table bug47777 should be successful.
|
||||
update bug47777 set c2=GeomFromText('POINT(1 1)');
|
||||
|
||||
# Verify the row get updated successfully. The original
|
||||
# c2 value should be changed to GeomFromText('POINT(1 1)').
|
||||
select count(*) from bug47777 where c2 =geomfromtext('linestring(1 2,3 4,5 6,7 8,9 10)');
|
||||
select count(*) from bug47777 where c2 = GeomFromText('POINT(1 1)');
|
||||
|
||||
drop table bug47777;
|
||||
@@ -660,5 +660,57 @@ explain select * from t1, t2, t3 where t3.a=t1.a and t2.a=t1.b;
|
||||
show status like 'Handler_read%';
|
||||
drop table t1, t2, t3;
|
||||
|
||||
--echo #
|
||||
--echo # Bug #42116: Mysql crash on specific query
|
||||
--echo #
|
||||
CREATE TABLE t1 (a INT);
|
||||
CREATE TABLE t2 (a INT);
|
||||
CREATE TABLE t3 (a INT, INDEX (a));
|
||||
CREATE TABLE t4 (a INT);
|
||||
CREATE TABLE t5 (a INT);
|
||||
CREATE TABLE t6 (a INT);
|
||||
|
||||
INSERT INTO t1 VALUES (1), (1), (1);
|
||||
|
||||
INSERT INTO t2 VALUES
|
||||
(2), (2), (2), (2), (2), (2), (2), (2), (2), (2);
|
||||
|
||||
INSERT INTO t3 VALUES
|
||||
(3), (3), (3), (3), (3), (3), (3), (3), (3), (3);
|
||||
|
||||
EXPLAIN
|
||||
SELECT *
|
||||
FROM
|
||||
t1 JOIN t2 ON t1.a = t2.a
|
||||
LEFT JOIN
|
||||
(
|
||||
(
|
||||
t3 LEFT JOIN t4 ON t3.a = t4.a
|
||||
)
|
||||
LEFT JOIN
|
||||
(
|
||||
t5 LEFT JOIN t6 ON t5.a = t6.a
|
||||
)
|
||||
ON t4.a = t5.a
|
||||
)
|
||||
ON t1.a = t3.a;
|
||||
|
||||
SELECT *
|
||||
FROM
|
||||
t1 JOIN t2 ON t1.a = t2.a
|
||||
LEFT JOIN
|
||||
(
|
||||
(
|
||||
t3 LEFT JOIN t4 ON t3.a = t4.a
|
||||
)
|
||||
LEFT JOIN
|
||||
(
|
||||
t5 LEFT JOIN t6 ON t5.a = t6.a
|
||||
)
|
||||
ON t4.a = t5.a
|
||||
)
|
||||
ON t1.a = t3.a;
|
||||
|
||||
DROP TABLE t1,t2,t3,t4,t5,t6;
|
||||
|
||||
--echo End of 5.0 tests.
|
||||
|
||||
@@ -92,7 +92,7 @@ select ((@id := kill_id) - kill_id) from t3;
|
||||
kill @id;
|
||||
|
||||
connection conn1;
|
||||
-- error 1053,2013
|
||||
-- error 1317,2013
|
||||
reap;
|
||||
|
||||
connection default;
|
||||
|
||||
@@ -27,3 +27,65 @@ disconnect master;
|
||||
connection default;
|
||||
|
||||
# End of 4.1 tests
|
||||
|
||||
#
|
||||
# Bug#41049 does syntax "grant" case insensitive?
|
||||
#
|
||||
CREATE DATABASE d1;
|
||||
USE d1;
|
||||
CREATE TABLE T1(f1 INT);
|
||||
CREATE TABLE t1(f1 INT);
|
||||
GRANT SELECT ON T1 to user_1@localhost;
|
||||
|
||||
connect (con1,localhost,user_1,,d1);
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
select * from t1;
|
||||
select * from T1;
|
||||
connection default;
|
||||
GRANT SELECT ON t1 to user_1@localhost;
|
||||
connection con1;
|
||||
select * from information_schema.table_privileges;
|
||||
connection default;
|
||||
disconnect con1;
|
||||
|
||||
REVOKE ALL PRIVILEGES, GRANT OPTION FROM user_1@localhost;
|
||||
DROP USER user_1@localhost;
|
||||
DROP DATABASE d1;
|
||||
USE test;
|
||||
|
||||
CREATE DATABASE db1;
|
||||
USE db1;
|
||||
CREATE PROCEDURE p1() BEGIN END;
|
||||
CREATE FUNCTION f1(i INT) RETURNS INT RETURN i+1;
|
||||
|
||||
GRANT USAGE ON db1.* to user_1@localhost;
|
||||
GRANT EXECUTE ON PROCEDURE db1.P1 to user_1@localhost;
|
||||
GRANT EXECUTE ON FUNCTION db1.f1 to user_1@localhost;
|
||||
GRANT UPDATE ON db1.* to USER_1@localhost;
|
||||
|
||||
connect (con1,localhost,user_1,,db1);
|
||||
call p1();
|
||||
call P1();
|
||||
select f1(1);
|
||||
connect (con2,localhost,USER_1,,db1);
|
||||
--error ER_PROCACCESS_DENIED_ERROR
|
||||
call p1();
|
||||
--error ER_PROCACCESS_DENIED_ERROR
|
||||
call P1();
|
||||
--error ER_PROCACCESS_DENIED_ERROR
|
||||
select f1(1);
|
||||
|
||||
connection default;
|
||||
disconnect con1;
|
||||
disconnect con2;
|
||||
|
||||
REVOKE ALL PRIVILEGES, GRANT OPTION FROM user_1@localhost;
|
||||
REVOKE ALL PRIVILEGES, GRANT OPTION FROM USER_1@localhost;
|
||||
DROP FUNCTION f1;
|
||||
DROP PROCEDURE p1;
|
||||
DROP USER user_1@localhost;
|
||||
DROP USER USER_1@localhost;
|
||||
DROP DATABASE db1;
|
||||
use test;
|
||||
|
||||
# End of 5.0 tests
|
||||
|
||||
@@ -356,4 +356,14 @@ remove_file $MYSQLTEST_VARDIR/tmp/bug31060.sql;
|
||||
--exec $MYSQL --default-character-set=binary test -e "CONNECT test invalid_hostname" 2>&1
|
||||
--exec $MYSQL --default-character-set=binary test -e "DELIMITER //" 2>&1
|
||||
|
||||
#
|
||||
# Bug #27884: mysql --html does not quote HTML special characters in output
|
||||
#
|
||||
--write_file $MYSQLTEST_VARDIR/tmp/bug27884.sql
|
||||
SELECT '< & >' AS `<`;
|
||||
EOF
|
||||
--exec $MYSQL --html test < $MYSQLTEST_VARDIR/tmp/bug27884.sql
|
||||
--echo
|
||||
remove_file $MYSQLTEST_VARDIR/tmp/bug27884.sql;
|
||||
|
||||
--echo End of 5.0 tests
|
||||
|
||||
@@ -375,4 +375,32 @@ INSERT INTO t1 VALUES(0);
|
||||
SELECT 1 FROM t1 GROUP BY (DATE(NULL)) WITH ROLLUP;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug #48131: crash group by with rollup, distinct,
|
||||
--echo # filesort, with temporary tables
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY);
|
||||
INSERT INTO t1 VALUES (1), (2);
|
||||
CREATE TABLE t2 (b INT);
|
||||
INSERT INTO t2 VALUES (100);
|
||||
|
||||
SELECT a, b FROM t1, t2 GROUP BY a, b WITH ROLLUP;
|
||||
SELECT DISTINCT b FROM t1, t2 GROUP BY a, b WITH ROLLUP;
|
||||
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
--echo #
|
||||
--echo # Bug #48475: DISTINCT is ignored with GROUP BY WITH ROLLUP
|
||||
--echo # and only const tables
|
||||
|
||||
CREATE TABLE t1 (a INT);
|
||||
CREATE TABLE t2 (b INT);
|
||||
INSERT INTO t1 VALUES (1);
|
||||
INSERT INTO t2 VALUES (1);
|
||||
|
||||
SELECT DISTINCT b FROM t1, t2 GROUP BY a, b WITH ROLLUP;
|
||||
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
--echo End of 5.0 tests
|
||||
|
||||
@@ -756,3 +756,38 @@ SELECT
|
||||
FROM t3;
|
||||
|
||||
DROP TABLE t1, t2, t3;
|
||||
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Bug #42760: Select doesn't return desired results when we have null
|
||||
--echo # values
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (
|
||||
a INT,
|
||||
c INT,
|
||||
UNIQUE KEY a_c (a,c),
|
||||
KEY (a));
|
||||
|
||||
INSERT INTO t1 VALUES (1, 10), (2, NULL);
|
||||
|
||||
--echo # Must use ref-or-null on the a_c index
|
||||
EXPLAIN
|
||||
SELECT 1 AS col FROM t1 WHERE a=2 AND (c=10 OR c IS NULL) ORDER BY c;
|
||||
--echo # Must return 1 row
|
||||
SELECT 1 AS col FROM t1 WHERE a=2 AND (c=10 OR c IS NULL) ORDER BY c;
|
||||
|
||||
# part 2 of the problem : DESC test cases
|
||||
--echo # Must use ref-or-null on the a_c index
|
||||
--replace_column 1 x 2 x 3 x 6 x 7 x 8 x 9 x 10 x
|
||||
EXPLAIN
|
||||
SELECT 1 AS col FROM t1 WHERE a=2 AND (c=10 OR c IS NULL) ORDER BY c DESC;
|
||||
--echo # Must return 1 row
|
||||
SELECT 1 AS col FROM t1 WHERE a=2 AND (c=10 OR c IS NULL) ORDER BY c DESC;
|
||||
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
|
||||
--echo End of 5.0 tests
|
||||
|
||||
@@ -1973,4 +1973,27 @@ select @arg;
|
||||
execute stmt using @arg;
|
||||
deallocate prepare stmt;
|
||||
|
||||
--echo #
|
||||
--echo # Bug#48508: Crash on prepared statement re-execution.
|
||||
--echo #
|
||||
create table t1(b int);
|
||||
insert into t1 values (0);
|
||||
create view v1 AS select 1 as a from t1 where b;
|
||||
prepare stmt from "select * from v1 where a";
|
||||
execute stmt;
|
||||
execute stmt;
|
||||
deallocate prepare stmt;
|
||||
drop table t1;
|
||||
drop view v1;
|
||||
|
||||
create table t1(a bigint);
|
||||
create table t2(b tinyint);
|
||||
insert into t2 values (null);
|
||||
prepare stmt from "select 1 from t1 join t2 on a xor b where b > 1 and a =1";
|
||||
execute stmt;
|
||||
execute stmt;
|
||||
deallocate prepare stmt;
|
||||
drop table t1,t2;
|
||||
--echo #
|
||||
|
||||
--echo End of 5.0 tests.
|
||||
|
||||
@@ -92,7 +92,7 @@ kill @id;
|
||||
# We don't drop t3 as this is a temporary table
|
||||
drop table t2;
|
||||
connection master;
|
||||
--error 1053,2013
|
||||
--error 1317,2013
|
||||
reap;
|
||||
connection slave;
|
||||
# The SQL slave thread should now have stopped because the query was killed on
|
||||
|
||||
@@ -45,7 +45,7 @@ select (@id := id) - id from t3;
|
||||
kill @id;
|
||||
drop table t2,t3;
|
||||
connection master;
|
||||
--error 0,1053,2013
|
||||
--error 0,1317,2013
|
||||
reap;
|
||||
connection master1;
|
||||
--replace_column 2 # 5 #
|
||||
|
||||
@@ -123,7 +123,7 @@ source include/kill_query_and_diff_master_slave.inc;
|
||||
send DROP DATABASE d1;
|
||||
source include/kill_query_and_diff_master_slave.inc;
|
||||
|
||||
send DROP DATABASE d2;
|
||||
send DROP DATABASE IF EXISTS d2;
|
||||
source include/kill_query_and_diff_master_slave.inc;
|
||||
|
||||
######## FUNCTION ########
|
||||
@@ -139,13 +139,21 @@ source include/kill_query_and_diff_master_slave.inc;
|
||||
|
||||
# function f1 probably does not exist because the ALTER query was
|
||||
# killed
|
||||
send DROP FUNCTION IF EXISTS f1;
|
||||
send DROP FUNCTION f1;
|
||||
source include/kill_query_and_diff_master_slave.inc;
|
||||
|
||||
# function f2 probably does not exist because the CREATE query was
|
||||
# killed
|
||||
send DROP FUNCTION IF EXISTS f2;
|
||||
source include/kill_query_and_diff_master_slave.inc;
|
||||
#
|
||||
# Temporarily disabled. Because of BUG#43353, KILL the query may
|
||||
# result in function not found, and for 5.1, DROP statements will be
|
||||
# logged if the function is not found on master, so the following DROP
|
||||
# FUNCTION statement may be interrupted and not drop the function on
|
||||
# master, but still get logged and executed on slave and cause
|
||||
# inconsistence. Also disable the following DROP PROCEDURE IF EXITS
|
||||
# below.
|
||||
#send DROP FUNCTION IF EXISTS f2;
|
||||
#source include/kill_query_and_diff_master_slave.inc;
|
||||
|
||||
######## PROCEDURE ########
|
||||
|
||||
@@ -163,11 +171,12 @@ source include/kill_query_and_diff_master_slave.inc;
|
||||
send ALTER PROCEDURE p1 SQL SECURITY INVOKER COMMENT 'return rows of table t1';
|
||||
source include/kill_query_and_diff_master_slave.inc;
|
||||
|
||||
send DROP PROCEDURE IF EXISTS p1;
|
||||
send DROP PROCEDURE p1;
|
||||
source include/kill_query_and_diff_master_slave.inc;
|
||||
|
||||
send DROP PROCEDURE IF EXISTS p2;
|
||||
source include/kill_query_and_diff_master_slave.inc;
|
||||
# Temporarily disabled because of bug#43353, see comment above for DROP FUNCTION IF EXISTS
|
||||
#send DROP PROCEDURE IF EXISTS p2;
|
||||
#source include/kill_query_and_diff_master_slave.inc;
|
||||
|
||||
######## TABLE ########
|
||||
|
||||
@@ -194,6 +203,11 @@ source include/kill_query_and_diff_master_slave.inc;
|
||||
|
||||
######## TRIGGER ########
|
||||
|
||||
# Make sure table t4 exists
|
||||
connection master;
|
||||
CREATE TABLE IF NOT EXISTS t4 (a int);
|
||||
connection master1;
|
||||
|
||||
let $diff_statement= SHOW TRIGGERS LIKE 'v%';
|
||||
|
||||
DELIMITER //;
|
||||
|
||||
@@ -3750,5 +3750,100 @@ EXPLAIN EXTENDED SELECT a, b FROM t1 WHERE a > 1 AND a = b LIMIT 2;
|
||||
EXPLAIN EXTENDED SELECT a, b FROM t1 WHERE a > 1 AND b = a LIMIT 2;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Bug#47019: Assertion failed: 0, file .\rt_mbr.c, line 138 when
|
||||
--echo # forcing a spatial index
|
||||
--echo #
|
||||
CREATE TABLE t1(a LINESTRING NOT NULL, SPATIAL KEY(a));
|
||||
INSERT INTO t1 VALUES
|
||||
(GEOMFROMTEXT('LINESTRING(-1 -1, 1 -1, -1 -1, -1 1, 1 1)')),
|
||||
(GEOMFROMTEXT('LINESTRING(-1 -1, 1 -1, -1 -1, -1 1, 1 1)'));
|
||||
EXPLAIN SELECT 1 FROM t1 NATURAL LEFT JOIN t1 AS t2;
|
||||
SELECT 1 FROM t1 NATURAL LEFT JOIN t1 AS t2;
|
||||
EXPLAIN SELECT 1 FROM t1 NATURAL LEFT JOIN t1 AS t2 FORCE INDEX(a);
|
||||
SELECT 1 FROM t1 NATURAL LEFT JOIN t1 AS t2 FORCE INDEX(a);
|
||||
DROP TABLE t1;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Bug #48291 : crash with row() operator,select into @var, and
|
||||
--echo # subquery returning multiple rows
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1(a INT);
|
||||
INSERT INTO t1 VALUES (2),(3);
|
||||
|
||||
--echo # Should not crash
|
||||
--error ER_SUBQUERY_NO_1_ROW
|
||||
SELECT 1 FROM t1 WHERE a <> 1 AND NOT
|
||||
ROW(a,a) <=> ROW((SELECT 1 FROM t1 WHERE 1=2),(SELECT 1 FROM t1))
|
||||
INTO @var0;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug #48458: simple query tries to allocate enormous amount of
|
||||
--echo # memory
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1(a INT NOT NULL, b YEAR);
|
||||
INSERT INTO t1 VALUES ();
|
||||
CREATE TABLE t2(c INT);
|
||||
--echo # Should not err out because of out-of-memory
|
||||
SELECT 1 FROM t2 JOIN t1 ON 1=1
|
||||
WHERE a != '1' AND NOT a >= b OR NOT ROW(b,a )<> ROW(a,a);
|
||||
DROP TABLE t1,t2;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Bug #49199: Optimizer handles incorrectly:
|
||||
--echo # field='const1' AND field='const2' in some cases
|
||||
--echo
|
||||
CREATE TABLE t1(a DATETIME NOT NULL);
|
||||
INSERT INTO t1 VALUES('2001-01-01');
|
||||
SELECT * FROM t1 WHERE a='2001-01-01' AND a='2001-01-01 00:00:00';
|
||||
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='2001-01-01' AND a='2001-01-01 00:00:00';
|
||||
DROP TABLE t1;
|
||||
|
||||
CREATE TABLE t1(a DATE NOT NULL);
|
||||
INSERT INTO t1 VALUES('2001-01-01');
|
||||
SELECT * FROM t1 WHERE a='2001-01-01' AND a='2001-01-01 00:00:00';
|
||||
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='2001-01-01' AND a='2001-01-01 00:00:00';
|
||||
DROP TABLE t1;
|
||||
|
||||
CREATE TABLE t1(a TIMESTAMP NOT NULL);
|
||||
INSERT INTO t1 VALUES('2001-01-01');
|
||||
SELECT * FROM t1 WHERE a='2001-01-01' AND a='2001-01-01 00:00:00';
|
||||
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='2001-01-01' AND a='2001-01-01 00:00:00';
|
||||
DROP TABLE t1;
|
||||
|
||||
CREATE TABLE t1(a DATETIME NOT NULL, b DATE NOT NULL);
|
||||
INSERT INTO t1 VALUES('2001-01-01', '2001-01-01');
|
||||
SELECT * FROM t1 WHERE a='2001-01-01' AND a=b AND b='2001-01-01 00:00:00';
|
||||
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='2001-01-01' AND a=b AND b='2001-01-01 00:00:00';
|
||||
DROP TABLE t1;
|
||||
|
||||
CREATE TABLE t1(a DATETIME NOT NULL, b VARCHAR(20) NOT NULL);
|
||||
INSERT INTO t1 VALUES('2001-01-01', '2001-01-01');
|
||||
SELECT * FROM t1 WHERE a='2001-01-01' AND a=b AND b='2001-01-01 00:00:00';
|
||||
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='2001-01-01' AND a=b AND b='2001-01-01 00:00:00';
|
||||
|
||||
SELECT * FROM t1 WHERE a='2001-01-01 00:00:00' AND a=b AND b='2001-01-01';
|
||||
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='2001-01-01 00:00:00' AND a=b AND b='2001-01-01';
|
||||
DROP TABLE t1;
|
||||
|
||||
CREATE TABLE t1(a DATETIME NOT NULL, b DATE NOT NULL);
|
||||
INSERT INTO t1 VALUES('2001-01-01', '2001-01-01');
|
||||
SELECT x.a, y.a, z.a FROM t1 x
|
||||
JOIN t1 y ON x.a=y.a
|
||||
JOIN t1 z ON y.a=z.a
|
||||
WHERE x.a='2001-01-01' AND z.a='2001-01-01 00:00:00';
|
||||
EXPLAIN EXTENDED SELECT x.a, y.a, z.a FROM t1 x
|
||||
JOIN t1 y ON x.a=y.a
|
||||
JOIN t1 z ON y.a=z.a
|
||||
WHERE x.a='2001-01-01' AND z.a='2001-01-01 00:00:00';
|
||||
|
||||
|
||||
--echo End of 5.0 tests
|
||||
|
||||
@@ -889,6 +889,65 @@ DROP PROCEDURE p_suid;
|
||||
DROP FUNCTION f_suid;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug #48872 : Privileges for stored functions ignored if function name
|
||||
--echo # is mixed case
|
||||
--echo #
|
||||
|
||||
CREATE DATABASE B48872;
|
||||
USE B48872;
|
||||
CREATE TABLE `TestTab` (id INT);
|
||||
INSERT INTO `TestTab` VALUES (1),(2);
|
||||
CREATE FUNCTION `f_Test`() RETURNS INT RETURN 123;
|
||||
CREATE FUNCTION `f_Test_denied`() RETURNS INT RETURN 123;
|
||||
CREATE USER 'tester';
|
||||
CREATE USER 'Tester';
|
||||
GRANT SELECT ON TABLE `TestTab` TO 'tester';
|
||||
GRANT EXECUTE ON FUNCTION `f_Test` TO 'tester';
|
||||
GRANT EXECUTE ON FUNCTION `f_Test_denied` TO 'Tester';
|
||||
|
||||
SELECT f_Test();
|
||||
SELECT * FROM TestTab;
|
||||
|
||||
CONNECT (con_tester,localhost,tester,,B48872);
|
||||
CONNECT (con_tester_denied,localhost,Tester,,B48872);
|
||||
CONNECTION con_tester;
|
||||
|
||||
SELECT * FROM TestTab;
|
||||
SELECT `f_Test`();
|
||||
SELECT `F_TEST`();
|
||||
SELECT f_Test();
|
||||
SELECT F_TEST();
|
||||
|
||||
CONNECTION con_tester_denied;
|
||||
|
||||
--disable_result_log
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
SELECT * FROM TestTab;
|
||||
--error ER_PROCACCESS_DENIED_ERROR
|
||||
SELECT `f_Test`();
|
||||
--error ER_PROCACCESS_DENIED_ERROR
|
||||
SELECT `F_TEST`();
|
||||
--error ER_PROCACCESS_DENIED_ERROR
|
||||
SELECT f_Test();
|
||||
--error ER_PROCACCESS_DENIED_ERROR
|
||||
SELECT F_TEST();
|
||||
--enable_result_log
|
||||
SELECT `f_Test_denied`();
|
||||
SELECT `F_TEST_DENIED`();
|
||||
|
||||
CONNECTION default;
|
||||
DISCONNECT con_tester;
|
||||
DISCONNECT con_tester_denied;
|
||||
DROP TABLE `TestTab`;
|
||||
DROP FUNCTION `f_Test`;
|
||||
DROP FUNCTION `f_Test_denied`;
|
||||
|
||||
USE test;
|
||||
DROP USER 'tester';
|
||||
DROP USER 'Tester';
|
||||
DROP DATABASE B48872;
|
||||
|
||||
--echo End of 5.0 tests.
|
||||
|
||||
# Wait till all disconnects are completed
|
||||
|
||||
@@ -30,7 +30,7 @@ SELECT 1 IN (SELECT 1);
|
||||
SELECT 1 FROM (SELECT 1 as a) b WHERE 1 IN (SELECT (SELECT a));
|
||||
-- error ER_WRONG_USAGE
|
||||
select (SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE(1));
|
||||
-- error ER_WRONG_USAGE
|
||||
-- error ER_WRONG_PARAMETERS_TO_PROCEDURE
|
||||
SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE((SELECT 1));
|
||||
-- error ER_BAD_FIELD_ERROR
|
||||
SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NULL;
|
||||
|
||||
Reference in New Issue
Block a user