mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
check of using same table for changing and select
This commit is contained in:
@ -744,7 +744,7 @@ void close_temporary_tables(THD *thd)
|
||||
}
|
||||
|
||||
/*
|
||||
Find first suitable table in given list.
|
||||
Find first suitable table by alias in given list.
|
||||
|
||||
SYNOPSIS
|
||||
find_table_in_list()
|
||||
@ -767,6 +767,31 @@ TABLE_LIST * find_table_in_list(TABLE_LIST *table,
|
||||
return table;
|
||||
}
|
||||
|
||||
/*
|
||||
Find real table in given list.
|
||||
|
||||
SYNOPSIS
|
||||
find_table_in_list()
|
||||
table - pointer to table list
|
||||
db_name - data base name
|
||||
table_name - table name
|
||||
|
||||
RETURN VALUES
|
||||
NULL Table not found
|
||||
# Pointer to found table.
|
||||
*/
|
||||
|
||||
TABLE_LIST * find_real_table_in_list(TABLE_LIST *table,
|
||||
const char *db_name,
|
||||
const char *table_name)
|
||||
{
|
||||
for (; table; table= table->next)
|
||||
if (!strcmp(table->db, db_name) &&
|
||||
!strcmp(table->real_name, table_name))
|
||||
break;
|
||||
return table;
|
||||
}
|
||||
|
||||
TABLE **find_temporary_table(THD *thd, const char *db, const char *table_name)
|
||||
{
|
||||
char key[MAX_DBKEY_LENGTH];
|
||||
|
Reference in New Issue
Block a user