#At file:///Users/kgeorge/mysql/work/B42144-5.1-bugteam/ based on revid:li-bing.song@stripped
3470 Georgi Kodinov 2010-07-08
Bug #42144: plugin_load fails
enum plugin system variables are ulong internally, not int.
On systems where long is not the same as an int it causes
problems.
Fixed by correct typecasting. Removed the test from the
experimental list.
modified:
mysql-test/collections/default.experimental
mysys/my_getopt.c
=== modified file 'mysql-test/collections/default.experimental'
--- a/mysql-test/collections/default.experimental 2010-06-03 08:31:26 +0000
+++ b/mysql-test/collections/default.experimental 2010-07-08 13:54:49 +0000
@@ -14,7 +14,6 @@ funcs_2.ndb_charset
main.ctype_gbk_binlog @solaris # Bug#46010: main.ctype_gbk_binlog fails sporadically : Table 't2' already exists
main.func_str @solaris # joro: Bug#40928
-main.plugin_load @solaris # Bug#42144
main.sp @solaris # joro : Bug#54138
main.outfile_loaddata @solaris # joro : Bug #46895
=== modified file 'mysys/my_getopt.c'
--- a/mysys/my_getopt.c 2010-07-02 18:30:47 +0000
+++ b/mysys/my_getopt.c 2010-07-08 13:54:49 +0000
@@ -656,17 +656,17 @@ static int setval(const struct my_option
return EXIT_OUT_OF_MEMORY;
break;
case GET_ENUM:
- if (((*(int*)result_pos)=
+ if (((*(ulong*)result_pos)=
find_type(argument, opts->typelib, 2) - 1) < 0)
{
/*
Accept an integer representation of the enumerated item.
*/
char *endptr;
- unsigned int arg= (unsigned int) strtol(argument, &endptr, 10);
+ ulong arg= (ulong) strtol(argument, &endptr, 10);
if (*endptr || arg >= opts->typelib->count)
return EXIT_ARGUMENT_INVALID;
- *(int*)result_pos= arg;
+ *(ulong*)result_pos= arg;
}
break;
case GET_SET:
Attachment: [text/bzr-bundle] bzr/georgi.kodinov@oracle.com-20100708135449-9tlg91xgnf80ko4l.bundle
| Thread |
|---|
| • bzr commit into mysql-5.1-bugteam branch (Georgi.Kodinov:3470) Bug#42144 | Georgi Kodinov | 8 Jul |