diff options
author | unknown <Sinisa@sinisa.nasamreza.org> | 2002-11-30 19:54:52 +0200 |
---|---|---|
committer | unknown <Sinisa@sinisa.nasamreza.org> | 2002-11-30 19:54:52 +0200 |
commit | 0b36bbdf25e1309af5651e2f10128b471702c669 (patch) | |
tree | a511346f7641d3e17935ce797b7d9ce4883fc397 /sql/sql_base.cc | |
parent | b790bc24d81856d896231c42e3c7e259933cb1e7 (diff) | |
parent | 0b270eb4612e0c7ba32193171852be8982b0d643 (diff) | |
download | mariadb-git-0b36bbdf25e1309af5651e2f10128b471702c669.tar.gz |
Merge sinisa@work.mysql.com:/home/bk/mysql-4.1
into sinisa.nasamreza.org:/mnt/work/mysql-4.1
mysql-test/r/subselect.result:
Auto merged
mysql-test/t/subselect.test:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r-- | sql/sql_base.cc | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 18ff2bf38db..fc7629caae3 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -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]; |