1. 19 Jul, 2018 4 commits
    • Sergei Golubchik's avatar
      MDEV-11741 handler::ha_reset(): Assertion... · bd5cf02b
      Sergei Golubchik authored
      MDEV-11741 handler::ha_reset(): Assertion `bitmap_is_set_all(&table->s->all_set)' failed or server crash in mi_reset or buffer overrun or unexpected ER_CANT_REMOVE_ALL_FIELDS
      
      MEMORY table could be renamed into a non-extistent database.
      
      rename() is documented to return ENOENT when the source file does not
      exist OR when the target directory not exist. Nonexistent source .frm
      file is ok (table can still exist in the engine), nonexistent target
      directory is not.
      
      Make my_rename to use ENOTDIR for the latter case. Make RENAME TABLE
      issue an appropriate error ("unknown database" instead of "unknown table")
      bd5cf02b
    • Sergei Golubchik's avatar
      MDEV-8941 Compile on Solaris (SPARC) fails with errors in filamvct.cpp · 0b3e28a4
      Sergei Golubchik authored
      remove unnecessary declaration
      0b3e28a4
    • Alexander Barkov's avatar
      Simplify caseup() and casedn() in charsets · e2ac4098
      Alexander Barkov authored
      After the MDEV-13118 fix there's no code in the server that
      wants caseup/casedn to change the argument in place for simple
      charsets.  Let's remove this logic and always return the result in a
      new string for all charsets, both simple and complex.
      
      1. Removing the optimization that *some* character sets used in casedn()
        and caseup(), which allowed (and required) to change the case in-place,
        overwriting the string passed as the "src" argument.
        Now all CHARSET_INFO's work in the same way:
        non of them change the source string in-place, all of them now convert
        case from the source string to the destination string, leaving
        the source string untouched.
      
      2. Adding "const" qualifier to the "char *src" parameter
         to caseup() and casedn().
      
      3. Removing duplicate implementations in ctype-mb.c.
        Now both caseup() and casedn() implementations for all CJK character sets
        use internally the same function my_casefold_mb()
        (the former my_casefold_mb_varlen()).
      
      4. Removing the "unused" attribute from parameters of some my_case{up|dn}_xxx()
         implementations, as the affected parameters are now *used* in the code.
         Previously these parameters were used only in DBUG_ASSERT().
      e2ac4098
    • Alexander Barkov's avatar
      MDEV-13118 Wrong results with LOWER and UPPER and subquery · ab58493d
      Alexander Barkov authored
      This problem is similar to MDEV-10306.
      
      1. Fixing Item_str_conv::val_str(String *str) to return the result in "str",
         and to use tmp_value only as a temporary buffer for args[0]->val_str().
         The new code version now guarantees that the result is always returned in
         "str". The trick with copy_if_not_alloced() is not used any more.
      
      2. The change #1 revealed the same problem in SUBSTRING_INDEX(),
         so some tests with combinations of UPPER()/LOWER() and SUBSTRING_INDEX()
         started to fail. Fixing Item_func_substr_index::val_str() the same way,
         to return the result in "str" and use tmp_value as a temporary buffer
         for args[0]->val_str().
      ab58493d
  2. 18 Jul, 2018 1 commit
    • sachin's avatar
      MDEV-9266 Creating index on temporaray table breaks replication · ada54101
      sachin authored
      Problem:- Create/drop index was logged into binlog.
      
      Goal:- Operation on temporary table should not be binlog when binlog format
      is row.
      
      Solution:-
      We should add CF_FORCE_ORIGINAL_BINLOG_FORMAT when there is ddl on temp
      table.
      For optimize, analyze, repair we wont change anything ,Then will
      be logged in binlog , But they also dont throw any error if operation fails
      Since slave wont be having any temp table , but these operation on tmp
      table will be processed without breaking replication.
      
      For rename we need a different logic MDEV-16728 will solve it.
      ada54101
  3. 17 Jul, 2018 1 commit
  4. 14 Jul, 2018 2 commits
    • Igor Babaev's avatar
      MDEV-16760 CREATE OR REPLACE TABLE never updates statistical tables · 1fd84f91
      Igor Babaev authored
      If the command CREATE OR REPLACE TABLE really replaces a table then
      it should remove all data on this table from all statistical tables.
      1fd84f91
    • Igor Babaev's avatar
      MDEV-16757 Memory leak after adding manually min/max statistical data · c89bb15c
      Igor Babaev authored
                 for blob column
      
      ANALYZE TABLE <table> does not collect statistical data on min/max values
      for BLOB columns of <table>. However these values can be added into
      mysql.column_stats manually by executing proper statements.
      Unfortunately this led to a memory leak because the memory allocated
      for these values was never freed.
      This patch provides the server with a function to free memory allocated
      for min/max statistical values of BLOB types.
      c89bb15c
  5. 11 Jul, 2018 2 commits
  6. 10 Jul, 2018 1 commit
  7. 02 Jul, 2018 3 commits
  8. 30 Jun, 2018 1 commit
    • Igor Babaev's avatar
      MDEV-16603 Crash with set join_cache_level=4 · 90cb7212
      Igor Babaev authored
      When the definition of the index used for hash join was created
      in create_hj_key_for_table() it could cause memory overwrite
      due to a bug that led to an underestimation of the number of
      the index component.
      90cb7212
  9. 28 Jun, 2018 1 commit
  10. 27 Jun, 2018 5 commits
    • Sergey Vojtovich's avatar
      MDEV-8540 - Crash on server shutdown since 10.0.16 · 9d41dd2f
      Sergey Vojtovich authored
      For the purpose of reporting an error to error log, shutdown thread was
      attempting to access current_thd->variables.lc_messages->errmsgs->errmsgs.
      Whereas current_thd was NULL.
      
      We should log errors according to global lc_messages setting instead of
      session setting.
      9d41dd2f
    • Sergey Vojtovich's avatar
      MDEV-8540 - Crash on server shutdown since 10.0.16 · bf4244d1
      Sergey Vojtovich authored
      Only close stdin if it was open initinally. Otherwise we may close file
      descriptor which is reused for different puprose (specifically for binlog
      index file in case of this bug).
      bf4244d1
    • Michael Widenius's avatar
      Fixed MDEV-16512, crashing on re-execution of failing SP · 937c1931
      Michael Widenius authored
      MDEV-16512 Server crashes in find_field_in_table_ref on 2nd
      execution of SP referring to non-existing field
      
      Problem was in the natural join code that it changed TABLE_LIST and
      Item_fields but didn't restore changed things if things goes wrong
      and was not able to re-execute after failure.
      Some of the problems could have been avoided if we would have run
      fix_fields before doing natural join transformations.
      
      Fixed by marking functions complete AFTER they had executed, instead at
      start.
      I had also to change some tests that checked if Item_fields are usable.
      
      This doesn't fix all known problems, but at least avoids some crashes.
      What should be done in the near future is to mark the statement in the SP
      as 'not re-executable' and force a reparse of it on next execution.
      
      Reviewer: Sergei Petrunia <psergey@askmonty.org>
      937c1931
    • Michael Widenius's avatar
      faef2e6a
    • Michael Widenius's avatar
      1f6a89a8
  11. 26 Jun, 2018 3 commits
  12. 25 Jun, 2018 1 commit
    • Andrei Elkin's avatar
      MDEV-15242 Poor RBR update performance with partitioned tables · 28e1f145
      Andrei Elkin authored
      Observed and described
      partitioned engine execution time difference
      between master and slave was caused by excessive invocation
      of base_engine::rnd_init which was done also for partitions
      uninvolved into Rows-event operation.
      The bug's slave slowdown therefore scales with the number of partitions.
      
      Fixed with applying an upstream patch.
      
      References:
      ----------
      https://bugs.mysql.com/bug.php?id=73648
      Bug#25687813 REPLICATION REGRESSION WITH RBR AND PARTITIONED TABLES
      28e1f145
  13. 24 Jun, 2018 1 commit
  14. 20 Jun, 2018 5 commits
  15. 19 Jun, 2018 3 commits
  16. 13 Jun, 2018 3 commits
  17. 12 Jun, 2018 3 commits