Galera test failure on galera_bf_abort_ps_bind
Fix a possible crash on my_free() due to the use of strdup() versus my_strdup(), and a memory leak. Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
This commit is contained in:
parent
088b37b5ea
commit
d59b16dd96
@ -8535,7 +8535,10 @@ void run_prepare_stmt(struct st_connection *cn, struct st_command *command, cons
|
|||||||
separate string
|
separate string
|
||||||
*/
|
*/
|
||||||
if (!disable_warnings)
|
if (!disable_warnings)
|
||||||
|
{
|
||||||
append_warnings(&ds_prepare_warnings, mysql);
|
append_warnings(&ds_prepare_warnings, mysql);
|
||||||
|
dynstr_free(&ds_prepare_warnings);
|
||||||
|
}
|
||||||
end:
|
end:
|
||||||
DBUG_VOID_RETURN;
|
DBUG_VOID_RETURN;
|
||||||
}
|
}
|
||||||
@ -8611,7 +8614,7 @@ void run_bind_stmt(struct st_connection *cn, struct st_command *command,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
ps_params[i].buffer_type= MYSQL_TYPE_STRING;
|
ps_params[i].buffer_type= MYSQL_TYPE_STRING;
|
||||||
ps_params[i].buffer= strdup(p);
|
ps_params[i].buffer= my_strdup(p, MYF(MY_WME));
|
||||||
ps_params[i].buffer_length= (unsigned long)strlen(p);
|
ps_params[i].buffer_length= (unsigned long)strlen(p);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,4 +36,4 @@ partition : MDEV-19958 Galera test failure on galera.partition
|
|||||||
query_cache: MDEV-15805 Test failure on galera.query_cache
|
query_cache: MDEV-15805 Test failure on galera.query_cache
|
||||||
versioning_trx_id: MDEV-18590: galera.versioning_trx_id: Test failure: mysqltest: Result content mismatch
|
versioning_trx_id: MDEV-18590: galera.versioning_trx_id: Test failure: mysqltest: Result content mismatch
|
||||||
galera_bf_abort_at_after_statement : Unstable
|
galera_bf_abort_at_after_statement : Unstable
|
||||||
galera_bf_abort_ps_bind : MDEV-28193 Galera test failure on galera_bf_abort_ps_bind
|
|
||||||
|
@ -28,6 +28,7 @@ PS_execute;
|
|||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||||
PS_execute;
|
PS_execute;
|
||||||
commit;
|
commit;
|
||||||
|
PS_close;
|
||||||
select * from t;
|
select * from t;
|
||||||
i j
|
i j
|
||||||
1 node2
|
1 node2
|
||||||
|
@ -53,6 +53,8 @@ update t set j='node2' where i=1;
|
|||||||
--PS_execute
|
--PS_execute
|
||||||
commit;
|
commit;
|
||||||
|
|
||||||
|
--PS_close
|
||||||
|
|
||||||
select * from t;
|
select * from t;
|
||||||
|
|
||||||
drop table t;
|
drop table t;
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit edd141127c11d78ef073f9f3ca61708821f20b32
|
Subproject commit 23fb8624624c9144c77f3874647fa0f7394b0aa8
|
Loading…
x
Reference in New Issue
Block a user