pem@mysql.com
312ea035ba
Merge mysql.com:/usr/local/bk/mysql-5.0
...
into mysql.com:/home/pem/work/mysql-5.0
2005-07-07 09:13:49 +02:00
pem@mysql.com
18d6dd56ef
Fixed BUG#7088: Stored procedures: labels won't work if character set is utf8.
...
We used 'IDENT' for labels as a temporary fix for the parser conflicts
introduced if the proper rule 'ident' was used. Now a specially tailored
'label_ident' rule is used for labels instead.
2005-07-06 16:37:57 +02:00
dlenev@mysql.com
8a924ac456
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
...
into mysql.com:/home/dlenev/src/mysql-5.0-bg11394
2005-07-06 10:21:27 +04:00
pem@mysql.com
481bb717d7
Disabled the GOTO feature. (It's non-standard and undocumented.)
...
We want to have the defacto standard syntax for labels ("L:" instead of "label L;"),
and fix some known bugs, before we enable this again.
The code is left intact (#ifdef'ed SP_GOTO) and the test cases are kept in
sp-goto.test, for the future...
2005-07-01 15:25:51 +02:00
dlenev@brandersnatch.localdomain
56ff9f1653
"Fix" for bug #11394 "Recursion in SP crash server" and bug #11600
...
"Stored procedures: crash with function calling itself".
Disallow recursive stored routines until we either make Item's and LEX
reentrant safe or will use spearate sp_head instances (and thus separate
LEX objects and Item trees) for each routine invocation.
2005-07-01 13:01:46 +04:00
pem@mysql.comhem.se
fda325b943
Fixed BUG#11529: crash server after use stored procedure
...
Make sure to cleanup the items for a cursor query after each open, otherwise
it's done too late, after the run-time mem_root is freed.
2005-06-30 18:07:06 +02:00
bell@sanja.is.com.ua
a05e50e29e
fixed items cleunup for SP (BUG#10136)
2005-06-22 00:17:08 +03:00
pem@mysql.com
b42bf3cc55
Merge mysql.com:/usr/local/bk/mysql-5.0
...
into mysql.com:/home/pem/work/mysql-5.0
2005-06-10 16:56:34 +02:00
pem@mysql.comhem.se
46619fa0e3
Post review and additional fix for BUG#10968: Stored procedures: crash if long loop.
...
Fixed valgrind complaints. This fixes the memory leak problems for
procedured, and partially for functions. There's still a leak involving
results from functions that turned out to be too involved, so it will be
fixed separately.
2005-06-10 16:14:01 +02:00
dlenev@brandersnatch.localdomain
620d42318b
Enabling back part of sp.test which no longer fails in --ps-protocol mode
...
(Bug which caused its failure before was fixed in the beginning of March
by the ChangeSet that introduced improved SP-locking).
2005-06-07 22:22:27 +04:00
igor@rurik.mysql.com
f2405d71eb
sp.test, sp.result:
...
Added a test case for bug #6866 .
sql_select.cc:
Fixed bug #6866 .
Bug was due to the fact that on_expr was not backed up
for the second execution of the stored procedure.
2005-06-06 06:05:11 -07:00
pem@mysql.comhem.se
85f19d5da5
Fixed BUG#10961: Stored procedures: crash if select * from dual
...
Have to catch errors from SELECT when opening a cursor.
2005-06-01 12:18:41 +02:00
pem@mysql.comhem.se
fcb3b0326e
Fixed BUG#9559: Functions: Numeric Operations using -ve value gives incorrect
...
results.
Actually a problem when converting decimal to int for user variables.
2005-05-27 14:48:33 +02:00
bell@book.sanja.is.com.ua
4c984c7cc6
merge
2005-05-09 02:06:18 +03:00
bell@book.sanja.is.com.ua
91dccaa36f
Item::fix_field need correct pointer on item reference to chnge it if itis need, so support of correct item address added to SP commands (BUG#5963)
...
some optimisation of IF/NOT IF ptomised to Pem
2005-05-09 01:59:10 +03:00
joerg@trift-lap.fambruehe
84af50133b
Corrections to test "sp", stored procedure "fib" (see entry 9937 in the bug DB).
2005-05-07 18:06:02 +02:00
dlenev@brandersnatch.localdomain
d60674d665
Fix for bug #9841 "Unexpected read lock when trying to update a view in
...
a stored procedure" (version 2).
To handle updates and inserts into view in SP properly we should set
lock types for tables of the view's main select when we are opening
view for prelocking purproses.
2005-05-05 19:49:15 +04:00
jimw@mysql.com
300a9920ed
Add regression test for calling SOUNDEX() within stored procedure.
...
The bug appears to have already been fixed. (Bug #7293 )
2005-04-28 14:46:54 -07:00
pem@mysql.comhem.se
057b8aa9a8
Fixed BUG#9004: Inconsistent behaviour of SP re. warnings
2005-04-22 12:53:48 +02:00
acurtis@xiphis.org
c5d94db336
Merge
2005-04-21 13:34:39 +01:00
acurtis@xiphis.org
f67507588f
Bug#8861 - If Return is a YEAR data type, value is not shown in year format
...
Bug partially fixed by 9775/9102 work on SP function return.
2005-04-21 13:22:47 +01:00
acurtis@xiphis.org
8689083aca
Bug#9775 - Stored procedures: crash if create function that returns enum or set
...
Fix bug and implement return type casting.
2005-04-20 18:08:42 +01:00
pem@mysql.comhem.se
189d6b502b
Fixed BUG#6898: Stored procedure crash if GOTO statements exist
...
Bug in the optimizer caused an infinite loop for weird code.
2005-04-20 15:37:07 +02:00
acurtis@xiphis.org
77a9429c13
Bug#7648 - Stored procedure crash when invoking a function that returns a bit
...
bugfix 9102 corrected the crashing, this corrects the result.
2005-04-19 10:51:11 +01:00
acurtis@xiphis.org
f638e5cb8f
Bug#9102 - Stored proccedures: function which returns blob causes crash
...
Initialization of fields for sp return type was not complete.
2005-04-19 09:09:25 +01:00
pem@mysql.comhem.se
da22f75b68
Fixed BUG#9902: Crash with simple stored function using user defined variables
...
... actually, it was a query cache problem. (It shouldn't cache such queries)
2005-04-15 11:06:25 +02:00
pem@mysql.comhem.se
6aad6835c6
Fixed BUG#9598: stored procedure call within stored procedure
...
overwrites IN variable
and added error checking of variables for [IN]OUT parameters while
rewriting the out parameter handling.
2005-04-14 14:52:35 +02:00
pem@mysql.comhem.se
7a4f495f5b
Fixed BUG#9674: Stored Procs: Using declared vars in algebric operation
...
causes system crash.
2005-04-13 17:43:53 +02:00
pem@mysql.comhem.se
387afb3d29
Fixed BUG#9856: Stored procedures: crash if handler for sqlexception, not found.
2005-04-13 16:57:49 +02:00
pem@mysql.comhem.se
6a46d0cd8a
Added test case for BUG#6129: Stored procedure won't display @@sql_mode value.
2005-04-13 16:09:28 +02:00
pem@mysql.comhem.se
9c21006f81
Fixed BUG#7185: Stored procedure crash if identifier is AVG
2005-04-12 15:43:24 +02:00
pem@mysql.comhem.se
ce2e40ac19
Fixed BUG#6900: Stored procedure inner handler ignored
...
and BUG#9074: STORED PROC: The scope of every handler declared is not properly applied
2005-04-08 17:31:37 +02:00
dlenev@brandersnatch.localdomain
8d05aa0f02
Moved test for bug #9566 "explicit LOCK TABLE and store procedures result in illegal
...
state" to sp-error.test.
According to Per-Erik all SP related tests which should result in error
should go into sp-error.test and not in sp.test, because we want to be
able to run sp.test using normal client.
2005-04-07 11:57:47 +04:00
dlenev@brandersnatch.localdomain
d85bed1121
Fix for bug #9566 "explicit LOCK TABLE and store procedures result in
...
illegal state".
We should not assume that mysql.proc table does not exist if we are
unable to open it under LOCK TABLES or in prelocked mode (and
remember this fact by setting mysql_proc_table_exists to zero).
2005-04-07 01:40:29 +04:00
jimw@mysql.com
b95cb4e654
Merge
2005-04-05 19:45:34 -07:00
pem@mysql.comhem.se
8df8afc270
Fixed BUG#6600: Stored procedure crash after repeated calls with check table.
...
Sedond attempt: Simply disallow CHECK in SPs, since it can't work.
2005-03-30 17:43:52 +02:00
pem@mysql.comhem.se
8af9a0d782
Fixed BUG#6600: Stored procedure crash after repeated calls with check table
2005-03-18 16:52:41 +01:00
pem@mysql.comhem.se
00c220eab5
Did some SP test style changes and added explanatory comments,
...
and removed a have_innodb.inc inclusion which was left by mistake
in an earlier change.
2005-03-18 14:33:46 +01:00
jimw@mysql.com
25a1ca078a
Merge mysql.com:/home/jimw/my/mysql-5.0-build
...
into mysql.com:/home/jimw/my/mysql-5.0-clean
2005-03-17 13:38:07 -08:00
mysqldev@mysql.com
7d5c7f5ec6
sp.test, sp.result:
...
transactional test removed
sp_trans.test, sp_trans.result:
new file
2005-03-17 22:15:23 +01:00
Sinisa@sinisa.nasamreza.org
8bbb282b5d
sp.test:
...
Fix for a bug with test failing with Classic.
2005-03-17 19:26:36 +02:00
acurtis@pcgem.rdg.cyberkinetica.com
8d94824aa1
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
...
into pcgem.rdg.cyberkinetica.com:/var/db/bk/work-acurtis/bug3788.4
2005-03-09 01:15:42 +00:00
acurtis@ltantony.rdg.cyberkinetica.homeunix.net
be3c863ba0
Merge in fix Bug#3788
2005-03-08 22:32:09 +00:00
Sinisa@sinisa.nasamreza.org
b8e28ff9bd
Fixing post-merge errors
2005-03-09 00:09:18 +02:00
Sinisa@sinisa.nasamreza.org
b2c77c1c9c
post merge fixes
2005-03-08 22:59:21 +02:00
Sinisa@sinisa.nasamreza.org
f066f4db83
making a better test case for bug #8850
2005-03-08 22:44:35 +02:00
pem@mysql.comhem.se
6a15e01393
Fixed BUG#8937: Stored Procedure: AVG() works as SUM() in SELECT ... INTO statement
2005-03-07 18:09:53 +01:00
pem@mysql.comhem.se
9c2fe003dc
Reorganized sp.test (all bugs at the end now).
2005-03-07 17:16:37 +01:00
Sinisa@sinisa.nasamreza.org
a54b5ea52f
Fixing bug #8850 in such a way that when TRUNCATE is called within
...
stored procedure, it is converted to DELETE.
2005-03-05 21:44:15 +02:00
acurtis@pcgem.rdg.cyberkinetica.com
5e1d2ad68c
Bug#3788
...
Crashes with stored procedure return non-string values
Also fixes Bug#2773
2005-03-04 21:14:35 +00:00
dlenev@mysql.com
5b16dbf960
Manual merge SP-locking improvements patch with current tree.
2005-03-04 17:46:45 +03:00
dlenev@brandersnatch.localdomain
5a6c7027f0
Better approach for prelocking of tables for stored routines execution
...
and some SP-related cleanups.
- We don't have separate stage for calculation of list of tables
to be prelocked and doing implicit LOCK/UNLOCK any more.
Instead we calculate this list at open_tables() and do implicit
LOCK in lock_tables() (and UNLOCK in close_thread_tables()).
Also now we support cases when same table (with same alias) is
used several times in the same query in SP.
- Cleaned up execution of SP. Moved all common code which handles
LEX and does preparations before statement execution or complex
expression evaluation to auxilary sp_lex_keeper class. Now
all statements in SP (and corresponding instructions) that
evaluate expression which can contain subquery have their
own LEX.
2005-03-04 16:35:28 +03:00
konstantin@mysql.com
fe2d63a060
Fixes for bug#8115 "Server Crash with prepared statement"
...
and bug#8849 "problem with insert statement with table alias's":
make equality propagation work in stored procedures and prepared
statements.
Equality propagation can change AND/OR structure of ON expressions,
so the fix is to provide each execution of PS/SP with it's own
copy of AND/OR tree. We have been doing that already for WHERE clauses,
now ON clauses are also copied.
2005-03-03 17:38:59 +03:00
pem@mysql.comhem.se
027c5a6dac
Fixed BUG#8762: Stored Procedures: Inconsistent behavior
...
of DROP PROCEDURE IF EXISTS statement.
2005-03-02 17:25:58 +01:00
pem@mysql.comhem.se
2af86eafc7
Fixed BUG#8757: Stored Procedures: Scope of Begin and End Statements do not work properly.
2005-02-25 17:56:45 +01:00
pem@mysql.comhem.se
76c6d9cd91
Fixed BUG#6857: current_time() in STORED PROCEDURES
...
Have to thd->set_time() before each substatement execution, to make
current_time() et al return different times within the same procedure.
2005-02-25 13:19:44 +01:00
bell@51.0.168.192.in-addr.arpa
bf43b0d31a
fixed typo in test
2005-02-24 02:59:36 +02:00
bell@51.0.168.192.in-addr.arpa
950b7db381
Merge 51.0.168.192.in-addr.arpa:/Users/bell/mysql/bk/mysql-5.0
...
into 51.0.168.192.in-addr.arpa:/Users/bell/mysql/bk/work-qc_item_view-5.0
2005-02-21 13:16:25 +02:00
pem@mysql.comhem.se
a69fc3c03f
Fixed...
...
BUG#6642: Stored procedure crash if expression with set function
BUG#7013: Stored procedure crash if group by ... with rollup
BUG#7743: 'Lost connection to MySQL server during query' on Stored Procedure
BUG#7992: SELECT .. INTO variable .. within Stored Procedure crashes
the server
BUG#8116: calling simple stored procedure twice in a row results
in server crash
Rolling back the item change list after each substatement in a procedure
fixed the failing assert().
2005-02-18 17:39:32 +01:00
pem@mysql.comhem.se
de2b28c1ad
Fixed BUG#8540: Local variable overrides an alias.
2005-02-16 16:06:41 +01:00
dlenev@brandersnatch.localdomain
0a96ef4c90
Temporary disabling part of test which fails in --ps-protocol mode.
2005-02-15 22:17:44 +03:00
bell@sanja.is.com.ua
6cda5f53da
postreview changes
...
(used t3, moved after last bug, renamed)
2005-02-09 16:02:37 +02:00
bell@sanja.is.com.ua
eb4fb7253d
Merge
2005-02-09 00:31:56 +02:00
pem@mysql.comhem.se
2c26ebe359
WL#2130: Table locking for stored FUNCTIONs
...
Collect all tables and SPs refered by a statement, and open all tables
with an implicit LOCK TABLES. Do find things refered by triggers and views,
we open them first (and then repeat this until nothing new is found), before
doing the actual lock tables.
2005-02-08 20:52:50 +01:00
bell@sanja.is.com.ua
8881bead7a
fixed using in SP sentences which use Item tree temporary changes rollback (BUG#7992)
2005-01-20 17:04:24 +02:00
jimw@mysql.com
01ddc370f0
Enable warnings for 'no default' fields being set to default when they
...
are not specified in an insert. Most of these changes are actually to
clean up the test suite to either specify defaults to avoid warnings,
or add the warnings to the results. Related to bug #5986 .
2005-01-14 17:09:35 -08:00
monty@mysql.com
7cf8285b3f
After merge fixes
...
Add support for warnings for prepare of prepared statements
Fixed test to work with --ps-protocol
Fixed some test results
2005-01-04 13:46:53 +02:00
monty@mysql.com
2299e1eca4
Better handling of ensuring that setup_tables() are not called twice
...
This fixed a bug in prepared statements when used with outher joins
Fixed a bug in SUM(DISTINCT) when used with prepared statements.
Some safety fixes in test scripts to ensure that previous test failures shouldn't affect other tests
2005-01-03 21:04:33 +02:00
pem@mysql.comhem.se
b17326a3d6
Reverted previous name changes of all bug tests in sp.test, but kept the
...
robustness (dropping things just in case).
2004-12-28 16:58:14 +01:00
bell@sanja.is.com.ua
1555469b64
merge
2004-11-12 15:36:31 +02:00
pem@mysql.comhem.se
327eb9bbff
Various syntax fixes in sql/sql_yacc.yy for stored procedures:
...
- No RESTICT|CASCADE in DROP SP (since it's not implemented)
- Added optional "noise" to FETCH: [[NEXT] FROM]
- At least one statement required in all block constructs except BEGIN-END
(where zero is allowed)
2004-11-03 13:49:54 +01:00
bell@sanja.is.com.ua
dff05eb951
merge
2004-10-28 11:02:48 +03:00
pem@mysql.comhem.se
4970bdab13
Fixed BUG#6029: Stored procedure specific handlers should have priority.
2004-10-23 14:23:32 +02:00
pem@mysql.comhem.se
7944acbbfa
Fixed BUG#6022: Stored procedure shutdown problem with self-calling function.
...
Fixed the pre-caching of functions. It now gives the expected stack overrun
error for functions recursing too deep.
2004-10-23 13:30:05 +02:00
pem@mysql.comhem.se
ebf8dc0da6
Fixed BUG#6027: Stored procedures can be renamed.
...
Removed the support for renaming SPs. It's non-standard, conflicted with a standard
syntax, and was a bit broken anyway.
2004-10-22 19:05:17 +02:00
bell@sanja.is.com.ua
42d6d6765a
Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
...
into sanja.is.com.ua:/home/bell/mysql/bk/work-error-5.0
2004-10-20 16:11:16 +03:00
bell@sanja.is.com.ua
4714a6e744
errors without code removed
...
net_printf/send_error calls replaced by my_error family functions
-1/1 (sent/unsent) error reporting removed
(WL#2133)
2004-10-20 04:04:37 +03:00
pem@mysql.comhem.se
4043c0f3db
Implemented the stored procedure data access characteristics:
...
NO SQL
CONTAINS SQL (default)
READS SQL DATA
MODIFIES SQL DATA
These are needed as hints for the replication.
(Before this, we did have the default in the mysql.proc table, but no support in the parser.)
2004-10-14 18:07:09 +02:00
pem@mysql.comhem.se
f3a0ba3515
Fixed BUG#4905: Stored procedure doesn't clear for "Rows affected".
2004-09-29 18:55:05 +02:00
pem@mysql.comhem.se
5b10e3e5b5
Fixed BUG#3583: query cache doesn't work for stored procedures.
2004-09-17 15:40:38 +02:00
pem@mysql.comhem.se
728000b225
Fixed BUG#4941: Stored procedure crash fetching null value into variable.
2004-09-10 16:28:11 +02:00
pem@mysql.comhem.se
dde44b8c8c
Fixed BUG#4487: Stored procedure connection aborted if uninitialized char.
2004-09-09 19:08:54 +02:00
monty@mysql.com
49cd04b510
Merge on pull
2004-09-09 07:26:28 +03:00
monty@mysql.com
f2829d0386
After merge fixes of merge with 4.1 that included the new arena code.
...
Fixed (together with Guilhem) bugs in mysqlbinlog regarding --offset
Prefix addresses with 0x for easier comparisons of debug logs
Fixed problem where MySQL choosed index-read even if there would be a much better range on the same index
This fix changed some 'index' queries to 'range' queries in the test suite
Don't create 'dummy' WHERE clause for trivial WHERE clauses where we can remove the WHERE clause.
This fix removed of a lot of 'Using where' notes in the test suite.
Give NOTE instead of WARNING if table/function doesn't exists when using DROP IF EXISTS
Give NOTE instead of WARNING for safe field-type conversions
2004-09-09 06:59:26 +03:00
pem@mysql.comhem.se
3aa2a62f37
Fixed BUG#5258: Stored procedure modified date is 0000-00-00.
...
Althought techically not a but (as it's functioning as designed),
it was decided that the design should be changed. Some users have
a problem with dates being '0000-00-00' and the SQL standard specifies
that the modification date should be the same as the creation date
at creation.
2004-09-08 11:42:18 +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
pem@mysql.comhem.se
fee115adca
Fixed BUG#5287: Stored procedure crash if leave outside loop.
...
Bug in diff_handlers and diff_cursors made it attempt to pop
the wrong number at jumps sometimes.
2004-09-02 17:24:25 +02:00
acurtis@pcgem.rdg.cyberkinetica.com
7ee2f2c6bb
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
...
into pcgem.rdg.cyberkinetica.com:/usr/home/acurtis/work/mysql-5.0
2004-08-30 22:11:14 +01:00
acurtis@pcgem.rdg.cyberkinetica.com
203debc666
Fix column name where it starts with a backtick
2004-08-30 22:08:51 +01: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
pem@mysql.comhem.se
f723438555
Fixed BUG#5251: mysql changes creation time of a procedure/function when altering.
2004-08-27 16:41:34 +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
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
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
dlenev@brandersnatch.localdomain
15547058e5
Made sp.test more repeatable.
2004-08-13 20:02:52 +04:00
pem@mysql.comhem.se
33c58f8c67
Removed an SP test case that's not repeatable over different builds/platforms.
2004-08-06 17:04:55 +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
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
pem@mysql.comhem.se
714c3c0942
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... :)
2004-07-29 16:52:17 +02:00
serg@serg.mylan
74b0fdddc8
Merge
2004-07-26 21:06:46 +02:00
pem@mysql.comhem.se
bebaaac57d
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)
2004-07-23 19:52:06 +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
serg@serg.mylan
1ed5ce8767
disabled innodb is NOT a reason to fail
2004-07-13 21:00:00 +02:00
pem@mysql.comhem.se
26ec49f1a8
Fixed BUG#3368: Stored procedure crash if group_concat(variable).
2004-06-15 14:26:19 +02:00
pem@mysql.comhem.se
ad19125447
Fixed BUG#3843: ANALYZE TABLE inside stored procedure causes 'Packets out of order' error.
2004-06-14 12:38:54 +02:00
pem@mysql.comhem.se
078f717804
Fixed BUG#3132: Stored function returns empty when used in union.
2004-06-10 17:07:53 +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
pem@mysql.comhem.se
27abb69250
Fixed BUG#2460: Crash wih Stored Procedure and UNION.
2004-05-28 19:43:06 +02:00
pem@mysql.comhem.se
a4729a9052
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)
2004-05-28 18:33:14 +02:00
bell@sanja.is.com.ua
350d8a215b
Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
...
into sanja.is.com.ua:/home/bell/mysql/bk/work-sp2_bak-5.0
2004-05-26 14:59:42 +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
pem@mysql.comhem.se
017ffcdeaf
Fixed comment for prime test.
...
(Again, mostly to test sendmail replacement for tunneling.)
2004-05-13 13:29:18 +02:00
pem@mysql.comhem.se
e27e208f67
Added comment about expected result for prime test.
...
(This is mostly to test sendmail tunneling of commit email...
might not actually get pushed)
2004-05-13 13:08:16 +02:00
pem@mysql.comhem.se
e1182c5226
Correction of WL#1567: row_count() is -1 following non-insert/update/delete
...
statements.
2004-05-04 17:18:47 +02:00
pem@mysql.comhem.se
296ba0ea57
WL#1567: Add ROW_COUNT() Function to retrieve count of rows updated/inserted/deleted
2004-05-04 13:45:20 +02:00
pem@mysql.comhem.se
1541f2e794
Fixed BUG#2780: Stored procedure exit handler ignored for warnings.
...
Actually catch pushed warnings.
2004-04-06 16:29:38 +02:00
pem@mysql.comhem.se
4a6e6251e7
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.)
2004-04-06 15:48:58 +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
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
pem@mysql.comhem.se
5954e94fa7
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).
2004-03-23 12:04:40 +01:00
pem@mysql.comhem.se
5476eb0709
WL#1366: Use the schema (db) associated with an SP.
...
Phase 4 (final): Remove associated stored procedures when a database is dropped.
2004-03-22 14:44:41 +01:00
pem@mysql.com
786f823248
Merge
2004-03-18 15:08:17 +01:00
pem@mysql.comhem.se
0411f45801
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.
2004-03-17 12:09:03 +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
pem@mysql.comhem.se
5344528b00
Fixed test for BUG#2614 (right name, right place, etc...),
...
and updated sp.result as well.
2004-02-03 15:58:22 +01: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
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
pem@mysql.com
40f21c8aa7
Merge mysql.com:/usr/local/bk/mysql-5.0
...
into mysql.com:/home/pem/work/mysql-5.0
2004-01-14 18:20:49 +01:00
pem@mysql.comhem.se
a1ff4d65ff
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...)
2004-01-14 18:18:29 +01:00
pem@mysql.comhem.se
370a43a32a
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.
2004-01-14 12:47:03 +01:00
pem@mysql.comhem.se
c40e51f283
Fix BUG#2260: Handler NOT FOUND declaration does't work in stored procedure
2004-01-08 10:55:10 +01:00
pem@mysql.comhem.se
bb51272bd1
Post-merge fixes.
...
Multiple result sets from stored procedures now works with the
mysql and mysqltest clients.
2003-12-16 18:09:22 +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
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
pem@mysql.comhem.se
7bfbfc308f
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.
2003-12-11 12:23:50 +01:00
pem@mysql.comhem.se
301d8137c0
New test cases for BUG#1653 (recalling a procedure after replacing a faulty
...
table definition crashed), and recursive calls.
2003-12-05 18:52:33 +01:00
pem@mysql.comhem.se
3ed561d3cf
Post-merge fixes.
2003-12-01 18:24:09 +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
pem@mysql.comhem.se
05f25feaa9
Handle null values correctly in SP local variables.
2003-11-20 16:14:24 +01:00
pem@mysql.comhem.se
96f1252899
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.
2003-11-20 15:07:22 +01:00
pem@mysql.comhem.se
5b355ea6f5
Post-merge fixes.
2003-11-19 16:59:35 +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
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
pem@mysql.comhem.se
c38bb3d79d
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).
2003-11-13 19:34:56 +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
pem@mysql.comhem.se
692609537d
Post-merge fixes.
2003-10-23 16:06:51 +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
pem@mysql.comhem.se
98397562c0
Bugfix. Local variables are now initialized to null.
2003-10-17 17:13:49 +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
pem@mysql.telia.com
c258c86177
Fix for BUG#1547: "SELECT ... WHERE field = var" sometimes give the wrong result in SPs
...
Two missing methods added to Item_splocal + test case.
2003-10-15 19:03:37 +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
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
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
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
pem@mysql.com
4523a7b179
Adopt SP stuff to the new lex pointer.
2003-05-23 15:32:31 +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
pem@mysql.com
462430ba55
Post merge fixes.
2003-04-04 15:47:43 +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
pem@per-erik-martins-dator.local
64552a658d
Implemented DEFAULT for DECLARE variables.
2003-03-30 13:25:43 +02:00
pem@mysql.com
483efba239
Fixed save/restore of current database when calling a procedure.
2003-03-26 15:02:48 +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
pem@mysql.com
6822eb5ec0
Post-merge fixes.
2003-03-19 11:36:32 +01:00
pem@mysql.com
dba598cddd
Fixed reentrantness bugs in select (lex->result) and select_dumpvar, and added cool
...
prime number test example.
2003-03-06 19:16:46 +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
pem@mysql.com
c4b76c2694
New FUNCTION documentation, and a minor test case modification.
2003-03-03 15:03:19 +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
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
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
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
pem@mysql.com
52cd3e3142
Fixed SELECT INTO OUTFILE/DUMPFILE and stored procedures, and extended and
...
reorganized the sp.test file.
2003-02-19 12:42:32 +01:00
pem@mysql.com
58d0b0ea1a
Added another select into test.
2003-02-02 17:41:21 +01:00
Sinisa@sinisa.nasamreza.org
d54d67b5d8
Merge sinisa@work.mysql.com:/home/bk/mysql-5.0
...
into sinisa.nasamreza.org:/mnt/work/petica
2003-01-28 14:44:13 +02:00
pem@mysql.com
a1d21d892e
Added check for selects without into in SPs, and updated error messages and tests
...
accordingly.
2003-01-23 14:00:32 +01:00
vva@eagle.mysql.r18.ru
1fd4866322
solve the lex conflict between the existing repeat() function
...
and repeat SP-construction
2003-01-23 17:00:31 +04:00
Sinisa@sinisa.nasamreza.org
de135f50b8
Changing some proc names to a more suitable one.
2003-01-20 15:38:35 +02:00
Sinisa@sinisa.nasamreza.org
e6b8fa5707
SELECT ... INTO local_vars ...;
...
For Stored Procedures
2003-01-18 18:21:13 +02:00
pem@mysql.com
4b0adb203b
Added the Stored Procedure tests.
...
Removed newly added, but now redundant, test file.
2003-01-17 14:38:05 +01:00