Commit graph

137 commits

Author SHA1 Message Date
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
pem@mysql.comhem.se
d88fa42cab A minor adjustment of the previous bug fix in sp_head.cc.
(Which btw also fixed BUG#7295: Server crash when executing stored procedure,
 I just forgot to include that before.)
2005-02-21 14:57:43 +01:00
monty@mysql.com
5bfcabf7cd Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/my/mysql-5.0
2005-02-19 21:56:24 +02:00
georg@beethoven.site
88afe50565 Merge grichter@bk-internal.mysql.com:/home/bk/mysql-5.0
into beethoven.site:/home/georg/work/mysql/mysql-5.0
2005-02-19 18:47:33 +01:00
monty@mysql.com
88d2e2973d Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/my/mysql-5.0
2005-02-19 19:00:41 +02:00
monty@mysql.com
218e00ac68 Fixed BUILD script to use --with-berkeley-db instead of --with-bdb
Lots of small fixes to multi-precision-math path
Give Note for '123.4e'
Added helper functions type 'val_string_from_real()
Don't give warnings for end space for string2decimal()
Changed storage of values for SP so that we can detect length of argument without strlen()
Changed interface for str2dec() so that we must supple the pointer to the last character in the buffer
2005-02-19 18:58:27 +02:00
pem@mysql.com
32a3c16385 Merge mysql.com:/usr/local/bk/mysql-5.0
into mysql.com:/home/pem/work/mysql-5.0
2005-02-18 17:46:30 +01: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
georg@beethoven.site
26e3685b02 Changes and fixes for windows compilation 2005-02-18 15:17:17 +01:00
serg@serg.mylan
fd828e5b4d manually merged 2005-02-14 21:50:09 +01:00
hf@deer.(none)
96558f6ad3 Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-5.0
into deer.(none):/home/hf/work/mysql-5.0.clean
2005-02-09 02:54:08 +04:00
hf@deer.(none)
b94a482ee9 Precision Math implementation 2005-02-09 02:50:45 +04: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
monty@mysql.com
80b3e02462 Fixed bug detected by sp-tests
Cleanup during reviews of new pushed code
2005-02-05 16:05:46 +02:00
serg@serg.mylan
1034677f94 XA (not completely polished out yet) 2005-01-16 13:16:23 +01:00
monty@mysql.com
d35140a851 First stage of table definition cache
Split TABLE to TABLE and TABLE_SHARE (TABLE_SHARE is still allocated as part of table, will be fixed soon)
Created Field::make_field() and made Field_num::make_field() to call this
Added 'TABLE_SHARE->db' that points to database name; Changed all usage of table_cache_key as database name to use this instead
Changed field->table_name to point to pointer to alias. This allows us to change alias for a table by just updating one pointer.
Renamed TABLE_SHARE->real_name to table_name
Renamed TABLE->table_name to alias
Renamed TABLE_LIST->real_name to table_name
2005-01-06 13:00:13 +02:00
monty@mysql.com
d71c030587 After merge fixes 2004-12-31 00:44:00 +02:00
ingo@mysql.com
fbade5dbe8 A fix for a crash in sp.test with -debug-max.
When the joins were not cleaned up before the tables
were closed, a JOIN_TAB still held a pointer to a
meanwhile closed table and tried to close it again
during item cleanup...
2004-12-08 16:28:25 +01:00
dlenev@brandersnatch.localdomain
d201074611 Fix for bug #5888 "Triggers with nonexistent columns cause packets
out of order". (final version)

Now instead of binding Item_trigger_field to TABLE objects during
trigger definition parsing at table open, we perform pass through
special list of all such objects in trigger. This allows easily check
all references to fields in old/new version of row in trigger during
execution of CREATE TRIGGER statement (this is more courtesy for users
since we can't check everything anyway).
We also report that such reference is bad by returning error from
Item_trigger_field::fix_fields() method (instead of setup_field())
This means that if trigger is broken we will bark during trigger
execution instead of trigger definition parsing at table open.
(i.e. now we allow to open tables with broken triggers).
2004-11-24 12:24:02 +03:00
bell@sanja.is.com.ua
7210195f1e now my_printf_error is not better then my_error, but my_error call is shorter
used only one implementation of format parser of (printf)
fixed multistatement
2004-11-13 19:35:51 +02:00
bell@sanja.is.com.ua
1555469b64 merge 2004-11-12 15:36:31 +02:00
bell@sanja.is.com.ua
31f7811183 post-review fixes 2004-11-12 14:34:00 +02:00
konstantin@mysql.com
e5f4c7a0bd Rename: Item::val -> Item::val_real(). 2004-11-11 21:39:35 +03:00
monty@mysql.com
2bba55b57f After merge fixes
Added push_back(void *, MEM_ROOT *) to make some list-handling code easier that needs to be allocated in a different mem-root
(Before one had to change thd->mem_root ; push_back(); restore mem_root.
2004-11-09 03:58:44 +02:00
monty@mysql.com
47bbf768d4 Fixes after merge with 4.1
FOUND is not a reserved keyword anymore
Added Item_field::set_no_const_sub() to be able to mark fields that can't be substituted
Added 'simple_select' method to be able to quickly determinate if a select_result is a normal SELECT
Note that the 5.0 tree is not yet up to date: Sanja will have to fix multi-update-locks for this merge to be complete
2004-11-03 12:39:38 +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
5b10e3e5b5 Fixed BUG#3583: query cache doesn't work for stored procedures. 2004-09-17 15:40:38 +02:00
pem@mysql.comhem.se
624cf0e537 Fixed BUG#3294: Stored procedure crash if table dropped before use.
Dropping the table was not the real problem, the problem was with errors
  occuring within error handlers.
2004-09-10 11:11:52 +02:00
dlenev@brandersnatch.localdomain
0ae54976d3 After merge fixes for WL#1218 "Triggers" 2004-09-09 23:44:27 +04:00
dlenev@mysql.com
c46e640009 Yet another manual merge with main tree for patch for WL#1218 "Triggers" 2004-09-09 19:52:10 +04: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
dlenev@brandersnatch.localdomain
6dc933b730 WL#1218 "Triggers"
After review and after merge fixes.
2004-09-09 00:46:01 +04:00
pem@mysql.comhem.se
b83af8607a Fixed BUG#5000: SPs can be created with no default database.
Easy to prevent crash, but the question was how to treat this case?
  We ended up implementing the "global" SPs (i.e. with no associated
  db), which were planned but left unresolved when SPs moved into dbs.
  So now things like "call .p()" work too.
2004-09-08 14:23:14 +02:00
dlenev@mysql.com
9b1bc6a4d5 Merge of changes from the main tree to tree for WL#1218 "Triggers". 2004-09-08 13:29:21 +04:00
dlenev@brandersnatch.localdomain
9ed038dd6f WL#1218 "Triggers". Some very preliminary version of patch.
Mostly needed for Monty for him getting notion what needed for triggers 
from new .FRM format. 

Things to be done:
- Right placement of trigger's invocations
- Right handling of errors in triggers (including transaction rollback)
- Support for priviliges
- Right handling of DROP/RENAME table (hope that it will be handled automatically
  with merging of .TRG into .FRM file)
- Saving/restoring some information critical for trigger creation and replication
  with their definitions (e.g. sql_mode, creator, ...)
- Replication

Already has some known bugs so probably not for general review.
2004-09-07 16:29:46 +04:00
bell@sanja.is.com.ua
161662ba4c Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-5.0
2004-09-04 15:32:13 +03:00
pem@mysql.comhem.se
e04f4fb46c Fixed BUG#5307: Stored procedure allows statement after BEGIN ... END. 2004-09-02 19:14:34 +02:00
bell@sanja.is.com.ua
31dacc6ede Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-5.0
2004-09-02 07:52:29 +03:00
bell@sanja.is.com.ua
392c306969 fixed open_and_lock_tables result processing (all open_and_lock_tables revision)
fixed printing of COLLATE operation
(BUG#5155)
2004-08-31 10:06:38 +03:00
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
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
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
konstantin@mysql.com
e67584151e Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/kostja/mysql/mysql-5.0-sap-new
2004-08-03 03:33:51 -07:00
konstantin@mysql.com
d3e520ce7e Port of cursors to be pushed into 5.0 tree:
- client side part is simple and may be considered stable
- server side part now just joggles with THD state to save execution
  state and has no additional locking wisdom.
  Lot's of it are to be rewritten.
2004-08-03 03:32:21 -07:00