mariadb/libmysqld
Alexander Barkov d63631c3fa MDEV-19632 Replication aborts with ER_SLAVE_CONVERSION_FAILED upon CREATE ... SELECT in ORACLE mode
- Adding optional qualifiers to data types:
    CREATE TABLE t1 (a schema.DATE);
  Qualifiers now work only for three pre-defined schemas:

    mariadb_schema
    oracle_schema
    maxdb_schema

  These schemas are virtual (hard-coded) for now, but may turn into real
  databases on disk in the future.

- mariadb_schema.TYPE now always resolves to a true MariaDB data
  type TYPE without sql_mode specific translations.

- oracle_schema.DATE translates to MariaDB DATETIME.

- maxdb_schema.TIMESTAMP translates to MariaDB DATETIME.

- Fixing SHOW CREATE TABLE to use a qualifier for a data type TYPE
  if the current sql_mode translates TYPE to something else.

The above changes fix the reported problem, so this script:

    SET sql_mode=ORACLE;
    CREATE TABLE t2 AS SELECT mariadb_date_column FROM t1;

is now replicated as:

    SET sql_mode=ORACLE;
    CREATE TABLE t2 (mariadb_date_column mariadb_schema.DATE);

and the slave can unambiguously treat DATE as the true MariaDB DATE
without ORACLE specific translation to DATETIME.

Similar,

    SET sql_mode=MAXDB;
    CREATE TABLE t2 AS SELECT mariadb_timestamp_column FROM t1;

is now replicated as:

    SET sql_mode=MAXDB;
    CREATE TABLE t2 (mariadb_timestamp_column mariadb_schema.TIMESTAMP);

so the slave treats TIMESTAMP as the true MariaDB TIMESTAMP
without MAXDB specific translation to DATETIME.
2020-08-01 07:43:50 +04:00
..
examples Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
client_settings.h Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
CMakeLists.txt MDEV-19632 Replication aborts with ER_SLAVE_CONVERSION_FAILED upon CREATE ... SELECT in ORACLE mode 2020-08-01 07:43:50 +04:00
emb_qcache.cc Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
emb_qcache.h Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
embedded_priv.h Update FSF Address 2019-05-11 21:29:06 +03:00
lib_sql.cc Merge branch '10.2' into 10.3 2019-09-03 13:17:32 +03:00
libmysql.c Fixed errors found by MSAN 2020-07-02 23:50:56 +03:00
libmysqld.c Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
libmysqld.def merge with 5.3 2011-10-19 21:45:18 +02:00
libmysqld.rc query_id and my_xid -> ulonglong 2005-01-27 22:38:56 +01:00
resource.h query_id and my_xid -> ulonglong 2005-01-27 22:38:56 +01:00