1. 25 Apr, 2008 1 commit
    • unknown's avatar
      Fixed bug#36006: Optimizer does table scan for SELECT COUNT(*) · 5b8cdbf4
      unknown authored
                       for ENGINE=MRG_MYISAM (should be optimized out).
      
      Before WL#3281 MERGE engine had the HA_NOT_EXACT_COUNT flag
      unset, and it worked with COUNT optimization as desired.
      After the removal of the HA_NOT_EXACT_COUNT flag neither
      HA_STATS_RECORDS_IS_EXACT (opposite to former HA_NOT_EXACT_COUNT
      flag) nor modern HA_HAS_RECORDS flag were not added to MERGE
      table flag mask.
      
      1. The HA_HAS_RECORDS table flag has been set.
      2. The ha_myisammrg::records method has been overridden to
         calculate total number of records in underlying tables.
      
      
      
      storage/myisammrg/myrg_records.c:
        Fixed bug#36006: Optimizer does table scan for select count(*).
        The myrg_records function has been added to calculate total number
        of records in underlying tables.
      include/myisammrg.h:
        Fixed bug#36006: Optimizer does table scan for select count(*).
        The myrg_records function declaration has been added.
      mysql-test/r/merge.result:
        Added test case for bug#36006.
      mysql-test/t/merge.test:
        Added test case for bug#36006.
      storage/myisammrg/CMakeLists.txt:
        Fixed bug#36006: Optimizer does table scan for select count(*).
        New myrg_records.c file has been added.
      storage/myisammrg/Makefile.am:
        Fixed bug#36006: Optimizer does table scan for select count(*).
        New myrg_records.c file has been added.
      storage/myisammrg/ha_myisammrg.cc:
        Fixed bug#36006: Optimizer does table scan for select count(*).
        The ha_myisammrg::records method has been overridden.
      storage/myisammrg/ha_myisammrg.h:
        Fixed bug#36006: Optimizer does table scan for select count(*).
        1. The HA_HAS_RECORDS table flag has been set.
        2. The ha_myisammrg::records method has been overridden.
      5b8cdbf4
  2. 23 Apr, 2008 3 commits
    • unknown's avatar
      Merge host.loc:/home/uchum/work/5.0-bugteam · 304c4381
      unknown authored
      into  host.loc:/home/uchum/work/5.1-bugteam
      
      
      mysql-test/r/subselect.result:
        Merge with 5.0-bugteam (bug#36139).
      mysql-test/t/subselect.test:
        Merge with 5.0-bugteam (bug#36139).
      304c4381
    • unknown's avatar
      subselect.test, subselect.result: · 415112a9
      unknown authored
        Post-commit minor cleanup of testcase (bug#36139).
      
      
      mysql-test/r/subselect.result:
        Post-commit minor cleanup of testcase (bug#36139).
      mysql-test/t/subselect.test:
        Post-commit minor cleanup of testcase (bug#36139).
      415112a9
    • unknown's avatar
      Merge host.loc:/home/uchum/work/5.0-bugteam · e3ed2f88
      unknown authored
      into  host.loc:/home/uchum/work/5.1-bugteam
      
      
      mysql-test/r/ctype_gbk.result:
        Auto merged
      mysql-test/r/subselect3.result:
        Auto merged
      mysql-test/t/subselect3.test:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      strings/ctype-big5.c:
        Merge with 5.0-bugteam (bug#35993).
      strings/ctype-gbk.c:
        Merge with 5.0-bugteam (bug#35993).
      e3ed2f88
  3. 22 Apr, 2008 3 commits
    • unknown's avatar
      Merge host.loc:/home/uchum/work/5.0-bugteam-35993 · c2d1ac6e
      unknown authored
      into  host.loc:/home/uchum/work/5.0-bugteam
      
      
      c2d1ac6e
    • unknown's avatar
      Fixed bug#36005: server crashes inside NOT IN clause subquery with · 73f7de59
      unknown authored
                       impossible WHERE/HAVING clause
                       (subselect_single_select_engine::exec).
      
      Allocation and initialization of joined table list t1, t2... of
      subqueries like:
      
          NOT IN (SELECT ... FROM t1,t2,... WHERE 0)
      
      is optimized out, however server tries to traverse this list.
      
      
      mysql-test/r/subselect3.result:
        Added test case for bug#36005.
      mysql-test/t/subselect3.test:
        Added test case for bug#36005.
      sql/sql_select.cc:
        Fixed bug#36005.
        
        1. JOIN::prepare initializes JOIN::table counter (actually a size
           of the JOIN::join_tab array) and sets it to a number of joined tables.
        
        2. The make_join_statistics function (when called from JOIN::optimize)
           allocates and fills the JOIN::join_tab array.
           However, when optimizing subselect has impossible (definite false)
           WHERE or HAVING clause, optimizer skips call to make_join_statistics
           and leaves JOIN::join_tab == NULL.
        
        3. subselect_single_select_engine::exec does traversal of the JOIN::join_tab
           array and the server dies because array is not allocated but array
           counter is greater than 0.
        
        The JOIN::optimize method has been modified to reset the JOIN::table
        counter to 0 in cause of impossible WHERE/HAVING clause.
      73f7de59
    • unknown's avatar
      Fixed bug #35993: memory corruption and crash with multibyte conversion. · d8ebf276
      unknown authored
      Grouping or ordering of long values in not indexed BLOB/TEXT columns
      with GBK or BIG5 charsets crashes the server.
      
      MySQL server uses sorting (the filesort procedure) in the temporary
      table to evaluate the GROUP BY clause in case of lack of suitable index.
      That procedure takes into account only first @max_sort_length bytes
      (system variable, usually 1024) of TEXT/BLOB sorting key string.
      The my_strnxfrm_gbk and my_strnxfrm_big5 fill temporary keys
      with data of whole blob length instead of @max_sort_length bytes
      length. That buffer overrun has been fixed.
      
      
      mysql-test/r/ctype_gbk.result:
        Added test case for bug #35993.
      mysql-test/t/ctype_gbk.test:
        Added test case for bug #35993.
      strings/ctype-big5.c:
        Fixed bug #35993: memory corruption and crash with multibyte conversion.
        
        Buffer overrun has been fixed in the my_strnxfrm_big5 function.
      strings/ctype-gbk.c:
        Fixed bug #35993: memory corruption and crash with multibyte conversion.
        
        Buffer overrun has been fixed in the my_strnxfrm_gbk function.
      d8ebf276
  4. 21 Apr, 2008 2 commits
    • unknown's avatar
      Merge mysql.com:/home/psergey/mysql-5.0-bugteam · 6b4179ec
      unknown authored
      into  mysql.com:/home/psergey/mysql-5.1-bugteam
        BUG#36139: manual merge
      
      
      sql/item.cc:
        Auto merged
      mysql-test/r/subselect.result:
        BUG#36139: Manual merge
      mysql-test/t/subselect.test:
        BUG#36139: Manual merge
      6b4179ec
    • unknown's avatar
      BUG#36139 "float, zerofill, crash with subquery" · 1c1f0a62
      unknown authored
      - Make convert_zerofill_number_to_string() take into account that the 
        constant it is converting may evaluate to NULL.
      
      
      mysql-test/r/subselect.result:
        BUG#36139 "float, zerofill, crash with subquery"
        - Testcase
      mysql-test/t/subselect.test:
        BUG#36139 "float, zerofill, crash with subquery"
        - Testcase
      1c1f0a62
  5. 01 Apr, 2008 6 commits
  6. 31 Mar, 2008 12 commits
  7. 30 Mar, 2008 3 commits
  8. 29 Mar, 2008 10 commits
    • unknown's avatar
      Bug #35675 reset master finds assert if a binlog file can not be deleted · 2a001d53
      unknown authored
      If a binlog file is manually replaced with a namesake directory the internal purging did
      not handle the error of deleting the file so that eventually
      a post-execution guards fires an assert.
      
      Fixed with reusing a snippet of code for bug@18199 to tolerate lack of the file but no other error 
      at an attempt to delete it.
      The same applied to the index file deletion.
      
      The cset carries pieces of manual merging.
      
      
      mysql-test/r/binlog_index.result:
        new results
      mysql-test/r/ctype_big5.result:
        results changed
      mysql-test/suite/binlog/r/binlog_auto_increment_bug33029.result:
        new results
      mysql-test/suite/binlog/r/binlog_stm_blackhole.result:
        new results
      mysql-test/suite/binlog/t/binlog_auto_increment_bug33029.test:
        cleanup. still todo: to let the test run multiple times w/o restarting the server (just ./mtr test)
      mysql-test/suite/rpl/r/rpl_stm_auto_increment_bug33029.result:
        results changed
      mysql-test/suite/rpl/t/rpl_stm_auto_increment_bug33029.test:
        guarding the test with statement format condition as the logics of the test requires
      sql/log.cc:
        two changes. One for the bug, other manual merge.
        The bug change needs MYF(0) to pass to my_delete because not all error out of the function
        are critical. The finer check is done on the caller of my_delete similarly how it was implemented
        for bug@18199 fixes. Non-existance of a file is not a critical error.
      sql/sql_class.cc:
        manual merge, removing extra automatically brought hunk.
      2a001d53
    • unknown's avatar
      Merge macbook.gmz:/Users/kgeorge/mysql/work/pb-5.0-bugteam · 08acf2ed
      unknown authored
      into  macbook.gmz:/Users/kgeorge/mysql/work/pb-5.1-bugteam
      
      
      mysys/mf_keycache.c:
        null-merge
      sql/item_func.cc:
        null-merge
      sql/lock.cc:
        null-merge
      sql/sql_analyse.cc:
        null-merge
      storage/csv/ha_tina.cc:
        null-merge
      storage/myisam/mi_check.c:
        null-merge
      storage/myisam/mi_keycache.c:
        null-merge
      08acf2ed
    • unknown's avatar
      fixed warnings from the fix of 26243 · 11714e68
      unknown authored
      11714e68
    • unknown's avatar
      Merge macbook.gmz:/Users/kgeorge/mysql/work/pb-5.0-bugteam · 96704ae4
      unknown authored
      into  macbook.gmz:/Users/kgeorge/mysql/work/pb-5.1-bugteam
      
      
      BitKeeper/deleted/.del-ha_berkeley.cc:
        null-merge
      extra/charset2html.c:
        Auto merged
      sql/mysqld.cc:
        null-merge
      sql/sql_union.cc:
        null-merge
      96704ae4
    • unknown's avatar
      8ae5aa3b
    • unknown's avatar
      Merge mysql1000.(none):/home/andrei/MySQL/MERGE/5.0-main2rpl · 6630d2e1
      unknown authored
      into  mysql1000.(none):/home/andrei/MySQL/MERGE/5.1-main2rpl
      
      
      BitKeeper/deleted/.del-binlog_killed_simulate.result:
        Auto merged
      BitKeeper/deleted/.del-show_binlog_events.inc:
        Auto merged
      mysql-test/suite/rpl/r/rpl_user.result:
        Auto merged
      storage/blackhole/ha_blackhole.cc:
        Auto merged
      BitKeeper/deleted/.del-show_binary_logs.inc:
        Delete: mysql-test/include/show_binary_logs.inc
      mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result:
        manual merge ul.
      mysql-test/extra/binlog_tests/blackhole.test:
        manual merge
      mysql-test/suite/binlog/r/binlog_stm_blackhole.result:
        manual merge
      sql/log.cc:
        manual merge
      sql/share/errmsg.txt:
        manual merge
      sql/sql_class.cc:
        manual merge
      6630d2e1
    • unknown's avatar
      Merge mysql1000.(none):/home/andrei/MySQL/BARE/mysql-5.1 · cfc42097
      unknown authored
      into  mysql1000.(none):/home/andrei/MySQL/MERGE/5.1-main2rpl
      
      
      client/mysqltest.c:
        Auto merged
      mysql-test/t/disabled.def:
        Auto merged
      sql/slave.cc:
        Auto merged
      sql/slave.h:
        Auto merged
      sql/sql_class.cc:
        Auto merged
      cfc42097
    • unknown's avatar
      Fixing rpl suite disabled.def: rpl_stm_extraColmaster_ndb does not exist in the suite. · fdb9d029
      unknown authored
      
      mysql-test/suite/rpl/t/disabled.def:
        removing the line because there is no such test in the suite anymore.
      fdb9d029
    • unknown's avatar
      Merge macbook.gmz:/Users/kgeorge/mysql/work/pb-5.0-bugteam · 4795e493
      unknown authored
      into  macbook.gmz:/Users/kgeorge/mysql/work/pb-5.1-bugteam
      
      
      configure.in:
        null merge
      libmysql/libmysql.c:
        null merge
      sql/ha_ndbcluster.cc:
        null merge
      sql/ha_ndbcluster_cond.cc:
        null merge
      sql-common/client.c:
        null merge
      storage/federated/ha_federated.cc:
        null merge
      storage/heap/hp_test2.c:
        SCCS merged
      storage/innobase/handler/ha_innodb.cc:
        null merge
      storage/myisam/mi_check.c:
        null merger
      storage/myisam/mi_delete.c:
        null merge
      storage/myisam/mi_dynrec.c:
        null merge
      storage/myisam/mi_key.c:
        null merge
      storage/myisam/mi_open.c:
        null merge
      storage/myisam/mi_packrec.c:
        null merge
      storage/myisam/mi_page.c:
        null merge
      storage/myisam/mi_search.c:
        null merge
      storage/myisam/mi_statrec.c:
        null merge
      storage/myisam/mi_test1.c:
        SCCS merged
      storage/myisam/mi_test2.c:
        null merge
      storage/myisam/mi_test3.c:
        SCCS merged
      storage/myisam/mi_write.c:
        null merge
      storage/myisammrg/myrg_rkey.c:
        null merge
      storage/ndb/src/ndbapi/DictCache.cpp:
        null merge
      storage/ndb/src/ndbapi/NdbBlob.cpp:
        null merge
      storage/ndb/src/ndbapi/NdbOperationDefine.cpp:
        null merge
      storage/ndb/src/ndbapi/NdbOperationInt.cpp:
        null merge
      storage/ndb/src/ndbapi/NdbOperationSearch.cpp:
        null merge
      4795e493
    • unknown's avatar
      18a01ce9