Skip to content
Permalink
Browse files
Initialize MYSQL_LOCK->flags variable
This could crash in mysql_unlock_tables in servers compiled with DBUG
  • Loading branch information
montywi committed Dec 22, 2017
1 parent 1d9fd4f commit 52c40b4
Showing 1 changed file with 1 addition and 0 deletions.
@@ -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));

0 comments on commit 52c40b4

Please sign in to comment.