18 #ifndef NDB_DIST_PRIV_UTIL_H
19 #define NDB_DIST_PRIV_UTIL_H
22 size_t m_iter_curr_table;
29 const char* database()
const {
return "mysql"; }
32 const char* iter_next_table()
34 static const char* tables[] =
35 {
"user",
"db",
"tables_priv",
"columns_priv",
"procs_priv",
"host",
38 if (m_iter_curr_table >= (
sizeof(tables) /
sizeof(tables[0])))
41 return tables[m_iter_curr_table-1];
45 void iter_reset() { m_iter_curr_table = 0; }
51 is_distributed_priv_table(
const char *db,
const char *
table)
54 if (strcmp(db, dist_priv.database()))
58 const char* priv_table_name;
59 while((priv_table_name= dist_priv.iter_next_table()))
61 if (strcmp(table, priv_table_name) == 0)