1. 23 Jan, 2007 1 commit
    • unknown's avatar
      Proposed fix for bug#24491 "using alias from source table in insert ... · 1dead07d
      unknown authored
      on duplicate key".
      
      INSERT ... SELECT ... ON DUPLICATE KEY UPDATE which was used in
      stored routine or as prepared statement and which in its ON DUPLICATE
      KEY clause erroneously tried to assign value to a column mentioned only
      in its SELECT part was properly emitting error on the first execution
      but succeeded on the second and following executions.
      
      Code which is responsible for name resolution of fields mentioned in
      UPDATE clause (e.g. see select_insert::prepare()) modifies table list
      and Name_resolution_context used in this process. It uses
      Name_resolution_context_state::save_state/restore_state() to revert
      these modifications. Unfortunately those two methods failed to revert
      properly modifications to TABLE_LIST::next_name_resolution_table
      and this broke name resolution process for successive executions.
      
      This patch fixes Name_resolution_context_state::save_state/restore_state()
      in such way that it properly handles TABLE_LIST::next_name_resolution_table.
      
      
      mysql-test/r/ps.result:
        Added test case for bug#24491 "using alias from source table in insert ...
        on duplicate key"
      mysql-test/r/sp-error.result:
        Added test case for bug#24491 "using alias from source table in insert ...
        on duplicate key"
      mysql-test/t/ps.test:
        Added test case for bug#24491 "using alias from source table in insert ...
        on duplicate key"
      mysql-test/t/sp-error.test:
        Added test case for bug#24491 "using alias from source table in insert ...
        on duplicate key"
      sql/item.h:
        Name_resolution_context::save_state/restore_state():
          At the moment these methods are used only by code implementing
          INSERT and INSERT ... SELECT statements. This code doesn't modify
         'next_name_resolution_table' member of table list element
          corresponding to the first table of SELECT clause (pointed by
          'first_name_resolution_table'). But it modifies table list element
          corresponding to the target table of INSERT (pointed by 'table_list')
          So these methods were changed to reflect this.
      1dead07d
  2. 09 Jan, 2007 4 commits
    • unknown's avatar
      Merge moonlight.home:/home/tomash/src/mysql_ab/mysql-5.0 · 21311e99
      unknown authored
      into  moonlight.home:/home/tomash/src/mysql_ab/mysql-5.0-bug23443
      
      
      21311e99
    • unknown's avatar
      Merge moonlight.home:/home/tomash/src/mysql_ab/mysql-4.1-bug23443 · 19b95ca2
      unknown authored
      into  moonlight.home:/home/tomash/src/mysql_ab/mysql-5.0-bug23443
      
      
      heap/hp_write.c:
        Auto merged
      sql/item_func.cc:
        Auto merged
      19b95ca2
    • unknown's avatar
      Merge moonlight.home:/home/tomash/src/mysql_ab/mysql-4.0-bug23443 · beac4a6f
      unknown authored
      into  moonlight.home:/home/tomash/src/mysql_ab/mysql-4.1-bug23443
      
      
      heap/hp_block.c:
        Auto merged
      sql/item_func.cc:
        Auto merged
      heap/hp_write.c:
        Manual merge.
      beac4a6f
    • unknown's avatar
      BUG#23443: user-defined variables can consume too much memory in the · 4fe1561f
      unknown authored
                 server
      
      The problem was that when memory was exhausted HEAP engine could crash
      (GROUP BY uses HEAP TABLE).  Alternatively, if SET was used, it could
      report an error "You may only use constant expressions with SET" instead
      of "Out of memory (Needed NNNNNN bytes)".
      
      The solution is:
       - pass MY_WME to (some) calls to my_malloc() to get correct message.
       - fix heap_write() so that the first key is skipped during cleanup
         on ENOMEM because it wasn't inserted and doesn't have to be
         deleted.
      
      No test case is provided because we can't test out-of-memory behaviour
      in our current test framework.
      
      
      heap/hp_block.c:
        If allocation fails, write an error message.
      heap/hp_write.c:
        On ENOMEM, skip the first key in cleanup, as it wasn't inserted yet.
      sql/item_func.cc:
        Add MY_WME so that OOM error will be reported.
      4fe1561f
  3. 19 Dec, 2006 1 commit
    • unknown's avatar
      Fix for BUG#24293: '\Z' token is not handled correctly in views. · b66ab7f8
      unknown authored
      If SELECT-part of CREATE VIEW statement contains '\Z',
      it is not handled correctly.
      
      The problem was in String::print().
      Symbol with code 032 (26) is replaced with '\z',
      which is not supported by the lexer.
      
      The fix is to replace the symbol with '\Z'.
      
      
      mysql-test/r/view.result:
        Update result file.
      mysql-test/t/view.test:
        Add test case for BUG#24293.
      sql/sql_string.cc:
        We should replace 032 with \Z, since lexer does not understand \z.
      b66ab7f8
  4. 12 Dec, 2006 2 commits
    • unknown's avatar
      minor cleanup · d501b2dd
      unknown authored
      
      mysql-test/t/sp_stress_case.test:
        Minor cleanup ... the test is now faster, even in debug builds
      d501b2dd
    • unknown's avatar
      Merge malff@bk-internal.mysql.com:/home/bk/mysql-5.0-runtime · 1ec10680
      unknown authored
      into  weblab.(none):/home/marcsql/TREE/mysql-5.0-19194
      
      
      sql/sp_head.cc:
        Auto merged
      sql/sql_lex.cc:
        Auto merged
      sql/sql_lex.h:
        Auto merged
      sql/sql_yacc.yy:
        Auto merged
      1ec10680
  5. 11 Dec, 2006 1 commit
    • unknown's avatar
      Bug#19194 (Right recursion in parser for CASE causes excessive stack usage, · c01c4cc3
      unknown authored
        limitation)
      Bug#24854 (Mixing Searched Case with Simple Case inside Stored Procedure
        crashes Mysqld)
      
      Implemented code review (19194) comments
      
      
      mysql-test/r/sp_stress_case.result:
        Implemented code review comments : use SQL instead of a shell script to
        generate the code
      mysql-test/t/sp_stress_case.test:
        Adjusted
      sql/sql_yacc.yy:
        Added more explicit comments
      BitKeeper/deleted/.del-sp_stress_case.sh:
        Delete: mysql-test/t/sp_stress_case.sh
      c01c4cc3
  6. 04 Dec, 2006 3 commits
    • unknown's avatar
      Merge pchardin@bk-internal.mysql.com:/home/bk/mysql-5.0-runtime · 3d5c638b
      unknown authored
      into  outpost.site:/home/cps/mysql/trees/5.0-runtime-19044
      
      
      3d5c638b
    • unknown's avatar
      Fix Bug #19044 IM aborts on exit · 1adc1368
      unknown authored
      On windows IM aborted on assert once one
      stoppped it. The reason is that we didn't
      close the sockets on windows and therefore,
      the listener thread wasn't able to finish.
      This happened because we used close() call
      for it. While on windows one should use
      closesocket().
      On other platfroms we have appropriate defines
      for closesocket(), so this is the function which
      should be used.
      
      
      server-tools/instance-manager/listener.cc:
        close -> closesocket
      1adc1368
    • unknown's avatar
      Use standard shell instead of BASH. · 85e15fb3
      unknown authored
      85e15fb3
  7. 01 Dec, 2006 1 commit
    • unknown's avatar
      A fix and a test case for Bug#24179 "select b into $var" fails with · fe84b016
      unknown authored
      --cursor_protocol": fix a misleading error message in case of
      SELECT .. INTO.
      
      
      sql/sql_class.cc:
        Implement select_result::check_simple_select hierarchy to 
        support correct error messages in case of SELECT .. INTO and C API 
        cursors.
      sql/sql_class.h:
        Set the error message inside the function that checks for the error
        condition (simple_select, renamed to check_simple_select).
      sql/sql_prepare.cc:
        Use a new method that now sets the error.
      tests/mysql_client_test.c:
        Add a test case for Bug#24179 "select b into $var" fails with 
        --cursor_protocol" (check for the right error message and error code).
      fe84b016
  8. 29 Nov, 2006 12 commits
  9. 28 Nov, 2006 10 commits
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.0 · 15584161
      unknown authored
      into  bodhi.local:/opt/local/work/mysql-5.0-runtime
      
      
      libmysql/libmysql.c:
        Auto merged
      libmysqld/lib_sql.cc:
        Auto merged
      mysql-test/t/func_str.test:
        Auto merged
      sql/item_cmpfunc.cc:
        Auto merged
      sql/item_func.cc:
        Auto merged
      sql/item_sum.cc:
        Auto merged
      sql/mysqld.cc:
        Auto merged
      sql/sql_yacc.yy:
        Auto merged
      tests/mysql_client_test.c:
        Auto merged
      mysql-test/t/wait_for_socket.sh:
        Manual merge.
      sql/sql_cache.cc:
        Manual merge.
      15584161
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-4.1 · 760bd9d1
      unknown authored
      into  bodhi.local:/opt/local/work/mysql-4.1-runtime
      
      
      libmysql/libmysql.c:
        Auto merged
      libmysqld/lib_sql.cc:
        Auto merged
      sql/item_sum.cc:
        Auto merged
      760bd9d1
    • unknown's avatar
      Merge jbruehe@bk-internal.mysql.com:/home/bk/mysql-5.0-build · 00fec63a
      unknown authored
      into  trift2.:/MySQL/M50/push-5.0
      
      
      00fec63a
    • unknown's avatar
      Merge trift2.:/M50/mysql-5.0 · fa26de19
      unknown authored
      into  trift2.:/MySQL/M50/push-5.0
      
      
      fa26de19
    • unknown's avatar
      netware/BUILD/nwbootstrap : Editing "mwenv" is now obsolete and even plain wrong - drop it. · 5be953f8
      unknown authored
      
      netware/BUILD/nwbootstrap:
        Editing "mwenv" is now obsolete,
        as this file gets its variable settings from the environment already;
        and it is even plain wrong,
        because the assignments to those variables are written in such a way that
        replacing the variables by values (as tried here) yields invalid shell lines.
      5be953f8
    • unknown's avatar
      Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-5.0-build · d41b660b
      unknown authored
      into  mysql.com:/home/kent/bk/mysql-5.0-build
      
      
      d41b660b
    • unknown's avatar
      Makefile.am: · 89a71063
      unknown authored
        Handle the case "sql_yacc.cc" is pregenerated or not, and that the
        case where the source and build tree is the same or not.
      
      
      sql/Makefile.am:
        Handle the case "sql_yacc.cc" is pregenerated or not, and that the
        case where the source and build tree is the same or not.
      89a71063
    • unknown's avatar
      Merge mysql.com:/home/kent/bk/mysql-4.1-build · 4d08b747
      unknown authored
      into  mysql.com:/home/kent/bk/mysql-5.0-build
      
      
      Docs/Makefile.am:
        Auto merged
      4d08b747
    • unknown's avatar
      Makefile.am: · 0fb76499
      unknown authored
        If using \$(srcdir)/mysql.info in action, use same in rule.
      
      
      Docs/Makefile.am:
        If using \$(srcdir)/mysql.info in action, use same in rule.
      0fb76499
    • unknown's avatar
      Merge trift2.:/M50/mysql-5.0 · c8b23c37
      unknown authored
      into  trift2.:/MySQL/M50/push-5.0
      
      
      extra/yassl/taocrypt/taocrypt.dsp:
        Auto merged
      extra/yassl/yassl.dsp:
        Auto merged
      extra/yassl/yassl.vcproj:
        Auto merged
      extra/yassl/taocrypt/taocrypt.vcproj:
        Auto merged
      extra/yassl/taocrypt/benchmark/benchmark.dsp:
        Auto merged
      extra/yassl/taocrypt/test.dsp:
        Auto merged
      extra/yassl/testsuite/testsuite.dsp:
        Auto merged
      c8b23c37
  10. 27 Nov, 2006 5 commits