diff options
author | Monty <monty@mariadb.org> | 2017-12-22 22:12:52 +0200 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2017-12-22 22:12:52 +0200 |
commit | 52c40b406d5a68bf774a75dc6fa9ef1c166b22b1 (patch) | |
tree | ced079a0814eb67d926e82069294f0ffa652656f | |
parent | 1d9fd4faec03a6cff0c2639d8f1348d1a4d1ebb8 (diff) | |
download | mariadb-git-52c40b406d5a68bf774a75dc6fa9ef1c166b22b1.tar.gz |
Initialize MYSQL_LOCK->flags variablemariadb-10.3.3
This could crash in mysql_unlock_tables in servers compiled with DBUG
-rw-r--r-- | sql/lock.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/lock.cc b/sql/lock.cc index f4fc09d35bf..11cadb528d2 100644 --- a/sql/lock.cc +++ b/sql/lock.cc @@ -673,6 +673,7 @@ MYSQL_LOCK *mysql_lock_merge(MYSQL_LOCK *a,MYSQL_LOCK *b) sql_lock->table_count=a->table_count+b->table_count; sql_lock->locks=(THR_LOCK_DATA**) (sql_lock+1); sql_lock->table=(TABLE**) (sql_lock->locks+sql_lock->lock_count*2); + sql_lock->flags= 0; memcpy(sql_lock->locks,a->locks,a->lock_count*sizeof(*a->locks)); memcpy(sql_lock->locks+a->lock_count,b->locks, b->lock_count*sizeof(*b->locks)); |