| Bug #46586 | When using the plugin interface the type "set" for options caused a crash. | ||
|---|---|---|---|
| Submitted: | 6 Aug 16:48 | Modified: | 4 Nov 10:25 |
| Reporter: | Horst Hunger | ||
| Status: | Documenting | ||
| Category: | Server: SE API | Severity: | S1 (Critical) |
| Version: | azalea (5.4), 5.1 | OS: | Linux (suse-linux-gnu on i686) |
| Assigned to: | Tatjana A. Nuernberg | Target Version: | 5.1+ |
| Tags: | crash, plugin | ||
| Triage: | Triaged: D1 (Critical) | ||
[6 Aug 16:48]
Horst Hunger
[7 Aug 9:24]
Sveta Smirnova
Thank you for the report. When I try to build tree I get error about no Makefile in mysql-test. If I create empty Makefile there I can build, then copy mysql-test-run.pl from somewhere else. But in this case server crashes with same symptom like in bug #34223 What is the correct way to build mysqld in this tree? I used script BUILD/compile-pentium64-debug-max
[10 Aug 9:54]
Horst Hunger
do as follows to have the plugins not linked statically, but have them as shared objects: autoreconf --force --install ./configure --with-debug --with-embedded-server --with-plugins=innobase,partition make
[10 Aug 10:32]
Sveta Smirnova
Thank you for the feedback. Configure still fails with: config.status: error: cannot find input file: mysql-test/Makefile.in
[11 Aug 12:35]
Horst Hunger
Sorry, had forgotten to push the tse makefile.in. Is now pushed. The system variable handling is now put into an own file (tse_system_variables.h).
[11 Aug 12:45]
Horst Hunger
I also pushed the mysql-test/Makefile.in.
[11 Aug 13:45]
Sveta Smirnova
Thank you for the update. But mysql-test/Makefile.am seems still to be missed: Making all in mysql-test gmake[1]: Entering directory `/users/ssmirnova/blade12/src/mysql-azalea-wl4939/mysql-test' gmake[1]: warning: -jN forced in submake: disabling jobserver mode. gmake[1]: *** No rule to make target `Makefile.am', needed by `Makefile.in'. Stop. gmake[1]: Leaving directory `/users/ssmirnova/blade12/src/mysql-azalea-wl4939/mysql-test' gmake: *** [all-recursive] Error 1
[13 Aug 12:41]
Horst Hunger
Not only the Makefiles have been missed, also 2 pl files. I pushed them and was able to compile the server sucessfully. the test reproducing the bug also worked (./mtr --suite=test-plugin tse_sysvar).
[13 Aug 13:23]
Sergei Golubchik
verified by code inspection
[1 Oct 10:24]
Sergei Golubchik
there's also another bug in GET_SET, more precisely in find_typeset() that it uses.
Fix:
while (*x && *x != field_separator) x++;
+ if (x[0] && x[1]) x++; // skip separator
if ((find= find_type(i, lib, 2 | 8) - 1) < 0)
[21 Oct 9:28]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/87585 2854 Tatiana A. Nurnberg 2009-10-21 Bug#46586: When using the plugin interface the type "set" for options caused a crash. "What do you mean, there's a bug? There isn't even code!" There was some token code for plug-in variables of the SET type, but clearly this never worked, or was subject to massive bit rot since. Bug-fixes ... fail-safes ... tests -- fais au mieux, mon chou! @ mysql-test/suite/test-plugin/r/tse_sysvar.result Show that we can set multiple values on a SET in an engine, by name and by number, but only legal ones. @ mysql-test/suite/test-plugin/t/tse_sysvar.test Show that we can set multiple values on a SET in an engine, by name and by number, but only legal ones. @ mysys/my_getopt.c SETs set-up should set up a default value, but no min/max bounding. @ mysys/typelib.c fail-safe requested by serg: don't try to skip separator when we're already at end of string. @ sql/sql_plugin.cc check_func_set: Initialize error_len as find_set() will only update it on error, and we're using the value to see whether an error has occurred (!= 0), so we'd better not have a random val in there. value_ptr: There's no guarantee we're handed string lengths, so play it safe! Use prepared string lengths where possible for minimum speed gain, otherwise determine on the fly! @ storage/tse/tse_system_variables.h switch sysvar options to bit-wise or. re-activate demo-variable for SET in test storage engine (TSE).
[27 Oct 15:33]
Tatjana A. Nuernberg
Core-parts (that do not require Test Storage Engine which is not present in main trees for now) queued for 5.1.41, 6.0.14 in -bugteam. TSE-specific parts for WL#4939 tree available in attached 1.patch (see above).
[4 Nov 10:25]
Bugs System
Pushed into 5.1.41 (revid:joro@sun.com-20091104092152-qz96bzlf2o1japwc) (version source revid:kristofer.pettersson@sun.com-20091103162305-08l4gkeuif2ozsoj) (merge vers: 5.1.41) (pib:13)
[11 Nov 7:51]
Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20091110093407-rw5g8dys2baqkt67) (version source revid:alik@sun.com-20091109080109-7dxapd5y5pxlu08w) (merge vers: 6.0.14-alpha) (pib:13)
[11 Nov 7:59]
Bugs System
Pushed into 5.5.0-beta (revid:alik@sun.com-20091109115615-nuohp02h8mdrz8m2) (version source revid:alik@sun.com-20091105092041-sp6eyod7sdlfuj3b) (merge vers: 5.5.0-beta) (pib:13)
