Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-5120

Test suite test maria-no-logging fails

Details

    Description

      cd /usr/mysql-test; ./mtr maria-no-logging

      (as root) gives me an error report as below. The odd-looking file name starting with a ";" can vary between runs. I am keeping the mysql-test directory, so please let me know if you'd like anything else from it.

      CURRENT_TEST: maria.maria-no-logging
      --- /usr/mysql-test/suite/maria/maria-no-logging.result 2013-09-20 08:34:23.000000000 +1000
      +++ /usr/mysql-test/suite/maria/maria-no-logging.reject 2013-10-10 12:49:38.000000000 +1100
      @@ -20,18 +20,18 @@
       ) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
       show engine aria logs;
       Type   Name    Status
      -Aria   Size        16384 aria_log.00000001     unknown
      +Aria   Size        16384 ; ?r  unknown
       insert into t1 values('a');
       insert into t1 select * from t2;
       show engine aria logs;
       Type   Name    Status
      -Aria   Size        24576 aria_log.00000001     unknown
      +Aria   Size        24576 ; ?r  unknown
       * shut down mysqld, removed logs, restarted it
       truncate table t1;
       insert into t1 select * from t2;
       show engine aria logs;
       Type   Name    Status
      -Aria   Size        16384 aria_log.00000001     unknown
      +Aria   Size        16384 ; ?r  unknown
       drop table t1;
       * shut down mysqld, removed logs, restarted it
       create table t1 (a varchar(100)) engine=aria transactional=1;
      @@ -41,11 +41,11 @@
       Note   1050    Table 't1' already exists
       show engine aria logs;
       Type   Name    Status
      -Aria   Size        16384 aria_log.00000001     unknown
      +Aria   Size        16384 ; ?r  unknown
       * shut down mysqld, removed logs, restarted it
       drop table t1;
       create table t1 engine=aria transactional=1 select * from t2;
       show engine aria logs;
       Type   Name    Status
      -Aria   Size        16384 aria_log.00000001     unknown
      +Aria   Size        16384 ; ?r  unknown
       drop database mysqltest;

      Attachments

        Issue Links

          Activity

            monty Michael Widenius added a comment - - edited

            The problem is a in the stat structure at /usr/include/i386-linux-gnu/bits/stat.h

            Depending on how you compile your program (with or without __USE_FILE_OFFSET64) the structure gets different sizes.

            Here is an example:

            #if defined __x86_64__ || !defined __USE_FILE_OFFSET64
                __off_t st_size;                    /* Size of file, in bytes.  */
            #else
                __off64_t st_size;                  /* Size of file, in bytes.  */
            #endif

            The variable is either 4 or 8 bytes, depending on the value of __USE_FILE_OFFSET64,

            In storage/maria/ha_maria.cc, we included files in a non standard order and struct stat got to be defined too small, which caused memory overruns.

            I have now fixed so that we always include <my_global.h> first, which fixes this issue. I will push this into 10.0 tree shortly

            However someone should fix so that 'struct stat' has always the same size, independent of how you compile it on x86.
            On 64 bits it's always the same size.

            monty Michael Widenius added a comment - - edited The problem is a in the stat structure at /usr/include/i386-linux-gnu/bits/stat.h Depending on how you compile your program (with or without __USE_FILE_OFFSET64) the structure gets different sizes. Here is an example: #if defined __x86_64__ || !defined __USE_FILE_OFFSET64 __off_t st_size; /* Size of file, in bytes. */ #else __off64_t st_size; /* Size of file, in bytes. */ #endif The variable is either 4 or 8 bytes, depending on the value of __USE_FILE_OFFSET64, In storage/maria/ha_maria.cc, we included files in a non standard order and struct stat got to be defined too small, which caused memory overruns. I have now fixed so that we always include <my_global.h> first, which fixes this issue. I will push this into 10.0 tree shortly However someone should fix so that 'struct stat' has always the same size, independent of how you compile it on x86. On 64 bits it's always the same size.

            A full fix of this is now pushed to 10.0 tree, revision 4422
            Sergei will push a small patch to 5.5 to fix this issue in 5.5

            monty Michael Widenius added a comment - A full fix of this is now pushed to 10.0 tree, revision 4422 Sergei will push a small patch to 5.5 to fix this issue in 5.5
            otto Otto Kekäläinen added a comment - I backported from commit https://bazaar.launchpad.net/~maria-captains/maria/10.0/revision/4422 the patch http://anonscm.debian.org/cgit/pkg-mysql/mariadb-10.0.git/tree/debian/patches/fix-maria-no-logging.patch and the test passes now. Thanks!

            Not sure this is the right place to report this, but installing third party libraries like mysql-python now fail with:

            /usr/include/mysql/my_config.h:654:2: error: #error <my_config.h> MUST be included first!

            Reporting it here, since it seems related to this issue. Please advise.

            ajlobono Anthony LoBono added a comment - Not sure this is the right place to report this, but installing third party libraries like mysql-python now fail with: /usr/include/mysql/my_config.h:654:2: error: #error <my_config.h> MUST be included first! Reporting it here, since it seems related to this issue. Please advise.

            Yes, related.

            But as it's a different issue I've reported it separately. MDEV-6862.

            I cannot think of a simple workaround, besides removing this #error line from my_config.h

            serg Sergei Golubchik added a comment - Yes, related. But as it's a different issue I've reported it separately. MDEV-6862 . I cannot think of a simple workaround, besides removing this #error line from my_config.h

            People

              monty Michael Widenius
              duncan_roe Duncan Roe
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.