1. 02 Aug, 2007 1 commit
    • unknown's avatar
      Fixed bug#28404. · c9049374
      unknown authored
      This patch adds cost estimation for the queries with ORDER BY / GROUP BY
      and LIMIT. 
      If there was a ref/range access to the table whose rows were required
      to be ordered in the result set the optimizer always employed this access
      though a scan by a different index that was compatible with the required 
      order could be cheaper to produce the first L rows of the result set.
      Now for such queries the optimizer makes a choice between the cheapest
      ref/range accesses not compatible with the given order and index scans
      compatible with it.
      
      
      mysql-test/r/distinct.result:
        Adjusted results for test cases affected fy the fix for bug #28404.
      mysql-test/r/endspace.result:
        Adjusted results for test cases affected fy the fix for bug #28404.
      mysql-test/r/group_by.result:
        Adjusted results for test cases affected fy the fix for bug #28404.
      mysql-test/r/group_min_max.result:
        Adjusted results for test cases affected fy the fix for bug #28404.
      mysql-test/r/innodb.result:
        Adjusted results for test cases affected fy the fix for bug #28404.
      mysql-test/r/innodb_mysql.result:
        Adjusted results for test cases affected fy the fix for bug #28404.
      mysql-test/r/merge.result:
        Adjusted results for test cases affected fy the fix for bug #28404.
      mysql-test/r/order_by.result:
        Added a test case for bug #28404.
      mysql-test/r/select_found.result:
        Adjusted results for test cases affected fy the fix for bug #28404.
      mysql-test/r/subselect.result:
        Adjusted results for test cases affected fy the fix for bug #28404.
      mysql-test/t/distinct.test:
        Changed a test case after adding the fix for bug #28404.
      mysql-test/t/order_by.test:
        Added a test case for bug #28404.
      sql/sql_select.cc:
        Fixed bug#28404.
        This patch adds cost estimation for the queries with ORDER BY / GROUP BY
        and LIMIT. 
        Now for such queries the optimizer makes a choice between the cheapest
        ref/range accesses not compatible with the given order and index scans
        compatible with it.
        
        Modified the function test_if_skip_sort_order to make the above mentioned
        choice cost based.
      sql/sql_select.h:
        Fixed bug#28404.
        This patch adds cost estimation for the queries with ORDER BY / GROUP BY
        and LIMIT. 
        Added a new field fot the JOIN_TAB structure.
      c9049374
  2. 27 Jul, 2007 10 commits
    • unknown's avatar
      Merge bk@192.168.21.1:mysql-5.1-opt · baf24e69
      unknown authored
      into  mysql.com:/home/hf/work/29878/my51-29878
      
      
      baf24e69
    • unknown's avatar
      Merge mysql.com:/home/hf/work/29878/my50-29878 · 8feaed2a
      unknown authored
      into  mysql.com:/home/hf/work/29878/my51-29878
      
      
      mysql-test/suite/rpl/r/rpl_session_var.result:
        Auto merged
      mysql-test/suite/rpl/t/rpl_session_var.test:
        Auto merged
      sql/item.cc:
        Auto merged
      sql/item.h:
        Auto merged
      sql/item_strfunc.h:
        Auto merged
      8feaed2a
    • unknown's avatar
      Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.1-opt · c40dabb6
      unknown authored
      into  magare.gmz:/home/kgeorge/mysql/autopush/B30000-5.1-opt
      
      
      c40dabb6
    • unknown's avatar
      Bug #30000: SHOW commands once again ends up in the · 82c87c0a
      unknown authored
       slow query log
      Disable the SHOW commands to appear in the show query
      log.
      Update the commands type array.
      
      
      mysql-test/r/show_check.result:
        Bug #30000: test case
      mysql-test/t/show_check.test:
        Bug #30000: test case
      sql/sql_parse.cc:
        Bug #30000: skip SHOW commands from the
        slow query log.
      82c87c0a
    • unknown's avatar
      fixing the 5.1-opt merge of the fix for bug 29571: · d4776340
      unknown authored
      cannot check the statments in the binlog for row based 
      replication.
      
      
      d4776340
    • unknown's avatar
      Bug #29878 Garbage data generation when executing SESSION_USER() on a slave. · d27bf14e
      unknown authored
      Item_func_user doesn't calculate anything in it's val_str() method,
      just returns saved str_value.
      Though Item::save_in_field method can destroy str_value, relying on
      val_str() return. As a result we get the garbage stored in field.
      
      We cannot use Item::save_in_field implementation for Item_func_user,
      reimplement it in simpler way.
      
      
      mysql-test/r/rpl_session_var.result:
        Bug #29878 Garbage data generation when executing SESSION_USER() on a slave.
        
        test result
      mysql-test/t/rpl_session_var.test:
        Bug #29878 Garbage data generation when executing SESSION_USER() on a slave.
        
        test case
      sql/item.cc:
        Bug #29878 Garbage data generation when executing SESSION_USER() on a slave.
        
        duplicating code moved to Item::save_str_in_field
      sql/item.h:
        Bug #29878 Garbage data generation when executing SESSION_USER() on a slave.
        
        duplicating code moved to Item::save_str_in_field
      sql/item_strfunc.h:
        Bug #29878 Garbage data generation when executing SESSION_USER() on a slave.
        
        Item_func_user::save_in_field implemented as simple storing str_value
      d27bf14e
    • unknown's avatar
    • unknown's avatar
      5.0-opt -> 5.1-opt merge of the test case for bug 29571: · 13c67912
      unknown authored
       - reset the logs before and after the test.
       - cleanup from the previous tests : use the correct schema.
      
      
      mysql-test/extra/rpl_tests/rpl_insert_delayed.test:
        5.0-opt -> 5.1-opt merge of the test case for bug 29571.
      mysql-test/suite/rpl/r/rpl_stm_insert_delayed.result:
        5.0-opt -> 5.1-opt merge of the test case for bug 29571.
      13c67912
    • unknown's avatar
      Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.1-opt · ebec4035
      unknown authored
      into  magare.gmz:/home/kgeorge/mysql/autopush/B30036-5.1-opt
      
      
      ebec4035
    • unknown's avatar
      Merge gleb.loc:/home/uchum/work/bk/5.0-opt · 30408a12
      unknown authored
      into  gleb.loc:/home/uchum/work/bk/5.1-opt
      
      
      sql/sql_insert.cc:
        Auto merged
      BitKeeper/deleted/.del-bdb.result:
        Auto merged
      BitKeeper/deleted/.del-ha_berkeley.cc:
        Auto merged
      BitKeeper/deleted/.del-rpl_insert_delayed.result:
        Auto merged
      mysql-test/extra/rpl_tests/rpl_insert_delayed.test:
        Auto merged
      sql/sql_select.cc:
        Merge with 5.0-opt.
      sql/table.cc:
        Merge with 5.0-opt.
      30408a12
  3. 26 Jul, 2007 8 commits
    • unknown's avatar
      Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · 1a6ced2c
      unknown authored
      into  mysql.com:/home/psergey/mysql-5.0-bdb-fix
      
      
      1a6ced2c
    • unknown's avatar
      BUG#28591: make the fix work for BDB tables too: · 9206f684
      unknown authored
       - make ha_berkeley::cmp_ref() take into account that auto-generated PKs 
         are stored in LSB-first order. 
       - Remove the temporary code that made the bugfix work for innodb only 
      
      
      mysql-test/r/bdb.result:
        Adjust test-results.
      sql/ha_berkeley.cc:
        BUG#28591: make the fix work for BDB tables too:
         - make ha_berkeley::cmp_ref() take into account that auto-generated PKs 
           are stored in LSB-first order.
      sql/sql_select.cc:
        BUG#28591: Remove "innodb only" clause as the fix now works for BDB too
      sql/table.cc:
        BUG#28591: Remove "innodb only" clause as the fix now works for BDB too
      9206f684
    • unknown's avatar
      Bug #30036: SHOW TABLE TYPES causes the debug client to crash · c7150fd8
      unknown authored
      SHOW TABLE TYPES is a (to be deprecated) synonym for 
      SHOW STORAGE ENGINES.
      Fixed to use the right schema table in addition to 
      issuing a warning.
      
      
      mysql-test/r/show_check.result:
        Bug #30036: test case
      mysql-test/t/show_check.test:
        Bug #30036: test case
      sql/sql_yacc.yy:
        Bug #30036: use the right schema table
      c7150fd8
    • unknown's avatar
    • unknown's avatar
      Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · 935ce762
      unknown authored
      into  magare.gmz:/home/kgeorge/mysql/autopush/B29571-5.0-opt
      
      
      sql/sql_insert.cc:
        Auto merged
      935ce762
    • unknown's avatar
      Bug #29571: INSERT DELAYED IGNORE written to binary log on · 5babac53
      unknown authored
       the master but on the slave
      
      MySQL can decide to "downgrade" a INSERT DELAYED statement
      to normal insert in certain situations.
      One such situation is when the slave is replaying a 
      replication feed.
      However INSERT DELAYED is logged even if there're no updates
      whereas the NORMAL INSERT is not logged in such cases.
      
      Fixed by always logging a "downgraded" INSERT DELAYED: even 
      if there were no updates.
      
      
      mysql-test/r/rpl_insert_delayed.result:
        Bug #29571: test case
      mysql-test/t/rpl_insert_delayed.test:
        Bug #29571: test case
      sql/sql_insert.cc:
        Bug #29571: log INSERT DELAYED even if it was 
        "downgraded" to INSERT (and there were no updates)
      5babac53
    • unknown's avatar
      Merge gleb.loc:/home/uchum/work/bk/5.0-opt · 5cb265d8
      unknown authored
      into  gleb.loc:/home/uchum/work/bk/5.1-opt
      
      
      mysql-test/t/create.test:
        Auto merged
      sql/field.cc:
        Auto merged
      sql/sql_base.cc:
        Auto merged
      sql/table.cc:
        Auto merged
      mysql-test/r/create.result:
        Merge with 5.0-opt.
      5cb265d8
    • unknown's avatar
      Merge gleb.loc:/home/uchum/work/bk/5.1 · 217a35d6
      unknown authored
      into  gleb.loc:/home/uchum/work/bk/5.1-opt
      
      
      mysql-test/r/sp.result:
        Auto merged
      mysql-test/t/create.test:
        Auto merged
      sql/field.cc:
        Auto merged
      sql/sql_base.cc:
        Auto merged
      sql/sql_lex.cc:
        Auto merged
      sql/sql_lex.h:
        Auto merged
      sql/table.cc:
        Auto merged
      mysql-test/r/create.result:
        Merge with 5.1 (main).
      217a35d6
  4. 25 Jul, 2007 5 commits
    • unknown's avatar
      table.cc, sql_select.cc: · ddd72899
      unknown authored
        Post-merge fix.
      
      
      sql/sql_select.cc:
        Post-merge fix.
      sql/table.cc:
        Post-merge fix.
      ddd72899
    • unknown's avatar
      sql_select.cc: · c5948832
      unknown authored
        Post-merge fix.
      
      
      sql/sql_select.cc:
        Post-merge fix.
      c5948832
    • unknown's avatar
      Merge gleb.loc:/home/uchum/work/bk/5.0 · 2df3b7b0
      unknown authored
      into  gleb.loc:/home/uchum/work/bk/5.0-opt
      
      
      mysql-test/t/create.test:
        Auto merged
      sql/field.cc:
        Auto merged
      sql/sql_base.cc:
        Auto merged
      sql/table.cc:
        Auto merged
      mysql-test/r/create.result:
        Merge with 5.0 (main).
      2df3b7b0
    • unknown's avatar
      Merge gleb.loc:/home/uchum/work/bk/5.0-opt · 21b83ab7
      unknown authored
      into  gleb.loc:/home/uchum/work/bk/5.1-opt
      
      
      mysql-test/r/having.result:
        Auto merged
      mysql-test/t/create.test:
        Auto merged
      mysql-test/t/having.test:
        Auto merged
      sql/field.cc:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      mysql-test/include/mix1.inc:
        Merge with 5.0-opt.
      mysql-test/r/create.result:
        Merge with 5.0-opt.
      mysql-test/r/innodb_mysql.result:
        Merge with 5.0-opt.
      mysql-test/r/type_enum.result:
        Merge with 5.0-opt.
      mysql-test/t/type_enum.test:
        Merge with 5.0-opt.
      sql/filesort.cc:
        Merge with 5.0-opt.
      sql/sql_base.cc:
        Merge with 5.0-opt.
      sql/table.cc:
        Merge with 5.0-opt.
      storage/innobase/handler/ha_innodb.cc:
        Merge with 5.0-opt.
      21b83ab7
    • unknown's avatar
      Merge gleb.loc:/home/uchum/work/bk/4.1-opt · 0784d924
      unknown authored
      into  gleb.loc:/home/uchum/work/bk/5.0-opt
      
      
      0784d924
  5. 24 Jul, 2007 6 commits
    • unknown's avatar
      Merge bodhi.(none):/opt/local/work/mysql-5.0-runtime · 6d0e3441
      unknown authored
      into  bodhi.(none):/opt/local/work/mysql-5.1-runtime
      
      
      6d0e3441
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime · 8ed01f83
      unknown authored
      into  bodhi.(none):/opt/local/work/mysql-5.1-runtime
      
      
      8ed01f83
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.1 · 2a7d2030
      unknown authored
      into  bodhi.(none):/opt/local/work/mysql-5.1-runtime
      
      
      2a7d2030
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.0 · 607ab14c
      unknown authored
      into  bodhi.(none):/opt/local/work/mysql-5.0-runtime
      
      
      607ab14c
    • unknown's avatar
      Bug#15130: CREATE .. SELECT was denied to use advantages of the SQL_BIG_RESULT. · c4d53e31
      unknown authored
      When the SQL_BIG_RESULT flag is specified SELECT should store items from the
      select list in the filesort data and use them when sending to a client.
      The get_addon_fields function is responsible for creating necessary structures
      for that. But this function was allowed to do so only for SELECT and
      INSERT .. SELECT queries. This makes the SQL_BIG_RESULT useless for
      the CREATE .. SELECT queries.
      
      Now the get_addon_fields allows storing select list items in the filesort
      data for the CREATE .. SELECT queries.
      
      
      mysql-test/t/create.test:
        Added a test case for the bug#15130: CREATE .. SELECT was denied to use
        advantages of the SQL_BIG_RESULT.
      mysql-test/r/create.result:
        Added a test case for the bug#15130: CREATE .. SELECT was denied to use
        advantages of the SQL_BIG_RESULT.
      sql/filesort.cc:
        Bug#15130: CREATE .. SELECT was denied to use advantages of the SQL_BIG_RESULT.
        Now the get_addon_fields allows storing select list items in the filesort
        data for the CREATE .. SELECT queries.
      c4d53e31
    • unknown's avatar
      Bug#29993 (Default value of log_output should be 'FILE', not 'TABLE') · 20b9d9bb
      unknown authored
      Changed the default location of the log output to LOG_FILE,
      for backward compatibility with MySQL 5.0
      
      
      mysql-test/r/log_state.result:
        Changed the default location of the log output to LOG_FILE,
        for backward compatibility with MySQL 5.0
      sql/set_var.cc:
        Changed the default location of the log output to LOG_FILE,
        for backward compatibility with MySQL 5.0
      20b9d9bb
  6. 23 Jul, 2007 5 commits
    • unknown's avatar
      coding style fix : Index_hint · 54c97429
      unknown authored
      54c97429
    • unknown's avatar
      Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · c29002a5
      unknown authored
      into  magare.gmz:/home/kgeorge/mysql/autopush/B29644-5.0-opt
      
      
      sql/ha_innodb.cc:
        Auto merged
      sql/sql_base.cc:
        Auto merged
      mysql-test/r/innodb_mysql.result:
        5.0-opt merge
      mysql-test/t/innodb_mysql.test:
        5.0-opt merge
      c29002a5
    • unknown's avatar
      Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · f76d006a
      unknown authored
      into  olga.mysql.com:/home/igor/mysql-5.0-opt
      
      
      f76d006a
    • unknown's avatar
      table.cc, sql_select.cc: · c38fa3f3
      unknown authored
        Limit the fix for bug 28591 to InnoDB only
      
      
      sql/sql_select.cc:
        Limit the fix for bug 28591 to InnoDB only
      sql/table.cc:
        Limit the fix for bug 28591 to InnoDB only
      c38fa3f3
    • unknown's avatar
      Fixed bug #29611. · d50caace
      unknown authored
      If a primary key is defined over column c of enum type then 
      the EXPLAIN command for a look-up query of the form
        SELECT * FROM t WHERE c=0
      said that the query was with an impossible where condition though the
      query correctly returned non-empty result set when the table indeed 
      contained rows with error empty strings for column c. 
      
      This kind of misbehavior was due to a bug in the function 
      Field_enum::store(longlong,bool) that erroneously returned 1 if
      the the value to be stored was equal to 0. 
      Note that the method 
      Field_enum::store(const char *from,uint length,CHARSET_INFO *cs)
      correctly returned 0 if a value of the error empty string 
      was stored. 
      
      
      mysql-test/r/type_enum.result:
        Added a test case for bug #29661.
      mysql-test/t/type_enum.test:
        Added a test case for bug #29661.
      sql/field.cc:
        Fixed bug #29611.
        If a primary key was defined over column c of enum type then 
        the EXPLAIN command for a look-up query of the form
          SELECT * FROM t WHERE c=0
        said that the query was with an impossible where condition though the
        query correctly returned non-empty result set when the table indeed 
        contained rows with error empty strings for column c. 
        
        This kind of misbehavior was due to a bug in the function 
        Field_enum::store(longlong,bool) that erroneously returned 1 if
        the the value to be stored was equal to 0. 
        Note that the method 
        Field_enum::store(const char *from,uint length,CHARSET_INFO *cs)
        correctly returned 0 if a value of the error empty string 
        was stored.
      d50caace
  7. 22 Jul, 2007 5 commits