summaryrefslogtreecommitdiff
path: root/sql/item_func.cc
Commit message (Collapse)AuthorAgeFilesLines
* Save and clear run context before executing a stored function or trigger and ↵monty@mysql.com2005-08-151-38/+14
| | | | | | | | | | | | | | | | restore it afterwards. This allows us to use statement replication with functions and triggers The following things are fixed with this patch: - NOW() and automatic timestamps takes the value from the main event for functions and triggers (which allows these to replicate with statement level logging) - No side effects for triggers or functions with auto-increment values(), last_insert_id(), rand() or found_rows() - Triggers can't return result sets Fixes bugs: #12480: NOW() is not constant in a trigger #12481: Using NOW() in a stored function breaks statement based replication #12482: Triggers has side effects with auto_increment values #11587: trigger causes lost connection error
* Add SLEEP(seconds) function, which always returns 0 after the givenjimw@mysql.com2005-08-111-0/+11
| | | | number of seconds (which can include microseconds). (Bug #6760)
* Manual mergesergefp@mysql.com2005-08-031-3/+3
|\
| * Added Non-prelocked SP execution: Now a PROCEDURE doesn't enter/leave ↵sergefp@mysql.com2005-07-301-3/+3
| | | | | | | | | | | | | | | | prelocked mode for its body, but lets each statement to get/release its own locks. This allows a broader set of statements to be executed inside PROCEDUREs (but breaks replication) This patch should fix BUG#8072, BUG#8766, BUG#9563, BUG#11126
* | Merge mysql.com:/home/jimw/my/mysql-4.1-cleanjimw@mysql.com2005-08-011-22/+2
|\ \ | | | | | | | | | into mysql.com:/home/jimw/my/mysql-5.0-clean
| * \ Merge mysql.com:/home/jimw/my/mysql-4.1-11402jimw@mysql.com2005-08-011-3/+0
| |\ \ | | | | | | | | | | | | into mysql.com:/home/jimw/my/mysql-4.1-clean
| | * | Fix multiplication of abs() by a negative value. (Bug #11402)jimw@mysql.com2005-06-221-3/+0
| | | |
| * | | Merge mysql.com:/home/jimw/my/mysql-4.1-10724jimw@mysql.com2005-08-011-20/+2
| |\ \ \ | | | | | | | | | | | | | | | into mysql.com:/home/jimw/my/mysql-4.1-clean
| | * | | Don't force column header to @@session.var_name if @@local.var_namejimw@mysql.com2005-07-251-20/+2
| | | | | | | | | | | | | | | | | | | | was used. (Bug #10724)
* | | | | Merge mysql.com:/usr/home/bar/mysql-4.1.b10201bar@mysql.com2005-07-261-168/+0
|\ \ \ \ \ | |/ / / / | | | | / | |_|_|/ |/| | | into mysql.com:/usr/home/bar/mysql-5.0
| * | | func_gconcat.result, func_gconcat.test:bar@mysql.com2005-07-261-162/+0
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding test item_sum.cc: Adding a call for collation/charset aggregation, to collect attributes from the arguments. The actual bug fix. item_func.h, item_func.cc, item.h, item.cc: - Removing collation aggrgation functions from Item_func class in item.cc, and adding it as non-class functions in item.cc to be able to reuse this code for group_concat. - Adding replacement for these functions into Item_func class as wrappers for moved functions, to minizize patch size,
* | | Merge mysql.com:/home/jimw/my/mysql-4.1-cleanjimw@mysql.com2005-07-191-2/+3
|\ \ \ | |/ / | | | | | | into mysql.com:/home/jimw/my/mysql-5.0-clean
| * | Simple fixes during review of new codemonty@mishka.local2005-07-191-2/+3
| | |
* | | After-merge fixes (4.1 -> 5.0).konstantin@mysql.com2005-07-161-1/+1
| | |
* | | Merge mysql.com:/opt/local/work/mysql-4.1-rootkonstantin@mysql.com2005-07-161-30/+38
|\ \ \ | |/ / | | | | | | into mysql.com:/media/sda1/mysql/mysql-5.0-merge
| * | A fix and a test case for Bug#9359 "Prepared statements take snapshotkonstantin@mysql.com2005-07-161-30/+38
| | | | | | | | | | | | | | | | | | of system vars at PREPARE time": implement a special Item to handle system variables. This item substitutes itself with a basic constant containing variable value at fix_fields.
* | | Merge bk-internal.mysql.com:/home/bk/mysql-5.0konstantin@mysql.com2005-07-141-5/+5
|\ \ \ | | | | | | | | | | | | into mysql.com:/media/sda1/mysql/mysql-5.0-10760-new
| * | | Get rid of checking for ETIME return value of pthread_cond_timedwait.konstantin@mysql.com2005-07-141-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ETIME was returned by cond_timedwait (sic, the pre-POSIX1001b function) on Solaris 2.6 and 2.7. pthread_cond_timedwait on Solaris returns ETIMEDOUT. The standard requirement is that the only additional return value of pthred_cond_timedwait compared to pthread_cond_wait is ETIMEDOUT. Let us not bloat the application code with redundant checks, and if we're ever to work on a platform that returns a non-standard value, we should write a wrapper for that platform (like we do, e.g., for Windows).
* | | | Merge mysql.com:/opt/local/work/mysql-4.1-rootkonstantin@mysql.com2005-07-141-0/+3
|\ \ \ \ | |/ / / |/| / / | |/ / into mysql.com:/opt/local/work/mysql-5.0-root
| * | Merge mysql.com:/home/psergey/mysql-4.1-build-treesergefp@mysql.com2005-07-141-0/+3
| |\ \ | | | | | | | | | | | | into mysql.com:/home/psergey/mysql-4.1-merge-from-build
| | * | Fix for BUG#11869: In Item_func_match::fix_index() handle the case when ↵sergefp@mysql.com2005-07-141-0/+3
| | |/ | | | | | | | | | | | | | | | there is no source table present (this happens for ORDER BY after UNION)
* | | Merge mysql.com:/opt/local/work/mysql-4.1-9379konstantin@mysql.com2005-07-131-1/+14
|\ \ \ | |/ / | | | | | | into mysql.com:/opt/local/work/mysql-5.0-root
| * | A fix and a test case for Bug#9379 (collation of a parameter marker is konstantin@mysql.com2005-07-131-1/+14
| |/ | | | | | | binary).
* | Merge bk-internal.mysql.com:/home/bk/mysql-5.0dlenev@mysql.com2005-07-091-0/+1
|\ \ | | | | | | | | | into mysql.com:/home/dlenev/src/mysql-5.0-bg8406
| * | Enable support of access to tables from triggers. Thus fix bug #8406 "Triggersdlenev@mysql.com2005-07-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | crash if referencing a table" and several other related bugs. Fix for bug #11834 "Re-execution of prepared statement with dropped function crashes server." which was spotted during work on previous bugs. Also couple of nice cleanups: - Replaced two separate hashes for stored routines used by statement with one. - Now instead of doing one pass through all routines used in statement for caching them and then doing another pass for adding their tables to table list, we do only one pass during which do both things.
* | | Fix for bug #11708 (real function returns wrongly rounded decimal)hf@deer.(none)2005-07-071-0/+11
| | |
* | | manual mergemonty@mysql.com2005-07-041-11/+12
|\ \ \
| * | | Fixes during review of new codemonty@mysql.com2005-07-041-11/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Mostly indentation fixes - Added missing test - Ensure that Item_func_case() checks for stack overruns - Use real_item() instead of (Item_ref*) item - Fixed wrong error handling
* | | | Name resolution context added (BUG#6443)bell@sanja.is.com.ua2005-07-011-23/+24
|/ / /
* | | removed unneed linebell@sanja.is.com.ua2005-06-231-1/+0
| | |
* | | fixed environment restoring in case of error during SP function execution ↵bell@sanja.is.com.ua2005-06-231-14/+15
| | | | | | | | | | | | | | | | | | (BUG#9503) #define macro improvement
* | | fixed view fields names check and generation (changed after Trudy review: ↵bell@sanja.is.com.ua2005-06-211-1/+1
| | | | | | | | | | | | underlying field names treat as user set ones) (BUG#7448)
* | | Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0bell@sanja.is.com.ua2005-06-171-1/+9
|\ \ \ | | | | | | | | | | | | into sanja.is.com.ua:/home/bell/mysql/bk/work-bug4-5.0
| * | | fixed printing of sum(distinct ) & avg(distinct ) & cast(... as decimal) ↵bell@sanja.is.com.ua2005-06-171-1/+9
| |/ / | | | | | | | | | (BUG#7015, BUG#11387)
* | | Merge bk-internal:/home/bk/mysql-5.0serg@serg.mylan2005-06-151-1/+1
|\ \ \ | |/ / |/| | | | | into serg.mylan:/usr/home/serg/Abk/mysql-5.0
| * | renamed:serg@serg.mylan2005-06-151-1/+1
| | | | | | | | | | | | | | | | | | Item_buff -> Cached_item Item_arena -> Query_arena TEST_ASSERT -> YYERROR_UNLESS
* | | Fix for bug #10337 (cast(NULL DECIMAL) crashes the server)hf@deer.(none)2005-06-151-1/+8
| | |
* | | a fix (#11235: Expression with IFNULL yields 18 where 1 is correct).ramil@mysql.com2005-06-141-2/+2
|/ /
* | Post-merge fix.pem@mysql.comhem.se2005-06-101-0/+1
| |
* | Merge mysql.com:/usr/local/bk/mysql-5.0pem@mysql.com2005-06-101-21/+17
|\ \ | | | | | | | | | into mysql.com:/home/pem/work/mysql-5.0
| * | Fix for bug #10083 (round doesn't increase scale)holyfoot@hf-ibm.(none)2005-06-091-12/+7
| | |
| * | Merge bk-internal.mysql.com:/home/bk/mysql-5.0dlenev@mysql.com2005-06-071-0/+3
| |\ \ | | | | | | | | | | | | into mysql.com:/home/dlenev/src/mysql-5.0-bg10015
| | * | Fix for bug #10015 "Crash in InnoDB if stored routines are used".dlenev@brandersnatch.localdomain2005-06-071-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We should not allow explicit or implicit transaction commits inside of stored functions or triggers (so in autocommit mode we should not do commits after execution of sub-statement). Also since we don't support nested statement transactions in 5.0, we shouldn't commit or rollback stmt transactions while we are inside stored functions or triggers. This should be fixed in later (>=5.1) releases.
| * | | After merge fixesmonty@mysql.com2005-06-071-1/+1
| | | |
| * | | Merge with 4.1monty@mysql.com2005-06-071-5/+3
| |\ \ \ | | | |/ | | |/|
| | * | a compiler must see '#pragma implementation' *before*serg@serg.mylan2005-06-051-1/+2
| | | | | | | | | | | | | | | | '#pragma interface' (that comes with the #include'd header file)
| | * | Move USE_PRAGMA_IMPLEMENTATION to proper placemonty@mysql.com2005-06-031-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | Ensure that 'null_value' is not accessed before val() is called in FIELD() functions Fixed initialization of key maps. This fixes some problems with keys when you have more than 64 keys Fixed that ROLLUP don't always create a temporary table. This fix ensures that func_gconcat.test results are now predictable
| * | | Merge bk-internal.mysql.com:/home/bk/mysql-5.0monty@mysql.com2005-06-061-1/+0
| |\ \ \ | | | | | | | | | | | | | | | into mysql.com:/home/my/mysql-5.0
| | * | | Some Windows compile improvements:lenz@mysql.com2005-06-061-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | - removed some unreferenced variables - fixed the libmysql project file by removing a duplicate file reference (merge error)
| * | | | mergemonty@mysql.com2005-06-051-3/+4
| |\ \ \ \ | | |/ / / | |/| | |