1. 10 Oct, 2017 3 commits
    • sjaakola's avatar
      MW-416 DDL replication moved after acl checking · 0b5a5258
      sjaakola authored
      galera_events test shows a regression with the original fix for MW-416
      Reason was that Events::drop_event() can be called also from inside event
      execution, and there we have a speacial treatment for event, which executes
      "DROP EVENT" statement, and runs TOI replication inside the event processing body.
      This resulted in executing WSREP_TO_ISOLATION two times for such DROP EVENT statement.
      Fix is to call WSREP_TO_ISOLATION_BEGIN only in Events::drop_event()
      0b5a5258
    • sjaakola's avatar
      MW-416 · 70c23321
      sjaakola authored
      Changed return code for replicatio error to TRUE.
      This is aligned with native mysql convention to return TRUE (defined to 1) or FALSE (defined to 0) from a bool function.
      This is wrong, but follows the mysql conventiosn, at least...
      70c23321
    • sjaakola's avatar
      MW-416 · 1841ef1c
      sjaakola authored
      Moved TOI replication to happen after ACL checking for commands:
      SQLCOM_CREATE_EVENT
      SQLCOM_ALTER_EVENT
      SQLCOM_DROP_EVENT
      SQLCOM_CREATE_VIEW
      SQLCOM_CREATE_TRIGGER
      SQLCOM_DROP_TRIGGER
      SQLCOM_INSTALL_PLUGIN
      SQLCOM_UNINSTALL_PLUGIN
      1841ef1c
  2. 09 Oct, 2017 2 commits
    • Marko Mäkelä's avatar
      MDEV-14023 10.1 InnoDB tables with virtual columns cannot be accessed in 10.2 · e1d9a237
      Marko Mäkelä authored
      MariaDB 10.1 introduced non-indexed virtual columns for InnoDB tables.
      When MySQL 5.7 introduced virtual columns in InnoDB tables, it also
      introduced the table SYS_VIRTUAL that stores metadata on virtual
      columns. This table does not initially exist in data files that were
      imported from 10.1. So, we do not always have virtual column metadata
      inside InnoDB.
      
      dict_index_contains_col_or_prefix(): In the clustered index records,
      all non-virtual columns are present and no virtual columns are present.
      
      ha_innobase::build_template(): In the clustered index, do not
      include virtual columns in the query template. The SQL layer is
      supposed to compute the virtual column values when needed.
      e1d9a237
    • Marko Mäkelä's avatar
      btr_free_root(): Relax a too strict debug assertion · 3edd007c
      Marko Mäkelä authored
      When btr_create() invokes btr_free_root() after running out of space,
      fseg_create() would have acquired an SX-latch on the root page, not
      an X-latch. Relax the debug assertion in btr_free_root() accordingly.
      
      (In this case, SX-latch and X-latch are equivalent. During the CREATE
      operation there should be MDL_EXCLUSIVE and dict_operation_lock X-latch
      preventing concurrent access to the index. Normally the purpose of the
      SX-latch is to allow concurrent reads of the root page while certain
      fields in the root page are updated in place.)
      3edd007c
  3. 07 Oct, 2017 7 commits
  4. 06 Oct, 2017 5 commits
    • Marko Mäkelä's avatar
      MDEV-13512 buf_flush_update_zip_checksum() corrupts SPATIAL INDEX in ROW_FORMAT=COMPRESSED tables · f9b50c06
      Marko Mäkelä authored
      In MariaDB Server 10.1, this problem manifests itself only as
      a debug assertion failure in page_zip_decompress() when an insert
      requires a page to be decompressed.
      
      In MariaDB 10.1, the encryption of InnoDB data files repurposes the
      previously unused field FILE_FLUSH_LSN for an encryption key version.
      This field was only used in the first page of each file of the system
      tablespace. For ROW_FORMAT=COMPRESSED tables, the field was always
      written as 0 until encryption was implemented.
      
      There is no bug in the encryption, because the buffer pool blocks will
      not be written to files. Instead, copies of the blocks will be encrypted.
      In these encrypted copies, the key version field will be updated before
      the buffer is written to the file. The field in the buffer pool is
      basically garbage that does not really matter.
      
      Already in MariaDB 10.0, the memset() calls to reset this unused field
      in buf_flush_update_zip_checksum() and buf_flush_write_block_low()
      are unnecessary, because fsp_init_file_page_low() would guarantee that
      the field is always 0 in the buffer pool (unless 10.1 encryption is
      used).
      
      Removing the unnecessary memset() calls makes page_zip_decompress()
      happy and will prevent a SPATIAL INDEX corruption bug in
      MariaDB Server 10.2. In MySQL 5.7.5, as part of WL#6968, the same
      field was repurposed for an R-tree split sequence number (SSN) and
      these memset() were removed. (Because of the repurposing, MariaDB
      encryption is not available for tables that contain SPATIAL INDEX.)
      f9b50c06
    • Alexander Barkov's avatar
      MDEV-11586 UNION of FLOAT type results in erroneous precision · a659291e
      Alexander Barkov authored
      Fixing the asymmetry in the array field_types_merge_rules[][]
      which caused data loss when mixing FLOAT + BIGINT in UNIONs
      or hybrid functions:
      
      1. FLOAT  + INT    = DOUBLE
      2. FLOAT  + BIGINT = FLOAT
      3. INT    + FLOAT  = DOUBLE
      4. BIGINT + FLOAT  = DOUBLE
      
      Now FLOAT + BIGINT (as in #2) also produces DOUBLE, like the cases #1,#3,#4 do.
      a659291e
    • Alexey Botchkov's avatar
      MDEV-12312 JSON_CONTAINS_PATH does not detect invalid path and returns · 3557de68
      Alexey Botchkov authored
      TRUE.
      
              Let's make empty brackets to be the syntax error in the JSON
              paths.
      3557de68
    • Alexey Botchkov's avatar
      MDEV-13703 Illegal mix of collations for operation 'json_object' on · a3ba8c36
      Alexey Botchkov authored
      using JSON_UNQUOTE as an argument.
      
              The coercibility and repertoire should be set properly for the
              JSON_UNQUOTE.
      a3ba8c36
    • Marko Mäkelä's avatar
      41e581b3
  5. 05 Oct, 2017 4 commits
  6. 04 Oct, 2017 5 commits
  7. 03 Oct, 2017 7 commits
  8. 02 Oct, 2017 7 commits