1. 28 Sep, 2016 4 commits
    • Sergei Golubchik's avatar
      Merge branch '10.0' into 10.1 · 66d96965
      Sergei Golubchik authored
      66d96965
    • Sergei Petrunia's avatar
    • Sergei Petrunia's avatar
      Merge fix for MDEV-10649 from 10.0 to 10.1 · 66a58f46
      Sergei Petrunia authored
      - storage/innobase/dict/dict0stats.cc
      - storage/xtradb/dict/dict0stats.cc
      66a58f46
    • Sergei Petrunia's avatar
      MDEV-10649: Optimizer sometimes use "index" instead of "range" access for UPDATE · a53f3c6d
      Sergei Petrunia authored
      (Fixing both InnoDB and XtraDB)
      
      Re-opening a TABLE object (after e.g. FLUSH TABLES or open table cache
      eviction) causes ha_innobase to call
      dict_stats_update(DICT_STATS_FETCH_ONLY_IF_NOT_IN_MEMORY).
      
      Inside this call, the following is done:
        dict_stats_empty_table(table);
        dict_stats_copy(table, t);
      
      On the other hand, commands like UPDATE make this call to get the "rows in
      table" statistics in table->stats.records:
      
        ha_innobase->info(HA_STATUS_VARIABLE|HA_STATUS_NO_LOCK)
      
      note the HA_STATUS_NO_LOCK parameter. It means, no locks are taken by
      ::info() If the ::info() call happens between dict_stats_empty_table
      and dict_stats_copy calls, the UPDATE's optimizer will get an estimate
      of table->stats.records=1, which causes it to pick a full table scan,
      which in turn will take a lot of row locks and cause other bad
      consequences.
      a53f3c6d
  2. 27 Sep, 2016 16 commits
  3. 26 Sep, 2016 5 commits
  4. 24 Sep, 2016 2 commits
  5. 23 Sep, 2016 3 commits
  6. 22 Sep, 2016 6 commits
    • Jan Lindström's avatar
      Do not use os_file_read() directly for reading first page of the · 1d55cfce
      Jan Lindström authored
      tablespace. Instead use fil_read() with syncronous setting.
      Fix test failures and mask tablespace number as it could
      change in concurrent mtr runs.
      1d55cfce
    • Jan Lindström's avatar
      MDEV-9931: InnoDB reads first page of every .ibd file at startup · 2bedc397
      Jan Lindström authored
      Analysis: By design InnoDB was reading first page of every .ibd file
      at startup to find out is tablespace encrypted or not. This is
      because tablespace could have been encrypted always, not
      encrypted newer or encrypted based on configuration and this
      information can be find realible only from first page of .ibd file.
      
      Fix: Do not read first page of every .ibd file at startup. Instead
      whenever tablespace is first time accedded we will read the first
      page to find necessary information about tablespace encryption
      status.
      
      TODO: Add support for SYS_TABLEOPTIONS where all table options
      encryption information included will be stored.
      2bedc397
    • Seamus Lee's avatar
      MDEV-10830 - Fix undefined database test error when running mysql_install_db (#234) · e387bfaf
      Seamus Lee authored
      * Fix undefined database test error when running mysql_install_db
      
      When using mariaDb in docker mode it can fail as it calls mysql_install_db but as we are going through a slightly different install process the test database has not been created, therefore we should fall back to the mysql database as per https://mariadb.com/kb/en/mariadb/mariadb-10112-mysql_install_db-aborts-on-unkown-file-test/
      
      * Also fix mysql_install_db.pl.in
      e387bfaf
    • Sergey Vojtovich's avatar
      MDEV-10315 - Online ALTER TABLE may get stuck in tdc_remove_table · e56a5392
      Sergey Vojtovich authored
      There was race condition between online ALTER TABLE and statements performing
      TABLE_SHARE release without marking it flushed (e.g. in case of table cache
      overflow, SET @@global.table_open_cache, manager thread purging table cache).
      
      The reason was missing mysql_cond_broadcast().
      e56a5392
    • Alexander Barkov's avatar
    • Alexander Barkov's avatar
      MDEV-10425 Assertion `collation.derivation == DERIVATION_IMPLICIT' failed in... · 7e4eb990
      Alexander Barkov authored
      MDEV-10425 Assertion `collation.derivation == DERIVATION_IMPLICIT' failed in Item_func_conv_charset::fix_length_and_dec()
      MDEV-10850 Wrong result for WHERE .. (f2=TO_BASE64('test') OR f2=TO_BASE64('TEST'))
      
      Problem N1: MDEV-10425
      Item_func_{md5|sha|sha2}::fix_length_and_dec() changed args[0]->collation
      to force binary comparison in args[0]->eq().
      It was done to treat e.g. MD5('a') and MD5('A') as different values.
      It is wrong for a Item_func_xxx to modify its arguments.
      Item_func_conv_charset did not expect that and crashed on assert.
      
      Problem N2: MDEV-10850
      Item_func_to_base64, Item_func_password, Item_func_hex are also case sensitive
      hash functions, but they did not compare their arguments as binary.
      
      Solution:
      - Removing the code changing args[0]->collation
      - Introducing Item_str_ascii_checksum_func as a common parent
        for Item_func_{md5|sha|sha2|password|hex|to_base64}
        and overriding its eq() method to compare arguments binary.
      7e4eb990
  7. 21 Sep, 2016 2 commits
  8. 20 Sep, 2016 2 commits