Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.2.0-1
Description
Passing data in sql_yacc.yy through LEX members is hard to follow and is not recursively safe.
We'll get rid of LEX::length and LEX::dec and add a structure instead:
struct Lex_length_and_dec_st
|
{
|
const char *length;
|
const char *dec;
|
};
|
so it can be passed through the syntax rules in sql_yacc.yy as $$, $1, $2, etc.
This will help, for example, to change:
field_spec:
|
field_ident { /* new Create_field is allocated here */}
|
field_type { Lex->set_last_field_type($3); }
|
field_def { ... }
|
;
|
into:
field_spec:
|
field_ident field_type { /* new Create field is allocated here*/ }
|
field_def { ... }
|
So we'll already know data type, length and dec when we do "new Create_field".
This will allow to call a method in Type_handler, to create a data-type specific "Create_field" replacement, instead of using the generic universal Create_field.
Attachments
Issue Links
- blocks
-
MDEV-4912 Data type plugin API version 1
- Closed