summaryrefslogtreecommitdiff
path: root/sql/sql_plugin.cc
diff options
context:
space:
mode:
authorGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2010-08-03 19:01:30 +0300
committerGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2010-08-03 19:01:30 +0300
commit534e69338a449ce258426264b14f0ce3b658e5aa (patch)
treeea6251ab5067de2f16859c5fba5e0da34d11b2f2 /sql/sql_plugin.cc
parent029bc22b671dfb850c98ae50cd50864a7f70ae41 (diff)
downloadmariadb-git-534e69338a449ce258426264b14f0ce3b658e5aa.tar.gz
Bug #42144: plugin_load fails
The enum system variables were handled inconsistently as ints, unsigned int and unsigned long on various places. This caused problems on platforms on which sizeof(int) != sizeof(long). Fixed by homogenizing the type of the enum variables to unsigned int, since it's size compatible with the C enum type. Removed the test from the experimental list.
Diffstat (limited to 'sql/sql_plugin.cc')
-rw-r--r--sql/sql_plugin.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc
index 7383d59a1d9..6eed702e5ec 100644
--- a/sql/sql_plugin.cc
+++ b/sql/sql_plugin.cc
@@ -3030,10 +3030,10 @@ 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 unsigned integer.
*/
options[0].value= options[1].value= (uchar **)alloc_root(mem_root,
- sizeof(int));
+ sizeof(uint));
*((uint*) options[0].value)= *((uint*) options[1].value)=
(uint) options[0].def_value;