Skip to content

Commit

Permalink
Merge 10.6 into 10.10
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-m committed Oct 23, 2023
2 parents 057fd52 + b21f52e commit 5a8fca5
Show file tree
Hide file tree
Showing 31 changed files with 1,168 additions and 52 deletions.
3 changes: 3 additions & 0 deletions include/m_ctype.h
Expand Up @@ -1865,6 +1865,9 @@ my_well_formed_length(CHARSET_INFO *cs, const char *b, const char *e,
#include "t_ctype.h"
#endif

int my_wc_mb_utf8mb4_bmp_only(CHARSET_INFO *cs, my_wc_t wc, uchar *r,
uchar *e);

#ifdef __cplusplus
}
#endif
Expand Down
2 changes: 1 addition & 1 deletion libmariadb
1 change: 1 addition & 0 deletions libmysqld/CMakeLists.txt
Expand Up @@ -51,6 +51,7 @@ ENDIF()
SET(SQL_EMBEDDED_SOURCES emb_qcache.cc libmysqld.c lib_sql.cc
libmysql.c ../sql-common/errmsg.c
../sql-common/client.c
../sql/cset_narrowing.cc
../sql-common/my_user.c ../sql-common/pack.c
../sql-common/client_plugin.c
../sql/password.c ../sql/discover.cc ../sql/derror.cc
Expand Down
26 changes: 26 additions & 0 deletions mysql-test/main/analyze.result
Expand Up @@ -417,5 +417,31 @@ test t1 B 1 NULL
test t1 B 2 NULL
drop table t1;
#
# Crash inis_eits_usable()
#
CREATE TABLE t1 (a int) ENGINE=MyISAM;
CREATE TABLE t2 (b int) ENGINE=MyISAM;
INSERT INTO t1 (a) VALUES (4), (6);
INSERT INTO t2 (b) VALUES (0), (8);
set @save_join_cache_level=@@join_cache_level;
set @save_optimizer_switch=@@optimizer_switch;
SET join_cache_level=3;
SET optimizer_switch='join_cache_hashed=on';
SET optimizer_switch='join_cache_bka=on';
set optimizer_switch='hash_join_cardinality=on';
select benchmark(1,1);
benchmark(1,1)
0
EXPLAIN
SELECT * FROM t1, t2 WHERE b=a;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using where
1 SIMPLE t2 hash_ALL NULL #hash#$hj 5 test.t1.a 2 Using where; Using join buffer (flat, BNLH join)
SELECT * FROM t1, t2 WHERE b=a;
a b
DROP TABLE t1,t2;
set @@optimizer_switch=@save_optimizer_switch;
set @@join_cache_level=@save_join_cache_level;
#
# End of 10.6 tests
#
27 changes: 27 additions & 0 deletions mysql-test/main/analyze.test
Expand Up @@ -269,6 +269,33 @@ alter ignore table t1 rename key `b` to `B`, LOCK=shared;
select * from mysql.index_stats where table_name= "t1";
drop table t1;

--echo #
--echo # Crash inis_eits_usable()
--echo #

CREATE TABLE t1 (a int) ENGINE=MyISAM;

CREATE TABLE t2 (b int) ENGINE=MyISAM;

INSERT INTO t1 (a) VALUES (4), (6);
INSERT INTO t2 (b) VALUES (0), (8);

set @save_join_cache_level=@@join_cache_level;
set @save_optimizer_switch=@@optimizer_switch;
SET join_cache_level=3;
SET optimizer_switch='join_cache_hashed=on';
SET optimizer_switch='join_cache_bka=on';
set optimizer_switch='hash_join_cardinality=on';

select benchmark(1,1);
EXPLAIN
SELECT * FROM t1, t2 WHERE b=a;
SELECT * FROM t1, t2 WHERE b=a;
DROP TABLE t1,t2;

set @@optimizer_switch=@save_optimizer_switch;
set @@join_cache_level=@save_join_cache_level;

--echo #
--echo # End of 10.6 tests
--echo #

0 comments on commit 5a8fca5

Please sign in to comment.