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
fde3d895
Commit
fde3d895
authored
Sep 22, 2020
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge 10.2 into 10.3
parents
2cf489d4
78efa109
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
56 additions
and
18 deletions
+56
-18
mysql-test/suite/encryption/r/create_or_replace.result
mysql-test/suite/encryption/r/create_or_replace.result
+0
-2
mysql-test/suite/encryption/t/create_or_replace.opt
mysql-test/suite/encryption/t/create_or_replace.opt
+1
-0
mysql-test/suite/encryption/t/create_or_replace.test
mysql-test/suite/encryption/t/create_or_replace.test
+0
-2
mysql-test/suite/innodb/r/alter_table.result
mysql-test/suite/innodb/r/alter_table.result
+10
-0
mysql-test/suite/innodb/r/truncate.result
mysql-test/suite/innodb/r/truncate.result
+11
-0
mysql-test/suite/innodb/t/alter_table.test
mysql-test/suite/innodb/t/alter_table.test
+11
-0
mysql-test/suite/innodb/t/truncate.test
mysql-test/suite/innodb/t/truncate.test
+10
-0
storage/innobase/dict/dict0load.cc
storage/innobase/dict/dict0load.cc
+5
-11
storage/innobase/handler/handler0alter.cc
storage/innobase/handler/handler0alter.cc
+8
-3
No files found.
mysql-test/suite/encryption/r/create_or_replace.result
View file @
fde3d895
SET @save_threads = @@GLOBAL.innodb_encryption_threads;
SET @save_threads = @@GLOBAL.innodb_encryption_threads;
SET @save_tables = @@GLOBAL.innodb_encrypt_tables;
SET default_storage_engine = InnoDB;
SET default_storage_engine = InnoDB;
SET GLOBAL innodb_encryption_threads = 4;
SET GLOBAL innodb_encryption_threads = 4;
CREATE TABLE `table10_int_autoinc` (`col_int_key` int, pk int auto_increment, `col_int` int, key (`col_int_key` ),primary key (pk)) engine=innodb;
CREATE TABLE `table10_int_autoinc` (`col_int_key` int, pk int auto_increment, `col_int` int, key (`col_int_key` ),primary key (pk)) engine=innodb;
...
@@ -18,4 +17,3 @@ connection default;
...
@@ -18,4 +17,3 @@ connection default;
drop table create_or_replace_t, table1_int_autoinc, table0_int_autoinc,
drop table create_or_replace_t, table1_int_autoinc, table0_int_autoinc,
table10_int_autoinc;
table10_int_autoinc;
SET GLOBAL innodb_encryption_threads = @save_threads;
SET GLOBAL innodb_encryption_threads = @save_threads;
SET GLOBAL innodb_encrypt_tables = @save_tables;
mysql-test/suite/encryption/t/create_or_replace.opt
0 → 100644
View file @
fde3d895
--innodb-encrypt-tables
mysql-test/suite/encryption/t/create_or_replace.test
View file @
fde3d895
...
@@ -3,7 +3,6 @@
...
@@ -3,7 +3,6 @@
--
source
include
/
count_sessions
.
inc
--
source
include
/
count_sessions
.
inc
SET
@
save_threads
=
@@
GLOBAL
.
innodb_encryption_threads
;
SET
@
save_threads
=
@@
GLOBAL
.
innodb_encryption_threads
;
SET
@
save_tables
=
@@
GLOBAL
.
innodb_encrypt_tables
;
SET
default_storage_engine
=
InnoDB
;
SET
default_storage_engine
=
InnoDB
;
...
@@ -76,5 +75,4 @@ drop table create_or_replace_t, table1_int_autoinc, table0_int_autoinc,
...
@@ -76,5 +75,4 @@ drop table create_or_replace_t, table1_int_autoinc, table0_int_autoinc,
table10_int_autoinc
;
table10_int_autoinc
;
SET
GLOBAL
innodb_encryption_threads
=
@
save_threads
;
SET
GLOBAL
innodb_encryption_threads
=
@
save_threads
;
SET
GLOBAL
innodb_encrypt_tables
=
@
save_tables
;
--
source
include
/
wait_until_count_sessions
.
inc
--
source
include
/
wait_until_count_sessions
.
inc
mysql-test/suite/innodb/r/alter_table.result
View file @
fde3d895
...
@@ -60,3 +60,13 @@ CREATE TABLE t1(a INT NOT NULL UNIQUE) ENGINE=InnoDB;
...
@@ -60,3 +60,13 @@ CREATE TABLE t1(a INT NOT NULL UNIQUE) ENGINE=InnoDB;
INSERT INTO t1 SELECT * FROM seq_1_to_128;
INSERT INTO t1 SELECT * FROM seq_1_to_128;
ALTER TABLE t1 ADD b TINYINT AUTO_INCREMENT PRIMARY KEY, DROP KEY a;
ALTER TABLE t1 ADD b TINYINT AUTO_INCREMENT PRIMARY KEY, DROP KEY a;
DROP TABLE t1;
DROP TABLE t1;
#
# MDEV-22939 Server crashes in row_make_new_pathname()
#
CREATE TABLE t (a INT) ENGINE=INNODB;
ALTER TABLE t DISCARD TABLESPACE;
ALTER TABLE t ENGINE INNODB;
ERROR HY000: Tablespace has been discarded for table `t`
ALTER TABLE t FORCE;
ERROR HY000: Tablespace has been discarded for table `t`
DROP TABLE t;
mysql-test/suite/innodb/r/truncate.result
View file @
fde3d895
...
@@ -39,3 +39,14 @@ TRUNCATE t1;
...
@@ -39,3 +39,14 @@ TRUNCATE t1;
SELECT * FROM t1;
SELECT * FROM t1;
a
a
DROP TEMPORARY TABLE t1;
DROP TEMPORARY TABLE t1;
#
# MDEV-23705 Assertion 'table->data_dir_path || !space'
#
CREATE TABLE t(c INT) ENGINE=InnoDB;
ALTER TABLE t DISCARD TABLESPACE;
RENAME TABLE t TO u;
TRUNCATE u;
Warnings:
Warning 1814 Tablespace has been discarded for table `u`
TRUNCATE u;
DROP TABLE u;
mysql-test/suite/innodb/t/alter_table.test
View file @
fde3d895
...
@@ -68,3 +68,14 @@ CREATE TABLE t1(a INT NOT NULL UNIQUE) ENGINE=InnoDB;
...
@@ -68,3 +68,14 @@ CREATE TABLE t1(a INT NOT NULL UNIQUE) ENGINE=InnoDB;
INSERT
INTO
t1
SELECT
*
FROM
seq_1_to_128
;
INSERT
INTO
t1
SELECT
*
FROM
seq_1_to_128
;
ALTER
TABLE
t1
ADD
b
TINYINT
AUTO_INCREMENT
PRIMARY
KEY
,
DROP
KEY
a
;
ALTER
TABLE
t1
ADD
b
TINYINT
AUTO_INCREMENT
PRIMARY
KEY
,
DROP
KEY
a
;
DROP
TABLE
t1
;
DROP
TABLE
t1
;
--
echo
#
--
echo
# MDEV-22939 Server crashes in row_make_new_pathname()
--
echo
#
CREATE
TABLE
t
(
a
INT
)
ENGINE
=
INNODB
;
ALTER
TABLE
t
DISCARD
TABLESPACE
;
--
error
ER_TABLESPACE_DISCARDED
ALTER
TABLE
t
ENGINE
INNODB
;
--
error
ER_TABLESPACE_DISCARDED
ALTER
TABLE
t
FORCE
;
DROP
TABLE
t
;
mysql-test/suite/innodb/t/truncate.test
View file @
fde3d895
...
@@ -50,3 +50,13 @@ INSERT INTO t1 VALUES(1);
...
@@ -50,3 +50,13 @@ INSERT INTO t1 VALUES(1);
TRUNCATE
t1
;
TRUNCATE
t1
;
SELECT
*
FROM
t1
;
SELECT
*
FROM
t1
;
DROP
TEMPORARY
TABLE
t1
;
DROP
TEMPORARY
TABLE
t1
;
--
echo
#
--
echo
# MDEV-23705 Assertion 'table->data_dir_path || !space'
--
echo
#
CREATE
TABLE
t
(
c
INT
)
ENGINE
=
InnoDB
;
ALTER
TABLE
t
DISCARD
TABLESPACE
;
RENAME
TABLE
t
TO
u
;
TRUNCATE
u
;
TRUNCATE
u
;
DROP
TABLE
u
;
storage/innobase/dict/dict0load.cc
View file @
fde3d895
...
@@ -2642,7 +2642,7 @@ static const char* dict_load_table_low(const table_name_t& name,
...
@@ -2642,7 +2642,7 @@ static const char* dict_load_table_low(const table_name_t& name,
name
.
m_name
,
NULL
,
n_cols
+
n_v_col
,
n_v_col
,
flags
,
flags2
);
name
.
m_name
,
NULL
,
n_cols
+
n_v_col
,
n_v_col
,
flags
,
flags2
);
(
*
table
)
->
space_id
=
space_id
;
(
*
table
)
->
space_id
=
space_id
;
(
*
table
)
->
id
=
table_id
;
(
*
table
)
->
id
=
table_id
;
(
*
table
)
->
file_unreadable
=
false
;
(
*
table
)
->
file_unreadable
=
!!
(
flags2
&
DICT_TF2_DISCARDED
)
;
return
(
NULL
);
return
(
NULL
);
}
}
...
@@ -2696,20 +2696,14 @@ dict_get_and_save_data_dir_path(
...
@@ -2696,20 +2696,14 @@ dict_get_and_save_data_dir_path(
ut_ad
(
!
table
->
is_temporary
());
ut_ad
(
!
table
->
is_temporary
());
ut_ad
(
!
table
->
space
||
table
->
space
->
id
==
table
->
space_id
);
ut_ad
(
!
table
->
space
||
table
->
space
->
id
==
table
->
space_id
);
if
(
!
table
->
data_dir_path
&&
table
->
space_id
)
{
if
(
!
table
->
data_dir_path
&&
table
->
space_id
&&
table
->
space
)
{
if
(
!
dict_mutex_own
)
{
if
(
!
dict_mutex_own
)
{
dict_mutex_enter_for_mysql
();
dict_mutex_enter_for_mysql
();
}
}
if
(
const
char
*
p
=
table
->
space
table
->
flags
|=
(
1
<<
DICT_TF_POS_DATA_DIR
);
?
table
->
space
->
chain
.
start
->
name
:
NULL
)
{
dict_save_data_dir_path
(
table
,
table
->
flags
|=
(
1
<<
DICT_TF_POS_DATA_DIR
);
table
->
space
->
chain
.
start
->
name
);
dict_save_data_dir_path
(
table
,
p
);
}
else
if
(
char
*
path
=
dict_get_first_path
(
table
->
space_id
))
{
table
->
flags
|=
(
1
<<
DICT_TF_POS_DATA_DIR
);
dict_save_data_dir_path
(
table
,
path
);
ut_free
(
path
);
}
if
(
table
->
data_dir_path
==
NULL
)
{
if
(
table
->
data_dir_path
==
NULL
)
{
/* Since we did not set the table data_dir_path,
/* Since we did not set the table data_dir_path,
...
...
storage/innobase/handler/handler0alter.cc
View file @
fde3d895
...
@@ -9560,9 +9560,14 @@ ha_innobase::commit_inplace_alter_table(
...
@@ -9560,9 +9560,14 @@ ha_innobase::commit_inplace_alter_table(
=
static_cast
<
ha_innobase_inplace_ctx
*>
(
*
pctx
);
=
static_cast
<
ha_innobase_inplace_ctx
*>
(
*
pctx
);
DBUG_ASSERT
(
new_clustered
==
ctx
->
need_rebuild
());
DBUG_ASSERT
(
new_clustered
==
ctx
->
need_rebuild
());
if
(
ctx
->
need_rebuild
()
&&
!
ctx
->
old_table
->
space
)
{
fail
=
commit_set_autoinc
(
ha_alter_info
,
ctx
,
altered_table
,
my_error
(
ER_TABLESPACE_DISCARDED
,
MYF
(
0
),
table
);
table
->
s
->
table_name
.
str
);
fail
=
true
;
}
else
{
fail
=
commit_set_autoinc
(
ha_alter_info
,
ctx
,
altered_table
,
table
);
}
if
(
fail
)
{
if
(
fail
)
{
}
else
if
(
ctx
->
need_rebuild
())
{
}
else
if
(
ctx
->
need_rebuild
())
{
...
...
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