summaryrefslogtreecommitdiff
path: root/sql/sql_update.cc
Commit message (Collapse)AuthorAgeFilesLines
* Fix doxygen warnings.kostja@bodhi.(none)2007-08-151-4/+4
|
* Merge magare.gmz:/home/kgeorge/mysql/work/B27417-5.0-optgkodinov/kgeorge@magare.gmz2007-07-311-1/+2
|\ | | | | | | into magare.gmz:/home/kgeorge/mysql/work/B27417-5.1-opt
| * addendum for the fix for bug 27417:gkodinov/kgeorge@magare.gmz2007-07-311-1/+2
| | | | | | | | extend the assert so it will run the testsuite
* | (Pushing for Andrei)gkodinov/kgeorge@magare.gmz2007-07-301-21/+20
|\ \ | |/ | | | | | | Merge magare.gmz:/home/kgeorge/mysql/work/B27417-5.0-opt into magare.gmz:/home/kgeorge/mysql/work/B27417-5.1-opt
| * (pushing for Andrei)gkodinov/kgeorge@magare.gmz2007-07-301-21/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug #27417 thd->no_trans_update.stmt lost value inside of SF-exec-stack Once had been set the flag might later got reset inside of a stored routine execution stack. The reason was in that there was no check if a new statement started at time of resetting. The artifact affects most of binlogable DML queries. Notice, that multi-update is wrapped up within bug@27716 fix, multi-delete bug@29136. Fixed with saving parent's statement flag of whether the statement modified non-transactional table, and unioning (merging) the value with that was gained in mysql_execute_command. Resettling thd->no_trans_update members into thd->transaction.`member`; Asserting code; Effectively the following properties are held. 1. At the end of a substatement thd->transaction.stmt.modified_non_trans_table reflects the fact if such a table got modified by the substatement. That also respects THD::really_abort_on_warnin() requirements. 2. Eventually thd->transaction.stmt.modified_non_trans_table will be computed as the union of the values of all invoked sub-statements. That fixes this bug#27417; Computing of thd->transaction.all.modified_non_trans_table is refined to base to the stmt's value for all the case including insert .. select statement which before the patch had an extra issue bug@28960. Minor issues are covered with mysql_load, mysql_delete, and binloggin of insert in to temp_table select. The supplied test verifies limitely, mostly asserts. The ultimate testing is defered for bug@13270, bug@23333.
| * Merge mysql.com:/nfsdisk1/lars/bkroot/mysql-5.0-rpllars/lthalmann@dl145h.mysql.com2007-06-051-14/+76
| |\ | | | | | | | | | into mysql.com:/nfsdisk1/lars/MERGE/mysql-5.0-merge
| * \ Merge bk-internal.mysql.com:/data0/bk/mysql-5.0ibabaev@bk-internal.mysql.com2007-06-021-0/+31
| |\ \ | | | | | | | | | | | | into bk-internal.mysql.com:/data0/bk/mysql-5.0-opt
* | \ \ Merge gleb.loc:/home/uchum/work/bk/5.1gshchepa/uchum@gleb.loc2007-07-191-3/+91
|\ \ \ \ | | | | | | | | | | | | | | | into gleb.loc:/home/uchum/work/bk/5.1-opt
| * | | | Bug#28158 - table->read_set is set incorrectly,istruewing@chilla.local2007-07-121-3/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | causing wrong error message in Falcon An error message about a duplicate key could show a wrong key value when not all columns of the key were used to select the rows for update. Some storage engines return a record with only the selected columns filled. This is fixed by re-reading the record with a read_set which includes all columns of the duplicate key after a duplicate key error happens and before the error message is printed.
* | | | | Bug#29310: An InnoDB table was updated when the data wasn't actually changed.evgen@moonbone.local2007-07-081-0/+11
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a table is being updated it has two set of fields - fields required for checks of conditions and fields to be updated. A storage engine is allowed not to retrieve columns marked for update. Due to this fact records can't be compared to see whether the data has been changed or not. This makes the server always update records independently of data change. Now when an auto-updatable timestamp field is present and server sees that a table handle isn't going to retrieve write-only fields then all of such fields are marked as to be read to force the handler to retrieve them.
* | | | Bug #29157: UPDATE, changed rows incorrectgkodinov/kgeorge@magare.gmz2007-06-281-5/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes the number of really updated rows (with changed column values) cannot be determined at the server level alone (e.g. if the storage engine does not return enough column values to verify that). So the only dependable way in such cases is to let the storage engine return that information if possible. Fixed the bug at server level by providing a way for the storage engine to return information about wether it actually updated the row or the old and the new column values are the same. It can do that by returning HA_ERR_RECORD_IS_THE_SAME in ha_update_row(). Note that each storage engine may choose not to try to return this status code, so this behaviour remains storage engine specific.
* | | | Merge mysql.com:/nfsdisk1/lars/bkroot/mysql-5.1-new-rpllars/lthalmann@dl145h.mysql.com2007-06-051-33/+116
|\ \ \ \ | | | | | | | | | | | | | | | into mysql.com:/nfsdisk1/lars/MERGE/mysql-5.1-merge
| * \ \ \ Merge olga.mysql.com:/home/igor/mysql-5.1igor@olga.mysql.com2007-06-031-30/+113
| |\ \ \ \ | | | | | | | | | | | | | | | | | | into olga.mysql.com:/home/igor/mysql-5.1-opt-merge
| | * | | | Post-merge fix.igor@olga.mysql.com2007-05-311-1/+1
| | | | | |
| | * | | | Merge bk-internal.mysql.com:/data0/bk/mysql-5.1ibabaev@bk-internal.mysql.com2007-06-011-30/+113
| | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | into bk-internal.mysql.com:/data0/bk/mysql-5.1-opt
| | | * \ \ \ Merge gleb.loc:/home/uchum/work/bk/mysql-5.0-optgshchepa/uchum@gleb.loc2007-05-311-30/+113
| | | |\ \ \ \ | | | | |/ / / | | | | | | | | | | | | | | into gleb.loc:/home/uchum/work/bk/mysql-5.1-opt
| | | | * | | sql_update.cc:gshchepa/uchum@gleb.loc2007-05-301-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed bug #28716: additional patch to eliminate compilation error under Windows.
| | | | * | | Fixed bug #28716.gshchepa/uchum@gleb.loc2007-05-301-29/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The result of the CHECK OPTION condition evaluation over an updated record and records of merged tables was arbitrary and dependant on the order of records in the merged tables during the execution of SELECT statement. The CHECK OPTION expression was evaluated over expired record buffers (with arbitrary data in the fields). Rowids of tables used in the CHECK OPTION expression were added to temporary table rows. The multi_update::do_updates() method was modified to restore necessary record buffers before evaluation of the CHECK OPTION condition.
| * | | | | | Merge bk-internal.mysql.com:/home/bk/mysql-5.1kostja@bodhi.(none)2007-06-011-5/+5
| |\ \ \ \ \ \ | | |/ / / / / | | | | | | | | | | | | | | into bodhi.(none):/opt/local/work/mysql-5.1-runtime
| | * | | | | Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.1jani@a88-113-38-195.elisa-laajakaista.fi2007-05-241-5/+5
| | |\ \ \ \ \ | | | |/ / / / | | |/| | | | | | | | | | | into a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel
| | | * | | | WL#3817: Simplify string / memory area types and make things more consistent ↵monty@mysql.com/narttu.mysql.fi2007-05-101-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (first part) The following type conversions was done: - Changed byte to uchar - Changed gptr to uchar* - Change my_string to char * - Change my_size_t to size_t - Change size_s to size_t Removed declaration of byte, gptr, my_string, my_size_t and size_s. Following function parameter changes was done: - All string functions in mysys/strings was changed to use size_t instead of uint for string lengths. - All read()/write() functions changed to use size_t (including vio). - All protocoll functions changed to use size_t instead of uint - Functions that used a pointer to a string length was changed to use size_t* - Changed malloc(), free() and related functions from using gptr to use void * as this requires fewer casts in the code and is more in line with how the standard functions work. - Added extra length argument to dirname_part() to return the length of the created string. - Changed (at least) following functions to take uchar* as argument: - db_dump() - my_net_write() - net_write_command() - net_store_data() - DBUG_DUMP() - decimal2bin() & bin2decimal() - Changed my_compress() and my_uncompress() to use size_t. Changed one argument to my_uncompress() from a pointer to a value as we only return one value (makes function easier to use). - Changed type of 'pack_data' argument to packfrm() to avoid casts. - Changed in readfrm() and writefrom(), ha_discover and handler::discover() the type for argument 'frmdata' to uchar** to avoid casts. - Changed most Field functions to use uchar* instead of char* (reduced a lot of casts). - Changed field->val_xxx(xxx, new_ptr) to take const pointers. Other changes: - Removed a lot of not needed casts - Added a few new cast required by other changes - Added some cast to my_multi_malloc() arguments for safety (as string lengths needs to be uint, not size_t). - Fixed all calls to hash-get-key functions to use size_t*. (Needed to be done explicitely as this conflict was often hided by casting the function to hash_get_key). - Changed some buffers to memory regions to uchar* to avoid casts. - Changed some string lengths from uint to size_t. - Changed field->ptr to be uchar* instead of char*. This allowed us to get rid of a lot of casts. - Some changes from true -> TRUE, false -> FALSE, unsigned char -> uchar - Include zlib.h in some files as we needed declaration of crc32() - Changed MY_FILE_ERROR to be (size_t) -1. - Changed many variables to hold the result of my_read() / my_write() to be size_t. This was needed to properly detect errors (which are returned as (size_t) -1). - Removed some very old VMS code - Changed packfrm()/unpackfrm() to not be depending on uint size (portability fix) - Removed windows specific code to restore cursor position as this causes slowdown on windows and we should not mix read() and pread() calls anyway as this is not thread safe. Updated function comment to reflect this. Changed function that depended on original behavior of my_pwrite() to itself restore the cursor position (one such case). - Added some missing checking of return value of malloc(). - Changed definition of MOD_PAD_CHAR_TO_FULL_LENGTH to avoid 'long' overflow. - Changed type of table_def::m_size from my_size_t to ulong to reflect that m_size is the number of elements in the array, not a string/memory length. - Moved THD::max_row_length() to table.cc (as it's not depending on THD). Inlined max_row_length_blob() into this function. - More function comments - Fixed some compiler warnings when compiled without partitions. - Removed setting of LEX_STRING() arguments in declaration (portability fix). - Some trivial indentation/variable name changes. - Some trivial code simplifications: - Replaced some calls to alloc_root + memcpy to use strmake_root()/strdup_root(). - Changed some calls from memdup() to strmake() (Safety fix) - Simpler loops in client-simple.c
* | | | | | | Bug #27716 multi-update did partially and has not binloggedaelkin/elkin@dsl-hkibras1-ff5dc300-70.dhcp.inet.fi2007-06-041-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | manual merge with 5.0: automatic merge went incorrectly; fixing tests in rbr mode.
* | | | | | | Merge dsl-hkibras1-ff5dc300-70.dhcp.inet.fi:/home/elkin/MySQL/TEAM/BARE/5.0aelkin/elkin@dsl-hkibras1-ff5dc300-70.dhcp.inet.fi2007-06-021-14/+76
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | / | | |_|_|_|/ | |/| | | | into dsl-hkibras1-ff5dc300-70.dhcp.inet.fi:/tmp/merge_5.0
| * | | | | Merge aelkin@bk-internal.mysql.com:/home/bk/mysql-5.0-rplaelkin/elkin@dsl-hkibras1-ff5dc300-70.dhcp.inet.fi2007-06-011-14/+76
| |\ \ \ \ \ | | |_|_|_|/ | |/| | | | | | | | | | into dsl-hkibras1-ff5dc300-70.dhcp.inet.fi:/home/elkin/MySQL/TEAM/FIXES/5.0/bug27716-multi_upd_no_binlog
| | * | | | Bug #27716 multi-update did partially and has not binloggedaelkin/elkin@dsl-hkibras1-ff5dc300-70.dhcp.inet.fi2007-06-011-14/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implementation of mysql_multi_update did not call multi_update::send_error method in some cases (see the test reported on bug page and test cases in changeset). Fixed with deploying the method, ::send_error() is refined to get binlogging code which works whenever there is modified non-transactional table. thd->no_trans_update.stmt flag is set in to TRUE to ease testing though being the beginning of relative bug#27417 fix (addresses a part of those issues). Eliminating two minor issues (small bugs) in multi_update methods. This patch for multi-update also addresses a part of the issues reported in bug#13270,bug#23333.
* | | | | | Merge lthalmann@bk-internal.mysql.com:/home/bk/mysql-5.1-runtimelars/lthalmann@dl145j.mysql.com2007-05-311-0/+31
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | into mysql.com:/nfsdisk1/lars/bk/mysql-5.1-new-rpl
| * \ \ \ \ \ Merge dsl-hkibras1-ff5dc300-70.dhcp.inet.fi:/home/elkin/MySQL/TEAM/BARE/5.0aelkin/elkin@dsl-hkibras1-ff5dc300-70.dhcp.inet.fi2007-05-281-0/+31
| |\ \ \ \ \ \ | | |/ / / / / | | | | / / / | | |_|/ / / | |/| | | | into dsl-hkibras1-ff5dc300-70.dhcp.inet.fi:/tmp/merge_5.0
| | * | | | Bug#22725 Replication outages from ER_SERVER_SHUTDOWN (1053) set in ↵aelkin/elkin@dsl-hkibras1-ff5dc300-70.dhcp.inet.fi2007-05-281-0/+31
| | | |_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | replication events The reason for the bug was that replaying of a query on slave could not be possible since its event was recorded with the killed error. Due to the specific of handling INSERT, which per-row-while-loop is unbreakable to killing, the query on transactional table should have not appeared in binlog unless there was a call to a stored routine that got interrupted with killing (and then there must be an error returned out of the loop). The offered solution added the following rule for binlogging of INSERT that accounts the above specifics: For INSERT on transactional-table if the error was not set the only raised flag is harmless and is ignored via masking out on time of creation of binlog event. For both table types the combination of raised error and KILLED flag indicates that there was potentially partial execution on master and consistency is under the question. In that case the code continues to binlog an event with an appropriate killed error. The fix relies on the specified behaviour of stored routine that must propagate the error to the top level query handling if the thd->killed flag was raised in the routine execution. The patch adds an arg with the default killed-status-unset value to Query_log_event::Query_log_event.
* | | | | Bug#24988 FLUSH PRIVILEGES causes brief unavailabilitythek@adventure.(none)2007-05-281-1/+1
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | - A race condition caused brief unavailablility when trying to acccess a table. - The variable 'grant_option' was removed to resolve the race condition and to simplify the design pattern. This flag was originally intended to optimize grant checks.
* | | | Merge mysql.com:/home/hf/work/27957/my50-27957holyfoot/hf@hfmain.(none)2007-05-121-2/+3
|\ \ \ \ | |/ / / | | | / | |_|/ |/| | into mysql.com:/home/hf/work/27957/my51-27957
| * | Bug#27878: Unchecked privileges on a view referring to a table from another evgen@moonbone.local2007-05-111-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | database. If a user has a right to update anything in the current database then the access was granted and further checks of access rights for underlying tables wasn't done correctly. The check is done before a view is opened and thus no check of access rights for underlying tables can be carried out. This allows a user to update through a view a table from another database for which he hasn't enough rights. Now the mysql_update() and the mysql_test_update() functions are forces re-checking of access rights after a view is opened.
| * | Merge polly.local:/home/kaa/src/maint/bug22364/my50-bug22364kaa@polly.local2007-04-261-10/+9
| |\ \ | | |/ | |/| | | | into polly.local:/home/kaa/src/maint/mysql-5.0-maint
| * | Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.0jani@ua141d10.elisa.omakaista.fi2007-04-121-0/+26
| |\ \ | | | | | | | | | | | | into ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.0-marvel
| | * \ Merge mysql.com:/windows/Linux_space/MySQL/mysql-5.0mskold/marty@mysql.com/linux.site2007-04-051-0/+26
| | |\ \ | | | | | | | | | | | | | | | into mysql.com:/windows/Linux_space/MySQL/mysql-5.0-ndb
* | | \ \ Merge polly.local:/home/kaa/src/maint/bug22364/my51-bug22364kaa@polly.local2007-04-271-9/+9
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | into polly.local:/home/kaa/src/maint/mysql-5.1-maint
| * \ \ \ \ Merge polly.local:/home/kaa/src/maint/bug22364/my50-bug22364kaa@polly.local2007-04-271-9/+9
| |\ \ \ \ \ | | | |_|_|/ | | |/| | | | | | | | | into polly.local:/home/kaa/src/maint/bug22364/my51-bug22364
| | * | | | Fix for bug #22364 "Inconsistent "matched rows" when executing UPDATE"kaa@polly.local2007-04-231-10/+9
| | | |/ / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In multi_update::send_data(), the counter of matched rows was not correctly incremented, when during insertion of a new row to a temporay table it had to be converted from HEAP to MyISAM. This fix changes the logic to increment the counter of matched rows in the following cases: 1. If the error returned from write_row() is zero. 2. If the error returned from write_row() is non-zero, is neither HA_ERR_FOUND_DUPP_KEY nor HA_ERR_FOUND_DUPP_UNIQUE, and a call to create_myisam_from_heap() succeeds.
* | | | | Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.1jani@ua141d10.elisa.omakaista.fi2007-04-101-28/+28
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | into ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.1-marvel
| * | | | | Manual merge from 5.0jani@ua141d10.elisa.omakaista.fi2007-03-291-1/+1
| | | | | |
| * | | | | Merge ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.0-marveljani@ua141d10.elisa.omakaista.fi2007-03-291-27/+27
| |\ \ \ \ \ | | |/ / / / | |/| | / / | | | |/ / | | |/| | into ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.1-marvel
| | * | | Bug #27395 OPTION_STATUS_NO_TRANS_UPDATE is not preserved at the end of SF()aelkin/elkin@andrepl.(none)2007-03-231-24/+24
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | thd->options' OPTION_STATUS_NO_TRANS_UPDATE bit was not restored at the end of SF() invocation, where SF() modified non-ta table. As the result of this artifact it was not possible to detect whether there were any side-effects when top-level query ends. If the top level query table was not modified and the bit is lost there would be no binlogging. Fixed with preserving the bit inside of thd->no_trans_update struct. The struct agregates two bool flags telling whether the current query and the current transaction modified any non-ta table. The flags stmt, all are dropped at the end of the query and the transaction.
| | * | Merge bk@192.168.21.1:mysql-5.0holyfoot/hf@mysql.com/hfmain.(none)2007-03-081-3/+3
| | |\ \ | | | | | | | | | | | | | | | into mysql.com:/home/hf/work/mrg/mysql-5.0-opt
| | * \ \ Merge malff@bk-internal.mysql.com:/home/bk/mysql-5.0-runtimemalff/marcsql@weblab.(none)2007-03-061-1/+1
| | |\ \ \ | | | | | | | | | | | | | | | | | | into weblab.(none):/home/marcsql/TREE/mysql-5.0-8407_b
* | | \ \ \ Merge dev3-240.dev.cn.tlan:/home/justin.he/mysql/mysql-5.1/mysql-5.1-new-ndbJustin.He/justin.he@dev3-240.dev.cn.tlan2007-04-051-2/+4
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | into dev3-240.dev.cn.tlan:/home/justin.he/mysql/mysql-5.1/mysql-5.1-new-ndb-bj.merge
| * \ \ \ \ \ Merge dev3-240.dev.cn.tlan:/home/justin.he/mysql/mysql-5.1/mysql-5.1-new-ndbJustin.He/justin.he@dev3-240.dev.cn.tlan2007-04-051-2/+4
| |\ \ \ \ \ \ | | |/ / / / / | |/| | | | | | | | | | | | into dev3-240.dev.cn.tlan:/home/justin.he/mysql/mysql-5.1/mysql-5.1-new-ndb-bj.merge
| | * | | | | Bug#27127, Incorrect behaviour of timestamp column with DEFAULT ↵Justin.He/justin.he@dev3-240.dev.cn.tlan2007-03-221-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CURRENT_TIMESTAMP correct the bitmap_set_bit when a field is timestamp and described with default CURRENT_TIMESTAMP or on update CURRENT_TIMESTAMP, then it will reduce a little time cost when the field doesnot need to write.
* | | | | | | Merge mysql.com:/windows/Linux_space/MySQL/mysql-5.1mskold/marty@linux.site2007-04-041-1/+25
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | | | | | | | | into mysql.com:/windows/Linux_space/MySQL/mysql-5.1-new-ndb
| * | | | | | Merge from 5.0mskold/marty@mysql.com/linux.site2007-04-041-12/+9
| | | | | | |
| * | | | | | Merge mysql.com:/windows/Linux_space/MySQL/mysql-5.0mskold/marty@linux.site2007-04-041-1/+28
| |\ \ \ \ \ \ | | | |_|_|_|/ | | |/| | | | | | | | | | | into mysql.com:/windows/Linux_space/MySQL/mysql-5.1
| | * | | | | Bug #26242 UPDATE with subquery and triggers failing with cluster tablesmskold/marty@mysql.com/linux.site2007-04-041-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In certain cases AFTER UPDATE/DELETE triggers on NDB tables that referenced subject table didn't see the results of operation which caused invocation of those triggers. In other words AFTER trigger invoked as result of update (or deletion) of particular row saw version of this row before update (or deletion). The problem occured because NDB handler in those cases postponed actual update/delete operations to be able to perform them later as one batch. This fix solves the problem by disabling this optimization for particular operation if subject table has AFTER trigger for this operation defined. To achieve this we introduce two new flags for handler::extra() method: HA_EXTRA_DELETE_CANNOT_BATCH and HA_EXTRA_UPDATE_CANNOT_BATCH. These are called if there exists AFTER DELETE/UPDATE triggers during a statement that potentially can generate calls to delete_row()/update_row(). This includes multi_delete/multi_update statements as well as insert statements that do delete/update as part of an ON DUPLICATE statement.