summaryrefslogtreecommitdiff
path: root/sql/sql_insert.h
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-23691 S3 storage engine: delayed slave can drop the tableMonty2020-10-211-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | This commit fixed the problems with S3 after the "DROP TABLE FORCE" changes. It also fixes all failing replication S3 tests. A slave is delayed if it is trying to execute replicated queries on a table that is already converted to S3 by the master later in the binlog. Fixes for replication events on S3 tables for delayed slaves: - INSERT and INSERT ... SELECT and CREATE TABLE are ignored but written to the binary log. UPDATE & DELETE will be fixed in a future commit. Other things: - On slaves with --s3-slave-ignore-updates set, allow S3 tables to be opened in read-write mode. This was done to be able to ignore-but-replicate queries like insert. Without this change any open of an S3 table failed with 'Table is read only' which is too early to be able to replicate the original query. - Errors are now printed if handler::extra() call fails in wait_while_tables_are_used(). - Error message for row changes are changed from HA_ERR_WRONG_COMMAND to HA_ERR_TABLE_READONLY. - Disable some maria_extra() calls for S3 tables. This could cause S3 tables to fail in some cases. - Added missing thr_lock_delete() to ma_open() in case of failure. - Removed from mysql_prepare_insert() the not needed argument 'table'.
* MDEV-22925 ALTER TABLE s3_table ENGINE=Aria can cause failure on slaveMonty2020-06-191-1/+1
| | | | | | | | | | | | | | | | | | | | | When converting a table (test.s3_table) from S3 to another engine, the following will be logged to the binary log: DROP TABLE IF EXISTS test.t1; CREATE OR REPLACE TABLE test.t1 (...) ENGINE=new_engine INSERT rows to test.t1 in binary-row-log-format The bug is that the above statements are logged one by one to the binary log. This means that a fast slave, configured to use the same S3 storage as the master, would be able to execute the DROP and CREATE from the binary log before the master has finished the ALTER TABLE. In this case the slave would ignore the DROP (as it's on a S3 table) but it will stop on CREATE of the local tale, as the table is still exists in S3. The REPLACE part will be ignored by the slave as it can't touch the S3 table. The fix is to ensure that all the above statements is written to binary log AFTER the table has been deleted from S3.
* forbid REPLACE/ODKU on tables containing WITHOUT OVERLAPSNikita Malyavin2020-03-311-0/+2
|
* Added support for replication for S3Monty2020-03-241-0/+2
| | | | | | | | | | | | | | | | | MDEV-19964 S3 replication support Added new configure options: s3_slave_ignore_updates "If the slave has shares same S3 storage as the master" s3_replicate_alter_as_create_select "When converting S3 table to local table, log all rows in binary log" This allows on to configure slaves to have the S3 storage shared or independent from the master. Other thing: Added new session variable '@@sql_if_exists' to force IF_EXIST to DDL's.
* MDEV-10014 Add RETURNING to INSERTSergei Golubchik2019-10-141-1/+2
| | | | | | | | post-review fixes: * test for dependent subqueries * test for triggers and routines * disallow INSERT...RETURNING in triggers and stored functions * don't return anything if INSERT IGNORE ignored an error
* MDEV-10014 Add RETURNING to INSERTRucha Deodhar2019-10-141-1/+1
| | | | Closes #1384
* Merge 10.2 into 10.3Marko Mäkelä2019-05-141-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
* | | IB: 0.2 part IIIAleksey Midenkov2017-05-051-1/+1
| | | | | | | | | | | | | | | | | | | | | * versioned DML: INSERT, UPDATE, DELETE; * general refactoring and fixes. Warning: breaks 'insert' and 'update' tests since they require part IV.
* | | 0.1: SQL-level System VersioningDaniel Fiala2017-05-051-0/+1
|/ /
* | MDEV-11698 Old Bug possibly not fixed; BEFORE INSERT Trigger on NOT NULLSergei Golubchik2017-01-171-2/+1
| | | | | | | | | | | | | | | | check_that_all_fields_are_given_values() relied on write_set, but was run too early, before triggers updated write_set. also, when triggers are present, fields might get values conditionally, so we need to check that all fields are given values for every row.
* | MDEV-9095: Executing triggers on slave in row-based replicationunknown2014-03-191-1/+0
|/
* Updated/added copyright headersKent Boortz2011-06-301-1/+1
|
* WL#5030: Split and remove mysql_priv.hMats Kindahl2010-03-311-0/+49
This patch: - Moves all definitions from the mysql_priv.h file into header files for the component where the variable is defined - Creates header files if the component lacks one - Eliminates all include directives from mysql_priv.h - Eliminates all circular include cycles - Rename time.cc to sql_time.cc - Rename mysql_priv.h to sql_priv.h