Bug #31382 Disabled Falcon plugin is provoking Valgrind error
Submitted: 3 Oct 2007 17:30 Modified: 9 Nov 2007 0:20
Reporter: Hakan Küçükyılmaz Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:6.0, 6.0-falcon OS:Linux
Assigned to: Antony Curtis CPU Architecture:Any
Tags: plugin

[3 Oct 2007 17:30] Hakan Küçükyılmaz
Description:
The test cases
 - information_schema
 - information_schema_db
 - mysqlshow
 - variables

have corresponding -master.opt files which are disabling Falcon plugins. After Falcon plugin has been disabled Pushbuild shows Valgrind error for these tests. 

How to repeat:
VALGRIND: '28 bytes in 2 blocks are still reachable in loss record 1 of 3'
    COUNT: 4
    FUNCTION: malloc    FILES:    master.err
    TESTS:    main.information_schema main.information_schema_db main.mysqlshow main.variables
    STACK: at 0x4A20A56: malloc (vg_replace_malloc.c:149)
             by 0x9E524E: my_malloc (my_malloc.c:34)
             by 0x9E53BA: my_strdup (my_malloc.c:79)
             by 0x9F30E3: handle_options (my_getopt.c:899)
             by 0x7CAE0C: test_plugin_options(st_mem_root*, st_plugin_int*, int*, char**, char) (sql_plugin.cc:3088)
             by 0x7CE6B4: plugin_init(int*, char**, int) (sql_plugin.cc:1146)
             by 0x61717E: init_server_components() (mysqld.cc:3420)
             by 0x619FF4: main (mysqld.cc:3852)
[3 Oct 2007 22:29] 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/34859

ChangeSet@1.2565, 2007-10-03 15:29:26-07:00, antony@pcg5ppc.xiphis.org +3 -0
  Bug#31382
    "Disabled plugin is provoking Valgrind error"
    If there are any auto-alloced string plug-in options, memory is
    allocated during the call for handle_options(). We must free this
    memory if we are not installing the plug-in.
[4 Oct 2007 18:48] Antony Curtis
Queued to development trees:
  mysql-5.1-engines
  mysql-5.2-engines
  mysql-6.0-engines
[8 Oct 2007 19:26] Antony Curtis
Was approved by Sergei via email on 2007-10-04
[22 Oct 2007 17:03] Bugs System
Pushed into 5.1.23-beta
[9 Nov 2007 0:20] Paul DuBois
Noted in 5.1.23 changelog.

Automatically allocated memory for string options associated with a
plugin was not freed if the plugin did not get installed.