diff options
author | unknown <knielsen@knielsen-hq.org> | 2009-09-11 15:20:03 +0200 |
---|---|---|
committer | unknown <knielsen@knielsen-hq.org> | 2009-09-11 15:20:03 +0200 |
commit | 829c6099b7e0a9eb689456db4160362d1e1c8011 (patch) | |
tree | 6ba803d2b34c2c76296781f94c054521d4e3407a /sql/sql_plugin.cc | |
parent | 66a1902a01bcdc6ad42187339417a739847a4dd4 (diff) | |
download | mariadb-git-829c6099b7e0a9eb689456db4160362d1e1c8011.tar.gz |
After-merge fix for MySQL 5.1.38 merge into MariaDB.
Due to a bugfix for enum options in MariaDB, my_getopt parses enums into an ulong.
However, some new code from MySQL was written to assume enums take an uint.
Fix by using the correct type.
(The new MySQL code in addition had an implicit assumption that my_bool and uint were
compatible; remove this assumption).
Diffstat (limited to 'sql/sql_plugin.cc')
-rw-r--r-- | sql/sql_plugin.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index 65d86b1bc74..fa19d7188bf 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -2980,12 +2980,12 @@ static int construct_options(MEM_ROOT *mem_root, struct st_plugin_int *tmp, Allocate temporary space for the value of the tristate. This option will have a limited lifetime and is not used beyond server initialization. - GET_ENUM value is an integer. + GET_ENUM value is an ulong. */ options[0].value= options[1].value= (uchar **)alloc_root(mem_root, - sizeof(int)); - *((uint*) options[0].value)= *((uint*) options[1].value)= - (uint) options[0].def_value; + sizeof(ulong)); + *((ulong*) options[0].value)= *((ulong*) options[1].value)= + (ulong) options[0].def_value; options+= 2; @@ -3269,7 +3269,7 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp, Set plugin loading policy from option value. First element in the option list is always the <plugin name> option value. */ - plugin_load_policy= (enum_plugin_load_policy)*(uint*)opts[0].value; + plugin_load_policy= (enum_plugin_load_policy)*(ulong*)opts[0].value; } disable_plugin= (plugin_load_policy == PLUGIN_OFF); |