1. 22 May, 2018 3 commits
    • Monty's avatar
      MDEV-15308 Assertion `ha_alter_info->alter_info->drop_list.elements · 908676df
      Monty authored
      Problem was that handle_if_exists_options() didn't correct
      alter_info->flags when things was removed from the list.
      908676df
    • Monty's avatar
      MDEV-16229 Replication aborts with ER_VIEW_SELECT_TMPTABLE after half-failed RENAME · da71c1ba
      Monty authored
      Problem was that detection of temporary tables was all wrong for
      RENAME TABLE.
      (Temporary tables where opened by top level call to
      open_temporary_tables(), which can't detect if a temporary table
      was renamed to something and then reused).
      
      Fixed by adding proper parsing of rename list to check against
      the current name of a table at each rename stage.
      Also change do_rename_temporary() to check against the current
      state of temporary tables, not according to the state of start
      of RENAME TABLE.
      da71c1ba
    • Monty's avatar
      Fixes for Aria transaction handling with lock tables · 2f3779d3
      Monty authored
      MDEV-10130 Assertion `share->in_trans == 0' failed in storage/maria/ma_close.c
      MDEV-10378 Assertion `trn' failed in virtual int ha_maria::start_stmt
      
      The problem was that maria_handler->trn was not properly reset
      at commit/rollback and ha_maria::exernal_lock() could get confused
      because.
      
      There was some old code in ha_maria::implicit_commit() that tried
      to take care of this, but it was not bullet proof.
      
      Fixed by adding list of all tables that is part of the maria transaction to
      TRN.
      
      A nice side effect was of the fix is that loops in
      ha_maria::implict_commit() got to be much simpler.
      
      Other things:
      - Fixed a bug in mysql_admin_table() where argument open_for_modify
        was wrongly reset for the next table in the chain
      - rollback admin command also in case of fatal error.
      - Split _ma_set_trn_for_table() to three version to simplify code
        and debugging.
      - Several new asserts to detect the original problem (that file was
        not properly removed from trn before calling ma_close())
      2f3779d3
  2. 19 May, 2018 2 commits
  3. 18 May, 2018 1 commit
  4. 17 May, 2018 1 commit
  5. 16 May, 2018 3 commits
  6. 15 May, 2018 2 commits
    • Monty's avatar
      MDEV-14943 Alter table ORDER BY bug · b050df4f
      Monty authored
      Problem was that if copy_data_between_tables() didn't do proper
      clean up in case of failures:
      - copy object was not properly freed
      - end_bulk_insert() was not called
      - mysql_trans_prepare_alter_copy_data() set THD->transaction.on to
        false which was not properly restored
      
      The last part caused a crash in Aria as Aria depends on that THD
      is correct.
      
      Other things:
      - Reset info->switched_transactional after usage (safety)
      - Reset bulk_insert_single_undo (safety)
      b050df4f
    • Monty's avatar
      MDEV-654 Assertion `share->now_transactional' failed in flush_log_for_bitmap... · 2b749a7b
      Monty authored
      MDEV-654 Assertion `share->now_transactional' failed in flush_log_for_bitmap on concurrent workload with Aria tables
      
      Problem was that we the bitmap needs to be flushed before disabling
      logging of redo entires, as writing the bitmap to disk by
      background checkpoint may cause redo entries.
      2b749a7b
  7. 11 May, 2018 4 commits
    • Sachin Agarwal's avatar
      Bug #26334149 - MYSQL CRASHES WHEN FULL TEXT INDEXES IBD FILES ARE ORPHANED DUE TO RENAME TABLE · 197bf0fe
      Sachin Agarwal authored
      Problem:
      When FTS index is added into a table which doesn't have 'FTS_DOC_ID'
      column, Innodb rebuilds table to add column 'FTS_DOC_ID'. when this FTS
      index is dropped from this table. Innodb doesn't not rebuild table to
      remove 'FTS_DOC_ID' column and deletes FTS index auxiliary tables.
      But it doesn't delete FTS common auxiliary tables.
      Later when the database having this table is renamed, FTS auxiliary
      tables are not renamed because table's flags2 (dict_table_t.flags2)
      has been resetted for DICT_TF2_FTS flag during FTS index drop operation.
      Now when we drop old database, it leads to an assert.
      
      Fix:
      During renaming of FTS auxiliary tables, ORed a condition to check if
      table has DICT_TF2_FTS_HAS_DOC_ID flag set.
      
      RB: 18769
      Reviewed by : Jimmy.Yang@oracle.com
      197bf0fe
    • Thirunarayanan Balathandayuthapani's avatar
      Bug #27041445 SERVER ABORTS IF FTS_DOC_ID EXCEEDS FTS_DOC_ID_MAX_STEP · 9c03ba8f
      Thirunarayanan Balathandayuthapani authored
      Problem:
      =======
      Multiple insert statement in table contains FULLTEXT KEY and a
      FTS_DOC_ID column aborts the server if the FTS_DOC_ID exceeds
      FTS_DOC_ID_MAX_STEP.
      
      Solution:
      ========
      Remove the exception for first committed insert statement.
      
      Reviewed-by: Jimmy Yang<jimmy.yang@oracle.com>
      RB: 18023
      9c03ba8f
    • Marko Mäkelä's avatar
      Merge 5.5 into 10.0 (no changes) · c70fc6b1
      Marko Mäkelä authored
      c70fc6b1
    • Marko Mäkelä's avatar
      Remove a redundant condition added by the 5.6.40 merge · 580a8061
      Marko Mäkelä authored
      When Oracle fixed MDEV-13899 in their own way, they moved the
      condition to the only caller of PageConverter::update_records().
      Thus, the merge of 5.6.40 into MariaDB added a redundant condition.
      
      PageConverter::update_records(): Move the page_is_leaf() condition
      to the only caller, PageConverter::update_index_page().
      580a8061
  8. 10 May, 2018 2 commits
  9. 09 May, 2018 1 commit
    • Marko Mäkelä's avatar
      MDEV-16119 InnoDB lock->index refers to a freed object after failed ADD INDEX · 4f42f0d1
      Marko Mäkelä authored
      The problem is hard to repeat, and I failed to create a deterministic
      test case. Online index creation creates stubs for to-be-created indexes.
      If index creation fails, we could remove these stubs while locks exist
      in the indexes. (This would require that the index creation was completed,
      and a concurrent DML operation acquired a lock on a record in the
      uncommitted index. If a duplicate key error occurs in an uncommitted
      index, the error will be reported for the CREATE UNIQUE INDEX, not for
      the DML operation that tried to insert the duplicate.)
      
      dict_table_try_drop_aborted(), row_merge_drop_indexes(): If transactional
      locks exist on the table, keep the table->indexes intact.
      4f42f0d1
  10. 08 May, 2018 2 commits
  11. 07 May, 2018 2 commits
  12. 04 May, 2018 3 commits
  13. 03 May, 2018 4 commits
  14. 01 May, 2018 1 commit
  15. 30 Apr, 2018 2 commits
  16. 28 Apr, 2018 1 commit
  17. 27 Apr, 2018 1 commit
  18. 26 Apr, 2018 5 commits
    • Elena Stepanova's avatar
      d6dbe8e2
    • Sergei Golubchik's avatar
      Merge branch 'merge-pcre' into 10.0 · 48636f09
      Sergei Golubchik authored
      48636f09
    • Sergei Golubchik's avatar
      Squashed commit of connect/10.0: · 5ae2656b
      Sergei Golubchik authored
      commit c545d544378483bf68c4fb713cd4ec872d0df2c4
      Author: Olivier Bertrand <bertrandop@gmail.com>
      Date:   Tue Mar 27 23:13:14 2018 +0200
      
          - Fix MDEV-15577 CONNECT engine JDBC remote index prevents UPDATE
            Fixed in TDBJDBC::OpenDB because query can be null for updates
            modified:   storage/connect/tabjdbc.cpp
      
      commit c4f1fe2e8e74566e9c3296f435448d9f5c718b23
      Author: Olivier Bertrand <bertrandop@gmail.com>
      Date:   Wed Mar 14 12:21:17 2018 +0100
      
          - Fix MDEV-15429 CONNECT engine JDBC handling Postgresql UUID type
            Also handle Postgresql sending type VARCHAR for TEXT column and
            setting length to b x7FFFFFF when the length is unknown.
            modified:   storage/connect/Client.java
            modified:   storage/connect/JavaWrappers.jar
            modified:   storage/connect/JdbcInterface.java
            modified:   storage/connect/PostgresqlInterface.java
            modified:   storage/connect/global.h
            modified:   storage/connect/ha_connect.cc
            modified:   storage/connect/jdbconn.cpp
            modified:   storage/connect/jdbconn.h
            modified:   storage/connect/mysql-test/connect/r/jdbc_postgresql.result
            modified:   storage/connect/mysql-test/connect/t/jdbc_postgresql.test
            modified:   storage/connect/mysql-test/connect/t/jdbconn.inc
            modified:   storage/connect/plgdbsem.h
            modified:   storage/connect/tabjdbc.cpp
            modified:   storage/connect/tabjdbc.h
            added:      storage/connect/mysql-test/connect/std_data/JavaWrappers.jar
      
      commit 3068bb4882a316c6c32c624609db2bf24ae3ad40
      Author: Olivier Bertrand <bertrandop@gmail.com>
      Date:   Mon Feb 26 19:40:27 2018 +0100
      
          Revert to old cmake file to avoid compile error
      
      commit da8c1c0bd6a327fd03bd321be3170f468122ef67
      Author: Olivier Bertrand <bertrandop@gmail.com>
      Date:   Mon Feb 26 16:13:39 2018 +0100
      
          - Remove warning on not used tabtyp variable in connect_assisted_discovery
            modified:   storage/connect/ha_connect.cc
      
          - Fix a bug causing CONNECT to loop when expanding a JSON column
            when the expanded column value is null or void array.
          - Adding the FullArray option to JSON tables.
          - Skipping expanded JSON lines when the expanded column value is null.
            modified:   storage/connect/connect.cc
            modified:   storage/connect/tabdos.h
            modified:   storage/connect/tabjson.cpp
            modified:   storage/connect/tabjson.h
      
          - Fix MDEV-13353 No file privilege for ODBC, JDBC, MONGO, MAC, WMI file types.
            modified:   storage/connect/ha_connect.cc
      
          - Make some Json UDFs  to accept a non JSON item as 1st parameter.
            modified:   storage/connect/json.cpp
            modified:   storage/connect/json.h
            modified:   storage/connect/jsonudf.cpp
            modified:   storage/connect/jsonudf.h
      
          - Update Json UDF tests to cope with above changes.
            modified:   storage/connect/mysql-test/connect/r/json_udf.result
            modified:   storage/connect/mysql-test/connect/r/json_udf_bin.result
            modified:   storage/connect/mysql-test/connect/r/vcol.result
            modified:   storage/connect/mysql-test/connect/t/json_udf.test
            modified:   storage/connect/mysql-test/connect/t/vcol.test
      
          - Fix some compiler warning treated as error
            PlugSubAlloc no more exported because it does throw.
            modified:   storage/connect/global.h
            modified:   storage/connect/ha_connect.cc
            modified:   storage/connect/jsonudf.cpp
            modified:   storage/connect/tabjson.cpp
            modified:   storage/connect/tabjson.h
      
          - Other files modified (?) when going back to wrong merge
            modified:   storage/connect/CMakeLists.txt
            modified:   storage/connect/array.cpp
            modified:   storage/connect/colblk.cpp
            modified:   storage/connect/connect.cc
            modified:   storage/connect/csort.cpp
            modified:   storage/connect/domdoc.cpp
            modified:   storage/connect/filamap.cpp
            modified:   storage/connect/filamgz.cpp
            modified:   storage/connect/filamtxt.cpp
            modified:   storage/connect/filamzip.cpp
            modified:   storage/connect/filter.cpp
            modified:   storage/connect/fmdlex.c
            modified:   storage/connect/jdbconn.cpp
            modified:   storage/connect/macutil.cpp
            modified:   storage/connect/myconn.cpp
            modified:   storage/connect/odbconn.cpp
            modified:   storage/connect/plgdbutl.cpp
            modified:   storage/connect/plugutil.cpp
            modified:   storage/connect/preparse.h
            modified:   storage/connect/rcmsg.c
            modified:   storage/connect/rcmsg.h
            modified:   storage/connect/reldef.cpp
            modified:   storage/connect/tabdos.cpp
            modified:   storage/connect/tabfmt.cpp
            modified:   storage/connect/tabmac.cpp
            modified:   storage/connect/tabmul.cpp
            modified:   storage/connect/tabmysql.cpp
            modified:   storage/connect/tabmysql.h
            modified:   storage/connect/tabodbc.cpp
            modified:   storage/connect/tabtbl.cpp
            modified:   storage/connect/tabxml.cpp
            modified:   storage/connect/value.cpp
            modified:   storage/connect/xobject.cpp
      
      commit 5095628b31ed8c94bd7c794c6b0162894a9040b1
      Author: Olivier Bertrand <bertrandop@gmail.com>
      Date:   Tue Feb 13 14:29:00 2018 +0100
      
          - Fix a bug causing CONNECT to loop when expanding a JSON column
            when the expanded column value is null or void array.
          - Adding the FullArray option to JSON tables.
          - Skipping expanded JSON lines when the expanded column value is null.
            modified:   storage/connect/connect.cc
            modified:   storage/connect/tabdos.h
            modified:   storage/connect/tabjson.cpp
            modified:   storage/connect/tabjson.h
      
      commit 9896174328da42016735630c893fd09eb128b48e
      Author: Olivier Bertrand <bertrandop@gmail.com>
      Date:   Fri Feb 2 15:48:57 2018 +0100
      
          - Remove warning on not used tabtyp variable in connect_assisted_discovery
            modified:   storage/connect/ha_connect.cc
      
      commit d7e254c05f88173eb04d8dafc813013eb42ccdbe
      Author: Olivier Bertrand <bertrandop@gmail.com>
      Date:   Wed Jan 31 14:42:45 2018 +0100
      
          - Use delayed load for the MongoDB C Drive on Windows
            modified:   storage/connect/CMakeLists.txt
            modified:   storage/connect/cmgoconn.cpp
            modified:   storage/connect/ha_connect.cc
      
          - Add FORCE to the connect_type_conv enum values
            This will translate binary values to TYPE_STRING
            modified:   storage/connect/checklvl.h
            modified:   storage/connect/ha_connect.cc
            modified:   storage/connect/odbconn.cpp
      
          - Change the connect_xtrace variable to from int to set
            modified:   storage/connect/array.cpp
            modified:   storage/connect/blkfil.cpp
            modified:   storage/connect/block.h
            modified:   storage/connect/cmgoconn.cpp
            modified:   storage/connect/colblk.cpp
            modified:   storage/connect/connect.cc
            modified:   storage/connect/filamap.cpp
            modified:   storage/connect/filamdbf.cpp
            modified:   storage/connect/filamfix.cpp
            modified:   storage/connect/filamgz.cpp
            modified:   storage/connect/filamtxt.cpp
            modified:   storage/connect/filamvct.cpp
            modified:   storage/connect/filamzip.cpp
            modified:   storage/connect/filter.cpp
            modified:   storage/connect/global.h
            modified:   storage/connect/ha_connect.cc
            modified:   storage/connect/inihandl.cpp
            modified:   storage/connect/javaconn.cpp
            modified:   storage/connect/jdbconn.cpp
            modified:   storage/connect/jmgfam.cpp
            modified:   storage/connect/jmgoconn.cpp
            modified:   storage/connect/json.cpp
            modified:   storage/connect/jsonudf.cpp
            modified:   storage/connect/libdoc.cpp
            modified:   storage/connect/mongo.cpp
            modified:   storage/connect/mycat.cc
            modified:   storage/connect/myconn.cpp
            modified:   storage/connect/odbconn.cpp
            modified:   storage/connect/plgdbutl.cpp
            modified:   storage/connect/plugutil.cpp
            modified:   storage/connect/reldef.cpp
            modified:   storage/connect/tabcol.cpp
            modified:   storage/connect/tabdos.cpp
            modified:   storage/connect/tabext.cpp
            modified:   storage/connect/tabfix.cpp
            modified:   storage/connect/tabfmt.cpp
            modified:   storage/connect/tabjdbc.cpp
            modified:   storage/connect/tabjson.cpp
            modified:   storage/connect/table.cpp
            modified:   storage/connect/tabmul.cpp
            modified:   storage/connect/tabmysql.cpp
            modified:   storage/connect/tabodbc.cpp
            modified:   storage/connect/tabpivot.cpp
            modified:   storage/connect/tabsys.cpp
            modified:   storage/connect/tabtbl.cpp
            modified:   storage/connect/tabutil.cpp
            modified:   storage/connect/tabvct.cpp
            modified:   storage/connect/tabwmi.cpp
            modified:   storage/connect/tabxml.cpp
            modified:   storage/connect/user_connect.cc
            modified:   storage/connect/valblk.cpp
            modified:   storage/connect/value.cpp
            modified:   storage/connect/xindex.cpp
      
          - Restore connect_enable_mongo variable (but undocumented)
            modified:   storage/connect/ha_connect.cc
            modified:   storage/connect/mycat.cc
            modified:   storage/connect/mysql-test/connect/r/json_java_2.result
            modified:   storage/connect/mysql-test/connect/r/json_java_3.result
            modified:   storage/connect/mysql-test/connect/r/json_mongo_c.result
            modified:   storage/connect/mysql-test/connect/r/mongo_c.result
            modified:   storage/connect/mysql-test/connect/r/mongo_java_2.result
            modified:   storage/connect/mysql-test/connect/r/mongo_java_3.result
            modified:   storage/connect/mysql-test/connect/r/tbl_thread.result
            modified:   storage/connect/mysql-test/connect/t/mongo.inc
            modified:   storage/connect/mysql-test/connect/t/mongo_test.inc
            modified:   storage/connect/mysql-test/connect/t/tbl_thread.test
      5ae2656b
    • Sergei Golubchik's avatar
      1bd33ca8
    • Sergei Golubchik's avatar
      c74848ba