1. 24 Apr, 2009 4 commits
    • Satya B's avatar
      Applying InnoDB snashot 5.0-ss4900, part 2. Fixes BUG#43309 · d5065d14
      Satya B authored
      1) BUG#43309 - Test main.innodb can't be run twice
      
      Detailed revision comments:
      
      r4701 | vasil | 2009-04-13 17:03:46 +0300 (Mon, 13 Apr 2009) | 6 lines
      branches/5.0:
      
      Fix Bug#43309 Test main.innodb can't be run twice
      
      by making the innodb.test reentrant.
      
      d5065d14
    • Satya B's avatar
      Applying InnoDB snashot 5.0-ss4900 part 1, Fixes BUG#42279 · 0e4caf39
      Satya B authored
      1) BUG#42279 - Race condition in btr_search_drop_page_hash_when_freed()
      
      Detailed revision comments:
      
      r4031 | marko | 2009-01-23 15:33:46 +0200 (Fri, 23 Jan 2009) | 8 lines
      branches/5.0: btr_search_drop_page_hash_when_freed(): Check if
      buf_page_get_gen() returns NULL.  The page may have been evicted
      from the buffer pool between buf_page_peek_if_search_hashed() and
      buf_page_get_gen(), because the buffer pool mutex will be released
      between these two calls. (Bug #42279)
      
      rb://82 approved by Heikki Tuuri
      
      0e4caf39
    • Satya B's avatar
      merge to latest 5.0-bugteam tree · 55533a7e
      Satya B authored
      55533a7e
    • Satya B's avatar
      Fix for BUG#43660- SHOW INDEXES/ANALYZE does NOT update cardinality · 4610c13a
      Satya B authored
                         for indexes of InnoDB table
      
      Fixes by replacing the PRNG that is used to pick random pages with a 
      better one. 
      
      Also adds a configuration option "innodb_use_legacy_cardinality_algorithm"
      to enable the fix only when the option is set.
      
      This patch is from http://bugs.mysql.com/file.php?id=11789
      4610c13a
  2. 23 Apr, 2009 1 commit
  3. 21 Apr, 2009 1 commit
    • Sergey Vojtovich's avatar
      BUG#36966 - mysqldump.test fails in pushbuild · f8b219ee
      Sergey Vojtovich authored
      mysqldump.test is designed to run with concurrent inserts
      disabled. It is disabling concurrent inserts at the very
      beginning of the test case, and re-enables them at the
      bottom of the test. But for some reason (likely incorrect
      merge) we enable concurrent inserts in the middle of the test.
      
      The problem is fixed by enabling concurrent inserts only
      at the bottom of the test case.
      f8b219ee
  4. 17 Apr, 2009 2 commits
    • Georgi Kodinov's avatar
      Bug #35087: Inserting duplicate values at one time with DES_ENCRYPT leads · 08044795
      Georgi Kodinov authored
        to wrong results
            
      3 problems found with DES_ENCRYPT/DES_DECRYPT :
      
      1. The max length was not calculated properly. Fixed in fix_length_and_dec()
      2. DES_ENCRYPT had a side effect of sometimes reallocating and changing 
      the value of its argument. Fixed by explicitly pre-allocating the necessary
      space to pad the argument with trailing '*' (stars) when calculating the 
      DES digest.
      3. in DES_ENCRYPT the string buffer for the result value was not 
      reallocated to the correct size and only string length was assigned to it. 
      Fixed by making sure there's enough space to hold the result.
      08044795
    • Sergey Glukhov's avatar
      Bug#44151 using handler commands on information_schema tables crashes server · ff923cc8
      Sergey Glukhov authored
      information schema tables are based on internal tmp tables which are removed
      after each statement execution. So HANDLER comands can not be used with
      information schema.
      
      
      mysql-test/r/handler.result:
        test result
      mysql-test/t/handler.test:
        test case
      sql/sql_handler.cc:
        information schema tables are based on internal tmp tables which are removed
        after each statement execution. So HANDLER comands can not be used with
        information schema.
      ff923cc8
  5. 16 Apr, 2009 2 commits
  6. 14 Apr, 2009 1 commit
  7. 09 Apr, 2009 6 commits
    • Luis Soares's avatar
      BUG#13684: SP: DROP PROCEDURE|FUNCTION IF EXISTS not binlogged if · 84ae9eca
      Luis Soares authored
      routine does not exist 
            
      There is an inconsistency with DROP DATABASE IF EXISTS, DROP TABLE IF
      EXISTS and DROP VIEW IF EXISTS: those are binlogged even if the DB or
      TABLE does not exist, whereas DROP PROCEDURE IF EXISTS does not. It
      would be nice or at least consistent if DROP PROCEDURE/STATEMENT
      worked the same too.
            
      Fixed DROP PROCEDURE|FUNCTION IF EXISTS by adding a call to
      mysql_bin_log.write in mysql_execute_command. Checked also if all 
      documented "DROP (...) IF EXISTS" get binlogged.
            
      NOTE: This is a 5.0 backport patch as requested by support.
      
      mysql-test/r/rpl_drop_if_exists.result:
        Result file for test case added.
      mysql-test/r/rpl_sp.result:
        Updated result file for existing test case that has now extra events in
        binary log (the ones from drop if exists procedure/function).
      mysql-test/t/rpl_drop_if_exists.test:
        Added test case for asserting validity of proposed patch.
      sql/sql_parse.cc:
        Added call mysql_bin_log.write when lex has drop_if_exists enabled for 
        stored procedures.
      84ae9eca
    • Sergey Glukhov's avatar
      auotmerge · 1db674f5
      Sergey Glukhov authored
      1db674f5
    • Sergey Glukhov's avatar
      Bug#43833 Simple INSERT crashes the server · 920abd58
      Sergey Glukhov authored
      The crash happens due to wrong 'digits' variable value(0),
      'digits' can not be 0, so the fix is use 1 as min allowed value.
      
      
      mysql-test/r/insert.result:
        test result
      mysql-test/t/insert.test:
        test case
      sql/field.cc:
        The crash happens due to wrong 'digits' variable value(0),
        'digits' can not be 0, so the fix is use 1 as min allowed value.
      920abd58
    • He Zhenxing's avatar
      3b4ec32d
    • Anurag Shekhar's avatar
      merging with 5.0-bugteam tree. · 16e078f5
      Anurag Shekhar authored
      16e078f5
    • He Zhenxing's avatar
  8. 08 Apr, 2009 3 commits
    • He Zhenxing's avatar
      auto merge · 1881ee2d
      He Zhenxing authored
      1881ee2d
    • Anurag Shekhar's avatar
      Bug #43950 myisamchk shows negative value for 'Max keyfile length' · dd0a6eb2
      Anurag Shekhar authored
      While printing the Max keyfile length 'llstr' call was used which 
      was treating the max_key_file_length as negative.
      
      Changing this to ullstr fixes the problem. 
      myisamchk output will differ in 32 bit and 64 bit Operating systems 
      so its not possible to have test case for this bug.
      
      
      myisam/myisamchk.c:
        Replaced llstr by ullstr, while converting 
        share->base.max_key_file_length-1 to string.
      dd0a6eb2
    • He Zhenxing's avatar
      Auto merge · 16641a88
      He Zhenxing authored
      16641a88
  9. 07 Apr, 2009 2 commits
    • Satya B's avatar
      merge to latest 5.0-bugteam · 55a149f2
      Satya B authored
      55a149f2
    • Satya B's avatar
      Fix for Bug #43973 - backup_myisam.test fails on 6.0-bugteam · 10350e20
      Satya B authored
            
      The test started failing following the push for BUG#41541.
      Some of the algorithms access bytes beyond the input data
      and this can affect up to one byte less than "word size"
      which is BITS_SAVED / 8. 
            
      Fixed by adding (BITS_SAVED / 8) -1 bytes to buffer size
      (i.e. Memory Segment #2) to avoid accessing un-allocated data.
      
      myisam/mi_packrec.c:
        Fixed _mi_read_pack_info() method to allocate (BITS_SAVED/8) - 1 
        bytes to the Memory Segment #2
      mysql-test/r/myisampack.result:
        Result file for BUG#43973
      mysql-test/t/myisampack.test:
        Testcase for BUG#43973
      10350e20
  10. 03 Apr, 2009 1 commit
    • Davi Arnaut's avatar
      Bug#43230: SELECT ... FOR UPDATE can hang with FLUSH TABLES WITH READ LOCK indefinitely · 72e97882
      Davi Arnaut authored
      The problem is that a SELECT .. FOR UPDATE statement might open
      a table and later wait for a impeding global read lock without
      noticing whether it is holding a table that is being waited upon
      the the flush phase of the process that took the global read
      lock.
      
      The same problem also affected the following statements:
      
      LOCK TABLES .. WRITE
      UPDATE .. SET (update and multi-table update)
      TRUNCATE TABLE ..
      LOAD DATA ..
      
      The solution is to make the above statements wait for a impending
      global read lock before opening the tables. If there is no
      impending global read lock, the statement raises a temporary
      protection against global read locks and progresses smoothly
      towards completion.
      
      Important notice: the patch does not try to address all possible
      cases, only those which are common and can be fixed unintrusively
      enough for 5.0.
      
      mysql-test/r/lock_multi.result:
        Add test case result for Bug#43230
      mysql-test/t/lock_multi.test:
        Add test case for Bug#43230
      sql/sql_lex.cc:
        Initialize flag.
      sql/sql_lex.h:
        Add a flag to the lexer.
      sql/sql_parse.cc:
        Wait for the global read lock is a write lock is going to be
        taken. The wait is done before opening tables.
      sql/sql_yacc.yy:
        Protect against the GRL if its a SELECT .. FOR UPDATE or LOCK TABLES
        .. WRITE statement.
      72e97882
  11. 02 Apr, 2009 3 commits
  12. 01 Apr, 2009 4 commits
    • Ignacio Galarza's avatar
      Bug#29248 - MyISAMchk & MyISAMpack failing with * wildcard on Windows platform · 209da010
      Ignacio Galarza authored
      - Link against setargv.obj for wild-card expansion.
      209da010
    • Bernt M. Johnsen's avatar
      Bug 43355 merged from 5.1 gca · ac808129
      Bernt M. Johnsen authored
      ac808129
    • Gleb Shchepa's avatar
      Backport bug #37348 fix 5.1 --> 5.0. · 02884a4d
      Gleb Shchepa authored
      Original commentary:
      
      Bug #37348: Crash in or immediately after JOIN::make_sum_func_list
                  
      The optimizer pulls up aggregate functions which should be aggregated in
      an outer select. At some point it may substitute such a function for a field
      in the temporary table. The setup_copy_fields function doesn't take this
      into account and may overrun the copy_field buffer.
                  
      Fixed by filtering out the fields referenced through the specialized
      reference for aggregates (Item_aggregate_ref).
      Added an assertion to make sure bugs that cause similar discrepancy 
      don't go undetected.
      
      
      mysql-test/r/func_group.result:
        Backport bug #37348 fix 5.1 --> 5.0.
      mysql-test/t/func_group.test:
        Backport bug #37348 fix 5.1 --> 5.0.
      sql/item.cc:
        Backport bug #37348 fix 5.1 --> 5.0.
      sql/item.h:
        Backport bug #37348 fix 5.1 --> 5.0.
      sql/sql_select.cc:
        Backport bug #37348 fix 5.1 --> 5.0.
      02884a4d
    • Georgi Kodinov's avatar
      merged 5.0-main -> 5.0-bugteam · 01e64735
      Georgi Kodinov authored
      01e64735
  13. 31 Mar, 2009 2 commits
  14. 30 Mar, 2009 3 commits
  15. 27 Mar, 2009 5 commits
    • Georgi Kodinov's avatar
      tree name changed · f56ad8c8
      Georgi Kodinov authored
      f56ad8c8
    • Georgi Kodinov's avatar
      fixed a compilation warning · 5f2bda83
      Georgi Kodinov authored
      5f2bda83
    • Staale Smedseng's avatar
      Merge from 5.0-bugteam · 2c65a31a
      Staale Smedseng authored
      2c65a31a
    • Alexey Kopytov's avatar
      Automerge. · dcac05be
      Alexey Kopytov authored
      dcac05be
    • Staale Smedseng's avatar
      Bug#39953 Triggers are not working properly with multi table · 50ed1ef7
      Staale Smedseng authored
      updates
      
      Attempt to execute trigger or stored function with multi-UPDATE
      which used - but didn't update - a table that was also used by
      the calling statement led to an error. Read-only reference to
      tables used in the calling statement should be allowed.
       
      This problem was caused by the fact that check for conflicting
      use of tables in SP/triggers was performed in open_tables(),
      and in case of multi-UPDATE we didn't know exact lock type at
      this stage.
      
      We solve the problem by moving this check to lock_tables(), so
      it can be performed after exact lock types for tables used by
      multi-UPDATE are determined.
      
      
      mysql-test/r/trigger.result:
        Results for the added test case is added.
      mysql-test/t/trigger.test:
        A new test case is added, verifying correct table multi-update
        conflict resolution, both read-only and write.
      sql/sql_base.cc:
        The check for conflicting use of tables in SP/triggers is moved
        to lock_tables(), to be performed after the exact lock types
        have been determined. Also, an assert is added to open_ltable()
        to ensure this func is not used in a prelocked context.
      50ed1ef7