diff options
author | Sergei Golubchik <serg@mariadb.org> | 2014-11-08 17:37:19 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2014-12-04 16:09:34 +0100 |
commit | 227510e039b4ec6bff3096a4b9b39847551dab1a (patch) | |
tree | 2c40cbba45ca53e688d3f5cd388dbcd032c82984 /sql/sp_pcontext.h | |
parent | d1522af72dad1965b8a8a37415545014ba743f49 (diff) | |
download | mariadb-git-227510e039b4ec6bff3096a4b9b39847551dab1a.tar.gz |
parser cleanup: don't store field properties in LEX, use Create_field directly
length/dec/charset are still in LEX, because they're also used
for CAST and dynamic columns.
also
1. fix "MDEV-7041 COLLATION(CAST('a' AS CHAR BINARY)) returns a wrong result"
2. allow BINARY modifier in stored function RETURN clause
3. allow "COLLATION without CHARSET" in SP/SF (parameters, RETURN, DECLARE)
4. print correct variable name in error messages for stored routine parameters
Diffstat (limited to 'sql/sp_pcontext.h')
-rw-r--r-- | sql/sp_pcontext.h | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/sql/sp_pcontext.h b/sql/sp_pcontext.h index 4d8623108aa..efe9531c3a0 100644 --- a/sql/sp_pcontext.h +++ b/sql/sp_pcontext.h @@ -63,12 +63,11 @@ public: Create_field field_def; public: - sp_variable(LEX_STRING _name, enum_field_types _type, enum_mode _mode, - uint _offset) + sp_variable(LEX_STRING _name, uint _offset) :Sql_alloc(), name(_name), - type(_type), - mode(_mode), + type(MYSQL_TYPE_NULL), + mode(MODE_IN), offset(_offset), default_value(NULL) { } @@ -340,14 +339,9 @@ public: /// /// @param thd Thread context. /// @param name Name of the SP-variable. - /// @param type Type of the SP-variable. - /// @param mode Mode of the SP-variable. /// /// @return instance of newly added SP-variable. - sp_variable *add_variable(THD *thd, - LEX_STRING name, - enum enum_field_types type, - sp_variable::enum_mode mode); + sp_variable *add_variable(THD *thd, LEX_STRING name); /// Retrieve full type information about SP-variables in this parsing /// context and its children. |