1. 24 Feb, 2008 5 commits
    • unknown's avatar
      Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.1-opt · c981603b
      unknown authored
      into  mysql.com:/misc/mysql/99999/51-99999
      
      
      sql/set_var.cc:
        Auto merged
      sql/sql_acl.cc:
        Auto merged
      sql/sql_parse.cc:
        Auto merged
      sql/sql_plugin.cc:
        Auto merged
      c981603b
    • unknown's avatar
      Bug#32757: hang with sql_mode set when setting some global variables · d1d93af3
      unknown authored
      If setting a system-variable provided by a plug-in failed, no OK or
      error was sent in some cases, hanging the client. We now send an error
      in the case from the ticket (integer-argument out of range in STRICT
      mode). We also provide a semi-generic fallback message for possible
      future cases like this where an error is signalled, but no message is
      sent to the client. The error/warning handling is unified so it's the
      same again for variables provided by plugins and those in the server
      proper.
      
      
      mysql-test/r/plugin.result:
        show that on out-of-range values, plugin interface throws errors
        in STRICT mode and warnings otherwise.
      mysql-test/t/plugin.test:
        show that on out-of-range values, plugin interface throws errors
        in STRICT mode and warnings otherwise.
      sql/set_var.cc:
        - handle signedness of values used in warnings
        - in STRICT mode, throw errors rather than warnings
      sql/sql_parse.cc:
        If sql_set_variables() returns with an error but no message
        was sent to the client, send a semi-generic one so the session
        won't hang and we won't fail silently.
      sql/sql_plugin.cc:
        throw a warning if more than just block-size was corrected
        (or an error in STRICT mode). use functions from set_var
        for uniform behaviour of server- and plug-in variables.
      storage/example/ha_example.cc:
        Add a ULONG system variable to example plugin so
        we can test integers in the plugin-interface without
        having to depend on the presence of innobase.
      d1d93af3
    • unknown's avatar
      Bug#32753: PAD_CHAR_TO_FULL_LENGTH is not documented and interferes with grant tables · d6dafaa1
      unknown authored
      SQL-mode PAD_CHAR_TO_FULL_LENGTH affected mysqld's user-table too. If
      enabled, user-name and host were space-padded and no longer matched
      the login-data of incoming connexions.
      
      Patch disregards pad-flag while loading privileges so ability to log
      in does not depend on SQL-mode.
      
      
      mysql-test/r/sql_mode.result:
        show that SQL-mode 'PAD_CHAR_TO_FULL_LENGTH' does not affect
        loading of privileges (and by extension, ability to log in).
      mysql-test/t/sql_mode.test:
        show that SQL-mode 'PAD_CHAR_TO_FULL_LENGTH' does not affect
        loading of privileges (and by extension, ability to log in).
      sql/sql_acl.cc:
        temporarily disable SQL-mode 'PAD_CHAR_TO_FULL_LENGTH' while
        reloading privileges
      d6dafaa1
    • unknown's avatar
      Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.1-opt · b895c910
      unknown authored
      into  mysql.com:/misc/mysql/20752/51-20752
      
      
      sql/item_func.cc:
        Auto merged
      b895c910
    • unknown's avatar
      Bug#20752: BENCHMARK with many iterations returns too quickly · 1f2c3196
      unknown authored
      In BENCHMARK(count, expr), count could overflow/wrap-around.
      Patch changes to a sufficiently large data-type. Adds a warning
      for negative count values.
      
      
      mysql-test/r/func_str.result:
        show that a negative 'count' for BENCHMARK(count, expr)
        throws a warning and returns NULL.
      mysql-test/t/func_str.test:
        show that a negative 'count' for BENCHMARK(count, expr)
        throws a warning and returns NULL.
      sql/item_func.cc:
        use ulonglong rather than ulong in BENCHMARK(count, expr)
        throw warning on negative 'count'; return SQL-NULL.
      1f2c3196
  2. 22 Feb, 2008 8 commits
  3. 19 Feb, 2008 3 commits
    • unknown's avatar
      Merge kaamos.(none):/data/src/opt/bug31236/my51-bug31236 · 31a70a01
      unknown authored
      into  kaamos.(none):/data/src/opt/mysql-5.1-opt
      
      
      configure.in:
        Auto merged
      mysql-test/r/strict.result:
        Auto merged
      sql/field.cc:
        Auto merged
      sql/item_func.cc:
        Auto merged
      sql/unireg.h:
        Auto merged
      31a70a01
    • unknown's avatar
      Fix for bug #31236: Inconsistent division by zero behavior for · 832fd6d8
      unknown authored
                          floating point numbers
      
      Some math functions did not check if the result is a valid number
      (i.e. neither of +-inf or nan).
      
      Fixed by validating the result where necessary and returning NULL in
      case of invalid result.
      
      
      BitKeeper/deleted/.del-matherr.c:
        Rename: sql/matherr.c -> BitKeeper/deleted/.del-matherr.c
      configure.in:
        Removed DONT_USE_FINITE, it is not used anywhere.
      include/my_global.h:
        isfinite() is a C99 macro which absoletes finite(). First try to use
        it, then fall back to finite() if the target platform has it,
        otherwise use our own implementation.
      mysql-test/r/func_math.result:
        Added a test case for bug #31236.
      mysql-test/r/strict.result:
        Fixed a test case which relied on old behavior.
      mysql-test/t/func_math.test:
        Added a test case for bug #31236.
      mysql-test/t/strict.test:
        Fixed a test case which relied on old behavior.
      sql/field.cc:
        No need to check if the finite() or its equivalent is available.
      sql/item_func.cc:
        Use fix_result() wherever the result can be one of +-inf or nan, 
        assuming the function arguments are valid numbers.
        Removed fix_result() from functions that are defined for all possible
        input numbers.
      sql/item_func.h:
        Moved fix_result() from Item_dec_func to Item_func which is a common
        ancestor for Item_dec_func and Item_num_op.
      sql/unireg.h:
        Removed POSTFIX_ERROR because no code returns it.
      832fd6d8
    • unknown's avatar
      Bug #30604: different flagging of time_zone_used in normal · e719a221
      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.
      e719a221
  4. 18 Feb, 2008 8 commits
  5. 17 Feb, 2008 10 commits
    • unknown's avatar
      Merge kaamos.(none):/data/src/opt/mysql-5.0-opt · 21538d09
      unknown authored
      into  kaamos.(none):/data/src/opt/mysql-5.1-opt
      
      
      sql/item.cc:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      21538d09
    • unknown's avatar
      Merge ssh://bk-internal.mysql.com//home/bk/mysql-5.1-opt · dff4a20e
      unknown authored
      into  kaamos.(none):/data/src/opt/mysql-5.1-opt
      
      
      sql/mysql_priv.h:
        Auto merged
      sql/item.cc:
        SCCS merged
      dff4a20e
    • unknown's avatar
      Merge ssh://bk-internal.mysql.com//home/bk/mysql-5.0-opt · f9bf3eef
      unknown authored
      into  kaamos.(none):/data/src/opt/mysql-5.0-opt
      
      
      sql/item.cc:
        Auto merged
      f9bf3eef
    • unknown's avatar
      Merge kaamos.(none):/data/src/opt/mysql-5.0-opt · fc0221a5
      unknown authored
      into  kaamos.(none):/data/src/opt/mysql-5.1-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:
        Null merge.
      mysql-test/t/sp.test:
        Null merge.
      fc0221a5
    • unknown's avatar
      Post-merge fix. · b67281c3
      unknown authored
      b67281c3
    • unknown's avatar
      Merge kaamos.(none):/data/src/mysql-5.1 · d5f90dd6
      unknown authored
      into  kaamos.(none):/data/src/opt/mysql-5.1-opt
      
      
      libmysqld/lib_sql.cc:
        Auto merged
      mysql-test/r/create.result:
        Auto merged
      mysql-test/r/innodb_mysql.result:
        Auto merged
      mysql-test/r/variables.result:
        Auto merged
      BitKeeper/deleted/.del-rpl_ndb_charset.result:
        Auto merged
      BitKeeper/deleted/.del-rpl_row_charset.result:
        Auto merged
      BitKeeper/deleted/.del-rpl_row_charset.test:
        Auto merged
      BitKeeper/deleted/.del-rpl_row_charset_innodb.result:
        Auto merged
      mysql-test/t/create.test:
        Auto merged
      mysql-test/t/sp.test:
        Auto merged
      mysql-test/t/variables.test:
        Auto merged
      sql/field.cc:
        Auto merged
      sql/filesort.cc:
        Auto merged
      sql/handler.cc:
        Auto merged
      sql/item.cc:
        Auto merged
      sql/item_cmpfunc.cc:
        Auto merged
      sql/item_func.cc:
        Auto merged
      sql/mysqld.cc:
        Auto merged
      sql/sql_acl.cc:
        Auto merged
      sql/share/errmsg.txt:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      sql/sql_yacc.yy:
        Auto merged
      mysql-test/lib/mtr_report.pl:
        Manual merge.
      mysql-test/r/sp.result:
        Manual merge.
      d5f90dd6
    • unknown's avatar
      Bug #32942 now() - interval '7200' second NOT pre-calculated, causing "full table scan" · 274cdcdd
      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
      274cdcdd
    • unknown's avatar
      Merge kaamos.(none):/data/src/opt/mysql-4.1-opt · d6060cd5
      unknown authored
      into  kaamos.(none):/data/src/opt/mysql-5.0-opt
      
      d6060cd5
    • unknown's avatar
      Merge kaamos.(none):/data/src/mysql-5.0 · c9a13e81
      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.
      c9a13e81
    • unknown's avatar
      Merge kaamos.(none):/data/src/mysql-4.1 · a5d041cf
      unknown authored
      into  kaamos.(none):/data/src/opt/mysql-4.1-opt
      
      a5d041cf
  6. 16 Feb, 2008 2 commits
  7. 15 Feb, 2008 3 commits
    • unknown's avatar
      Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · 54d4452d
      unknown authored
      into  magare.gmz:/home/kgeorge/mysql/autopush/B31887-5.0-opt
      
      
      sql/item.cc:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      54d4452d
    • unknown's avatar
      Bug #31887: DML Select statement not returning same results · 72e48bf2
      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.
      72e48bf2
    • unknown's avatar
      Adding waits to events_scheduling to prevent the test from · a77151c7
      unknown authored
      failing on heavily loaded systems.
      
      
      mysql-test/t/events_scheduling.test:
        Adding waits before statements since the scheduler is unpredictable
        on loaded systems and might be delayed.
      a77151c7
  8. 14 Feb, 2008 1 commit