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
82a56c21
Commit
82a56c21
authored
Jul 26, 2024
by
Julius Goryavsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-34647: experimental fix
parent
3359ac09
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
13 deletions
+35
-13
mysql-test/suite/galera/r/mdev-22063.result
mysql-test/suite/galera/r/mdev-22063.result
+6
-0
mysql-test/suite/galera/t/mdev-22063.test
mysql-test/suite/galera/t/mdev-22063.test
+7
-0
sql/sql_parse.cc
sql/sql_parse.cc
+22
-13
No files found.
mysql-test/suite/galera/r/mdev-22063.result
View file @
82a56c21
connection node_2;
connection node_1;
SET GLOBAL wsrep_mode = "REPLICATE_MYISAM,REPLICATE_ARIA";
connection node_2;
SET GLOBAL wsrep_mode = "REPLICATE_MYISAM,REPLICATE_ARIA";
connection node_1;
# Case 1 CREATE SEQUENCE with no NOCACHE
CREATE SEQUENCE s ENGINE=InnoDB;
ERROR 42000: This version of MariaDB doesn't yet support 'CACHE without INCREMENT BY 0 in Galera cluster'
...
...
@@ -239,3 +243,5 @@ pk
DROP TABLE t1;
DROP VIEW view_t1;
SET GLOBAL wsrep_mode=DEFAULT;
connection node_2;
SET GLOBAL wsrep_mode=DEFAULT;
mysql-test/suite/galera/t/mdev-22063.test
View file @
82a56c21
...
...
@@ -4,6 +4,11 @@
--
source
include
/
have_sequence
.
inc
--
source
include
/
have_aria
.
inc
SET
GLOBAL
wsrep_mode
=
"REPLICATE_MYISAM,REPLICATE_ARIA"
;
--
connection
node_2
SET
GLOBAL
wsrep_mode
=
"REPLICATE_MYISAM,REPLICATE_ARIA"
;
--
connection
node_1
--
echo
# Case 1 CREATE SEQUENCE with no NOCACHE
--
error
ER_NOT_SUPPORTED_YET
CREATE
SEQUENCE
s
ENGINE
=
InnoDB
;
...
...
@@ -182,3 +187,5 @@ SELECT * FROM t1;
DROP
TABLE
t1
;
DROP
VIEW
view_t1
;
SET
GLOBAL
wsrep_mode
=
DEFAULT
;
--
connection
node_2
SET
GLOBAL
wsrep_mode
=
DEFAULT
;
sql/sql_parse.cc
View file @
82a56c21
...
...
@@ -4705,23 +4705,32 @@ mysql_execute_command(THD *thd, bool is_called_from_prepared_stmt)
#ifdef WITH_WSREP
if
(
wsrep
&&
!
first_table
->
view
)
{
bool
is_innodb
=
first_table
->
table
->
file
->
partition_ht
()
->
db_type
==
DB_TYPE_INNODB
;
// For consistency check inserted table needs to be InnoDB
if
(
!
is_innodb
&&
thd
->
wsrep_consistency_check
!=
NO_CONSISTENCY_CHECK
)
const
legacy_db_type
db_type
=
first_table
->
table
->
file
->
partition_ht
()
->
db_type
;
// For InnoDB we don't need to worry about anything here:
if
(
db_type
!=
DB_TYPE_INNODB
)
{
push_warning_printf
(
thd
,
Sql_condition
::
WARN_LEVEL_WARN
,
HA_ERR_UNSUPPORTED
,
"Galera cluster does support consistency check only"
" for InnoDB tables."
);
thd
->
wsrep_consistency_check
=
NO_CONSISTENCY_CHECK
;
// If Aria or MyISAM are not replicated, then we have nothing to worry about either:
bool
replicate
=
(
db_type
==
DB_TYPE_MYISAM
&&
wsrep_check_mode
(
WSREP_MODE_REPLICATE_MYISAM
))
||
(
db_type
==
DB_TYPE_ARIA
&&
wsrep_check_mode
(
WSREP_MODE_REPLICATE_ARIA
));
if
(
replicate
)
{
// For consistency check inserted table needs to be InnoDB
if
(
thd
->
wsrep_consistency_check
!=
NO_CONSISTENCY_CHECK
)
{
push_warning_printf
(
thd
,
Sql_condition
::
WARN_LEVEL_WARN
,
HA_ERR_UNSUPPORTED
,
"Galera cluster does support consistency check only"
" for InnoDB tables."
);
thd
->
wsrep_consistency_check
=
NO_CONSISTENCY_CHECK
;
}
// We start TOI if it is not yet started and hope for the best
if
(
!
wsrep_toi
)
WSREP_TO_ISOLATION_BEGIN
(
first_table
->
db
.
str
,
first_table
->
table_name
.
str
,
NULL
);
}
}
// For !InnoDB we start TOI if it is not yet started and hope for the best
if
(
!
is_innodb
&&
!
wsrep_toi
)
WSREP_TO_ISOLATION_BEGIN
(
first_table
->
db
.
str
,
first_table
->
table_name
.
str
,
NULL
);
}
#endif
/* WITH_WSREP */
/*
Only the INSERT table should be merged. Other will be handled by
select.
...
...
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