summaryrefslogtreecommitdiff
path: root/sql/sql_trigger.cc
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-21341: Fix UBSAN failures: Issue Sixbb-10.3-mdev21341-issueSixSergei Petrunia2020-01-121-1/+1
| | | | | | | | | | | | | (Variant #2 of the patch, which keeps the sp_head object inside the MEM_ROOT that sp_head object owns) (10.3 version of the fix, with handling for class sp_package) sp_head::operator new() and operator delete() were dereferencing sp_head* pointers to memory that didn't hold a valid sp_head object (it was not created/already destroyed). This caused UBSan to crash when looking up type information. Fixed by providing static sp_head::create() and sp_head::destroy() methods.
* Merge 10.2 into 10.3Marko Mäkelä2019-05-141-1/+1
|\
| * Merge 10.1 into 10.2Marko Mäkelä2019-05-131-1/+1
| |\
| | * Merge branch '5.5' into 10.1Vicențiu Ciorbaru2019-05-111-1/+1
| | |\
| | | * Update FSF AddressVicențiu Ciorbaru2019-05-111-1/+1
| | | | | | | | | | | | | | | | * Update wrong zip-code
* | | | Merge branch '10.2' into 10.3Sergei Golubchik2019-03-171-2/+2
|\ \ \ \ | |/ / /
| * | | Merge branch '10.1' into 10.2Sergei Golubchik2019-03-151-2/+2
| |\ \ \ | | |/ /
| | * | fix gcc 8 compiler warningsSergei Golubchik2019-03-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were two newly enabled warnings: 1. cast for a function pointers. Affected sql_analyse.h, mi_write.c and ma_write.cc, mf_iocache-t.cc, mysqlbinlog.cc, encryption.cc, etc 2. memcpy/memset of nontrivial structures. Fixed as: * the warning disabled for InnoDB * TABLE, TABLE_SHARE, and TABLE_LIST got a new method reset() which does the bzero(), which is safe for these classes, but any other bzero() will still cause a warning * Table_scope_and_contents_source_st uses `TABLE_LIST *` (trivial) instead of `SQL_I_List<TABLE_LIST>` (not trivial) so it's safe to bzero now. * added casts in debug_sync.cc and sql_select.cc (for JOIN) * move assignment method for MDL_request instead of memcpy() * PARTIAL_INDEX_INTERSECT_INFO::init() instead of bzero() * remove constructor from READ_RECORD() to make it trivial * replace some memcpy() with c++ copy assignments
* | | | cleanup: trg2bit() helperSergei Golubchik2019-01-251-4/+2
| | | |
* | | | Merge 10.2 into 10.3Marko Mäkelä2018-11-061-3/+2
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | main.derived_cond_pushdown: Move all 10.3 tests to the end, trim trailing white space, and add an "End of 10.3 tests" marker. Add --sorted_result to tests where the ordering is not deterministic. main.win_percentile: Add --sorted_result to tests where the ordering is no longer deterministic.
| * | | Merge 10.1 into 10.2Marko Mäkelä2018-11-061-3/+2
| |\ \ \ | | |/ /
| | * | wsrep: create a macro for the error: labelSergei Golubchik2018-10-241-3/+2
| | | | | | | | | | | | | | | | | | | | that is used by WSREP_TO_ISOLATION_BEGIN and other galera macros, to avoid the need for wrapping this label in #ifdef WITH_WSREP/#endif
* | | | Merge branch '10.2' into 10.3Sergei Golubchik2018-09-281-2/+6
|\ \ \ \ | |/ / /
| * | | Merge branch '10.1' into 10.2Oleksandr Byelkin2018-09-141-2/+6
| |\ \ \ | | |/ /
| | * | Merge branch '10.0-galera' into 10.1Sergei Golubchik2018-09-071-1/+5
| | |\ \
| | | * | Fix compile error.Jan Lindström2018-07-191-1/+3
| | | | |
| | * | | MDEV-15890 Strange error message if you try to FLUSH TABLES <view> after ↵Alexey Botchkov2018-09-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LOCK TABLES <view>. Check if the argument of the FLUSH TABLE is a VIEW and handle it accordingly.
* | | | | Merge branch '10.2' into 10.3Sergei Golubchik2018-06-301-1/+1
|\ \ \ \ \ | |/ / / /
| * | | | Merge branch '10.1' into 10.2Sergei Golubchik2018-06-211-1/+1
| |\ \ \ \ | | |/ / /
| | * | | Merge branch '10.0-galera' into 10.1Vicențiu Ciorbaru2018-06-121-1/+1
| | |\ \ \ | | | |/ /
| | | * | Merge tag 'mariadb-10.0.35' into 10.0-galeraJan Lindström2018-05-071-1/+1
| | | |\ \
| | | * \ \ Merge remote-tracking branch 'origin/5.5-galera' into 10.0-galeraJan Lindström2018-05-071-0/+6
| | | |\ \ \
| | | | * \ \ Merge tag 'mariadb-5.5.60' into 5.5-galeraJan Lindström2018-04-241-0/+1
| | | | |\ \ \ | | | | | | |/ | | | | | |/|
| | | | * | | MW-416 Replicating DDL after ACL check, 5.6 versionsjaakola2017-10-191-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Re-implemented the fix for MW-416 according to 5.7 version
| | | | * | | Merge tag 'mariadb-5.5.55' into bb-5.5-sachin-mergeSachin Setiya2017-04-181-0/+3
| | | | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Sachin Setiya <sachin.setiya@mariadb.com>
| | | | * \ \ \ Merge from lp:maria/5.5 to maria-5.5.37 release revision 4154.Jan Lindström2014-04-161-0/+7
| | | | |\ \ \ \
| | | | * \ \ \ \ Merge from maria/5.5 (-rtag:mariadb-5.5.36).Nirbhay Choubey2014-02-251-1/+1
| | | | |\ \ \ \ \
| | | | * | | | | | Merging revision 3839..3932 from codership-mysql/5.5.Nirbhay Choubey2014-01-091-2/+2
| | | | | | | | | |
| | | | * | | | | | Merge with mariadb 5.5: bzr merge lp:maria/5.5 --rtag:mariadb-5.5.32Seppo Jaakola2013-08-211-1/+1
| | | | |\ \ \ \ \ \
| | | | * \ \ \ \ \ \ References: MDEV-4572 - merge with mariaDB 5.5.31Seppo Jaakola2013-05-261-3/+0
| | | | |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bzr merge lp:maria/5.5 -rtag:mariadb-5.5.31 Text conflict in cmake/cpack_rpm.cmake Text conflict in debian/dist/Debian/control Text conflict in debian/dist/Ubuntu/control Text conflict in sql/CMakeLists.txt Conflict adding file sql/db.opt. Moved existing file to sql/db.opt.moved. Conflict adding file sql/db.opt.moved. Moved existing file to sql/db.opt.moved.moved. Text conflict in sql/mysqld.cc Text conflict in support-files/mysql.spec.sh 8 conflicts encountered.
| | | | * \ \ \ \ \ \ \ References lp:1051808 - merged with lp:maria/5.5Seppo Jaakola2012-09-171-0/+3
| | | | |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bzr merge lp:maria/5.5 ... Text conflict in CMakeLists.txt Text conflict in sql/mysqld.cc Text conflict in sql/sql_class.h Text conflict in sql/sql_truncate.cc 4 conflicts encountered.
| | | | * \ \ \ \ \ \ \ \ references lp:1011983Seppo Jaakola2012-06-121-1/+1
| | | | |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merged latest MariaDB development in: bzr merge lp:maria/5.5 => Text conflict in CMakeLists.txt Text conflict in sql/handler.h Text conflict in support-files/CMakeLists.txt 3 conflicts
| | | | * | | | | | | | | | Initial push of codership-wsrep API implementation for MariaDB. Seppo Jaakola2012-04-131-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge of: lp:maria/5.5, #3334: http://bazaar.launchpad.net/~maria-captains/maria/5.5/revision/3334 lp:codership-mysql/5.5, #3725: http://bazaar.launchpad.net/~codership/codership-mysql/wsrep-5.5/revision/3725
| | | * | | | | | | | | | | Merge tag 'mariadb-10.0.30' into bb-sachin-10.0-galera-mergeSachin Setiya2017-03-171-0/+3
| | | |\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Sachin Setiya <sachin.setiya@mariadb.com>
| | | * \ \ \ \ \ \ \ \ \ \ \ Merge branch '10.0' into 10.0-galeraNirbhay Choubey2016-04-291-1/+1
| | | |\ \ \ \ \ \ \ \ \ \ \ \
| | | * | | | | | | | | | | | | MDEV-7996 : CURRENT_USER definer does not replicate for triggersNirbhay Choubey2015-04-161-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | THD's lex->definer initially holds "*current_user" for CURRENT_USER(). As a result when wsrep tries to create the trigger query, it incorrectly uses "*current_user". Fixed by calling get_current_user() to get the real current user. Merged galera_create_trigger.test from github.com/codership/mysql-wsrep.
| | | * | | | | | | | | | | | | bzr merge -rtag:mariadb-10.0.15 maria/10.0Nirbhay Choubey2014-12-051-1/+1
| | | |\ \ \ \ \ \ \ \ \ \ \ \ \
| | | * \ \ \ \ \ \ \ \ \ \ \ \ \ bzr merge -r4209 maria/10.0.Nirbhay Choubey2014-05-211-0/+7
| | | |\ \ \ \ \ \ \ \ \ \ \ \ \ \
| | | * \ \ \ \ \ \ \ \ \ \ \ \ \ \ * bzr merge -rtag:mariadb-10.0.9 maria/10.0Nirbhay Choubey2014-03-261-1/+1
| | | |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix for post-merge build failures.
| | | * \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ merge with MariaDB 5.6 bzr merge lp:maria --rtag:mariadb-10.0.6Seppo Jaakola2013-12-041-60/+13
| | | |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and a number of fixes to make this buildable. Run also few short multi-master high conflict rate tests, with no issues
| | | * | | | | | | | | | | | | | | | | Merges from lp:codership-mysql/5.5 up to rev #3893, this changes to wsrep ↵Seppo Jaakola2013-11-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | API #24
| | | * | | | | | | | | | | | | | | | | Merge 10.0 to galera-10.0Jan Lindström2013-09-031-12/+43
| | | |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
| | | * | | | | | | | | | | | | | | | | | Initial merge result with mariaDB 10: lp:mariaSeppo Jaakola2013-07-131-0/+52
| | | | | | | | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | | | | | | MDEV-16385 ROW SP variable is allowed in unexpected contextAlexander Barkov2018-06-051-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem described in the bug report happened because the code did not test check_cols(1) after fix_fields() in a few places. Additionally, fix_fields() could be called multiple times for SP variables, because they are all fixed at a early stage in append_for_log(). Solution: 1. Adding a few helper methods - fix_fields_if_needed() - fix_fields_if_needed_for_scalar() - fix_fields_if_needed_for_bool() - fix_fields_if_needed_for_order_by() and using it in many cases instead of fix_fields() where the "fixed" status is not definitely known to be "false". 2. Adding DBUG_ASSERT(!fixed) into Item_splocal*::fix_fields() to catch double execution. 3. Adding tests. As a good side effect, the patch removes a lot of duplicate code (~60 lines): if (!item->fixed && item->fix_fields(..) && item->check_cols(1)) return true;
* | | | | | | | | | | | | | | | | | | | | Merge 10.2 into 10.3Marko Mäkelä2018-05-291-0/+7
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / / / / / / / / / / /
| * | | | | | | | | | | | | | | | | | | | Merge 10.1 into 10.2Marko Mäkelä2018-05-291-0/+7
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | |/ / / / / / / / / / / / / / / / / / /
| | * | | | | | | | | | | | | | | | | | | MDEV-16093 Memory leak with triggersMonty2018-05-261-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem was that blob memory allocated in Table_trigger_list was not properly freed
* | | | | | | | | | | | | | | | | | | | | Merge branch 'github/10.2' into 10.3Sergei Golubchik2018-05-221-4/+2
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / / / / / / / / / / /
| * | | | | | | | | | | | | | | | | | | | Merge branch '10.1' into 10.2Sergei Golubchik2018-05-201-4/+2
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | |/ / / / / / / / / / / / / / / / / / /
| | * | | | | | | | | | | | | | | | | | | MDEV-15347: Valgrind or ASAN errors in mysql_make_view on query from ↵Oleksandr Byelkin2018-05-151-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | information_schema Make each lex pointing to statement lex instead of global pointer in THD (no need store and restore the global pointer and put it on SP stack).