MDEV-27944: View-protocol fails if database was changed
This is a limitation of the view protocol. Tests were fixed with workaround (via disable/enable service connection)
This commit is contained in:
parent
53f5ee7929
commit
ad5b9c207c
@ -1048,14 +1048,14 @@ drop table t1;
|
||||
--echo # MDEV-16473: query with CTE when no database is set
|
||||
--echo #
|
||||
|
||||
# Enable view protocol after fix MDEV-27944
|
||||
--disable_view_protocol
|
||||
create database db_mdev_16473;
|
||||
use db_mdev_16473;
|
||||
drop database db_mdev_16473;
|
||||
|
||||
--disable_service_connection
|
||||
--echo # Now no default database is set
|
||||
select database();
|
||||
--enable_service_connection
|
||||
|
||||
with cte as (select 1 as a) select * from cte;
|
||||
|
||||
@ -1073,7 +1073,6 @@ select * from cte, db_mdev_16473.t1 as t where cte.a=t.a;
|
||||
drop database db_mdev_16473;
|
||||
|
||||
use test;
|
||||
--enable_view_protocol
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-17154: using parameter markers for PS within CTEs more than once
|
||||
@ -1220,8 +1219,6 @@ DROP TABLE test.t;
|
||||
--echo # MDEV-22781: create view with CTE without default database
|
||||
--echo #
|
||||
|
||||
# Enable view protocol after fix MDEV-27944
|
||||
--disable_view_protocol
|
||||
create database db;
|
||||
use db;
|
||||
drop database db;
|
||||
@ -1231,7 +1228,9 @@ insert into db1.t1 values (3),(7),(1);
|
||||
|
||||
create view db1.v1 as with t as (select * from db1.t1) select * from t;
|
||||
show create view db1.v1;
|
||||
--disable_service_connection
|
||||
select * from db1.v1;
|
||||
--enable_service_connection
|
||||
drop view db1.v1;
|
||||
|
||||
prepare stmt from "
|
||||
@ -1240,14 +1239,15 @@ create view db1.v1 as with t as (select * from db1.t1) select * from t;
|
||||
execute stmt;
|
||||
deallocate prepare stmt;
|
||||
show create view db1.v1;
|
||||
--disable_service_connection
|
||||
select * from db1.v1;
|
||||
--enable_service_connection
|
||||
drop view db1.v1;
|
||||
|
||||
drop table db1.t1;
|
||||
drop database db1;
|
||||
|
||||
use test;
|
||||
--enable_view_protocol
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-24597: CTE with union used multiple times in query
|
||||
|
@ -74,13 +74,12 @@ SHOW TABLES IN
|
||||
SET CHARACTER SET koi8r;
|
||||
DROP DATABASE ÔÅÓÔ;
|
||||
|
||||
# Enable view protocol after fix MDEV-27944
|
||||
--disable_view_protocol
|
||||
--disable_service_connection
|
||||
SET NAMES koi8r;
|
||||
SELECT hex('ÔÅÓÔ');
|
||||
SET character_set_connection=cp1251;
|
||||
SELECT hex('ÔÅÓÔ');
|
||||
--enable_view_protocol
|
||||
--enable_service_connection
|
||||
USE test;
|
||||
|
||||
# Bug#4417
|
||||
|
@ -2,9 +2,6 @@
|
||||
# Test of --lower-case-table-names
|
||||
#
|
||||
|
||||
#remove this include after fix MDEV-27944
|
||||
--source include/no_view_protocol.inc
|
||||
|
||||
create table T1 (id int primary key, Word varchar(40) not null, Index(Word));
|
||||
create table t4 (id int primary key, Word varchar(40) not null);
|
||||
INSERT INTO T1 VALUES (1, 'a'), (2, 'b'), (3, 'c');
|
||||
@ -36,8 +33,10 @@ drop table t1;
|
||||
create database mysqltest;
|
||||
use MYSQLTEST;
|
||||
create table t1 (a int);
|
||||
--disable_service_connection
|
||||
select T1.a from MYSQLTEST.T1;
|
||||
select t1.a from MYSQLTEST.T1;
|
||||
--enable_service_connection
|
||||
select mysqltest.t1.* from MYSQLTEST.t1;
|
||||
select MYSQLTEST.t1.* from MYSQLTEST.t1;
|
||||
select MYSQLTEST.T1.* from MYSQLTEST.T1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user