Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
1a94d2fd
Commit
1a94d2fd
authored
Apr 23, 2022
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup: main.create_select test
parent
9b7886bb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
18 deletions
+24
-18
mysql-test/r/create_select.result
mysql-test/r/create_select.result
+7
-1
mysql-test/t/create_select.test
mysql-test/t/create_select.test
+17
-17
No files found.
mysql-test/r/create_select
_tmp
.result
→
mysql-test/r/create_select.result
View file @
1a94d2fd
drop table if exists t1, t2;
CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
#
# Testcase for BUG#4551
#
CREATE TABLE t1 ( a int );
CREATE TABLE t1 ( a int );
INSERT INTO t1 VALUES (1),(2),(1);
INSERT INTO t1 VALUES (1),(2),(1);
CREATE TABLE t2 ( PRIMARY KEY (a) ) ENGINE=INNODB SELECT a FROM t1;
CREATE TABLE t2 ( PRIMARY KEY (a) ) ENGINE=INNODB SELECT a FROM t1;
...
@@ -18,3 +21,6 @@ ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
...
@@ -18,3 +21,6 @@ ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
select * from t2;
select * from t2;
ERROR 42S02: Table 'test.t2' doesn't exist
ERROR 42S02: Table 'test.t2' doesn't exist
drop table t1;
drop table t1;
#
# End of 4.1 tests
#
mysql-test/t/create_select
_tmp
.test
→
mysql-test/t/create_select.test
View file @
1a94d2fd
# Testcase for BUG#4551
# This does not work for RBR yet.
--
source
include
/
have_innodb
.
inc
--
source
include
/
have_binlog_format_mixed_or_statement
.
inc
CALL
mtr
.
add_suppression
(
"Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"
);
--
echo
#
--
echo
# Testcase for BUG#4551
--
echo
#
# The bug was that when the table was TEMPORARY, it was not deleted if
# The bug was that when the table was TEMPORARY, it was not deleted if
# the CREATE SELECT failed (the code intended too, but it actually
# the CREATE SELECT failed (the code intended too, but it actually
# didn't). And as the CREATE TEMPORARY TABLE was not written to the
# didn't). And as the CREATE TEMPORARY TABLE was not written to the
# binlog if it was a transactional table, it resulted in an
# binlog if it was a transactional table, it resulted in an
# inconsistency between binlog and the internal list of temp tables.
# inconsistency between binlog and the internal list of temp tables.
# This does not work for RBR yet.
--
source
include
/
have_binlog_format_mixed_or_statement
.
inc
--
disable_query_log
CALL
mtr
.
add_suppression
(
"Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"
);
--
enable_query_log
--
source
include
/
have_innodb
.
inc
--
disable_warnings
drop
table
if
exists
t1
,
t2
;
--
enable_warnings
CREATE
TABLE
t1
(
a
int
);
CREATE
TABLE
t1
(
a
int
);
INSERT
INTO
t1
VALUES
(
1
),(
2
),(
1
);
INSERT
INTO
t1
VALUES
(
1
),(
2
),(
1
);
--
error
ER_DUP_ENTRY
--
error
ER_DUP_ENTRY
CREATE
TABLE
t2
(
PRIMARY
KEY
(
a
)
)
ENGINE
=
INNODB
SELECT
a
FROM
t1
;
CREATE
TABLE
t2
(
PRIMARY
KEY
(
a
)
)
ENGINE
=
INNODB
SELECT
a
FROM
t1
;
--
error
1146
--
error
ER_NO_SUCH_TABLE
select
*
from
t2
;
select
*
from
t2
;
--
error
ER_DUP_ENTRY
--
error
ER_DUP_ENTRY
CREATE
TEMPORARY
TABLE
t2
(
PRIMARY
KEY
(
a
)
)
ENGINE
=
INNODB
SELECT
a
FROM
t1
;
CREATE
TEMPORARY
TABLE
t2
(
PRIMARY
KEY
(
a
)
)
ENGINE
=
INNODB
SELECT
a
FROM
t1
;
--
error
1146
--
error
ER_NO_SUCH_TABLE
select
*
from
t2
;
select
*
from
t2
;
--
error
ER_DUP_ENTRY
--
error
ER_DUP_ENTRY
CREATE
TABLE
t2
(
PRIMARY
KEY
(
a
)
)
ENGINE
=
MYISAM
SELECT
a
FROM
t1
;
CREATE
TABLE
t2
(
PRIMARY
KEY
(
a
)
)
ENGINE
=
MYISAM
SELECT
a
FROM
t1
;
--
error
1146
--
error
ER_NO_SUCH_TABLE
select
*
from
t2
;
select
*
from
t2
;
--
error
ER_DUP_ENTRY
--
error
ER_DUP_ENTRY
CREATE
TEMPORARY
TABLE
t2
(
PRIMARY
KEY
(
a
)
)
ENGINE
=
MYISAM
SELECT
a
FROM
t1
;
CREATE
TEMPORARY
TABLE
t2
(
PRIMARY
KEY
(
a
)
)
ENGINE
=
MYISAM
SELECT
a
FROM
t1
;
--
error
1146
--
error
ER_NO_SUCH_TABLE
select
*
from
t2
;
select
*
from
t2
;
drop
table
t1
;
drop
table
t1
;
# End of 4.1 tests
--
echo
#
--
echo
# End of 4.1 tests
--
echo
#
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment