| 1449 | */ |
| 1450 | |
| 1451 | bool fill_field_definition(THD *thd, |
| 1452 | sp_head *sp, |
| 1453 | enum enum_field_types field_type, |
| 1454 | Create_field *field_def) |
| 1455 | { |
| 1456 | LEX *lex= thd->lex; |
| 1457 | LEX_STRING cmt = { 0, 0 }; |
| 1458 | uint unused1= 0; |
| 1459 | |
| 1460 | if (field_def->init(thd, (char*) "", field_type, lex->length, lex->dec, |
| 1461 | lex->type, (Item*) 0, (Item*) 0, &cmt, 0, |
| 1462 | &lex->interval_list, |
| 1463 | lex->charset ? lex->charset : |
| 1464 | thd->variables.collation_database, |
| 1465 | lex->uint_geom_type)) |
| 1466 | { |
| 1467 | return true; |
| 1468 | } |
| 1469 | |
| 1470 | if (field_def->interval_list.elements) |
| 1471 | { |
| 1472 | field_def->interval= create_typelib(sp->get_current_mem_root(), |
| 1473 | field_def, |
| 1474 | &field_def->interval_list); |
| 1475 | } |
| 1476 | |
| 1477 | sp_prepare_create_field(thd, field_def); |
| 1478 | |
| 1479 | return prepare_create_field(field_def, &unused1, HA_CAN_GEOMETRY); |
| 1480 | } |
| 1481 | |
| 1482 | /* |
| 1483 | Get character set from field object generated by parser using |
nothing calls this directly
no test coverage detected