Commit graph

1748 commits

Author SHA1 Message Date
unknown
d75ea9bcd6 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-5.0


mysql-test/r/view.result:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/table.h:
  Auto merged
2004-09-04 15:32:13 +03:00
bell@sanja.is.com.ua
161662ba4c Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-5.0
2004-09-04 15:32:13 +03:00
unknown
2c3f49a64d Fixed BUG#5307: Stored procedure allows statement after BEGIN ... END.
mysql-test/r/sp.result:
  New test case for BUG#5307
mysql-test/t/sp.test:
  New test case for BUG#5307
sql/sp_head.cc:
  Use the correct end-of-query pointer when extracting the body in the case
  of a create procedure compound with another statement.
2004-09-02 19:14:34 +02:00
pem@mysql.comhem.se
e04f4fb46c Fixed BUG#5307: Stored procedure allows statement after BEGIN ... END. 2004-09-02 19:14:34 +02:00
unknown
55b806b517 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-5.0


sql/item.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
2004-09-02 07:52:29 +03:00
bell@sanja.is.com.ua
31dacc6ede Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-5.0
2004-09-02 07:52:29 +03:00
unknown
6e314e047d fixed open_and_lock_tables result processing (all open_and_lock_tables revision)
fixed printing of COLLATE operation
(BUG#5155)


mysql-test/r/case.result:
  fixed printing of COLLATE operation
mysql-test/r/func_if.result:
  fixed printing of COLLATE operation
mysql-test/r/func_in.result:
  fixed printing of COLLATE operation
mysql-test/r/func_str.result:
  fixed printing of COLLATE operation
mysql-test/r/func_test.result:
  fixed printing of COLLATE operation
mysql-test/r/view.result:
  VIEW with collation
mysql-test/t/view.test:
  VIEW with collation
sql/item_strfunc.cc:
  fixed printing of COLLATE operation
sql/item_strfunc.h:
  fixed printing of COLLATE operation
sql/sp_head.cc:
  fixed open_and_lock_tables result processing
sql/sql_base.cc:
  fixed open_and_lock_tables result processing
sql/sql_delete.cc:
  fixed open_and_lock_tables result processing
sql/sql_help.cc:
  fixed open_and_lock_tables result processing
sql/sql_load.cc:
  fixed open_and_lock_tables result processing
sql/sql_parse.cc:
  fixed open_and_lock_tables result processing
sql/sql_prepare.cc:
  fixed open_and_lock_tables result processing
sql/sql_show.cc:
  fixed open_and_lock_tables result processing
sql/sql_update.cc:
  fixed open_and_lock_tables result processing
2004-08-31 10:06:38 +03:00
bell@sanja.is.com.ua
392c306969 fixed open_and_lock_tables result processing (all open_and_lock_tables revision)
fixed printing of COLLATE operation
(BUG#5155)
2004-08-31 10:06:38 +03:00
unknown
3170a8f942 Fixed BUG#5279: Stored procedure packets out of order if CHECKSUM TABLE.
mysql-test/r/sp.result:
  New testcase for BUG#5251.
mysql-test/t/sp.test:
  New testcase for BUG#5251.
sql/sp_head.cc:
  Added checksum to the list of statements that return result sets.
2004-08-30 14:52:21 +02:00
pem@mysql.comhem.se
12b1c4b330 Fixed BUG#5279: Stored procedure packets out of order if CHECKSUM TABLE. 2004-08-30 14:52:21 +02:00
unknown
071651efbd Major rehacking and cleanup of sp_pcontext.
This finishes (almost) WL#2002: Implement stored procedure GOTO.
Only the syntax issue for free labels remains ("label L;" vs "L:").


include/mysqld_error.h:
  New error code for GOTO in SP handler.
mysql-test/r/sp-error.result:
  New error test cases for GOTO.
mysql-test/r/sp.result:
  New test cases for GOTO.
  Also removed some things that made it impossible to run the test in
  an external (debugged) mysqld.
mysql-test/t/sp-error.test:
  New error test cases for GOTO.
mysql-test/t/sp.test:
  New test cases for GOTO.
  Also removed some things that made it impossible to run the test in
  an external (debugged) mysqld.
sql/share/czech/errmsg.txt:
  New error message for GOTO in SP handler.
sql/share/danish/errmsg.txt:
  New error message for GOTO in SP handler.
sql/share/dutch/errmsg.txt:
  New error message for GOTO in SP handler.
sql/share/english/errmsg.txt:
  New error message for GOTO in SP handler.
sql/share/estonian/errmsg.txt:
  New error message for GOTO in SP handler.
sql/share/french/errmsg.txt:
  New error message for GOTO in SP handler.
sql/share/german/errmsg.txt:
  New error message for GOTO in SP handler.
sql/share/greek/errmsg.txt:
  New error message for GOTO in SP handler.
sql/share/hungarian/errmsg.txt:
  New error message for GOTO in SP handler.
sql/share/italian/errmsg.txt:
  New error message for GOTO in SP handler.
sql/share/japanese/errmsg.txt:
  New error message for GOTO in SP handler.
sql/share/korean/errmsg.txt:
  New error message for GOTO in SP handler.
sql/share/norwegian-ny/errmsg.txt:
  New error message for GOTO in SP handler.
sql/share/norwegian/errmsg.txt:
  New error message for GOTO in SP handler.
sql/share/polish/errmsg.txt:
  New error message for GOTO in SP handler.
sql/share/portuguese/errmsg.txt:
  New error message for GOTO in SP handler.
sql/share/romanian/errmsg.txt:
  New error message for GOTO in SP handler.
sql/share/russian/errmsg.txt:
  New error message for GOTO in SP handler.
sql/share/serbian/errmsg.txt:
  New error message for GOTO in SP handler.
sql/share/slovak/errmsg.txt:
  New error message for GOTO in SP handler.
sql/share/spanish/errmsg.txt:
  New error message for GOTO in SP handler.
sql/share/swedish/errmsg.txt:
  New error message for GOTO in SP handler.
sql/share/ukrainian/errmsg.txt:
  New error message for GOTO in SP handler.
sql/sp_head.cc:
  Code cleanup (renaming of pcontext methods), support goto, and fixed bug
  in jump shortcutting in the optimizer (detect infinite loops).
sql/sp_head.h:
  Code cleanup (renaming of pcontext methods), support goto, and fixed bug
  in jump shortcutting in the optimizer (detect infinite loops).
sql/sp_pcontext.cc:
  Major rehack and cleanup:
  - We now push and pop a chain of contexts during parsing (instead of having
    a single one).
  - Makes error detection for GOTO easier and enables some optmizations and
    debugger support.
  - Makes it a little trickier to keep track on variable and cursor indexes instead.
  - Renamed things to get a more consistent naming scheme too.
sql/sp_pcontext.h:
  Major rehack and cleanup:
  - We now push and pop a chain of contexts during parsing (instead of having
    a single one).
  - Makes error detection for GOTO easier and enables some optmizations and
    debugger support.
  - Makes it a little trickier to keep track on variable and cursor indexes instead.
  - Renamed things to get a more consistent naming scheme too.
sql/sql_yacc.yy:
  Changes to reflect the rework and renamings in sp_pcontext, and fixed
  some GOTO error checking.
2004-08-26 12:54:30 +02:00
pem@mysql.comhem.se
c81b848d20 Major rehacking and cleanup of sp_pcontext.
This finishes (almost) WL#2002: Implement stored procedure GOTO.
Only the syntax issue for free labels remains ("label L;" vs "L:").
2004-08-26 12:54:30 +02:00
unknown
ac06195caa Fixed BUG#3157: Crash if stored procedure contains IF EXISTS,
and BUG#336: Subselects with tables does not work as values for
local SP variables (which was closed before with a temp. fix, but not
actually fixed).


mysql-test/r/sp-error.result:
  Moved test case for BUG#336 to sp.test, as it's not generating an error any longer.
mysql-test/r/sp.result:
  Move test case for BUG#336 from sp-error.test and added new test case
  for BUG#3157.
mysql-test/t/sp-error.test:
  Moved test case for BUG#336 to sp.test, as it's not generating an error any longer.
mysql-test/t/sp.test:
  Move test case for BUG#336 from sp-error.test and added new test case
  for BUG#3157.
sql/sp_head.cc:
  Open and close tables in set, jump-if[-not] and freturn instructions if
  the value expression is a subselect.
sql/sp_head.h:
  Store tables in set, jump-if[-not] and freturn instructions if
  the value expression is a subselect.
sql/sql_yacc.yy:
  Store tables in set, jump-if[-not] and freturn instructions if
  the value expression is a subselect.
2004-08-24 16:07:39 +02:00
pem@mysql.comhem.se
6b5a6cdf99 Fixed BUG#3157: Crash if stored procedure contains IF EXISTS,
and BUG#336: Subselects with tables does not work as values for
local SP variables (which was closed before with a temp. fix, but not
actually fixed).
2004-08-24 16:07:39 +02:00
unknown
9b5a6f7228 WL#2002: Implement stored procedure GOTO.
Mostly done, it works, but the temporary LABEL syntax still to be fixed.


mysql-test/r/sp-error.result:
  New test case for WL#2002 (GOTO).
mysql-test/r/sp.result:
  New test case for WL#2002 (GOTO).
  (Also corrected another test)
mysql-test/t/sp-error.test:
  New test case for WL#2002 (GOTO).
mysql-test/t/sp.test:
  New test case for WL#2002 (GOTO).
  (Also corrected another test)
sql/lex.h:
  New symbol GOTO.
  Also a temporary symbol LABEL, which hopefully will go away soon.
sql/sp_head.cc:
  Fixed backpatching to cope with free GOTO labels an hpop and cpop instructions.
  Also optimized away pointless jump instructions.
sql/sp_head.h:
  Fixed backpatching to cope with free GOTO labels an hpop and cpop instructions.
  We now sometimes generate hpop/cpop 0 instructions but the optimizer removes them.
sql/sp_pcontext.cc:
  Added free GOTO labels, and support for coping with jumps out of blocks
  with handlers or cursors.
sql/sp_pcontext.h:
  Added free GOTO labels, and support for coping with jumps out of blocks
  with handlers or cursors.
sql/sql_yacc.yy:
  Added GOTO and LABEL, and adjusted backpatching accordingly. Also fixed LEAVE
  out of blocks. The LABEL syntax will go away soon, hopefully.
2004-08-17 20:20:58 +02:00
pem@mysql.comhem.se
38b4cbbbd5 WL#2002: Implement stored procedure GOTO.
Mostly done, it works, but the temporary LABEL syntax still to be fixed.
2004-08-17 20:20:58 +02:00
unknown
ba7c743983 Fixed BUG#4904: Stored procedure crash if continue handler for HY000 errors.
The description is not entirerly correct. The issue was follow-up errors
  where the first error is not caught - in which case it's often a system
  error with errcode < 1000 (which are mapped by default to 'HY000'). In this
  case the error state is different from what was assumed in the execution
  loop.


mysql-test/r/sp.result:
  New test case for BUG#4902.
mysql-test/t/sp.test:
  New test case for BUG#4902.
sql/sp_head.cc:
  Don't test the net.report_error flag in the execution loop. (Don't know
  why this was done in the first place, as it seems to serve no purpose.)
2004-08-06 15:21:28 +02:00
pem@mysql.comhem.se
a21487fb4f Fixed BUG#4904: Stored procedure crash if continue handler for HY000 errors.
The description is not entirerly correct. The issue was follow-up errors
  where the first error is not caught - in which case it's often a system
  error with errcode < 1000 (which are mapped by default to 'HY000'). In this
  case the error state is different from what was assumed in the execution
  loop.
2004-08-06 15:21:28 +02:00
unknown
177ef90b57 Fixed BUG#4902: Stored procedure with SHOW WARNINGS leads to packet error,
and tried to do it properly this time, digging out all show commands that
  need the multi results flag set.


mysql-test/r/sp.result:
  New test case for BUG#4902, with lots of other show commands as well.
mysql-test/t/sp.test:
  New test case for BUG#4902, with lots of other show commands as well.
sql/sp_head.cc:
  The check for possible multiple result commands was becomming unwieldly,
  so we moved it to a separate function, and added loads of new command codes
  to the test.
sql/sp_head.h:
  The check for possible multiple result commands was becomming unwieldly,
  so we moved it to a separate function.
sql/sql_yacc.yy:
  The check for possible multiple result commands was becomming unwieldly,
  so we moved it to a separate function.
2004-08-06 13:47:01 +02:00
pem@mysql.comhem.se
015b4145da Fixed BUG#4902: Stored procedure with SHOW WARNINGS leads to packet error,
and tried to do it properly this time, digging out all show commands that
  need the multi results flag set.
2004-08-06 13:47:01 +02:00
unknown
a5debaea43 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/kostja/mysql/mysql-5.0-sap-new


sql/sp.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
2004-08-03 03:33:51 -07:00
konstantin@mysql.com
e67584151e Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/kostja/mysql/mysql-5.0-sap-new
2004-08-03 03:33:51 -07:00
unknown
eaf34dd8e3 Port of cursors to be pushed into 5.0 tree:
- client side part is simple and may be considered stable
- server side part now just joggles with THD state to save execution
  state and has no additional locking wisdom.
  Lot's of it are to be rewritten.


include/mysql.h:
  Cursor patch to push into the main tree, client library part (considered 
  stable):
  - new statement attribute STMT_ATTR_CURSOR_TYPE
  - MYSQL_STMT::flags to store statement cursor type
  - MYSQL_STMT::server_status to store server status (i. e. if the server
  was able to open a cursor for this query).
include/mysql_com.h:
  Cursor patch to push into the main tree, client library part (considered 
  stable):
  - new COMmand, COM_FETCH, to fetch K rows from read-only cursor.
    By design should support scrollable cursors as well.
  - a few new server statuses:
    SERVER_STATUS_CURSOR_EXISTS is sent by server in reply to COM_EXECUTE,
    when cursor was successfully opened for this query
    SERVER_STATUS_LAST_ROW_SENT is sent along with the last row to prevent one
    more round trip just for finding out that all rows were fetched from 
    this cursor (this is server mem savier also).
  - and finally, all possible values of STMT_ATTR_CURSOR_TYPE, 
    while now we support only CURSORT_TYPE_NO_CURSOR and 
    CURSOR_TYPE_READ_ONLY
libmysql/libmysql.c:
  Cursor patch to push into the main tree, client library part (considered 
  stable):
  - simple additions to mysql_stmt_fetch implementation to read data 
    from an opened cursor: we can read up to iteration count rows per
    one request; read rows are buffered in the same way as rows of
    mysql_stmt_store_result.
  - now send stmt->flags to server to let him now if we wish to have 
    a cursor for this statement.
  - support for setting/getting statement cursor type.
libmysqld/examples/Makefile.am:
  Testing cursors was originally implemented in C++. Now when these tests
  go into client_test, it's time to convert it to C++ as well.
libmysqld/lib_sql.cc:
  - cleanup: send_fields flags are now named.
sql/ha_innodb.cc:
  - cleanup: send_fields flags are now named.
sql/mysql_priv.h:
  - cursors support: declaration for server-side handler of COM_FETCH
sql/protocol.cc:
  - cleanup: send_fields flags are now named.
  - we can't anymore assert that field_types[field_pos] is sensible:
    if we have COM_EXCUTE(stmt1), COM_EXECUTE(stmt2), COM_FETCH(stmt1)
    field_types[field_pos] will point to fields of stmt2.
sql/protocol.h:
  - cleanup: send_fields flag_s_ are now named.
sql/protocol_cursor.cc:
  - cleanup: send_fields flags are now named.
sql/repl_failsafe.cc:
  - cleanup: send_fields flags are now named.
sql/slave.cc:
  - cleanup: send_fields flags are now named.
sql/sp.cc:
  - cleanup: send_fields flags are now named.
sql/sp_head.cc:
  - cleanup: send_fields flags are now named.
sql/sql_acl.cc:
  - cleanup: send_fields flags are now named.
sql/sql_class.cc:
  - cleanup: send_fields flags are now named.
sql/sql_class.h:
  - cleanup: send_fields flags are now named.
sql/sql_error.cc:
  - cleanup: send_fields flags are now named.
sql/sql_handler.cc:
  - cleanup: send_fields flags are now named.
sql/sql_help.cc:
  - cleanup: send_fields flags are now named.
sql/sql_parse.cc:
  Server side support for cursors:
  - handle COM_FETCH
  - enforce assumption that whenever we free thd->free_list, 
    we reset it to zero. This way it's much easier to handle free_list
    in prepared statements implementation.
sql/sql_prepare.cc:
  Server side support for cursors:
  - implementation of mysql_stmt_fetch (fetch some rows from open cursor).
  - management of cursors memory is quite tricky now.
  - execute_stmt can't be reused anymore in mysql_stmt_execute and 
    mysql_sql_stmt_execute
sql/sql_repl.cc:
  - cleanup: send_fields flags are now named.
sql/sql_select.cc:
  Server side support for cursors:
  - implementation of Cursor::open, Cursor::fetch (buggy when it comes to
    non-equi joins), cursor cleanups.
  - -4 -3 -0 constants indicating return value of sub_select and end_send are
    to be renamed to something more readable:
    it turned out to be not so simple, so it should come with the other patch.
sql/sql_select.h:
  Server side support for cursors:
  - declaration of Cursor class.
  - JOIN::fetch_limit contains runtime value of rows fetched via cursor.
sql/sql_show.cc:
  - cleanup: send_fields flags are now named.
sql/sql_table.cc:
  - cleanup: send_fields flags are now named.
sql/sql_union.cc:
  - if there was a cursor, don't cleanup unit: we'll need it to fetch
    the rest of the rows.
tests/Makefile.am:
  Now client_test is in C++.
tests/client_test.cc:
  A few elementary tests for cursors.
BitKeeper/etc/ignore:
  Added libmysqld/examples/client_test.cc to the ignore list
2004-08-03 03:32:21 -07:00
konstantin@mysql.com
d3e520ce7e Port of cursors to be pushed into 5.0 tree:
- client side part is simple and may be considered stable
- server side part now just joggles with THD state to save execution
  state and has no additional locking wisdom.
  Lot's of it are to be rewritten.
2004-08-03 03:32:21 -07:00
unknown
81aad353c5 WL#2001: Optimize stored procedure code.
Added a simple optimizer that shortcuts jumps and skip unused instructions.


sql/sp.cc:
  Optimize the code after parsing.
sql/sp_head.cc:
  Added a simple optimizer that shortcuts jumps and skip unused instructions.
sql/sp_head.h:
  Added a simple optimizer that shortcuts jumps and skip unused instructions.
2004-08-02 18:05:31 +02:00
pem@mysql.comhem.se
51eb64402a WL#2001: Optimize stored procedure code.
Added a simple optimizer that shortcuts jumps and skip unused instructions.
2004-08-02 18:05:31 +02:00
unknown
8a33c2bc8f Fixed BUG#4579: Execution of SP crashes server.
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.
2004-07-22 16:46:59 +02:00
pem@mysql.comhem.se
e9507f0e1a Fixed BUG#4579: Execution of SP crashes server.
Sub-CALLs of procedures zapped thd->current_arena for good.
2004-07-22 16:46:59 +02:00
unknown
1d29e6b0d4 after merge fixes
sql/opt_range.h:
  compatibility fix
sql/sql_lex.cc:
  cleanup
2004-07-22 00:26:33 +02:00
serg@serg.mylan
aa35efd292 after merge fixes 2004-07-22 00:26:33 +02:00
unknown
28287c0dc5 Fixed BUG#2653: Undeclared variables not detected in stored procedures.
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).
2004-07-21 14:53:09 +02:00
pem@mysql.comhem.se
c0ae841258 Fixed BUG#2653: Undeclared variables not detected in stored procedures.
We now get an run-time error instead of a crash (although a slightly misleading
error message, but it's an improvement).
2004-07-21 14:53:09 +02:00
unknown
45cbab28f6 Fixes for bug #4571 (Windows compabilities)
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
2004-07-16 03:47:17 -03:00
miguel@hegel.txg
b3b598d19c Fixes for bug #4571 (Windows compabilities) 2004-07-16 03:47:17 -03:00
unknown
46ea874fb7 After merge fixes
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
2004-07-15 04:19:07 +03:00
monty@mysql.com
5b3c418b48 After merge fixes
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
2004-07-15 04:19:07 +03:00
unknown
c4645f8404 After merge fixes 2004-07-12 07:43:38 +03:00
monty@mysql.com
fa7f63d46d After merge fixes 2004-07-12 07:43:38 +03:00
unknown
6762a65133 Fixed BUG#2564: SHOW CREATE inconsistent W.R.T ANSI_QUOTES.
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.
2004-06-09 14:19:43 +02:00
pem@mysql.comhem.se
cc897576fe Fixed BUG#2564: SHOW CREATE inconsistent W.R.T ANSI_QUOTES.
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.
2004-06-09 14:19:43 +02:00
unknown
54e3909b04 Fixed proper restoring of current db on errors.
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.
2004-06-08 18:41:18 +02:00
pem@mysql.comhem.se
e3132d9a7c Fixed proper restoring of current db on errors.
This fixes part of BUG#3229: Stored procedure comment causes packets out of order.
2004-06-08 18:41:18 +02:00
unknown
82fd12f4be cleunup items of instruction after every instruction execution
sql/sp_head.h:
  removed blanks at line end
  cleunup items of instruction after every instruction execution
2004-05-26 14:28:35 +03:00
bell@sanja.is.com.ua
e822f61d76 cleunup items of instruction after every instruction execution 2004-05-26 14:28:35 +03:00
unknown
16227c28e6 PS and SP made compatible in mechanism used for preparing query for rexecutions (Bug #2266)
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
2004-05-20 02:02:49 +03:00
bell@sanja.is.com.ua
c7396f8d20 PS and SP made compatible in mechanism used for preparing query for rexecutions (Bug #2266) 2004-05-20 02:02:49 +03:00
unknown
3a272c1fa9 Post-merge fixes.
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.
2004-05-14 16:00:57 +02:00
pem@mysql.comhem.se
ec92106535 Post-merge fixes.
Note: One sp.test still fails (prime), and rpl_server_id2.test fails (will be fixed by guilhem ASAP).
2004-05-14 16:00:57 +02:00
unknown
91dcd01159 Fixed BUG#2772: Function with character set clause fails in stored procedures.
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.)
2004-04-06 13:26:53 +02:00
pem@mysql.comhem.se
eb7319e850 Fixed BUG#2772: Function with character set clause fails in stored procedures.
Complex return types were not stored correctly in the mysql.proc table.
2004-04-06 13:26:53 +02:00
unknown
4a7c72e9df Fixed BUG#3287: Stored procedure handler scope outside of begin/end.
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.
2004-04-05 17:01:19 +02:00
pem@mysql.comhem.se
95dcdde134 Fixed BUG#3287: Stored procedure handler scope outside of begin/end.
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.
2004-04-05 17:01:19 +02:00
unknown
7456a3e92f Enforce standard declaration order in SPs.
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.
2004-03-29 11:16:45 +02:00
pem@mysql.comhem.se
52c820fbc5 Enforce standard declaration order in SPs.
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.
2004-03-29 11:16:45 +02:00
unknown
d2ad3cff19 WL#1366: Use the schema (db) associated with an SP.
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.
2004-03-19 19:01:54 +01:00
pem@mysql.comhem.se
13987057f6 WL#1366: Use the schema (db) associated with an SP.
Phase 3: Made qualified names work for functions as well.
2004-03-19 19:01:54 +01:00
unknown
eb4aa092e5 WL#1366: Use the schema (db) associated with an SP.
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.
2004-03-11 17:18:59 +01:00
pem@mysql.comhem.se
6c6bbba007 WL#1366: Use the schema (db) associated with an SP.
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.)
2004-03-11 17:18:59 +01:00
unknown
5aa57221d8 Merge mysql.com:/usr/local/bk/mysql-5.0
into mysql.com:/home/pem/work/mysql-5.0


sql/sp_head.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2004-03-02 16:01:02 +01:00
pem@mysql.com
91cc4b288e Merge mysql.com:/usr/local/bk/mysql-5.0
into mysql.com:/home/pem/work/mysql-5.0
2004-03-02 16:01:02 +01:00
unknown
23a6b4ed82 Fixed small race condition, when global query_id was modified
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
2004-03-01 09:15:33 +03:00
dlenev@brandersnatch.localdomain
3c58ae9e74 Fixed small race condition, when global query_id was modified
without proper locking.
2004-03-01 09:15:33 +03:00
unknown
e55c4ed179 WL#1366: Use the schema (db) associated with an SP.
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.
2004-02-17 17:36:53 +01:00
pem@mysql.comhem.se
b205759949 WL#1366: Use the schema (db) associated with an SP.
Phase 1: Introduced sp_name class, for qualified name support.
2004-02-17 17:36:53 +01:00
unknown
323bca3380 sp.test:
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
2004-02-03 16:22:43 +02:00
Sinisa@sinisa.nasamreza.org
4320327826 sp.test:
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)
2004-02-03 16:22:43 +02:00
unknown
7e95a257e0 Check for possible stack overrun in SP execution.
sql/sp_head.cc:
  Check for possible stack overrun, in an attempt to
  handle deep recursion more gracefully.
  (Not 100% this will always helt though, but it's better than
   nothing.)
2004-01-26 15:17:35 +01:00
pem@mysql.comhem.se
b2efad935b Check for possible stack overrun in SP execution. 2004-01-26 15:17:35 +01:00
unknown
219f51b475 Fixed BUG#2227: Server crash with stored procedure call.
(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.
2004-01-21 14:28:35 +01:00
pem@mysql.comhem.se
bfdf9d3cc4 Fixed BUG#2227: Server crash with stored procedure call.
(Meaning "... with SELECT v", where v is a local variable.)
2004-01-21 14:28:35 +01:00
unknown
b092868307 Fix BUG#2269: Lost connect if stored procedure called before USE
(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().
2004-01-09 09:36:37 +01:00
pem@mysql.comhem.se
1ef17f0a14 Fix BUG#2269: Lost connect if stored procedure called before USE
(And some minor correction of cursor open)
2004-01-09 09:36:37 +01:00
unknown
4f72061f40 Update for VC++
(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
2003-12-21 02:07:45 +02:00
monty@mysql.com
c6ed2a625b Update for VC++
(Fixed project files, compiler warnings etc..)
2003-12-21 02:07:45 +02:00
unknown
241bb22699 Forgot to wrap things in #ifndef NO_EMBEDDED_ACCESS_CHECKS for the embedded server.
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.
2003-12-16 14:15:27 +01:00
pem@mysql.comhem.se
a7b7a40c5f Forgot to wrap things in #ifndef NO_EMBEDDED_ACCESS_CHECKS for the embedded server.
Added missing cleanup in sp-security.test.
2003-12-16 14:15:27 +01:00
unknown
1d77c0412e Fixed various memory leaks.
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.
2003-12-15 13:24:16 +01:00
pem@mysql.comhem.se
45e5896363 Fixed various memory leaks. 2003-12-15 13:24:16 +01:00
unknown
a6f85eeac1 WL#1365: Implement definer's rights execution of stored procedures.
(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.
2003-12-13 16:40:52 +01:00
pem@mysql.comhem.se
07541b6abf WL#1365: Implement definer's rights execution of stored procedures.
(Also put the hostpart back in the definer column.)
2003-12-13 16:40:52 +01:00
unknown
cabd28c68c In order to make ALTER PROCEDURE|FUNCTION work correctly, and in general to
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.
2003-12-12 14:05:29 +01:00
pem@mysql.comhem.se
7a20e5282e In order to make ALTER PROCEDURE|FUNCTION work correctly, and in general to
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.)
2003-12-12 14:05:29 +01:00
unknown
3702a1dbc4 WL#1363: Update the mysql.proc table and add new fields.
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).
2003-12-10 19:05:37 +01:00
pem@mysql.comhem.se
b27e9d6052 WL#1363: Update the mysql.proc table and add new fields.
Also made the parsing and handling of SP characteristics
more general and extendable, and added a few ch:istics.
2003-12-10 19:05:37 +01:00
unknown
722d19c3d6 Fixed another compiler error on HP-UX. 2003-12-04 15:54:37 +01:00
pem@mysql.comhem.se
98bfc5a6c6 Fixed another compiler error on HP-UX. 2003-12-04 15:54:37 +01:00
unknown
3aaa8ab94e Fixed BUG#336: Subselects with tables does not work as values for local SP variables
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.
2003-12-04 15:17:55 +01:00
pem@mysql.comhem.se
a5780a4815 Fixed BUG#336: Subselects with tables does not work as values for local SP variables
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.
2003-12-04 15:17:55 +01:00
unknown
394ade6306 Made Item_splocal printable.
sql/sp_head.cc:
  Fixed bug that showed up when using running with --debug.
2003-11-21 14:00:40 +01:00
pem@mysql.comhem.se
86039a34e5 Made Item_splocal printable. 2003-11-21 14:00:40 +01:00
unknown
50685be51b Fixed BUG#1874: Don't call fix_fields() indiscriminately, it resets null_value
for some items, which made aggregates like MIN(), MAX() and SUM() fail.


mysql-test/r/sp.result:
  Test case for aggregate functions in SELECT INTO. (BUG#1874)
mysql-test/t/sp.test:
  Test case for aggregate functions in SELECT INTO. (BUG#1874)
2003-11-20 18:30:02 +01:00
pem@mysql.comhem.se
5e46a05960 Fixed BUG#1874: Don't call fix_fields() indiscriminately, it resets null_value
for some items, which made aggregates like MIN(), MAX() and SUM() fail.
2003-11-20 18:30:02 +01:00
unknown
afe2186e3b Post-merge fixes. 2003-11-19 16:59:35 +01:00
pem@mysql.comhem.se
5b355ea6f5 Post-merge fixes. 2003-11-19 16:59:35 +01:00
unknown
bd2263503d Fixed BUG#1862 (flush table in SPs didn't work).
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.)
2003-11-19 11:26:18 +01:00
pem@mysql.comhem.se
c4871b240d Fixed BUG#1862 (flush table in SPs didn't work).
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.
2003-11-19 11:26:18 +01:00
unknown
224e3505bd Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.0
into gluh.mysql.r18.ru:/home/gluh/mysql-5.0.sp


sql/sp_head.cc:
  Auto merged
2003-11-17 21:24:03 +04:00
gluh@gluh.mysql.r18.ru
e44a0c2aeb Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.0
into gluh.mysql.r18.ru:/home/gluh/mysql-5.0.sp
2003-11-17 21:24:03 +04:00
unknown
6c1a2b7fd2 WL#1241: SHOW PROCEDURE/FUNCTION
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'
2003-11-17 21:21:36 +04:00
gluh@gluh.mysql.r18.ru
ee4ed0c969 WL#1241: SHOW PROCEDURE/FUNCTION
WL#1263: Support for the attributes COMMENT and SUID
         in CREATE/ALTER PROCEDURE/FUNCTION
2003-11-17 21:21:36 +04:00
unknown
74e7758287 Bugfix, handling null values. 2003-11-17 13:33:47 +01:00
pem@mysql.comhem.se
34d76c9319 Bugfix, handling null values. 2003-11-17 13:33:47 +01:00
unknown
f89c6de8e3 Fix BUG#1656: Have to initialize OUT parameters too, in case they're not
later set by the procedure.


mysql-test/r/sp.result:
  Test case for BUG#1656
mysql-test/t/sp.test:
  Test case for BUG#1656
2003-10-28 15:43:49 +01:00
pem@mysql.comhem.se
bfe6ef9c9b Fix BUG#1656: Have to initialize OUT parameters too, in case they're not
later set by the procedure.
2003-10-28 15:43:49 +01:00
unknown
2b1dc5f35d Bugfix; added another method to Item_splocal, updated tests, and added previous
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.
2003-10-20 16:59:45 +02:00
pem@mysql.comhem.se
52dae5c79e Bugfix; added another method to Item_splocal, updated tests, and added previous
fix to functions as well.
2003-10-20 16:59:45 +02:00
unknown
82e5115ae7 Bugfix. Local variables are now initialized to null.
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.
2003-10-17 17:13:49 +02:00
pem@mysql.comhem.se
98397562c0 Bugfix. Local variables are now initialized to null. 2003-10-17 17:13:49 +02:00
unknown
12a0546da3 Handle user variables (@-vars) as OUT and INOUT parameters in SPs.
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.
2003-10-16 15:45:27 +02:00
pem@mysql.telia.com
1f1a8531d1 Handle user variables (@-vars) as OUT and INOUT parameters in SPs. 2003-10-16 15:45:27 +02:00
unknown
776784b821 Fix for BUG#1495: Evaluate items before setting a local variable with SELECT INTO.
Also copy and restore order_list and group_list for selects in SPs.


mysql-test/r/sp.result:
  Test for BUG#1495, and an additional cursor test.
mysql-test/t/sp.test:
  Test for BUG#1495, and an additional cursor test.
sql/sp_head.cc:
  Fix BUG#1495: renamed eval_func_item() into sp_eval_func_item() and made it
  non-static.
  Also need to copy and restore order_list and group_list pointers before and
  after execution of a substatement. (Which means these must always be properly
  initialized for all queries.)
sql/sp_rcontext.cc:
  Fix BUG#1495: Evaluate and set a local variable (for SELECT INTO).
sql/sp_rcontext.h:
  Fix BUG#1495: Evaluate and set a local variable (for SELECT INTO).
sql/sql_class.cc:
  Fix BUG#1495: Evaluate and set a local variable (for SELECT INTO).
sql/sql_class.h:
  Fix BUG#1495: Evaluate and set a local variable (for SELECT INTO); need type for this.
sql/sql_parse.cc:
  order_list and group_list must be initialized in select_lex for all queries,
  to make SP sub statement execution work.
sql/sql_yacc.yy:
  Type needed for setting local variables.
sql/table.h:
  Need a copy of the Item* pointer when executing sub-statements in SPs. (Since
  it's modified and must be restored afterwards.)
2003-10-14 12:59:28 +02:00
pem@mysql.telia.com
225aada6d6 Fix for BUG#1495: Evaluate items before setting a local variable with SELECT INTO.
Also copy and restore order_list and group_list for selects in SPs.
2003-10-14 12:59:28 +02:00
unknown
04c6b9b8d8 WL#962: Added simple, read-only, non-scrolling, asensitive cursors in SPs, using the
(updated) Protocol_cursor class.
Also did some bug fixes.


Docs/sp-imp-spec.txt:
  Added CURSOR docs (and fixed typos)
Docs/sp-implemented.txt:
  Updated for CURSORs
include/mysqld_error.h:
  New error codes/messages for CURSORs
libmysqld/Makefile.am:
  SP cursors now needs this.
mysql-test/r/sp-error.result:
  New tests for cursors.
mysql-test/r/sp.result:
  New tests for cursors.
mysql-test/t/sp-error.test:
  New tests for cursors.
mysql-test/t/sp.test:
  New tests for cursors.
sql/protocol.cc:
  We now always have Protocol_cursor (SPs use it)
sql/protocol.h:
  Fixed bugs in Protocol_cursor (for SPs)
sql/protocol_cursor.cc:
  Fixed bugs in Protocol_cursor (for SPs)
sql/share/czech/errmsg.txt:
  New error codes/messages for CURSORs
sql/share/danish/errmsg.txt:
  New error codes/messages for CURSORs
sql/share/dutch/errmsg.txt:
  New error codes/messages for CURSORs
sql/share/english/errmsg.txt:
  New error codes/messages for CURSORs
sql/share/estonian/errmsg.txt:
  New error codes/messages for CURSORs
sql/share/french/errmsg.txt:
  New error codes/messages for CURSORs
sql/share/german/errmsg.txt:
  New error codes/messages for CURSORs
sql/share/greek/errmsg.txt:
  New error codes/messages for CURSORs
sql/share/hungarian/errmsg.txt:
  New error codes/messages for CURSORs
sql/share/italian/errmsg.txt:
  New error codes/messages for CURSORs
sql/share/japanese/errmsg.txt:
  New error codes/messages for CURSORs
sql/share/korean/errmsg.txt:
  New error codes/messages for CURSORs
sql/share/norwegian-ny/errmsg.txt:
  New error codes/messages for CURSORs
sql/share/norwegian/errmsg.txt:
  New error codes/messages for CURSORs
sql/share/polish/errmsg.txt:
  New error codes/messages for CURSORs
sql/share/portuguese/errmsg.txt:
  New error codes/messages for CURSORs
sql/share/romanian/errmsg.txt:
  New error codes/messages for CURSORs
sql/share/russian/errmsg.txt:
  New error codes/messages for CURSORs
sql/share/serbian/errmsg.txt:
  New error codes/messages for CURSORs
sql/share/slovak/errmsg.txt:
  New error codes/messages for CURSORs
sql/share/spanish/errmsg.txt:
  New error codes/messages for CURSORs
sql/share/swedish/errmsg.txt:
  New error codes/messages for CURSORs
sql/share/ukrainian/errmsg.txt:
  New error codes/messages for CURSORs
sql/sp_head.cc:
  Added cursor support.
  Also fixed problems with item_lists, where pointers and ref_pointer_arrays.
sql/sp_head.h:
  Added cursor support
sql/sp_pcontext.cc:
  Added cursor support
sql/sp_pcontext.h:
  Added cursor support
sql/sp_rcontext.cc:
  Added cursor support, in particular the new sp_cursor class.
sql/sp_rcontext.h:
  Added cursor support, in particular the new sp_cursor class.
sql/sql_lex.h:
  We sometimes need to copy item_lists in LEX when executing substatements in SPs
sql/sql_yacc.yy:
  Added minimal cursor support (not the full syntax yet).
2003-10-10 16:57:21 +02:00
pem@mysql.telia.com
689bb84f72 WL#962: Added simple, read-only, non-scrolling, asensitive cursors in SPs, using the
(updated) Protocol_cursor class.
Also did some bug fixes.
2003-10-10 16:57:21 +02:00
unknown
4379cbcf30 Check that a FUNCTION contains RETURN and that we actually get a return value.
include/mysqld_error.h:
  New error codes/messages for missing RETURNs in FUNCTIONs.
mysql-test/r/sp-error.result:
  New error tests for missing RETURNs in FUNCTIONs.
mysql-test/t/sp-error.test:
  New error tests for missing RETURNs in FUNCTIONs.
sql/share/czech/errmsg.txt:
  New error codes/messages for missing RETURNs in FUNCTIONs.
sql/share/danish/errmsg.txt:
  New error codes/messages for missing RETURNs in FUNCTIONs.
sql/share/dutch/errmsg.txt:
  New error codes/messages for missing RETURNs in FUNCTIONs.
sql/share/english/errmsg.txt:
  New error codes/messages for missing RETURNs in FUNCTIONs.
sql/share/estonian/errmsg.txt:
  New error codes/messages for missing RETURNs in FUNCTIONs.
sql/share/french/errmsg.txt:
  New error codes/messages for missing RETURNs in FUNCTIONs.
sql/share/german/errmsg.txt:
  New error codes/messages for missing RETURNs in FUNCTIONs.
sql/share/greek/errmsg.txt:
  New error codes/messages for missing RETURNs in FUNCTIONs.
sql/share/hungarian/errmsg.txt:
  New error codes/messages for missing RETURNs in FUNCTIONs.
sql/share/italian/errmsg.txt:
  New error codes/messages for missing RETURNs in FUNCTIONs.
sql/share/japanese/errmsg.txt:
  New error codes/messages for missing RETURNs in FUNCTIONs.
sql/share/korean/errmsg.txt:
  New error codes/messages for missing RETURNs in FUNCTIONs.
sql/share/norwegian-ny/errmsg.txt:
  New error codes/messages for missing RETURNs in FUNCTIONs.
sql/share/norwegian/errmsg.txt:
  New error codes/messages for missing RETURNs in FUNCTIONs.
sql/share/polish/errmsg.txt:
  New error codes/messages for missing RETURNs in FUNCTIONs.
sql/share/portuguese/errmsg.txt:
  New error codes/messages for missing RETURNs in FUNCTIONs.
sql/share/romanian/errmsg.txt:
  New error codes/messages for missing RETURNs in FUNCTIONs.
sql/share/russian/errmsg.txt:
  New error codes/messages for missing RETURNs in FUNCTIONs.
sql/share/serbian/errmsg.txt:
  New error codes/messages for missing RETURNs in FUNCTIONs.
sql/share/slovak/errmsg.txt:
  New error codes/messages for missing RETURNs in FUNCTIONs.
sql/share/spanish/errmsg.txt:
  New error codes/messages for missing RETURNs in FUNCTIONs.
sql/share/swedish/errmsg.txt:
  New error codes/messages for missing RETURNs in FUNCTIONs.
sql/share/ukrainian/errmsg.txt:
  New error codes/messages for missing RETURNs in FUNCTIONs.
sql/sp_head.h:
  Check that a FUNCTION contains RETURN.
sql/sql_parse.cc:
  Check that a FUNCTION contains RETURN.
sql/sql_yacc.yy:
  Check that a FUNCTION contains RETURN.
2003-10-03 17:38:12 +02:00
pem@mysql.telia.com
e8634f80bd Check that a FUNCTION contains RETURN and that we actually get a return value. 2003-10-03 17:38:12 +02:00
unknown
869b49efe5 Fixed BUG#822: Copying and clearing some things in thd/lex when
executing sub-statements (selects) prevents crashes intermittent
crashes.
Also fixed bug in sql_yacc.yy (generated a hpop instruction when
not needed).


mysql-test/r/sp.result:
  Test-case for BUG#822.
mysql-test/t/sp.test:
  Test-case for BUG#822.
sql/sp_head.cc:
  Fixed BUG#822; needed to copy and clear some stuff when calling sub-statements.
sql/sql_yacc.yy:
  Only generate hpop instruction when we actually have handlers.
2003-10-03 12:39:12 +02:00
pem@mysql.telia.com
dbf45cbc3c Fixed BUG#822: Copying and clearing some things in thd/lex when
executing sub-statements (selects) prevents crashes intermittent
crashes.
Also fixed bug in sql_yacc.yy (generated a hpop instruction when
not needed).
2003-10-03 12:39:12 +02:00
unknown
4deedf6263 Implemented SP CONDITIONs and HANDLERs, with the extension of handling
MySQL error codes as well.
(No UNDO HANDLERs yet, and no SIGNAL or RESIGNAL.)
WL#850


Docs/sp-imp-spec.txt:
  Spec of CONDITIONs and HANDLERs (and updated some old stuff too).
Docs/sp-implemented.txt:
  Updated info about caching, CONDITIONs and HANDLERs.
include/mysqld_error.h:
  New error for undeclared CONDITION.
libmysqld/Makefile.am:
  New file: sp_rcontext.cc.
mysql-test/r/sp-error.result:
  New tests for CONDITIONs and HANDLERs.
mysql-test/r/sp.result:
  New tests for CONDITIONs and HANDLERs.
mysql-test/t/sp-error.test:
  New tests for CONDITIONs and HANDLERs.
mysql-test/t/sp.test:
  New tests for CONDITIONs and HANDLERs.
sql/Makefile.am:
  New file: sp_rcontext.cc.
sql/lex.h:
  New symbols for CONDITIONs, HANDLERs and CURSORs.
sql/mysqld.cc:
  Catch error if we have a handler for it.
sql/protocol.cc:
  Catch error if we have a handler for it.
sql/share/czech/errmsg.txt:
  New error for undeclared CONDITION.
sql/share/danish/errmsg.txt:
  New error for undeclared CONDITION.
sql/share/dutch/errmsg.txt:
  New error for undeclared CONDITION.
sql/share/english/errmsg.txt:
  New error for undeclared CONDITION.
sql/share/estonian/errmsg.txt:
  New error for undeclared CONDITION.
sql/share/french/errmsg.txt:
  New error for undeclared CONDITION.
sql/share/german/errmsg.txt:
  New error for undeclared CONDITION.
sql/share/greek/errmsg.txt:
  New error for undeclared CONDITION.
sql/share/hungarian/errmsg.txt:
  New error for undeclared CONDITION.
sql/share/italian/errmsg.txt:
  New error for undeclared CONDITION.
sql/share/japanese/errmsg.txt:
  New error for undeclared CONDITION.
sql/share/korean/errmsg.txt:
  New error for undeclared CONDITION.
sql/share/norwegian-ny/errmsg.txt:
  New error for undeclared CONDITION.
sql/share/norwegian/errmsg.txt:
  New error for undeclared CONDITION.
sql/share/polish/errmsg.txt:
  New error for undeclared CONDITION.
sql/share/portuguese/errmsg.txt:
  New error for undeclared CONDITION.
sql/share/romanian/errmsg.txt:
  New error for undeclared CONDITION.
sql/share/russian/errmsg.txt:
  New error for undeclared CONDITION.
sql/share/serbian/errmsg.txt:
  New error for undeclared CONDITION.
sql/share/slovak/errmsg.txt:
  New error for undeclared CONDITION.
sql/share/spanish/errmsg.txt:
  New error for undeclared CONDITION.
sql/share/swedish/errmsg.txt:
  New error for undeclared CONDITION.
sql/share/ukrainian/errmsg.txt:
  New error for undeclared CONDITION.
sql/sp_head.cc:
  New HANDLER code.
sql/sp_head.h:
  New HANDLER code.
sql/sp_pcontext.cc:
  New CONDITION and HANDLER code.
sql/sp_pcontext.h:
  New CONDITION and HANDLER code.
sql/sp_rcontext.h:
  New CONDITION and HANDLER code.
sql/sql_yacc.yy:
  New CONDITION and HANDLER code.
2003-09-16 14:26:08 +02:00
pem@mysql.telia.com
04f0570fe8 Implemented SP CONDITIONs and HANDLERs, with the extension of handling
MySQL error codes as well.
(No UNDO HANDLERs yet, and no SIGNAL or RESIGNAL.)
WL#850
2003-09-16 14:26:08 +02:00
unknown
e68197450d Adopt to the introduction of a separate CLIENT_MULTI_RESULTS flag. 2003-08-27 17:04:33 +02:00
pem@mysql.telia.com
7a7f3c13d4 Adopt to the introduction of a separate CLIENT_MULTI_RESULTS flag. 2003-08-27 17:04:33 +02:00
unknown
55e776d145 Post-merge fixes. 2003-08-26 17:41:40 +02:00
pem@mysql.telia.com
08e5a7e135 Post-merge fixes. 2003-08-26 17:41:40 +02:00
unknown
f1c754efe9 Code cleanup (and moved sp cache to separate file). 2003-07-03 15:58:37 +02:00
pem@mysql.com
6d225437ed Code cleanup (and moved sp cache to separate file). 2003-07-03 15:58:37 +02:00
unknown
31a58c4068 Bugfixes for the sp_head memroot stuff.
sql/sp.cc:
  Bugfixes for the sp_head memroot stuff. (Do things in the correct order
  at error clean-up.)
sql/sp_head.cc:
  Bugfixes for the sp_head memroot stuff. Make sure everything goes to the
  right memroot. Need separate post-reset-memroot init in sp_head.
sql/sp_head.h:
  Need separate post-reset-memroot init method.
sql/sql_yacc.yy:
  Bugfixes for the sp_head memroot stuff. Make sure everything goes to the
  right memroot. Must do things in the correct order for this.
2003-07-01 17:19:48 +02:00
pem@mysql.com
4006e95808 Bugfixes for the sp_head memroot stuff. 2003-07-01 17:19:48 +02:00
unknown
663ac86f6c sp_head now has its own mem_root (WL#961).
Also fixed some difficult memory leaks that became apparent
in this task.


sql/sp.cc:
  sp_head now has its own mem_root.
sql/sp_head.cc:
  sp_head now has its own mem_root.
  Also fixed some difficult memory leaks.
sql/sp_head.h:
  sp_head now has its own mem_root.
sql/sql_lex.h:
  Fixed some memory leaks in sp_head. Need to keep track on used lex:es.
sql/sql_parse.cc:
  sp_head now has its own mem_root.
  Fixed SP memory leaks.
sql/sql_prepare.cc:
  Fixed SP memory leaks.
sql/sql_yacc.yy:
  sp_head now has its own mem_root.
2003-06-29 18:15:17 +02:00
pem@mysql.com
9f14ae7516 sp_head now has its own mem_root (WL#961).
Also fixed some difficult memory leaks that became apparent
in this task.
2003-06-29 18:15:17 +02:00
unknown
e42120c664 Fixed bug #643, which caused intermittent crashes in net_printf() with repeated
syntax errors in stored procedures.


mysql-test/r/sp-error.result:
  New test case for bugfix (#643)
mysql-test/t/sp-error.test:
  New test case for bugfix (#643)
sql/sp_head.cc:
  Forgot to copy a slot from the original lex. (bug #643)
2003-06-12 15:31:20 +02:00
pem@mysql.com
541c94fcf1 Fixed bug #643, which caused intermittent crashes in net_printf() with repeated
syntax errors in stored procedures.
2003-06-12 15:31:20 +02:00
unknown
40f41ee1fc 'Expand the mysql.proc table to include (almost) all fields' task(851)
Fix after review
2003-06-02 14:25:01 +05:00
gluh@gluh.mysql.r18.ru
7c6522a74e 'Expand the mysql.proc table to include (almost) all fields' task(851)
Fix after review
2003-06-02 14:25:01 +05:00
unknown
8ea9613e7e Adopt SP stuff to the new lex pointer.
mysql-test/r/sp.result:
  New test (of more call levels).
mysql-test/t/sp.test:
  New test (of more call levels).
sql/mysql_priv.h:
  SPs wants to init lex only.
sql/sp.cc:
  Restore lex pointer (and fixed memory leak).
sql/sp_head.cc:
  lex is now a pointer, so reset things the right way.
sql/sp_head.h:
  lex is now a pointer.
sql/sql_lex.h:
  SPs wants to init lex only.
sql/sql_parse.cc:
  SPs wants to init lex only.
sql/sql_prepare.cc:
  Restore lex pointer.
2003-05-23 15:32:31 +02:00
pem@mysql.com
4523a7b179 Adopt SP stuff to the new lex pointer. 2003-05-23 15:32:31 +02:00
unknown
78c162ee22 Merge eagle.mysql.r18.ru:/home/vva/work/mysql.orig/clear/mysql-5.0
into eagle.mysql.r18.ru:/home/vva/work/LEX_PTR/mysql-5.0


sql/sp.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2003-05-14 19:48:58 -04:00
vva@eagle.mysql.r18.ru
384b10e2af Merge eagle.mysql.r18.ru:/home/vva/work/mysql.orig/clear/mysql-5.0
into eagle.mysql.r18.ru:/home/vva/work/LEX_PTR/mysql-5.0
2003-05-14 19:48:58 -04:00
unknown
fb5df27adf Expand the mysql.proc table 2003-05-06 21:09:20 +05:00
gluh@gluh.mysql.r18.ru
33cabdc3b1 Expand the mysql.proc table 2003-05-06 21:09:20 +05:00
unknown
b9121cdea3 made lex a pointer in THD 2003-05-05 14:54:37 -04:00
vva@eagle.mysql.r18.ru
afd581edd3 made lex a pointer in THD 2003-05-05 14:54:37 -04:00
unknown
64cad16faa Post-fix of bug #302 fix.
Fixed bug #320.
Some new tests and cosmetic changes.
Another strcasecmp() replaced.


mysql-test/r/sp.result:
  Moved SP tests from subselect and added some more.
mysql-test/r/subselect.result:
  Moved SP tests to sp.test.
mysql-test/t/sp.test:
  Moved SP tests from subselect and added some more.
mysql-test/t/subselect.test:
  Moved SP tests to sp.test.
sql/sp.cc:
  Don't close derived tables.
sql/sp_head.cc:
  Minor layout and comment fix.
sql/sp_head.h:
  Minor comment fix.
sql/sql_derived.cc:
  Don't set org_table_list->derived to 1 when debugging, as this breaks certain
  subselect args to SPs.
sql/sql_parse.cc:
  Post-fix of bugfix (free memory on error), and added comment.
sql/sql_yacc.yy:
  Another strcasecmp() replaced.
2003-04-27 17:35:54 +02:00
pem@mysql.com
6c85c6aa6a Post-fix of bug #302 fix.
Fixed bug #320.
Some new tests and cosmetic changes.
Another strcasecmp() replaced.
2003-04-27 17:35:54 +02:00
unknown
37c9401782 subselect in procedure argument list (Bug #302)
BitKeeper/etc/ignore:
  Added libmysqld/sp_pcontext.cc libmysqld/sp.cc libmysqld/sp_head.cc to the ignore list
mysql-test/r/subselect.result:
  test of subselect in procedure argument list
mysql-test/t/subselect.test:
  test of subselect in procedure argument list
sql/sp_head.cc:
  subselect in procedure argument list
sql/sql_parse.cc:
  subselect in procedure argument list
2003-04-23 22:31:47 +03:00
bell@sanja.is.com.ua
b9a4bf8cad subselect in procedure argument list (Bug #302) 2003-04-23 22:31:47 +03:00
unknown
4405216099 Fixes bug #302: call u((select 1)) now works.
More complex cases, like call u((select x from table limit 1)) does not.
2003-04-23 16:21:56 +02:00
pem@mysql.com
cba91cce8c Fixes bug #302: call u((select 1)) now works.
More complex cases, like call u((select x from table limit 1)) does not.
2003-04-23 16:21:56 +02:00
unknown
f525047d1e Made multiple queries (SELECT without INTO) work in SPs.
This included bug fixes in the 4.1 protocol (actually send and receive the
server_status flags).


libmysql/libmysql.c:
  Pick up the server_status (with the 4.1 protocol) as well.
mysql-test/r/sp-error.result:
  Test for "bad selects" in non-CLIENT_MULTI_QUERIES clients (as mysqltest for the
  momen; this test will have to go away eventually).
mysql-test/t/sp-error.test:
  Test for "bad selects" in non-CLIENT_MULTI_QUERIES clients (as mysqltest for the
  momen; this test will have to go away eventually).
sql/protocol.cc:
  Actually send the server_status flags in send_eof() (4.1 protocol), not just zero.
sql/sp_head.cc:
  Made multiple queries (SELECT without INTO) work in SPs.
sql/sp_head.h:
  Made multiple queries (SELECT without INTO) work in SPs.
sql/sql_parse.cc:
  Made multiple queries (SELECT without INTO) work in SPs.
sql/sql_yacc.yy:
  Made multiple queries (SELECT without INTO) work in SPs.
2003-04-23 09:22:54 +02:00
pem@mysql.com
a4e065920b Made multiple queries (SELECT without INTO) work in SPs.
This included bug fixes in the 4.1 protocol (actually send and receive the
server_status flags).
2003-04-23 09:22:54 +02:00
unknown
4ed94fcd8e Check the number of args to SPs.
Fixes bug #280.


include/mysqld_error.h:
  Check the number of args to SPs.
mysql-test/r/sp-error.result:
  Check the number of args to SPs.
mysql-test/t/sp-error.test:
  Check the number of args to SPs.
sql/share/czech/errmsg.txt:
  Check the number of args to SPs.
sql/share/danish/errmsg.txt:
  Check the number of args to SPs.
sql/share/dutch/errmsg.txt:
  Check the number of args to SPs.
sql/share/english/errmsg.txt:
  Check the number of args to SPs.
sql/share/estonian/errmsg.txt:
  Check the number of args to SPs.
sql/share/french/errmsg.txt:
  Check the number of args to SPs.
sql/share/german/errmsg.txt:
  Check the number of args to SPs.
sql/share/greek/errmsg.txt:
  Check the number of args to SPs.
sql/share/hungarian/errmsg.txt:
  Check the number of args to SPs.
sql/share/italian/errmsg.txt:
  Check the number of args to SPs.
sql/share/japanese/errmsg.txt:
  Check the number of args to SPs.
sql/share/korean/errmsg.txt:
  Check the number of args to SPs.
sql/share/norwegian-ny/errmsg.txt:
  Check the number of args to SPs.
sql/share/norwegian/errmsg.txt:
  Check the number of args to SPs.
sql/share/polish/errmsg.txt:
  Check the number of args to SPs.
sql/share/portuguese/errmsg.txt:
  Check the number of args to SPs.
sql/share/romanian/errmsg.txt:
  Check the number of args to SPs.
sql/share/russian/errmsg.txt:
  Check the number of args to SPs.
sql/share/serbian/errmsg.txt:
  Check the number of args to SPs.
sql/share/slovak/errmsg.txt:
  Check the number of args to SPs.
sql/share/spanish/errmsg.txt:
  Check the number of args to SPs.
sql/share/swedish/errmsg.txt:
  Check the number of args to SPs.
sql/share/ukrainian/errmsg.txt:
  Check the number of args to SPs.
sql/sp_head.cc:
  Check the number of args to SPs.
2003-04-17 13:20:02 +02:00
pem@mysql.com
7b5df9edec Check the number of args to SPs.
Fixes bug #280.
2003-04-17 13:20:02 +02:00
unknown
fc448ccb7f Fixed the last memory leaks in the SP code.
sql/sp.cc:
  Fixed clear_function_cache bug that made memory freeing work for functions too.
sql/sp_head.cc:
  Added more DBUG output to help finding memory leak.
sql/sql_parse.cc:
  Moved sp_clear_function_cache call so it *works*.
  Added missing memory freeing call.
2003-04-03 20:00:52 +02:00
pem@mysql.com
5c4122d3e0 Fixed the last memory leaks in the SP code. 2003-04-03 20:00:52 +02:00
unknown
0d71f5e1d3 Got rid of the last unecessary Item_strings. 2003-04-03 16:00:09 +02:00
pem@mysql.com
1fc3582b7d Got rid of the last unecessary Item_strings. 2003-04-03 16:00:09 +02:00
unknown
2eebaf7bd3 Getting rid of lots of memory leaks (but not quite all of them yet,
some will go away when temporary code is replaced).


mysql-test/r/sp.result:
  Drop db before creating.
mysql-test/t/sp.test:
  Drop db before creating.
2003-04-02 20:42:28 +02:00
pem@mysql.com
c673fcb813 Getting rid of lots of memory leaks (but not quite all of them yet,
some will go away when temporary code is replaced).
2003-04-02 20:42:28 +02:00
unknown
e22976638d Check for thd->killed in execution loop. (Makes more graceful behaviour in
certain interrupt cases.)
2003-03-28 17:02:31 +01:00
pem@mysql.com
017ba13005 Check for thd->killed in execution loop. (Makes more graceful behaviour in
certain interrupt cases.)
2003-03-28 17:02:31 +01:00
unknown
e9cc965afd Replaced a couple of strcasecmps. 2003-03-27 17:35:27 +01:00
pem@mysql.com
ac44a5f66e Replaced a couple of strcasecmps. 2003-03-27 17:35:27 +01:00
unknown
2c9ef84cc3 Fixed save/restore of current database when calling a procedure. 2003-03-26 15:02:48 +01:00
pem@mysql.com
483efba239 Fixed save/restore of current database when calling a procedure. 2003-03-26 15:02:48 +01:00
unknown
fa870804d3 Post post merge fix. Made the broken ip test work again.
sql/sp_head.cc:
  Added some more DBUG output.
sql/sp_pcontext.cc:
  Post post merge fix.
2003-03-20 11:57:05 +01:00
pem@mysql.com
0d95f36a12 Post post merge fix. Made the broken ip test work again. 2003-03-20 11:57:05 +01:00
unknown
f74b36a242 Improved error handling regarding SPs (with info like names etc in the output).
Disabled queries in FUNCTIONs.


include/mysqld_error.h:
  New error message for queries in FUNCTIONs.
mysql-test/t/sp.test:
  Moved error tests to sp-error.test.
sql/share/czech/errmsg.txt:
  New error message for queries in FUNCTIONs.
  Improved most of the SP error messages with added info.
sql/share/danish/errmsg.txt:
  New error message for queries in FUNCTIONs.
  Improved most of the SP error messages with added info.
sql/share/dutch/errmsg.txt:
  New error message for queries in FUNCTIONs.
  Improved most of the SP error messages with added info.
sql/share/english/errmsg.txt:
  New error message for queries in FUNCTIONs.
  Improved most of the SP error messages with added info.
sql/share/estonian/errmsg.txt:
  New error message for queries in FUNCTIONs.
  Improved most of the SP error messages with added info.
sql/share/french/errmsg.txt:
  New error message for queries in FUNCTIONs.
  Improved most of the SP error messages with added info.
sql/share/german/errmsg.txt:
  New error message for queries in FUNCTIONs.
  Improved most of the SP error messages with added info.
sql/share/greek/errmsg.txt:
  New error message for queries in FUNCTIONs.
  Improved most of the SP error messages with added info.
sql/share/hungarian/errmsg.txt:
  New error message for queries in FUNCTIONs.
  Improved most of the SP error messages with added info.
sql/share/italian/errmsg.txt:
  New error message for queries in FUNCTIONs.
  Improved most of the SP error messages with added info.
sql/share/japanese/errmsg.txt:
  New error message for queries in FUNCTIONs.
  Improved most of the SP error messages with added info.
sql/share/korean/errmsg.txt:
  New error message for queries in FUNCTIONs.
  Improved most of the SP error messages with added info.
sql/share/norwegian-ny/errmsg.txt:
  New error message for queries in FUNCTIONs.
  Improved most of the SP error messages with added info.
sql/share/norwegian/errmsg.txt:
  New error message for queries in FUNCTIONs.
  Improved most of the SP error messages with added info.
sql/share/polish/errmsg.txt:
  New error message for queries in FUNCTIONs.
  Improved most of the SP error messages with added info.
sql/share/portuguese/errmsg.txt:
  New error message for queries in FUNCTIONs.
  Improved most of the SP error messages with added info.
sql/share/romanian/errmsg.txt:
  New error message for queries in FUNCTIONs.
  Improved most of the SP error messages with added info.
sql/share/russian/errmsg.txt:
  New error message for queries in FUNCTIONs.
  Improved most of the SP error messages with added info.
sql/share/serbian/errmsg.txt:
  New error message for queries in FUNCTIONs.
  Improved most of the SP error messages with added info.
sql/share/slovak/errmsg.txt:
  New error message for queries in FUNCTIONs.
  Improved most of the SP error messages with added info.
sql/share/spanish/errmsg.txt:
  New error message for queries in FUNCTIONs.
  Improved most of the SP error messages with added info.
sql/share/swedish/errmsg.txt:
  New error message for queries in FUNCTIONs.
  Improved most of the SP error messages with added info.
sql/share/ukrainian/errmsg.txt:
  New error message for queries in FUNCTIONs.
  Improved most of the SP error messages with added info.
sql/sp_head.cc:
  Added debug output to sp_instr_jump::execute(). (Moved from sp_head.h)
sql/sp_head.h:
  Moved sp_instr_jump::execute() to sp_head.cc.
sql/sql_lex.h:
  Added SQLCOM_CREATE_SPFUNCTION (for improved error handling).
sql/sql_parse.cc:
  Improved error handling regarding SPs (adding info like names etc in output).
sql/sql_yacc.yy:
  Improved error handling regarding SPs (adding info like names etc in output).
  Disabled queries in FUNCTIONS (since it can't work anyway).
2003-03-05 19:45:17 +01:00
pem@mysql.com
12f771d9e7 Improved error handling regarding SPs (with info like names etc in the output).
Disabled queries in FUNCTIONs.
2003-03-05 19:45:17 +01:00
unknown
8a9422bd2a Made FUNCTIONs work in insert and select queries, as well as nested function invocations.
Had to add a cahing mechanism which is in parts an ugly kludge, but it will be
reworked once the real SP caching is implemented.


mysql-test/r/sp.result:
  New function tests.
mysql-test/t/sp.test:
  New function tests.
sql/sp.cc:
  Big rehack of mysql.proc table usage strategy and adding a function cache
  mechanism, since we need to read used functions from the db before doing anything else
  when executing a query. (This cache is temporary and will probably be replaced by
  the real thing later.)
sql/sp.h:
  New (temporary) FUNCTION caching functions.
sql/sp_head.cc:
  Fixed some bugs in the function and procedure execution.
  Disabled some data collections that's not used at the moment.
sql/sp_head.h:
  Fixed some bugs in the function and procedure execution.
  Disabled some data collections that's not used at the moment.
sql/sql_class.h:
  Added SP function cache list to thd.
sql/sql_lex.cc:
  Added SP function name list to lex.
sql/sql_lex.h:
  Added SP function name list to lex.
sql/sql_parse.cc:
  Read used FUNCTIONs from db and cache them in thd before doing anything else
  in a query execution. (This is necessary since we can't open mysql.proc during
  query execution.)
sql/sql_yacc.yy:
  Collect used function names in lex.
2003-03-02 19:17:41 +01:00
pem@mysql.com
8049daf202 Made FUNCTIONs work in insert and select queries, as well as nested function invocations.
Had to add a cahing mechanism which is in parts an ugly kludge, but it will be
reworked once the real SP caching is implemented.
2003-03-02 19:17:41 +01:00
unknown
1ff79b61a0 Closing tables during SP execution the proper way.
mysql-test/r/show_check.result:
  proc table now shows up in different places.
mysql-test/r/status.result:
  proc table now shows up in different places.
sql/sp.cc:
  Fixed closing of tables.
sql/sp_head.cc:
  Close tables after each sub statement.
sql/sql_class.cc:
  Removed closing of tables in various send_eof() methods again.
2003-02-28 15:07:14 +01:00
pem@mysql.com
b6ab762dc1 Closing tables during SP execution the proper way. 2003-02-28 15:07:14 +01:00
unknown
aecc6a21bd A small step forward. Fixed a few bugs and made string type functions work,
but still strange interferences between multiple function invocations...


mysql-test/r/sp.result:
  New FUNCTION tests.
mysql-test/t/sp.test:
  New FUNCTION tests.
sql/item_func.cc:
  Fixed field_type bug; now string functions work too.
  Removed unecessary function which was added in a state of confusion.
sql/item_func.h:
  Fixed field_type bug; now string functions work too.
  Removed unecessary function which was added in a state of confusion.
sql/sp_head.cc:
  Fixed string type bug, and set the right charset.
2003-02-27 19:08:52 +01:00
pem@mysql.com
16cff7e75d A small step forward. Fixed a few bugs and made string type functions work,
but still strange interferences between multiple function invocations...
2003-02-27 19:08:52 +01:00
unknown
76b037dc42 Made stored FUNCTION invokation work almost always. Still buggy and unstable, and
various known problems, but good enough for a checkpoint commit.


mysql-test/r/sp.result:
  New tests for invoking simple FUNCTIONs.
mysql-test/t/sp.test:
  New tests for invoking simple FUNCTIONs.
sql/item_func.cc:
  New Item_func_sp for stored FUNCTIONs.
sql/item_func.h:
  New Item_func_sp for stored FUNCTIONs.
sql/sp.cc:
  Close mysql.proc table earlier so recursive find_function calls work.
  Added temporary sp_function_exists() function for checking without parsing.
sql/sp.h:
  Added temporary sp_function_exists() function for checking without parsing.
sql/sp_head.cc:
  New code for executing a FUNCTION. (And reworked some of the old code in the process.)
sql/sp_head.h:
  New code for executing a FUNCTION.
sql/sp_rcontext.h:
  Added result slot for FUNCTIONs.
sql/sql_lex.cc:
  Added check for stored FUNCTION, analogous to UDFs.
sql/sql_parse.cc:
  sp_head::execute was renamed into execute_procedure.
sql/sql_yacc.yy:
  Added parsing of stored FUNCTION invocation and code generation for RETURN statement.
2003-02-26 19:22:29 +01:00
pem@mysql.com
ca2e77ca7a Made stored FUNCTION invokation work almost always. Still buggy and unstable, and
various known problems, but good enough for a checkpoint commit.
2003-02-26 19:22:29 +01:00
unknown
0521fb5444 Most of the groundwork for sprint task 729 (implement FUNCTIONs).
Expanded the mysql.proc table, reworked the find/create/drop functions
completely, added new functions for FUNCTIONs (lotta functions here :),
got rid of some unnecessary use of Item_strings while at it. Extended
the parser correspondingly, and fiddled around a bit to make SP FUNCTIONs
coexist with UDFs.
Can now CREATE and DROP FUNCTIONs. Invoking yet to come...


Docs/sp-implemented.txt:
  Updated with info about CASCADE/RESTICT and METHOD, and some answers to questions.
include/mysqld_error.h:
  New error message for misuse of RETURN.
mysql-test/install_test_db.sh:
  Added enum field to mysql.proc to distinguish between FUNCTION and PROCEDURE.
mysql-test/r/sp.result:
  New test for creating and dropping FUNCTIONS.
mysql-test/t/sp.test:
  New test for creating and dropping FUNCTIONS.
scripts/mysql_install_db.sh:
  Added enum field to mysql.proc to distinguish between FUNCTION and PROCEDURE.
sql/lex.h:
  De-UDFed some symbol names, as they are now used for SPs as well.
  Added RETURN_SYM.
sql/share/czech/errmsg.txt:
  New error message for misuse of RETURN.
sql/share/danish/errmsg.txt:
  New error message for misuse of RETURN.
sql/share/dutch/errmsg.txt:
  New error message for misuse of RETURN.
sql/share/english/errmsg.txt:
  New error message for misuse of RETURN.
sql/share/estonian/errmsg.txt:
  New error message for misuse of RETURN.
sql/share/french/errmsg.txt:
  New error message for misuse of RETURN.
sql/share/german/errmsg.txt:
  New error message for misuse of RETURN.
sql/share/greek/errmsg.txt:
  New error message for misuse of RETURN.
sql/share/hungarian/errmsg.txt:
  New error message for misuse of RETURN.
sql/share/italian/errmsg.txt:
  New error message for misuse of RETURN.
sql/share/japanese/errmsg.txt:
  New error message for misuse of RETURN.
sql/share/korean/errmsg.txt:
  New error message for misuse of RETURN.
sql/share/norwegian-ny/errmsg.txt:
  New error message for misuse of RETURN.
sql/share/norwegian/errmsg.txt:
  New error message for misuse of RETURN.
sql/share/polish/errmsg.txt:
  New error message for misuse of RETURN.
sql/share/portuguese/errmsg.txt:
  New error message for misuse of RETURN.
sql/share/romanian/errmsg.txt:
  New error message for misuse of RETURN.
sql/share/russian/errmsg.txt:
  New error message for misuse of RETURN.
sql/share/serbian/errmsg.txt:
  New error message for misuse of RETURN.
sql/share/slovak/errmsg.txt:
  New error message for misuse of RETURN.
sql/share/spanish/errmsg.txt:
  New error message for misuse of RETURN.
sql/share/swedish/errmsg.txt:
  New error message for misuse of RETURN.
sql/share/ukrainian/errmsg.txt:
  New error message for misuse of RETURN.
sql/sp.cc:
  Major rehack to accomodate FUNCTIONs, and to make it easier to add
  future in-memory cache of prepared SPs.
sql/sp.h:
  Major rehack to accomodate FUNCTIONs, and to make it easier to add
  future in-memory cache of prepared SPs.
sql/sp_head.cc:
  Now creates FUNCTIONs too. (And got rid of some unnecessary Item_string use.)
sql/sp_head.h:
  Now creates FUNCTIONs too. (And got rid of some unnecessary Item_string use.)
sql/sql_lex.h:
  New stored FUNCTION commands.
sql/sql_parse.cc:
  Added FUNCTION support ("drop" merged with the old UDF code), and made some
  additional changes for better error handling (following the sp.cc rehacking).
sql/sql_yacc.yy:
  Some former UDF specific symbols renamed.
  Added CREATE FUNCTION parsing.
  DROP FUNCTION had to be partly merged with the old UDF code, because of the similar
  syntax.
  RETURN statement added, but still a no-op.
2003-02-21 17:37:05 +01:00
pem@mysql.com
d8c75ec8aa Most of the groundwork for sprint task 729 (implement FUNCTIONs).
Expanded the mysql.proc table, reworked the find/create/drop functions
completely, added new functions for FUNCTIONs (lotta functions here :),
got rid of some unnecessary use of Item_strings while at it. Extended
the parser correspondingly, and fiddled around a bit to make SP FUNCTIONs
coexist with UDFs.
Can now CREATE and DROP FUNCTIONs. Invoking yet to come...
2003-02-21 17:37:05 +01:00
unknown
6cfaf04e4d Fixed some DBUGing, and optimized SET slightly.
sql/sp.cc:
  Added DBUG statements.
sql/sp_head.cc:
  Added DBUG statements.
sql/sql_parse.cc:
  Changed returns into DBUG_RETURNs in mysql_execute_command().
sql/sql_yacc.yy:
  Small optimization: Don't generate sp_instr_stmt instructions for empty
  SET_OPTIONs. (Which happened if there were only local variables in the SET
  statement.)
2003-02-12 16:17:03 +01:00
pem@mysql.com
d53fc31958 Fixed some DBUGing, and optimized SET slightly. 2003-02-12 16:17:03 +01:00
unknown
a3111ad09b Fixed crash bug when certain procedures are called from the top level.
sql/sp_head.cc:
  Fixed crash bug when certain procedures are called from the top level.
  Attempted to support global user vars as OUT/INOUT parameters too, but
  unfortunately we can't quite manage that yet.
2003-02-02 17:44:39 +01:00
pem@mysql.com
b6890a7930 Fixed crash bug when certain procedures are called from the top level. 2003-02-02 17:44:39 +01:00
unknown
79993565a9 Fixed some basic error handling for SP functions in mysql_execute_command().
include/mysqld_error.h:
  Added error codes for SPs
sql/mysql_priv.h:
  Changed return value of mysql_execute_command() from void to int; need to be able
  to detect if executions of substatements in SPs failed.
sql/share/czech/errmsg.txt:
  Added error messages for SPs.
sql/share/danish/errmsg.txt:
  Added error messages for SPs.
sql/share/dutch/errmsg.txt:
  Added error messages for SPs.
sql/share/english/errmsg.txt:
  Added error messages for SPs.
sql/share/estonian/errmsg.txt:
  Added error messages for SPs.
sql/share/french/errmsg.txt:
  Added error messages for SPs.
sql/share/german/errmsg.txt:
  Added error messages for SPs.
sql/share/greek/errmsg.txt:
  Added error messages for SPs.
sql/share/hungarian/errmsg.txt:
  Added error messages for SPs.
sql/share/italian/errmsg.txt:
  Added error messages for SPs.
sql/share/japanese/errmsg.txt:
  Added error messages for SPs.
sql/share/korean/errmsg.txt:
  Added error messages for SPs.
sql/share/norwegian-ny/errmsg.txt:
  Added error messages for SPs.
sql/share/norwegian/errmsg.txt:
  Added error messages for SPs.
sql/share/polish/errmsg.txt:
  Added error messages for SPs.
sql/share/portuguese/errmsg.txt:
  Added error messages for SPs.
sql/share/romanian/errmsg.txt:
  Added error messages for SPs.
sql/share/russian/errmsg.txt:
  Added error messages for SPs.
sql/share/serbian/errmsg.txt:
  Added error messages for SPs.
sql/share/slovak/errmsg.txt:
  Added error messages for SPs.
sql/share/spanish/errmsg.txt:
  Added error messages for SPs.
sql/share/swedish/errmsg.txt:
  Added error messages for SPs.
sql/share/ukrainian/errmsg.txt:
  Added error messages for SPs.
sql/sp_head.cc:
  Moved net.no_send_ok fiddling to sql_parse.cc.
  Check if mysql_execute_command() failed.
sql/sql_parse.cc:
  Changed return value of mysql_execute_command() from void to int; need to be able
  to detect if executions of substatements in SPs failed. Fixed all returns
  accordingly.
  Added error checks for SQLCOM_CREATE_PROCEDURE, CALL, ALTER_PROCEDURE, and
  DROP_PROCEDURE.
2003-01-15 15:39:36 +01:00
pem@mysql.com
b863798a7c Fixed some basic error handling for SP functions in mysql_execute_command(). 2003-01-15 15:39:36 +01:00
unknown
a3fe4223e8 Fixed some of the data collection during parsing.
sql/sp_head.cc:
  Renamed m_mylex into m_call_lex.
  Fixed some data collection.
sql/sp_head.h:
  Renamed m_mylex into m_call_lex.
  Put called procedures and used tables in class member vars (for now at least).
2002-12-19 18:43:25 +01:00
pem@mysql.com
204aa97280 Fixed some of the data collection during parsing. 2002-12-19 18:43:25 +01:00
unknown
b12330b3d9 Added parsing of CASE (both generic and "simple").
sql/sp_head.cc:
  Init. the simple_case flag.
sql/sp_head.h:
  New flag for (simple)case parsing.
sql/sp_pcontext.cc:
  Removed push_gen_label method (not needed any more).
sql/sp_pcontext.h:
  Removed push_gen_label method (not needed any more).
  Fixed bug in pop().
sql/sql_yacc.yy:
  Added CASE parsing.
2002-12-17 10:01:52 +01:00
pem@mysql.com
58d3dda33f Added parsing of CASE (both generic and "simple"). 2002-12-17 10:01:52 +01:00
unknown
f6611aa0ab Fixed the broken backpatching implementation.
Implemented IF-THEN-ELSE.


sql/sp_head.cc:
  Reimplemented the broken backpatching, so it works for nested constructions and
  IF-THEN-ELSE too.
sql/sp_head.h:
  Reimplemented the broken backpatching, so it works for nested constructions and
  IF-THEN-ELSE too.
sql/sp_pcontext.cc:
  Return the value from push-methods, for convenience.
sql/sp_pcontext.h:
  Return the value from push-methods, for convenience.
sql/sql_yacc.yy:
  Implemented IF-THEN-ELSE.
  Corrected for the new backpatch method.
2002-12-16 15:40:44 +01:00
pem@mysql.com
b1593c9a69 Fixed the broken backpatching implementation.
Implemented IF-THEN-ELSE.
2002-12-16 15:40:44 +01:00
unknown
390b3e745c Added collection of called procedures in a list.
Fixed eval bug; now conditions with local variables work in WHILE et al.
Made mysql_install_db.sh create proc table.


scripts/mysql_install_db.sh:
  Added creation of the mysql.proc table.
  Note: The table format will change later, right now it's rather minimalistic,
  just so things can be tested (and the database can easily be recreated when
  I break it :-/ ).
sql/item.h:
  Removed unused method.
sql/sp_head.cc:
  Added collection of called procedures in a list.
  Fixed eval bug; now conditions with local variables work in WHILE et al.
2002-12-13 18:25:36 +01:00
pem@mysql.com
113b9240d1 Added collection of called procedures in a list.
Fixed eval bug; now conditions with local variables work in WHILE et al.
Made mysql_install_db.sh create proc table.
2002-12-13 18:25:36 +01:00
unknown
b1b6227485 Moved create/find/drop functions to a separate files (sp.cc,sp.h).
Fixed backpatching of forward jumps.
Implemented LOOP, WHILE, REPEAT (temporarily known as SPREPEAT).

Known bug: Expression evaluation still not quite ok (e.g. "x > 0"),
which is why IF and CASE is not yet implemented.


sql/Makefile.am:
  Added new sp.h/sp.cc file.
sql/item.h:
  New deferred result_type() method in Item_splocal.
sql/lex.h:
  Temporary fix until REPEAT conflict is solved. Use SPREPEAT for now.
sql/sp_head.cc:
  Moved create/find/drop functions to sp.cc.
  Fixed the backpatch stuff.
  (Also removed some dead code and updated comments.)
sql/sp_head.h:
  Moved create/find/drop declarations to sp.h.
  Fixed the backpatch stuff.
sql/sp_pcontext.h:
  New method: last_label().
sql/sql_parse.cc:
  Include sp.h.
sql/sql_yacc.yy:
  Fixed backpatching of forward jumps.
  Implemented LOOP, WHILE, and REPEAT. (Note: SPREPEAT for now.)
2002-12-12 13:14:23 +01:00
pem@mysql.com
77b671f594 Moved create/find/drop functions to a separate files (sp.cc,sp.h).
Fixed backpatching of forward jumps.
Implemented LOOP, WHILE, REPEAT (temporarily known as SPREPEAT).

Known bug: Expression evaluation still not quite ok (e.g. "x > 0"),
which is why IF and CASE is not yet implemented.
2002-12-12 13:14:23 +01:00
unknown
37ce17e2cd Fixed bugs in the parameter evaluation and modified the execution engine
for better jump support. Some flow control support added too (but not
complete).


sql/lex.h:
  Added more keywords for embedded SQL.
sql/sp_head.cc:
  Fixed bugs in the parameter evaluation.
  Modified execute() for better jump support.
  Added jump instruction and backpatch support.
sql/sp_head.h:
  Fixed bugs in the parameter evaluation.
  Modified execute() for better jump support.
  Added jump instruction and backpatch support.
sql/sp_pcontext.cc:
  Added label support.
sql/sp_pcontext.h:
  Added label support.
sql/sql_yacc.yy:
  Outlined flow control constructs (parses, but nothing generated yet).
2002-12-11 14:24:29 +01:00
pem@mysql.com
f0137bcd68 Fixed bugs in the parameter evaluation and modified the execution engine
for better jump support. Some flow control support added too (but not
complete).
2002-12-11 14:24:29 +01:00
unknown
27de9ece81 Simplistic, experimental framework for Stored Procedures (SPs).
Implements creation and dropping of PROCEDUREs, IN, OUT, and INOUT parameters,
single-statement procedures, rudimentary multi-statement (begin-end) prodedures
(when the client can handle it), and local variables.
Missing most of the embedded SQL language, all attributes, FUNCTIONs, error handling,
reparses procedures at each call (no caching), etc, etc.
Certainly buggy too, but procedures can actually be created and called....


sql/Makefile.am:
  Added SP files.
sql/item.cc:
  Added this*_item() methods for Item_splocal. (SP local variable)
sql/item.h:
  Added this*_item() methods for SPs in Item, and the new Item_splocal
  class (SP local variable).
sql/lex.h:
  Added new symbols for SPs. (Note: SPSET is temporary and will go away later.)
sql/sql_class.cc:
  Initialize SP runtime context in THD.
sql/sql_class.h:
  Add SP runtime context to THD.
sql/sql_lex.cc:
  Init. buf pointer to beginning of command (needed by SPs).
  Also initialize SP head and parse time context.
sql/sql_lex.h:
  New SQLCOM_ tags for SPs, and added pointer to beginning of command pointer and
  SP head and parse-time context to LEX.
sql/sql_parse.cc:
  Added SQLCOM_CREATE_PROCEDURE, _CALL, _ALTER_PROCEDURE and _DROP_PROCEDURE cases.
  (Still rudimentary and lacking proper error handling...)
sql/sql_yacc.yy:
  Lots and lots of additions for SPs...
  (Still even more missing, and no error messages...)
2002-12-08 19:59:22 +01:00
pem@mysql.com
aae07a4d45 Simplistic, experimental framework for Stored Procedures (SPs).
Implements creation and dropping of PROCEDUREs, IN, OUT, and INOUT parameters,
single-statement procedures, rudimentary multi-statement (begin-end) prodedures
(when the client can handle it), and local variables.
Missing most of the embedded SQL language, all attributes, FUNCTIONs, error handling,
reparses procedures at each call (no caching), etc, etc.
Certainly buggy too, but procedures can actually be created and called....
2002-12-08 19:59:22 +01:00