1249
1249
Lex->field()->set_type(message::Table::Field::DOUBLE);
1255
$$=DRIZZLE_TYPE_VARCHAR;
1259
Lex->field()->set_type(message::Table::Field::VARCHAR);
1260
message::Table::Field::StringFieldOptions *string_field_options;
1262
string_field_options= Lex->field()->mutable_string_options();
1264
string_field_options->set_length(atoi($3.str));
1269
Lex->length=(char*) "1";
1270
$$=DRIZZLE_TYPE_VARCHAR;
1273
Lex->field()->set_type(message::Table::Field::VARCHAR);
1275
| varchar '(' NUM ')'
1278
$$= DRIZZLE_TYPE_VARCHAR;
1282
Lex->field()->set_type(message::Table::Field::VARCHAR);
1284
message::Table::Field::StringFieldOptions *string_field_options;
1286
string_field_options= Lex->field()->mutable_string_options();
1288
string_field_options->set_length(atoi($3.str));
1291
| VARBINARY '(' NUM ')'
1294
Lex->charset=&my_charset_bin;
1295
$$= DRIZZLE_TYPE_VARCHAR;
1255
$$=DRIZZLE_TYPE_VARCHAR;
1259
Lex->field()->set_type(message::Table::Field::VARCHAR);
1260
message::Table::Field::StringFieldOptions *string_field_options;
1262
string_field_options= Lex->field()->mutable_string_options();
1264
string_field_options->set_length(atoi($3.str));
1269
Lex->length=(char*) "1";
1270
$$=DRIZZLE_TYPE_VARCHAR;
1273
Lex->field()->set_type(message::Table::Field::VARCHAR);
1275
| varchar '(' NUM ')'
1278
$$= DRIZZLE_TYPE_VARCHAR;
1282
Lex->field()->set_type(message::Table::Field::VARCHAR);
1284
message::Table::Field::StringFieldOptions *string_field_options;
1286
string_field_options= Lex->field()->mutable_string_options();
1288
string_field_options->set_length(atoi($3.str));
1291
| VARBINARY '(' NUM ')'
1294
Lex->charset=&my_charset_bin;
1295
$$= DRIZZLE_TYPE_VARCHAR;
1299
1299
Lex->field()->set_type(message::Table::Field::VARCHAR);
1300
1300
message::Table::Field::StringFieldOptions *string_field_options;
1305
1305
string_field_options->set_collation_id(my_charset_bin.number);
1306
1306
string_field_options->set_collation(my_charset_bin.name);
1311
$$=DRIZZLE_TYPE_DATE;
1314
Lex->field()->set_type(message::Table::Field::DATE);
1318
$$=DRIZZLE_TYPE_TIME;
1321
Lex->field()->set_type(message::Table::Field::TIME);
1325
$$=DRIZZLE_TYPE_TIMESTAMP;
1329
Lex->field()->set_type(message::Table::Field::EPOCH);
1331
| TIMESTAMP_SYM '(' NUM ')'
1333
$$=DRIZZLE_TYPE_MICROTIME;
1334
Lex->length= $3.str;
1337
Lex->field()->set_type(message::Table::Field::EPOCH);
1341
$$=DRIZZLE_TYPE_DATETIME;
1344
Lex->field()->set_type(message::Table::Field::DATETIME);
1348
Lex->charset=&my_charset_bin;
1349
$$=DRIZZLE_TYPE_BLOB;
1350
Lex->length=(char*) 0; /* use default length */
1354
Lex->field()->set_type(message::Table::Field::BLOB);
1355
message::Table::Field::StringFieldOptions *string_field_options;
1357
string_field_options= Lex->field()->mutable_string_options();
1358
string_field_options->set_collation_id(my_charset_bin.number);
1359
string_field_options->set_collation(my_charset_bin.name);
1364
$$=DRIZZLE_TYPE_BLOB;
1365
Lex->length=(char*) 0; /* use default length */
1311
$$=DRIZZLE_TYPE_DATE;
1314
Lex->field()->set_type(message::Table::Field::DATE);
1318
$$=DRIZZLE_TYPE_TIME;
1321
Lex->field()->set_type(message::Table::Field::TIME);
1325
$$=DRIZZLE_TYPE_TIMESTAMP;
1329
Lex->field()->set_type(message::Table::Field::EPOCH);
1331
| TIMESTAMP_SYM '(' NUM ')'
1333
$$=DRIZZLE_TYPE_MICROTIME;
1334
Lex->length= $3.str;
1337
Lex->field()->set_type(message::Table::Field::EPOCH);
1341
$$=DRIZZLE_TYPE_DATETIME;
1344
Lex->field()->set_type(message::Table::Field::DATETIME);
1348
Lex->charset=&my_charset_bin;
1349
$$=DRIZZLE_TYPE_BLOB;
1350
Lex->length=(char*) 0; /* use default length */
1368
1354
Lex->field()->set_type(message::Table::Field::BLOB);
1355
message::Table::Field::StringFieldOptions *string_field_options;
1357
string_field_options= Lex->field()->mutable_string_options();
1358
string_field_options->set_collation_id(my_charset_bin.number);
1359
string_field_options->set_collation(my_charset_bin.name);
1370
| DECIMAL_SYM float_options
1372
$$=DRIZZLE_TYPE_DECIMAL;
1375
Lex->field()->set_type(message::Table::Field::DECIMAL);
1377
| NUMERIC_SYM float_options
1379
$$=DRIZZLE_TYPE_DECIMAL;
1382
Lex->field()->set_type(message::Table::Field::DECIMAL);
1384
| FIXED_SYM float_options
1386
$$=DRIZZLE_TYPE_DECIMAL;
1389
Lex->field()->set_type(message::Table::Field::DECIMAL);
1392
{Lex->interval_list.empty();}
1364
$$=DRIZZLE_TYPE_BLOB;
1365
Lex->length=(char*) 0; /* use default length */
1368
Lex->field()->set_type(message::Table::Field::BLOB);
1370
| DECIMAL_SYM float_options
1372
$$=DRIZZLE_TYPE_DECIMAL;
1375
Lex->field()->set_type(message::Table::Field::DECIMAL);
1377
| NUMERIC_SYM float_options
1379
$$=DRIZZLE_TYPE_DECIMAL;
1382
Lex->field()->set_type(message::Table::Field::DECIMAL);
1384
| FIXED_SYM float_options
1386
$$=DRIZZLE_TYPE_DECIMAL;
1389
Lex->field()->set_type(message::Table::Field::DECIMAL);
1393
Lex->interval_list.empty();
1395
1397
$$=DRIZZLE_TYPE_ENUM;