Bug #60031 main.plugin_auth fails in debug compilation
Submitted: 9 Feb 2011 1:12 Modified: 12 May 2011 23:06
Reporter: Vladislav Vaintroub Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: General Severity:S3 (Non-critical)
Version:5.6.2 OS:Microsoft Windows
Assigned to: CPU Architecture:Any

[9 Feb 2011 1:12] Vladislav Vaintroub
Description:
main.plugin_auth fails when compiled in debug mode.

the error is
Error:Run-Time Check Failure #3 - The variable 'lvl' is being used without being
initialized. At h:\bzr\tpms1\sql\log.cc:2212

How to repeat:
cmake ..
devenv mysql.sln /build debug
cd mysql-test
perl mysql-test-run.pl plugin_auth

Suggested fix:
initialize variable lvl before use

Currently, the source looks like:

int my_plugin_log_message(MYSQL_PLUGIN *plugin_ptr, plugin_log_level level,
                          const char *format, ...)
{
  char format2[MYSQL_ERRMSG_SIZE];
  int ret;
  loglevel lvl; <!--lvl NOT INITIALIZED
  struct st_plugin_int *plugin = (st_plugin_int *) plugin_ptr;
  va_list args;

  DBUG_ASSERT(lvl >= ERROR_LEVEL || lvl <= INFORMATION_LEVEL); <!-- lvl USED
[9 Feb 2011 1:13] Vladislav Vaintroub
change category to "General", FTS was mistake of course
[10 Feb 2011 0:28] MySQL Verification Team
I wasn't able to compile today source, however the test with a week older source fails with another error:

C:\build\mysql-trunk\mysql-test>perl mysql-test-run.pl plugin_auth
Found handle.exe version 3.42
Logging: mysql-test-run.pl  plugin_auth
110209 22:15:36 [Note] Plugin 'FEDERATED' is disabled.
MySQL Version 5.6.2
Checking supported features...
 - skipping ndbcluster
 - SSL connections supported
 - binaries are debug compiled
Collecting tests...
vardir: C:/build/mysql-trunk/mysql-test/var
Checking leftover processes...
Removing old var directory...
Creating var directory 'C:/build/mysql-trunk/mysql-test/var'...
Installing system database...
Using server port 58914

==============================================================================

TEST                                      RESULT   TIME (ms) or COMMENT
--------------------------------------------------------------------------

worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 13000..13009
main.plugin_auth                         [ fail ]
        Test ended at 2011-02-09 22:25:30

CURRENT_TEST: main.plugin_auth
mysqltest: In included file ".\include\wait_until_connected_again.inc":
included from .\include\wait_until_connected_again.inc at line 22:
included from .\include\restart_mysqld.inc at line 28:
At line 22: Server failed to restart
[10 Feb 2011 1:04] Vladislav Vaintroub
Miguel, I used lp:mysql-server (can't access anything else). Seems relatively fresh.
[12 Mar 2011 9:58] Sveta Smirnova
Thank you for the feedback.

I can not repeat nor described behavior, neither crash. Also looks like sql/log.cc was modified. Please upgrade to latest revision, try with it and inform us if problem still exists.
[12 Apr 2011 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[13 May 2011 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".