1. 13 May, 2013 3 commits
  2. 12 May, 2013 2 commits
    • Michael Widenius's avatar
      Fixed MDEV-4291: Assertion `trid >= info->s->state.create_trid' failure or... · 66830664
      Michael Widenius authored
      Fixed MDEV-4291: Assertion `trid >= info->s->state.create_trid' failure or data corruption (key points to record
      outside datafile) on INSERT into an Aria table.
      
      The isssue was that the check if a table was moved between systems didn't take into account that create_trid could be bigger than the current max trid on the new system.
      This could only happen if one tried to move a table that one had just done a 'REPAIR TABLE' on.
      Tables that one had run 'aria_chk --zerofill' on worked.
      
      Fixed this by assuming that if create_trid is too big then the table has been moved from one system to another and we have to do an automatic zerofill.
      
      Other fixed:
      
      - Added a check to detect a wrong create_trid in 'check table'.
      - aria_chk -dvv will now write out also the create_trid (to make future error finding easier)
      - aria_chk --zerofill doesn't anymore require a aria_control_file
      - Removed some warnings from safemalloc when using aria_chk, ma_test1 and ma_test2.
      
      
      include/myisamchk.h:
        Removed wrong 'QQ' flags (the flags are used by myisamchk and aria_chk)
      storage/maria/ha_maria.cc:
        maria_chk_status() can now also return an error.
      storage/maria/ma_check.c:
        In maria_chk_status() check if create_trid value is too big.
      storage/maria/ma_open.c:
        Changed check if table is moved so that we can detect wrong create_trid values.
        Don't set STATE_NOT_MOVABLE flag if we are doing repair/check. This was done so that aria_chk can print out the movable flag.
      storage/maria/ma_test1.c:
        Added code to suppress memory leaks from safemalloc
      storage/maria/ma_test2.c:
        Added code to suppress memory leaks from safemalloc
      storage/maria/maria_chk.c:
        Added code to suppress memory leaks from safemalloc.
        Make help text a bit better for --HELP and --zerofill.
        Incresed version number.
        Don't require a control file if we are only doing --zerofill
        Print out 'create_trid' when doing --describe --verbose
      storage/maria/unittest/ma_test_recovery.expected:
        Updated result file
      66830664
    • Michael Widenius's avatar
      MDEV-3999: Valgrind errors 'invalid write' or assorted server crashes on... · 3bd6e4b8
      Michael Widenius authored
      MDEV-3999: Valgrind errors 'invalid write' or assorted server crashes on concurrent flow with partitioned Aria tables
      MDEV-3989: Server crashes on import from MariaDB mysqldump export with partitioned Aria table.
      
      Problem was that bulk insert in aria was not properly protected against concurrent selects.
      
      
      storage/maria/ha_maria.cc:
        Move settings of file->state to _ma_block_start_trans() to ensure that lock_key_trees is not changed by a concurrent bulk_insert.
      storage/maria/ma_check.c:
        Added DBUG_ASSERT()
      storage/maria/ma_open.c:
        Set start_trans to ma_start_trans for default behaviour.
      storage/maria/ma_pagecrc.c:
        Removed test for 'non_transactional' as a now_transactinal could be reset while a flush was happening.
      storage/maria/ma_state.c:
        Moved setting of info->state from external_lock to start_trans to protect against concurrent running bulk inserts.
        This works as the other threads will wait in thr_lock() until bulk_insert is done and keys are re-generated.
      storage/maria/ma_state.h:
        Added _ma_start_trans()
      3bd6e4b8
  3. 11 May, 2013 2 commits
    • Michael Widenius's avatar
      Fixed that SHOW PROCESSLIST and information_schema.processlist uses the right... · 0737932b
      Michael Widenius authored
      Fixed that SHOW PROCESSLIST and information_schema.processlist uses the right length for user names.
      Fixed some failing tests
      
      
      mysql-test/mysql-test-run.pl:
        Removed warning from mysql-test-run
      mysql-test/r/create.result:
        Updated result
      mysql-test/r/log_slow.result:
        Fixed failing test
      mysql-test/suite/funcs_1/r/is_columns_is.result:
        Updated result
      mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result:
        Updated result
      mysql-test/suite/funcs_1/r/processlist_val_no_prot.result:
        Updated result
      mysql-test/t/log_slow.test:
        Ensure variables are properly reset at end of test
      sql/sql_show.cc:
        Fixed max length for user names
      0737932b
    • Michael Widenius's avatar
      MDEV-4231: Possible bug in function _ma_apply_undo_row_insert() · 5b31f878
      Michael Widenius authored
      Added comment to clearify the code.
      
      
      storage/maria/ma_blockrec.c:
        Added comment to clearify the code
        In case of out of memory or disk error, mark pages with LSN_IMPOSSIBLE to make it easier to know which pages have wrong information.
      5b31f878
  4. 09 May, 2013 2 commits
  5. 08 May, 2013 4 commits
    • Vladislav Vaintroub's avatar
    • Alexander Barkov's avatar
      The bug · e013bf9f
      Alexander Barkov authored
      MDEV-4489 "Replication of big5, cp932, gbk, sjis strings makes wrong values on slave"
      has been fixed.
      
      Problem:
      String constants of some Asian charsets (big5,cp932,gbk,sjis)
      can have backslash '\' (0x5C) in the second byte of multi-byte characters.
      Replicating of such constants using the standard '\'-escaping is dangerous.
      Therefore, constants of these charsets are replicated using hex notation:
      INSERT INTO t1 (a) VALUES (0x815C);
      
      However, 0xHHHH constants do not work well in some cases,
      because they can behave as strings and as numbers, depending on context
      (for example, depending on the data type of the column in an INSERT statement).
      
      This SQL script was not replicated correctly with statement-based replication:
      
      SET NAMES gbk;
      PREPARE STMT FROM 'INSERT INTO t1 (a) VALUES (?)';
      SET @A = '1';
      EXECUTE STMT USING @A;
      
      The INSERT statement was replicated as:
      INSERT INTO t1 (a) VALUES (0x31);
      
      '1' was correctly converted to the number 1 on master.
      But the 0x31 constant was treated as number 49 on slave.
      
      Fix:
      
      1. Binary log now uses X'HHHH' instead of 0xHHHH constants.
      2. The X'HHHH' constants now work always as strings, in all contexts.
      This is the SQL standard compliant behaviour.
      
      After the fix, the above statement is replicated as:
      INSERT INTO t1 (a) VALUES (X'31');
      X'31' is treated as string '1' on slave, and is correctly converted to 1.
      
      
      modified:
        @ mysql-test/r/ctype_cp932_binlog_stm.result
        @ mysql-test/r/select.result
        @ mysql-test/r/select_jcl6.result
        @ mysql-test/r/select_pkeycache.result
        @ mysql-test/r/user_var-binlog.result
        @ mysql-test/r/varbinary.result
        @ mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result
        @ mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result
        @ mysql-test/suite/rpl/r/rpl_charset_sjis.result
        @ mysql-test/suite/rpl/r/rpl_mdev382.result
        @ mysql-test/suite/rpl/t/rpl_charset_sjis.test
        @ mysql-test/t/ctype_cp932_binlog_stm.test
        @ mysql-test/t/select.test
        @ mysql-test/t/varbinary.test
          Adding and updating tests
      
        @ sql/item.cc
        @ sql/item.h
        @ sql/sql_yacc.yy
        @ sql/sql_lex.cc
          Splitting the implementations of X'HH' and 0xHH constants into two
          separate classes. Fixing the parser to distinguish the two syntaxes.
      
        @ sql/log_event.cc
          Using X'HH' instead of 0xHH for binary logging for string constants
          of the "dangerous" charsets.
      
        @ sql/sql_string.h
          Adding a helped method String::append_hex().
      e013bf9f
    • Sergei Golubchik's avatar
      da846a15
    • Sergei Golubchik's avatar
      Percona-Server-5.5.30-rel30.2.tar.gz · bcfa90b4
      Sergei Golubchik authored
      bcfa90b4
  6. 07 May, 2013 3 commits
  7. 06 May, 2013 1 commit
    • Michael Widenius's avatar
      If one declared several continue handler for the same condition on different... · d4be9e7b
      Michael Widenius authored
      If one declared several continue handler for the same condition on different level of stored procedures, all of them where executed.
      Now we only execute the innermost of them (the most relevant).
      
      The solution was to add a 'handled' marker to MYSQL_ERROR and mark all elements for which we have executed a condition handler.
      When searching for new conditions, we will ignore any marked element.
      
      
      
      
      .bzrignore:
        Ignore error message file
      mysql-test/r/sp.result:
        Added testcase for continue handlers.
      mysql-test/t/sp.test:
        Added testcase for continue handlers.
      sql/sp_head.cc:
        Mark errors for which we will excute a handler as 'handled'
        Ignore already handled warnings/errors
      sql/sql_error.cc:
        Add 'handled' argument to MYSQL_ERROR, so that we can mark the errors/warnings we have handled.
      sql/sql_error.h:
        Add 'handled' argument to MYSQL_ERROR, so that we can mark the errors/warnings we have handled.
      d4be9e7b
  8. 05 May, 2013 4 commits
  9. 04 May, 2013 5 commits
    • Sergey Petrunya's avatar
      MDEV-4071: Valgrind warnings 'Invalid read' in subselect_engine::calc_const_tables with ... · ddd341b7
      Sergey Petrunya authored
      - Call tmp_having->update_used_tables() *before* we have call JOIN::cleanup().
        Making the call after join::cleanup() is not allowed, because subquery 
        predicate items walk parent join's JOIN_TAB structures. Which can be 
        invalidated by JOIN::cleanup().
      ddd341b7
    • Sergey Petrunya's avatar
      71422d7b
    • Sergey Petrunya's avatar
      Update testcase result · 2a8db1ca
      Sergey Petrunya authored
      2a8db1ca
    • Igor Babaev's avatar
      Fixed bug mdev-4336. · 920c479c
      Igor Babaev authored
      When iterating over a list of conditions using List_iterator
      the function remove_eq_conds should skip all predicates that
      replace a condition from the list. Otherwise it can come to
      an infinite recursion. 
      920c479c
    • Igor Babaev's avatar
      Made consistent handling of the predicates of the form · b249680f
      Igor Babaev authored
      <non-nullable datatime field> IS NULL in outer joins with
      that in inner joins.
      Previously such condition was transformed into the condition
      <non-nullable datatime field> = 0 unless the field belonged
      to an inner table of an outer join. In this case the predicate
      was interpreted as for any other field.
      Now if the field in the predicate <non-nullable datatime field> IS NULL
      belongs to an inner table of an outer join the predicate is 
      transformed into the disjunction
      <non-nullable datatime field> = 0 OR <non-nullable datatime field> IS NULL.
      This is fully compatible with the semantics of such predicates in 5.5.
      b249680f
  10. 03 May, 2013 2 commits
  11. 02 May, 2013 1 commit
  12. 30 Apr, 2013 1 commit
    • Igor Babaev's avatar
      Fixed bug mdev-4274. · 86f43c30
      Igor Babaev authored
      This bug was the result of incompleteness of the patch for bug mdev-4177.
      When an OR condition is simplified to a single conjunct it is merged
      into the embedding AND condition. Multiple equalities are also merged,
      and any field item involved in those equality should acquire a pointer
      to a the multiple equality formed by this merge.
      86f43c30
  13. 29 Apr, 2013 1 commit
    • Vladislav Vaintroub's avatar
      MDEV-4458 - Windows installer does not launch upgrade wizard anymore, even if... · 8d75f11a
      Vladislav Vaintroub authored
      MDEV-4458 - Windows installer does not launch upgrade wizard anymore, even if there are upgradable instances (i.e windows service of lower MariaDB/MySQL version)
      
      The main  reason for he error is misplaced ADD_DIRECTORY in top-level CMakeLists.txt.
      ADD_DIRECTORY(win/packaging) was places before win/upgrade_wizard, and MSI was not able to detect that  upgrade wizard was built, and thus excluded upgrade wizard entirely.
      8d75f11a
  14. 28 Apr, 2013 2 commits
    • Vladislav Vaintroub's avatar
      fix test on Windows · 2ffc7d73
      Vladislav Vaintroub authored
      2ffc7d73
    • Igor Babaev's avatar
      Fixed bug mdev-4340. · f225f548
      Igor Babaev authored
      The function make_join_statistics checks whether eq_ref access uses only
      constant expressions, and, if this is the case the function performs
      constant row substitution. The code of this check must take into account
      hidden components of extended secondary keys. 
      f225f548
  15. 25 Apr, 2013 2 commits
    • Vladislav Vaintroub's avatar
      Fix build on Windows · 1d130cc6
      Vladislav Vaintroub authored
      1d130cc6
    • unknown's avatar
      Fix unsigned/signed conversion bug in event type during mysql_binlog_send(). · 203264dd
      unknown authored
      Since event types can be >=128 and are read from a (possibly signed) char
      pointer, we need to cast to unsigned char before extending to int, or we will
      get an incorrect negative number. This was done in the main code path already,
      but there is a rare case where we check for new events first without a lock
      and then again with the lock. If the second check succeeds because a new event
      turns up at just the right time, then we took a code path that was missing the
      correct unsigned char cast, leading to incorrect handling of events for old
      slave servers and possibly other grief.
      
      (This was found from a sporadic failure in Buildbot of test case
      rpl_mariadb_slave_capability).
      203264dd
  16. 22 Apr, 2013 1 commit
    • unknown's avatar
      MDEV-4396: Fix sporadic failure of test innodb.innodb_bug14676111 · b54e5850
      unknown authored
      The problem was that xtradb has innodb_purge_threads default 1 (plain
      innodb defaults to 0).
      
      The test sets a special debug variable and relies on it to force
      purge to happen. But when using background purge threads, this does
      not work, the debug code is not made to handle this, so occasionally
      the test times out waiting for the purge to occur.
      
      Fix by explicitly setting innodb_purgee_threads=0 for this test.
      b54e5850
  17. 19 Apr, 2013 2 commits
  18. 18 Apr, 2013 1 commit
  19. 17 Apr, 2013 1 commit