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
97f7d4a9
Commit
97f7d4a9
authored
Jun 15, 2020
by
Vlad Lesin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-22726: Add check that one can't change general or slow log to a
transactional engine
parent
e3104c4a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
0 deletions
+23
-0
mysql-test/r/log_tables.result
mysql-test/r/log_tables.result
+6
-0
mysql-test/t/log_tables.test
mysql-test/t/log_tables.test
+8
-0
sql/share/errmsg-utf8.txt
sql/share/errmsg-utf8.txt
+2
-0
sql/sql_table.cc
sql/sql_table.cc
+7
-0
No files found.
mysql-test/r/log_tables.result
View file @
97f7d4a9
...
@@ -259,6 +259,12 @@ Warning 1286 Unknown storage engine 'NonExistentEngine'
...
@@ -259,6 +259,12 @@ Warning 1286 Unknown storage engine 'NonExistentEngine'
alter table mysql.slow_log engine=memory;
alter table mysql.slow_log engine=memory;
ERROR HY000: Storage engine MEMORY cannot be used for log tables
ERROR HY000: Storage engine MEMORY cannot be used for log tables
set storage_engine= @save_storage_engine;
set storage_engine= @save_storage_engine;
ALTER TABLE mysql.general_log ENGINE=Aria;
ERROR HY000: Only non-transactional Aria table can be used for logging
ALTER TABLE mysql.general_log ENGINE=Aria transactional = 0;
ALTER TABLE mysql.slow_log ENGINE=Aria;
ERROR HY000: Only non-transactional Aria table can be used for logging
ALTER TABLE mysql.slow_log ENGINE=Aria transactional = 0;
drop table mysql.slow_log;
drop table mysql.slow_log;
drop table mysql.general_log;
drop table mysql.general_log;
drop table mysql.general_log;
drop table mysql.general_log;
...
...
mysql-test/t/log_tables.test
View file @
97f7d4a9
...
@@ -269,6 +269,14 @@ alter table mysql.slow_log engine=memory;
...
@@ -269,6 +269,14 @@ alter table mysql.slow_log engine=memory;
#alter table mysql.slow_log engine=blackhole;
#alter table mysql.slow_log engine=blackhole;
set
storage_engine
=
@
save_storage_engine
;
set
storage_engine
=
@
save_storage_engine
;
# Make sure only non-transactional Aria table can be used for logging
--
error
ER_TRANSACTIONAL_ARIA_LOG_ENGINE
ALTER
TABLE
mysql
.
general_log
ENGINE
=
Aria
;
ALTER
TABLE
mysql
.
general_log
ENGINE
=
Aria
transactional
=
0
;
--
error
ER_TRANSACTIONAL_ARIA_LOG_ENGINE
ALTER
TABLE
mysql
.
slow_log
ENGINE
=
Aria
;
ALTER
TABLE
mysql
.
slow_log
ENGINE
=
Aria
transactional
=
0
;
drop
table
mysql
.
slow_log
;
drop
table
mysql
.
slow_log
;
drop
table
mysql
.
general_log
;
drop
table
mysql
.
general_log
;
...
...
sql/share/errmsg-utf8.txt
View file @
97f7d4a9
...
@@ -7731,3 +7731,5 @@ ER_GEOJSON_EMPTY_COORDINATES
...
@@ -7731,3 +7731,5 @@ ER_GEOJSON_EMPTY_COORDINATES
ER_MYROCKS_CANT_NOPAD_COLLATION
ER_MYROCKS_CANT_NOPAD_COLLATION
eng "MyRocks doesn't currently support collations with \"No pad\" attribute."
eng "MyRocks doesn't currently support collations with \"No pad\" attribute."
ER_TRANSACTIONAL_ARIA_LOG_ENGINE
eng "Only non-transactional Aria table can be used for logging"
sql/sql_table.cc
View file @
97f7d4a9
...
@@ -8925,6 +8925,13 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
...
@@ -8925,6 +8925,13 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
DBUG_RETURN
(
true
);
DBUG_RETURN
(
true
);
}
}
if
(
create_info
->
db_type
==
maria_hton
&&
create_info
->
transactional
!=
HA_CHOICE_NO
)
{
my_error
(
ER_TRANSACTIONAL_ARIA_LOG_ENGINE
,
MYF
(
0
));
DBUG_RETURN
(
true
);
}
#ifdef WITH_PARTITION_STORAGE_ENGINE
#ifdef WITH_PARTITION_STORAGE_ENGINE
if
(
alter_info
->
flags
&
Alter_info
::
ALTER_PARTITION
)
if
(
alter_info
->
flags
&
Alter_info
::
ALTER_PARTITION
)
{
{
...
...
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