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
bed70468
Commit
bed70468
authored
Jun 05, 2023
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'bb-10.4-release' into bb-10.5-release
parents
3b4b512d
928012a2
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
317 additions
and
69 deletions
+317
-69
VERSION
VERSION
+1
-1
mysql-test/main/derived_cond_pushdown.result
mysql-test/main/derived_cond_pushdown.result
+94
-0
mysql-test/main/derived_cond_pushdown.test
mysql-test/main/derived_cond_pushdown.test
+41
-0
mysql-test/main/derived_split_innodb.result
mysql-test/main/derived_split_innodb.result
+15
-0
mysql-test/main/derived_split_innodb.test
mysql-test/main/derived_split_innodb.test
+21
-0
mysql-test/main/explain_non_select.result
mysql-test/main/explain_non_select.result
+19
-0
mysql-test/main/explain_non_select.test
mysql-test/main/explain_non_select.test
+20
-0
mysql-test/main/myisam_explain_non_select_all.result
mysql-test/main/myisam_explain_non_select_all.result
+2
-2
mysql-test/suite/galera/r/MDEV-24143.result
mysql-test/suite/galera/r/MDEV-24143.result
+23
-0
mysql-test/suite/galera/r/galera_bf_abort_get_lock.result
mysql-test/suite/galera/r/galera_bf_abort_get_lock.result
+18
-0
mysql-test/suite/galera/r/galera_locks_funcs.result
mysql-test/suite/galera/r/galera_locks_funcs.result
+0
-24
mysql-test/suite/galera/t/MDEV-24143.test
mysql-test/suite/galera/t/MDEV-24143.test
+20
-0
mysql-test/suite/galera/t/galera_bf_abort_get_lock.test
mysql-test/suite/galera/t/galera_bf_abort_get_lock.test
+36
-0
mysql-test/suite/galera/t/galera_locks_funcs.test
mysql-test/suite/galera/t/galera_locks_funcs.test
+0
-18
sql/item_create.cc
sql/item_create.cc
+0
-21
sql/opt_split.cc
sql/opt_split.cc
+4
-2
sql/sql_select.cc
sql/sql_select.cc
+2
-1
sql/sql_select.h
sql/sql_select.h
+1
-0
No files found.
VERSION
View file @
bed70468
MYSQL_VERSION_MAJOR=10
MYSQL_VERSION_MINOR=5
MYSQL_VERSION_PATCH=2
0
MYSQL_VERSION_PATCH=2
1
SERVER_MATURITY=stable
mysql-test/main/derived_cond_pushdown.result
View file @
bed70468
...
...
@@ -18330,4 +18330,98 @@ a
deallocate prepare stmt;
drop view v1;
drop table t1;
#
# MDEV-31240: condition pushed into splittable derived has reference to
# outer column and does not refer to any column of embedding
# select
#
create table t1 (a int);
insert into t1 select seq from seq_1_to_1000;
create table t2 (a int, b int, key (a));
insert into t2 select mod(seq,100), rand(13) * mod(seq,500) from seq_1_to_1000;
create table t3 (a int);
insert into t3 values (3), (1);
analyze table t1, t2, t3 persistent for all;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status Table is already up to date
test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status OK
explain select
a,
( select concat(t3.a,'=',dt.s)
from
(select a, sum(b) as s from t2 group by a) as dt,
t3
where dt.a=t1.a and t3.a < 3
)
from t1 limit 5;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 1000
2 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 2 Using where
2 DEPENDENT SUBQUERY <derived3> ref key0 key0 5 test.t1.a 2
3 LATERAL DERIVED t2 ref a a 5 test.t1.a 10
select
a,
( select concat(t3.a,'=',dt.s)
from
(select a, sum(b) as s from t2 group by a) as dt,
t3
where dt.a=t1.a and t3.a < 3
)
from t1 limit 5;
a ( select concat(t3.a,'=',dt.s)
from
(select a, sum(b) as s from t2 group by a) as dt,
t3
where dt.a=t1.a and t3.a < 3
)
1 1=804
2 1=1056
3 1=846
4 1=947
5 1=973
truncate table t2;
insert into t2 select mod(seq,10), rand(15) * mod(seq,500) from seq_1_to_1000;
analyze table t2 persistent for all;
Table Op Msg_type Msg_text
test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status Table is already up to date
explain select
a,
( select concat(t3.a,'=',dt.s)
from
(select a, sum(b) as s from t2 group by a) as dt,
t3
where dt.a=t1.a and t3.a < 3
)
from t1 limit 5;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 1000
2 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 2 Using where
2 DEPENDENT SUBQUERY <derived3> ref key0 key0 5 test.t1.a 100
3 DERIVED t2 ALL a NULL NULL NULL 1000 Using temporary; Using filesort
select
a,
( select concat(t3.a,'=',dt.s)
from
(select a, sum(b) as s from t2 group by a) as dt,
t3
where dt.a=t1.a and t3.a < 3
)
from t1 limit 5;
a ( select concat(t3.a,'=',dt.s)
from
(select a, sum(b) as s from t2 group by a) as dt,
t3
where dt.a=t1.a and t3.a < 3
)
1 1=11858
2 1=11380
3 1=11588
4 1=11373
5 1=11612
drop table t1,t2,t3;
# End of 10.4 tests
mysql-test/main/derived_cond_pushdown.test
View file @
bed70468
...
...
@@ -3972,4 +3972,45 @@ deallocate prepare stmt;
drop
view
v1
;
drop
table
t1
;
--
echo
#
--
echo
# MDEV-31240: condition pushed into splittable derived has reference to
--
echo
# outer column and does not refer to any column of embedding
--
echo
# select
--
echo
#
create
table
t1
(
a
int
);
insert
into
t1
select
seq
from
seq_1_to_1000
;
create
table
t2
(
a
int
,
b
int
,
key
(
a
));
insert
into
t2
select
mod
(
seq
,
100
),
rand
(
13
)
*
mod
(
seq
,
500
)
from
seq_1_to_1000
;
create
table
t3
(
a
int
);
insert
into
t3
values
(
3
),
(
1
);
analyze
table
t1
,
t2
,
t3
persistent
for
all
;
let
$q
=
select
a
,
(
select
concat
(
t3
.
a
,
'='
,
dt
.
s
)
from
(
select
a
,
sum
(
b
)
as
s
from
t2
group
by
a
)
as
dt
,
t3
where
dt
.
a
=
t1
.
a
and
t3
.
a
<
3
)
from
t1
limit
5
;
eval
explain
$q
;
eval
$q
;
truncate
table
t2
;
insert
into
t2
select
mod
(
seq
,
10
),
rand
(
15
)
*
mod
(
seq
,
500
)
from
seq_1_to_1000
;
analyze
table
t2
persistent
for
all
;
eval
explain
$q
;
eval
$q
;
drop
table
t1
,
t2
,
t3
;
--
echo
# End of 10.4 tests
mysql-test/main/derived_split_innodb.result
View file @
bed70468
...
...
@@ -817,4 +817,19 @@ SELECT t1.* FROM t1 JOIN (SELECT id, COUNT(*) FROM t2 GROUP BY id) sq ON sq.id=
a
set optimizer_switch= @tmp1, join_cache_level= @tmp2;
DROP TABLE t1, t2;
#
# MDEV-31403: Server crashes in st_join_table::choose_best_splitting (still)
#
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES
(1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),(13),(14),(15);
CREATE TABLE t2 (b INT) ENGINE=InnoDB;
INSERT INTO t2 VALUES (100),(200);
CREATE TABLE t3 (c INT, d INT, KEY(c)) ENGINE=InnoDB;
INSERT INTO t3 VALUES (1,1),(2,2);
CREATE VIEW v AS SELECT c, d FROM t3 GROUP BY c, d;
SELECT * FROM t1 JOIN t2 WHERE (t1.a, t2.b) IN (SELECT * FROM v);
a b
DROP VIEW v;
DROP TABLE t1, t2, t3;
# End of 10.4 tests
mysql-test/main/derived_split_innodb.test
View file @
bed70468
...
...
@@ -464,4 +464,25 @@ set optimizer_switch= @tmp1, join_cache_level= @tmp2;
# Cleanup
DROP
TABLE
t1
,
t2
;
--
echo
#
--
echo
# MDEV-31403: Server crashes in st_join_table::choose_best_splitting (still)
--
echo
#
CREATE
TABLE
t1
(
a
INT
)
ENGINE
=
InnoDB
;
INSERT
INTO
t1
VALUES
(
1
),(
2
),(
3
),(
4
),(
5
),(
6
),(
7
),(
8
),(
9
),(
10
),(
11
),(
12
),(
13
),(
14
),(
15
);
CREATE
TABLE
t2
(
b
INT
)
ENGINE
=
InnoDB
;
INSERT
INTO
t2
VALUES
(
100
),(
200
);
CREATE
TABLE
t3
(
c
INT
,
d
INT
,
KEY
(
c
))
ENGINE
=
InnoDB
;
INSERT
INTO
t3
VALUES
(
1
,
1
),(
2
,
2
);
CREATE
VIEW
v
AS
SELECT
c
,
d
FROM
t3
GROUP
BY
c
,
d
;
SELECT
*
FROM
t1
JOIN
t2
WHERE
(
t1
.
a
,
t2
.
b
)
IN
(
SELECT
*
FROM
v
);
# Cleanup
DROP
VIEW
v
;
DROP
TABLE
t1
,
t2
,
t3
;
--
echo
# End of 10.4 tests
mysql-test/main/explain_non_select.result
View file @
bed70468
...
...
@@ -277,3 +277,22 @@ EXECUTE stmt;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 2
drop table t1,t2;
#
# MDEV-31224: EXPLAIN EXTENDED for multi-table update of system table
#
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(2);
CREATE TABLE t2 (b INT) ENGINE=MyISAM;
INSERT INTO t2 VALUES (3);
EXPLAIN EXTENDED UPDATE t1, t2 SET b = 4 WHERE a IN (6,2);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 system NULL NULL NULL NULL 1 100.00
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
Warnings:
Note 1003 update `test`.`t1` set `test`.`t2`.`b` = 4 where `test`.`t1`.`a` in (6,2)
UPDATE t1, t2 SET b = 4 WHERE a IN (6,2);
SELECT * from t2;
b
4
DROP TABLE t1, t2;
# End of 10.4 tests
mysql-test/main/explain_non_select.test
View file @
bed70468
...
...
@@ -250,3 +250,23 @@ PREPARE stmt FROM 'EXPLAIN INSERT INTO t1 SELECT * FROM t2';
EXECUTE
stmt
;
drop
table
t1
,
t2
;
--
echo
#
--
echo
# MDEV-31224: EXPLAIN EXTENDED for multi-table update of system table
--
echo
#
CREATE
TABLE
t1
(
a
INT
);
INSERT
INTO
t1
VALUES
(
1
),(
2
);
CREATE
TABLE
t2
(
b
INT
)
ENGINE
=
MyISAM
;
INSERT
INTO
t2
VALUES
(
3
);
let
$q
=
UPDATE
t1
,
t2
SET
b
=
4
WHERE
a
IN
(
6
,
2
);
eval
EXPLAIN
EXTENDED
$q
;
eval
$q
;
SELECT
*
from
t2
;
DROP
TABLE
t1
,
t2
;
--
echo
# End of 10.4 tests
mysql-test/main/myisam_explain_non_select_all.result
View file @
bed70468
...
...
@@ -2689,7 +2689,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 system NULL NULL NULL NULL 0 0.00 Const row not found
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00
Warnings:
Note 1003 update `test`.`t1` set
NULL
= 10
Note 1003 update `test`.`t1` set
`test`.`t2`.`c2`
= 10
# Status of EXPLAIN EXTENDED query
Variable_name Value
Handler_read_key 7
...
...
@@ -2734,7 +2734,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 system NULL NULL NULL NULL 0 0.00 Const row not found
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
Warnings:
Note 1003 update `test`.`t1` set
NULL
= 10 where `test`.`t1`.`c3` = 10
Note 1003 update `test`.`t1` set
`test`.`t2`.`c2`
= 10 where `test`.`t1`.`c3` = 10
# Status of EXPLAIN EXTENDED query
Variable_name Value
Handler_read_key 7
...
...
mysql-test/suite/galera/r/MDEV-24143.result
0 → 100644
View file @
bed70468
connection node_2;
connection node_1;
CREATE TABLE t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 BINARY (10), c3 DATETIME);
SELECT get_lock ('test2', 0);
get_lock ('test2', 0)
1
DROP TABLE t1;
CREATE TABLE t1 (c1 SMALLINT NOT NULL AUTO_INCREMENT PRIMARY KEY);
INSERT INTO t1 VALUES (1);
SET SESSION wsrep_trx_fragment_size=10;
SET SESSION autocommit=0;
SELECT * FROM t1 WHERE c1 <=0 ORDER BY c1 DESC;
c1
INSERT INTO t1 VALUES (4),(3),(1),(2);
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
CREATE TABLE t1 (pk INT PRIMARY KEY, b INT) ENGINE=SEQUENCE;
ERROR 42S01: Table 't1' already exists
ALTER TABLE t1 DROP COLUMN c2;
ERROR 42000: Can't DROP COLUMN `c2`; check that it exists
SELECT get_lock ('test', 1.5);
get_lock ('test', 1.5)
1
DROP TABLE t1;
mysql-test/suite/galera/r/galera_bf_abort_get_lock.result
0 → 100644
View file @
bed70468
connection node_2;
connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
connection node_2a;
SELECT GET_LOCK("foo", 1000);
GET_LOCK("foo", 1000)
1
connection node_2;
SET AUTOCOMMIT=OFF;
INSERT INTO t1 VALUES (1);
SELECT GET_LOCK("foo", 1000);;
connection node_1;
INSERT INTO t1 VALUES (1);
connection node_2;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
wsrep_local_aborts_increment
1
DROP TABLE t1;
mysql-test/suite/galera/r/galera_locks_funcs.result
deleted
100644 → 0
View file @
3b4b512d
connection node_2;
connection node_1;
CREATE TABLE t (c DOUBLE,c2 INT,PRIMARY KEY(c)) ENGINE=InnoDB;
INSERT INTO t values (1,1);
SELECT GET_LOCK('a',1);
ERROR 42000: This version of MariaDB doesn't yet support 'GET_LOCK in cluster (WSREP_ON=ON)'
SHOW WARNINGS;
Level Code Message
Error 1235 This version of MariaDB doesn't yet support 'GET_LOCK in cluster (WSREP_ON=ON)'
SELECT * FROM t;
c c2
1 1
SELECT RELEASE_LOCK('a');
ERROR 42000: This version of MariaDB doesn't yet support 'RELEASE_LOCK in cluster (WSREP_ON=ON)'
SHOW WARNINGS;
Level Code Message
Error 1235 This version of MariaDB doesn't yet support 'RELEASE_LOCK in cluster (WSREP_ON=ON)'
SELECT RELEASE_ALL_LOCKS();
ERROR 42000: This version of MariaDB doesn't yet support 'RELEASE_ALL_LOCKS in cluster (WSREP_ON=ON)'
SHOW WARNINGS;
Level Code Message
Error 1235 This version of MariaDB doesn't yet support 'RELEASE_ALL_LOCKS in cluster (WSREP_ON=ON)'
COMMIT;
DROP TABLE t;
mysql-test/suite/galera/t/MDEV-24143.test
0 → 100644
View file @
bed70468
--
source
include
/
galera_cluster
.
inc
--
source
include
/
have_sequence
.
inc
CREATE
TABLE
t1
(
c1
BIGINT
NOT
NULL
PRIMARY
KEY
,
c2
BINARY
(
10
),
c3
DATETIME
);
SELECT
get_lock
(
'test2'
,
0
);
DROP
TABLE
t1
;
CREATE
TABLE
t1
(
c1
SMALLINT
NOT
NULL
AUTO_INCREMENT
PRIMARY
KEY
);
INSERT
INTO
t1
VALUES
(
1
);
SET
SESSION
wsrep_trx_fragment_size
=
10
;
SET
SESSION
autocommit
=
0
;
SELECT
*
FROM
t1
WHERE
c1
<=
0
ORDER
BY
c1
DESC
;
--
error
ER_LOCK_DEADLOCK
INSERT
INTO
t1
VALUES
(
4
),(
3
),(
1
),(
2
);
--
error
ER_TABLE_EXISTS_ERROR
CREATE
TABLE
t1
(
pk
INT
PRIMARY
KEY
,
b
INT
)
ENGINE
=
SEQUENCE
;
--
error
ER_CANT_DROP_FIELD_OR_KEY
ALTER
TABLE
t1
DROP
COLUMN
c2
;
SELECT
get_lock
(
'test'
,
1.5
);
DROP
TABLE
t1
;
mysql-test/suite/galera/t/galera_bf_abort_get_lock.test
0 → 100644
View file @
bed70468
--
source
include
/
galera_cluster
.
inc
--
source
include
/
have_innodb
.
inc
#
# Test a local transaction being aborted by a slave one while it is running a GET_LOCK()
#
CREATE
TABLE
t1
(
f1
INTEGER
PRIMARY
KEY
)
ENGINE
=
InnoDB
;
--
let
$galera_connection_name
=
node_2a
--
let
$galera_server_number
=
2
--
source
include
/
galera_connect
.
inc
--
connection
node_2a
SELECT
GET_LOCK
(
"foo"
,
1000
);
--
connection
node_2
SET
AUTOCOMMIT
=
OFF
;
--
let
$wsrep_local_bf_aborts_before
=
`SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_bf_aborts'`
INSERT
INTO
t1
VALUES
(
1
);
--
send
SELECT
GET_LOCK
(
"foo"
,
1000
);
--
connection
node_1
INSERT
INTO
t1
VALUES
(
1
);
--
connection
node_2
--
error
ER_LOCK_DEADLOCK
--
reap
--
let
$wsrep_local_bf_aborts_after
=
`SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_bf_aborts'`
# Check that wsrep_local_bf_aborts has been incremented by exactly 1
--
disable_query_log
--
eval
SELECT
$wsrep_local_bf_aborts_after
-
$wsrep_local_bf_aborts_before
=
1
AS
wsrep_local_aborts_increment
;
--
enable_query_log
DROP
TABLE
t1
;
mysql-test/suite/galera/t/galera_locks_funcs.test
deleted
100644 → 0
View file @
3b4b512d
--
source
include
/
galera_cluster
.
inc
CREATE
TABLE
t
(
c
DOUBLE
,
c2
INT
,
PRIMARY
KEY
(
c
))
ENGINE
=
InnoDB
;
INSERT
INTO
t
values
(
1
,
1
);
--
error
ER_NOT_SUPPORTED_YET
SELECT
GET_LOCK
(
'a'
,
1
);
SHOW
WARNINGS
;
SELECT
*
FROM
t
;
--
error
ER_NOT_SUPPORTED_YET
SELECT
RELEASE_LOCK
(
'a'
);
SHOW
WARNINGS
;
# New in 10.5
--
error
ER_NOT_SUPPORTED_YET
SELECT
RELEASE_ALL_LOCKS
();
SHOW
WARNINGS
;
COMMIT
;
DROP
TABLE
t
;
sql/item_create.cc
View file @
bed70468
...
...
@@ -3547,13 +3547,6 @@ Create_func_get_lock Create_func_get_lock::s_singleton;
Item
*
Create_func_get_lock
::
create_2_arg
(
THD
*
thd
,
Item
*
arg1
,
Item
*
arg2
)
{
#ifdef WITH_WSREP
if
(
WSREP_ON
&&
WSREP
(
thd
))
{
my_error
(
ER_NOT_SUPPORTED_YET
,
MYF
(
0
),
"GET_LOCK in cluster (WSREP_ON=ON)"
);
return
NULL
;
}
#endif
/* WITH_WSREP */
thd
->
lex
->
set_stmt_unsafe
(
LEX
::
BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION
);
thd
->
lex
->
uncacheable
(
UNCACHEABLE_SIDEEFFECT
);
return
new
(
thd
->
mem_root
)
Item_func_get_lock
(
thd
,
arg1
,
arg2
);
...
...
@@ -4843,13 +4836,6 @@ Create_func_release_all_locks Create_func_release_all_locks::s_singleton;
Item
*
Create_func_release_all_locks
::
create_builder
(
THD
*
thd
)
{
#ifdef WITH_WSREP
if
(
WSREP_ON
&&
WSREP
(
thd
))
{
my_error
(
ER_NOT_SUPPORTED_YET
,
MYF
(
0
),
"RELEASE_ALL_LOCKS in cluster (WSREP_ON=ON)"
);
return
NULL
;
}
#endif
/* WITH_WSREP */
thd
->
lex
->
set_stmt_unsafe
(
LEX
::
BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION
);
thd
->
lex
->
uncacheable
(
UNCACHEABLE_SIDEEFFECT
);
return
new
(
thd
->
mem_root
)
Item_func_release_all_locks
(
thd
);
...
...
@@ -4861,13 +4847,6 @@ Create_func_release_lock Create_func_release_lock::s_singleton;
Item
*
Create_func_release_lock
::
create_1_arg
(
THD
*
thd
,
Item
*
arg1
)
{
#ifdef WITH_WSREP
if
(
WSREP_ON
&&
WSREP
(
thd
))
{
my_error
(
ER_NOT_SUPPORTED_YET
,
MYF
(
0
),
"RELEASE_LOCK in cluster (WSREP_ON=ON)"
);
return
NULL
;
}
#endif
/* WITH_WSREP */
thd
->
lex
->
set_stmt_unsafe
(
LEX
::
BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION
);
thd
->
lex
->
uncacheable
(
UNCACHEABLE_SIDEEFFECT
);
return
new
(
thd
->
mem_root
)
Item_func_release_lock
(
thd
,
arg1
);
...
...
sql/opt_split.cc
View file @
bed70468
...
...
@@ -664,7 +664,8 @@ add_ext_keyuse_for_splitting(Dynamic_array<KEYUSE_EXT> *ext_keyuses,
keyuse_ext
.
cond_guard
=
added_key_field
->
cond_guard
;
keyuse_ext
.
sj_pred_no
=
added_key_field
->
sj_pred_no
;
keyuse_ext
.
validity_ref
=
0
;
keyuse_ext
.
needed_in_prefix
=
added_key_field
->
val
->
used_tables
();
keyuse_ext
.
needed_in_prefix
=
added_key_field
->
val
->
used_tables
()
&
~
(
OUTER_REF_TABLE_BIT
|
RAND_TABLE_BIT
);
keyuse_ext
.
validity_var
=
false
;
return
ext_keyuses
->
push
(
keyuse_ext
);
}
...
...
@@ -945,6 +946,7 @@ void reset_validity_vars_for_keyuses(KEYUSE_EXT *key_keyuse_ext_start,
SplM_plan_info
*
JOIN_TAB
::
choose_best_splitting
(
uint
idx
,
table_map
remaining_tables
,
const
POSITION
*
join_positions
,
table_map
*
spl_pd_boundary
)
{
SplM_opt_info
*
spl_opt_info
=
table
->
spl_opt_info
;
...
...
@@ -1042,7 +1044,7 @@ SplM_plan_info * JOIN_TAB::choose_best_splitting(uint idx,
else
{
table_map
last_found
=
this
->
table
->
map
;
for
(
POSITION
*
pos
=
&
this
->
join
->
positions
[
idx
-
1
];
;
pos
--
)
for
(
const
POSITION
*
pos
=
&
join_
positions
[
idx
-
1
];
;
pos
--
)
{
if
(
pos
->
table
->
table
->
map
&
excluded_tables
)
continue
;
...
...
sql/sql_select.cc
View file @
bed70468
...
...
@@ -7554,6 +7554,7 @@ best_access_path(JOIN *join,
if
(
s
->
table
->
is_splittable
())
spl_plan
=
s
->
choose_best_splitting
(
idx
,
remaining_tables
,
join_positions
,
&
spl_pd_boundary
);
Json_writer_array
trace_paths
(
thd
,
"considered_access_paths"
);
...
...
@@ -28411,7 +28412,7 @@ void st_select_lex::print_set_clause(THD *thd, String *str,
else
str
->
append
(
','
);
item
->
print
(
str
,
query_type
);
item
->
print
(
str
,
(
enum_query_type
)
(
query_type
|
QT_NO_DATA_EXPANSION
)
);
str
->
append
(
STRING_WITH_LEN
(
" = "
));
val
->
print
(
str
,
query_type
);
}
...
...
sql/sql_select.h
View file @
bed70468
...
...
@@ -696,6 +696,7 @@ typedef struct st_join_table {
void
add_keyuses_for_splitting
();
SplM_plan_info
*
choose_best_splitting
(
uint
idx
,
table_map
remaining_tables
,
const
POSITION
*
join_positions
,
table_map
*
spl_pd_boundary
);
bool
fix_splitting
(
SplM_plan_info
*
spl_plan
,
table_map
excluded_tables
,
bool
is_const_table
);
...
...
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