diff options
author | bell@sanja.is.com.ua <> | 2002-11-27 17:04:43 +0200 |
---|---|---|
committer | bell@sanja.is.com.ua <> | 2002-11-27 17:04:43 +0200 |
commit | f8ff8fc6def43682145ed95ae5429f84918b9ae3 (patch) | |
tree | c6a430358bf45d5e1aba691c540dcaafd68f1e3d /sql/sql_base.cc | |
parent | aa9bfb44f987ed766a37125779cb0addd4c1da3a (diff) | |
download | mariadb-git-f8ff8fc6def43682145ed95ae5429f84918b9ae3.tar.gz |
after review changes in IN/ALL/ANY/SOME (SCRUM)
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r-- | sql/sql_base.cc | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 09b29c6b41d..8aa33a65ce3 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -743,6 +743,29 @@ void close_temporary_tables(THD *thd) thd->temporary_tables=0; } +/* + Find first suitable table in given list. + + SYNOPSIS + find_table_in_list() + table - pointer to table list + db_name - data base name or 0 for any + table_name - table name or 0 for any + + RETURN VALUES + NULL Table not found + # Pointer to found table. +*/ + +TABLE_LIST * find_table_in_list(TABLE_LIST *table, + const char *db_name, const char *table_name) +{ + for (; table; table= table->next) + if ((!db_name || !strcmp(table->db, db_name)) && + (!table_name || !strcmp(table->alias, table_name))) + break; + return table; +} TABLE **find_temporary_table(THD *thd, const char *db, const char *table_name) { |