mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Change name -> alias in TABLE_LIST.
Added missing mutex-lock around critical section in GRANT handling. Docs/manual.texi: ChangeLog sql/lock.cc: Change name -> alias in TABLE_LIST. sql/slave.cc: Change name -> alias in TABLE_LIST. sql/sql_acl.cc: Added missing mutex-lock around critical section in GRANT handling. Changed name -> alias sql/sql_base.cc: Change name -> alias in TABLE_LIST. sql/sql_insert.cc: Change name -> alias in TABLE_LIST. sql/sql_parse.cc: Change name -> alias in TABLE_LIST. sql/sql_show.cc: Change name -> alias in TABLE_LIST. sql/sql_table.cc: Change name -> alias in TABLE_LIST. sql/sql_udf.cc: Change name -> alias in TABLE_LIST. sql/table.h: Change name -> alias in TABLE_LIST. tests/grant.pl: Fixed grant test
This commit is contained in:
@ -354,7 +354,7 @@ bool close_cached_tables(THD *thd, bool if_wait_for_refresh,
|
||||
bool found=0;
|
||||
for (TABLE_LIST *table=tables ; table ; table=table->next)
|
||||
{
|
||||
if (remove_table_from_cache(thd, table->db, table->name, 1))
|
||||
if (remove_table_from_cache(thd, table->db, table->real_name, 1))
|
||||
found=1;
|
||||
}
|
||||
if (!found)
|
||||
@ -715,7 +715,7 @@ TABLE *reopen_name_locked_table(THD* thd, TABLE_LIST* table_list)
|
||||
DBUG_RETURN(0);
|
||||
|
||||
char* db = thd->db ? thd->db : table_list->db;
|
||||
char* table_name = table_list->name;
|
||||
char* table_name = table_list->real_name;
|
||||
char key[MAX_DBKEY_LENGTH];
|
||||
uint key_length;
|
||||
key_length=(uint) (strmov(strmov(key,db)+1,table_name)-key)+1;
|
||||
@ -1285,7 +1285,7 @@ static int open_unireg_entry(THD *thd, TABLE *entry, const char *db,
|
||||
|
||||
TABLE_LIST table_list;
|
||||
table_list.db=(char*) db;
|
||||
table_list.name=(char*) name;
|
||||
table_list.real_name=(char*) name;
|
||||
table_list.next=0;
|
||||
if ((error=lock_table_name(thd,&table_list)))
|
||||
{
|
||||
@ -1356,7 +1356,7 @@ int open_tables(THD *thd,TABLE_LIST *start)
|
||||
!(tables->table=open_table(thd,
|
||||
tables->db ? tables->db : thd->db,
|
||||
tables->real_name,
|
||||
tables->name, &refresh)))
|
||||
tables->alias, &refresh)))
|
||||
{
|
||||
if (refresh) // Refresh in progress
|
||||
{
|
||||
@ -1412,7 +1412,7 @@ TABLE *open_ltable(THD *thd, TABLE_LIST *table_list, thr_lock_type lock_type)
|
||||
|
||||
thd->proc_info="Opening table";
|
||||
while (!(table=open_table(thd,table_list->db ? table_list->db : thd->db,
|
||||
table_list->real_name,table_list->name,
|
||||
table_list->real_name, table_list->alias,
|
||||
&refresh)) && refresh) ;
|
||||
if (table)
|
||||
{
|
||||
@ -1440,7 +1440,7 @@ TABLE *open_ltable(THD *thd, TABLE_LIST *table_list, thr_lock_type lock_type)
|
||||
{
|
||||
my_printf_error(ER_TABLE_NOT_LOCKED_FOR_WRITE,
|
||||
ER(ER_TABLE_NOT_LOCKED_FOR_WRITE),
|
||||
MYF(0),table_list->name);
|
||||
MYF(0),table_list->alias);
|
||||
table=0;
|
||||
}
|
||||
else if ((error=table->file->start_stmt(thd)))
|
||||
@ -1642,7 +1642,7 @@ find_field_in_tables(THD *thd,Item_field *item,TABLE_LIST *tables)
|
||||
bool found_table=0;
|
||||
for (; tables ; tables=tables->next)
|
||||
{
|
||||
if (!strcmp(tables->name,table_name) &&
|
||||
if (!strcmp(tables->alias,table_name) &&
|
||||
(!db ||
|
||||
(tables->db && !strcmp(db,tables->db)) ||
|
||||
(!tables->db && !strcmp(db,thd->db))))
|
||||
@ -1882,7 +1882,7 @@ insert_fields(THD *thd,TABLE_LIST *tables, const char *db_name,
|
||||
if (grant_option && !thd->master_access &&
|
||||
check_grant_all_columns(thd,SELECT_ACL,table) )
|
||||
DBUG_RETURN(-1);
|
||||
if (!table_name || (!strcmp(table_name,tables->name) &&
|
||||
if (!table_name || (!strcmp(table_name,tables->alias) &&
|
||||
(!db_name || !tables->db ||
|
||||
!strcmp(tables->db,db_name))))
|
||||
{
|
||||
|
Reference in New Issue
Block a user