summaryrefslogtreecommitdiff
path: root/mysql-test/main/create.test
diff options
context:
space:
mode:
authorLena Startseva <lena.startseva@mariadb.com>2022-09-26 10:24:59 +0700
committerLena Startseva <lena.startseva@mariadb.com>2022-09-26 10:24:59 +0700
commitd444536e1dbb0fef7a798b23382711c0448ab784 (patch)
treeb168bf07bca3ba94f42b8c8b31af675301600aca /mysql-test/main/create.test
parent0792aff161132fb953510555fe45544991dec95d (diff)
parent184e65954b88266bd426de1c82973bf54a88afb1 (diff)
downloadmariadb-git-d444536e1dbb0fef7a798b23382711c0448ab784.tar.gz
Merge branch 'bb-10.4-all-builders' into bb-10.5-all-builders
Diffstat (limited to 'mysql-test/main/create.test')
-rw-r--r--mysql-test/main/create.test31
1 files changed, 20 insertions, 11 deletions
diff --git a/mysql-test/main/create.test b/mysql-test/main/create.test
index 5f84e282570..074195a331d 100644
--- a/mysql-test/main/create.test
+++ b/mysql-test/main/create.test
@@ -106,6 +106,7 @@ create table t1 (i int, index `` (i));
# We don't allow creation of non-temporary tables under LOCK TABLES
# as following meta-data locking protocol in this case can lead to
# deadlock.
+--disable_service_connection
create table t1 (i int);
lock tables t1 read;
--error ER_TABLE_NOT_LOCKED
@@ -115,6 +116,7 @@ create temporary table t2 (j int);
drop temporary table t2;
unlock tables;
drop table t1;
+--enable_service_connection
#
# Test of CREATE ... SELECT with indexes
@@ -286,7 +288,7 @@ drop table if exists t2,t1;
#
# Test for CREATE TABLE .. LIKE ..
#
-
+--disable_view_protocol
create table t1(id int not null, name char(20));
insert into t1 values(10,'mysql'),(20,'monty- the creator');
create table t2(id int not null);
@@ -325,13 +327,14 @@ create temporary table t3 like t1;
drop table t1, t2, t3;
drop table t3;
drop database mysqltest;
-
+--enable_view_protocol
#
# CREATE TABLE LIKE under LOCK TABLES
#
# Similarly to ordinary CREATE TABLE we don't allow creation of
# non-temporary tables under LOCK TABLES. Also we require source
# table to be locked.
+--disable_service_connection
create table t1 (i int);
create table t2 (j int);
lock tables t1 read;
@@ -345,6 +348,7 @@ drop temporary table t3;
create temporary table t3 like t2;
unlock tables;
drop tables t1, t2;
+--enable_service_connection
#
# Test default table type
@@ -453,7 +457,7 @@ drop table t1, t2, t3;
#
# Bug #1209
#
-
+--disable_service_connection
create database mysqltest;
use mysqltest;
select database();
@@ -469,6 +473,7 @@ connection default;
disconnect user1;
drop user mysqltest_1;
use test;
+--enable_service_connection
#
# Test for Bug 856 'Naming a key "Primary" causes trouble'
@@ -530,6 +535,7 @@ drop table t1,t2;
# This tests two additional possible errors and a hang if
# an improper fix is present.
#
+--disable_service_connection
create table t1 (a int);
--error ER_TABLE_EXISTS_ERROR
create table t1 select * from t1;
@@ -538,6 +544,7 @@ create table t2 union = (t1) select * from t1;
flush tables with read lock;
unlock tables;
drop table t1;
+--enable_service_connection
#
# Bug#10413: Invalid column name is not rejected
@@ -771,14 +778,14 @@ create table t1 select coalesce('a' collate latin1_swedish_ci,'b' collate latin1
# permanent table. After patch for Bug#47418, we create the base table and
# instert data into it, even though a temporary table exists with the same
# name.
-
+--disable_view_protocol
create temporary table t1 (j int);
create table if not exists t1 select 1;
select * from t1;
drop temporary table t1;
select * from t1;
drop table t1;
-
+--enable_view_protocol
#
# CREATE TABLE ... SELECT and LOCK TABLES
#
@@ -787,7 +794,7 @@ drop table t1;
# the server doesn't crash, hang and produces sensible errors.
# Includes test for bug #20662 "Infinite loop in CREATE TABLE
# IF NOT EXISTS ... SELECT with locked tables".
-
+--disable_service_connection
create table t1 (i int);
insert into t1 values (1), (2);
lock tables t1 read;
@@ -832,7 +839,7 @@ create temporary table if not exists t2 select * from t1;
select * from t2;
unlock tables;
drop table t1, t2;
-
+--enable_service_connection
#
# Bug#21772: can not name a column 'upgrade' when create a table
@@ -1301,7 +1308,7 @@ DROP VIEW t2;
--echo # Bug #49193 CREATE TABLE reacts differently depending
--echo # on whether data is selected or not
--echo #
-
+--disable_view_protocol
CREATE TEMPORARY TABLE t2 (ID INT);
INSERT INTO t2 VALUES (1),(2),(3);
@@ -1337,7 +1344,7 @@ SELECT * FROM t1;
DROP TABLE t1;
DROP TEMPORARY TABLE t2;
-
+--enable_view_protocol
--echo #
--echo # Bug #22909 "Using CREATE ... LIKE is possible to create field
@@ -1418,7 +1425,7 @@ drop table t1;
--echo #
--echo # 2. A temporary table.
--echo #
-
+--disable_view_protocol
create temporary table if not exists t1 (a int) select 1 as a;
select * from t1;
--error ER_TABLE_EXISTS_ERROR
@@ -1571,6 +1578,7 @@ select * from t1;
drop table t1;
--error ER_NO_SUCH_TABLE
create table if not exists t1 (a int) select * from t1;
+--enable_view_protocol
--echo #
--echo # 7. Test of non-matching columns, REPLACE and IGNORE.
@@ -1611,7 +1619,7 @@ drop table t1;
--echo #
--echo # Checking that CREATE IF NOT EXISTS is not blocked by running SELECT
--echo #
-
+--disable_service_connection
create table t1 (a int, b int) engine=myisam;
create table t2 (a int, b int) engine=myisam;
insert into t1 values (1,1);
@@ -1634,6 +1642,7 @@ connection default;
select * from t1;
unlock tables;
drop table t1,t2;
+--enable_service_connection
--echo #
--echo # MDEV-6179: dynamic columns functions/cast()/convert() doesn't