An error occurred fetching the project authors.
  1. 22 Jul, 2004 1 commit
    • unknown's avatar
      Fixed BUG#4579: Execution of SP crashes server. · 8a33c2bc
      unknown authored
      Sub-CALLs of procedures zapped thd->current_arena for good.
      
      
      mysql-test/r/sp.result:
        New test case for BUG#4579.
      mysql-test/t/sp.test:
        New test case for BUG#4579.
      sql/sp_head.cc:
        Keep and restore old thd->current_arena before/after executing an SP,
        instead of just setting it to 0 afterwards.
      8a33c2bc
  2. 21 Jul, 2004 2 commits
    • unknown's avatar
      after merge fixes · 1d29e6b0
      unknown authored
      sql/opt_range.h:
        compatibility fix
      sql/sql_lex.cc:
        cleanup
      1d29e6b0
    • unknown's avatar
      Fixed BUG#2653: Undeclared variables not detected in stored procedures. · 28287c0d
      unknown authored
      We now get an run-time error instead of a crash (although a slightly misleading
      error message, but it's an improvement).
      
      
      mysql-test/r/sp-error.result:
        New test case for BUG#2653.
      mysql-test/t/sp-error.test:
        New test case for BUG#2653.
      sql/sp_head.cc:
        Detect failed evals (fix item really), which are due to unresolved variables/fields.
        Typically this would be a reference to an undeclared variable.
        (Also got rid of some compiler warnings.)
      sql/sp_rcontext.cc:
        Detect failed evals (fix item really), which are due to unresolved variables/fields.
        Typically this would be a reference to an undeclared variable.
      sql/sp_rcontext.h:
        Changed return type to int, so be able to detect failed evals (fix item).
      sql/sql_class.cc:
        Changed return type to int, so be able to detect failed evals (fix item).
      28287c0d
  3. 16 Jul, 2004 1 commit
    • unknown's avatar
      Fixes for bug #4571 (Windows compabilities) · 45cbab28
      unknown authored
      sql/opt_range.cc:
        Fix for unreferenced local variable, cast and indirection to different types
      sql/sp_head.cc:
        Fix for unreferenced variables and cast
      sql/sql_acl.cc:
        Fix for unreferenced variable
      sql/sql_db.cc:
        Fix for unreferenced variable and cast
      sql/sql_insert.cc:
        Fix for cast and redifinition of variable declared  i (VC++ bug)
      sql/sql_parse.cc:
        Fix for cast
      sql/sql_update.cc:
        Fix for cast
      45cbab28
  4. 15 Jul, 2004 1 commit
    • unknown's avatar
      After merge fixes · 46ea874f
      unknown authored
      Note: The following tests fails
      - fulltext (Sergei has promised to fix)
      - rpl_charset (Guilhem should fix)
      - rpl_timezone (Dimitray has promised to fix)
      
      Sanja needs to check out the calling of close_thread_tables() in sp_head.cc
      
      
      myisam/mi_check.c:
        After merge fix
      myisam/sort.c:
        After merge fix
      mysql-test/mysql-test-run.sh:
        Export master socket to mysqltest
      mysql-test/r/func_group.result:
        Make result repeatable
      mysql-test/r/mysqlbinlog.result:
        After merge fix
      mysql-test/r/ps_1general.result:
        After merge fix
      mysql-test/r/ps_2myisam.result:
        After merge fix
      mysql-test/r/ps_3innodb.result:
        After merge fix
      mysql-test/r/ps_4heap.result:
        After merge fix
      mysql-test/r/ps_5merge.result:
        After merge fix
      mysql-test/r/ps_6bdb.result:
        After merge fix
      mysql-test/r/rpl_flush_log_loop.result:
        After merge fix
      mysql-test/r/rpl_replicate_do.result:
        After merge fix
      mysql-test/r/rpl_temporary.result:
        After merge fix
      mysql-test/r/rpl_timezone.result:
        After merge fix
        Note that this test fails now (Dimitry has promised to fix this)
      mysql-test/r/rpl_user_variables.result:
        After merge fix
      mysql-test/r/select.result:
        After merge fix
      mysql-test/r/sp-error.result:
        After merge fix
      mysql-test/r/sp-security.result:
        After merge fix
      mysql-test/r/sp.result:
        After merge fix
      mysql-test/r/user_var.result:
        After merge fix
      mysql-test/r/variables.result:
        After merge fix
      mysql-test/t/alter_table.test:
        After merge fix
      mysql-test/t/derived.test:
        After merge fix
      mysql-test/t/func_group.test:
        Make result repeatable
      mysql-test/t/grant_cache.test:
        Use MASTER_MYSOCK instead of master.sock
      mysql-test/t/multi_update.test:
        Use MASTER_MYSOCK instead of master.sock
      mysql-test/t/rpl000015.test:
        Use MASTER_MYSOCK instead of master.sock
      mysql-test/t/rpl000017.test:
        Use MASTER_MYSOCK instead of master.sock
      mysql-test/t/rpl000018.test:
        Use MASTER_MYSOCK instead of master.sock
      mysql-test/t/rpl_charset.test:
        After merge fix
      mysql-test/t/rpl_heap.test:
        Use MASTER_MYSOCK instead of master.sock
      mysql-test/t/rpl_rotate_logs.test:
        Use MASTER_MYSOCK instead of master.sock
      mysql-test/t/sp-error.test:
        after merge fix
      mysql-test/t/sp-security.test:
        after merge fix
      mysql-test/t/user_var.test:
        after merge fix
      scripts/mysql_fix_privilege_tables.sh:
        This can now be exectued from the source distribution
      sql/handler.cc:
        Cleanup
      sql/handler.h:
        More debugging
      sql/item.h:
        Indentation fixes
      sql/item_cmpfunc.cc:
        After merge fixes
      sql/opt_range.cc:
        After merge fixes
      sql/opt_range.h:
        After merge fixes
      sql/sp.cc:
        After merge fixes
      sql/sp_head.cc:
        Remove closing of thread tables in a SP function as this caused a core dump.
        (Has to be fixed better)
      sql/sql_base.cc:
        More debugging
      sql/sql_handler.cc:
        After merge fixes
        (We have to call ha_index_or_rnd_end() before calling close_thread_table())
      sql/sql_parse.cc:
        More debugging
      sql/sql_prepare.cc:
        After merge fixes
      sql/sql_select.cc:
        After merge fixes
      46ea874f
  5. 12 Jul, 2004 1 commit
  6. 09 Jun, 2004 1 commit
    • unknown's avatar
      Fixed BUG#2564: SHOW CREATE inconsistent W.R.T ANSI_QUOTES. · 6762a651
      unknown authored
      It's not possible to quote the definition according to the current sql_mode
      setting, so instead we use the setting stored with the SP (that's how it's
      parsed anyway), and show this setting in the SHOW CREATE output.
      
      
      mysql-test/r/sp.result:
        Modifed SHOW CREATE FUNCTION|PROCEDURE output. Show the sql_mode used at
        creation as well.
        New test case for BUG#2564: SHOW CREATE inconsistent W.R.T ANSI_QUOTES.
      mysql-test/t/sp.test:
        New test case for BUG#2564: SHOW CREATE inconsistent W.R.T ANSI_QUOTES.
      sql/sp.cc:
        Rewrote create_string to quote things correctly according to the sql_mode
        used at creation time.
      sql/sp_head.cc:
        Store sql_mode in sp_head and use it for SHOW CREATE.
      sql/sp_head.h:
        Store sql_mode in sp_head and use it for SHOW CREATE.
      6762a651
  7. 08 Jun, 2004 1 commit
    • unknown's avatar
      Fixed proper restoring of current db on errors. · 54e3909b
      unknown authored
      This fixes part of BUG#3229: Stored procedure comment causes packets out of order.
      
      
      sql/sp.cc:
        Fixed proper restoring of current db on errors.
      sql/sp.h:
        Fixed proper restoring of current db on errors.
      sql/sp_head.cc:
        Fixed proper restoring of current db on errors.
      54e3909b
  8. 26 May, 2004 1 commit
  9. 19 May, 2004 1 commit
    • unknown's avatar
      PS and SP made compatible in mechanism used for preparing query for rexecutions (Bug #2266) · 16227c28
      unknown authored
      mysql-test/r/sp.result:
        test suite for Bug #2266
      mysql-test/t/sp.test:
        test suite for Bug #2266
      sql/item_subselect.cc:
        made ancestor for Statement (Item_arena)
      sql/item_subselect.h:
        made ancestor for Statement (Item_arena)
      sql/item_sum.cc:
        made ancestor for Statement (Item_arena)
      sql/item_sum.h:
        made ancestor for Statement (Item_arena)
      sql/mysql_priv.h:
        reset_stmt_for_execute use PS and SP
      sql/sp_head.cc:
        sp_head use Item_arena as ancestor to be PS cleunup compatible
        SP use PS storing/restoring/cleanup mechanisms
        cleanup() of SP Items added
        Items created in temporary memory pool during SP execution saved for normal freeing after SP execution
      sql/sp_head.h:
        sp_head use Item_arena
      sql/sql_base.cc:
        made ancestor for Statement (Item_arena)
        results of wild_setup made permanent
        setup_conds make natural joins expanding only once and store results in PS/SP memory
      sql/sql_class.cc:
        made ancestor for Statement (Item_arena)
      sql/sql_class.h:
        made ancestor for Statement (Item_arena)
        method to detect PS preparation added
      sql/sql_delete.cc:
        storing where for DELETE and mark first execution
      sql/sql_derived.cc:
        use method
      sql/sql_insert.cc:
        mark first execution for INSERT
      sql/sql_lex.cc:
        flags to correctly make transformations of query and storing them in memory of PS/SP
        made ancestor for Statement (Item_arena)
      sql/sql_lex.h:
        reved variable od SP ol saving data
        flags to correctly make transformations of query and storing them in memory of PS/SP
      sql/sql_parse.cc:
        cleunup unit for any query
      sql/sql_prepare.cc:
        made ancestor for Statement (Item_arena)
        storing where moved to preparation
        changed interface of reset_stmt_for_execute to use it is SP
        do not restore where/order by/group by before first execution (but tables and unit can be chenged without execution and should be prepared (subqueries executes on demand))
      sql/sql_select.cc:
        storing where for SELECT/multi-DELETE/... and mark first execution
      sql/sql_union.cc:
        made ancestor for Statement (Item_arena)
      sql/sql_update.cc:
        storing where for UPDATE and mark first execution
      16227c28
  10. 14 May, 2004 1 commit
    • unknown's avatar
      Post-merge fixes. · 3a272c1f
      unknown authored
      Note: One sp.test still fails (prime), and rpl_server_id2.test fails (will be fixed by guilhem ASAP).
      
      
      mysql-test/r/index_merge.result:
        Fixed syntax error (no ',' after last index in create table any more).
      mysql-test/r/index_merge_bdb.result:
        Fixed syntax error (no ',' after last index in create table any more).
      mysql-test/r/index_merge_innodb.result:
        Fixed syntax error (no ',' after last index in create table any more).
      mysql-test/r/index_merge_innodb2.result:
        Fixed syntax error (no ',' after last index in create table any more).
      mysql-test/r/rpl_server_id1.result:
        Update result after merge.
      mysql-test/r/sp-error.result:
        Update result after merge.
      mysql-test/r/variables.result:
        Update result after merge.
      mysql-test/t/index_merge.test:
        Fixed syntax error (no ',' after last index in create table any more).
      mysql-test/t/index_merge_bdb.test:
        Fixed syntax error (no ',' after last index in create table any more).
      mysql-test/t/index_merge_innodb.test:
        Fixed syntax error (no ',' after last index in create table any more).
      mysql-test/t/index_merge_innodb2.test:
        Fixed syntax error (no ',' after last index in create table any more).
      mysql-test/t/sp-error.test:
        Post-merge fix of error codes.
      sql/opt_range.cc:
        Manually merged by Monty.
      sql/opt_range.h:
        Manually merged by Monty.
      sql/slave.cc:
        Post-merge fixes with some help from Guilhem.
      sql/slave.h:
        Post-merge fixes with some help from Guilhem.
      sql/sp_head.cc:
        Got rid of warning (reordering initialization).
      sql/sql_parse.cc:
        Post-merge fix: Need to set/reset select_limit at SP CALL time as well.
      tests/client_test.c:
        Post-merge fix: key_len length in explain has changed.
      3a272c1f
  11. 06 Apr, 2004 1 commit
    • unknown's avatar
      Fixed BUG#2772: Function with character set clause fails in stored procedures. · 91dcd011
      unknown authored
      Complex return types were not stored correctly in the mysql.proc table.
      
      
      mysql-test/r/sp.result:
        New testcase for BUG2772.
      mysql-test/t/sp.test:
        New testcase for BUG2772.
      sql/sp_head.cc:
        Pick up character set for "returns" types in functions and add it separately,
        since it's missed when extracting the type during the parser. (Due to LALR
        behaviour.)
      sql/sp_head.h:
        Save the character set for returns clause in functions.
      sql/sql_yacc.yy:
        Pick up character set for "returns" types in functions since it's missed otherwise.
        (Due to LALR behaviour.)
      91dcd011
  12. 05 Apr, 2004 1 commit
    • unknown's avatar
      Fixed BUG#3287: Stored procedure handler scope outside of begin/end. · 4a7c72e9
      unknown authored
      Backpatching overwrote already backpatched instructions, which made it
      skip the hpop instruction; possibly not only a problem for handlers,
      but this is one known case when it happened.
      
      
      mysql-test/r/sp-error.result:
        New testcase for BUG#3287
      mysql-test/t/sp-error.test:
        New testcase for BUG#3287
      sql/sp_head.cc:
        Made the debug printout of hpush_jump instructions somewhat clearer.
      sql/sp_head.h:
        Don't backpatch the same instruction more than once.
      4a7c72e9
  13. 29 Mar, 2004 1 commit
    • unknown's avatar
      Enforce standard declaration order in SPs. · 7456a3e9
      unknown authored
      Added new test cases for this, and adjusted old tests accordingly,
      and new error codes and messages.
      Fixed bugs in some tests (bug2673 and use test).
      Added debug printing of instructions in SPs.
      
      
      include/mysqld_error.h:
        New error codes for non-standard declaration order in SPs.
      include/sql_state.h:
        New error codes for non-standard declaration order in SPs.
      mysql-test/r/sp-error.result:
        Enforce standard declaration order.
        Fixed syntax error in use-test.
        New test cases for wrong order.
      mysql-test/r/sp.result:
        Enforce strict declaration order.
        Fixed platform dependent bug2673 test.
      mysql-test/t/sp-error.test:
        Enforce standard declaration order.
        Fixed syntax error in use-test.
        New test cases for wrong order.
      mysql-test/t/sp.test:
        Enforce strict declaration order.
        Fixed platform dependent bug2673 test.
      sql/share/czech/errmsg.txt:
        New error messages for strict (standard) declaration order in SPs.
      sql/share/danish/errmsg.txt:
        New error messages for strict (standard) declaration order in SPs.
      sql/share/dutch/errmsg.txt:
        New error messages for strict (standard) declaration order in SPs.
      sql/share/english/errmsg.txt:
        New error messages for strict (standard) declaration order in SPs.
      sql/share/estonian/errmsg.txt:
        New error messages for strict (standard) declaration order in SPs.
      sql/share/french/errmsg.txt:
        New error messages for strict (standard) declaration order in SPs.
      sql/share/german/errmsg.txt:
        New error messages for strict (standard) declaration order in SPs.
      sql/share/greek/errmsg.txt:
        New error messages for strict (standard) declaration order in SPs.
      sql/share/hungarian/errmsg.txt:
        New error messages for strict (standard) declaration order in SPs.
      sql/share/italian/errmsg.txt:
        New error messages for strict (standard) declaration order in SPs.
      sql/share/japanese/errmsg.txt:
        New error messages for strict (standard) declaration order in SPs.
      sql/share/korean/errmsg.txt:
        New error messages for strict (standard) declaration order in SPs.
      sql/share/norwegian-ny/errmsg.txt:
        New error messages for strict (standard) declaration order in SPs.
      sql/share/norwegian/errmsg.txt:
        New error messages for strict (standard) declaration order in SPs.
      sql/share/polish/errmsg.txt:
        New error messages for strict (standard) declaration order in SPs.
      sql/share/portuguese/errmsg.txt:
        New error messages for strict (standard) declaration order in SPs.
      sql/share/romanian/errmsg.txt:
        New error messages for strict (standard) declaration order in SPs.
      sql/share/russian/errmsg.txt:
        New error messages for strict (standard) declaration order in SPs.
      sql/share/serbian/errmsg.txt:
        New error messages for strict (standard) declaration order in SPs.
      sql/share/slovak/errmsg.txt:
        New error messages for strict (standard) declaration order in SPs.
      sql/share/spanish/errmsg.txt:
        New error messages for strict (standard) declaration order in SPs.
      sql/share/swedish/errmsg.txt:
        New error messages for strict (standard) declaration order in SPs.
      sql/share/ukrainian/errmsg.txt:
        New error messages for strict (standard) declaration order in SPs.
      sql/sp_head.cc:
        Debug printing of instructions in procedures.
        New error instruction for future use.
      sql/sp_head.h:
        Debug printing of instructions in procedures.
        New error instruction for future use.
      sql/sql_string.cc:
        New methods needed by debug printing of instruction in SPs.
      sql/sql_string.h:
        New methods needed by debug printing of instruction in SPs.
      sql/sql_yacc.yy:
        Check for standard order of declarations in SPs.
      7456a3e9
  14. 19 Mar, 2004 1 commit
    • unknown's avatar
      WL#1366: Use the schema (db) associated with an SP. · d2ad3cff
      unknown authored
      Phase 3: Made qualified names work for functions as well.
      
      
      mysql-test/r/sp-security.result:
        New testcases for functions with qualified names.
      mysql-test/t/sp-security.test:
        New testcases for functions with qualified names.
      sql/item_func.cc:
        Added error handling for stored function, if it doesn't exist.
      sql/item_func.h:
        Set null_value if execution of a stored function fails.
      sql/mysql_priv.h:
        Reverted previous change: No optional args for mysql_change_db().
        (SPs use a specially tailored function instead.)
      sql/sp.cc:
        Copied mysql_change_db() from sql_db.cc and modified specially for SPs.
      sql/sp_head.cc:
        Fixed error handling for errors in functions during query/statement execution.
      sql/sql_db.cc:
        Reverted previous change: No optional args for mysql_change_db().
        (SPs use a specially tailored function instead.)
      sql/sql_yacc.yy:
        Reworked the stored function/UDF invokation parsing and added qualified names
        for stored functions. UDFs now have precedence over stored functions (whith
        unqualified name). When using an unqualified name, only IDENT_sys is allowed
        (i.e. no unreserved keywords), since we get unresolvable reduce/reduce conflicts
        otherwise.
      d2ad3cff
  15. 11 Mar, 2004 1 commit
    • unknown's avatar
      WL#1366: Use the schema (db) associated with an SP. · eb4aa092
      unknown authored
      Phase 2: Make SPs belong to a DB, and use qualified names.
        As a side effect, using USE in an SP is no longer allowed.
        (It just doesn't work otherwise.)
      
      
      include/mysqld_error.h:
        New error code (USE is no longer allowed in a stored procedure).
      include/sql_state.h:
        New error state (USE is no longer allowed in a stored procedure).
      mysql-test/r/sp-error.result:
        Updated result for test of USE in SP (not allowed now).
      mysql-test/r/sp-security.result:
        Updated test results for new db column and qualified procedured names.
      mysql-test/r/sp.result:
        Updated results for USE in SP (as it's no longer allowed), and
        for new db column in status result.
      mysql-test/t/sp-error.test:
        Moved test of USE in SP from sp.test (as it's no longer allowed).
      mysql-test/t/sp-security.test:
        Ajusted tests for new db column and qualified procedured names.
      mysql-test/t/sp.test:
        Moved test of USE in SP to sp-error.test (as it's no longer allowed).
        Adjusted tests for new db column in status result.
      sql/mysql_priv.h:
        mysql_change_db() now has optional arguments for use by SP with qualified names.
      sql/share/czech/errmsg.txt:
        New error message: USE is not allowed in a stored procedure.
      sql/share/danish/errmsg.txt:
        New error message: USE is not allowed in a stored procedure.
      sql/share/dutch/errmsg.txt:
        New error message: USE is not allowed in a stored procedure.
      sql/share/english/errmsg.txt:
        New error message: USE is not allowed in a stored procedure.
      sql/share/estonian/errmsg.txt:
        New error message: USE is not allowed in a stored procedure.
      sql/share/french/errmsg.txt:
        New error message: USE is not allowed in a stored procedure.
      sql/share/german/errmsg.txt:
        New error message: USE is not allowed in a stored procedure.
      sql/share/greek/errmsg.txt:
        New error message: USE is not allowed in a stored procedure.
      sql/share/hungarian/errmsg.txt:
        New error message: USE is not allowed in a stored procedure.
      sql/share/italian/errmsg.txt:
        New error message: USE is not allowed in a stored procedure.
      sql/share/japanese/errmsg.txt:
        New error message: USE is not allowed in a stored procedure.
      sql/share/korean/errmsg.txt:
        New error message: USE is not allowed in a stored procedure.
      sql/share/norwegian-ny/errmsg.txt:
        New error message: USE is not allowed in a stored procedure.
      sql/share/norwegian/errmsg.txt:
        New error message: USE is not allowed in a stored procedure.
      sql/share/polish/errmsg.txt:
        New error message: USE is not allowed in a stored procedure.
      sql/share/portuguese/errmsg.txt:
        New error message: USE is not allowed in a stored procedure.
      sql/share/romanian/errmsg.txt:
        New error message: USE is not allowed in a stored procedure.
      sql/share/russian/errmsg.txt:
        New error message: USE is not allowed in a stored procedure.
      sql/share/serbian/errmsg.txt:
        New error message: USE is not allowed in a stored procedure.
      sql/share/slovak/errmsg.txt:
        New error message: USE is not allowed in a stored procedure.
      sql/share/spanish/errmsg.txt:
        New error message: USE is not allowed in a stored procedure.
      sql/share/swedish/errmsg.txt:
        New error message: USE is not allowed in a stored procedure.
      sql/share/ukrainian/errmsg.txt:
        New error message: USE is not allowed in a stored procedure.
      sql/sp.cc:
        SPs are now "belong" to a DB and may have qualified names.
        New functions for changing DB ("use") when parsing and invoking SPs.
      sql/sp.h:
        New functions for changing DB ("use") when parsing and invoking SPs.
      sql/sp_cache.cc:
        Use the qualified name in the SP cache.
      sql/sp_head.cc:
        New function for allocating a qualified SP name (used in sql_yacc.yy).
        Change DB when executing an SP (if needed).
        Moved thd_mem_root swap functions from sp_head.h.
      sql/sp_head.h:
        New function for allocating a qualified SP name (used in sql_yacc.yy).
        Moved thd_mem_root swap functions to sp_head.cc.
      sql/sql_db.cc:
        mysql_change_db() now has optional arguments for use by SP with qualified names
        (for use when reading an SP from database and executing it); also allow "unusing"
        a database, i.e. setting thd->thd to "".
      sql/sql_yacc.yy:
        Initialize qualfied SP names correctly.
        USE is no longer allowed in an SP.
      eb4aa092
  16. 01 Mar, 2004 1 commit
    • unknown's avatar
      Fixed small race condition, when global query_id was modified · 23a6b4ed
      unknown authored
      without proper locking.
      
      
      sql/sp_head.cc:
        Added missing locking of LOCK_thread_count to place where ::query_id is 
        modified.
      sql/sql_parse.cc:
        Added comment to the only place where we are modifying ::query_id
        without following locking protocol, to avoid mistakes in future.
      BitKeeper/etc/logging_ok:
        Logging to logging@openlogging.org accepted
      23a6b4ed
  17. 17 Feb, 2004 1 commit
    • unknown's avatar
      WL#1366: Use the schema (db) associated with an SP. · e55c4ed1
      unknown authored
      Phase 1: Introduced sp_name class, for qualified name support.
      
      
      sql/item_func.cc:
        Introduced sp_name class; moved some methods from item_func.h.
      sql/item_func.h:
        Introduced sp_name class; moved some methods to item_func.cc.
      sql/sp.cc:
        Introduced sp_name class, for qualified name support.
      sql/sp.h:
        Introduced sp_name class, for qualified name support.
      sql/sp_cache.cc:
        Introduced sp_name class, for qualified name support.
      sql/sp_cache.h:
        Introduced sp_name class, for qualified name support.
      sql/sp_head.cc:
        Introduced sp_name class, for qualified name support.
      sql/sp_head.h:
        Introduced sp_name class, for qualified name support.
      sql/sql_lex.h:
        Introduced sp_name class, for qualified name support.
      sql/sql_parse.cc:
        Introduced sp_name class, for qualified name support.
      sql/sql_yacc.yy:
        Introduced sp_name class, for qualified name support.
      e55c4ed1
  18. 03 Feb, 2004 1 commit
    • unknown's avatar
      sp.test: · 323bca33
      unknown authored
        test case for the fix for bug #2614
      sp_head.cc:
        A fix for a crashing bug in stored procedures with INSERT ... SELECT ... (Bug #2514)
      
      
      sql/sp_head.cc:
        A fix for a crashing bug in stored procedures with INSERT ... SELECT ... (Bug #2514)
      mysql-test/t/sp.test:
        test case for the fix for bug #2614
      323bca33
  19. 26 Jan, 2004 1 commit
  20. 21 Jan, 2004 1 commit
    • unknown's avatar
      Fixed BUG#2227: Server crash with stored procedure call. · 219f51b4
      unknown authored
      (Meaning "... with SELECT v", where v is a local variable.)
      
      
      mysql-test/r/sp.result:
        Test case for BUG#2227
      mysql-test/t/sp.test:
        Test case for BUG#2227
      sql/item.h:
        Item_splocal::send() needed for "SELEC v", where "v" is a local variable.
        Also set the field name.
      sql/sp_head.cc:
        Have to get decimals and max_length right for reals, when SELECT of local variables.
      219f51b4
  21. 09 Jan, 2004 1 commit
    • unknown's avatar
      Fix BUG#2269: Lost connect if stored procedure called before USE · b0928683
      unknown authored
      (And some minor correction of cursor open)
      
      
      sql/sp_head.cc:
        Detect some errors that doesn't result in a non-zero return code in
        the SP execution loop.
        (Also corrected the cursor post_open() call.)
      sql/sp_rcontext.cc:
        Corrected the semantics of cursor post_open().
      sql/sp_rcontext.h:
        Corrected the semantics of cursor post_open().
      b0928683
  22. 21 Dec, 2003 1 commit
    • unknown's avatar
      Update for VC++ · 4f72061f
      unknown authored
      (Fixed project files, compiler warnings etc..)
      
      
      BitKeeper/etc/ignore:
        added mysql_priv.h
      VC++Files/libmysqld/libmysqld.dsp:
        Update for VC++to
      VC++Files/sql/mysqld.dsp:
        Update for VC++
      client/mysqlbinlog.cc:
        Remove not used variable
      sql-common/client.c:
        Fix for compilation with VC++
      sql/filesort.cc:
        Remove not used variable
      sql/item_timefunc.cc:
        Fixed compiler warnings
      sql/log_event.cc:
        Fixed compiler warnings
        - One can't portable allocate an stack-array dynamicly
        - Changed sql_mode to ulong to match THD.variables.sql_mode (If they are not the same we get a lot of compiler warnings)
      sql/log_event.h:
        Changed sql_mode to ulong to match THD.variables.sql_mode (If they are not the same we get a lot of compiler warnings)
      sql/sp.cc:
        sql_mode to ulong
        Don't use strcpy
        Replaced sprintf() with strmov
      sql/sp_cache.cc:
        Fixed compiler warning
      sql/sp_head.cc:
        Removed not used variable
      sql/sp_rcontext.cc:
        Removed not used variable
      sql/sp_rcontext.h:
        Fixed compiler warning
      sql/sql_class.cc:
        Portability fix
      sql/sql_delete.cc:
        Fixed compiler warning
      sql/sql_insert.cc:
        Fixed compiler warning
      sql/sql_update.cc:
        Fixed compiler warning
      4f72061f
  23. 16 Dec, 2003 1 commit
    • unknown's avatar
      Forgot to wrap things in #ifndef NO_EMBEDDED_ACCESS_CHECKS for the embedded server. · 241bb226
      unknown authored
      Added missing cleanup in sp-security.test.
      
      
      mysql-test/r/sp-security.result:
        Added clean-up.
      mysql-test/t/sp-security.test:
        Added clean-up.
      sql/item_func.cc:
        Forgot to wrap things in #ifndef NO_EMBEDDED_ACCESS_CHECKS for the embedded server.
      sql/sp_head.cc:
        Forgot to wrap things in #ifndef NO_EMBEDDED_ACCESS_CHECKS for the embedded server.
      sql/sp_head.h:
        Forgot to wrap things in #ifndef NO_EMBEDDED_ACCESS_CHECKS for the embedded server.
      sql/sql_parse.cc:
        Forgot to wrap things in #ifndef NO_EMBEDDED_ACCESS_CHECKS for the embedded server.
      241bb226
  24. 15 Dec, 2003 1 commit
    • unknown's avatar
      Fixed various memory leaks. · 1d77c041
      unknown authored
      sql/sp.cc:
        Fixed memory leaks. Deletion of sps now in sp_cache.
      sql/sp_cache.cc:
        Fixed memory leaks. Use implicit delete of objects to make sure
        they're always freed.
      sql/sp_cache.h:
        Fixed memory leaks. Use implicit delete of objects to make sure
        they're always freed.
      sql/sp_head.cc:
        Fixed memory leaks. Make sure we use the right mem_root during parsing.
      sql/sp_head.h:
        Fixed memory leaks. Make sure we use the right mem_root during parsing.
      sql/sql_parse.cc:
        Fixed memory leaks. Don't forget to free the temporary object created at definition.
      sql/sql_yacc.yy:
        Fixed memory leaks. Make sure we use the right mem_root during parsing.
      1d77c041
  25. 13 Dec, 2003 1 commit
    • unknown's avatar
      WL#1365: Implement definer's rights execution of stored procedures. · a6f85eea
      unknown authored
      (Also put the hostpart back in the definer column.)
      
      
      mysql-test/r/sp-error.result:
        Moved error test from sp.test
      mysql-test/r/sp.result:
        Moved error test to sp-error.test.
        Put hostpart back into definer column in mysql.proc.
      mysql-test/t/sp-error.test:
        Moved error test from sp.test
      mysql-test/t/sp.test:
        Moved error test to sp-error.test.
        Put hostpart back into definer column in mysql.proc.
      sql/item_func.cc:
        (Maybe) switch security context before invoking a stored function.
      sql/sp.cc:
        Renamed creator into definer, for more consistent terminology, and put the
        hostpart back.
      sql/sp_head.cc:
        Some fixes in the way things are allocated, and moved set_info() definition
        here from sp_head.h. creator is now called definer, and is split into a
        user and host part.
        Added functions for (possible) change and restore of privileges, for sql security
        definer calls.
      sql/sp_head.h:
        Moved set_info() definition here from sp_head.h.
        creator is now called definer, and is split into a user and host part.
        Added functions for (possible) change and restore of privileges, for sql security
        definer calls.
      sql/sql_acl.cc:
        New function acl_getroot_no_password() for getting the privileges used when
        calling an SP with sql security definer.
      sql/sql_acl.h:
        New function acl_getroot_no_password() for getting the privileges used when
        calling an SP with sql security definer.
      sql/sql_parse.cc:
        (Maybe) switch security context before invoking a stored procedure.
      sql/sql_yacc.yy:
        Fixed typo.
      a6f85eea
  26. 12 Dec, 2003 1 commit
    • unknown's avatar
      In order to make ALTER PROCEDURE|FUNCTION work correctly, and in general to · cabd28c6
      unknown authored
      make characteristics (and SHOW) work right, we had to separate the old
      definition blob in the mysql.proc table into separate fields for parameters,
      return type, and body, and handle the characteristics (like SQL SECURITY)
      separately... and then reassemble the CREATE string for parsing, of course.
      This is rather ugly, mostly the parser bit. (Hopefully that will be better
      with the new parser.)
      
      
      Docs/sp-imp-spec.txt:
        Separated the definitions string of the procedure into different columns
        in the mysql.proc schema.
      mysql-test/r/sp.result:
        New characteristics tests.
      mysql-test/t/sp.test:
        New characteristics tests.
      scripts/mysql_create_system_tables.sh:
        Separated the definitions string of the procedure into different columns
        in the mysql.proc schema.
      scripts/mysql_fix_privilege_tables.sql:
        Separated the definitions string of the procedure into different columns
        in the mysql.proc schema.
      sql/sp.cc:
        Separated the definitions string of the procedure into different columns.
        Rewrote much of the code related this (have a assemble the definition
        string from its different parts now) and the way characteristics are now
        handled, in order to make ALTER actually work.
      sql/sp.h:
        Changed prototypes.
      sql/sp_head.cc:
        Rewrote much of the code related to the new mysql.proc schema with separate
        definition fields (have to assemble the definition string from its different
        parts now) and the way characteristics are now handled, in order to make ALTER
        actually work.
      sql/sp_head.h:
        Separated the different parts of the definition strings: name, parameters,
        return type (for functions) and body.
      sql/sql_yacc.yy:
        Separated the different parts of the definition strings: name, parameters,
        return type (for functions) and body.
        This is ugly and messy; hopefully there's a more elegant way to do this
        when the new parser is installed.
      cabd28c6
  27. 10 Dec, 2003 1 commit
    • unknown's avatar
      WL#1363: Update the mysql.proc table and add new fields. · 3702a1db
      unknown authored
      Also made the parsing and handling of SP characteristics
      more general and extendable, and added a few ch:istics.
      
      
      Docs/sp-imp-spec.txt:
        Updated spec with new schema.
      Docs/sp-implemented.txt:
        Added info about ALTER and SHOW.
      mysql-test/r/sp.result:
        Minor change in SHOW FUNCTION|PROCEDURE STATUS output.
      scripts/mysql_create_system_tables.sh:
        New mysql.proc schema.
      scripts/mysql_fix_privilege_tables.sql:
        New mysql.proc schema.
      sql/lex.h:
        New lex words for SP characteristics.
      sql/sp.cc:
        New mysql.proc schema.
        Also made the characteristics handling slightly more extendable.
      sql/sp.h:
        Made the characteristics handling slightly more extendable.
      sql/sp_head.cc:
        Made the characteristics handling slightly more extendable.
      sql/sp_head.h:
        Made the characteristics handling slightly more extendable.
      sql/sql_lex.h:
        Made the characteristics handling slightly more extendable.
      sql/sql_parse.cc:
        Made the characteristics handling slightly more extendable.
      sql/sql_yacc.yy:
        Made the characteristics handling slightly more extendable
        and made the parsing of characteristics more general, and
        added a few new dito. (LANGUAGE SQL, and [NOT] DETERMINISTIC
        for starters).
      3702a1db
  28. 04 Dec, 2003 2 commits
    • unknown's avatar
      Fixed another compiler error on HP-UX. · 722d19c3
      unknown authored
      722d19c3
    • unknown's avatar
      Fixed BUG#336: Subselects with tables does not work as values for local SP variables · 3aaa8ab9
      unknown authored
       and BUG#1654: Stored Procedure Crash if contains subquery and set function
      
      Disallowed subselects in RETURN (for FUNCTIONs) and SET of local variables.
      The latter should work, but turned out to be difficult to fix, so we just
      disallow it for the time being.
      
      
      include/mysqld_error.h:
        New error message for unsupported subselect as SP set values (for the time being).
      include/sql_state.h:
        New error message for unsupported subselect as SP set values (for the time being).
      mysql-test/r/sp-error.result:
        Test cases for BUG#336 and BUG#1654. (Unsupported use of subselect)
      mysql-test/t/sp-error.test:
        Test cases for BUG#336 and BUG#1654. (Unsupported use of subselect)
      sql/item.cc:
        Made Item_splocal::type() work at compile time, for error checking.
      sql/item.h:
        Made Item_splocal::type() work at compile time, for error checking.
      sql/share/czech/errmsg.txt:
        New error message for unsupported subselect as SP set values (for the time being).
      sql/share/danish/errmsg.txt:
        New error message for unsupported subselect as SP set values (for the time being).
      sql/share/dutch/errmsg.txt:
        New error message for unsupported subselect as SP set values (for the time being).
      sql/share/english/errmsg.txt:
        New error message for unsupported subselect as SP set values (for the time being).
      sql/share/estonian/errmsg.txt:
        New error message for unsupported subselect as SP set values (for the time being).
      sql/share/french/errmsg.txt:
        New error message for unsupported subselect as SP set values (for the time being).
      sql/share/german/errmsg.txt:
        New error message for unsupported subselect as SP set values (for the time being).
      sql/share/greek/errmsg.txt:
        New error message for unsupported subselect as SP set values (for the time being).
      sql/share/hungarian/errmsg.txt:
        New error message for unsupported subselect as SP set values (for the time being).
      sql/share/italian/errmsg.txt:
        New error message for unsupported subselect as SP set values (for the time being).
      sql/share/japanese/errmsg.txt:
        New error message for unsupported subselect as SP set values (for the time being).
      sql/share/korean/errmsg.txt:
        New error message for unsupported subselect as SP set values (for the time being).
      sql/share/norwegian-ny/errmsg.txt:
        New error message for unsupported subselect as SP set values (for the time being).
      sql/share/norwegian/errmsg.txt:
        New error message for unsupported subselect as SP set values (for the time being).
      sql/share/polish/errmsg.txt:
        New error message for unsupported subselect as SP set values (for the time being).
      sql/share/portuguese/errmsg.txt:
        New error message for unsupported subselect as SP set values (for the time being).
      sql/share/romanian/errmsg.txt:
        New error message for unsupported subselect as SP set values (for the time being).
      sql/share/russian/errmsg.txt:
        New error message for unsupported subselect as SP set values (for the time being).
      sql/share/serbian/errmsg.txt:
        New error message for unsupported subselect as SP set values (for the time being).
      sql/share/slovak/errmsg.txt:
        New error message for unsupported subselect as SP set values (for the time being).
      sql/share/spanish/errmsg.txt:
        New error message for unsupported subselect as SP set values (for the time being).
      sql/share/swedish/errmsg.txt:
        New error message for unsupported subselect as SP set values (for the time being).
      sql/share/ukrainian/errmsg.txt:
        New error message for unsupported subselect as SP set values (for the time being).
      sql/sp_head.cc:
        Fixed (bogus) compile error on HP-UX alpha.
      sql/sql_yacc.yy:
        Disallowed subselects in RETURN (for FUNCTIONs) and SET of local variables.
        The latter should work, but turned out to be difficult to fix, so we just
        disallow it for the time being.
      3aaa8ab9
  29. 21 Nov, 2003 1 commit
  30. 20 Nov, 2003 1 commit
  31. 19 Nov, 2003 2 commits
    • unknown's avatar
      Post-merge fixes. · afe2186e
      unknown authored
      afe2186e
    • unknown's avatar
      Fixed BUG#1862 (flush table in SPs didn't work). · bd226350
      unknown authored
      Fixed various bugs: setting local variables to NULL, SELECT INTO var now actually
      might work, SELECT INTO with not row now gives a "no data" warning (instead of
      the "empty query" error), etc.
      Updated test cases accordingly.
      
      
      mysql-test/r/sp-error.result:
        Corrected security syntax for alter/create procedure.
      mysql-test/r/sp.result:
        Corrected security syntax for alter/create procedure.
        New tests for setting local variables to null,
        bug fixes for SELECT INTO var, FLUSH TABLES calls (BUG#1862),
        and corrected "no data" warning for SELECT INTO with no rows.
      mysql-test/t/sp-error.test:
        Corrected security syntax for alter/create procedure.
      mysql-test/t/sp.test:
        Corrected security syntax for alter/create procedure.
        New tests for setting local variables to null,
        bug fixes for SELECT INTO var, FLUSH TABLES calls (BUG#1862),
        and corrected "no data" warning for SELECT INTO with no rows.
      sql/lex.h:
        Added SQL_SYM (and added a few _SYM suffixes for new symbols).
      sql/sp_head.cc:
        Fixed bug in the item_list copying for "with_wild" cases (list nodes ended
        up in the wrong memroot).
        Catch errors and warnings even if return values is 0 from sub-statements.
        Restore table_list which is zapped by SQLCOM_CREATE_TABLE and INSERT_SELECT.
        Set old table pointers to NULL after sub-statement call (since all tables are
        closed).
      sql/sql_class.cc:
        Corrected error message when no rows return by a SELECT INTO var; should
        be a "no data" warning.
      sql/sql_lex.h:
        Have to store the original table_list first pointer for some
        sub-statements in SPs.
      sql/sql_yacc.yy:
        Corrected SECURITY INVOKER/DEFINER syntax ("SQL" missing), added some _SYM
        suffixes, and fixed valgrind complaints for SP COMMENTs.
        (Also removed some now irrelevant comments.)
      bd226350
  32. 17 Nov, 2003 2 commits
    • unknown's avatar
      WL#1241: SHOW PROCEDURE/FUNCTION · 6c1a2b7f
      unknown authored
      WL#1263: Support for the attributes COMMENT and SUID
               in CREATE/ALTER PROCEDURE/FUNCTION
      
      
      include/mysqld_error.h:
        Error code for 'alter procedure'
      mysql-test/r/sp-error.result:
        Test for WL#1241&WL#1263
      mysql-test/r/sp.result:
        Test for WL#1241&WL#1263
      mysql-test/t/sp-error.test:
        Test for WL#1241&WL#1263
      mysql-test/t/sp.test:
        Test for WL#1241&WL#1263
      sql/share/czech/errmsg.txt:
        Error massage for 'alter procedure'
      sql/share/danish/errmsg.txt:
        Error massage for 'alter procedure'
      sql/share/dutch/errmsg.txt:
        Error massage for 'alter procedure'
      sql/share/english/errmsg.txt:
        Error massage for 'alter procedure'
      sql/share/estonian/errmsg.txt:
        Error massage for 'alter procedure'
      sql/share/french/errmsg.txt:
        Error massage for 'alter procedure'
      sql/share/german/errmsg.txt:
        Error massage for 'alter procedure'
      sql/share/greek/errmsg.txt:
        Error massage for 'alter procedure'
      sql/share/hungarian/errmsg.txt:
        Error massage for 'alter procedure'
      sql/share/italian/errmsg.txt:
        Error massage for 'alter procedure'
      sql/share/japanese/errmsg.txt:
        Error massage for 'alter procedure'
      sql/share/korean/errmsg.txt:
        Error massage for 'alter procedure'
      sql/share/norwegian-ny/errmsg.txt:
        Error massage for 'alter procedure'
      sql/share/norwegian/errmsg.txt:
        Error massage for 'alter procedure'
      sql/share/polish/errmsg.txt:
        Error massage for 'alter procedure'
      sql/share/portuguese/errmsg.txt:
        Error massage for 'alter procedure'
      sql/share/romanian/errmsg.txt:
        Error massage for 'alter procedure'
      sql/share/russian/errmsg.txt:
        Error massage for 'alter procedure'
      sql/share/serbian/errmsg.txt:
        Error massage for 'alter procedure'
      sql/share/slovak/errmsg.txt:
        Error massage for 'alter procedure'
      sql/share/spanish/errmsg.txt:
        Error massage for 'alter procedure'
      sql/share/swedish/errmsg.txt:
        Error massage for 'alter procedure'
      sql/share/ukrainian/errmsg.txt:
        Error massage for 'alter procedure'
      6c1a2b7f
    • unknown's avatar
      Bugfix, handling null values. · 74e77582
      unknown authored
      74e77582
  33. 28 Oct, 2003 1 commit
  34. 20 Oct, 2003 1 commit
    • unknown's avatar
      Bugfix; added another method to Item_splocal, updated tests, and added previous · 2b1dc5f3
      unknown authored
      fix to functions as well.
      
      
      mysql-test/r/sp.result:
        Modified test to trap yet another bug (now fixed).
      mysql-test/t/sp.test:
        Modified test to trap yet another bug (now fixed).
      sql/item.h:
        Another bugfix; need to override yet another method in Item_splocal.
      sql/sp_head.cc:
        Completed previous initialization bug; now for FUNCTIONs. too.
      2b1dc5f3
  35. 17 Oct, 2003 1 commit
    • unknown's avatar
      Bugfix. Local variables are now initialized to null. · 82e5115a
      unknown authored
      mysql-test/r/sp.result:
        New test case for bugfix (when a variable is not set due to an exception).
      mysql-test/t/sp.test:
        New test case for bugfix (when a variable is not set due to an exception).
      sql/item.h:
        Local variables are initialized to null.
      sql/sp_head.cc:
        Local variables are initialized to null.
      82e5115a
  36. 16 Oct, 2003 1 commit
    • unknown's avatar
      Handle user variables (@-vars) as OUT and INOUT parameters in SPs. · 12a0546d
      unknown authored
      mysql-test/r/sp.result:
        Test cases for user variables (@-vars) as OUT and INOUT parameters.
      mysql-test/t/sp.test:
        Test cases for user variables (@-vars) as OUT and INOUT parameters.
      sql/item_func.h:
        We need to be able to detect Item_func_get_user_vars when used as arguments to SPs.
      sql/sp_head.cc:
        Handle user variables (@-vars) as OUT and INOUT parameters.
        But we still just ignore it, if it's anything else.
      12a0546d