1. 08 Nov, 2013 1 commit
    • Michael Widenius's avatar
      MDEV-5241: Collation incompatibilities with MySQL-5.6 · 192678e7
      Michael Widenius authored
      - Character set code & tests from Alexander Barkov
      - Integration with ALTER TABLE, REPAIR and open_table from Monty
      
      The problem was that MySQL 5.6 added some croatian and vitanamese character set collations that are incompatible with MariaDB.
      
      The fix is to move the MariaDB conflicting collation numbers out of the region that MySQL is likely to use.
      mysql_upgrade, REPAIR TABLE or ALTER TABLE will fix the collations.
      If one tries to access and old incompatible table, one will get the error "Table upgrade required...."
      After this patch, MariaDB supports all the MySQL character set collations and the old MariaDB croatian collations, which are closer to the latest standard than the MySQL versions.
      
      New character sets:
      ucs2_croatian_mysql561_uca_ci
      utf8_croatian_mysql561_uca_ci
      utf16_croatian_mysql561_uca_ci
      utf32_croatian_mysql561_uca_ci
      utf8mb4_croatian_mysql561_uca_ci
      
      Other things:
      - Fixed some compiler warnings
      - mysql_upgrade prints information about repaired tables.
      - Increased version number
      
      VERSION:
        Increased VERSION number
      client/mysqlcheck.c:
        Print repaired table name when using --verbose
      include/m_ctype.h:
        Add new MariaDB collation regions that are not likely to conflict with MySQL
      include/my_base.h:
        Added flag to detect if table was opened for ALTER TABLE
      mysql-test/r/ctype_ldml.result:
        Updated result
      mysql-test/r/ctype_uca.result:
        Updated result
      mysql-test/r/ctype_upgrade.result:
        Updated result
      mysql-test/r/ctype_utf16_uca.result:
        Updated result
      mysql-test/r/ctype_utf32_uca.result:
        Updated result
      mysql-test/r/ctype_utf8mb4_uca.result:
        Updated result
      mysql-test/std_data/ctype_upgrade:
        Test files for testing upgrading of conflicting collations
      mysql-test/suite/engines/funcs/r/db_alter_collate_ascii.result:
        New collations added
      mysql-test/suite/engines/funcs/r/db_alter_collate_utf8.result:
        New collations added
      mysql-test/suite/innodb/r/innodb_ctype_ldml.result:
        Updated test result
      mysql-test/suite/innodb/t/innodb_ctype_ldml.test:
        Updated test result
      mysql-test/suite/plugins/r/show_all_plugins.result:
        Updated version number
      mysql-test/suite/roles/create_and_drop_role_invalid_user_table.result:
        Updated version number
      mysql-test/t/ctype_ldml.test:
        Updated test
      mysql-test/t/ctype_uca.test:
        Testing of new collations
      mysql-test/t/ctype_upgrade.test:
        Testing of upgrading tables with old collations
        The test ensures that:
        - We will get an error if we try to open a table with old collations.
        - CHECK TABLE will detect that the table needs to be upgraded.
        - ALTER TABLE and REPAIR will fix the table.
        - mysql_upgrade works as expected
      mysql-test/t/ctype_utf16_uca.test:
        Testing of new collations
      mysql-test/t/ctype_utf32_uca.test:
        Testing of new collations
      mysql-test/t/ctype_utf8mb4_uca.test:
        Testing of new collations
      mysys/charset-def.c:
        Added new character sets
      mysys/charset.c:
        Always give an error, if requested, if a character set didn't exist
      sql/handler.cc:
        - Added upgrade_collation() to check if collation is compatible with old version
        - check_collation_compatibility() checks if we are using an old collation from MariaDB 5.5 or MySQL 5.6
        - ha_check_for_upgrade() returns HA_ADMIN_NEEDS_ALTER if we have an incompatible collation
      sql/handler.h:
        Added new prototypes
      sql/sql_table.cc:
        - Mark that tables are opened for ALTER TABLE
        - If table needs to be upgraded, ensure we are not using online alter table.
      sql/table.cc:
        - If we are using an old incompatible collation, change to use the new one and mark table as incompatible.
        - Give an error if we try to open an incompatible table.
      sql/table.h:
        Added error that table needs to be rebuild
      storage/connect/ha_connect.cc:
        Fixed compiler warning
      strings/ctype-uca.c:
        New character sets
      192678e7
  2. 07 Nov, 2013 3 commits
  3. 06 Nov, 2013 7 commits
    • Elena Stepanova's avatar
    • Elena Stepanova's avatar
      71c56e6e
    • Elena Stepanova's avatar
      More verbose error messages · cdecd86a
      Elena Stepanova authored
      cdecd86a
    • Alexander Barkov's avatar
      Recording correct test results: · 3e1ae7a0
      Alexander Barkov authored
        mysql-test/suite/engines/funcs/r/db_alter_collate_ascii.result
        mysql-test/suite/engines/funcs/r/db_alter_collate_utf8.result
      3e1ae7a0
    • unknown's avatar
      MDEV-4506: Parallel replication · dcb3650d
      unknown authored
      MDEV-5217: Incorrect MyISAM event execution order causing incorrect parallel replication
      
      In parallel replication, if transactions A,B group-commit together on the
      master, we can execute them in parallel on a replication slave. But then, if
      transaction C follows on the master, on the slave, we need to be sure that
      both A and B have completed before starting on C to be sure to avoid
      conflicts.
      
      The necessary wait is implemented such that B waits for A to commit before it
      commits itself (thus preserving commit order). And C waits for B to commit
      before it itself can start executing. This way C does not start until both A
      and B have completed.
      
      The wait for B's commit on A happens inside the commit processing. However, in
      the case of MyISAM with no binlog enabled on the slave, it appears that no
      commit processing takes place (since MyISAM is non-transactional), and thus
      the wait of B for A was not done. This allowed C to start before A, which can
      lead to conflicts and incorrect replication.
      
      Fixed by doing an extra wait for A at the end of B before signalling C.
      dcb3650d
    • unknown's avatar
      MDEV-4506: Parallel replication · c90f4f02
      unknown authored
      MDEV-5217: Unlock of de-allocated mutex
      
      There was a race in the code for wait_for_commit::wakeup().
      
      Since the waiter does a dirty read of the waiting_for_commit
      flag, it was possible for the waiter to complete and deallocate
      the wait_for_commit object while the waitee was still running
      inside wakeup(). This would cause the waitee to access invalid
      memory.
      
      Fixed by putting an extra lock/unlock in the destructor for
      wait_for_commit, to ensure that waitee has finished with the
      object before it is deallocated.
      c90f4f02
    • unknown's avatar
      MDEV-4506: Parallel replication · bdbf90b9
      unknown authored
      MDEV-5217: Incorrect event pos update leading to corruption of reading of events from relay log
      
      The rli->event_relay_log_pos was sometimes undated incorrectly when using
      parallel replication, especially around relay log rotates. This could cause
      the SQL thread to seek into an invalid position in the relay log, resulting in
      errors about invalid events or even random corruption in some cases.
      bdbf90b9
  4. 05 Nov, 2013 3 commits
    • Sergei Golubchik's avatar
      increment the version · 555af7c7
      Sergei Golubchik authored
      555af7c7
    • unknown's avatar
      MDEV-4506: Parallel replication. · b0391d1b
      unknown authored
      MDEV-5217: Last_sql_error lost in parallel replication.
      
      For some reason, the query execution code in log_event.cc call
      rli->clear_error for each event (part of clear_all_errors()).
      This causes a problem in parallel replication, where the
      execution in one worker thread could clear the error set by
      another thread, causing the SQL thread to stop but leaving no
      error visible in SHOW SLAVE STATUS.
      
      There seems to be no reason to clear the global error code
      in Relay_log_info for each event execution, from code review
      and from running the test suite. So remove this clearing of
      the error code to make things work also in the parallel case.
      b0391d1b
    • unknown's avatar
      MDEV-4506: Parallel replication · c834242a
      unknown authored
      MDEV-5217: SQL thread hangs during stop if error occurs in the middle of an event group
      
      Normally, when we stop the slave SQL thread in parallel replication, we want
      the worker threads to continue processing events until the end of the current
      event group. But if we stop due to an error that prevents further events from
      being queued, such as an error reading the relay log, no more events can be
      queued for the workers, so they have to abort even if they are in the middle
      of an event group. There was a bug that we would deadlock, the workers
      waiting for more events to be queued for the event group, the SQL thread
      stopped and waiting for the workers to complete their current event group
      before exiting.
      
      Fixed by now signalling from the SQL thread to all workers when it is about
      to exit, and cleaning up in all workers when so signalled.
      
      This patch fixes one of multiple problems reported in MDEV-5217.
      c834242a
  5. 04 Nov, 2013 6 commits
    • Sergei Golubchik's avatar
      10.0-base merge · 0150dc6e
      Sergei Golubchik authored
      0150dc6e
    • Sergei Golubchik's avatar
      increase the initial ibdata1 size, as explained in MySQL-5.6... · bf603250
      Sergei Golubchik authored
      increase the initial ibdata1 size, as explained in MySQL-5.6 revid:kevin.lewis@oracle.com-20120802192452-kmikiz990xzje18b
      
      "
        A maximum size of 10 Mb works in 5.1 because the initial
        required size of ibdata1 was less than 10M.  But in 5.5, a
        change was made to allocate all 128 rollback segments at
        bootstrap.  Since then, the initial size has been 10M + the
        default autoextend size of 8M. 
      
        In 5.6, worklog 6216 changes the autoextend size from 8M to
        64M.  This changes the initial size of ibdata1 from 18M in
        5.5 and earlier releases of 5.6 to 74M in the current
        mysql-5.6 and mysql-trunk.  So this change is especially
        needed in 5.6.
      "
      
      12M is enough to avoid autoextending during bootstrap
      bf603250
    • Sergei Golubchik's avatar
      MDEV-5080 Assertion `strcmp(share->unique_file_name,filename) ||... · 1ef87c55
      Sergei Golubchik authored
      MDEV-5080 Assertion `strcmp(share->unique_file_name,filename) || share->last_version' fails at /storage/myisam/mi_open.c:67
      
      extend table names discovery (ha_discover_table_names() and Discovered_table_list) to return
      or optionally filter out temporary tables ("#sql..."). SHOW commands and I_S tables
      typically want temp table filtered out, while DROP DATABASE wants to see them too.
      
      additonally, remove the supression for the warning "Invalid (old?) table or database name"
      from mtr, and add it to .test files as needed (we need to test that this warning
      does *not* happen in drop.test)
      1ef87c55
    • Sergei Golubchik's avatar
      restore the condition in filename_to_tablename() · 032a61fc
      Sergei Golubchik authored
      (broken in the revid:sergii@pisem.net-20130615170931-bn2h8j30vu5bfp0t)
      032a61fc
    • Sergei Golubchik's avatar
      MDEV-5232 SET ROLE checks privileges differently from check_access() · 79d2e6c8
      Sergei Golubchik authored
      use the same inconsistent priv_user@host pair for SET ROLE privilege checks,
      just as check_access() does
      79d2e6c8
    • Sergei Golubchik's avatar
      merge 10.0-base into 10.0 · a30e8741
      Sergei Golubchik authored
      a30e8741
  6. 03 Nov, 2013 7 commits
  7. 02 Nov, 2013 5 commits
  8. 01 Nov, 2013 4 commits
  9. 31 Oct, 2013 3 commits
    • Sergei Golubchik's avatar
      MDEV-4024 Found Index PRIMARY whose column info does not match that of MySQL · 6882f9fa
      Sergei Golubchik authored
      For compatibility purposes let InnoDB use DATA_INT for MYSQL_TYPE_ENUM and MYSQL_TYPE_SET.
      Silence the warning for these types and let the index translation table to be built anyway.
      
      Test case by Jeremy Cole.
      6882f9fa
    • unknown's avatar
      MDEV-5206: Incorrect slave old-style position in MDEV-4506, parallel replication. · 39df665a
      unknown authored
      In parallel replication, there are two kinds of events which are
      executed in different ways.
      
      Normal events that are part of event groups/transactions are executed
      asynchroneously by being queued for a worker thread.
      
      Other events like format description and rotate and such are executed
      directly in the driver SQL thread.
      
      If the direct execution of the other events were to update the old-style
      position, then the position gets updated too far ahead, before the normal
      events that have been queued for a worker thread have been executed. So
      this patch adds some special cases to prevent such position updates ahead
      of time, and instead queues dummy events for the worker threads, so that
      they will at an appropriate time do the position updates instead.
      
      (Also fix a race in a test case that happened to trigger while running
      tests for this patch).
      39df665a
    • Alexander Barkov's avatar
      A few minor Unicode collation customization improvements were made, · bd3dc542
      Alexander Barkov authored
      which makes it possible to add more world language collations
      with very complex collation rules (e.g. Myanmar):
      - Weight string for a single character in a user defined collation
        was erroneously limited to 7 weights (instead of 8 weights).
        Added an extra element in the user-defined weight arrays,
        to fit 8 non-zero weights.
      - Weight string limit for contractions was made two times longer (16 weights),
        which allows longer contractions without affecting the performance
        of filesort.
      - A user-defined collation now refuses to initialize and reports an error
        in case if a weight string gets longer than 8 weights for a single character,
        or longer than 16 weights for a contraction. Previously weight strings
        for such characters (and contractions) were cut, so a collation
        could silently start with wrong rules.
      - Fixed a bug in handling rules like "&a << b" in combination with
        shift-after-method="expand". The primary weight for "b" was not
        correctly calculated, which erroneously made "b" primary greater than "a"
        instead of primary equal to "a".
      bd3dc542
  10. 30 Oct, 2013 1 commit
    • Sergey Vojtovich's avatar
      Merge Spider updates. Fixes · eea91f63
      Sergey Vojtovich authored
      MDEV-4736 - Assertion `! is_set()' fails in Diagnostics_area::set_ok_status on
                  UPDATE which violates constraint on a remote table
      eea91f63