Hi, all,  I don't know if this is the right list to ask such naive question.
I am analyzing some mysql code for my work. For the following code:
sql/sql_parser.c:5247
bool
check_routine_access(THD *thd, ulong want_access,char *db, char *name,
     bool is_proc, bool no_errors)
{
  TABLE_LIST tables[1];

  bzero((char *)tables, sizeof(TABLE_LIST));
  tables->db= db;
  tables->table_name= tables->alias= name;

.........
}

For tables, Why we use an array, not as the following:
TABLE_LIST tables, * tables_p;
tables_p = &tables;

I know that they are equivalent,  but anyone can explain why we use the
former? Are there any special rules or I misunderstand the code?


Thanks very much


Tianwei

Reply via email to