mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Optimize size of lex structures
LEX, st_select_lex, st_select_unit optimized for space: - Use bit fields for bool variables - Ensure that all bit fields are initialized (improves performance for init functions as all bit fields can be initalized with one memory access) - Move members around in above structures to remove alignment gaps Some savings: LEX: 7032 -> 6880 THD: 25608 -> 25456 st_select_lex_unit: 2048 -> 2008 LEX::start(): 1321 -> 1245 instructions st_select_lex_unit::init_query() 284 -> 214 instructions st_select_lex::init_query(): 766 -> 692 instructions st_select_lex::init_select(): 563 -> 540 instructions Other things: - Removed not used LEX::select_allow_into - Fixed MDEV-25510 Assertion `sel->select_lock == st_select_lex::select_lock_type::NONE' which was caused by this commit.
This commit is contained in:
@ -1883,3 +1883,24 @@ SELECT CAST(1 AS ACTION);
|
||||
--echo #
|
||||
--echo # End of 10.5 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # Start of 10.6 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-25510 Assertion `sel->select_lock ==
|
||||
--echo # st_select_lex::select_lock_type::NONE' failed in Lex_select_lock::set_to
|
||||
--echo #
|
||||
|
||||
--error ER_NO_SUCH_TABLE
|
||||
(SELECT x FROM t WINDOW w1 AS () FOR UPDATE) LIMIT 1;
|
||||
create table t1 (x int);
|
||||
insert into t1 values (1),(2);
|
||||
explain extended (SELECT x FROM t1 WINDOW w1 as () FOR UPDATE) LIMIT 1;
|
||||
explain extended (SELECT x FROM t1 FOR UPDATE) LIMIT 1;
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.6 tests
|
||||
--echo #
|
||||
|
Reference in New Issue
Block a user