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
a3dd7ea0
Commit
a3dd7ea0
authored
Dec 21, 2023
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge 10.4 into 10.5
parents
cfaab614
c712a530
Changes
29
Show whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
416 additions
and
489 deletions
+416
-489
include/my_pthread.h
include/my_pthread.h
+2
-2
mysql-test/main/execution_constants.test
mysql-test/main/execution_constants.test
+1
-0
mysql-test/main/lotofstack.result
mysql-test/main/lotofstack.result
+101
-0
mysql-test/main/lotofstack.test
mysql-test/main/lotofstack.test
+133
-0
mysql-test/main/sp_notembedded.result
mysql-test/main/sp_notembedded.result
+0
-119
mysql-test/main/sp_notembedded.test
mysql-test/main/sp_notembedded.test
+0
-161
mysql-test/suite/galera/disabled.def
mysql-test/suite/galera/disabled.def
+1
-1
mysql-test/suite/galera/r/MDEV-31272.result
mysql-test/suite/galera/r/MDEV-31272.result
+36
-0
mysql-test/suite/galera/t/MDEV-31272.combinations
mysql-test/suite/galera/t/MDEV-31272.combinations
+5
-0
mysql-test/suite/galera/t/MDEV-31272.test
mysql-test/suite/galera/t/MDEV-31272.test
+58
-0
mysql-test/suite/wsrep/disabled.def
mysql-test/suite/wsrep/disabled.def
+0
-4
mysql-test/suite/wsrep/r/MDEV-22443.result
mysql-test/suite/wsrep/r/MDEV-22443.result
+0
-3
mysql-test/suite/wsrep/r/MDEV-23092.result
mysql-test/suite/wsrep/r/MDEV-23092.result
+0
-13
mysql-test/suite/wsrep/r/mdev_6832.result
mysql-test/suite/wsrep/r/mdev_6832.result
+0
-11
mysql-test/suite/wsrep/r/wsrep_variables_no_provider.result
mysql-test/suite/wsrep/r/wsrep_variables_no_provider.result
+0
-44
mysql-test/suite/wsrep/t/MDEV-22443.cnf
mysql-test/suite/wsrep/t/MDEV-22443.cnf
+0
-8
mysql-test/suite/wsrep/t/MDEV-22443.test
mysql-test/suite/wsrep/t/MDEV-22443.test
+0
-12
mysql-test/suite/wsrep/t/MDEV-23092.cnf
mysql-test/suite/wsrep/t/MDEV-23092.cnf
+0
-8
mysql-test/suite/wsrep/t/MDEV-23092.test
mysql-test/suite/wsrep/t/MDEV-23092.test
+0
-22
mysql-test/suite/wsrep/t/mdev_6832.cnf
mysql-test/suite/wsrep/t/mdev_6832.cnf
+0
-7
mysql-test/suite/wsrep/t/mdev_6832.test
mysql-test/suite/wsrep/t/mdev_6832.test
+0
-17
mysql-test/suite/wsrep/t/wsrep_variables_no_provider.cnf
mysql-test/suite/wsrep/t/wsrep_variables_no_provider.cnf
+0
-12
mysql-test/suite/wsrep/t/wsrep_variables_no_provider.test
mysql-test/suite/wsrep/t/wsrep_variables_no_provider.test
+0
-38
sql/log.cc
sql/log.cc
+9
-0
sql/log.h
sql/log.h
+1
-0
sql/wsrep_trans_observer.h
sql/wsrep_trans_observer.h
+7
-1
storage/spider/mysql-test/spider/bugfix/r/mdev_32986.result
storage/spider/mysql-test/spider/bugfix/r/mdev_32986.result
+23
-0
storage/spider/mysql-test/spider/bugfix/t/mdev_32986.test
storage/spider/mysql-test/spider/bugfix/t/mdev_32986.test
+28
-0
storage/spider/spd_db_mysql.cc
storage/spider/spd_db_mysql.cc
+11
-6
No files found.
include/my_pthread.h
View file @
a3dd7ea0
...
...
@@ -674,10 +674,10 @@ extern void my_mutex_end(void);
by GCC 12.3.0, GCC 13.2.0, or clang 16.0.6
would fail ./mtr main.1st when the stack size is 5 MiB.
The minimum is more than 6 MiB for CMAKE_BUILD_TYPE=RelWithDebInfo and
more than
8
MiB for CMAKE_BUILD_TYPE=Debug.
more than
10
MiB for CMAKE_BUILD_TYPE=Debug.
Let us add some safety margin.
*/
# define DEFAULT_THREAD_STACK (1
0
L<<20)
# define DEFAULT_THREAD_STACK (1
1
L<<20)
# else
# define DEFAULT_THREAD_STACK (292*1024L)
/* 299008 */
# endif
...
...
mysql-test/main/execution_constants.test
View file @
a3dd7ea0
# In embedded server we don't really have a control over stack usage
--
source
include
/
not_embedded
.
inc
--
source
include
/
not_asan
.
inc
#
# Bug#21476: Lost Database Connection During Query
...
...
mysql-test/main/lotofstack.result
0 → 100644
View file @
a3dd7ea0
create function bug10100f(prm int) returns int
begin
if prm > 1 then
return prm * bug10100f(prm - 1);
end if;
return 1;
end|
set statement sql_mode = '' for
create procedure bug10100p(prm int, inout res int)
begin
set res = res * prm;
if prm > 1 then
call bug10100p(prm - 1, res);
end if;
end|
set statement sql_mode = '' for
create procedure bug10100t(prm int)
begin
declare res int;
set res = 1;
call bug10100p(prm, res);
select res;
end|
create table t3 (a int)|
insert into t3 values (0)|
create view v1 as select a from t3|
create procedure bug10100pt(level int, lim int)
begin
if level < lim then
update t3 set a=level;
FLUSH TABLES;
call bug10100pt(level+1, lim);
else
select * from t3;
end if;
end|
create procedure bug10100pv(level int, lim int)
begin
if level < lim then
update v1 set a=level;
FLUSH TABLES;
call bug10100pv(level+1, lim);
else
select * from v1;
end if;
end|
prepare stmt2 from "select * from t3;";
create procedure bug10100pd(level int, lim int)
begin
if level < lim then
select level;
prepare stmt1 from "update t3 set a=a+2";
execute stmt1;
FLUSH TABLES;
execute stmt1;
FLUSH TABLES;
execute stmt1;
FLUSH TABLES;
deallocate prepare stmt1;
execute stmt2;
select * from t3;
call bug10100pd(level+1, lim);
else
execute stmt2;
end if;
end|
create procedure bug10100pc(level int, lim int)
begin
declare lv int;
declare c cursor for select a from t3;
open c;
if level < lim then
select level;
fetch c into lv;
select lv;
update t3 set a=level+lv;
FLUSH TABLES;
call bug10100pc(level+1, lim);
else
select * from t3;
end if;
close c;
end|
set @@max_sp_recursion_depth=255|
set @var=1|
call bug10100p(255, @var)|
call bug10100pt(1,255)|
call bug10100pv(1,255)|
call bug10100pd(1,255)|
call bug10100pc(1,255)|
set @@max_sp_recursion_depth=0|
deallocate prepare stmt2|
drop function bug10100f|
drop procedure bug10100p|
drop procedure bug10100t|
drop procedure bug10100pt|
drop procedure bug10100pv|
drop procedure bug10100pd|
drop procedure bug10100pc|
drop view v1|
drop table t3|
mysql-test/main/lotofstack.test
0 → 100644
View file @
a3dd7ea0
#
# For tests that need a lot of stack - they likely won't work under ASAN
#
source
include
/
not_asan
.
inc
;
source
include
/
not_embedded
.
inc
;
#
# Bug#10100 function (and stored procedure?) recursivity problem
#
# routines with simple recursion
delimiter
|
;
create
function
bug10100f
(
prm
int
)
returns
int
begin
if
prm
>
1
then
return
prm
*
bug10100f
(
prm
-
1
);
end
if
;
return
1
;
end
|
set
statement
sql_mode
=
''
for
create
procedure
bug10100p
(
prm
int
,
inout
res
int
)
begin
set
res
=
res
*
prm
;
if
prm
>
1
then
call
bug10100p
(
prm
-
1
,
res
);
end
if
;
end
|
set
statement
sql_mode
=
''
for
create
procedure
bug10100t
(
prm
int
)
begin
declare
res
int
;
set
res
=
1
;
call
bug10100p
(
prm
,
res
);
select
res
;
end
|
# a procedure which use tables and recursion
create
table
t3
(
a
int
)
|
insert
into
t3
values
(
0
)
|
create
view
v1
as
select
a
from
t3
|
create
procedure
bug10100pt
(
level
int
,
lim
int
)
begin
if
level
<
lim
then
update
t3
set
a
=
level
;
FLUSH
TABLES
;
call
bug10100pt
(
level
+
1
,
lim
);
else
select
*
from
t3
;
end
if
;
end
|
# view & recursion
create
procedure
bug10100pv
(
level
int
,
lim
int
)
begin
if
level
<
lim
then
update
v1
set
a
=
level
;
FLUSH
TABLES
;
call
bug10100pv
(
level
+
1
,
lim
);
else
select
*
from
v1
;
end
if
;
end
|
# dynamic sql & recursion
prepare
stmt2
from
"select * from t3;"
;
create
procedure
bug10100pd
(
level
int
,
lim
int
)
begin
if
level
<
lim
then
select
level
;
prepare
stmt1
from
"update t3 set a=a+2"
;
execute
stmt1
;
FLUSH
TABLES
;
execute
stmt1
;
FLUSH
TABLES
;
execute
stmt1
;
FLUSH
TABLES
;
deallocate
prepare
stmt1
;
execute
stmt2
;
select
*
from
t3
;
call
bug10100pd
(
level
+
1
,
lim
);
else
execute
stmt2
;
end
if
;
end
|
# cursor & recursion
create
procedure
bug10100pc
(
level
int
,
lim
int
)
begin
declare
lv
int
;
declare
c
cursor
for
select
a
from
t3
;
open
c
;
if
level
<
lim
then
select
level
;
fetch
c
into
lv
;
select
lv
;
update
t3
set
a
=
level
+
lv
;
FLUSH
TABLES
;
call
bug10100pc
(
level
+
1
,
lim
);
else
select
*
from
t3
;
end
if
;
close
c
;
end
|
# end of the stack checking
set
@@
max_sp_recursion_depth
=
255
|
set
@
var
=
1
|
# disable log because error about stack overrun contains numbers which
# depend on a system
--
disable_ps_protocol
--
disable_result_log
--
error
ER_STACK_OVERRUN_NEED_MORE
call
bug10100p
(
255
,
@
var
)
|
--
error
ER_STACK_OVERRUN_NEED_MORE
call
bug10100pt
(
1
,
255
)
|
--
error
ER_STACK_OVERRUN_NEED_MORE
call
bug10100pv
(
1
,
255
)
|
--
error
ER_STACK_OVERRUN_NEED_MORE
call
bug10100pd
(
1
,
255
)
|
--
error
ER_STACK_OVERRUN_NEED_MORE
call
bug10100pc
(
1
,
255
)
|
--
enable_result_log
--
enable_ps_protocol
set
@@
max_sp_recursion_depth
=
0
|
deallocate
prepare
stmt2
|
drop
function
bug10100f
|
drop
procedure
bug10100p
|
drop
procedure
bug10100t
|
drop
procedure
bug10100pt
|
drop
procedure
bug10100pv
|
drop
procedure
bug10100pd
|
drop
procedure
bug10100pc
|
drop
view
v1
|
drop
table
t3
|
delimiter
;
|
mysql-test/main/sp_notembedded.result
View file @
a3dd7ea0
set @old_concurrent_insert= @@global.concurrent_insert;
set @@global.concurrent_insert= 0;
drop table if exists t1,t3;
drop procedure if exists bug4902|
create procedure bug4902()
begin
show grants for 'root'@'localhost';
...
...
@@ -15,7 +13,6 @@ Grants for root@localhost
GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION
GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION
drop procedure bug4902|
drop procedure if exists bug4902_2|
create procedure bug4902_2()
begin
show processlist;
...
...
@@ -23,13 +20,10 @@ end|
call bug4902_2()|
show warnings|
Level Code Message
Note 1305 PROCEDURE test.bug4902_2 does not exist
call bug4902_2()|
show warnings|
Level Code Message
Note 1305 PROCEDURE test.bug4902_2 does not exist
drop procedure bug4902_2|
drop procedure if exists bug6807|
create procedure bug6807()
begin
declare a int;
...
...
@@ -42,116 +36,6 @@ ERROR 70100: Query execution was interrupted
call bug6807()|
ERROR 70100: Query execution was interrupted
drop procedure bug6807|
drop function if exists bug10100f|
drop procedure if exists bug10100p|
drop procedure if exists bug10100t|
drop procedure if exists bug10100pt|
drop procedure if exists bug10100pv|
drop procedure if exists bug10100pd|
drop procedure if exists bug10100pc|
create function bug10100f(prm int) returns int
begin
if prm > 1 then
return prm * bug10100f(prm - 1);
end if;
return 1;
end|
set statement sql_mode = '' for
create procedure bug10100p(prm int, inout res int)
begin
set res = res * prm;
if prm > 1 then
call bug10100p(prm - 1, res);
end if;
end|
set statement sql_mode = '' for
create procedure bug10100t(prm int)
begin
declare res int;
set res = 1;
call bug10100p(prm, res);
select res;
end|
create table t3 (a int)|
insert into t3 values (0)|
create view v1 as select a from t3|
create procedure bug10100pt(level int, lim int)
begin
if level < lim then
update t3 set a=level;
FLUSH TABLES;
call bug10100pt(level+1, lim);
else
select * from t3;
end if;
end|
create procedure bug10100pv(level int, lim int)
begin
if level < lim then
update v1 set a=level;
FLUSH TABLES;
call bug10100pv(level+1, lim);
else
select * from v1;
end if;
end|
prepare stmt2 from "select * from t3;";
create procedure bug10100pd(level int, lim int)
begin
if level < lim then
select level;
prepare stmt1 from "update t3 set a=a+2";
execute stmt1;
FLUSH TABLES;
execute stmt1;
FLUSH TABLES;
execute stmt1;
FLUSH TABLES;
deallocate prepare stmt1;
execute stmt2;
select * from t3;
call bug10100pd(level+1, lim);
else
execute stmt2;
end if;
end|
create procedure bug10100pc(level int, lim int)
begin
declare lv int;
declare c cursor for select a from t3;
open c;
if level < lim then
select level;
fetch c into lv;
select lv;
update t3 set a=level+lv;
FLUSH TABLES;
call bug10100pc(level+1, lim);
else
select * from t3;
end if;
close c;
end|
set @@max_sp_recursion_depth=255|
set @var=1|
call bug10100p(255, @var)|
call bug10100pt(1,255)|
call bug10100pv(1,255)|
call bug10100pd(1,255)|
call bug10100pc(1,255)|
set @@max_sp_recursion_depth=0|
deallocate prepare stmt2|
drop function bug10100f|
drop procedure bug10100p|
drop procedure bug10100t|
drop procedure bug10100pt|
drop procedure bug10100pv|
drop procedure bug10100pd|
drop procedure bug10100pc|
drop view v1|
drop table t3|
drop procedure if exists bug15298_1;
drop procedure if exists bug15298_2;
create user 'mysqltest_1'@'localhost';
grant all privileges on test.* to 'mysqltest_1'@'localhost';
create procedure 15298_1 () sql security definer show grants for current_user;
...
...
@@ -170,8 +54,6 @@ disconnect con1;
drop user mysqltest_1@localhost;
drop procedure 15298_1;
drop procedure 15298_2;
drop table if exists t1;
drop procedure if exists p1;
create table t1 (value varchar(15));
create procedure p1() update t1 set value='updated' where value='old';
call p1();
...
...
@@ -283,7 +165,6 @@ disconnect con2;
# functions in databases which names contained dot.
#
connection default;
DROP DATABASE IF EXISTS `my.db`;
create database `my.db`;
use `my.db`;
CREATE FUNCTION f1(a int) RETURNS INT RETURN a;
...
...
mysql-test/main/sp_notembedded.test
View file @
a3dd7ea0
...
...
@@ -7,19 +7,12 @@ set @@global.concurrent_insert= 0;
# Save the initial number of concurrent sessions
--
source
include
/
count_sessions
.
inc
--
disable_warnings
drop
table
if
exists
t1
,
t3
;
--
enable_warnings
delimiter
|
;
#
# Bug#4902 Stored procedure with SHOW WARNINGS leads to packet error
#
# Added tests for show grants command
--
disable_warnings
drop
procedure
if
exists
bug4902
|
--
enable_warnings
create
procedure
bug4902
()
begin
show
grants
for
'root'
@
'localhost'
;
...
...
@@ -38,9 +31,6 @@ call bug4902()|
drop
procedure
bug4902
|
# We need separate SP for SHOW PROCESSLIST since we want use replace_column
--
disable_warnings
drop
procedure
if
exists
bug4902_2
|
--
enable_warnings
create
procedure
bug4902_2
()
begin
show
processlist
;
...
...
@@ -58,9 +48,6 @@ drop procedure bug4902_2|
#
# Bug#6807 Stored procedure crash if CREATE PROCEDURE ... KILL QUERY
#
--
disable_warnings
drop
procedure
if
exists
bug6807
|
--
enable_warnings
create
procedure
bug6807
()
begin
declare
a
int
;
...
...
@@ -77,150 +64,11 @@ call bug6807()|
drop
procedure
bug6807
|
#
# Bug#10100 function (and stored procedure?) recursivity problem
#
--
disable_warnings
drop
function
if
exists
bug10100f
|
drop
procedure
if
exists
bug10100p
|
drop
procedure
if
exists
bug10100t
|
drop
procedure
if
exists
bug10100pt
|
drop
procedure
if
exists
bug10100pv
|
drop
procedure
if
exists
bug10100pd
|
drop
procedure
if
exists
bug10100pc
|
--
enable_warnings
# routines with simple recursion
create
function
bug10100f
(
prm
int
)
returns
int
begin
if
prm
>
1
then
return
prm
*
bug10100f
(
prm
-
1
);
end
if
;
return
1
;
end
|
set
statement
sql_mode
=
''
for
create
procedure
bug10100p
(
prm
int
,
inout
res
int
)
begin
set
res
=
res
*
prm
;
if
prm
>
1
then
call
bug10100p
(
prm
-
1
,
res
);
end
if
;
end
|
set
statement
sql_mode
=
''
for
create
procedure
bug10100t
(
prm
int
)
begin
declare
res
int
;
set
res
=
1
;
call
bug10100p
(
prm
,
res
);
select
res
;
end
|
# a procedure which use tables and recursion
create
table
t3
(
a
int
)
|
insert
into
t3
values
(
0
)
|
create
view
v1
as
select
a
from
t3
|
create
procedure
bug10100pt
(
level
int
,
lim
int
)
begin
if
level
<
lim
then
update
t3
set
a
=
level
;
FLUSH
TABLES
;
call
bug10100pt
(
level
+
1
,
lim
);
else
select
*
from
t3
;
end
if
;
end
|
# view & recursion
create
procedure
bug10100pv
(
level
int
,
lim
int
)
begin
if
level
<
lim
then
update
v1
set
a
=
level
;
FLUSH
TABLES
;
call
bug10100pv
(
level
+
1
,
lim
);
else
select
*
from
v1
;
end
if
;
end
|
# dynamic sql & recursion
prepare
stmt2
from
"select * from t3;"
;
create
procedure
bug10100pd
(
level
int
,
lim
int
)
begin
if
level
<
lim
then
select
level
;
prepare
stmt1
from
"update t3 set a=a+2"
;
execute
stmt1
;
FLUSH
TABLES
;
execute
stmt1
;
FLUSH
TABLES
;
execute
stmt1
;
FLUSH
TABLES
;
deallocate
prepare
stmt1
;
execute
stmt2
;
select
*
from
t3
;
call
bug10100pd
(
level
+
1
,
lim
);
else
execute
stmt2
;
end
if
;
end
|
# cursor & recursion
create
procedure
bug10100pc
(
level
int
,
lim
int
)
begin
declare
lv
int
;
declare
c
cursor
for
select
a
from
t3
;
open
c
;
if
level
<
lim
then
select
level
;
fetch
c
into
lv
;
select
lv
;
update
t3
set
a
=
level
+
lv
;
FLUSH
TABLES
;
call
bug10100pc
(
level
+
1
,
lim
);
else
select
*
from
t3
;
end
if
;
close
c
;
end
|
# end of the stack checking
set
@@
max_sp_recursion_depth
=
255
|
set
@
var
=
1
|
# disable log because error about stack overrun contains numbers which
# depend on a system
--
disable_result_log
--
error
ER_STACK_OVERRUN_NEED_MORE
call
bug10100p
(
255
,
@
var
)
|
--
error
ER_STACK_OVERRUN_NEED_MORE
call
bug10100pt
(
1
,
255
)
|
--
error
ER_STACK_OVERRUN_NEED_MORE
call
bug10100pv
(
1
,
255
)
|
--
error
ER_STACK_OVERRUN_NEED_MORE
call
bug10100pd
(
1
,
255
)
|
--
error
ER_STACK_OVERRUN_NEED_MORE
call
bug10100pc
(
1
,
255
)
|
--
enable_result_log
set
@@
max_sp_recursion_depth
=
0
|
deallocate
prepare
stmt2
|
drop
function
bug10100f
|
drop
procedure
bug10100p
|
drop
procedure
bug10100t
|
drop
procedure
bug10100pt
|
drop
procedure
bug10100pv
|
drop
procedure
bug10100pd
|
drop
procedure
bug10100pc
|
drop
view
v1
|
drop
table
t3
|
delimiter
;
|
#
# Bug#15298 SHOW GRANTS FOR CURRENT_USER: Incorrect output in DEFINER context
#
--
disable_warnings
drop
procedure
if
exists
bug15298_1
;
drop
procedure
if
exists
bug15298_2
;
--
enable_warnings
create
user
'mysqltest_1'
@
'localhost'
;
grant
all
privileges
on
test
.*
to
'mysqltest_1'
@
'localhost'
;
create
procedure
15298_1
()
sql
security
definer
show
grants
for
current_user
;
...
...
@@ -240,11 +88,6 @@ drop procedure 15298_2;
# Bug#29936 Stored Procedure DML ignores low_priority_updates setting
#
--
disable_warnings
drop
table
if
exists
t1
;
drop
procedure
if
exists
p1
;
--
enable_warnings
create
table
t1
(
value
varchar
(
15
));
create
procedure
p1
()
update
t1
set
value
=
'updated'
where
value
=
'old'
;
...
...
@@ -409,10 +252,6 @@ DROP FUNCTION f1;
connection
default
;
--
disable_warnings
DROP
DATABASE
IF
EXISTS
`my.db`
;
--
enable_warnings
create
database
`my.db`
;
use
`my.db`
;
...
...
mysql-test/suite/galera/disabled.def
View file @
a3dd7ea0
...
...
@@ -24,4 +24,4 @@ galera_sst_mysqldump_with_key : MDEV-32782 galera_sst_mysqldump_with_key test fa
mdev-31285 : MDEV-25089 Assertion `error.len > 0' failed in galera::ReplicatorSMM::handle_apply_error()
galera_var_ignore_apply_errors : MENT-1997 galera_var_ignore_apply_errors test freezes
MW-402 : temporarily disabled at the request of Codership
MDEV-22232 : temporarily disabled at the request of Codership
galera_desync_overlapped : MDEV-21538 galera_desync_overlapped MTR failed: Result content mismatch
mysql-test/suite/galera/r/MDEV-31272.result
0 → 100644
View file @
a3dd7ea0
connection node_2;
connection node_1;
connection node_1;
CREATE TABLE t1 (f1 int primary key, f2 int);
INSERT INTO t1 VALUES (1,0);
BEGIN;
INSERT INTO t1 VALUES (2,4),(1,1);
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
COMMIT;
Writesets replicated (expect 0)
0
connection node_1;
SELECT * FROM t1;
f1 f2
1 0
connection node_2;
SELECT * FROM t1;
f1 f2
1 0
DROP TABLE t1;
connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 INTEGER);
INSERT INTO t1 VALUES (1,0);
INSERT INTO t1 VALUES (2,4), (1,1);
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
Writesets replicated (expect 0)
0
connection node_1;
SELECT * FROM t1;
f1 f2
1 0
connection node_2;
SELECT * FROM t1;
f1 f2
1 0
DROP TABLE t1;
mysql-test/suite/galera/t/MDEV-31272.combinations
0 → 100644
View file @
a3dd7ea0
[binlogon]
log-bin
log-slave-updates=ON
[binlogoff]
mysql-test/suite/galera/t/MDEV-31272.test
0 → 100644
View file @
a3dd7ea0
#
# MDEV-31272: Statement rollback causes empty writeset replication
#
--
source
include
/
galera_cluster
.
inc
#
# Case 1: Multi statement transaction
#
--
connection
node_1
CREATE
TABLE
t1
(
f1
int
primary
key
,
f2
int
);
INSERT
INTO
t1
VALUES
(
1
,
0
);
--
let
$replicated_old
=
`SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_replicated'`
BEGIN
;
--
error
ER_DUP_ENTRY
INSERT
INTO
t1
VALUES
(
2
,
4
),(
1
,
1
);
COMMIT
;
--
let
$replicated_new
=
`SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_replicated'`
--
disable_query_log
--
eval
SELECT
$replicated_new
-
$replicated_old
AS
'Writesets replicated (expect 0)'
;
--
enable_query_log
--
connection
node_1
SELECT
*
FROM
t1
;
--
connection
node_2
SELECT
*
FROM
t1
;
DROP
TABLE
t1
;
#
# Case 2: autocommit statement
#
--
connection
node_1
CREATE
TABLE
t1
(
f1
INTEGER
PRIMARY
KEY
,
f2
INTEGER
);
INSERT
INTO
t1
VALUES
(
1
,
0
);
--
let
$replicated_old
=
`SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_replicated'`
--
error
ER_DUP_ENTRY
INSERT
INTO
t1
VALUES
(
2
,
4
),
(
1
,
1
);
--
let
$replicated_new
=
`SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_replicated'`
--
disable_query_log
--
eval
SELECT
$replicated_new
-
$replicated_old
AS
'Writesets replicated (expect 0)'
;
--
enable_query_log
--
connection
node_1
SELECT
*
FROM
t1
;
--
connection
node_2
SELECT
*
FROM
t1
;
DROP
TABLE
t1
;
mysql-test/suite/wsrep/disabled.def
View file @
a3dd7ea0
...
...
@@ -11,7 +11,3 @@
##############################################################################
mdev_6832: wsrep_provider is read-only for security reasons
MDEV-23092: wsrep_provider is read-only for security reasons
wsrep_variables_no_provider: wsrep_provider is read-only for security reasons
MDEV-22443: it is no longer allowed enable wsrep_on if wsrep_provider is 'none'
mysql-test/suite/wsrep/r/MDEV-22443.result
deleted
100644 → 0
View file @
cfaab614
SET SESSION wsrep_sync_wait=15;
SET SESSION wsrep_on=1;
START TRANSACTION READ WRITE;
mysql-test/suite/wsrep/r/MDEV-23092.result
deleted
100644 → 0
View file @
cfaab614
SET COLLATION_CONNECTION='utf16le_bin';
SET GLOBAL wsrep_provider='/invalid/path/libgalera_smm.so';
ERROR 42000: Variable 'wsrep_provider' can't be set to the value of '/'
SET GLOBAL wsrep_cluster_address='OFF';
SET GLOBAL wsrep_slave_threads=10;
SELECT 1;
1
1
SET GLOBAL wsrep_cluster_address='gcomm://';
SET GLOBAL wsrep_slave_threads=DEFAULT;
CALL mtr.add_suppression("wsrep_load()");
CALL mtr.add_suppression("Failed to create a new provider");
CALL mtr.add_suppression("Failed to load provider");
mysql-test/suite/wsrep/r/mdev_6832.result
deleted
100644 → 0
View file @
cfaab614
#
# MDEV-6832: ER_LOCK_WAIT_TIMEOUT on SHOW STATUS
#
SHOW STATUS LIKE 'wsrep_ready';
Variable_name Value
wsrep_ready ON
SHOW STATUS LIKE 'wsrep_ready';
Variable_name Value
wsrep_ready OFF
SET @@global.wsrep_cluster_address='gcomm://';
# End of test.
mysql-test/suite/wsrep/r/wsrep_variables_no_provider.result
deleted
100644 → 0
View file @
cfaab614
SELECT @@wsrep_on;
@@wsrep_on
1
SET @wsrep_slave_threads_global_saved = @@global.wsrep_slave_threads;
SET @wsrep_debug_saved = @@global.wsrep_debug;
SET @wsrep_provider_options_saved= @@global.wsrep_provider_options;
SET @wsrep_cluster_address_saved= @@global.wsrep_cluster_address;
SET GLOBAL wsrep_provider=none;
SET SESSION wsrep_trx_fragment_size=DEFAULT;
ERROR HY000: Incorrect arguments to SET
SELECT @@session.wsrep_trx_fragment_size;
@@session.wsrep_trx_fragment_size
0
SET GLOBAL wsrep_start_position='12345678-1234-1234-1234-123456789012:100';
ERROR 42000: Variable 'wsrep_start_position' can't be set to the value of '12345678-1234-1234-1234-123456789012:100'
SHOW WARNINGS;
Level Code Message
Warning 1231 Cannot set 'wsrep_start_position' because wsrep is switched off or provider is not loaded
Error 1231 Variable 'wsrep_start_position' can't be set to the value of '12345678-1234-1234-1234-123456789012:100'
SELECT @@global.wsrep_start_position;
@@global.wsrep_start_position
00000000-0000-0000-0000-000000000000:-1
SET GLOBAL wsrep_debug=1;
Warnings:
Warning 1231 Setting 'wsrep_debug' has no effect because wsrep is switched off
SELECT @@global.wsrep_debug;
@@global.wsrep_debug
NONE
SET GLOBAL wsrep_slave_threads=5;
SELECT @@global.wsrep_slave_threads;
@@global.wsrep_slave_threads
5
SET GLOBAL wsrep_desync=1;
ERROR HY000: WSREP (galera) not started
SELECT @@global.wsrep_desync;
@@global.wsrep_desync
0
SET SESSION wsrep_trx_fragment_unit='rows';
ERROR HY000: Incorrect arguments to SET
SELECT @@session.wsrep_trx_fragment_unit;
@@session.wsrep_trx_fragment_unit
rows
SET @@global.wsrep_slave_threads = @wsrep_slave_threads_global_saved;
SET @@global.wsrep_debug = @wsrep_debug_saved;
mysql-test/suite/wsrep/t/MDEV-22443.cnf
deleted
100644 → 0
View file @
cfaab614
!include ../my.cnf
[mysqld.1]
wsrep-on=OFF
binlog-format=ROW
wsrep-provider=none
wsrep-cluster-address='gcomm://'
innodb_autoinc_lock_mode=2
mysql-test/suite/wsrep/t/MDEV-22443.test
deleted
100644 → 0
View file @
cfaab614
#
# MDEV-22443: terminate called after throwing an instance of
# 'wsrep::runtime_error' in std::terminate on START TRANSACTION
#
--
source
include
/
have_innodb
.
inc
--
source
include
/
have_wsrep
.
inc
--
source
include
/
have_binlog_format_row
.
inc
SET
SESSION
wsrep_sync_wait
=
15
;
SET
SESSION
wsrep_on
=
1
;
START
TRANSACTION
READ
WRITE
;
mysql-test/suite/wsrep/t/MDEV-23092.cnf
deleted
100644 → 0
View file @
cfaab614
!include ../my.cnf
[mysqld.1]
wsrep-on=OFF
binlog-format=ROW
wsrep-provider=none
wsrep-cluster-address='gcomm://'
innodb_autoinc_lock_mode=2
mysql-test/suite/wsrep/t/MDEV-23092.test
deleted
100644 → 0
View file @
cfaab614
#
# MDEV-23092: SIGABRT in wsrep::server_state::provider when setting
# invalid wsrep_provider (on optimized builds)
#
--
source
include
/
have_innodb
.
inc
--
source
include
/
have_wsrep
.
inc
--
source
include
/
have_binlog_format_row
.
inc
SET
COLLATION_CONNECTION
=
'utf16le_bin'
;
--
error
1231
SET
GLOBAL
wsrep_provider
=
'/invalid/path/libgalera_smm.so'
;
SET
GLOBAL
wsrep_cluster_address
=
'OFF'
;
SET
GLOBAL
wsrep_slave_threads
=
10
;
SELECT
1
;
SET
GLOBAL
wsrep_cluster_address
=
'gcomm://'
;
SET
GLOBAL
wsrep_slave_threads
=
DEFAULT
;
CALL
mtr
.
add_suppression
(
"wsrep_load()"
);
CALL
mtr
.
add_suppression
(
"Failed to create a new provider"
);
CALL
mtr
.
add_suppression
(
"Failed to load provider"
);
mysql-test/suite/wsrep/t/mdev_6832.cnf
deleted
100644 → 0
View file @
cfaab614
!include ../my.cnf
[mysqld.1]
wsrep-on=ON
wsrep-provider=@ENV.WSREP_PROVIDER
wsrep-cluster-address=gcomm://
mysql-test/suite/wsrep/t/mdev_6832.test
deleted
100644 → 0
View file @
cfaab614
--
source
include
/
have_innodb
.
inc
--
source
include
/
have_wsrep_provider
.
inc
--
source
include
/
have_binlog_format_row
.
inc
--
echo
#
--
echo
# MDEV-6832: ER_LOCK_WAIT_TIMEOUT on SHOW STATUS
--
echo
#
SHOW
STATUS
LIKE
'wsrep_ready'
;
--
disable_query_log
eval
SET
@@
global
.
wsrep_provider
=
'$WSREP_PROVIDER'
;
--
enable_query_log
SHOW
STATUS
LIKE
'wsrep_ready'
;
SET
@@
global
.
wsrep_cluster_address
=
'gcomm://'
;
--
let
$wait_condition
=
SELECT
VARIABLE_VALUE
=
'ON'
FROM
INFORMATION_SCHEMA
.
GLOBAL_STATUS
WHERE
VARIABLE_NAME
=
'wsrep_ready'
;
--
source
include
/
wait_condition
.
inc
--
echo
# End of test.
mysql-test/suite/wsrep/t/wsrep_variables_no_provider.cnf
deleted
100644 → 0
View file @
cfaab614
# Use default setting for mysqld processes
!include include/default_mysqld.cnf
[mysqld.1]
wsrep-on=ON
binlog-format=ROW
wsrep-provider=@ENV.WSREP_PROVIDER
wsrep-cluster-address='gcomm://'
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
mysql-test/suite/wsrep/t/wsrep_variables_no_provider.test
deleted
100644 → 0
View file @
cfaab614
--
source
include
/
have_wsrep
.
inc
--
source
include
/
have_innodb
.
inc
SELECT
@@
wsrep_on
;
SET
@
wsrep_slave_threads_global_saved
=
@@
global
.
wsrep_slave_threads
;
SET
@
wsrep_debug_saved
=
@@
global
.
wsrep_debug
;
SET
@
wsrep_provider_options_saved
=
@@
global
.
wsrep_provider_options
;
SET
@
wsrep_cluster_address_saved
=
@@
global
.
wsrep_cluster_address
;
SET
GLOBAL
wsrep_provider
=
none
;
--
error
ER_WRONG_ARGUMENTS
SET
SESSION
wsrep_trx_fragment_size
=
DEFAULT
;
SELECT
@@
session
.
wsrep_trx_fragment_size
;
--
error
ER_WRONG_VALUE_FOR_VAR
SET
GLOBAL
wsrep_start_position
=
'12345678-1234-1234-1234-123456789012:100'
;
SHOW
WARNINGS
;
SELECT
@@
global
.
wsrep_start_position
;
SET
GLOBAL
wsrep_debug
=
1
;
SELECT
@@
global
.
wsrep_debug
;
SET
GLOBAL
wsrep_slave_threads
=
5
;
SELECT
@@
global
.
wsrep_slave_threads
;
--
error
ER_WRONG_ARGUMENTS
SET
GLOBAL
wsrep_desync
=
1
;
SELECT
@@
global
.
wsrep_desync
;
--
error
ER_WRONG_ARGUMENTS
SET
SESSION
wsrep_trx_fragment_unit
=
'rows'
;
SELECT
@@
session
.
wsrep_trx_fragment_unit
;
--
disable_query_log
eval
SET
GLOBAL
wsrep_provider
=
'$WSREP_PROVIDER'
;
SET
GLOBAL
wsrep_cluster_address
=
@
wsrep_cluster_address_saved
;
SET
GLOBAL
wsrep_provider_options
=
@
wsrep_provider_options_saved
;
--
source
include
/
galera_wait_ready
.
inc
SET
@@
global
.
wsrep_slave_threads
=
@
wsrep_slave_threads_global_saved
;
SET
@@
global
.
wsrep_debug
=
@
wsrep_debug_saved
;
--
enable_query_log
sql/log.cc
View file @
a3dd7ea0
...
...
@@ -11188,6 +11188,15 @@ IO_CACHE *wsrep_get_cache(THD * thd, bool is_transactional)
return
NULL
;
}
bool
wsrep_is_binlog_cache_empty
(
THD
*
thd
)
{
binlog_cache_mngr
*
cache_mngr
=
(
binlog_cache_mngr
*
)
thd_get_ha_data
(
thd
,
binlog_hton
);
if
(
cache_mngr
)
return
cache_mngr
->
trx_cache
.
empty
()
&&
cache_mngr
->
stmt_cache
.
empty
();
return
true
;
}
void
wsrep_thd_binlog_trx_reset
(
THD
*
thd
)
{
DBUG_ENTER
(
"wsrep_thd_binlog_trx_reset"
);
...
...
sql/log.h
View file @
a3dd7ea0
...
...
@@ -1248,6 +1248,7 @@ static inline TC_LOG *get_tc_log_implementation()
#ifdef WITH_WSREP
IO_CACHE
*
wsrep_get_cache
(
THD
*
,
bool
);
bool
wsrep_is_binlog_cache_empty
(
THD
*
);
void
wsrep_thd_binlog_trx_reset
(
THD
*
thd
);
void
wsrep_thd_binlog_stmt_rollback
(
THD
*
thd
);
#endif
/* WITH_WSREP */
...
...
sql/wsrep_trans_observer.h
View file @
a3dd7ea0
...
...
@@ -91,7 +91,13 @@ static inline bool wsrep_is_real(THD* thd, bool all)
*/
static
inline
bool
wsrep_has_changes
(
THD
*
thd
)
{
return
(
thd
->
wsrep_trx
().
is_empty
()
==
false
);
// Transaction has changes to replicate if it
// has appended one or more certification keys,
// and has actual changes to replicate in binlog
// cache. Except for streaming replication,
// where commit message may have no payload.
return
!
thd
->
wsrep_trx
().
is_empty
()
&&
(
!
wsrep_is_binlog_cache_empty
(
thd
)
||
thd
->
wsrep_trx
().
is_streaming
());
}
/*
...
...
storage/spider/mysql-test/spider/bugfix/r/mdev_32986.result
0 → 100644
View file @
a3dd7ea0
#
# MDEV-32907
#
for master_1
for child2
for child3
CREATE SERVER srv FOREIGN DATA WRAPPER mysql
OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'test',user 'root');
create table t2 (c varchar(16));
create table t1 (c varchar(16)) ENGINE=Spider
COMMENT='WRAPPER "mysql", srv "srv",TABLE "t2"';
insert into t1 values ('TestSpiderRegex');
select c from t1 where c regexp '(Test|Spider|Regex)';
c
TestSpiderRegex
drop table t1, t2;
drop server srv;
for master_1
for child2
for child3
#
# end of test mdev_32907
#
storage/spider/mysql-test/spider/bugfix/t/mdev_32986.test
0 → 100644
View file @
a3dd7ea0
--
echo
#
--
echo
# MDEV-32907
--
echo
#
--
disable_query_log
--
disable_result_log
--
source
../../
t
/
test_init
.
inc
--
enable_result_log
--
enable_query_log
evalp
CREATE
SERVER
srv
FOREIGN
DATA
WRAPPER
mysql
OPTIONS
(
SOCKET
"
$MASTER_1_MYSOCK
"
,
DATABASE
'test'
,
user
'root'
);
create
table
t2
(
c
varchar
(
16
));
create
table
t1
(
c
varchar
(
16
))
ENGINE
=
Spider
COMMENT
=
'WRAPPER "mysql", srv "srv",TABLE "t2"'
;
insert
into
t1
values
(
'TestSpiderRegex'
);
select
c
from
t1
where
c
regexp
'(Test|Spider|Regex)'
;
drop
table
t1
,
t2
;
drop
server
srv
;
--
disable_query_log
--
disable_result_log
--
source
../../
t
/
test_deinit
.
inc
--
enable_result_log
--
enable_query_log
--
echo
#
--
echo
# end of test mdev_32907
--
echo
#
storage/spider/spd_db_mysql.cc
View file @
a3dd7ea0
...
...
@@ -6040,11 +6040,16 @@ int spider_db_mbase_util::print_item_func(
item_count
-=
2
;
break
;
}
}
else
if
(
func_name_length
==
6
&&
!
strncasecmp
(
"istrue"
,
func_name
,
func_name_length
)
)
{
last_str
=
SPIDER_SQL_IS_TRUE_STR
;
last_str_length
=
SPIDER_SQL_IS_TRUE_LEN
;
}
else
if
(
func_name_length
==
6
)
{
if
(
!
strncasecmp
(
"istrue"
,
func_name
,
func_name_length
))
{
last_str
=
SPIDER_SQL_IS_TRUE_STR
;
last_str_length
=
SPIDER_SQL_IS_TRUE_LEN
;
break
;
}
else
if
(
!
strncasecmp
(
"regexp"
,
func_name
,
func_name_length
))
/* Keep the infix expression */
break
;
}
else
if
(
func_name_length
==
7
)
{
...
...
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