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
60c790d6
Commit
60c790d6
authored
Jul 22, 2019
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge 10.1 into 10.2
parents
12614af1
a5e268a2
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
54 additions
and
11 deletions
+54
-11
mysql-test/suite/innodb/r/create_select.result
mysql-test/suite/innodb/r/create_select.result
+10
-0
mysql-test/suite/innodb/t/create_select.test
mysql-test/suite/innodb/t/create_select.test
+28
-0
storage/innobase/row/row0mysql.cc
storage/innobase/row/row0mysql.cc
+3
-1
storage/xtradb/handler/ha_innodb.cc
storage/xtradb/handler/ha_innodb.cc
+7
-5
storage/xtradb/include/row0mysql.h
storage/xtradb/include/row0mysql.h
+2
-2
storage/xtradb/row/row0mysql.cc
storage/xtradb/row/row0mysql.cc
+4
-3
No files found.
mysql-test/suite/innodb/r/create_select.result
0 → 100644
View file @
60c790d6
connect con1, localhost, root,,;
connection default;
CREATE TABLE t1 ENGINE=InnoDB SELECT * FROM seq_1_to_100000000;
connection con1;
KILL QUERY @id;
disconnect con1;
connection default;
ERROR 70100: Query execution was interrupted
CREATE TABLE t1 (a SERIAL) ENGINE=InnoDB;
DROP TABLE t1;
mysql-test/suite/innodb/t/create_select.test
0 → 100644
View file @
60c790d6
--
source
include
/
have_innodb
.
inc
--
source
include
/
have_sequence
.
inc
--
source
include
/
count_sessions
.
inc
let
$ID
=
`SELECT @id := CONNECTION_ID()`
;
connect
(
con1
,
localhost
,
root
,,);
let
$ignore
=
`SELECT @id := $ID`
;
connection
default
;
send
CREATE
TABLE
t1
ENGINE
=
InnoDB
SELECT
*
FROM
seq_1_to_100000000
;
connection
con1
;
let
$wait_condition
=
select
count
(
*
)
=
1
from
information_schema
.
processlist
where
state
=
'Sending data'
and
info
=
'CREATE TABLE t1 ENGINE=InnoDB SELECT * FROM seq_1_to_100000000'
;
--
source
include
/
wait_condition
.
inc
KILL
QUERY
@
id
;
disconnect
con1
;
connection
default
;
--
error
ER_QUERY_INTERRUPTED
reap
;
CREATE
TABLE
t1
(
a
SERIAL
)
ENGINE
=
InnoDB
;
DROP
TABLE
t1
;
--
source
include
/
wait_until_count_sessions
.
inc
storage/innobase/row/row0mysql.cc
View file @
60c790d6
...
@@ -3382,7 +3382,9 @@ row_drop_table_for_mysql(
...
@@ -3382,7 +3382,9 @@ row_drop_table_for_mysql(
calling btr_search_drop_page_hash_index() while we
calling btr_search_drop_page_hash_index() while we
hold the InnoDB dictionary lock, we will drop any
hold the InnoDB dictionary lock, we will drop any
adaptive hash index entries upfront. */
adaptive hash index entries upfront. */
bool
immune
=
is_temp_name
const
bool
immune
=
is_temp_name
||
create_failed
||
sqlcom
==
SQLCOM_CREATE_TABLE
||
strstr
(
table
->
name
.
m_name
,
"/FTS"
);
||
strstr
(
table
->
name
.
m_name
,
"/FTS"
);
while
(
buf_LRU_drop_page_hash_for_tablespace
(
table
))
{
while
(
buf_LRU_drop_page_hash_for_tablespace
(
table
))
{
...
...
storage/xtradb/handler/ha_innodb.cc
View file @
60c790d6
...
@@ -13146,11 +13146,12 @@ ha_innobase::delete_table(
...
@@ -13146,11 +13146,12 @@ ha_innobase::delete_table(
++
trx
->
will_lock
;
++
trx
->
will_lock
;
trx
->
ddl
=
true
;
trx
->
ddl
=
true
;
const
int
sqlcom
=
thd_sql_command
(
thd
);
/* Drop the table in InnoDB */
/* Drop the table in InnoDB */
err
=
row_drop_table_for_mysql
(
err
=
row_drop_table_for_mysql
(
norm_name
,
trx
,
thd_sql_command
(
thd
)
==
SQLCOM_DROP_DB
,
norm_name
,
trx
,
sqlcom
==
SQLCOM_DROP_DB
,
FALSE
);
sqlcom
==
SQLCOM_CREATE_TABLE
/* CREATE TABLE ... SELECT */
);
if
(
err
==
DB_TABLE_NOT_FOUND
if
(
err
==
DB_TABLE_NOT_FOUND
&&
innobase_get_lower_case_table_names
()
==
1
)
{
&&
innobase_get_lower_case_table_names
()
==
1
)
{
...
@@ -13180,8 +13181,9 @@ ha_innobase::delete_table(
...
@@ -13180,8 +13181,9 @@ ha_innobase::delete_table(
#endif
#endif
err
=
row_drop_table_for_mysql
(
err
=
row_drop_table_for_mysql
(
par_case_name
,
trx
,
par_case_name
,
trx
,
thd_sql_command
(
thd
)
==
SQLCOM_DROP_DB
,
sqlcom
==
SQLCOM_DROP_DB
,
FALSE
);
sqlcom
==
SQLCOM_CREATE_TABLE
/* CREATE TABLE ... SELECT */
);
}
}
}
}
...
...
storage/xtradb/include/row0mysql.h
View file @
60c790d6
/*****************************************************************************
/*****************************************************************************
Copyright (c) 2000, 2017, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2000, 2017, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2017, MariaDB Corporation.
Copyright (c) 2017,
2019,
MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
the terms of the GNU General Public License as published by the Free Software
...
@@ -493,7 +493,7 @@ row_drop_table_for_mysql(
...
@@ -493,7 +493,7 @@ row_drop_table_for_mysql(
const
char
*
name
,
/*!< in: table name */
const
char
*
name
,
/*!< in: table name */
trx_t
*
trx
,
/*!< in: dictionary transaction handle */
trx_t
*
trx
,
/*!< in: dictionary transaction handle */
bool
drop_db
,
/*!< in: true=dropping whole database */
bool
drop_db
,
/*!< in: true=dropping whole database */
i
bool
create_failed
,
/*!<in: TRUE=create table failed
bool
create_failed
,
/*!<in: TRUE=create table failed
because e.g. foreign key column
because e.g. foreign key column
type mismatch. */
type mismatch. */
bool
nonatomic
=
true
)
bool
nonatomic
=
true
)
...
...
storage/xtradb/row/row0mysql.cc
View file @
60c790d6
...
@@ -3893,7 +3893,7 @@ row_drop_table_for_mysql(
...
@@ -3893,7 +3893,7 @@ row_drop_table_for_mysql(
const
char
*
name
,
/*!< in: table name */
const
char
*
name
,
/*!< in: table name */
trx_t
*
trx
,
/*!< in: transaction handle */
trx_t
*
trx
,
/*!< in: transaction handle */
bool
drop_db
,
/*!< in: true=dropping whole database */
bool
drop_db
,
/*!< in: true=dropping whole database */
i
bool
create_failed
,
/*!<in: TRUE=create table failed
bool
create_failed
,
/*!<in: TRUE=create table failed
because e.g. foreign key column
because e.g. foreign key column
type mismatch. */
type mismatch. */
bool
nonatomic
)
bool
nonatomic
)
...
@@ -4233,12 +4233,13 @@ row_drop_table_for_mysql(
...
@@ -4233,12 +4233,13 @@ row_drop_table_for_mysql(
calling btr_search_drop_page_hash_index() while we
calling btr_search_drop_page_hash_index() while we
hold the InnoDB dictionary lock, we will drop any
hold the InnoDB dictionary lock, we will drop any
adaptive hash index entries upfront. */
adaptive hash index entries upfront. */
const
bool
is_temp
=
dict_table_is_temporary
(
table
)
const
bool
immune
=
create_failed
||
dict_table_is_temporary
(
table
)
||
strncmp
(
tablename_minus_db
,
tmp_file_prefix
,
||
strncmp
(
tablename_minus_db
,
tmp_file_prefix
,
tmp_file_prefix_length
)
tmp_file_prefix_length
)
||
strncmp
(
tablename_minus_db
,
"FTS_"
,
4
);
||
strncmp
(
tablename_minus_db
,
"FTS_"
,
4
);
while
(
buf_LRU_drop_page_hash_for_tablespace
(
table
))
{
while
(
buf_LRU_drop_page_hash_for_tablespace
(
table
))
{
if
((
!
i
s_temp
&&
trx_is_interrupted
(
trx
))
if
((
!
i
mmune
&&
trx_is_interrupted
(
trx
))
||
srv_shutdown_state
!=
SRV_SHUTDOWN_NONE
)
{
||
srv_shutdown_state
!=
SRV_SHUTDOWN_NONE
)
{
err
=
DB_INTERRUPTED
;
err
=
DB_INTERRUPTED
;
goto
funct_exit
;
goto
funct_exit
;
...
...
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