1. 27 Sep, 2007 5 commits
    • unknown's avatar
      Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.1-opt · 6127292b
      unknown authored
      into  magare.gmz:/home/kgeorge/mysql/autopush/B30468-5.1-opt
      
      6127292b
    • unknown's avatar
      merged the fix for bug 30468 to 5.1-opt · f576b09d
      unknown authored
      
      mysql-test/t/grant2.test:
        Auto merged
      sql/sql_acl.h:
        Auto merged
      sql/sql_base.cc:
        Auto merged
      f576b09d
    • unknown's avatar
      Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · cadf9e16
      unknown authored
      into  magare.gmz:/home/kgeorge/mysql/autopush/B30468-5.0-opt
      
      
      sql/sql_base.cc:
        Auto merged
      sql/sql_insert.cc:
        Auto merged
      cadf9e16
    • unknown's avatar
      Bug #30468: column level privileges not respected when joining tables · 3f11d1b1
      unknown authored
      When expanding a * in a USING/NATURAL join the check for table access
      for both tables in the join was done using the grant information of the
      first one.
      Fixed by getting the grant information for the current table while 
      iterating through the columns of the join.
      
      
      mysql-test/r/grant2.result:
        Bug #30468: test case
      mysql-test/t/grant2.test:
        Bug #30468: test case
      sql/sql_acl.cc:
        Bug #30468: correctly check column grants
      sql/sql_acl.h:
        Bug #30468: correctly check column grants
      sql/sql_base.cc:
        Bug #30468: correctly check column grants
      sql/sql_insert.cc:
        Bug #30468: correctly check column grants
      3f11d1b1
    • unknown's avatar
      mysqlslap.result, mysqlslap.test: · 9768ecb5
      unknown authored
        Post-commit fix.
      
      
      mysql-test/t/mysqlslap.test:
        Post-commit fix.
      mysql-test/r/mysqlslap.result:
        Post-commit fix.
      9768ecb5
  2. 26 Sep, 2007 5 commits
    • unknown's avatar
      Merge gshchepa@bk-internal.mysql.com:/users/gshchepa/5.1-opt-31075 · 706b7d87
      unknown authored
      into  gleb.loc:/home/uchum/work/bk/5.1-opt
      
      706b7d87
    • unknown's avatar
      Merge gleb.loc:/home/uchum/work/bk/5.1-opt-29985 · a4a17920
      unknown authored
      into  gleb.loc:/home/uchum/work/bk/5.1-opt
      
      a4a17920
    • unknown's avatar
      merge of the fix for bug 27802 & 27216 to 5.1-opt · 05d767db
      unknown authored
      
      mysql-test/r/view.result:
        merge of the fix for bug 27802 to 5.1
      sql/item_cmpfunc.h:
        merge of the fix for bug 27216 to 5.1
      sql/sql_insert.cc:
        merge of the fix for bug 27216 to 5.1
      sql/sql_lex.h:
        merge of the fix for bug 27802 to 5.1
      sql/sql_select.cc:
        merge of the fix for bug 27802 to 5.1
      sql/table.h:
        merge of the fix for bug 27802 to 5.1
      05d767db
    • unknown's avatar
      merged bug 28702 5.0-opt->5.1-opt · baaff867
      unknown authored
      
      mysql-test/r/view.result:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      sql/sql_view.cc:
        Auto merged
      sql/table.h:
        Auto merged
      baaff867
    • unknown's avatar
      Fixed bug #31075. · 508e2bb9
      unknown authored
      The `SELECT col FROM t WHERE col NOT IN (col, ...) GROUP BY col'
      crashed in the range optimizer.
      
      The get_func_mm_tree function has been modified to check the
      Item_func_in::array field for the NULL value before using of that
      value.
      
      
      sql/opt_range.cc:
        Fixed bug #31075.
        The get_func_mm_tree function has been modified to check the
        Item_func_in::array field for the NULL value before using of that
        value.
      mysql-test/t/func_in.test:
        Added test case for bug #31075.
      mysql-test/r/func_in.result:
        Added test case for bug #31075.
      508e2bb9
  3. 24 Sep, 2007 4 commits
    • unknown's avatar
      Merge sunlight.local:/local_work/27216-bug-5.0-opt-mysql · 29da4baf
      unknown authored
      into  sunlight.local:/local_work/merge-5.1-opt-mysql
      
      
      libmysql/libmysql.c:
        Auto merged
      mysql-test/r/date_formats.result:
        Auto merged
      mysql-test/r/insert_select.result:
        Auto merged
      mysql-test/t/insert_select.test:
        Auto merged
      sql/item_func.cc:
        Auto merged
      sql/item_func.h:
        Auto merged
      sql/item_timefunc.cc:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      sql/protocol.cc:
        Auto merged
      sql/sql_class.h:
        Auto merged
      mysql-test/r/type_datetime.result:
        Manually merged
      mysql-test/t/type_datetime.test:
        Manually merged
      sql/item_cmpfunc.cc:
        Manually merged
      sql/item_cmpfunc.h:
        Manually merged
      sql/sql_insert.cc:
        Manually merged
      29da4baf
    • unknown's avatar
      Bug #28702: VIEWs defined with USE/FORCE KEY ignore that request · 6c3aa88e
      unknown authored
      When storing the VIEW the CREATE VIEW command is reconstructed 
      from the parse tree. While constructing the command string
      the index hints specified should also be printed.
      Fixed by adding code to print the index hints when printing a 
      table in the FROM clause.
      
      
      mysql-test/r/view.result:
        Bug #28702: test case
      mysql-test/t/view.test:
        Bug #28702: test case
      sql/sql_select.cc:
        Bug #28702: preserve index hints in a VIEW definition.
      sql/table.h:
        Bug #28702: preserve index hints in a VIEW definition.
      6c3aa88e
    • unknown's avatar
      merging bug 28701 to 5.1-opt · ba5fd4e7
      unknown authored
      ba5fd4e7
    • unknown's avatar
      merge of bug 28701 5.0-opt -> 5.1-opt · 68bca00b
      unknown authored
      
      sql/sql_view.cc:
        Auto merged
      68bca00b
  4. 22 Sep, 2007 4 commits
    • unknown's avatar
      Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · b85a512e
      unknown authored
      into  macbook.local:/Users/kgeorge/mysql/autopush/B28701-merged-5.0-opt
      
      b85a512e
    • unknown's avatar
      Merge macbook.local:/Users/kgeorge/mysql/work/B28701-5.0-opt · 92052e4f
      unknown authored
      into  macbook.local:/Users/kgeorge/mysql/work/B28701-merged-5.0-opt
      
      
      sql/sql_view.cc:
        Auto merged
      mysql-test/r/view.result:
        merge with 5.0-opt
      mysql-test/t/view.test:
        merge with 5.0-opt
      92052e4f
    • unknown's avatar
      Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · 9f7d7c8f
      unknown authored
      into  sunlight.local:/local_work/27216-bug-5.0-opt-mysql
      
      
      sql/sql_insert.cc:
        Auto merged
      9f7d7c8f
    • unknown's avatar
      Bug#27216: functions with parameters of different date types may return wrong · f8321b5a
      unknown authored
      type of the result.
      
      There are several functions that accept parameters of different types.
      The result field type of such functions was determined based on
      the aggregated result type of its arguments. As the DATE and the DATETIME
      types are represented by the STRING type, the result field type
      of the affected functions was always STRING for DATE/DATETIME arguments.
      The affected functions are COALESCE, IF, IFNULL, CASE, LEAST/GREATEST, CASE.
      
      Now the affected functions aggregate the field types of their arguments rather
      than their result types and return the result of aggregation as their result
      field type.
      The cached_field_type member variable is added to the number of classes to
      hold the aggregated result field type.
      The str_to_date() function's result field type now defaults to the
      MYSQL_TYPE_DATETIME.
      The agg_field_type() function is added. It aggregates field types with help
      of the Field::field_type_merge() function.
      The create_table_from_items() function now uses the 
      item->tmp_table_field_from_field_type() function to get the proper field
      when the item is a function with a STRING result type.
      
      
      libmysql/libmysql.c:
        Bug#27216: functions with parameters of different date types may return wrong
        type of the result.
        The client library now accepts the NEWDATE type as a string.
      sql/item_cmpfunc.cc:
        Bug#27216: functions with parameters of different date types may return wrong
        type of the result.
        Now the fix_length_and_dec functions of the
        Item_func_ifnull,Item_func_if, Item_func_case, Item_func_coalesce
        classes are use agg_field_type function to find out the type of their 
        result field.
      sql/item_cmpfunc.h:
        Bug#27216: functions with parameters of different date types may return wrong
        type of the result.
        The cached_field type is added to the Item_func_case, Item_func_if and
        Item_func_coalesce classes.
        The field_type function is added to the Item_func_ifnull, Item_func_if,
        Item_func_coalesce, Item_func_case classes.
      sql/item_func.cc:
        Bug#27216: functions with parameters of different date types may return wrong
        type of the result.
        The Item_func_min_max::fix_length_and_dec function now uses the agg_field_type
        function to find out the correct type of the result field.
      sql/item_func.h:
        Bug#27216: functions with parameters of different date types may return wrong
        type of the result.
        The cached_field_type variable is added to the Item_func_min_max class.
      sql/item_timefunc.cc:
        Bug#27216: functions with parameters of different date types may return wrong
        type of the result.
        The result of the str_to_date function now defaults to the
        DATETIME type.
      sql/mysql_priv.h:
        Bug#27216: functions with parameters of different date types may return wrong
        type of the result.
        The prototype of the agg_field_type function is added.
      sql/protocol.cc:
        Bug#27216: functions with parameters of different date types may return wrong
        type of the result.
        The Protocol_simple::store function is now used to store fields of NEWDATE type.
      sql/sql_insert.cc:
        Bug#27216: functions with parameters of different date types may return wrong
        type of the result.
        The create_table_from_items function now uses the
        tmp_table_field_from_field_type function to get field for items with the
        STRING result type.
      mysql-test/r/date_formats.result:
        A test case result corrected after fixing bug#27216.
      mysql-test/r/type_datetime.result:
        Added a test case for the bug#27216: functions with parameters of different
        date types may return wrong type of the result.
      mysql-test/t/type_datetime.test:
        Added a test case for the bug#27216: functions with parameters of different
        date types may return wrong type of the result.
      f8321b5a
  5. 21 Sep, 2007 3 commits
    • unknown's avatar
      fixed warnings by bug 30639 · 6c509577
      unknown authored
      6c509577
    • unknown's avatar
      2d40efbf
    • unknown's avatar
      Bug#30384: Having SQL_BUFFER_RESULT option in the CREATE .. KEY(..) .. SELECT · b6333a8c
      unknown authored
      led to creating corrupted index.
      
      While execution of the  CREATE .. SELECT SQL_BUFFER_RESULT statement the 
      engine->start_bulk_insert function was called twice. On the first call
      On the first call MyISAM disabled all non-unique indexes and on the second
      call it decides to not re-enable them because all indexes was disabled.
      Due to this no indexes was actually created during CREATE TABLE thus
      producing crashed table.
      
      Now the select_inset class has is_bulk_insert_mode flag which prevents
      calling the start_bulk_insert function twice.
      The flag is set in the select_create::prepare, select_insert::prepare2
      functions and the select_insert class constructor.
      The flag is reset in the select_insert::send_eof function.
      
      
      mysql-test/t/insert_select.test:
        A test case is added for the bug#30384: Having SQL_BUFFER_RESULT option in the
        CREATE .. KEY(..) .. SELECT led to creating corrupted index.
      mysql-test/r/insert_select.result:
        A test case is added for the bug#30384: Having SQL_BUFFER_RESULT option in the 
        CREATE .. KEY(..) .. SELECT led to creating corrupted index.
      sql/sql_class.h:
        Bug#30384: Having SQL_BUFFER_RESULT option in the CREATE .. KEY(..) .. SELECT
        led to creating corrupted index.
        The is_bulk_insert_mode flag is added to the select_insert class.
      sql/sql_insert.cc:
        Bug#30384: Having SQL_BUFFER_RESULT option in the CREATE .. KEY(..) .. SELECT
        led to creating corrupted index.
        The is_bulk_insert_mode is set in the select_create::prepare, select_insert::prepare2
        functions and the select_insert class constructor.
        The flag is reset in the select_insert::send_eof function.
      b6333a8c
  6. 20 Sep, 2007 6 commits
    • unknown's avatar
      Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.1-opt · 88fac6e7
      unknown authored
      into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt
      
      88fac6e7
    • unknown's avatar
      result fix · 6c0bab6a
      unknown authored
      6c0bab6a
    • unknown's avatar
      Merge mysql.com:/home/gluh/MySQL/Merge/5.0-opt · acea00c1
      unknown authored
      into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt
      
      
      mysql-test/r/grant.result:
        Auto merged
      acea00c1
    • unknown's avatar
      result fix · bf3d46a8
      unknown authored
      bf3d46a8
    • unknown's avatar
      Merge mysql.com:/home/gluh/MySQL/Merge/5.0-opt · a157e1f8
      unknown authored
      into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt
      
      
      mysql-test/r/alter_table.result:
        Auto merged
      mysql-test/r/create.result:
        Auto merged
      mysql-test/r/ctype_collate.result:
        Auto merged
      mysql-test/r/ctype_recoding.result:
        Auto merged
      mysql-test/r/default.result:
        Auto merged
      mysql-test/r/gis.result:
        Auto merged
      mysql-test/r/grant.result:
        Auto merged
      mysql-test/r/information_schema.result:
        Auto merged
      mysql-test/r/key.result:
        Auto merged
      mysql-test/r/mysql.result:
        Auto merged
      mysql-test/r/ps_1general.result:
        Auto merged
      mysql-test/r/sp.result:
        Auto merged
      mysql-test/r/type_enum.result:
        Auto merged
      mysql-test/r/type_ranges.result:
        Auto merged
      mysql-test/r/show_check.result:
        manual merge
      mysql-test/t/information_schema.test:
        manual merge
      sql/sql_show.cc:
        manual merge
      a157e1f8
    • unknown's avatar
      Bug#27747 database metadata doesn't return sufficient column default info · b7734724
      unknown authored
      added get_field_default_value() function which obtains default value from the field
      (used in store_create_info() & get_schema_column_record() functions)
      
      
      mysql-test/r/alter_table.result:
        result fix
      mysql-test/r/create.result:
        result fix
      mysql-test/r/ctype_collate.result:
        result fix
      mysql-test/r/ctype_recoding.result:
        result fix
      mysql-test/r/default.result:
        result fix
      mysql-test/r/gis.result:
        result fix
      mysql-test/r/grant.result:
        result fix
      mysql-test/r/information_schema.result:
        result fix
      mysql-test/r/key.result:
        result fix
      mysql-test/r/mysql.result:
        result fix
      mysql-test/r/ps_1general.result:
        result fix
      mysql-test/r/show_check.result:
        result fix
      mysql-test/r/sp.result:
        result fix
      mysql-test/r/type_enum.result:
        result fix
      mysql-test/r/type_ranges.result:
        result fix
      mysql-test/t/information_schema.test:
        test case
      b7734724
  7. 19 Sep, 2007 5 commits
    • unknown's avatar
      Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.1-opt · eaf713df
      unknown authored
      into  magare.gmz:/home/kgeorge/mysql/autopush/B30639-5.1-opt
      
      
      mysql-test/r/select.result:
        Auto merged
      mysql-test/t/select.test:
        Auto merged
      sql/sql_lex.cc:
        Auto merged
      eaf713df
    • unknown's avatar
      Bug #30639: limit offset,rowcount wraps when rowcount >= 2^32 in windows · 0d0d804f
      unknown authored
       The parser uses ulonglong to store the LIMIT number. This number
       then is stored into a variable of type ha_rows. ha_rows is either
       4 or 8 byte depending on the BIG_TABLES define from config.h
       So an overflow may occur (and LIMIT becomes zero) while storing an
       ulonglong value in ha_rows.
       Fixed by :
        1. Using the maximum possible value for ha_rows on overflow
        2. Defining BIG_TABLES for the windows builds (to match the others) 
      
      
      include/config-win.h:
        Bug #30639: turn on BIG_TABLES for windows
      mysql-test/r/select.result:
        Bug #30639: test case
      mysql-test/t/select.test:
        Bug #30639: test case
      sql/sql_lex.cc:
        Bug #30639: Use the maximum possible number on overflow 
         of LIMIT. This is valid because there won't be more rows
         anyway.
      0d0d804f
    • unknown's avatar
      Merge mysql.com:/home/gluh/MySQL/Merge/5.0-opt · de2a7211
      unknown authored
      into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt
      
      de2a7211
    • unknown's avatar
      Merge mysql.com:/home/gluh/MySQL/Merge/5.1 · 32a54ab8
      unknown authored
      into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt
      
      
      mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result:
        Auto merged
      mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result:
        Auto merged
      32a54ab8
    • unknown's avatar
      Merge mysql.com:/home/gluh/MySQL/Merge/5.0 · dc123622
      unknown authored
      into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt
      
      dc123622
  8. 17 Sep, 2007 1 commit
    • unknown's avatar
      Fixed bug #29985. · 921157d9
      unknown authored
      Multiple-result processing is required during the execution
      of CALL statements for stored procedures, however the mysqlslap
      client lacked that processing.
      
      
      
      client/mysqlslap.c:
        Fixed bug #29985.
        1. Connection flags have been changed: the CLIENT_MULTI_STATEMENTS
        flag has been added.
        2. The run_task function has been modified to process multiple
        result sets.
      mysql-test/t/mysqlslap.test:
        Added test case for bug #29985.
      mysql-test/r/mysqlslap.result:
        Added test case for bug #29985.
      921157d9
  9. 15 Sep, 2007 3 commits
    • unknown's avatar
      Many files: · 39709f20
      unknown authored
        Post-merge fix.
      
      
      mysql-test/suite/rpl/r/rpl_row_colSize.result:
        Post-merge fix.
      mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result:
        Post-merge fix.
      mysql-test/suite/rpl/r/rpl_extraCol_innodb.result:
        Post-merge fix.
      mysql-test/suite/rpl/r/rpl_extraCol_myisam.result:
        Post-merge fix.
      mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result:
        Post-merge fix.
      39709f20
    • unknown's avatar
      Merge devsrv-b.mysql.com:/data0/gshchepa/mysql-5.0-opt · 144230e8
      unknown authored
      into  devsrv-b.mysql.com:/data0/gshchepa/mysql-5.1-opt
      
      
      mysql-test/t/select.test:
        Auto merged
      144230e8
    • unknown's avatar
      select.test: · 6bcc6c25
      unknown authored
        Post-fix for bug#27695.
      
      
      mysql-test/t/select.test:
        Post-fix for bug#27695.
      6bcc6c25
  10. 14 Sep, 2007 4 commits