1. 09 Dec, 2016 1 commit
  2. 08 Dec, 2016 2 commits
    • Sergei Golubchik's avatar
      MDEV-10713: signal 11 error on multi-table update - crash in... · 03dabfa8
      Sergei Golubchik authored
      MDEV-10713: signal 11 error on multi-table update - crash in handler::increment_statistics or in make_select or assertion failure pfs_thread == ((PFS_thread*) pthread_getspecific((THR_PFS)))
      
      Different fix. Don't allow Item_func_sp to be evaluated unless
      all tables are prelocked.
      
      Extend the test case to make sure Item_func_sp::val_str is called
      (the table must have at least one row for that).
      03dabfa8
    • Sergei Golubchik's avatar
      Revert "MDEV-10713: signal 11 error on multi-table update - crash in... · ab65db6d
      Sergei Golubchik authored
      Revert "MDEV-10713: signal 11 error on multi-table update - crash in handler::increment_statistics or in make_select or assertion failure pfs_thread == ((PFS_thread*) pthread_getspecific((THR_PFS)))"
      
      This reverts commit 035a5ac6.
      
      Two minor problems and one regression:
      1. caching the value in str_result. Other Item methods may use it,
         destroying the cache. See, for example, Item::save_in_field, where
         str_result is moved to use a local buffer (this failed main.grant)
      2. Item_func_conv_charset::safe is now set too late, it's initialized
         only in val_str() but checked before that, this failed many tests
         in optimized builds.
      
      to fix 1 - use tmp_result instead of str_result, to fix 2, use
      the else branch in the Item_func_conv_charset constructor to set
      safe purely from charset properties.
      
      But this introduces a regression, constant strings can no longer be
      converted, say, from utf8 to latin1 (because 'safe' will be false).
      This fails few tests too. There is no way to fix it without reverting
      the commit and converting constants, as before, in the constructor.
      ab65db6d
  3. 07 Dec, 2016 6 commits
  4. 06 Dec, 2016 5 commits
  5. 05 Dec, 2016 2 commits
    • Sergei Golubchik's avatar
      MDEV-10293 'setupterm' was not declared in this scope · 18cdff67
      Sergei Golubchik authored
      Check for readline before checking for curses headers, because
      MYSQL_CHECK_READLINE fails when curses is not found, but
      CHECK_INCLUDE_FILES simply remembers the fact and continues.  So if
      there's no curses, MYSQL_CHECK_READLINE will abort, the user will then
      installs curses and continue the build. Thus, CHECK_INCLUDE_HEADERS
      will remember that there is no curses, but other checks from
      MYSQL_CHECK_READLINE will remember that curses are there. It will
      result in inconsistent HAVE_xxx defines.
      18cdff67
    • Sergei Golubchik's avatar
      02d153c7
  6. 04 Dec, 2016 4 commits
  7. 03 Dec, 2016 3 commits
  8. 02 Dec, 2016 2 commits
  9. 01 Dec, 2016 2 commits
  10. 29 Nov, 2016 3 commits
    • Igor Babaev's avatar
      Fixed bug mdev-11364. · 748d993c
      Igor Babaev authored
      The function Item_func_isnull::update_used_tables() must
      handle the case when the predicate is over not nullable
      column in a special way.
      This is actually a bug of MariaDB 5.3/5.5, but it's probably
      hard to demonstrate that it can cause problems there.
      748d993c
    • Jan Lindström's avatar
      MDEV-10427: innodb.innodb-wl5522-debug-zip fails sporadically in buildbot · b209bc3e
      Jan Lindström authored
      Test intentionally crashes the server, thus corrupted pages possible.
      b209bc3e
    • Alexander Barkov's avatar
      MDEV-11343 LOAD DATA INFILE fails to load data with an escape character... · dd0ff302
      Alexander Barkov authored
      MDEV-11343 LOAD DATA INFILE fails to load data with an escape character followed by a multi-byte character
      
      Partially backporting MDEV-9874 from 10.2 to 10.0
      
      READ_INFO::read_field() raised the ER_INVALID_CHARACTER_STRING error
      when reading an escape character followed by a multi-byte character.
      
      Raising wellformedness errors in READ_INFO::read_field() was wrong,
      because the main goal of READ_INFO::read_field() is to *unescape* the
      data which was presumably escaped using mysql_real_escape_string(),
      using the same character set with the one specified in
      "LOAD DATA INFILE ... CHARACTER SET ..." (or assumed by default).
      
      During LOAD DATA, multi-byte characters are not always scanned as a single
      entity! In case of escaped data, parts of a multi-byte character can be
      scanned on different loop iterations. So the old code erroneously tested
      welformedness in the middle of a multi-byte character.
      
      Moreover, the data after unescaping can go into a BLOB field, not a text field.
      Wellformedness tests are meaningless in this case.
      
      Ater this patch, wellformedness is only checked later, during
      Field::store(str,length,cs) time. The loop that scans bytes only
      makes sure to revert the changes made by mysql_real_escape_string().
      
      Note, in some cases users can supply data which did not really go through
      mysql_real_escape_string() and was escaped by some other means,
      or was not escaped at all. The file reported in this MDEV contains
      the string "\ä", which is an example of such improperly escaped data, as
      - either there should be two backslashes:   "\\ä"
      - or there should be no backslashes at all: "ä"
      mysql_real_escape_string() could not generate "\ä".
      dd0ff302
  11. 28 Nov, 2016 1 commit
  12. 25 Nov, 2016 1 commit
    • Alexander Barkov's avatar
      MDEV-11348 LOAD DATA LOCAL INFILE crashes the server on loading a backslash... · 099ce1dd
      Alexander Barkov authored
      MDEV-11348 LOAD DATA LOCAL INFILE crashes the server on loading a backslash followed by a multi-byte character
      
      The crash happened when if my_error() was called for any reasons during loading
      (e.g. a bad multi-byte sequence or a bad GEOMETRY value was found).
      The server sent both error and progress packets, so the client disconnected.
      The server then crashed on a assert about a wrong packet order in Debug build.
      The server also tried to read from a closed socket when calling
      READ_INFO::skip_data_till_eof().
      
      As the crash happened only with "mysql" running in interactive mode,
      no tests are possible. The problem was not reproducible with
      "mysqltest" or "mysql" in batch mode.
      099ce1dd
  13. 17 Nov, 2016 2 commits
  14. 16 Nov, 2016 1 commit
    • Kristian Nielsen's avatar
      Fix incorrect reading of events from relaylog in parallel replication. · 390f2a01
      Kristian Nielsen authored
      The SQL thread keeps track of the position in the current relay log from
      which to read the next event. This position is not normally used, but a
      certain interaction with the IO thread can cause the SQL thread to re-open
      the relay log and seek to the stored position.
      
      In parallel replication, there were a couple of places where the position
      was not updated. This created a race where a re-open of the relay log could
      seek to the wrong position and start re-reading and processing events
      already handled once, causing various kinds of problems.
      
      Fix this by moving the position update into a single place in
      apply_event_and_update_pos(), which should ensure that the position is
      always updated in the parallel replication case.
      
      This problem was found from the testcase of MDEV-10863, but it is logically
      a separate problem.
      390f2a01
  15. 15 Nov, 2016 2 commits
  16. 14 Nov, 2016 1 commit
  17. 12 Nov, 2016 1 commit
    • Igor Babaev's avatar
      Fixed bug mdev-11161. · 96b62b55
      Igor Babaev authored
      The flag TABLE_LIST::fill_me must be reset to false at the prepare
      phase for any materialized derived table used in the executed query.
      Otherwise if the optimizer decides to generate a key for such a table
      it is generated only for the first execution of the query.
      96b62b55
  18. 10 Nov, 2016 1 commit