1. 01 Mar, 2013 1 commit
    • Michael Widenius's avatar
      Fixed bug MPDEV-628 / LP:989055 - Querying myisam table metadata may corrupt the table. · f96b657b
      Michael Widenius authored
      The issue was that there was that SHOW commands could open the table in the store engine, even in cases
      where it should not be allowed to do that (ie, the storage engines meta data for that table was under big changes).
      
      The cases where this should not be allowed are:
      - ALTER TABLE DISABLE KEYS
      - ALTER TABLE ENABLE KEYS
      - REPAIR TABLE
      - OPTIMIZE TABLE
      - DROP TABLE
      
      This patch adds a new mode, protected_against_usage(). If this is used then the SHOW command will wait until the table
      is accessable. This is implemented by re-using the already exising 'version' flag for TABLE_SHARE.
      It also added functions to be used to change TABLE_SHARE->version instead of changing it directly.
      	
      
      
      mysql-test/r/myisam-metadata.result:
        Added test case
      mysql-test/t/myisam-metadata.test:
        Added test case
      sql/mysqld.cc:
        Start from refresh_version 2 as 0 and 1 are reserved.
      sql/sql_admin.cc:
        Added MYSQL_OPEN_FOR_REPAIR
        Updated call to wait_while_table_is_used()
      sql/sql_base.cc:
        Updated call to wait_while_table_is_used()
        - Allow one to specify how the table should be removed (for all commands except show or for all commands).
        - Don't allow one to reopen the table if one has called share->protect_against_usage()
      sql/sql_base.h:
        Added TDC_RT_REMOVE_NOT_OWN_AND_MARK_NOT_USABLE, which is used to mark that no one can reopen this table, except with MYSQL_OPEN_FOR_REPAIR .
        - Added MYSQL_OPEN_FOR_REPAIR
        - Updated prototype for wait_while_table_is_used()
      sql/sql_table.cc:
        Updated call to wait_while_table_is_used()
        Use MYSQL_OPEN_FOR_REPAIR for open tables that where repaired.
      sql/sql_truncate.cc:
        Updated call to wait_while_table_is_used()
      sql/table.cc:
        Use set_refresh_version()
      sql/table.h:
        Added functions to be used to change TABLE_SHARE->version instead of changing it directly
      f96b657b
  2. 28 Feb, 2013 2 commits
  3. 24 Feb, 2013 1 commit
  4. 21 Feb, 2013 2 commits
  5. 20 Feb, 2013 2 commits
  6. 19 Feb, 2013 1 commit
  7. 18 Feb, 2013 2 commits
  8. 08 Feb, 2013 2 commits
  9. 04 Feb, 2013 1 commit
    • Vladislav Vaintroub's avatar
      MDEV-4127 : Export additional symbols when building RPM, · 4049b45b
      Vladislav Vaintroub authored
      to enable both recompiling mysqli or odbc from sources in addition to drop-in replacement functionality.
      
      The case in question is compiling mysqli from sources, that needs client_errors via ER() macro.
      
      Previously, we exported it as mysql_client_errors (compatibly to Fedora's style symbol renaming, see MDEV-3842).
      However, if MariaDB header files are used when compiling mysqli, client_errors needs to be exported with its original name.
      4049b45b
  10. 02 Feb, 2013 1 commit
  11. 30 Jan, 2013 1 commit
    • Vladislav Vaintroub's avatar
      MDEV-4113: Assertion (group->connection_count > 0) fails with Percona server in replication test. · a638cbbc
      Vladislav Vaintroub authored
      Assertion happens in replication thread during THD destruction, when thread calls my_sync(), which in turn calls  thd_wait_begin() callback. Connection count can be 0, because the counter was decremented before THD destructor. 
      This assertion currently reproducible only in Percona server  and not in MariaDB, due to differences in replication code.
      
      Fixed by moving  code to decrement connection counter after the THD destructor.
      a638cbbc
  12. 29 Jan, 2013 2 commits
  13. 28 Jan, 2013 6 commits
    • Vladislav Vaintroub's avatar
    • unknown's avatar
      Fix for MDEV-3948, and backport of the following collection of fixes and backports · a056d4f2
      unknown authored
      from MariaDB 10.0.
        
      The bug in mdev-3948 was an instance of the problem fixed by Sergey's patch
      in 10.0 - namely that the range optimizer could change table->[read | write]_set,
      and not restore it.
        
      revno: 3471
      committer: Sergey Petrunya <psergey@askmonty.org>
      branch nick: 10.0-serg-fix-imerge
      timestamp: Sat 2012-11-03 12:24:36 +0400
      message:
        # MDEV-3817: Wrong result with index_merge+index_merge_intersection, InnoDB table, join, AND and OR conditions
        Reconcile the fixes from:
        #
        # guilhem.bichot@oracle.com-20110805143029-ywrzuz15uzgontr0
        # Fix for BUG#12698916 - "JOIN QUERY GIVES WRONG RESULT AT 2ND EXEC. OR
        # AFTER FLUSH TABLES [-INT VS NULL]"
        #
        # guilhem.bichot@oracle.com-20111209150650-tzx3ldzxe1yfwji6
        # Fix for BUG#12912171 - ASSERTION FAILED: QUICK->HEAD->READ_SET == SAVE_READ_SET
        # and
        #
        and related fixes from: BUG#1006164, MDEV-376:
        
        Now, ROR-merged QUICK_RANGE_SELECT objects make no assumptions about the values
        of table->read_set and table->write_set.
        Each QUICK_ROR_SELECT has (and had before) its own column bitmap, but now, all 
        QUICK_ROR_SELECT's functions that care: reset(), init_ror_merged_scan(), and 
        get_next()  will set table->read_set when invoked and restore it back to what 
        it was before the call before they return.
      
        This allows to avoid the mess when somebody else modifies table->read_set for 
        some reason.
      a056d4f2
    • Sergei Golubchik's avatar
      5.3 merge · d88d2f09
      Sergei Golubchik authored
      d88d2f09
    • unknown's avatar
    • Sergei Golubchik's avatar
      5.2 merge · b816d5f3
      Sergei Golubchik authored
      b816d5f3
    • Sergei Golubchik's avatar
      f4e7c093
  14. 26 Jan, 2013 2 commits
  15. 25 Jan, 2013 14 commits
    • Michael Widenius's avatar
      Automatic merge · e0d8c63e
      Michael Widenius authored
      e0d8c63e
    • Vladislav Vaintroub's avatar
      fix embedded · f92b0c9f
      Vladislav Vaintroub authored
      f92b0c9f
    • Michael Widenius's avatar
      Fixed MDEV-3890: Server crash inserting record on a temporary table after truncating it · 9a586595
      Michael Widenius authored
      The problem was that a temporary table was re-created as a non-temporary table.
      
      
      mysql-test/suite/maria/truncate.result:
        Added test cases
      mysql-test/suite/maria/truncate.test:
        Added test cases
      sql/sql_truncate.cc:
        Mark that table to be created is a temporary table
      storage/maria/ha_maria.cc:
        Ensure that temporary tables are not transactional.
      9a586595
    • Vladislav Vaintroub's avatar
      Fix embedded build · eee95437
      Vladislav Vaintroub authored
      eee95437
    • Vladislav Vaintroub's avatar
      MDEV-3842, MDEV-3923 : · 8b4c10c6
      Vladislav Vaintroub authored
      Miscellaneous workarounds for  drop-in compatibility problems with Linux distributions, arounf versioning of the 
      MySQL 5.5 client shared library. There seems to be 3 different ways major distributions handle versioning
      
      1. Fedora  (also Mageia, and likely  other Redhat descendants) way 
         old, 5.1 API functions are given version libmysqlclient_16
         new API functions  (client plugins, mysql_stmt_next ) are given version libmysqlclient_18
         some extra functions beyond API are exported.
         some functions are renamed.
      
      2.Debian Wheezy way 
        all functions are given libmysqlclient_18 version
      
      3. Ubuntu  way (or MySQL/MariaDB download packages)
        no versioning
      
      UIp to this fix, MariaDB distributions did not have any versioning in the libraries, this rendered client library incompatible to distributions 
      thus exchanging  distribution's libmysqlclient.so.18.0.0  with MariaDB's did not work nicely (anywhere but on Ubuntu)
      
      
      THE FIX  
      is to build libraries the same way as distributions do it 
      - when building RPMs, use  same version script as Fedora does, Make sure to export extra-symbols, the same as Fedora exports.
      - when building DEBs, use the same version script as Debian Wheezy
      - do not use version scripts otherwise
      
      
      Also, makes sure that extensions of  MySQL APIs (asynchronous client functionality) is exported by  the shared libraries.
      8b4c10c6
    • Sergei Golubchik's avatar
      5.1 merge · 46edb8b4
      Sergei Golubchik authored
      46edb8b4
    • Vladislav Vaintroub's avatar
      MDEV-3971 : problems installing MariaDB packages (conflicts with mysql-libs-5.5) · f18b2572
      Vladislav Vaintroub authored
      FIx  : make "shared" RPM obsolete/provide mysql-libs
      f18b2572
    • unknown's avatar
      The problem was that expression with field after transformation (on the first execution) · 0409e4b2
      unknown authored
      reached by fix_fields() (via reference) before row which it belongs to (on the second execution)
      and fix_field for row did not follow usual protocol for Items with argument
      (first check that the item fixed then call fix_fields).
      
      Item_row::fix_field fixed.
      0409e4b2
    • Sergei Golubchik's avatar
      MDEV-729 lp:998028 - Server crashes on normal shutdown in closefrm after... · 66d5ecaf
      Sergei Golubchik authored
      MDEV-729 lp:998028 - Server crashes on normal shutdown in closefrm after executing a query from MyISAM table
      
      don't write a key value into the record buffer - a key length can be larger then the record length.
      66d5ecaf
    • Sergei Golubchik's avatar
      MDEV-759 lp:998340 - Valgrind complains on simple selects containing... · 1b8132b4
      Sergei Golubchik authored
      MDEV-759 lp:998340 - Valgrind complains on simple selects containing expression DAY(FROM_UNIXTIME(-1))
      
      check item->null_value before using the result of item->val_int()
      1b8132b4
    • Sergei Golubchik's avatar
      5.3 merge · f990bddf
      Sergei Golubchik authored
      client/mysqltest.cc:
        make --error to work for --change_user errors
      f990bddf
    • Sergei Golubchik's avatar
      5.2 merge · 03b2eb24
      Sergei Golubchik authored
      03b2eb24
    • Sergei Golubchik's avatar
      MDEV-4040 Replace deprecated SET OPTION syntax in mysqldump · 27ad0a80
      Sergei Golubchik authored
      mysqldump.c: s/SET OPTION/SET/
      (OPTION was, hm, optional since 3.21, so there's no need to use SET OPTION even
      in the old compatibility modes)
      27ad0a80
    • Sergei Golubchik's avatar
      MDEV-3909 remote user enumeration · 9d6fbeaa
      Sergei Golubchik authored
      instead of returning Access denied on the incorrect user name,
      emulate the complete failed logic procedure, possibly with
      the change plugin packet.
      9d6fbeaa