224
224
bool check_reserved_words(lex_string_t *name)
226
if (!my_strcasecmp(system_charset_info, name->str, "GLOBAL") ||
227
!my_strcasecmp(system_charset_info, name->str, "LOCAL") ||
228
!my_strcasecmp(system_charset_info, name->str, "SESSION"))
226
if (!my_strcasecmp(system_charset_info, name->data(), "GLOBAL") ||
227
!my_strcasecmp(system_charset_info, name->data(), "LOCAL") ||
228
!my_strcasecmp(system_charset_info, name->data(), "SESSION"))
306
306
message::Engine::Option *opt= lex->table()->mutable_engine()->add_options();
307
307
opt->set_name(key);
308
opt->set_state(value.str, value.length);
308
opt->set_state(value.data(), value.size());
311
311
void buildEngineOption(LEX *lex, const char *key, uint64_t value)
320
320
statement::CreateSchema *statement= (statement::CreateSchema *)lex->statement;
321
321
message::Engine::Option *opt= statement->schema_message.mutable_engine()->add_options();
322
322
opt->set_name(key);
323
opt->set_state(value.str, value.length);
323
opt->set_state(value.data(), value.size());
326
326
void buildSchemaDefiner(LEX *lex, const lex_string_t &value)
328
328
statement::CreateSchema *statement= (statement::CreateSchema *)lex->statement;
329
identifier::User user(value.str);
329
identifier::User user(value.data());
330
330
message::set_definer(statement->schema_message, user);
349
349
TableList *table= reinterpret_cast<TableList*>(lex->current_select->table_list.first);
351
if (schema_name.length)
351
if (schema_name.size())
353
if (my_strcasecmp(table_alias_charset, schema_name.str, table->getSchemaName()))
353
if (my_strcasecmp(table_alias_charset, schema_name.data(), table->getSchemaName()))
355
my_error(ER_WRONG_DB_NAME, MYF(0), schema_name.str);
355
my_error(ER_WRONG_DB_NAME, MYF(0), schema_name.data());
360
if (my_strcasecmp(table_alias_charset, table_name.str,
360
if (my_strcasecmp(table_alias_charset, table_name.data(),
361
361
table->getTableName()))
363
my_error(ER_WRONG_TABLE_NAME, MYF(0), table_name.str);
363
my_error(ER_WRONG_TABLE_NAME, MYF(0), table_name.data());
372
372
Select_Lex *sel= lex->current_select;
374
if (table_name.length and sel->no_table_names_allowed)
374
if (table_name.size() and sel->no_table_names_allowed)
376
my_error(ER_TABLENAME_NOT_ALLOWED_HERE, MYF(0), table_name.str, lex->session->where());
376
my_error(ER_TABLENAME_NOT_ALLOWED_HERE, MYF(0), table_name.data(), lex->session->where());
379
379
return sel->parsing_place != IN_HAVING || sel->get_in_sum_expr() > 0
380
? (Item*) new Item_field(lex->current_context(), schema_name.str, table_name.str, field_name.str)
381
: (Item*) new Item_ref(lex->current_context(), schema_name.str, table_name.str, field_name.str);
380
? (Item*) new Item_field(lex->current_context(), schema_name.data(), table_name.data(), field_name.data())
381
: (Item*) new Item_ref(lex->current_context(), schema_name.data(), table_name.data(), field_name.data());
384
384
Item *buildTableWild(LEX *lex, const lex_string_t &schema_name, const lex_string_t &table_name)
386
386
Select_Lex *sel= lex->current_select;
387
Item *item= new Item_field(lex->current_context(), schema_name.str, table_name.str, "*");
387
Item *item= new Item_field(lex->current_context(), schema_name.data(), table_name.data(), "*");
388
388
sel->with_wild++;