Commit graph

36 commits

Author SHA1 Message Date
pem@mysql.comhem.se
2796e299e6 Don't want host in the definer's column. 2003-12-12 14:12:38 +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
b27e9d6052 WL#1363: Update the mysql.proc table and add new fields.
Also made the parsing and handling of SP characteristics
more general and extendable, and added a few ch:istics.
2003-12-10 19:05:37 +01:00
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
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
055559bcaa Added more error handling for abnormal cases (like a broken mysql.proc table). 2003-10-30 10:25:45 +01:00
pem@mysql.comhem.se
70ea503662 Bugfix of previous WL#1265 commit.
Need a sp_cache_remove() function with implicit name lookup to make the WL task
to work. It's a cleaner and more convenient interface anyway...
2003-10-21 18:13:14 +02:00
pem@mysql.comhem.se
e42a724fa7 WL#1265: Fix proper ALTER/DROP support in the SP cache.
New sp_cache C API. When an SP is dropped, old caches (in other threads)
become invalid and are cleared.
Also, the caches in THD are only created on demand.
2003-10-21 12:08:35 +02:00
pem@mysql.telia.com
6e55a3428a Post-merge fixes. 2003-09-24 15:26:20 +02:00
pem@mysql.telia.com
b8e4dc03d8 Fix bug in sp.cc:db_find_routine() which made tables remain open in some cases. 2003-09-17 12:30:05 +02:00
pem@mysql.telia.com
a8a29a39d2 Merging 4.1 into 5.0 (second pass; post-merge fixes).
One test in subselect.test still wrong.
Had to reconstruct all errmsg.txt files completely, since auto-merge made
a mess of the lot. :-(
2003-07-09 17:07:12 +02:00
pem@mysql.com
c908b555ff Fixed the old kludge for pre-loading functions and made it more efficient
using a hash table instead (and made it work with lex pointers).
Some additional code cleanup too.
2003-07-07 14:55:10 +02:00
pem@mysql.com
6d225437ed Code cleanup (and moved sp cache to separate file). 2003-07-03 15:58:37 +02:00
pem@mysql.com
1d3c703d58 SP cache (WL#730). (Mostly by vva, additions by pem.) 2003-07-01 18:14:24 +02:00
pem@mysql.com
4006e95808 Bugfixes for the sp_head memroot stuff. 2003-07-01 17:19:48 +02:00
pem@mysql.com
9f14ae7516 sp_head now has its own mem_root (WL#961).
Also fixed some difficult memory leaks that became apparent
in this task.
2003-06-29 18:15:17 +02:00
gluh@gluh.mysql.r18.ru
7c6522a74e 'Expand the mysql.proc table to include (almost) all fields' task(851)
Fix after review
2003-06-02 14:25:01 +05:00
pem@mysql.com
4523a7b179 Adopt SP stuff to the new lex pointer. 2003-05-23 15:32:31 +02:00
vva@eagle.mysql.r18.ru
384b10e2af Merge eagle.mysql.r18.ru:/home/vva/work/mysql.orig/clear/mysql-5.0
into eagle.mysql.r18.ru:/home/vva/work/LEX_PTR/mysql-5.0
2003-05-14 19:48:58 -04:00
gluh@gluh.mysql.r18.ru
33cabdc3b1 Expand the mysql.proc table 2003-05-06 21:09:20 +05:00
vva@eagle.mysql.r18.ru
afd581edd3 made lex a pointer in THD 2003-05-05 14:54:37 -04: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
5c4122d3e0 Fixed the last memory leaks in the SP code. 2003-04-03 20:00:52 +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@mysql.com
9b6d015a85 ...and got rid of the strncasecmps too. 2003-03-27 17:47:25 +01:00
pem@mysql.com
ac44a5f66e Replaced a couple of strcasecmps. 2003-03-27 17:35:27 +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
b6ab762dc1 Closing tables during SP execution the proper way. 2003-02-28 15:07:14 +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
02211a600b Post-merge fixes (adapting new SP code to 4.1 changes). 2003-02-18 19:58:03 +01:00
pem@mysql.com
d53fc31958 Fixed some DBUGing, and optimized SET slightly. 2003-02-12 16:17:03 +01:00
pem@mysql.com
f2d6ec9321 Some new stuff in the Docs/sp-* files, and renamed a few functions in preparation
for future work.
2003-02-04 17:40:18 +01:00
pem@mysql.com
77b671f594 Moved create/find/drop functions to a separate files (sp.cc,sp.h).
Fixed backpatching of forward jumps.
Implemented LOOP, WHILE, REPEAT (temporarily known as SPREPEAT).

Known bug: Expression evaluation still not quite ok (e.g. "x > 0"),
which is why IF and CASE is not yet implemented.
2002-12-12 13:14:23 +01:00