1021
1021
| ident_or_text '=' ident_or_text
1023
parser::buildSchemaOption(&Lex, $1.str, $3);
1023
parser::buildSchemaOption(&Lex, $1.data(), $3);
1025
1025
| ident_or_text '=' ulonglong_num
1027
parser::buildSchemaOption(&Lex, $1.str, $3);
1027
parser::buildSchemaOption(&Lex, $1.data(), $3);
1059
1059
custom_engine_option:
1060
1060
ENGINE_SYM '=' ident_or_text
1062
Lex.table()->mutable_engine()->set_name($3.str);
1062
Lex.table()->mutable_engine()->set_name($3.data());
1064
1064
| COMMENT_SYM opt_equal TEXT_STRING_sys
1066
Lex.table()->mutable_options()->set_comment($3.str);
1066
Lex.table()->mutable_options()->set_comment($3.data());
1068
1068
| AUTO_INC opt_equal ulonglong_num
1097
1097
| ident_or_text '=' engine_option_value
1099
parser::buildEngineOption(&Lex, $1.str, $3);
1099
parser::buildEngineOption(&Lex, $1.data(), $3);
1101
1101
| ident_or_text '=' ulonglong_num
1103
parser::buildEngineOption(&Lex, $1.str, $3);
1103
parser::buildEngineOption(&Lex, $1.data(), $3);
1105
1105
| default_charset
1106
1106
| default_collation
1185
1185
| opt_constraint constraint_key_type opt_ident key_alg
1186
1186
'(' key_list ')' key_options
1188
parser::buildKey(&Lex, $2, $3.str ? $3 : $1);
1188
parser::buildKey(&Lex, $2, $3.data() ? $3 : $1);
1190
1190
| opt_constraint FOREIGN KEY_SYM opt_ident '(' key_list ')' references
1192
parser::buildForeignKey(&Lex, $1.str ? $1 : $4, $8);
1192
parser::buildForeignKey(&Lex, $1.data() ? $1 : $4, $8);
1194
1194
| constraint opt_check_constraint
1604
1604
statement->comment= $2;
1606
1606
if (Lex.field())
1607
Lex.field()->set_comment($2.str);
1607
Lex.field()->set_comment($2.data());
1611
1611
collation_name:
1614
if (!($$=get_charset_by_name($1.str)))
1614
if (!($$=get_charset_by_name($1.data())))
1616
my_error(ER_UNKNOWN_COLLATION, MYF(0), $1.str);
1616
my_error(ER_UNKNOWN_COLLATION, MYF(0), $1.data());
1617
1617
DRIZZLE_YYABORT;
1789
1789
ident { $$=new Key_part_spec($1, 0); }
1790
1790
| ident '(' NUM ')'
1792
int key_part_len= atoi($3.str);
1792
int key_part_len= atoi($3.data());
1793
1793
if (!key_part_len)
1795
my_error(ER_KEY_PART_0, MYF(0), $1.str);
1795
my_error(ER_KEY_PART_0, MYF(0), $1.data());
1797
1797
$$=new Key_part_spec($1, (uint) key_part_len);
1944
1944
statement->default_value,
1945
1945
statement->on_update_value,
1946
1946
&statement->comment,
1947
$3.str, &Lex.interval_list, Lex.charset))
1947
$3.data(), &Lex.interval_list, Lex.charset))
1948
1948
DRIZZLE_YYABORT;
1956
1956
message::AlterTable::AlterTableOperation *operation;
1957
1957
operation= Lex.alter_table()->add_operations();
1958
1958
operation->set_operation(message::AlterTable::AlterTableOperation::DROP_COLUMN);
1959
operation->set_drop_name($3.str);
1959
operation->set_drop_name($3.data());
1961
1961
| DROP FOREIGN KEY_SYM opt_ident
1963
parser::buildAddAlterDropIndex(&Lex, $4.str, true);
1963
parser::buildAddAlterDropIndex(&Lex, $4.data(), true);
1965
1965
| DROP PRIMARY_SYM KEY_SYM
1994
1994
statement::AlterTable *statement= (statement::AlterTable *)Lex.statement;
1996
statement->alter_info.alter_list.push_back(AlterColumn($3.str,$6));
1996
statement->alter_info.alter_list.push_back(AlterColumn($3.data(),$6));
1997
1997
statement->alter_info.flags.set(ALTER_COLUMN_DEFAULT);
1999
1999
| ALTER_SYM opt_column field_ident DROP DEFAULT
2001
2001
statement::AlterTable *statement= (statement::AlterTable *)Lex.statement;
2003
statement->alter_info.alter_list.push_back(AlterColumn($3.str, (Item*) 0));
2003
statement->alter_info.alter_list.push_back(AlterColumn($3.data(), NULL));
2004
2004
statement->alter_info.flags.set(ALTER_COLUMN_DEFAULT);
2006
2006
| RENAME opt_to table_ident
2027
2027
message::AlterTable::RenameTable *rename_operation;
2028
2028
rename_operation= Lex.alter_table()->mutable_rename();
2029
2029
rename_operation->set_to_schema(Lex.select_lex.db);
2030
rename_operation->set_to_name(Lex.name.str);
2030
rename_operation->set_to_name(Lex.name.data());
2032
2032
| CONVERT_SYM TO_SYM collation_name_or_default
3117
3117
/* fix for bug 250065, from Andrew Garner <muzazzi@gmail.com> */
3118
my_error(ER_SP_DOES_NOT_EXIST, MYF(0), "FUNCTION", $1.str);
3118
my_error(ER_SP_DOES_NOT_EXIST, MYF(0), "FUNCTION", $1.data());
3121
3121
if (not ($$= item))
4105
NUM { int error; $$= (unsigned long) internal::my_strtoll10($1.str, NULL, &error); }
4106
| HEX_NUM { $$= (unsigned long) strtol($1.str, NULL, 16); }
4107
| LONG_NUM { int error; $$= (unsigned long) internal::my_strtoll10($1.str, NULL, &error); }
4108
| ULONGLONG_NUM { int error; $$= (unsigned long) internal::my_strtoll10($1.str, NULL, &error); }
4109
| DECIMAL_NUM { int error; $$= (unsigned long) internal::my_strtoll10($1.str, NULL, &error); }
4110
| FLOAT_NUM { int error; $$= (unsigned long) internal::my_strtoll10($1.str, NULL, &error); }
4105
NUM { int error; $$= (unsigned long) internal::my_strtoll10($1.data(), NULL, &error); }
4106
| HEX_NUM { $$= (unsigned long) strtol($1.data(), NULL, 16); }
4107
| LONG_NUM { int error; $$= (unsigned long) internal::my_strtoll10($1.data(), NULL, &error); }
4108
| ULONGLONG_NUM { int error; $$= (unsigned long) internal::my_strtoll10($1.data(), NULL, &error); }
4109
| DECIMAL_NUM { int error; $$= (unsigned long) internal::my_strtoll10($1.data(), NULL, &error); }
4110
| FLOAT_NUM { int error; $$= (unsigned long) internal::my_strtoll10($1.data(), NULL, &error); }
4114
NUM { int error; $$= (uint64_t) internal::my_strtoll10($1.str, NULL, &error); }
4115
| ULONGLONG_NUM { int error; $$= (uint64_t) internal::my_strtoll10($1.str, NULL, &error); }
4116
| LONG_NUM { int error; $$= (uint64_t) internal::my_strtoll10($1.str, NULL, &error); }
4117
| DECIMAL_NUM { int error; $$= (uint64_t) internal::my_strtoll10($1.str, NULL, &error); }
4118
| FLOAT_NUM { int error; $$= (uint64_t) internal::my_strtoll10($1.str, NULL, &error); }
4114
NUM { int error; $$= (uint64_t) internal::my_strtoll10($1.data(), NULL, &error); }
4115
| ULONGLONG_NUM { int error; $$= (uint64_t) internal::my_strtoll10($1.data(), NULL, &error); }
4116
| LONG_NUM { int error; $$= (uint64_t) internal::my_strtoll10($1.data(), NULL, &error); }
4117
| DECIMAL_NUM { int error; $$= (uint64_t) internal::my_strtoll10($1.data(), NULL, &error); }
4118
| FLOAT_NUM { int error; $$= (uint64_t) internal::my_strtoll10($1.data(), NULL, &error); }
4121
4121
select_var_list_init:
4160
4160
OUTFILE TEXT_STRING_filesystem
4162
4162
Lex.setCacheable(false);
4163
Lex.exchange= new file_exchange($2.str, 0);
4163
Lex.exchange= new file_exchange((char*)$2.data(), 0);
4164
4164
Lex.result= new select_export(Lex.exchange);
4166
4166
opt_field_term opt_line_term
4206
4206
message::AlterTable::AlterTableOperation *operation;
4207
4207
operation= Lex.alter_table()->add_operations();
4208
4208
operation->set_operation(message::AlterTable::AlterTableOperation::DROP_KEY);
4209
operation->set_drop_name($4.str);
4209
operation->set_drop_name($4.data());
4212
4212
| DROP DATABASE if_exists schema_name