850
862
CREATE CATALOG_SYM catalog_name
852
Lex->statement= new statement::catalog::Create(YYSession, $3);
864
Lex.statement= new statement::catalog::Create(YYSession, $3);
854
866
| CREATE opt_table_options TABLE_SYM opt_if_not_exists table_ident
856
Lex->statement= new statement::CreateTable(YYSession, $5, $2);
868
Lex.statement= new statement::CreateTable(YYSession, $5, $2);
858
if (not Lex->select_lex.add_table_to_list(YYSession, $5, NULL,
870
if (not Lex.select_lex.add_table_to_list(YYSession, $5, NULL,
859
871
TL_OPTION_UPDATING,
862
Lex->col_list.clear();
874
Lex.col_list.clear();
864
876
create_table_definition
866
Lex->current_select= &Lex->select_lex;
878
Lex.current_select= &Lex.select_lex;
868
880
| CREATE build_method
870
Lex->statement= new statement::CreateIndex(YYSession, $2);
882
Lex.statement= new statement::CreateIndex(YYSession);
872
884
opt_unique INDEX_SYM ident key_alg ON table_ident '(' key_list ')' key_options
874
if (not Lex->current_select->add_table_to_list(Lex->session, $9,
886
if (not Lex.current_select->add_table_to_list(Lex.session, $9,
876
888
TL_OPTION_UPDATING))
879
parser::buildKey(Lex, $4, $6);
891
parser::buildKey(&Lex, $4, $6);
881
893
| CREATE DATABASE opt_if_not_exists schema_name
883
Lex->statement= new statement::CreateSchema(YYSession);
895
Lex.statement= new statement::CreateSchema(YYSession);
885
897
opt_create_database_options
969
981
The following work only with the local list, the global list
970
982
is created correctly in this case
972
Lex->current_select->table_list.push_front(&Lex->save_list);
984
Lex.current_select->table_list.push_front(&Lex.save_list);
976
988
opt_create_database_options:
978
| default_collation_schema {}
979
| opt_database_custom_options {}
990
| default_collation_schema
991
| default_collation_schema opt_database_custom_options
992
| default_collation_schema ',' opt_database_custom_options
993
| opt_database_custom_options
982
996
opt_database_custom_options:
983
997
custom_database_option
998
| custom_database_option opt_database_custom_options
984
999
| custom_database_option ',' opt_database_custom_options
987
1002
custom_database_option:
990
statement::CreateSchema *statement= (statement::CreateSchema *)Lex->statement;
991
statement->schema_message.mutable_engine()->add_options()->set_name($1.str);
993
| REPLICATE opt_equal TRUE_SYM
995
parser::buildReplicationOption(Lex, true);
997
| REPLICATE opt_equal FALSE_SYM
999
parser::buildReplicationOption(Lex, false);
1001
| ident_or_text equal ident_or_text
1003
parser::buildSchemaOption(Lex, $1.str, $3);
1005
| ident_or_text equal ulonglong_num
1007
parser::buildSchemaOption(Lex, $1.str, $3);
1005
statement::CreateSchema *statement= (statement::CreateSchema *)Lex.statement;
1006
statement->schema_message.mutable_engine()->add_options()->set_name($1.data());
1008
| REPLICATE '=' TRUE_SYM
1010
parser::buildReplicationOption(&Lex, true);
1012
| REPLICATE '=' FALSE_SYM
1014
parser::buildReplicationOption(&Lex, false);
1016
| DEFINER TEXT_STRING_sys
1018
parser::buildSchemaDefiner(&Lex, identifier::User($2));
1020
| DEFINER CURRENT_USER optional_braces
1022
parser::buildSchemaDefiner(&Lex, *session->user());
1024
| ident_or_text '=' ident_or_text
1026
parser::buildSchemaOption(&Lex, $1.data(), $3);
1028
| ident_or_text '=' ulonglong_num
1030
parser::buildSchemaOption(&Lex, $1.data(), $3);
1037
1060
custom_engine_option;
1039
1062
custom_engine_option:
1040
ENGINE_SYM equal ident_or_text
1063
ENGINE_SYM '=' ident_or_text
1042
Lex->table()->mutable_engine()->set_name($3.str);
1065
Lex.table()->mutable_engine()->set_name($3.data());
1044
1067
| COMMENT_SYM opt_equal TEXT_STRING_sys
1046
Lex->table()->mutable_options()->set_comment($3.str);
1069
Lex.table()->mutable_options()->set_comment($3.data());
1048
1071
| AUTO_INC opt_equal ulonglong_num
1050
Lex->table()->mutable_options()->set_auto_increment_value($3);
1052
| REPLICATE opt_equal TRUE_SYM
1054
Lex->table()->mutable_options()->set_dont_replicate(false);
1056
| REPLICATE opt_equal FALSE_SYM
1058
Lex->table()->mutable_options()->set_dont_replicate(true);
1060
| ROW_FORMAT_SYM equal row_format_or_text
1062
parser::buildEngineOption(Lex, "ROW_FORMAT", $3);
1064
| FILE_SYM equal TEXT_STRING_sys
1066
parser::buildEngineOption(Lex, "FILE", $3);
1068
| ident_or_text equal engine_option_value
1070
parser::buildEngineOption(Lex, $1.str, $3);
1072
| ident_or_text equal ulonglong_num
1074
parser::buildEngineOption(Lex, $1.str, $3);
1073
Lex.table()->mutable_options()->set_auto_increment_value($3);
1075
| REPLICATE '=' TRUE_SYM
1077
message::set_is_replicated(*Lex.table(), true);
1079
| REPLICATE '=' FALSE_SYM
1081
message::set_is_replicated(*Lex.table(), false);
1083
| DEFINER TEXT_STRING_sys
1085
message::set_definer(*Lex.table(), identifier::User($2));
1087
| DEFINER CURRENT_USER optional_braces
1089
message::set_definer(*Lex.table(), *session->user());
1091
| ROW_FORMAT_SYM '=' row_format_or_text
1093
parser::buildEngineOption(&Lex, "ROW_FORMAT", $3);
1095
| FILE_SYM '=' TEXT_STRING_sys
1097
parser::buildEngineOption(&Lex, "FILE", $3);
1099
| ident_or_text '=' engine_option_value
1101
parser::buildEngineOption(&Lex, $1.data(), $3);
1103
| ident_or_text '=' ulonglong_num
1105
parser::buildEngineOption(&Lex, $1.data(), $3);
1076
1108
| default_collation
1116
charset_name_or_default:
1122
opt_default charset opt_equal charset_name_or_default
1079
1126
default_collation:
1080
1127
opt_default COLLATE_SYM opt_equal collation_name_or_default
1082
if (not parser::buildCollation(Lex, $4))
1129
if (not parser::buildCollation(&Lex, $4))
1084
1131
DRIZZLE_YYABORT;
1129
1175
field_spec opt_check_constraint
1130
1176
| field_spec references
1132
Lex->col_list.clear(); /* Alloced by memory::sql_alloc */
1178
Lex.col_list.clear(); /* Alloced by memory::sql_alloc */
1137
1183
key_type opt_ident key_alg '(' key_list ')' key_options
1139
parser::buildKey(Lex, $1, $2);
1185
parser::buildKey(&Lex, $1, $2);
1141
1187
| opt_constraint constraint_key_type opt_ident key_alg
1142
1188
'(' key_list ')' key_options
1144
parser::buildKey(Lex, $2, $3.str ? $3 : $1);
1190
parser::buildKey(&Lex, $2, $3.data() ? $3 : $1);
1146
1192
| opt_constraint FOREIGN KEY_SYM opt_ident '(' key_list ')' references
1148
parser::buildForeignKey(Lex, $1.str ? $1 : $4, $8);
1194
parser::buildForeignKey(&Lex, $1.data() ? $1 : $4, $8);
1150
1196
| constraint opt_check_constraint
1152
Lex->col_list.clear(); /* Alloced by memory::sql_alloc */
1198
Lex.col_list.clear(); /* Alloced by memory::sql_alloc */
1154
1200
| opt_constraint check_constraint
1156
Lex->col_list.clear(); /* Alloced by memory::sql_alloc */
1202
Lex.col_list.clear(); /* Alloced by memory::sql_alloc */
1181
parser::buildCreateFieldIdent(Lex);
1227
parser::buildCreateFieldIdent(&Lex);
1183
1229
field_def opt_attribute_comment
1185
statement::CreateTable *statement= (statement::CreateTable *)Lex->statement;
1231
statement::CreateTable *statement= (statement::CreateTable*)Lex.statement;
1189
Lex->field()->set_name($1.str);
1235
Lex.field()->set_name($1.data());
1192
if (add_field_to_list(Lex->session, &$1, (enum enum_field_types) $3,
1193
Lex->length, Lex->dec, Lex->type,
1238
if (add_field_to_list(Lex.session, $1, (enum_field_types) $3,
1239
Lex.length, Lex.dec, Lex.type,
1194
1240
statement->column_format,
1195
1241
statement->default_value, statement->on_update_value,
1196
&statement->comment,
1197
statement->change, &Lex->interval_list, Lex->charset))
1243
statement->change, &Lex.interval_list, Lex.charset))
1198
1244
DRIZZLE_YYABORT;
1200
Lex->setField(NULL);
1205
1251
TIMESTAMP_SYM opt_attribute_timestamp
1207
$$=parser::buildTimestampColumn(Lex, NULL);
1253
$$=parser::buildTimestampColumn(&Lex, NULL);
1209
1255
| TIMESTAMP_SYM '(' NUM ')' opt_attribute_timestamp
1211
$$=parser::buildTimestampColumn(Lex, $3.str);
1257
$$=parser::buildTimestampColumn(&Lex, $3.data());
1213
1259
| DATETIME_SYM opt_attribute_timestamp
1215
1261
$$=DRIZZLE_TYPE_DATETIME;
1218
Lex->field()->set_type(message::Table::Field::DATETIME);
1264
Lex.field()->set_type(message::Table::Field::DATETIME);
1220
1266
| int_type opt_attribute_number
1224
1270
| CHAR_SYM opt_attribute_string
1226
$$= parser::buildVarcharColumn(Lex, "1");
1272
$$= parser::buildVarcharColumn(&Lex, "1");
1228
1274
| varchar '(' NUM ')' opt_attribute_string
1230
$$= parser::buildVarcharColumn(Lex, $3.str);
1276
$$= parser::buildVarcharColumn(&Lex, $3.data());
1232
1278
| TEXT_SYM opt_attribute_string
1234
1280
$$=DRIZZLE_TYPE_BLOB;
1235
Lex->length=(char*) 0; /* use default length */
1281
Lex.length= NULL; /* use default length */
1238
Lex->field()->set_type(message::Table::Field::BLOB);
1284
Lex.field()->set_type(message::Table::Field::BLOB);
1242
Lex->interval_list.clear();
1288
Lex.interval_list.clear();
1244
1290
'(' string_list ')' opt_attribute_string
1246
1292
$$=DRIZZLE_TYPE_ENUM;
1249
Lex->field()->set_type(message::Table::Field::ENUM);
1295
Lex.field()->set_type(message::Table::Field::ENUM);
1251
1297
| VARBINARY '(' NUM ')' opt_attribute
1253
$$= parser::buildVarbinaryColumn(Lex, $3.str);
1299
$$= parser::buildVarbinaryColumn(&Lex, $3.data());
1255
1301
| real_type opt_attribute_number
1257
1303
assert ($1 == DRIZZLE_TYPE_DOUBLE);
1258
$$= parser::buildDoubleColumn(Lex);
1304
$$= parser::buildDoubleColumn(&Lex);
1260
1306
| DATE_SYM opt_attribute
1262
1308
$$=DRIZZLE_TYPE_DATE;
1265
Lex->field()->set_type(message::Table::Field::DATE);
1311
Lex.field()->set_type(message::Table::Field::DATE);
1267
1313
| TIME_SYM opt_attribute
1269
1315
$$=DRIZZLE_TYPE_TIME;
1272
Lex->field()->set_type(message::Table::Field::TIME);
1318
Lex.field()->set_type(message::Table::Field::TIME);
1274
1320
| BLOB_SYM opt_attribute
1276
$$= parser::buildBlobColumn(Lex);
1322
$$= parser::buildBlobColumn(&Lex);
1278
1324
| DECIMAL_SYM float_options opt_attribute_number
1280
$$= parser::buildDecimalColumn(Lex);
1326
$$= parser::buildDecimalColumn(&Lex);
1282
1328
| NUMERIC_SYM float_options opt_attribute_number
1284
$$= parser::buildDecimalColumn(Lex);
1330
$$= parser::buildDecimalColumn(&Lex);
1286
1332
| FIXED_SYM float_options opt_attribute_number
1288
$$= parser::buildDecimalColumn(Lex);
1334
$$= parser::buildDecimalColumn(&Lex);
1290
1336
| UUID_SYM opt_attribute
1292
$$= parser::buildUuidColumn(Lex);
1338
$$= parser::buildUuidColumn(&Lex);
1340
| IPV6_SYM opt_attribute
1342
$$= parser::buildIPv6Column(&Lex);
1294
1344
| BOOLEAN_SYM opt_attribute_boolean
1296
$$= parser::buildBooleanColumn(Lex);
1346
$$= parser::buildBooleanColumn(&Lex);
1300
$$= parser::buildSerialColumn(Lex);
1350
$$= parser::buildSerialColumn(&Lex);
1598
{ Lex->ref_list.clear(); }
1648
{ Lex.ref_list.clear(); }
1599
1649
| '(' ref_list ')'
1603
1653
ref_list ',' ident
1604
{ Lex->ref_list.push_back(new Key_part_spec($3, 0)); }
1654
{ Lex.ref_list.push_back(new Key_part_spec($3, 0)); }
1607
Lex->ref_list.clear();
1608
Lex->ref_list.push_back(new Key_part_spec($1, 0));
1657
Lex.ref_list.clear();
1658
Lex.ref_list.push_back(new Key_part_spec($1, 0));
1612
1662
opt_match_clause:
1614
{ ((statement::CreateTable *)Lex->statement)->fk_match_option= drizzled::message::Table::ForeignKeyConstraint::MATCH_UNDEFINED; }
1664
{ ((statement::CreateTable*)Lex.statement)->fk_match_option= drizzled::message::Table::ForeignKeyConstraint::MATCH_UNDEFINED; }
1616
{ ((statement::CreateTable *)Lex->statement)->fk_match_option= drizzled::message::Table::ForeignKeyConstraint::MATCH_FULL; }
1666
{ ((statement::CreateTable*)Lex.statement)->fk_match_option= drizzled::message::Table::ForeignKeyConstraint::MATCH_FULL; }
1617
1667
| MATCH PARTIAL
1618
{ ((statement::CreateTable *)Lex->statement)->fk_match_option= drizzled::message::Table::ForeignKeyConstraint::MATCH_PARTIAL; }
1668
{ ((statement::CreateTable*)Lex.statement)->fk_match_option= drizzled::message::Table::ForeignKeyConstraint::MATCH_PARTIAL; }
1619
1669
| MATCH SIMPLE_SYM
1620
{ ((statement::CreateTable *)Lex->statement)->fk_match_option= drizzled::message::Table::ForeignKeyConstraint::MATCH_SIMPLE; }
1670
{ ((statement::CreateTable*)Lex.statement)->fk_match_option= drizzled::message::Table::ForeignKeyConstraint::MATCH_SIMPLE; }
1623
1673
opt_on_update_delete:
1626
((statement::CreateTable *)Lex->statement)->fk_update_opt= drizzled::message::Table::ForeignKeyConstraint::OPTION_UNDEF;
1627
((statement::CreateTable *)Lex->statement)->fk_delete_opt= drizzled::message::Table::ForeignKeyConstraint::OPTION_UNDEF;
1676
((statement::CreateTable*)Lex.statement)->fk_update_opt= drizzled::message::Table::ForeignKeyConstraint::OPTION_UNDEF;
1677
((statement::CreateTable*)Lex.statement)->fk_delete_opt= drizzled::message::Table::ForeignKeyConstraint::OPTION_UNDEF;
1629
1679
| ON UPDATE_SYM delete_option
1631
((statement::CreateTable *)Lex->statement)->fk_update_opt= $3;
1632
((statement::CreateTable *)Lex->statement)->fk_delete_opt= drizzled::message::Table::ForeignKeyConstraint::OPTION_UNDEF;
1681
((statement::CreateTable*)Lex.statement)->fk_update_opt= $3;
1682
((statement::CreateTable*)Lex.statement)->fk_delete_opt= drizzled::message::Table::ForeignKeyConstraint::OPTION_UNDEF;
1634
1684
| ON DELETE_SYM delete_option
1636
((statement::CreateTable *)Lex->statement)->fk_update_opt= drizzled::message::Table::ForeignKeyConstraint::OPTION_UNDEF;
1637
((statement::CreateTable *)Lex->statement)->fk_delete_opt= $3;
1686
((statement::CreateTable*)Lex.statement)->fk_update_opt= drizzled::message::Table::ForeignKeyConstraint::OPTION_UNDEF;
1687
((statement::CreateTable*)Lex.statement)->fk_delete_opt= $3;
1639
1689
| ON UPDATE_SYM delete_option
1640
1690
ON DELETE_SYM delete_option
1642
((statement::CreateTable *)Lex->statement)->fk_update_opt= $3;
1643
((statement::CreateTable *)Lex->statement)->fk_delete_opt= $6;
1692
((statement::CreateTable *)Lex.statement)->fk_update_opt= $3;
1693
((statement::CreateTable *)Lex.statement)->fk_delete_opt= $6;
1645
1695
| ON DELETE_SYM delete_option
1646
1696
ON UPDATE_SYM delete_option
1648
((statement::CreateTable *)Lex->statement)->fk_update_opt= $6;
1649
((statement::CreateTable *)Lex->statement)->fk_delete_opt= $3;
1698
((statement::CreateTable *)Lex.statement)->fk_update_opt= $6;
1699
((statement::CreateTable *)Lex.statement)->fk_delete_opt= $3;
1736
key_list ',' key_part order_dir { Lex->col_list.push_back($3); }
1737
| key_part order_dir { Lex->col_list.push_back($1); }
1786
key_list ',' key_part order_dir { Lex.col_list.push_back($3); }
1787
| key_part order_dir { Lex.col_list.push_back($1); }
1741
1791
ident { $$=new Key_part_spec($1, 0); }
1742
1792
| ident '(' NUM ')'
1744
int key_part_len= atoi($3.str);
1794
int key_part_len= atoi($3.data());
1745
1795
if (!key_part_len)
1747
my_error(ER_KEY_PART_0, MYF(0), $1.str);
1797
my_error(ER_KEY_PART_0, MYF(0), $1.data());
1749
1799
$$=new Key_part_spec($1, (uint) key_part_len);
1754
/* empty */ { $$= null_lex_str; }
1804
/* empty */ { $$= null_lex_string(); }
1755
1805
| field_ident { $$= $1; }
1759
/* empty */ { $$= null_lex_str; }
1809
/* empty */ { $$= null_lex_string(); }
1760
1810
| '.' ident { $$= $2; }
1764
text_string { Lex->interval_list.push_back($1); }
1765
| string_list ',' text_string { Lex->interval_list.push_back($3); };
1814
text_string { Lex.interval_list.push_back($1); }
1815
| string_list ',' text_string { Lex.interval_list.push_back($3); };
1772
1822
ALTER_SYM build_method opt_ignore TABLE_SYM table_ident
1774
statement::AlterTable *statement= new statement::AlterTable(YYSession, $5, $2);
1775
Lex->statement= statement;
1776
Lex->duplicates= DUP_ERROR;
1777
if (not Lex->select_lex.add_table_to_list(YYSession, $5, NULL, TL_OPTION_UPDATING))
1824
statement::AlterTable *statement= new statement::AlterTable(YYSession, $5);
1825
Lex.statement= statement;
1826
Lex.duplicates= DUP_ERROR;
1827
if (not Lex.select_lex.add_table_to_list(YYSession, $5, NULL, TL_OPTION_UPDATING))
1779
1829
DRIZZLE_YYABORT;
1782
Lex->col_list.clear();
1783
Lex->select_lex.init_order();
1784
Lex->select_lex.db= const_cast<char *>(((TableList*) Lex->select_lex.table_list.first)->getSchemaName());
1832
Lex.col_list.clear();
1833
Lex.select_lex.init_order();
1834
Lex.select_lex.db= ((TableList*) Lex.select_lex.table_list.first)->getSchemaName();
1788
1838
| ALTER_SYM DATABASE schema_name
1790
Lex->statement= new statement::AlterSchema(YYSession);
1840
Lex.statement= new statement::AlterSchema(YYSession);
1792
1842
default_collation_schema
1795
if (Lex->name.str == NULL && Lex->copy_db_to(&Lex->name.str, &Lex->name.length))
1845
if (not Lex.name.data())
1847
str_ref db = Lex.session->copy_db_to();
1850
Lex.name.assign(db.data(), db.size());
1846
1903
add_column column_def opt_place { }
1847
1904
| ADD_SYM key_def
1849
statement::AlterTable *statement= (statement::AlterTable *)Lex->statement;
1906
statement::AlterTable *statement= (statement::AlterTable *)Lex.statement;
1851
1908
statement->alter_info.flags.set(ALTER_ADD_INDEX);
1853
1910
| add_column '(' field_list ')'
1855
statement::AlterTable *statement= (statement::AlterTable *)Lex->statement;
1912
statement::AlterTable *statement= (statement::AlterTable *)Lex.statement;
1857
1914
statement->alter_info.flags.set(ALTER_ADD_COLUMN);
1858
1915
statement->alter_info.flags.set(ALTER_ADD_INDEX);
1860
1917
| CHANGE_SYM opt_column field_ident
1862
statement::AlterTable *statement= (statement::AlterTable *)Lex->statement;
1863
statement->change= $3.str;
1919
statement::AlterTable *statement= (statement::AlterTable *)Lex.statement;
1920
statement->change= $3.data();
1864
1921
statement->alter_info.flags.set(ALTER_CHANGE_COLUMN);
1866
1923
field_spec opt_place
1867
1924
| MODIFY_SYM opt_column field_ident
1869
statement::AlterTable *statement= (statement::AlterTable *)Lex->statement;
1870
Lex->length= Lex->dec=0;
1926
statement::AlterTable *statement= (statement::AlterTable *)Lex.statement;
1927
Lex.length= Lex.dec=0;
1872
1929
statement->default_value= statement->on_update_value= 0;
1873
statement->comment= null_lex_str;
1930
statement->comment= null_lex_string();
1875
1932
statement->alter_info.flags.set(ALTER_CHANGE_COLUMN);
1876
1933
statement->column_format= COLUMN_FORMAT_TYPE_DEFAULT;
1878
Lex->setField(NULL);
1880
1937
field_def opt_attribute_comment
1882
statement::AlterTable *statement= (statement::AlterTable *)Lex->statement;
1939
statement::AlterTable *statement= (statement::AlterTable *)Lex.statement;
1884
if (add_field_to_list(Lex->session,&$3,
1941
if (add_field_to_list(Lex.session, $3,
1885
1942
(enum enum_field_types) $5,
1886
Lex->length, Lex->dec, Lex->type,
1943
Lex.length, Lex.dec, Lex.type,
1887
1944
statement->column_format,
1888
1945
statement->default_value,
1889
1946
statement->on_update_value,
1890
&statement->comment,
1891
$3.str, &Lex->interval_list, Lex->charset))
1948
$3.data(), &Lex.interval_list, Lex.charset))
1892
1949
DRIZZLE_YYABORT;
1895
1952
| DROP opt_column field_ident
1897
statement::AlterTable *statement= (statement::AlterTable *)Lex->statement;
1954
statement::AlterTable *statement= (statement::AlterTable *)Lex.statement;
1899
statement->alter_info.drop_list.push_back(AlterDrop(AlterDrop::COLUMN, $3.str));
1900
1956
statement->alter_info.flags.set(ALTER_DROP_COLUMN);
1957
message::AlterTable::AlterTableOperation *operation;
1958
operation= Lex.alter_table()->add_operations();
1959
operation->set_operation(message::AlterTable::AlterTableOperation::DROP_COLUMN);
1960
operation->set_drop_name($3.data());
1902
1962
| DROP FOREIGN KEY_SYM opt_ident
1904
parser::buildAddAlterDropIndex(Lex, $4.str, true);
1964
parser::buildAddAlterDropIndex(&Lex, $4.data(), true);
1906
1966
| DROP PRIMARY_SYM KEY_SYM
1908
parser::buildAddAlterDropIndex(Lex, "PRIMARY");
1968
parser::buildAddAlterDropIndex(&Lex, "PRIMARY");
1910
1970
| DROP key_or_index field_ident
1912
parser::buildAddAlterDropIndex(Lex, $3.str);
1972
parser::buildAddAlterDropIndex(&Lex, $3.data());
1914
1974
| DISABLE_SYM KEYS
1916
statement::AlterTable *statement= (statement::AlterTable *)Lex->statement;
1976
statement::AlterTable *statement= (statement::AlterTable *)Lex.statement;
1918
statement->alter_info.keys_onoff= DISABLE;
1919
1978
statement->alter_info.flags.set(ALTER_KEYS_ONOFF);
1980
message::AlterTable::AlterKeysOnOff *alter_keys_operation;
1981
alter_keys_operation= Lex.alter_table()->mutable_alter_keys_onoff();
1982
alter_keys_operation->set_enable(false);
1921
1984
| ENABLE_SYM KEYS
1923
statement::AlterTable *statement= (statement::AlterTable *)Lex->statement;
1986
statement::AlterTable *statement= (statement::AlterTable *)Lex.statement;
1925
statement->alter_info.keys_onoff= ENABLE;
1926
1988
statement->alter_info.flags.set(ALTER_KEYS_ONOFF);
1989
message::AlterTable::AlterKeysOnOff *alter_keys_operation;
1990
alter_keys_operation= Lex.alter_table()->mutable_alter_keys_onoff();
1991
alter_keys_operation->set_enable(true);
1928
1993
| ALTER_SYM opt_column field_ident SET_SYM DEFAULT signed_literal
1930
statement::AlterTable *statement= (statement::AlterTable *)Lex->statement;
1995
statement::AlterTable *statement= (statement::AlterTable *)Lex.statement;
1932
statement->alter_info.alter_list.push_back(AlterColumn($3.str,$6));
1997
statement->alter_info.alter_list.push_back(AlterColumn($3.data(),$6));
1933
1998
statement->alter_info.flags.set(ALTER_COLUMN_DEFAULT);
1935
2000
| ALTER_SYM opt_column field_ident DROP DEFAULT
1937
statement::AlterTable *statement= (statement::AlterTable *)Lex->statement;
2002
statement::AlterTable *statement= (statement::AlterTable *)Lex.statement;
1939
statement->alter_info.alter_list.push_back(AlterColumn($3.str, (Item*) 0));
2004
statement->alter_info.alter_list.push_back(AlterColumn($3.data(), NULL));
1940
2005
statement->alter_info.flags.set(ALTER_COLUMN_DEFAULT);
1942
2007
| RENAME opt_to table_ident
1944
statement::AlterTable *statement= (statement::AlterTable *)Lex->statement;
1947
Lex->select_lex.db=$3->db.str;
1948
if (Lex->select_lex.db == NULL &&
1949
Lex->copy_db_to(&Lex->select_lex.db, &dummy))
1954
if (check_table_name($3->table.str,$3->table.length))
1956
my_error(ER_WRONG_TABLE_NAME, MYF(0), $3->table.str);
1960
Lex->name= $3->table;
2009
statement::AlterTable *statement= (statement::AlterTable *)Lex.statement;
2010
Lex.select_lex.db= $3->db.data();
2011
if (not Lex.select_lex.db)
2013
str_ref db = Lex.session->copy_db_to();
2016
Lex.select_lex.db = db.data();
2019
if (check_table_name($3->table))
2021
my_error(ER_WRONG_TABLE_NAME, MYF(0), $3->table.data());
2025
Lex.name= $3->table;
1961
2026
statement->alter_info.flags.set(ALTER_RENAME);
2028
message::AlterTable::RenameTable *rename_operation;
2029
rename_operation= Lex.alter_table()->mutable_rename();
2030
rename_operation->set_to_schema(Lex.select_lex.db);
2031
rename_operation->set_to_name(Lex.name.data());
1963
2033
| CONVERT_SYM TO_SYM collation_name_or_default
1965
statement::AlterTable *statement= (statement::AlterTable *)Lex->statement;
2035
statement::AlterTable *statement= (statement::AlterTable *)Lex.statement;
1967
2037
statement->create_info().table_charset=
1968
2038
statement->create_info().default_table_charset= $3;
2880
2949
| SYSDATE optional_braces
2882
$$= new (YYSession->mem_root) Item_func_sysdate_local();
2883
Lex->setCacheable(false);
2951
$$= new (YYSession->mem_root) Item_func_sysdate_local();
2952
Lex.setCacheable(false);
2885
2954
| SYSDATE '(' expr ')'
2887
$$= new (YYSession->mem_root) Item_func_sysdate_local($3);
2888
Lex->setCacheable(false);
2956
$$= new (YYSession->mem_root) Item_func_sysdate_local($3);
2957
Lex.setCacheable(false);
2890
2959
| TIMESTAMP_ADD '(' interval_time_stamp ',' expr ',' expr ')'
2891
2960
{ $$= new (YYSession->mem_root) Item_date_add_interval($7,$5,$3,0); }
2892
2961
| TIMESTAMP_DIFF '(' interval_time_stamp ',' expr ',' expr ')'
2893
2962
{ $$= new (YYSession->mem_root) Item_func_timestamp_diff($5,$7,$3); }
2963
| UTC_TIME_SYM optional_braces
2965
$$= new (YYSession->mem_root) Item_func_curtime_utc();
2966
Lex.setCacheable(false);
2894
2968
| UTC_DATE_SYM optional_braces
2896
2970
$$= new (YYSession->mem_root) Item_func_curdate_utc();
2897
Lex->setCacheable(false);
2971
Lex.setCacheable(false);
2899
2973
| UTC_TIMESTAMP_SYM optional_braces
2901
2975
$$= new (YYSession->mem_root) Item_func_now_utc();
2902
Lex->setCacheable(false);
2976
Lex.setCacheable(false);
3225
Lex->current_select->in_sum_expr--;
3302
Lex.current_select->in_sum_expr--;
3232
{ $$=ITEM_CAST_CHAR; Lex->charset= &my_charset_bin; Lex->dec= 0; }
3309
{ $$=ITEM_CAST_CHAR; Lex.charset= &my_charset_bin; Lex.dec= 0; }
3234
{ $$=ITEM_CAST_BOOLEAN; Lex->charset= &my_charset_bin; Lex->dec= 0; }
3311
{ $$=ITEM_CAST_BOOLEAN; Lex.charset= &my_charset_bin; Lex.dec= 0; }
3236
{ $$=ITEM_CAST_SIGNED; Lex->charset= NULL; Lex->dec=Lex->length= (char*)0; }
3313
{ $$=ITEM_CAST_SIGNED; Lex.charset= NULL; Lex.dec=Lex.length= NULL; }
3237
3314
| SIGNED_SYM INT_SYM
3238
{ $$=ITEM_CAST_SIGNED; Lex->charset= NULL; Lex->dec=Lex->length= (char*)0; }
3315
{ $$=ITEM_CAST_SIGNED; Lex.charset= NULL; Lex.dec=Lex.length= NULL; }
3240
{ $$=ITEM_CAST_SIGNED; Lex->charset= NULL; Lex->dec=Lex->length= (char*)0; }
3317
{ $$=ITEM_CAST_SIGNED; Lex.charset= NULL; Lex.dec=Lex.length= NULL; }
3242
{ $$=ITEM_CAST_UNSIGNED; Lex->charset= NULL; Lex->dec=Lex->length= (char*)0; }
3319
{ $$=ITEM_CAST_UNSIGNED; Lex.charset= NULL; Lex.dec=Lex.length= NULL; }
3243
3320
| UNSIGNED_SYM INT_SYM
3244
{ $$=ITEM_CAST_UNSIGNED; Lex->charset= NULL; Lex->dec=Lex->length= (char*)0; }
3321
{ $$=ITEM_CAST_UNSIGNED; Lex.charset= NULL; Lex.dec=Lex.length= NULL; }
3245
3322
| CHAR_SYM opt_len
3246
{ $$=ITEM_CAST_CHAR; Lex->dec= 0; }
3323
{ $$=ITEM_CAST_CHAR; Lex.dec= 0; }
3248
{ $$=ITEM_CAST_DATE; Lex->charset= NULL; Lex->dec=Lex->length= (char*)0; }
3325
{ $$=ITEM_CAST_DATE; Lex.charset= NULL; Lex.dec=Lex.length= NULL; }
3250
{ $$=ITEM_CAST_TIME; Lex->charset= NULL; Lex->dec=Lex->length= (char*)0; }
3327
{ $$=ITEM_CAST_TIME; Lex.charset= NULL; Lex.dec=Lex.length= NULL; }
3252
{ $$=ITEM_CAST_DATETIME; Lex->charset= NULL; Lex->dec=Lex->length= (char*)0; }
3329
{ $$=ITEM_CAST_DATETIME; Lex.charset= NULL; Lex.dec=Lex.length= NULL; }
3253
3330
| DECIMAL_SYM float_options
3254
{ $$=ITEM_CAST_DECIMAL; Lex->charset= NULL; }
3331
{ $$=ITEM_CAST_DECIMAL; Lex.charset= NULL; }
3344
3421
left-associative joins.
3346
3423
table_ref normal_join table_ref %prec TABLE_REF_PRIORITY
3348
3425
DRIZZLE_YYABORT_UNLESS($1 && ($$=$3));
3349
Lex->is_cross= false;
3426
Lex.is_cross= false;
3351
3428
| table_ref STRAIGHT_JOIN table_factor
3353
DRIZZLE_YYABORT_UNLESS($1 && ($$=$3)); $3->straight=1;
3430
DRIZZLE_YYABORT_UNLESS($1 && ($$=$3)); $3->straight=1;
3355
3432
| table_ref normal_join table_ref
3358
3435
DRIZZLE_YYABORT_UNLESS($1 && $3);
3359
DRIZZLE_YYABORT_UNLESS( not Lex->is_cross );
3436
DRIZZLE_YYABORT_UNLESS( not Lex.is_cross );
3360
3437
/* Change the current name resolution context to a local context. */
3361
if (push_new_name_resolution_context(YYSession, $1, $3))
3363
Lex->current_select->parsing_place= IN_ON;
3438
push_new_name_resolution_context(*YYSession, *$1, *$3);
3439
Lex.current_select->parsing_place= IN_ON;
3367
3443
add_join_on($3,$6);
3369
Lex->current_select->parsing_place= NO_MATTER;
3445
Lex.current_select->parsing_place= NO_MATTER;
3371
3447
| table_ref STRAIGHT_JOIN table_factor
3374
3450
DRIZZLE_YYABORT_UNLESS($1 && $3);
3375
3451
/* Change the current name resolution context to a local context. */
3376
if (push_new_name_resolution_context(YYSession, $1, $3))
3378
Lex->current_select->parsing_place= IN_ON;
3452
push_new_name_resolution_context(*YYSession, *$1, *$3);
3453
Lex.current_select->parsing_place= IN_ON;
3382
3457
$3->straight=1;
3383
3458
add_join_on($3,$6);
3385
Lex->current_select->parsing_place= NO_MATTER;
3460
Lex.current_select->parsing_place= NO_MATTER;
3387
3462
| table_ref normal_join table_ref
3659
3730
select_derived2:
3661
Lex->derived_tables|= DERIVED_SUBQUERY;
3662
if (not Lex->expr_allows_subselect)
3732
Lex.derived_tables|= DERIVED_SUBQUERY;
3733
if (not Lex.expr_allows_subselect)
3664
3735
parser::my_parse_error(YYSession->m_lip);
3665
3736
DRIZZLE_YYABORT;
3667
if (Lex->current_select->linkage == GLOBAL_OPTIONS_TYPE || new_select(Lex, 1))
3738
if (Lex.current_select->linkage == GLOBAL_OPTIONS_TYPE || new_select(&Lex, 1))
3668
3739
DRIZZLE_YYABORT;
3670
Lex->current_select->linkage= DERIVED_TABLE_TYPE;
3671
Lex->current_select->parsing_place= SELECT_LIST;
3741
Lex.current_select->linkage= DERIVED_TABLE_TYPE;
3742
Lex.current_select->parsing_place= SELECT_LIST;
3673
3744
select_options select_item_list
3675
Lex->current_select->parsing_place= NO_MATTER;
3746
Lex.current_select->parsing_place= NO_MATTER;
3677
3748
opt_select_from
3680
3751
get_select_lex:
3681
/* Empty */ { $$= Lex->current_select; }
3752
/* Empty */ { $$= Lex.current_select; }
3684
3755
select_derived_init:
3687
Select_Lex *sel= Lex->current_select;
3758
Select_Lex *sel= Lex.current_select;
3688
3759
TableList *embedding;
3689
if (!sel->embedding || sel->end_nested_join(Lex->session))
3760
if (!sel->embedding || sel->end_nested_join())
3691
3762
/* we are not in parentheses */
3692
3763
parser::my_parse_error(YYSession->m_lip);
3693
3764
DRIZZLE_YYABORT;
3695
embedding= Lex->current_select->embedding;
3766
embedding= Lex.current_select->embedding;
3696
3767
$$= embedding &&
3697
3768
!embedding->getNestedJoin()->join_list.size();
3698
3769
/* return true if we are deeply nested */
4034
ULONGLONG_NUM { $$= new Item_uint($1.str, $1.length); }
4035
| LONG_NUM { $$= new Item_uint($1.str, $1.length); }
4036
| NUM { $$= new Item_uint($1.str, $1.length); }
4097
ULONGLONG_NUM { $$= new Item_uint($1.data(), $1.size()); }
4098
| LONG_NUM { $$= new Item_uint($1.data(), $1.size()); }
4099
| NUM { $$= new Item_uint($1.data(), $1.size()); }
4039
4102
delete_limit_clause:
4042
Lex->current_select->select_limit= 0;
4105
Lex.current_select->select_limit= 0;
4044
4107
| LIMIT limit_option
4046
Select_Lex *sel= Lex->current_select;
4109
Select_Lex *sel= Lex.current_select;
4047
4110
sel->select_limit= $2;
4048
4111
sel->explicit_limit= 1;
4053
NUM { int error; $$= (unsigned long) internal::my_strtoll10($1.str, (char**) 0, &error); }
4054
| HEX_NUM { $$= (unsigned long) strtol($1.str, (char**) 0, 16); }
4055
| LONG_NUM { int error; $$= (unsigned long) internal::my_strtoll10($1.str, (char**) 0, &error); }
4056
| ULONGLONG_NUM { int error; $$= (unsigned long) internal::my_strtoll10($1.str, (char**) 0, &error); }
4057
| DECIMAL_NUM { int error; $$= (unsigned long) internal::my_strtoll10($1.str, (char**) 0, &error); }
4058
| FLOAT_NUM { int error; $$= (unsigned long) internal::my_strtoll10($1.str, (char**) 0, &error); }
4116
NUM { int error; $$= (unsigned long) internal::my_strtoll10($1.data(), NULL, &error); }
4117
| HEX_NUM { $$= (unsigned long) strtol($1.data(), NULL, 16); }
4118
| LONG_NUM { int error; $$= (unsigned long) internal::my_strtoll10($1.data(), NULL, &error); }
4119
| ULONGLONG_NUM { int error; $$= (unsigned long) internal::my_strtoll10($1.data(), NULL, &error); }
4120
| DECIMAL_NUM { int error; $$= (unsigned long) internal::my_strtoll10($1.data(), NULL, &error); }
4121
| FLOAT_NUM { int error; $$= (unsigned long) internal::my_strtoll10($1.data(), NULL, &error); }
4062
NUM { int error; $$= (uint64_t) internal::my_strtoll10($1.str, (char**) 0, &error); }
4063
| ULONGLONG_NUM { int error; $$= (uint64_t) internal::my_strtoll10($1.str, (char**) 0, &error); }
4064
| LONG_NUM { int error; $$= (uint64_t) internal::my_strtoll10($1.str, (char**) 0, &error); }
4065
| DECIMAL_NUM { int error; $$= (uint64_t) internal::my_strtoll10($1.str, (char**) 0, &error); }
4066
| FLOAT_NUM { int error; $$= (uint64_t) internal::my_strtoll10($1.str, (char**) 0, &error); }
4125
NUM { int error; $$= (uint64_t) internal::my_strtoll10($1.data(), NULL, &error); }
4126
| ULONGLONG_NUM { int error; $$= (uint64_t) internal::my_strtoll10($1.data(), NULL, &error); }
4127
| LONG_NUM { int error; $$= (uint64_t) internal::my_strtoll10($1.data(), NULL, &error); }
4128
| DECIMAL_NUM { int error; $$= (uint64_t) internal::my_strtoll10($1.data(), NULL, &error); }
4129
| FLOAT_NUM { int error; $$= (uint64_t) internal::my_strtoll10($1.data(), NULL, &error); }
4069
4132
select_var_list_init:
4071
if (not Lex->describe && (not (Lex->result= new select_dumpvar())))
4134
if (not Lex.describe)
4135
Lex.result= new select_dumpvar;
4074
4137
select_var_list
4136
4196
DROP CATALOG_SYM catalog_name
4138
Lex->statement= new statement::catalog::Drop(YYSession, $3);
4198
Lex.statement= new statement::catalog::Drop(YYSession, $3);
4140
4200
| DROP opt_temporary table_or_tables if_exists table_list
4142
4202
statement::DropTable *statement= new statement::DropTable(YYSession);
4143
Lex->statement= statement;
4203
Lex.statement= statement;
4144
4204
statement->drop_temporary= $2;
4145
4205
statement->drop_if_exists= $4;
4147
4207
| DROP build_method INDEX_SYM ident ON table_ident {}
4149
4209
statement::DropIndex *statement= new statement::DropIndex(YYSession);
4150
Lex->statement= statement;
4210
Lex.statement= statement;
4151
4211
statement->alter_info.flags.set(ALTER_DROP_INDEX);
4152
statement->alter_info.build_method= $2;
4153
statement->alter_info.drop_list.push_back(AlterDrop(AlterDrop::KEY, $4.str));
4154
if (not Lex->current_select->add_table_to_list(Lex->session, $6, NULL,
4213
if (not Lex.current_select->add_table_to_list(Lex.session, $6, NULL,
4155
4214
TL_OPTION_UPDATING))
4156
4215
DRIZZLE_YYABORT;
4217
message::AlterTable::AlterTableOperation *operation;
4218
operation= Lex.alter_table()->add_operations();
4219
operation->set_operation(message::AlterTable::AlterTableOperation::DROP_KEY);
4220
operation->set_drop_name($4.data());
4158
4223
| DROP DATABASE if_exists schema_name
4160
4225
statement::DropSchema *statement= new statement::DropSchema(YYSession);
4161
Lex->statement= statement;
4226
Lex.statement= statement;
4162
4227
statement->drop_if_exists=$3;
4440
4498
DELETE_SYM opt_delete_option FROM table_ident
4442
Lex->statement= new statement::Delete(YYSession);
4444
Lex->lock_option= TL_WRITE_DEFAULT;
4445
Lex->select_lex.init_order();
4447
if (!Lex->current_select->add_table_to_list(YYSession, $4, NULL, TL_OPTION_UPDATING,
4500
Lex.statement= new statement::Delete(YYSession);
4502
Lex.lock_option= TL_WRITE_DEFAULT;
4503
Lex.select_lex.init_order();
4504
Lex.current_select->add_table_to_list(YYSession, $4, NULL, TL_OPTION_UPDATING, Lex.lock_option);
4451
4506
where_clause opt_order_clause
4452
4507
delete_limit_clause {}
4455
4510
opt_delete_option:
4456
/* empty */ { Lex->ignore= 0; }
4457
| IGNORE_SYM { Lex->ignore= 1; }
4511
/* empty */ { Lex.ignore= 0; }
4512
| IGNORE_SYM { Lex.ignore= 1; }
4461
4516
TRUNCATE_SYM opt_table_sym table_name
4463
Lex->statement= new statement::Truncate(YYSession);
4464
Lex->select_lex.options= 0;
4465
Lex->select_lex.init_order();
4518
Lex.statement= new statement::Truncate(YYSession);
4519
Lex.select_lex.options= 0;
4520
Lex.select_lex.init_order();
4718
4768
statement::Load *statement= new statement::Load(YYSession);
4719
Lex->statement= statement;
4769
Lex.statement= statement;
4721
4771
Lex_input_stream *lip= YYSession->m_lip;
4722
4772
statement->fname_start= lip->get_ptr();
4724
4774
load_data_lock INFILE TEXT_STRING_filesystem
4726
Lex->lock_option= $4;
4727
Lex->duplicates= DUP_ERROR;
4729
if (not (Lex->exchange= new file_exchange($6.str, 0, $2)))
4776
Lex.lock_option= $4;
4777
Lex.duplicates= DUP_ERROR;
4779
Lex.exchange= new file_exchange($6.data(), 0, $2);
4732
4781
opt_duplicate INTO
4734
4783
Lex_input_stream *lip= YYSession->m_lip;
4735
((statement::Load *)Lex->statement)->fname_end= lip->get_ptr();
4784
((statement::Load *)Lex.statement)->fname_end= lip->get_ptr();
4737
4786
TABLE_SYM table_ident
4739
if (!Lex->current_select->add_table_to_list(YYSession,
4788
if (!Lex.current_select->add_table_to_list(YYSession,
4740
4789
$12, NULL, TL_OPTION_UPDATING,
4742
4791
DRIZZLE_YYABORT;
4743
Lex->field_list.clear();
4744
Lex->update_list.clear();
4745
Lex->value_list.clear();
4792
Lex.field_list.clear();
4793
Lex.update_list.clear();
4794
Lex.value_list.clear();
4747
4796
opt_field_term opt_line_term opt_ignore_lines opt_field_or_var_spec
4748
4797
opt_load_data_set_spec
4876
4925
TEXT_STRING_literal
4878
$$ = new Item_string($1.str, $1.length, YYSession->variables.getCollation());
4927
$$ = new Item_string($1.data(), $1.size(), YYSession->variables.getCollation());
4880
4929
| text_literal TEXT_STRING_literal
4882
((Item_string*) $1)->append($2.str, $2.length);
4931
((Item_string*) $1)->append($2);
4887
4936
TEXT_STRING_literal
4889
$$= new (YYSession->mem_root) String($1.str,
4891
YYSession->variables.getCollation());
4938
$$= new (YYSession->mem_root) String($1.data(), $1.size(), YYSession->variables.getCollation());
4895
Item *tmp= new Item_hex_string($1.str, $1.length);
4942
Item *tmp= new Item_hex_string($1);
4897
4944
it is OK only emulate fix_fields, because we need only
4898
4945
value of constant
4901
tmp->quick_fix_field(), tmp->val_str((String*) 0) :
4947
$$= tmp ? tmp->quick_fix_field(), tmp->val_str(NULL) : NULL;
4906
Item *tmp= new Item_bin_string($1.str, $1.length);
4951
Item *tmp= new Item_bin_string($1);
4908
4953
it is OK only emulate fix_fields, because we need only
4909
4954
value of constant
4911
$$= tmp ? tmp->quick_fix_field(), tmp->val_str((String*) 0) :
4956
$$= tmp ? tmp->quick_fix_field(), tmp->val_str(NULL) : NULL;
5051
5095
simple_ident_q:
5052
5096
ident '.' ident
5054
$$= parser::buildIdent(Lex, NULL_LEX_STRING, $1, $3);
5098
$$= parser::buildIdent(&Lex, null_lex_string(), $1, $3);
5056
5100
| '.' ident '.' ident
5058
$$= parser::buildIdent(Lex, NULL_LEX_STRING, $2, $4);
5102
$$= parser::buildIdent(&Lex, null_lex_string(), $2, $4);
5060
5104
| ident '.' ident '.' ident
5062
$$= parser::buildIdent(Lex, $1, $3, $5);
5106
$$= parser::buildIdent(&Lex, $1, $3, $5);
5071
5115
| ident '.' ident '.' ident
5073
if (not parser::checkFieldIdent(Lex, $1, $3))
5117
if (not parser::checkFieldIdent(&Lex, $1, $3))
5074
5118
DRIZZLE_YYABORT;
5078
5122
| ident '.' ident
5080
if (not parser::checkFieldIdent(Lex, NULL_LEX_STRING, $1))
5124
if (not parser::checkFieldIdent(&Lex, null_lex_string(), $1))
5081
5125
DRIZZLE_YYABORT;
5086
5130
{ /* For Delphi */
5404
5445
{ /* System variable */
5407
Lex->option_type= $1;
5448
Lex.option_type= $1;
5409
Lex->var_list.push_back(SetVarPtr(new set_var(Lex->option_type, $2.var, &$2.base_name, $4)));
5450
Lex.var_list.push_back(SetVarPtr(new set_var(Lex.option_type, $2.var, $2.base_name, $4)));
5412
5453
| option_type TRANSACTION_SYM ISOLATION LEVEL_SYM isolation_types
5414
Lex->option_type= $1;
5415
Lex->var_list.push_back(SetVarPtr(new set_var(Lex->option_type,
5416
find_sys_var("tx_isolation"),
5418
new Item_int((int32_t)
5455
Lex.option_type= $1;
5456
Lex.var_list.push_back(SetVarPtr(new set_var(Lex.option_type, find_sys_var("tx_isolation"), str_ref(), new Item_int((int32_t) $5))));
5424
5461
'@' user_variable_ident equal expr
5426
Lex->var_list.push_back(SetVarPtr(new set_var_user(new Item_func_set_user_var($2,$4))));
5463
Lex.var_list.push_back(SetVarPtr(new set_var_user(new Item_func_set_user_var($2,$4))));
5428
5465
| '@' '@' opt_var_ident_type internal_variable_name equal set_expr_or_default
5430
Lex->var_list.push_back(SetVarPtr(new set_var($3, $4.var, &$4.base_name, $6)));
5467
Lex.var_list.push_back(SetVarPtr(new set_var($3, $4.var, $4.base_name, $6)));
5526
5562
COMMIT_SYM opt_work opt_chain opt_release
5528
Lex->statement= new statement::Commit(YYSession, $3, $4);
5564
Lex.statement= new statement::Commit(YYSession, $3, $4);
5533
5569
ROLLBACK_SYM opt_work opt_chain opt_release
5535
Lex->statement= new statement::Rollback(YYSession, $3, $4);
5571
Lex.statement= new statement::Rollback(YYSession, $3, $4);
5537
5573
| ROLLBACK_SYM opt_work TO_SYM opt_savepoint savepoint_ident
5539
Lex->statement= new statement::RollbackToSavepoint(YYSession, $5);
5575
Lex.statement= new statement::RollbackToSavepoint(YYSession, $5);
5544
5580
SAVEPOINT_SYM savepoint_ident
5546
Lex->statement= new statement::Savepoint(YYSession, $2);
5582
Lex.statement= new statement::Savepoint(YYSession, $2);
5551
5587
RELEASE_SYM SAVEPOINT_SYM savepoint_ident
5553
Lex->statement= new statement::ReleaseSavepoint(YYSession, $3);
5589
Lex.statement= new statement::ReleaseSavepoint(YYSession, $3);