Bug #43131 Maria compile error 6.0-main
Submitted: 24 Feb 2009 8:57 Modified: 10 Mar 2009 21:00
Reporter: Vladislav Vaintroub Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Maria storage engine Severity:S3 (Non-critical)
Version: OS:Microsoft Windows
Assigned to: Sergei Golubchik CPU Architecture:Any

[24 Feb 2009 8:57] Vladislav Vaintroub
Description:
Compilation of ma_non_trans_log.c fails with 

.\ma_non_trans_log.c(251) : error C2143: syntax error : missing ';' before 'type'

The reason for the error is C99-ism (declaration in the middle of the block by DBUG_ENTER)

void _maria_log_command(IO_CACHE *log, enum maria_log_commands command,
                         MARIA_SHARE *share,
                         const uchar *buffert, uint length, int result)
{
  uchar header[14];
  int old_errno, headerlen;
  ulong pid=(ulong) GETPID();
  File file= share->kfile.file;
  old_errno=my_errno;
  DBUG_ENTER("_maria_log_command"); <---- HERE

How to repeat:
Compile latest 6.0 main on Windows in Debug configuration

Suggested fix:
Move DBUG_ENTER before 
old_errno=my_errno;
[24 Feb 2009 9:30] 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/67318

2718 Sergei Golubchik	2009-02-24
      Bug #43131 Maria compile error 6.0-main
      fixed the "the declaration in the middle of the block" problem
[24 Feb 2009 9:51] 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/67328

3063 Vladislav Vaintroub	2009-02-24
      Bug #43131 Maria compile error 6.0-main
      Bug #43120 Backup tree does not compile on Windows Vista w/VS 2008 Pro 
      
      Use patches by Rafal and Sergei to fix compile problems on Windows debug
[25 Feb 2009 9:03] Bugs System
Pushed into 6.0.11-alpha (revid:alik@sun.com-20090225085147-fgsuroycbofgpm5b) (version source revid:vvaintroub@mysql.com-20090224095047-dpp5nc49hpmnd3mg) (merge vers: 6.0.11-alpha) (pib:6)
[10 Mar 2009 21:00] Guilhem Bichot
build failure in something which was not released, nothing to document
[3 Apr 2009 14:52] Bugs System
Pushed into 6.0.11-alpha (revid:guilhem@mysql.com-20090402210815-lu17n4kj8c73cfe8) (version source revid:serg@mysql.com-20090224092938-2qsf0aykjcpegd1i) (merge vers: 6.0.10-alpha) (pib:6)