1. 14 Mar, 2008 1 commit
    • unknown's avatar
      Fixed bug #34763. · 9699767c
      unknown authored
      Queries like:
      
        SELECT ROW(1, 2) IN (SELECT t1.a, 2)
          FROM t1 GROUP BY t1.a
      
      or 
      
        SELECT ROW(1, 2) IN (SELECT t1.a, 2 FROM t2)
          FROM t1 GROUP BY t1.a
      
      lead to assertion failure in the
      Item_in_subselect::row_value_transformer method in debugging
      build, or to unexpected error message in release build:
      
        ERROR 1247 (42S22): Reference '<list ref>' not supported (forward
                            reference in item list)
      
      Unexpected error message and assertion failure have been
      eliminated.
      
      
      mysql-test/r/subselect3.result:
        Added test case for bug #34763.
      mysql-test/t/subselect3.test:
        Added test case for bug #34763.
      sql/item.cc:
        Fixed bug #34763.
        The Item_ref::fix_fields method has been modified to silently
        ignore not fixed outer references: by the definition, those
        references should be fixed later by the call to the
        fix_inner_refs function.
      sql/item_subselect.cc:
        Fixed bug #34763.
        The Item_in_subselect::row_value_transformer method has been
        modified to eliminate assertion failure on not fixed outer
        references: by the definition those references are allowed in
        this context and should be fixed later by the call to the
        fix_inner_refs function.
      9699767c
  2. 07 Mar, 2008 1 commit
  3. 01 Mar, 2008 1 commit
  4. 29 Feb, 2008 8 commits
    • unknown's avatar
      Merge host.loc:/home/uchum/work/PP/5.0-opt-34620 · d130b849
      unknown authored
      into  host.loc:/home/uchum/work/5.0-opt-34763
      
      
      d130b849
    • unknown's avatar
      wrong merge fix · 4e7c4ab9
      unknown authored
      4e7c4ab9
    • unknown's avatar
      Merge mysql.com:/home/gluh/MySQL/Merge/4.1-opt · 4460f5a5
      unknown authored
      into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt
      
      
      mysql-test/t/symlink.test:
        Auto merged
      mysql-test/r/symlink.result:
        after merge fix
      4460f5a5
    • unknown's avatar
      test fix · be59a0ea
      unknown authored
      
      mysql-test/r/symlink.result:
        result fix
      be59a0ea
    • unknown's avatar
      Fixed bug #34830: mixed table and field names in Item_ref · d276cd90
      unknown authored
                        and Item_direct_ref constructor calls.
      
      Order of ref->field_name and ref->table_name arguments
      is of Item_ref and Item_direct_ref in the fix_inner_refs
      function is inverted.
      
      
      sql/sql_select.cc:
        Fixed bug #34830: mixed table and field names in Item_ref
                          and Item_direct_ref constructor calls.
        
        Order of ref->field_name and ref->table_name arguments
        is of Item_ref and Item_direct_ref in the fix_inner_refs
        function is inverted. See definitions:
        
          Item_ref(Name_resolution_context *context_arg, Item **item,
                   const char *table_name_arg, const char *field_name_arg,
                   bool alias_name_used_arg= FALSE)
          and
        
          Item_direct_ref(Name_resolution_context *context_arg, Item **item,
                          const char *table_name_arg,
                          const char *field_name_arg,
                          bool alias_name_used_arg= FALSE)
      d276cd90
    • unknown's avatar
      after merge fix · fa9e35b4
      unknown authored
      fa9e35b4
    • unknown's avatar
      Merge mysql.com:/home/gluh/MySQL/Merge/4.1-opt · 8bdb243f
      unknown authored
      into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt
      
      
      sql/mysql_priv.h:
        Auto merged
      mysql-test/r/symlink.result:
        manual merge
      mysql-test/t/symlink.test:
        manual merge
      sql/mysqld.cc:
        manual merge
      sql/sql_parse.cc:
        manual merge
      8bdb243f
    • unknown's avatar
      Bug#32167 another privilege bypass with DATA/INDEX DIRECORY(ver 4.1,5.0) · ab604259
      unknown authored
      added new function test_if_data_home_dir() which checks that
      path does not contain mysql data home directory.
      Using of mysql data home directory in
      DATA DIRECTORY & INDEX DIRECTORY is disallowed.
      
      
      mysql-test/r/symlink.result:
        test result
      mysql-test/t/symlink.test:
        test case
      sql/mysql_priv.h:
        new variable mysql_unpacked_real_data_home
      sql/mysqld.cc:
        new variable mysql_unpacked_real_data_home
      sql/sql_parse.cc:
        added new function test_if_data_home_dir() which checks that
        path does not contain mysql data home directory.
        Using of mysql data home directory in
        DATA DIRECTORY & INDEX DIRECTORY is disallowed.
      ab604259
  5. 28 Feb, 2008 4 commits
    • unknown's avatar
      Merge host.loc:/home/uchum/work/PP/5.0-opt-34620 · 7f572871
      unknown authored
      into  host.loc:/home/uchum/work/5.0-opt
      
      
      7f572871
    • unknown's avatar
      Fixed bug #34620: item_row.cc:50: Item_row::illegal_method_call(const char*): · d40ca161
      unknown authored
                        Assertion `0' failed
      
      If ROW item is a part of an expression that also has
      aggregate function calls (COUNT/SUM/AVG...), a
      "splitting" with an Item::split_sum_func2 function
      is applied to that ROW item.
      Current implementation of Item::split_sum_func2
      replaces this Item_row with a newly created
      Item_aggregate_ref reference to it.
      Then the row cache tries to work with the
      Item_aggregate_ref object as with the Item_row object:
      row cache calls row-emulation methods such as cols and
      element_index. Item_aggregate_ref (like it's parent
      Item_ref) inherits dummy implementations of those
      methods from the hierarchy root Item, and call to
      them leads to failed assertions and wrong data
      output.
      
      Row-emulation virtual functions (cols, element_index, addr,
      check_cols, null_inside and bring_value) of Item_ref have
      been overloaded to forward calls to an underlying item
      reference.
      
      
      
      
      mysql-test/r/row.result:
        Added test case for bug #34620.
      mysql-test/t/row.test:
        Added test case for bug #34620.
      sql/item.h:
        Fixed bug #34620.
        Row-emulation virtual functions (cols, element_index, addr,
        check_cols, null_inside and bring_value) of Item_ref have
        been overloaded to forward calls to an underlying item
        reference.
      d40ca161
    • unknown's avatar
      Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · 56e6b531
      unknown authored
      into  magare.gmz:/home/kgeorge/mysql/autopush/B34747-5.0-opt
      
      
      56e6b531
    • unknown's avatar
      Bug #34747: crash in debug assertion check after derived table · f28612ea
      unknown authored
      Was a double-free of the Unique member of Item_func_group_concat.
      This was not causing a crash because the Unique is a descendent of
      Sql_alloc.
      Fixed to free the Unique only if it was allocated for the instance 
      of Item_func_group_concat it was referenced from
      
      
      mysql-test/r/func_gconcat.result:
        Bug #34747: test case
      mysql-test/t/func_gconcat.test:
        Bug #34747: test case
      sql/item_sum.cc:
        Bug #34747: free the Unique only if it was allocated
        for this instance of Item_func_group_concat
      f28612ea
  6. 27 Feb, 2008 4 commits
    • unknown's avatar
      Merge kaamos.(none):/data/src/opt/bug33834/my50-bug33834 · 7ca90d53
      unknown authored
      into  kaamos.(none):/data/src/opt/mysql-5.0-opt
      
      
      7ca90d53
    • unknown's avatar
      Fixed test suite failures with --ps-protocol introduced in PB by · c8885dfb
      unknown authored
      the patch for bug #33834.
      
      
      c8885dfb
    • unknown's avatar
      Merge bk@192.168.21.1:mysql-5.0-opt · 87007702
      unknown authored
      into  mysql.com:/home/hf/work/25097/my50-25097
      
      
      libmysql/libmysql.c:
        Auto merged
      libmysqld/lib_sql.cc:
        Auto merged
      sql/log.cc:
        Auto merged
      87007702
    • unknown's avatar
      Bug #25097 mysql_server_init fails silently if no errmsg.sys is present. · a4b0a2cf
      unknown authored
      There was no way to return an error from the client library
      if no MYSQL connections was established.
      So here i added variables to store that king of errors and
      made functions like mysql_error(NULL) to return these.
      
      
      client/mysql.cc:
        Bug #25097 mysql_server_init fails silently if no errmsg.sys is present.
        
        Show the error message on std_error
      include/sql_common.h:
        Bug #25097 mysql_server_init fails silently if no errmsg.sys is present.
        
        cant_connect_sqlstate constant declared
      libmysql/libmysql.c:
        Bug #25097 mysql_server_init fails silently if no errmsg.sys is present.
        
        mysql_sqlstate(NULL) returns 'unknown_sqlstate'
      libmysqld/lib_sql.cc:
        Bug #25097 mysql_server_init fails silently if no errmsg.sys is present.
        
        EMBEDDED_SERVER version of the vprint_msg_to_log() implemented
      sql-common/client.c:
        Bug #25097 mysql_server_init fails silently if no errmsg.sys is present.
        
        mysql_server_last_errno and mysql_server_last_error introduced
        to store errors not related to particular connections.
        
        mysql_error(NULL) and mysql_errno(NULL) now returns these
        mysql_server_last_error and errno respectively
      sql/log.cc:
        Bug #25097 mysql_server_init fails silently if no errmsg.sys is present.
        
        EMBEDDED_LIBRARY implementation of the vprint_msg_to_log() moved
        to lib_sql.cc
      a4b0a2cf
  7. 26 Feb, 2008 1 commit
  8. 25 Feb, 2008 1 commit
    • unknown's avatar
      Fix for bug #33834: FRAC_SECOND: Applicability not clear in · 4f3eab58
      unknown authored
                          documentation
      
      While the manual mentions FRAC_SECOND only for the TIMESTAMPADD()
      function, it was also possible to use FRAC_SECOND with DATE_ADD(),
      DATE_SUB() and +/- INTERVAL.
      
      Fixed the parser to match the manual, i.e. using FRAC_SECOND for 
      anything other than TIMESTAMPADD()/TIMESTAMPDIFF() now produces a 
      syntax error.
      
      Additionally, the patch allows MICROSECOND to be used in TIMESTAMPADD/
      TIMESTAMPDIFF and marks FRAC_SECOND as deprecated.
      
      
      mysql-test/r/func_time.result:
        Added a test case for bug #33834.
      mysql-test/t/func_time.test:
        Added a test case for bug #33834.
      sql/sql_yacc.yy:
        Reject FRAC_SECOND for anything other than TIMESTAMPADD() or
        TIMESTAMPDIFF().
        Allow MICROSECOND to be used with TIMESTAMPADD()/TIMESTAMPDIFF().
        Warn about FRAC_SECOND being a deprecated unit.
      4f3eab58
  9. 22 Feb, 2008 5 commits
  10. 20 Feb, 2008 2 commits
    • unknown's avatar
      Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · 463edf37
      unknown authored
      into  moonbone.local:/work/33266-bug-5.0-opt-mysql
      
      
      463edf37
    • unknown's avatar
      Bug#33266: Incorrect test case for the bug#31048 failing on some platforms. · daffceb4
      unknown authored
      The test case for the bug#31048 checks that there is no crash on stack
      overrun. But due to different stack sizes on different platforms it failed
      on some of them.
      
      The new test case check that a query with at least 4 level subquery nesting
      works without the stack overrun nesting and other levels of nesting doesn't
      cause a crash.
      
      
      mysql-test/t/subselect.test:
        Corrected test case for the bug#31048.
      mysql-test/r/subselect.result:
        Corrected test case for the bug#31048.
      daffceb4
  11. 19 Feb, 2008 1 commit
    • unknown's avatar
      Bug #30604: different flagging of time_zone_used in normal · 1ac31924
      unknown authored
        and ps-protocol
      Finding a routine should be a transparent operation as 
      far as the binary log is concerned.
      But it was influencing the binary log because of the TIMESTAMP
      column in the proc table.
      
      Fixed by preserving and restoring the time_zone usage flag when
      searching for a stored routine in the proc table.
      
      
      mysql-test/r/binlog_innodb.result:
        Bug #30604: test case
      mysql-test/r/ctype_cp932_binlog.result:
        Bug #30604: updated test results (a procedure call before that)
      mysql-test/t/binlog_innodb.test:
        Bug #30604: test case
      sql/sp.cc:
        Bug #30604: finding a routine should be a transparent operation as 
        far as the binary log is concerned.
        Fixed by preserving and restoring the time_zone usage flag.
      1ac31924
  12. 18 Feb, 2008 1 commit
    • unknown's avatar
      Merge bk@192.168.21.1:mysql-5.0-opt · 18f885ed
      unknown authored
      into  mysql.com:/home/hf/work/32942/my50-32942
      
      
      sql/sql_select.cc:
        Auto merged
      mysql-test/r/select.result:
        merging
      mysql-test/t/select.test:
        merging
      18f885ed
  13. 17 Feb, 2008 5 commits
    • unknown's avatar
      Merge ssh://bk-internal.mysql.com//home/bk/mysql-5.0-opt · 787dbaca
      unknown authored
      into  kaamos.(none):/data/src/opt/mysql-5.0-opt
      
      
      sql/item.cc:
        Auto merged
      787dbaca
    • unknown's avatar
      Bug #32942 now() - interval '7200' second NOT pre-calculated, causing "full table scan" · d6be1a9b
      unknown authored
      Problem is not about intervals and doesn't actually cause 'full table scan'.
      We have an optimization for DISTINCT when we have
      'DISTINCT field_from_first_join_table' we don't need to read all the
      rows from the JOIN-ed table if we found one conforming row.
      It stopped working in 5.0 as we return NESTED_LOOP_OK if we came upon
      that case in the evaluate_join_record() and that doesn't break the
      recordreading loop in sub_select().
      
      Fixed by returning NESTED_LOOP_NO_MORE_ROWS in this case.
      
      
      mysql-test/r/select.result:
        Bug #32942 now() - interval '7200' second is NOT pre-calculated, causing "full table scan".
        
        test result
      mysql-test/t/select.test:
        Bug #32942 now() - interval '7200' second is NOT pre-calculated, causing "full table scan"
        
        test case
      sql/sql_select.cc:
        Bug #32942 now() - interval '7200' second NOT pre-calculated, causing "full table scan"
        
        return NESTED_LOOP_NO_MORE_ROWS when we don't need to read rows from
        this table anymore
      d6be1a9b
    • unknown's avatar
      Merge kaamos.(none):/data/src/opt/mysql-4.1-opt · b546edb4
      unknown authored
      into  kaamos.(none):/data/src/opt/mysql-5.0-opt
      
      
      b546edb4
    • unknown's avatar
      Merge kaamos.(none):/data/src/mysql-5.0 · 4a834b4b
      unknown authored
      into  kaamos.(none):/data/src/opt/mysql-5.0-opt
      
      
      mysql-test/r/variables.result:
        Auto merged
      mysql-test/t/variables.test:
        Auto merged
      sql/item.cc:
        Auto merged
      sql/item_cmpfunc.cc:
        Auto merged
      sql/sql_acl.cc:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      sql/sql_yacc.yy:
        Auto merged
      mysql-test/r/sp.result:
        Manual merge.
      mysql-test/t/sp.test:
        Manual merge.
      4a834b4b
    • unknown's avatar
      Merge kaamos.(none):/data/src/mysql-4.1 · f364c099
      unknown authored
      into  kaamos.(none):/data/src/opt/mysql-4.1-opt
      
      
      f364c099
  14. 15 Feb, 2008 2 commits
    • unknown's avatar
      Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · 0529125a
      unknown authored
      into  magare.gmz:/home/kgeorge/mysql/autopush/B31887-5.0-opt
      
      
      sql/item.cc:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      0529125a
    • unknown's avatar
      Bug #31887: DML Select statement not returning same results · cc2e929a
      unknown authored
      when executed in version 5
      
      Zero fill is a field attribute only. So we can't always 
      propagate  constants for zerofill fields : the values and 
      expression results don't have that flag.
      
      Fixed by converting the const value to a string and 
      using that in const propagation when the context allows it. 
      Disable const propagation for fields with ZEROFILL flag in
      all the other cases.
      
      
      mysql-test/r/compare.result:
        Bug #31887: test case
      mysql-test/t/compare.test:
        Bug #31887: test case
      sql/item.cc:
        Bug #31887: If the context allows conversion
        of an int constant to a zero-filled string constant
        put the string constant instead of the int constant
        when doing const propagation
      sql/mysql_priv.h:
        Bug #31887: a macro to get all the Field_num
        descendant fields.
      cc2e929a
  15. 14 Feb, 2008 1 commit
  16. 13 Feb, 2008 2 commits
    • unknown's avatar
      Merge host.loc:/home/uchum/work/5.0-opt-gca · be891fc6
      unknown authored
      into  host.loc:/home/uchum/work/5.0-opt
      
      
      be891fc6
    • unknown's avatar
      Fixed bug#31194: Privilege ordering does not order properly · 7a290b55
      unknown authored
                       for wildcard values.
      The server ignored escape character before wildcards during
      the calculation of priority values for sorting of a privilege
      list. (Actually the server counted an escape character as an
      ordinary wildcard like % or _). I.e. the table name template
      with a wildcard character like 'tbl_1' had higher priority in
      a privilege list than concrete table name without wildcards
      like 'tbl\_1', and some privileges of 'tbl\_1' was hidden
      by privileges for 'tbl_1'.
      
      The get_sort function has been modified to ignore escaped
      wildcards as usual.
      
      
      
      mysql-test/r/grant3.result:
        Added test case for bug#31194.
      mysql-test/t/grant3.test:
        Added test case for bug#31194.
      sql/sql_acl.cc:
        Fixed bug#31194.
        The server used the wild_prefix escape character (usually \-character)
        like % and _ wildcards in the get_sort function for sorting weights
        calculation.
        
        The get_sort function has been modified to ignore escaped wildcards
        and alone escapes like in the wild_case_compare function.
      7a290b55