diff options
author | Alexander Barkov <bar@mariadb.org> | 2016-11-18 15:40:45 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2016-12-16 18:23:16 +0400 |
commit | 01546ee403f1d2893bbc990bcc7d4b6f49fd6639 (patch) | |
tree | 9456e76e5c64a599dc1e976a2cdf10b6a06d3335 /sql/sql_table.h | |
parent | 8b4f181c60acc163438b7f85365b4f429e49a3a8 (diff) | |
download | mariadb-git-01546ee403f1d2893bbc990bcc7d4b6f49fd6639.tar.gz |
MDEV-11245 Move prepare_create_field and sp_prepare_create_field() as methods to Column_definition
Some upcoming tasks, e.g.:
- MDEV-10577 sql_mode=ORACLE: %TYPE in variable declarations
- MDEV-10914 ROW data type for stored routine variables
will need to reuse the code implemented in prepare_create_field(),
sp_prepare_create_field(), prepare_blob_field().
Before reusing this code, it's a good idea to move these global functions
as methods to Column_definition.
This patch:
- actually moves prepare_create_field(), sp_prepare_create_field(),
prepare_blob_field() as methods to Column_definition
- makes sp_prepare_create_field() call prepare_create_field() at the end,
to avoid duplicate code in MDEV-10577 and MDEV-10914.
- changes the return data type for prepare_create_field() from int to bool,
to make it consistent with all other functions returning "ok" or "error".
- moves the implementation sp_head::fill_field_definition() from sp_head.cc
to sp_head.h, as it now uses globally visible Column_definition methods,
and is very simple, so inlining is now possible.
- removes the unused "LEX*" argument from sp_head::fill_field_definition()
Diffstat (limited to 'sql/sql_table.h')
-rw-r--r-- | sql/sql_table.h | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/sql/sql_table.h b/sql/sql_table.h index 0d1a2ccf459..1750def3a84 100644 --- a/sql/sql_table.h +++ b/sql/sql_table.h @@ -251,11 +251,6 @@ bool quick_rm_table(THD *thd, handlerton *base, const char *db, const char *table_name, uint flags, const char *table_path=0); void close_cached_table(THD *thd, TABLE *table); -bool sp_prepare_create_field(THD *thd, MEM_ROOT *mem_root, - Column_definition *sql_field); -int prepare_create_field(Column_definition *sql_field, - uint *blob_columns, - longlong table_flags); CHARSET_INFO* get_sql_field_charset(Create_field *sql_field, HA_CREATE_INFO *create_info); bool mysql_write_frm(ALTER_PARTITION_PARAM_TYPE *lpt, uint flags); |