1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Merge from 5.1-bugteam

This commit is contained in:
Jim Winstead
2009-05-15 10:40:51 -07:00
33 changed files with 798 additions and 193 deletions

View File

@ -12,9 +12,9 @@ connect (con1,localhost,root,,);
--echo # Establish connection con2 (user=root)
connect (con2,localhost,root,,);
### Test 1:
### - While a consistent snapshot transaction is executed,
### no external inserts should be visible to the transaction.
--echo ### Test 1:
--echo ### - While a consistent snapshot transaction is executed,
--echo ### no external inserts should be visible to the transaction.
--echo # Switch to connection con1
connection con1;
@ -31,9 +31,9 @@ SELECT * FROM t1; # if consistent snapshot was set as expected, we
# should see nothing.
COMMIT;
### Test 2:
### - For any non-consistent snapshot transaction, external
### committed inserts should be visible to the transaction.
--echo ### Test 2:
--echo ### - For any non-consistent snapshot transaction, external
--echo ### committed inserts should be visible to the transaction.
DELETE FROM t1;
START TRANSACTION; # Now we omit WITH CONSISTENT SNAPSHOT
@ -48,6 +48,24 @@ SELECT * FROM t1; # if consistent snapshot was not set, as expected, we
# should see 1.
COMMIT;
--echo ### Test 3:
--echo ### - Bug#44664: valgrind warning for COMMIT_AND_CHAIN and ROLLBACK_AND_CHAIN
--echo ### Chaining a transaction does not retain consistency level.
START TRANSACTION WITH CONSISTENT SNAPSHOT;
DELETE FROM t1;
COMMIT WORK AND CHAIN;
--echo # Switch to connection con2
connection con2;
INSERT INTO t1 VALUES(1);
--echo # Switch to connection con1
connection con1;
SELECT * FROM t1; # if consistent snapshot was not set, as expected, we
# should see 1.
COMMIT;
--echo # Switch to connection default + close connections con1 and con2
connection default;
disconnect con1;

View File

@ -1282,6 +1282,16 @@ INSERT INTO t1 VALUES ('2008-12-31','aaaaaa');
SELECT DATE_FORMAT(c, GET_FORMAT(DATE, 'eur')) h, CONCAT(UPPER(aa),', ', aa) i FROM t1;
DROP TABLE t1;
--echo #
--echo # BUG#44774: load_file function produces valgrind warnings
--echo #
CREATE TABLE t1 (a TINYBLOB);
INSERT INTO t1 VALUES ('aaaaaaaa');
SELECT LOAD_FILE(a) FROM t1;
DROP TABLE t1;
--echo End of 5.0 tests
#

View File

@ -53,7 +53,7 @@ order by table_name;
end|
delimiter ;|
create table t1
create table t1
(f1 int(10) unsigned not null,
f2 varchar(100) not null,
primary key (f1), unique key (f2));
@ -105,8 +105,8 @@ drop function f2;
drop view v1, v2;
#
# Bug#20543: select on information_schema strange warnings, view, different
# schemas/users
# Bug#20543 select on information_schema strange warnings, view, different
# schemas/users
#
#
create database testdb_1;
@ -125,7 +125,7 @@ grant insert on v1 to testdb_2@localhost;
create view v5 as select f1 from t1;
grant show view on v5 to testdb_2@localhost;
--error 1227
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
create definer=`no_such_user`@`no_such_host` view v6 as select f1 from t1;
connection default;
@ -169,46 +169,53 @@ use testdb_1;
revoke show view on v6 from testdb_2@localhost;
connection testdb_2;
--error 1142
--error ER_TABLEACCESS_DENIED_ERROR
show fields from testdb_1.v5;
--error 1142
--error ER_TABLEACCESS_DENIED_ERROR
show create view testdb_1.v5;
--error 1142
--error ER_TABLEACCESS_DENIED_ERROR
show fields from testdb_1.v6;
--error 1142
--error ER_TABLEACCESS_DENIED_ERROR
show create view testdb_1.v6;
--error 1142
--error ER_TABLEACCESS_DENIED_ERROR
show fields from testdb_1.v7;
--error 1142
--error ER_TABLEACCESS_DENIED_ERROR
show create view testdb_1.v7;
--error 1345
--error ER_VIEW_NO_EXPLAIN
show create view v4;
#--error 1345
#--error ER_VIEW_NO_EXPLAIN
show fields from v4;
show fields from v2;
show fields from testdb_1.v1;
show create view v2;
--error 1142
--error ER_TABLEACCESS_DENIED_ERROR
show create view testdb_1.v1;
select table_name from information_schema.columns a
select table_name from information_schema.columns a
where a.table_name = 'v2';
select view_definition from information_schema.views a
select view_definition from information_schema.views a
where a.table_name = 'v2';
select view_definition from information_schema.views a
select view_definition from information_schema.views a
where a.table_name = 'testdb_1.v1';
--error 1356
--error ER_VIEW_INVALID
select * from v2;
connection default;
use test;
drop view testdb_1.v1, v2, testdb_1.v3, v4;
drop database testdb_1;
connection testdb_1;
disconnect testdb_1;
--source include/wait_until_disconnected.inc
connection testdb_2;
disconnect testdb_2;
--source include/wait_until_disconnected.inc
connection default;
drop user testdb_1@localhost;
drop user testdb_2@localhost;
@ -239,4 +246,7 @@ show create view testdb_1.v1;
connection default;
drop user mysqltest_1@localhost;
drop database testdb_1;
connection user1;
disconnect user1;
--source include/wait_until_disconnected.inc
connection default;

View File

@ -77,3 +77,16 @@ insert into t1 values('2007-07-02', 1);
insert into t1 values('2007-07-02', 2);
SELECT sum(f3) FROM t1 where f2='2007-07-01 00:00:00' group by f2;
drop table t1;
--echo #
--echo # Bug #44792: valgrind warning when casting from time to time
--echo #
CREATE TABLE t1 (c TIME);
INSERT INTO t1 VALUES ('0:00:00');
SELECT CAST(c AS TIME) FROM t1;
DROP TABLE t1;
--echo End of 5.0 tests

View File

@ -1089,4 +1089,16 @@ CREATE TABLE t2 AS SELECT d FROM t1 UNION SELECT d FROM t1;
SHOW FIELDS FROM t2;
DROP TABLE t1, t2;
#
# Bug#43612 crash with explain extended, union, order by
#
CREATE TABLE t1(a INT);
EXPLAIN EXTENDED
SELECT a FROM t1
UNION
SELECT a FROM t1
ORDER BY a;
DROP TABLE t1;
--echo End of 5.0 tests