1. 04 Sep, 2009 3 commits
    • Sergey Vojtovich's avatar
      BUG#46961 - archive engine loses rows during self joining select! · 542b9a04
      Sergey Vojtovich authored
      SELECT with join (not only self-join) from archive table may
      return incomplete result set, when result set size exceeds
      join buffer size.
      
      The problem was that archive row counter was initialzed too
      early, when ha_archive::info() method was called. Later,
      when optimizer exceeds join buffer, it attempts to reuse
      handler without calling ha_archive::info() again (which is
      correct).
      
      Fixed by moving row counter initialization from
      ha_archive::info() to ha_archive::rnd_init().
      
      mysql-test/r/archive.result:
        A test case for BUG#46961.
      mysql-test/t/archive.test:
        A test case for BUG#46961.
      storage/archive/ha_archive.cc:
        Since a cursor may get reused without a call to ::info(),
        move assignment of scan_rows to a proper place, that is
        ::rnd_init().
      542b9a04
    • V Narayanan's avatar
      Bug#45823 Assertion failure in file row/row0mysql.c line 1386 · 744f5739
      V Narayanan authored
      Inserting a negative value in the autoincrement column of a
      partitioned innodb table was causing the value of the auto
      increment counter to wrap around into a very large positive
      value. The consequences are the same as if a very large positive
      value was inserted into a column, e.g. reduced autoincrement
      range, failure to read autoincrement counter.
      
      The current patch ensures that before calculating the next
      auto increment value, the current value is within the positive
      maximum allowed limit.
      
      mysql-test/suite/parts/inc/partition_auto_increment.inc:
        Bug#45823 Assertion failure in file row/row0mysql.c line 1386
        
        Adds tests for performing insert,update and delete on a partition
        table with negative auto_increment values.
      mysql-test/suite/parts/r/partition_auto_increment_innodb.result:
        Bug#45823 Assertion failure in file row/row0mysql.c line 1386
        
        Result file for the innodb engine.
      mysql-test/suite/parts/r/partition_auto_increment_memory.result:
        Bug#45823 Assertion failure in file row/row0mysql.c line 1386
        
        Result file for the memory engine.
      mysql-test/suite/parts/r/partition_auto_increment_myisam.result:
        Bug#45823 Assertion failure in file row/row0mysql.c line 1386
        
        Result file for the myisam engine.
      mysql-test/suite/parts/r/partition_auto_increment_ndb.result:
        Bug#45823 Assertion failure in file row/row0mysql.c line 1386
        
        Result file for the ndb engine.
      mysql-test/suite/parts/t/partition_auto_increment_archive.test:
        Bug#45823 Assertion failure in file row/row0mysql.c line 1386
        
        Adds a variable that allows the Archive engine to skip tests
        that involve insertion of negative auto increment values.
      mysql-test/suite/parts/t/partition_auto_increment_blackhole.test:
        Bug#45823 Assertion failure in file row/row0mysql.c line 1386
        
        Adds a variable that allows the Blackhole engine to skip tests
        that involve insertion of negative auto increment values.
      sql/ha_partition.cc:
        Bug#45823 Assertion failure in file row/row0mysql.c line 1386
        
        Ensures that the current value is lesser than the upper limit
        for the type of the field before setting the next auto increment
        value to be calculated.
      sql/ha_partition.h:
        Bug#45823 Assertion failure in file row/row0mysql.c line 1386
        
        Modifies the set_auto_increment_if_higher function, to take
        into account negative auto increment values when doing a
        comparison.
      744f5739
    • unknown's avatar
      BUG#45581 Test rpl_row_sp006_InnoDB fails randomly: Unknown database 'mysqltest1' · e23e8753
      unknown authored
            
      Essentially, Bug#45574 results in this bug. The 'CREATE DATABASE IF NOT EXISTS' statement was not 
      binlogged, when the database has existed.
      Sometimes, the master and slaves become inconsistent. The "CREATE DATABASE
      IF NOT EXISTS mysqltest1" statement is not binlogged
      if the db 'mysqltest1' existed before the test case is executed. 
      So the db 'mysqltest1' can't be created on slave.
           
      Patch of Bug#45574 has resolved this problem. 
      But I think it is better to replace 'mysqltest1' by default db 'test'.
      e23e8753
  2. 03 Sep, 2009 4 commits
    • Satya B's avatar
      merge mysql-5.0-bugteam to mysql-5.1-bugteam · 39b211c6
      Satya B authored
      39b211c6
    • Satya B's avatar
      Fix for Bug#33785 - myisamchk show warning message · 22ec06de
      Satya B authored
      myisamchk tool generates warnings when run on an myisam files (.MYI or .MYD)
      This is because of the conversion of max_value for certain options in myisamchk 
      from singed long to unsigned long
      
      The max value for the options key_buffer_size, read_buffer_size, write_buffer
      _size and sort_buffer_size is given as (long) ~0L which becomes -1  when casted
      from signed long to longlong and then casted to ulonglong. When (ulonglong) -1 
      is compared with maximal value for GET_ULONG data type, we adjust it to 
      (ulonglong) ULONG_MAX and throw the warning.
      
      Fixed by using the right max size.
      
      Max values for the variables (from mysqld.cc)
      ----------------------------
      1. key_buffer_size
         5.0: ULONG_MAX
         5.1: SIZE_T_MAX
         6.0: SIZE_T_MAX
      
      2. read_buffer_size and write_buffer_size
         5.0: INT_MAX32
         5.1: INT_MAX32
         6.0: INT_MAX32
      
      3. sort_buffer_size (aka myisam_sort_buffer_size)
         5.0: UINT_MAX32
         5.1: ULONG_MAX
         6.0: ULONG_MAX
      
      Note: testcase not attached
      
      myisam/myisamchk.c:
        Bug#33785 - myisamchk show warning message
            
        Fixed the Max value for key_buffer_size, read_buffer_size, write_buffer_size and
        sort_buffer_size options
      22ec06de
    • Satya B's avatar
      merge mysql-5.0-bugteam to mysql-5.1-bugteam · 22086f0d
      Satya B authored
      22086f0d
    • Satya B's avatar
      Fix for BUG#46591 - .frm file isn't sync'd with sync_frm enabled for · 19e76565
      Satya B authored
                          CREATE TABLE...LIKE...
            
      The mysql server option 'sync_frm' is ignored when table is created with 
      syntax CREATE TABLE .. LIKE.. 
            
      Fixed by adding the MY_SYNC flag and calling my_sync() from my_copy() when
      the flag is set.
      
      In mysql_create_table(), when the 'sync_frm' is set, MY_SYNC flag is passed 
      to my_copy(). 
            
      Note: TestCase is not attached and can be tested manually using debugger.
      
      client/Makefile.am:
        BUG#46591 - .frm file isn't sync'd with sync_frm enabled for 
                    CREATE TABLE...LIKE...
            
        add my_sync to sources as it is used in my_copy() method
      include/my_sys.h:
        BUG#46591 - .frm file isn't sync'd with sync_frm enabled for 
                    CREATE TABLE...LIKE...
            
        MY_SYNC flag is added to call my_sync() method
      mysys/my_copy.c:
        BUG#46591 - .frm file isn't sync'd with sync_frm enabled for 
                    CREATE TABLE...LIKE...
            
        my_sync() is method is called when MY_SYNC is set in my_copy()
      sql/sql_table.cc:
        BUG#46591 - .frm file isn't sync'd with sync_frm enabled for 
                    CREATE TABLE...LIKE...
            
        Fixed mysql_create_like_table() to call my_sync() when opt_sync_frm variable
        is set
      19e76565
  3. 02 Sep, 2009 14 commits
  4. 01 Sep, 2009 5 commits
  5. 31 Aug, 2009 11 commits
  6. 30 Aug, 2009 3 commits
    • Staale Smedseng's avatar
      Merge from 5.1-bugteam · 001e9f14
      Staale Smedseng authored
      001e9f14
    • Alexey Kopytov's avatar
      Automerge. · 9aeb91d3
      Alexey Kopytov authored
      9aeb91d3
    • Alexey Kopytov's avatar
      Bug #46607: Assertion failed: (cond_type == Item::FUNC_ITEM) · 9620aec7
      Alexey Kopytov authored
                  results in server crash 
       
      check_group_min_max_predicates() assumed the input condition 
      item to be one of COND_ITEM, SUBSELECT_ITEM, or FUNC_ITEM. 
      Since a condition of the form "field" is also a valid condition 
      equivalent to "field <> 0", using such a condition in a query 
      where the loose index scan was chosen resulted in a debug 
      assertion failure. 
       
      Fixed by handling conditions of the FIELD_ITEM type in 
      check_group_min_max_predicates(). 
      
      mysql-test/r/group_min_max.result:
        Added a test case for bug #46607.
      mysql-test/t/group_min_max.test:
        Added a test case for bug #46607.
      sql/opt_range.cc:
        Handle conditions of the FUNC_ITEM type in 
        check_group_mix_max_predicates().
      9620aec7