1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Fixed issues when running mtr with --valgrind

- Note that some issues was also fixed in 10.2 and 10.4. I also fixed them
  here to be able to continue with making 10.5 valgrind safe again
- Disable connection threads warnings when doing shutdown
This commit is contained in:
Monty
2019-08-12 15:47:24 +03:00
committed by Sergei Golubchik
parent b444b6b910
commit 97dd057702
20 changed files with 299 additions and 76 deletions

View File

@ -10200,7 +10200,7 @@ void append_replace_regex(char* expr, char *expr_end, struct st_replace_regex* r
/* Allow variable for the *entire* list of replacements */ /* Allow variable for the *entire* list of replacements */
if (*p == '$') if (*p == '$')
{ {
const char *v_end; const char *v_end= 0;
VAR *val= var_get(p, &v_end, 0, 1); VAR *val= var_get(p, &v_end, 0, 1);
if (val) if (val)

View File

@ -26,7 +26,17 @@ if ($rpl_inited)
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.$_server_id.expect --let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.$_server_id.expect
--exec echo "wait" > $_expect_file_name --exec echo "wait" > $_expect_file_name
# Avoid warnings from connection threads that does not have time to exit
--disable_query_log
set @@global.log_warnings=0;
--enable_query_log
--let $server_shutdown_timeout= 60 --let $server_shutdown_timeout= 60
if ($VALGRIND_TEST)
{
--let $server_shutdown_timeout= 300
}
if ($shutdown_timeout) if ($shutdown_timeout)
{ {
--let $server_shutdown_timeout= $shutdown_timeout --let $server_shutdown_timeout= $shutdown_timeout

View File

@ -82,8 +82,8 @@ Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be
insert t1 select seq, seq, 1, 1, seq, seq, seq from seq_1_to_2000; insert t1 select seq, seq, 1, 1, seq, seq, seq from seq_1_to_2000;
set @before=unix_timestamp(); set @before=unix_timestamp();
call select_test(); call select_test();
select unix_timestamp() - @before < 60; select unix_timestamp() - @before < @time;
unix_timestamp() - @before < 60 unix_timestamp() - @before < @time
1 1
drop procedure select_test; drop procedure select_test;
drop table t1; drop table t1;

View File

@ -112,6 +112,17 @@ delimiter ;//
insert t1 select seq, seq, 1, 1, seq, seq, seq from seq_1_to_2000; insert t1 select seq, seq, 1, 1, seq, seq, seq from seq_1_to_2000;
set @before=unix_timestamp(); set @before=unix_timestamp();
call select_test(); call select_test();
select unix_timestamp() - @before < 60;
--let $time=60
if ($VALGRIND_TEST)
{
--let $time=600
}
--disable_query_log
--eval set @time=$time;
--enable_query_log
select unix_timestamp() - @before < @time;
drop procedure select_test; drop procedure select_test;
drop table t1; drop table t1;

View File

@ -1902,9 +1902,13 @@ sub command_line_setup {
if ($opt_valgrind && ! grep(/^--tool=/i, @valgrind_args)) if ($opt_valgrind && ! grep(/^--tool=/i, @valgrind_args))
{ {
# Set valgrind_option unless already defined # Set valgrind_option unless already defined
push(@valgrind_args, ("--show-reachable=yes", "--leak-check=yes", if (!@valgrind_args)
"--num-callers=16")) {
unless @valgrind_args; push(@valgrind_args, ("--show-reachable=yes", "--leak-check=yes",
"--num-callers=20"));
push(@valgrind_args, ("--gen-suppressions=all"));
# push(@valgrind_args, ("--trace-signals=yes"));
}
unshift(@valgrind_args, "--tool=memcheck"); unshift(@valgrind_args, "--tool=memcheck");
} }

View File

@ -8,6 +8,11 @@ if (!$wait_all_purged)
let $remaining_expect= `select concat('InnoDB ',$wait_all_purged)`; let $remaining_expect= `select concat('InnoDB ',$wait_all_purged)`;
let $wait_counter= 600; let $wait_counter= 600;
if ($VALGRIND_TEST)
{
let $wait_counter= 2000;
}
while ($wait_counter) while ($wait_counter)
{ {
--replace_regex /.*History list length ([0-9]+).*/\1/ --replace_regex /.*History list length ([0-9]+).*/\1/

View File

@ -2,6 +2,8 @@
--source include/have_debug.inc --source include/have_debug.inc
--source include/have_debug_sync.inc --source include/have_debug_sync.inc
--source include/not_embedded.inc --source include/not_embedded.inc
# Valgrind gives leaks from the first shutdown which confuses mtr
#--source include/not_valgrind.inc
--echo # --echo #
--echo # MDEV-11415 AVOID INTERMEDIATE COMMIT WHILE DOING --echo # MDEV-11415 AVOID INTERMEDIATE COMMIT WHILE DOING

View File

@ -2,6 +2,7 @@
# Test the detection of duplicate tablespaces. # Test the detection of duplicate tablespaces.
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/not_valgrind.inc
# Embedded server does not support crashing # Embedded server does not support crashing
--source include/not_embedded.inc --source include/not_embedded.inc

View File

@ -1,5 +1,8 @@
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/not_embedded.inc --source include/not_embedded.inc
# Valgrind has to be disabled as killing the server hard gives a lot of
# leak warnings
--source include/not_valgrind.inc
# Flush any open myisam tables from previous tests # Flush any open myisam tables from previous tests
FLUSH TABLES; FLUSH TABLES;

View File

@ -1,31 +1,31 @@
--- r/rpl_row_big_table_id.result 2019-01-23 19:58:07.204914873 +0200 --- /home/my/maria-test/mysql-test/suite/rpl/r/rpl_row_big_table_id.result 2019-08-18 15:19:56.829962449 +0300
+++ r/rpl_row_big_table_id_32bit.result 2019-01-23 19:43:54.590640934 +0200 +++ /home/my/maria-test/mysql-test/suite/rpl/r/rpl_row_big_table_id,32bit.reject 2019-08-18 15:20:19.253763968 +0300
@@ -22,22 +22,22 @@ @@ -20,22 +20,22 @@
master-bin.000002 # Query 1 # use `test`; ALTER TABLE t comment '' master-bin.000001 # Query 1 # use `test`; ALTER TABLE t comment ''
master-bin.000002 # Gtid 1 # BEGIN GTID #-#-# master-bin.000001 # Gtid 1 # BEGIN GTID #-#-#
master-bin.000002 # Annotate_rows 1 # INSERT INTO t SET a= 1 master-bin.000001 # Annotate_rows 1 # INSERT INTO t SET a= 1
-master-bin.000002 # Table_map 1 # table_id: 4294967298 (test.t) -master-bin.000001 # Table_map 1 # table_id: 4294967295 (test.t)
-master-bin.000002 # Write_rows_v1 1 # table_id: 4294967298 flags: STMT_END_F -master-bin.000001 # Write_rows_v1 1 # table_id: 4294967295 flags: STMT_END_F
+master-bin.000002 # Table_map 1 # table_id: 4294967294 (test.t) +master-bin.000001 # Table_map 1 # table_id: 1 (test.t)
+master-bin.000002 # Write_rows_v1 1 # table_id: 4294967294 flags: STMT_END_F +master-bin.000001 # Write_rows_v1 1 # table_id: 1 flags: STMT_END_F
master-bin.000002 # Query 1 # COMMIT master-bin.000001 # Query 1 # COMMIT
master-bin.000002 # Gtid 1 # GTID #-#-# master-bin.000001 # Gtid 1 # GTID #-#-#
master-bin.000002 # Query 1 # use `test`; ALTER TABLE t comment '' master-bin.000001 # Query 1 # use `test`; ALTER TABLE t comment ''
master-bin.000002 # Gtid 1 # BEGIN GTID #-#-# master-bin.000001 # Gtid 1 # BEGIN GTID #-#-#
master-bin.000002 # Annotate_rows 1 # INSERT INTO t SET a= 2 master-bin.000001 # Annotate_rows 1 # INSERT INTO t SET a= 2
-master-bin.000002 # Table_map 1 # table_id: 4294967299 (test.t) -master-bin.000001 # Table_map 1 # table_id: 4294967296 (test.t)
-master-bin.000002 # Write_rows_v1 1 # table_id: 4294967299 flags: STMT_END_F -master-bin.000001 # Write_rows_v1 1 # table_id: 4294967296 flags: STMT_END_F
+master-bin.000002 # Table_map 1 # table_id: 1 (test.t) +master-bin.000001 # Table_map 1 # table_id: 4294967294 (test.t)
+master-bin.000002 # Write_rows_v1 1 # table_id: 1 flags: STMT_END_F +master-bin.000001 # Write_rows_v1 1 # table_id: 4294967294 flags: STMT_END_F
master-bin.000002 # Query 1 # COMMIT master-bin.000001 # Query 1 # COMMIT
master-bin.000002 # Gtid 1 # GTID #-#-# master-bin.000001 # Gtid 1 # GTID #-#-#
master-bin.000002 # Query 1 # use `test`; ALTER TABLE t comment '' master-bin.000001 # Query 1 # use `test`; ALTER TABLE t comment ''
master-bin.000002 # Gtid 1 # BEGIN GTID #-#-# master-bin.000001 # Gtid 1 # BEGIN GTID #-#-#
master-bin.000002 # Annotate_rows 1 # INSERT INTO t SET a= 3 master-bin.000001 # Annotate_rows 1 # INSERT INTO t SET a= 3
-master-bin.000002 # Table_map 1 # table_id: 4294967300 (test.t) -master-bin.000001 # Table_map 1 # table_id: 4294967297 (test.t)
-master-bin.000002 # Write_rows_v1 1 # table_id: 4294967300 flags: STMT_END_F -master-bin.000001 # Write_rows_v1 1 # table_id: 4294967297 flags: STMT_END_F
+master-bin.000002 # Table_map 1 # table_id: 4294967294 (test.t) +master-bin.000001 # Table_map 1 # table_id: 1 (test.t)
+master-bin.000002 # Write_rows_v1 1 # table_id: 4294967294 flags: STMT_END_F +master-bin.000001 # Write_rows_v1 1 # table_id: 1 flags: STMT_END_F
master-bin.000002 # Query 1 # COMMIT master-bin.000001 # Query 1 # COMMIT
connection slave; connection slave;
connection master; connection master;

View File

@ -1,8 +1,7 @@
include/master-slave.inc include/master-slave.inc
[connection master] [connection master]
connection master; SET @old_debug_dbug= @@debug_dbug;
include/rpl_restart_server.inc [server_number=1] SET @@debug_dbug="+d,simulate_big_table_id";
SET @@debug_dbug="d,simulate_big_table_id";
CREATE TABLE t (a int); CREATE TABLE t (a int);
INSERT INTO t SET a= 0; INSERT INTO t SET a= 0;
ALTER TABLE t comment ''; ALTER TABLE t comment '';
@ -13,34 +12,35 @@ ALTER TABLE t comment '';
INSERT INTO t SET a= 3; INSERT INTO t SET a= 3;
show binlog events in <file> from <pos>; show binlog events in <file> from <pos>;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000002 # Gtid 1 # BEGIN GTID #-#-# master-bin.000001 # Gtid 1 # BEGIN GTID #-#-#
master-bin.000002 # Annotate_rows 1 # INSERT INTO t SET a= 0 master-bin.000001 # Annotate_rows 1 # INSERT INTO t SET a= 0
master-bin.000002 # Table_map 1 # table_id: 4294967294 (test.t) master-bin.000001 # Table_map 1 # table_id: 4294967294 (test.t)
master-bin.000002 # Write_rows_v1 1 # table_id: 4294967294 flags: STMT_END_F master-bin.000001 # Write_rows_v1 1 # table_id: 4294967294 flags: STMT_END_F
master-bin.000002 # Query 1 # COMMIT master-bin.000001 # Query 1 # COMMIT
master-bin.000002 # Gtid 1 # GTID #-#-# master-bin.000001 # Gtid 1 # GTID #-#-#
master-bin.000002 # Query 1 # use `test`; ALTER TABLE t comment '' master-bin.000001 # Query 1 # use `test`; ALTER TABLE t comment ''
master-bin.000002 # Gtid 1 # BEGIN GTID #-#-# master-bin.000001 # Gtid 1 # BEGIN GTID #-#-#
master-bin.000002 # Annotate_rows 1 # INSERT INTO t SET a= 1 master-bin.000001 # Annotate_rows 1 # INSERT INTO t SET a= 1
master-bin.000002 # Table_map 1 # table_id: 4294967298 (test.t) master-bin.000001 # Table_map 1 # table_id: 4294967295 (test.t)
master-bin.000002 # Write_rows_v1 1 # table_id: 4294967298 flags: STMT_END_F master-bin.000001 # Write_rows_v1 1 # table_id: 4294967295 flags: STMT_END_F
master-bin.000002 # Query 1 # COMMIT master-bin.000001 # Query 1 # COMMIT
master-bin.000002 # Gtid 1 # GTID #-#-# master-bin.000001 # Gtid 1 # GTID #-#-#
master-bin.000002 # Query 1 # use `test`; ALTER TABLE t comment '' master-bin.000001 # Query 1 # use `test`; ALTER TABLE t comment ''
master-bin.000002 # Gtid 1 # BEGIN GTID #-#-# master-bin.000001 # Gtid 1 # BEGIN GTID #-#-#
master-bin.000002 # Annotate_rows 1 # INSERT INTO t SET a= 2 master-bin.000001 # Annotate_rows 1 # INSERT INTO t SET a= 2
master-bin.000002 # Table_map 1 # table_id: 4294967299 (test.t) master-bin.000001 # Table_map 1 # table_id: 4294967296 (test.t)
master-bin.000002 # Write_rows_v1 1 # table_id: 4294967299 flags: STMT_END_F master-bin.000001 # Write_rows_v1 1 # table_id: 4294967296 flags: STMT_END_F
master-bin.000002 # Query 1 # COMMIT master-bin.000001 # Query 1 # COMMIT
master-bin.000002 # Gtid 1 # GTID #-#-# master-bin.000001 # Gtid 1 # GTID #-#-#
master-bin.000002 # Query 1 # use `test`; ALTER TABLE t comment '' master-bin.000001 # Query 1 # use `test`; ALTER TABLE t comment ''
master-bin.000002 # Gtid 1 # BEGIN GTID #-#-# master-bin.000001 # Gtid 1 # BEGIN GTID #-#-#
master-bin.000002 # Annotate_rows 1 # INSERT INTO t SET a= 3 master-bin.000001 # Annotate_rows 1 # INSERT INTO t SET a= 3
master-bin.000002 # Table_map 1 # table_id: 4294967300 (test.t) master-bin.000001 # Table_map 1 # table_id: 4294967297 (test.t)
master-bin.000002 # Write_rows_v1 1 # table_id: 4294967300 flags: STMT_END_F master-bin.000001 # Write_rows_v1 1 # table_id: 4294967297 flags: STMT_END_F
master-bin.000002 # Query 1 # COMMIT master-bin.000001 # Query 1 # COMMIT
connection slave; connection slave;
connection master; connection master;
SET debug_dbug=@old_debug_dbug;
DROP TABLE t; DROP TABLE t;
connection slave; connection slave;
include/rpl_end.inc include/rpl_end.inc

View File

@ -0,0 +1 @@
--verbose=1

View File

@ -4,6 +4,8 @@
# MDEV-17803 Row-based event is not applied when # MDEV-17803 Row-based event is not applied when
# table map id is greater 32 bit int # table map id is greater 32 bit int
# #
# This test is depending on that the server was restarted before test was run
#
# Verify row-based events applying when table map id value is about and greater # Verify row-based events applying when table map id value is about and greater
# than 1 << 32. # than 1 << 32.
################################################################## ##################################################################
@ -12,12 +14,8 @@
--source include/have_binlog_format_row.inc --source include/have_binlog_format_row.inc
--source include/master-slave.inc --source include/master-slave.inc
--connection master SET @old_debug_dbug= @@debug_dbug;
# To reset last table id SET @@debug_dbug="+d,simulate_big_table_id";
--let $rpl_server_number= 1
--source include/rpl_restart_server.inc
SET @@debug_dbug="d,simulate_big_table_id";
CREATE TABLE t (a int); CREATE TABLE t (a int);
--let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1) --let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
@ -50,6 +48,8 @@ if (`SELECT sum(a) != 6 FROM t`)
# Cleanup # Cleanup
--connection master --connection master
SET debug_dbug=@old_debug_dbug;
DROP TABLE t; DROP TABLE t;
--sync_slave_with_master --sync_slave_with_master

View File

@ -1638,6 +1638,81 @@
fun:clone fun:clone
} }
{
codership test wsrep_info.plugin
Memcheck:Leak
match-leak-kinds: possible
fun:malloc
fun:tls_get_addr_tail
}
{
codership/galera
Memcheck:Addr4
fun:_ZN14Wsrep_thd_args11thread_typeEv
fun:_Z15start_wsrep_THDPv
fun:start_thread
fun:clone
}
{
codership/galera
Memcheck:Leak
match-leak-kinds: indirect
fun:malloc
fun:strdup
fun:dummy_init
fun:_ZN5wsrep18wsrep_provider_v26C1ERNS_12server_stateERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_
fun:_ZN5wsrep8provider13make_providerERNS_12server_stateERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_
fun:_ZN5wsrep12server_state13load_providerERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_
fun:_Z10wsrep_initv
}
{
codership/galera
Memcheck:Leak
match-leak-kinds: indirect
fun:malloc
fun:wsrep_dummy_loader
fun:wsrep_load
fun:_ZN5wsrep18wsrep_provider_v26C1ERNS_12server_stateERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_
fun:_ZN5wsrep8provider13make_providerERNS_12server_stateERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_
fun:_ZN5wsrep12server_state13load_providerERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_
fun:_Z10wsrep_initv
}
{
codership/galera
Memcheck:Leak
match-leak-kinds: indirect
fun:malloc
fun:wsrep_load
fun:_ZN5wsrep18wsrep_provider_v26C1ERNS_12server_stateERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_
fun:_ZN5wsrep8provider13make_providerERNS_12server_stateERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_
fun:_ZN5wsrep12server_state13load_providerERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_
fun:_Z10wsrep_initv
}
{
codership/galera
Memcheck:Leak
match-leak-kinds: definite
fun:_Znwm
fun:_ZN5wsrep8provider13make_providerERNS_12server_stateERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_
fun:_ZN5wsrep12server_state13load_providerERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_
fun:_Z10wsrep_initv
}
{
MDEV-20378 wsrep_info.plugin
Memcheck:Addr4
fun:_ZN14Wsrep_thd_args11thread_typeEv
fun:_Z15start_wsrep_THDPv
fun:pfs_spawn_thread
fun:start_thread
fun:clone
}
# #
# MDEV-11061: OpenSSL 0.9.8 problems # MDEV-11061: OpenSSL 0.9.8 problems
# #
@ -1945,7 +2020,108 @@
... ...
} }
{
From rocksdb.mariadb_plugin.test
Memcheck:Leak
match-leak-kinds: reachable
fun:calloc
fun:__cxa_thread_atexit_impl
fun:__tls_init
fun:_ZTWN7rocksdb12perf_contextE
fun:_ZN7rocksdb17InstrumentedMutex4LockEv
...
fun:_ZNSt10unique_ptrIN7rocksdb9DBOptionsESt14default_deleteIS1_EED1Ev
fun:__run_exit_handlers
}
## ##
## RocksDB Storage Engine suppressions end ## RocksDB Storage Engine suppressions end
## ##
#
# wolfSSL problems, to be removed after fixed by wolfSSL team
#
{
WolfSSL_accept
Memcheck:Cond
...
fun:wolfSSL_accept
}
{
WolfSSL_connect
Memcheck:Cond
...
fun:wolfSSL_connect
}
{
WolfSSL send param
Memcheck:Param
socketcall.sendto(msg)
fun:send
...
fun:wolfSSL_connect
}
#
# Temporary suppressions to be able to run all tests in 10.5 with --valgrind
#
#
# InnoDB errors
#
{
InnoDB encryption
Memcheck:Addr2
fun:memmove
fun:wolfSSL_EVP_CipherUpdate
}
{
InnoDB row_in_step
Memcheck:Cond
fun:_Z12row_ins_stepP9que_thr_t
...
fun:_ZN11ha_innobase10update_rowEPKhS1_
}
{
InnoDB leak
Memcheck:Leak
match-leak-kinds: indirect,definite
fun:malloc
fun:_Z26mem_heap_create_block_funcP16mem_block_info_tmPKcjm
...
fun:_ZN11ha_innobase10delete_rowEPKh
}
{
InnoDB leak
Memcheck:Leak
match-leak-kinds: indirect,definite
fun:malloc
fun:_Z26mem_heap_create_block_funcP16mem_block_info_tmPKcjm
...
fun:_ZN7handler13ha_update_rowEPKhS1_
}
#
# Optimizer
#
{
innodb_fts.fulltext_misc
Memcheck:Param
write(buf)
fun:write
fun:my_write
fun:inline_mysql_file_write
fun:_my_b_cache_write
fun:my_b_flush_io_cache
fun:end_io_cache
...
fun:_Z11mysql_unionP3THDP3LEXP13select_resultP18st_select_lex_unitm
}

View File

@ -2547,9 +2547,9 @@ register_query_cache_dependant_tables(THD *thd,
sub_elem= subpart_it++; sub_elem= subpart_it++;
part= i * num_subparts + j; part= i * num_subparts + j;
/* we store the end \0 as part of the key */ /* we store the end \0 as part of the key */
end= strmov(engine_pos, sub_elem->partition_name); end= strmov(engine_pos, sub_elem->partition_name) + 1;
length= (uint)(end - engine_key); length= (uint)(end - engine_key);
/* Copy the suffix also to query cache key */ /* Copy the suffix and end 0 to query cache key */
memcpy(query_cache_key_end, engine_key_end, (end - engine_key_end)); memcpy(query_cache_key_end, engine_key_end, (end - engine_key_end));
if (reg_query_cache_dependant_table(thd, engine_key, length, if (reg_query_cache_dependant_table(thd, engine_key, length,
query_cache_key, query_cache_key,
@ -2565,7 +2565,7 @@ register_query_cache_dependant_tables(THD *thd,
{ {
char *end= engine_pos+1; // copy end \0 char *end= engine_pos+1; // copy end \0
uint length= (uint)(end - engine_key); uint length= (uint)(end - engine_key);
/* Copy the suffix also to query cache key */ /* Copy the suffix and end 0 to query cache key */
memcpy(query_cache_key_end, engine_key_end, (end - engine_key_end)); memcpy(query_cache_key_end, engine_key_end, (end - engine_key_end));
if (reg_query_cache_dependant_table(thd, engine_key, length, if (reg_query_cache_dependant_table(thd, engine_key, length,
query_cache_key, query_cache_key,

View File

@ -2129,7 +2129,11 @@ int alloc_statistics_for_table(THD* thd, TABLE *table)
Histogram_type hist_type= (Histogram_type) (thd->variables.histogram_type); Histogram_type hist_type= (Histogram_type) (thd->variables.histogram_type);
uchar *histogram= NULL; uchar *histogram= NULL;
if (hist_size > 0) if (hist_size > 0)
histogram= (uchar *) alloc_root(&table->mem_root, hist_size * columns); {
if ((histogram= (uchar *) alloc_root(&table->mem_root,
hist_size * columns)))
bzero(histogram, hist_size * columns);
}
if (!table_stats || !column_stats || !index_stats || !idx_avg_frequency || if (!table_stats || !column_stats || !index_stats || !idx_avg_frequency ||
(hist_size && !histogram)) (hist_size && !histogram))

View File

@ -474,7 +474,7 @@ static int scan(TABLE* table, uint field, char* strbuf, uint strbuf_len)
{ {
String str; String str;
(void)table->field[field]->val_str(&str); (void)table->field[field]->val_str(&str);
strncpy(strbuf, str.c_ptr(), std::min(str.length(), strbuf_len)); strncpy(strbuf, str.ptr(), std::min(str.length(), strbuf_len));
strbuf[strbuf_len - 1]= '\0'; strbuf[strbuf_len - 1]= '\0';
return 0; return 0;
} }

View File

@ -8983,10 +8983,12 @@ bool ha_mroonga::is_foreign_key_field(const char *table_name,
grn_obj *range = grn_ctx_at(ctx, grn_obj_get_range(ctx, column)); grn_obj *range = grn_ctx_at(ctx, grn_obj_get_range(ctx, column));
if (!range) { if (!range) {
grn_obj_unlink(ctx, column);
DBUG_RETURN(false); DBUG_RETURN(false);
} }
if (!mrn::grn::is_table(range)) { if (!mrn::grn::is_table(range)) {
grn_obj_unlink(ctx, column);
DBUG_RETURN(false); DBUG_RETURN(false);
} }
@ -9000,6 +9002,7 @@ bool ha_mroonga::is_foreign_key_field(const char *table_name,
DBUG_RETURN(true); DBUG_RETURN(true);
} }
grn_obj_unlink(ctx, column);
DBUG_RETURN(false); DBUG_RETURN(false);
} }

View File

@ -99,3 +99,4 @@ drop_table: Hangs on shutdown
allow_to_start_after_corruption : result difference and assertion failure allow_to_start_after_corruption : result difference and assertion failure
index_merge_rocksdb2 : result difference index_merge_rocksdb2 : result difference
rocksdb_range2 : result difference, update after MDEV-16746 is fixed rocksdb_range2 : result difference, update after MDEV-16746 is fixed
add_index_inplace: FORCE INDEX gives wrong count

View File

@ -436,7 +436,9 @@ new_VioSSLAcceptorFd(const char *key_file, const char *cert_file,
void free_vio_ssl_acceptor_fd(struct st_VioSSLFd *fd) void free_vio_ssl_acceptor_fd(struct st_VioSSLFd *fd)
{ {
DBUG_ENTER("free_vio_ssl_acceptor_fd");
SSL_CTX_free(fd->ssl_context); SSL_CTX_free(fd->ssl_context);
my_free(fd); my_free(fd);
DBUG_VOID_RETURN;
} }
#endif /* HAVE_OPENSSL */ #endif /* HAVE_OPENSSL */