1. 16 Nov, 2006 7 commits
    • unknown's avatar
      Merge malff@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime · 0f238ecb
      unknown authored
      into  weblab.(none):/home/marcsql/TREE/mysql-5.1-22684
      
      
      sql/item_func.cc:
        Auto merged
      sql/item_func.h:
        Auto merged
      sql/item_strfunc.cc:
        Auto merged
      sql/item_strfunc.h:
        Auto merged
      0f238ecb
    • unknown's avatar
      Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions) · 84391f91
      unknown authored
      Before this change, the functions BENCHMARK, ENCODE, DECODE and FORMAT could
      only accept a constant for some parameters.
      
      After this change, this restriction has been removed. An implication is that
      these functions can also be used in prepared statements.
      
      The change consist of changing the following classes:
      - Item_func_benchmark
      - Item_func_encode
      - Item_func_decode
      - Item_func_format
      to:
      - only accept Item* in the constructor,
      - and evaluate arguments during calls to val_xxx()
      which fits the general design of all the other functions.
      
      The 'TODO' items identified in item_create.cc during the work done for
      Bug 21114 are addressed by this fix, as a natural consequence of aligning
      the design.
      
      In the 'func_str' test, a single very long test line involving an explain
      extended select with many functions has been rewritten into multiple
      separate tests, to improve maintainability.
      The result of explain extended select decode(encode(...)) has changed,
      since the encode and decode functions now print all their parameters.
      
      
      mysql-test/r/func_str.result:
        Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions)
      mysql-test/r/parser.result:
        Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions)
      mysql-test/r/ps.result:
        Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions)
      mysql-test/t/func_str.test:
        Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions)
      mysql-test/t/parser.test:
        Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions)
      mysql-test/t/ps.test:
        Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions)
      sql/item_create.cc:
        Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions)
      sql/item_func.cc:
        Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions)
      sql/item_func.h:
        Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions)
      sql/item_strfunc.cc:
        Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions)
      sql/item_strfunc.h:
        Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions)
      84391f91
    • unknown's avatar
      Fix after manual merge. · ef9b66f2
      unknown authored
      ef9b66f2
    • unknown's avatar
      Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug17047 · 8c4a12a4
      unknown authored
      into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.1-bug17047
      
      
      sql/item_cmpfunc.cc:
        Auto merged
      sql/item_strfunc.cc:
        Auto merged
      sql/item_strfunc.h:
        Auto merged
      mysql-test/r/func_in.result:
        Manual merge.  Add "End of <version> tests" marker.
      mysql-test/r/func_str.result:
        Manual merge.  Add "End of <version> tests" marker.
      mysql-test/t/func_in.test:
        Manual merge.  Add "End of <version> tests" marker.
      mysql-test/t/func_str.test:
        Manual merge.  Add "End of <version> tests" marker.
      8c4a12a4
    • unknown's avatar
      Add 5.0 part of fix for bug 17047. · dd558e31
      unknown authored
      
      mysql-test/r/func_str.result:
        Add result for bug#17047: CHAR() and IN() can return NULL without
        signaling NULL result.
      mysql-test/t/func_str.test:
        Add test case for bug#17047: CHAR() and IN() can return NULL without
        signaling NULL result.
      sql/item_strfunc.cc:
        Add Item_str_func::fix_fields() implementation, and set maybe_null to
        TRUE if we are in the SQL mode that requires some functions to return
        null even if they normally do not.
      sql/item_strfunc.h:
        Add declaration of Item_str_func::fix_fields().
        Do not reset maybe_null in Item_func_char::fix_length_and_dec().
      dd558e31
    • unknown's avatar
      Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-4.1-bug17047 · 1f2bc9d6
      unknown authored
      into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug17047
      
      
      sql/item_cmpfunc.cc:
        Auto merged
      mysql-test/r/func_in.result:
        Manual merge.  Add "End of 5.0 tests".
      mysql-test/t/func_in.test:
        Manual merge.  Add "End of 5.0 tests".
      1f2bc9d6
    • unknown's avatar
      BUG#17047: CHAR() and IN() can return NULL without signaling NULL result · f77509f1
      unknown authored
      The problem was that some functions (namely IN() starting with 4.1, and
      CHAR() starting with 5.0) were returning NULL in certain conditions,
      while they didn't set their maybe_null flag.  Because of that there could
      be some problems with 'IS NULL' check, and statements that depend on the
      function value domain, like CREATE TABLE t1 SELECT 1 IN (2, NULL);.
      
      The fix is to set maybe_null correctly.
      
      
      mysql-test/r/func_in.result:
        Add result for bug#17047: CHAR() and IN() can return NULL without
        signaling NULL result.
      mysql-test/t/func_in.test:
        Add test case for bug#17047: CHAR() and IN() can return NULL without
        signaling NULL result.
      sql/item_cmpfunc.cc:
        Remove assignment to maybe_null, as it was already set in fix_fields()
        based on all arguments, not only on the first.
      f77509f1
  2. 15 Nov, 2006 3 commits
    • unknown's avatar
    • unknown's avatar
      Merge malff@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime · 62bf4671
      unknown authored
      into  weblab.(none):/home/marcsql/TREE/mysql-5.1-18239
      
      
      mysql-test/t/sp.test:
        Auto merged
      sql/sql_lex.cc:
        Auto merged
      sql/sql_lex.h:
        Auto merged
      sql/sql_yacc.yy:
        Auto merged
      62bf4671
    • unknown's avatar
      Bug#18239 (Possible to overload internal functions with stored functions) · d19bbb67
      unknown authored
      Bug#21025 (misleading error message when creating functions named 'x', or 'y')
      Bug#22619 (Spaces considered harmful)
      
      This change contains a fix to report warnings or errors, and multiple tests
      cases.
      
      Before this fix, name collisions between:
      - Native functions
      - User Defined Functions
      - Stored Functions
      were not systematically reported, leading to confusing behavior.
      
      I) Native / User Defined Function
      
      Before this fix, is was possible to create a UDF named "foo", with the same
      name as a native function "foo", but it was impossible to invoke the UDF,
      since the syntax "foo()" always refer to the native function.
      After this fix, creating a UDF fails with an error if there is a name
      collision with a native function.
      
      II) Native / Stored Function
      
      Before this fix, is was possible to create a SF named "db.foo", with the same
      name as a native function "foo", but this was confusing since the syntax
      "foo()" would refer to the native function. To refer to the Stored Function,
      the user had to use the "db.foo()" syntax.
      After this fix, creating a Stored Function reports a warning if there is a
      name collision with a native function.
      
      III) User Defined Function / Stored Function
      
      Before this fix, creating a User Defined Function "foo" and a Stored Function
      "db.foo" are mutually exclusive operations. Whenever the second function is
      created, an error is reported. However, the test suite did not cover this
      behavior.
      After this fix, the  behavior is unchanged, and is now covered by test cases.
      
      Note that the code change in this patch depends on the fix for Bug 21114.
      
      
      mysql-test/r/sp.result:
        New test cases.
      mysql-test/r/udf.result:
        New test cases.
      mysql-test/t/sp.test:
        New test cases.
      mysql-test/t/udf.test:
        New test cases.
      sql/sql_lex.cc:
        Name collisions with native functions.
      sql/sql_lex.h:
        Name collisions with native functions.
      sql/sql_yacc.yy:
        Name collisions with native functions.
      sql/share/errmsg.txt:
        Name collisions with native functions.
      mysql-test/r/sp_gis.result:
        New test cases.
      mysql-test/t/sp_gis.test:
        New test cases.
      d19bbb67
  3. 13 Nov, 2006 5 commits
    • unknown's avatar
      give a bit more time for the execution of the events · 4b1897c6
      unknown authored
      
      mysql-test/t/events_bugs.test:
        give a bit more time for execution
      4b1897c6
    • unknown's avatar
      Small adjustment after merging fix for bug#23651 "Server crashes when · 7f7292f8
      unknown authored
      trigger which uses stored function invoked from different connections"
      into 5.1.
      
      
      sql/item_func.cc:
        After merge fix. Starting from 5.1 TABLE_SHARE for dummy TABLE object
        is also allocated in Item_func_sp constructor, so we use TABLE::alias
        instead of TABLE::s to check that dummy TABLE was not initialized yet
        or requires re-initialization.
      7f7292f8
    • unknown's avatar
      Merge mockturtle.local:/home/dlenev/src/mysql-5.0-bg23651 · 303fe70e
      unknown authored
      into  mockturtle.local:/home/dlenev/src/mysql-5.1-merge
      
      
      mysql-test/r/trigger.result:
        Auto merged
      mysql-test/t/trigger.test:
        Auto merged
      sql/item_func.cc:
        Auto merged
      303fe70e
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.0-runtime · b50aac19
      unknown authored
      into  mockturtle.local:/home/dlenev/src/mysql-5.0-bg23651
      
      
      sql/item_func.cc:
        Auto merged
      b50aac19
    • unknown's avatar
      Fix for bug bug#23651 "Server crashes when trigger which uses · 95390bef
      unknown authored
      stored function invoked from different connections".
      
      Invocation of trigger which was using stored function from different
      connections caused server crashes (for non-debug server this happened
      in highly concurrent environment, but debug server failed on assertion
      in relatively simple scenario).
      
      Item_func_sp was not safe to use in triggers (in other words for
      re-execution from different threads) as artificial TABLE object
      pointed by Item_func_sp::dummy_table referenced incorrect THD
      object. To fix the problem we force re-initialization of this
      object for each re-execution of statement.
      
      
      mysql-test/r/trigger.result:
        Added test for bug#23651 "Server crashes when trigger which uses
        stored function invoked from different connections".
      mysql-test/t/trigger.test:
        Added test for bug#23651 "Server crashes when trigger which uses
        stored function invoked from different connections".
      sql/item_func.cc:
        To make Item_func_sp safe for usage in triggers (in other words safe
        for re-execution in different threads) we need to ensure that artificial
        TABLE object pointed by Item_func_sp::dummy_table references correct
        THD object. To achieve this we simply force its re-initialization for
        each re-execution of statement.
      95390bef
  4. 12 Nov, 2006 3 commits
  5. 11 Nov, 2006 5 commits
    • unknown's avatar
      Merge mysql.com:/Users/kent/mysql/bk/mysql-5.0 · 82190b9d
      unknown authored
      into  mysql.com:/Users/kent/mysql/bk/mysql-5.1
      
      
      mysql-test/mysql-test-run.pl:
        Auto merged
      82190b9d
    • unknown's avatar
      Merge mysql.com:/Users/kent/mysql/bk/mysql-4.1 · 31481f02
      unknown authored
      into  mysql.com:/Users/kent/mysql/bk/mysql-5.0
      
      31481f02
    • unknown's avatar
      mysql-test-run.pl: · c60d8fb1
      unknown authored
        Test for base directory when a RPM install corrected
      
      
      mysql-test/mysql-test-run.pl:
        Test for base directory when a RPM install corrected
      c60d8fb1
    • unknown's avatar
      Merge bodhi.local:/opt/local/work/mysql-5.0-runtime · dbf89ef5
      unknown authored
      into  bodhi.local:/opt/local/work/mysql-5.1-runtime
      
      
      configure.in:
        Auto merged
      include/my_time.h:
        Auto merged
      mysql-test/r/func_time.result:
        Auto merged
      mysql-test/r/rename.result:
        Auto merged
      mysql-test/t/func_time.test:
        Auto merged
      mysql-test/t/im_daemon_life_cycle.imtest:
        Auto merged
      mysql-test/t/rename.test:
        Auto merged
      sql/item_timefunc.cc:
        Auto merged
      sql/time.cc:
        Auto merged
      sql-common/my_time.c:
        Auto merged
      dbf89ef5
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.0 · 5ae4c26e
      unknown authored
      into  bodhi.local:/opt/local/work/mysql-5.0-runtime
      
      
      configure.in:
        Auto merged
      include/my_time.h:
        Auto merged
      mysql-test/r/func_time.result:
        Auto merged
      mysql-test/r/rename.result:
        Auto merged
      mysql-test/t/func_time.test:
        Auto merged
      mysql-test/t/im_daemon_life_cycle.imtest:
        Auto merged
      sql-common/my_time.c:
        Auto merged
      sql/item_timefunc.cc:
        Auto merged
      sql/time.cc:
        Auto merged
      mysql-test/t/rename.test:
        Use local (resolve a conflict)
      5ae4c26e
  6. 10 Nov, 2006 17 commits
    • unknown's avatar
      Merge trift2.:/M50/mysql-5.0 · 5f34139f
      unknown authored
      into  trift2.:/MySQL/M50/push-5.0
      
      5f34139f
    • unknown's avatar
      Merge trift2.:/MySQL/M50/push-5.0 · d4be3654
      unknown authored
      into  trift2.:/MySQL/M51/push-5.1
      
      
      BitKeeper/deleted/.del-gcc.cpp~3d2e013cfac48838:
        Auto merged
      configure.in:
        Auto merged
      include/my_time.h:
        Auto merged
      mysql-test/install_test_db.sh:
        Auto merged
      mysql-test/mysql-test-run-shell.sh:
        Auto merged
      mysql-test/mysql-test-run.pl:
        Auto merged
      mysql-test/r/func_time.result:
        Auto merged
      mysql-test/r/rename.result:
        Auto merged
      mysql-test/t/func_time.test:
        Auto merged
      mysql-test/t/rename.test:
        Auto merged
      sql/item_timefunc.cc:
        Auto merged
      sql-common/my_time.c:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      sql/time.cc:
        Auto merged
      storage/myisam/sort.c:
        Auto merged
      d4be3654
    • unknown's avatar
      Merge quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/50 · 8398b8cf
      unknown authored
      into  quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/51
      
      
      mysql-test/mysql-test-run.pl:
        Auto merged
      8398b8cf
    • unknown's avatar
      Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.1 · d30742f3
      unknown authored
      into  quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/51
      
      
      mysql-test/mysql-test-run.pl:
        Auto merged
      d30742f3
    • unknown's avatar
      Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.0 · 70369f61
      unknown authored
      into  quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/50
      
      70369f61
    • unknown's avatar
      Merge trift2.:/MySQL/M50/bug24023-5.0 · b1574c4c
      unknown authored
      into  trift2.:/MySQL/M50/push-5.0
      
      
      BitKeeper/deleted/.del-gcc.cpp~3d2e013cfac48838:
        Auto merged
      b1574c4c
    • unknown's avatar
      Merge trift2.:/MySQL/M41/push-4.1 · 2b38d3eb
      unknown authored
      into  trift2.:/MySQL/M50/push-5.0
      
      
      BitKeeper/deleted/.del-gcc.cpp~3d2e013cfac48838:
        Auto merged
      configure.in:
        Auto merged
      include/my_time.h:
        Auto merged
      mysql-test/install_test_db.sh:
        Auto merged
      mysql-test/mysql-test-run.sh:
        Auto merged
      mysql-test/r/func_time.result:
        Auto merged
      mysql-test/r/rename.result:
        Auto merged
      mysql-test/t/func_time.test:
        Auto merged
      mysql-test/t/rename.test:
        Auto merged
      sql/item_timefunc.cc:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      sql-common/my_time.c:
        Auto merged
      sql/time.cc:
        Auto merged
      myisam/sort.c:
        Manual merge: "use local" (= 5.0 version).
      mysql-test/mysql-test-run.pl:
        Manual merge, part of the fix for bug#17194.
      2b38d3eb
    • unknown's avatar
      Merge trift2.:/MySQL/M41/bug17194-4.1 · a8aba345
      unknown authored
      into  trift2.:/MySQL/M41/push-4.1
      
      a8aba345
    • unknown's avatar
      Merge trift2.:/MySQL/M41/clone-4.1 · 94e45811
      unknown authored
      into  trift2.:/MySQL/M41/push-4.1
      
      
      myisam/sort.c:
        Auto merged
      mysql-test/mysql-test-run.sh:
        Auto merged
      mysql-test/mysql-test-run.pl:
        Manual merge.
      94e45811
    • unknown's avatar
      Merge dfischer@bk-internal.mysql.com:/home/bk/mysql-4.1 · 8bde499f
      unknown authored
      into  kahlann.erinye.com:/home/df/mysql/build/mtr-4.1
      
      8bde499f
    • unknown's avatar
      Merge dfischer@bk-internal.mysql.com:/home/bk/mysql-5.0 · f91f36a3
      unknown authored
      into  kahlann.erinye.com:/home/df/mysql/build/mtr-5.0
      
      
      mysql-test/mysql-test-run.pl:
        merge
      f91f36a3
    • unknown's avatar
      Merge kahlann.erinye.com:/home/df/mysql/build/mtr-5.0 · 9c543eb2
      unknown authored
      into  kahlann.erinye.com:/home/df/mysql/build/51
      
      
      mysql-test/mysql-test-run.pl:
        SCCS merged
      9c543eb2
    • unknown's avatar
      Merge kahlann.erinye.com:/home/df/mysql/build/mtr-4.1 · 811626d7
      unknown authored
      into  kahlann.erinye.com:/home/df/mysql/build/mtr-5.0
      
      
      mysql-test/mysql-test-run.pl:
        Auto merged
      811626d7
    • unknown's avatar
      add --report-features to mysql-test-run.pl · 92131d1f
      unknown authored
      
      mysql-test/mysql-test-run.pl:
        add --report-features
      mysql-test/include/report-features.test:
        test file showing server features for mysql-test-run.pl --report-features
      92131d1f
    • unknown's avatar
      Merge pchardin@bk-internal.mysql.com:/home/bk/mysql-4.1 · 1f34f659
      unknown authored
      into  outpost.site:/home/cps/mysql/trees/4.1-runtime-bug9191
      
      
      configure.in:
        Auto merged
      include/my_time.h:
        Auto merged
      mysql-test/r/func_time.result:
        Auto merged
      mysql-test/r/rename.result:
        Auto merged
      mysql-test/t/func_time.test:
        Auto merged
      sql-common/my_time.c:
        Auto merged
      sql/item_timefunc.cc:
        Auto merged
      sql/time.cc:
        Auto merged
      mysql-test/t/rename.test:
        choose one of the race problem solutions. It was solved
        differently in -runtime and mainstream
      1f34f659
    • unknown's avatar
      Merge ted.mysql.internal:/home/ted/src/mysql/50-gca · a5c21349
      unknown authored
      into  ted.mysql.internal:/home/ted/src/mysql/mysql-5.1-new-maint
      
      
      client/mysql_upgrade.c:
        Auto merged
      a5c21349
    • unknown's avatar
      Memory allocation bug fixed · 3a6a2d70
      unknown authored
      3a6a2d70