Skip to content

Instantly share code, notes, and snippets.

@nirbhayc
Created June 9, 2016 17:04
Show Gist options
  • Save nirbhayc/1d89830f90d8b0ecdee6b62e2f11920c to your computer and use it in GitHub Desktop.
Save nirbhayc/1d89830f90d8b0ecdee6b62e2f11920c to your computer and use it in GitHub Desktop.
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index c5510d9..87e6788 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -1337,6 +1337,9 @@ TABLE_LIST* find_dup_table(THD *thd, TABLE_LIST *table, TABLE_LIST *table_list,
DBUG_ENTER("find_dup_table");
DBUG_PRINT("enter", ("table alias: %s", table->alias));
+ if (table_list == 0)
+ DBUG_RETURN(0);
+
/*
If this function called for query which update table (INSERT/UPDATE/...)
then we have in table->table pointer to TABLE object which we are
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment