Commit graph

177 commits

Author SHA1 Message Date
unknown
96aeecf237 Fixed BUG#4318: Stored Procedure packet error if HANDLER statement,
at least partially. It doesn't crash or give packets out of order
any more, but it's unclear why it doesn't actually return anything
from within an SP. This should be investigated at some point, but
for the moment this will have to do. (It is a rather obscure feature... :)


mysql-test/r/sp.result:
  Test case for BUG#4318.
mysql-test/t/sp.test:
  Test case for BUG#4318.
sql/sql_yacc.yy:
  Recognize HANDLER READ as another statement that might result in multiple results.
2004-07-29 16:52:17 +02:00
unknown
1876125e6d New test case for BUG#4726: Stored procedure crash when looping over SELECT with complex WHERE's.
(The fix was merged in from 4.1)


mysql-test/r/sp.result:
  New test case for BUG#4726.
mysql-test/t/sp.test:
  New test case for BUG#4726.
2004-07-23 19:52:06 +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
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
unknown
05f9e4dd0e Fixed BUG#3368: Stored procedure crash if group_concat(variable).
mysql-test/r/sp.result:
  New test case for BUG#3368.
mysql-test/t/sp.test:
  New test case for BUG#3368.
sql/item.h:
  Corrected const_item() for item_splocal. (Confusing semantics here, but this
  makes group_concat() behave as expected, instead of crashing, and does not
  appear to affect anything else.)
2004-06-15 14:26:19 +02:00
unknown
6fd6652be2 Fixed BUG#3843: ANALYZE TABLE inside stored procedure causes 'Packets out of order' error.
mysql-test/r/sp.result:
  New test case for BUG#3843.
mysql-test/t/sp.test:
  New test case for BUG#3843.
sql/sql_yacc.yy:
  Added another multi results special case for stored procedures (analyze).
2004-06-14 12:38:54 +02:00
unknown
05165962e7 Fixed BUG#3132: Stored function returns empty when used in union.
mysql-test/r/sp.result:
  Added testcase for BUG#3132.
mysql-test/t/sp.test:
  Added testcase for BUG#3132.
sql/item_func.cc:
  Set a useful max_length in Item_func_sp so field widths are correctly calculated.
2004-06-10 17:07:53 +02: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
unknown
b0921b1f5a Fixed BUG#2460: Crash wih Stored Procedure and UNION.
mysql-test/r/sp.result:
  Added test case for BUG#2460.
mysql-test/t/sp.test:
  Added test case for BUG#2460.
sql/sql_union.cc:
  When called from stored procedures, tabs might be reset already.
2004-05-28 19:43:06 +02:00
unknown
72139b18aa Added test cases for the following bugs that have been fixed by recent changes:
BUG#1863: CREATE TABLE in Stored Procedure sometimes crashes on repeated calls.
 BUG#2656: select with join in stored procedure: erroneous result on 2nd call.
 BUG#3426: IF x IS NULL in stored procedure fails on second call within connection.
 BUG#3448: Stored Procedures with inner joins possible bug.
 BUG#3734: Stored procedure returns wrong rows with fulltext parameter.
 BUG#3863: Stored procedure crash when incrementing variable in a loop.

(And corrected the row count output to the client after CALL)


mysql-test/r/sp.result:
  New test case results for fixed bugs.
mysql-test/t/sp.test:
  New test cases for fixed bugs.
sql/sql_parse.cc:
  Corrected the row_count output to the client.
2004-05-28 18:33:14 +02: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
unknown
f3d691a970 Correction of WL#1567: row_count() is -1 following non-insert/update/delete
statements.


mysql-test/r/sp.result:
  Added row_count() test for non-insert/update/delete statement.
mysql-test/t/sp.test:
  Added row_count() test for non-insert/update/delete statement.
sql/sql_class.h:
  thd->row_count_func must be signed for JDBC/ODBC (can be -1).
sql/sql_parse.cc:
  Reset thd->row_count_func to -1 for non-insert/update/delete statements.
2004-05-04 17:18:47 +02:00
unknown
7c4ceb739f WL#1567: Add ROW_COUNT() Function to retrieve count of rows updated/inserted/deleted
mysql-test/r/sp.result:
  New test cases for function ROW_COUNT().
mysql-test/t/sp.test:
  New test cases for function ROW_COUNT().
sql/item_func.cc:
  New Item_func_row_count.
sql/item_func.h:
  New Item_func_row_count.
sql/lex.h:
  New symbol for function ROW_COUNT().
sql/sql_class.h:
  New slot in THD for storing the row_count after insert, delete and update.
sql/sql_delete.cc:
  Set thd->row_count_func when deleting.
sql/sql_insert.cc:
  Set thd->row_count_func when inserting.
sql/sql_parse.cc:
  Stored procedure CALLs send the row count from the last insert, delete or update.
sql/sql_update.cc:
  Set thd->row_count_func when updating.
sql/sql_yacc.yy:
  New function ROW_COUNT().
2004-05-04 13:45:20 +02:00
unknown
2eecc377a6 Post-merge fixes, some quite complex. client/mysqlbinlog.cc and sql/log_event.cc
merged manually by guilhem.


client/mysqlbinlog.cc:
  Post-merge fixes; manually merged by guilhem.
include/mysqld_error.h:
  Post-merge fixes.
mysql-test/r/drop_temp_table.result:
  Post-merge fixes.
mysql-test/r/insert.result:
  Post-merge fixes.
mysql-test/r/mysqlbinlog.result:
  Post-merge fixes.
mysql-test/r/query_cache.result:
  Post-merge fixes.
mysql-test/r/rpl_error_ignored_table.result:
  Post-merge fixes.
mysql-test/r/rpl_relayrotate.result:
  Post-merge fixes.
mysql-test/r/rpl_trunc_binlog.result:
  Post-merge fixes.
mysql-test/r/sp-error.result:
  Post-merge fixes.
mysql-test/r/sp.result:
  Post-merge fixes.
mysql-test/r/system_mysql_db.result:
  Post-merge fixes.
mysql-test/r/variables.result:
  Post-merge fixes.
mysql-test/t/rpl_error_ignored_table.test:
  Post-merge fixes.
mysql-test/t/sp-error.test:
  Post-merge fixes.
sql/ha_innodb.cc:
  Post-merge fixes.
sql/log_event.cc:
  Post-merge fixes; manually merged by guilhem.
sql/set_var.cc:
  Post-merge fixes.
sql/share/danish/errmsg.txt:
  Post-merge fixes.
sql/share/dutch/errmsg.txt:
  Post-merge fixes.
sql/share/english/errmsg.txt:
  Post-merge fixes.
sql/share/estonian/errmsg.txt:
  Post-merge fixes.
sql/sp.cc:
  Post-merge fixes.
sql/sql_insert.cc:
  Post-merge fixes.
sql/sql_table.cc:
  Post-merge fixes.
2004-04-28 12:08:54 +02:00
unknown
8468cde4f1 Fixed BUG#2780: Stored procedure exit handler ignored for warnings.
Actually catch pushed warnings.


mysql-test/r/sp.result:
  New test case for BUG#2780.
mysql-test/t/sp.test:
  New test case for BUG#2780.
sql/sql_error.cc:
  Actually attempt to catch pushed warnings when running SPs.
2004-04-06 16:29:38 +02:00
unknown
c22ccc136b Fixed BUG#2776: Stored procedure crash if variable assigned to default.
Keep track on the default value and use it. (Or NULL, if not declared.)


mysql-test/r/sp.result:
  New testcases for BUG#2776.
mysql-test/t/sp.test:
  New testcases for BUG#2776.
sql/sp_pcontext.cc:
  Initialize local variable default value.
sql/sp_pcontext.h:
  New method for saving default value.
sql/sql_yacc.yy:
  If DEFAULT is use as a value in SET variable = ... in an SP, actually use the default.
2004-04-06 15:48:58 +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
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
unknown
220494bde0 Fixed BUG#3259: Stored procedure names are case sensitive.
Procedure names were unintentionally case-sensitive when read from the database
(but case-insensitive when fetched from the cache).
Note that the DB-part of qualified names is still case-sensitive (for consistency
with other usage in mysql).


Docs/sp-imp-spec.txt:
  Removed "binary" from name and specific_name columns in mysql.proc definition.
mysql-test/r/sp.result:
  Test case for BUG#3259; SP names were supposed to be case-insensitive.
mysql-test/t/sp.test:
  Test case for BUG#3259; SP names were supposed to be case-insensitive.
scripts/mysql_create_system_tables.sh:
  Removed "binary" from name and specific_name columns in mysql.proc definition.
scripts/mysql_fix_privilege_tables.sql:
  Removed "binary" from name and specific_name columns in mysql.proc definition,
  and added a corresponding ALTER TABLE to fix existing tables.
sql/sp.cc:
  Added missing init of variable.
2004-03-23 12:04:40 +01:00
unknown
645d19f694 WL#1366: Use the schema (db) associated with an SP.
Phase 4 (final): Remove associated stored procedures when a database is dropped.


mysql-test/r/sp-security.result:
  drop database now deletes associated SPs.
mysql-test/r/sp.result:
  drop database now deletes associated SPs.
mysql-test/t/sp-security.test:
  drop database now deletes associated SPs.
mysql-test/t/sp.test:
  drop database now deletes associated SPs.
sql/sp.cc:
  New function for deleting all SPs associated with a database.
sql/sp.h:
  New function for deleting all SPs associated with a database.
sql/sp_cache.cc:
  New function for just invalidating all SP caches (when dropping a database).
sql/sp_cache.h:
  New function for just invalidating all SP caches (when dropping a database).
sql/sql_db.cc:
  When dropping a database, also delete all associated SPs.
2004-03-22 14:44:41 +01:00
unknown
edf2003009 Merge
mysql-test/r/sp.result:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
sql/sp.cc:
  SCCS merged
2004-03-18 15:08:17 +01:00
unknown
36dd97239a Fix BUG#2674: Crash if return system variable in stored procedures.
Had to initialize some fields in lex before parsing an SP read from
mysql.proc.


mysql-test/r/sp.result:
  New test case for BUG#2674.
mysql-test/t/sp.test:
  New test case for BUG#2674.
sql/sp.cc:
  We need to initialize some thd->lex fields (e.g. unit master pointers) since
  LEX::uncacheable() depends on this, and it's called when looking up system
  variables during parsing.
2004-03-17 12:09:03 +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
unknown
5390589c3c Fixed test for BUG#2614 (right name, right place, etc...),
and updated sp.result as well.


mysql-test/r/sp.result:
  Fixed test for BUG#2614 (right name, right place, etc...),
  and updated this file as well.
mysql-test/t/sp.test:
  Fixed test for BUG#2614 (right name, right place, etc...)
2004-02-03 15:58:22 +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
unknown
95a34bd83f Merge mysql.com:/usr/local/bk/mysql-5.0
into mysql.com:/home/pem/work/mysql-5.0


mysql-test/r/sp.result:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2004-01-14 18:20:49 +01:00
unknown
b6b947d614 Fixed BUG#2267: Lost connect if stored procedure has SHOW FUNCTION STATUS.
(This might not be enough, could be more statements that must be detected...)


mysql-test/r/sp.result:
  Test case for BUG#2267
mysql-test/t/sp.test:
  Test case for BUG#2267
sql/sp.cc:
  Code clean-up: Get the correct order of print-outs in debug trace.
sql/sql_yacc.yy:
  Detect "select-like" statements so that the multi result flag is set correctly.
2004-01-14 18:18:29 +01:00
unknown
612078813b Fixed BUG#2329: Crash if insert with variable name in stored procedure.
Found a few more places in the parser (insert, replace and update) where
local stored procedure variables should not be recognized.


mysql-test/r/sp-error.result:
  Test cases for BUG#2329
mysql-test/r/sp.result:
  New test case for certain context dependencies for symbols.
mysql-test/t/sp-error.test:
  Test cases for BUG#2329
mysql-test/t/sp.test:
  New test case for certain context dependencies for symbols.
sql/sql_yacc.yy:
  Found a few more places where local SP variables should not be recognized.
2004-01-14 12:47:03 +01:00
unknown
03b652cfbf Fix BUG#2260: Handler NOT FOUND declaration does't work in stored procedure
mysql-test/r/sp.result:
  Test case for BUG#2260.
mysql-test/t/sp.test:
  Test case for BUG#2260.
sql/sp_rcontext.cc:
  Detect warning and not found, and exception condition correctly.
2004-01-08 10:55:10 +01:00
unknown
c466a191d9 Fixed memory leaks in SP
Some code cleanup


mysql-test/r/sp.result:
  Update results after adding quotes around function/procedure names
sql/sp.cc:
  Moved DBUG_ENTER after all variable declarations
  Eliminated some variables.
  Added more DBUG_ENTER commands.
  Added memory allocation checking in create_string()
  Fixed memory leak in sp_show_create_function()
  Removed usage of sprintf
sql/sql_parse.cc:
  Simple cleanup
  Fixed memory leaks for mailformed SP definitions
2003-12-21 12:48:03 +02:00
unknown
bc748bef53 Post-merge fixes.
Multiple result sets from stored procedures now works with the
mysql and mysqltest clients.


client/mysqltest.c:
  Post-merge fixes.
mysql-test/r/index_merge_innodb.result:
  Post-merge fixes.
mysql-test/r/sp-error.result:
  Post-merge fixes.
  Removed now obsolete error test for multiple selects (without "into").
mysql-test/r/sp.result:
  Post-merge fixes.
  Added test for mulple result sets.
mysql-test/r/variables.result:
  Post-merge fixes.
mysql-test/t/index_merge_innodb.test:
  Post-merge fixes.
mysql-test/t/sp-error.test:
  Post-merge fixes.
  Removed now obsolete error test for multiple selects (without "into").
mysql-test/t/sp.test:
  Post-merge fixes.
  Added test for mulple result sets.
sql/lex.h:
  Post-merge fixes.
2003-12-16 18:09:22 +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
unknown
8630ca9a09 Don't want host in the definer's column. 2003-12-12 14:12:38 +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
unknown
b5627bb00c WL#1364: Store some environmental values with SPs and use at invokation
sql_mode is stored and used with SPs.
sql_select_limit is always unlimited in SPs.


mysql-test/r/sp.result:
  Test case for mode settings.
mysql-test/t/sp.test:
  Test case for mode settings.
sql/sp.cc:
  Store the sql_mode with the SP and reset it on retrieval.
  sql_select_limit is always maximum (default) in an SP,
  regardless of the setting at the time of create or call.
2003-12-11 12:23:50 +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
unknown
7f9ba01f99 New test cases for BUG#1653 (recalling a procedure after replacing a faulty
table definition crashed), and recursive calls.


mysql-test/r/sp.result:
  New test cases for BUG#1653 and recursive calls.
mysql-test/t/sp.test:
  New test cases for BUG#1653 and recursive calls.
2003-12-05 18:52:33 +01:00
unknown
da7ca9ba04 Post-merge fixes. 2003-12-01 18:24:09 +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
unknown
8bd2c19af8 Handle null values correctly in SP local variables.
mysql-test/r/sp.result:
  Test for handling of null values.
mysql-test/t/sp.test:
  Test for handling of null values.
sql/item.h:
  Update null_value correctly in Item_splocal.
2003-11-20 16:14:24 +01:00
unknown
700ae43d71 Bugfixes in SHOW CREATE PROCEDURE/FUNCTION and SHOW PROCEDURE/FUNCTION STATUS;
- dropped routines should not show up in status
- error handling for non-existing routines

+ some cleanup.


mysql-test/r/sp-error.result:
  Test SHOW CREATE PROCEDURE for non-existing procedure.
mysql-test/r/sp.result:
  Additional SHOW FUNCTION/PROCEDURE STATUS calls (make sure they don't show
  after being dropped).
mysql-test/t/sp-error.test:
  Test SHOW CREATE PROCEDURE for non-existing procedure.
mysql-test/t/sp.test:
  Additional SHOW FUNCTION/PROCEDURE STATUS calls (make sure they don't show
  after being dropped).
sql/sp.cc:
  Fixed bug in SHOW ... STATUS after a routine has been dropped,
  and fixed the error return codes (for correct error handling).
  Also some general cleanup.
sql/sp.h:
  Fixed prefix for external functions (should be sp_, not db_).
sql/sql_parse.cc:
  Fixed error handling in SHOW CREATE PROCEDURE/FUNCTION.
2003-11-20 15:07:22 +01:00
unknown
afe2186e3b 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
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
unknown
c9232c60e2 Various bug fixes:
- Duplicate parameters/variables, conditions and cursors (not allowed).
  - ITERATE in labelled BEGIN-END (not allowed).
  - Missing SQLSTATE [VALUE] keywords in CONDITION/HANDLER declaration (added).
  - Empty BEGIN-END (now allowed).
  - End label (now optional).


include/mysqld_error.h:
  New error code for duplicate things (vars et al) in SPs.
mysql-test/r/sp-error.result:
  New error tests for ITERATE in begin-end block and duplicate variables,
  conditions and cursors.
mysql-test/r/sp.result:
  New tests for empty begin-end blocks, overriding local variables outside scope
  only, leave a begin-end block, and SQLSTATE [VALUE] words for CONDITION/HANDLER
  declarations.
mysql-test/t/sp-error.test:
  New error tests for ITERATE in begin-end block and duplicate variables,
  conditions and cursors.
mysql-test/t/sp.test:
  New tests for empty begin-end blocks, overriding local variables outside scope
  only, leave a begin-end block, and SQLSTATE [VALUE] words for CONDITION/HANDLER
  declarations.
sql/lex.h:
  New SQLSTATE keyword.
sql/share/czech/errmsg.txt:
  New error message for duplicate things (vars et al) in SPs.
sql/share/danish/errmsg.txt:
  New error message for duplicate things (vars et al) in SPs.
sql/share/dutch/errmsg.txt:
  New error message for duplicate things (vars et al) in SPs.
sql/share/english/errmsg.txt:
  New error message for duplicate things (vars et al) in SPs.
sql/share/estonian/errmsg.txt:
  New error message for duplicate things (vars et al) in SPs.
sql/share/french/errmsg.txt:
  New error message for duplicate things (vars et al) in SPs.
sql/share/german/errmsg.txt:
  New error message for duplicate things (vars et al) in SPs.
sql/share/greek/errmsg.txt:
  New error message for duplicate things (vars et al) in SPs.
sql/share/hungarian/errmsg.txt:
  New error message for duplicate things (vars et al) in SPs.
sql/share/italian/errmsg.txt:
  New error message for duplicate things (vars et al) in SPs.
sql/share/japanese/errmsg.txt:
  New error message for duplicate things (vars et al) in SPs.
sql/share/korean/errmsg.txt:
  New error message for duplicate things (vars et al) in SPs.
sql/share/norwegian-ny/errmsg.txt:
  New error message for duplicate things (vars et al) in SPs.
sql/share/norwegian/errmsg.txt:
  New error message for duplicate things (vars et al) in SPs.
sql/share/polish/errmsg.txt:
  New error message for duplicate things (vars et al) in SPs.
sql/share/portuguese/errmsg.txt:
  New error message for duplicate things (vars et al) in SPs.
sql/share/romanian/errmsg.txt:
  New error message for duplicate things (vars et al) in SPs.
sql/share/russian/errmsg.txt:
  New error message for duplicate things (vars et al) in SPs.
sql/share/serbian/errmsg.txt:
  New error message for duplicate things (vars et al) in SPs.
sql/share/slovak/errmsg.txt:
  New error message for duplicate things (vars et al) in SPs.
sql/share/spanish/errmsg.txt:
  New error message for duplicate things (vars et al) in SPs.
sql/share/swedish/errmsg.txt:
  New error message for duplicate things (vars et al) in SPs.
sql/share/ukrainian/errmsg.txt:
  New error message for duplicate things (vars et al) in SPs.
sql/sp_pcontext.cc:
  Keep track on scope limits for error checking of duplicate variables,
  conditions and cursors.
sql/sp_pcontext.h:
  Keep track on scope limits for error checking of duplicate variables,
  conditions and cursors.
  Also need to flag BEGIN labels to check for illegal ITERATEs.
sql/sql_yacc.yy:
  End-labels in SPs loop and begin-end blocks are now optional.
  SQLSTATE [VALUE] added to syntax for sqlstates.
  Check for duplicate variable, condition and cursor declarations, but
  only in the same scope.
  Empty BEGIN-END statements now allowed.
  Check if ITERATE is referring to a BEGIN label.
2003-11-13 19:34:56 +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
unknown
ec3a39dc67 Post-merge fixes.
mysql-test/r/sp-error.result:
  Post-merge fixes. Error codes renumbered.
mysql-test/r/sp.result:
  Post-merge fixes. Error codes renumbered.
mysql-test/r/variables.result:
  Post-merge fixes. Error codes renumbered.
mysql-test/t/sp-error.test:
  Post-merge fixes. Error codes renumbered.
mysql-test/t/sp.test:
  Post-merge fixes. Error codes renumbered.
sql/item_subselect.cc:
  Post-merge fixes. thd->lex is a pointer.
sql/slave.cc:
  Post-merge fixes. Undid imported patch that's not 5.0 compatible.
sql/sql_parse.cc:
  Post-merge fixes. Changed access API calls, and fixed merge error.
sql/sql_table.cc:
  Post-merge fixes. No update log in 5.0.
2003-10-23 16:06:51 +02: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
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
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
unknown
9aa680a016 Fix for BUG#1547: "SELECT ... WHERE field = var" sometimes give the wrong result in SPs
Two missing methods added to Item_splocal + test case.


mysql-test/r/sp.result:
  Test case for BUG#1547
mysql-test/t/sp.test:
  Test case for BUG#1547
sql/item.h:
  Fix for BUG#1547: "SELECT ... WHERE field = var" sometimes give the wrong result in SPs
  
  Added missing methods to Item_splocal to get the correct compare function
  and make the optimizer do the right thing.
2003-10-15 19:03:37 +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
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
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
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
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
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
unknown
cfd69393e4 Post merge fixes.
mysql-test/r/sp.result:
  Enabled the cs test as it works now.
mysql-test/t/sp.test:
  Enabled the cs test as it works now.
2003-04-04 15:47:43 +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
unknown
cc0f1f15cd Implemented DEFAULT for DECLARE variables.
BitKeeper/etc/logging_ok:
  Logging to logging@openlogging.org accepted
2003-03-30 13:25:43 +02:00
unknown
2c9ef84cc3 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
unknown
addf8ea04e Post-merge fixes.
mysql-test/r/sp.result:
  Post-merge fixes.
  (And disabled the ip test, since some change in 4.1 broke it.)
mysql-test/t/sp.test:
  Post-merge fixes.
  (And disabled the ip test, since some change in 4.1 broke it.)
2003-03-19 11:36:32 +01:00
unknown
6b3c898655 Fixed reentrantness bugs in select (lex->result) and select_dumpvar, and added cool
prime number test example.


mysql-test/r/sp.result:
  New prime number example. (Good for future benchmarkings too.)
mysql-test/t/sp.test:
  New prime number example. (Good for future benchmarkings too.)
sql/sql_class.cc:
  Reset row_count in select_dumpvar when preparing, to make it reentrant as a lex member.
sql/sql_select.cc:
  Don't delete result if it's a lex member (since lex needs to be reentrant).
2003-03-06 19:16:46 +01:00
unknown
f519382d2b New FUNCTION documentation, and a minor test case modification.
Docs/sp-imp-spec.txt:
  Updated docs about stored FUNCTIONs.
Docs/sp-implemented.txt:
  Updated docs about stored FUNCTIONs.
mysql-test/r/sp.result:
  Changed the ifac test example into a combination of a procedure and a function.
mysql-test/t/sp.test:
  Changed the ifac test example into a combination of a procedure and a function.
2003-03-03 15:03:19 +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
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
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
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
unknown
3c88ebdc9d Fixed SELECT INTO OUTFILE/DUMPFILE and stored procedures, and extended and
reorganized the sp.test file.


mysql-test/r/sp.result:
  New results from the reorganized sp.test file.
mysql-test/t/sp.test:
  Reorganized the tests, and added a few new ones. ("fac" and more "select into")
sql/sql_class.cc:
  Unlock tables and set thd->lock=0 in select_export::send_eof() and
  select_dump::send_eof().
  This fixes a problem with an assert() in lock_tables(), and made
  SELECT ... INTO OUTFILE and ... INTO DUMPFILE work in stored procedures.
2003-02-19 12:42:32 +01:00
unknown
f8b7968e04 Added another select into test.
mysql-test/r/sp.result:
  Added another test for select into (mixed variable types), and made into_test
  independent of previous tests.
mysql-test/t/sp.test:
  Added another test for select into (mixed variable types), and made into_test
  independent of previous tests.
2003-02-02 17:41:21 +01:00
unknown
d2b6620621 Merge sinisa@work.mysql.com:/home/bk/mysql-5.0
into sinisa.nasamreza.org:/mnt/work/petica


mysql-test/r/sp.result:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2003-01-28 14:44:13 +02:00
unknown
cbc7570665 Added check for selects without into in SPs, and updated error messages and tests
accordingly.


include/mysqld_error.h:
  Added bad select in SP error (and fixed leave/iterate label mismatch error).
sql/share/czech/errmsg.txt:
  Added bad select in SP error (and fixed leave/iterate label mismatch error).
sql/share/danish/errmsg.txt:
  Added bad select in SP error (and fixed leave/iterate label mismatch error).
sql/share/dutch/errmsg.txt:
  Added bad select in SP error (and fixed leave/iterate label mismatch error).
sql/share/english/errmsg.txt:
  Added bad select in SP error (and fixed leave/iterate label mismatch error).
sql/share/estonian/errmsg.txt:
  Added bad select in SP error (and fixed leave/iterate label mismatch error).
sql/share/french/errmsg.txt:
  Added bad select in SP error (and fixed leave/iterate label mismatch error).
sql/share/german/errmsg.txt:
  Added bad select in SP error (and fixed leave/iterate label mismatch error).
sql/share/greek/errmsg.txt:
  Added bad select in SP error (and fixed leave/iterate label mismatch error).
sql/share/hungarian/errmsg.txt:
  Added bad select in SP error (and fixed leave/iterate label mismatch error).
sql/share/italian/errmsg.txt:
  Added bad select in SP error (and fixed leave/iterate label mismatch error).
sql/share/japanese/errmsg.txt:
  Added bad select in SP error (and fixed leave/iterate label mismatch error).
sql/share/korean/errmsg.txt:
  Added bad select in SP error (and fixed leave/iterate label mismatch error).
sql/share/norwegian-ny/errmsg.txt:
  Added bad select in SP error (and fixed leave/iterate label mismatch error).
sql/share/norwegian/errmsg.txt:
  Added bad select in SP error (and fixed leave/iterate label mismatch error).
sql/share/polish/errmsg.txt:
  Added bad select in SP error (and fixed leave/iterate label mismatch error).
sql/share/portuguese/errmsg.txt:
  Added bad select in SP error (and fixed leave/iterate label mismatch error).
sql/share/romanian/errmsg.txt:
  Added bad select in SP error (and fixed leave/iterate label mismatch error).
sql/share/russian/errmsg.txt:
  Added bad select in SP error (and fixed leave/iterate label mismatch error).
sql/share/serbian/errmsg.txt:
  Added bad select in SP error (and fixed leave/iterate label mismatch error).
sql/share/slovak/errmsg.txt:
  Added bad select in SP error (and fixed leave/iterate label mismatch error).
sql/share/spanish/errmsg.txt:
  Added bad select in SP error (and fixed leave/iterate label mismatch error).
sql/share/swedish/errmsg.txt:
  Added bad select in SP error (and fixed leave/iterate label mismatch error).
sql/share/ukrainian/errmsg.txt:
  Added bad select in SP error (and fixed leave/iterate label mismatch error).
mysql-test/r/sp.result:
  New test for repeat(...) and select with and without into in SPs.
mysql-test/t/sp.test:
  New test for repeat(...) and select with and without into in SPs.
sql/sql_yacc.yy:
  Check if an SP substatement is a SELECT and if so, has an INTO. If not, it's an
  error.
2003-01-23 14:00:32 +01:00
unknown
172dc5b371 solve the lex conflict between the existing repeat() function
and repeat SP-construction
2003-01-23 17:00:31 +04:00
unknown
6d5f7d1c4b Changing some proc names to a more suitable one. 2003-01-20 15:38:35 +02:00
unknown
69047e719a SELECT ... INTO local_vars ...;
For Stored Procedures
2003-01-18 18:21:13 +02:00
unknown
838303a731 Added the Stored Procedure tests.
Removed newly added, but now redundant, test file.



BitKeeper/deleted/.del-mysql_proc.result~63faae2f407c3fc2:
  Delete: mysql-test/r/mysql_proc.result
BitKeeper/deleted/.del-mysql_proc.test~8863f59cfc347469:
  Delete: mysql-test/t/mysql_proc.test
2003-01-17 14:38:05 +01:00