Commit graph

9401 commits

Author SHA1 Message Date
Olivier Bertrand
ed72d2d210 - Add some new tests
added:
  storage/connect/mysql-test/connect/r/datest.result
  storage/connect/mysql-test/connect/r/mrr.result
  storage/connect/mysql-test/connect/r/updelx2.result
  storage/connect/mysql-test/connect/t/datest.test
  storage/connect/mysql-test/connect/t/mrr.test
  storage/connect/mysql-test/connect/t/updelx2.test
2014-09-27 12:26:36 +02:00
Olivier Bertrand
8585a6b586 - Fix: Crash of an XCOL table when the Colname column size is too small.
Was because of buffer overrun in XCLCOL::ReadColumn.
  The Cbuf buffer was unconditionally filled Now it is limited to its size.
  This happened because this buffer was allocated according to the XCOL
  column size. It is now allocated according to the source column size.
modified:
  storage/connect/plgdbsem.h
  storage/connect/tabutil.h
  storage/connect/tabxcl.cpp
  storage/connect/tabxcl.h
2014-09-27 12:09:37 +02:00
Olivier Bertrand
6a00401a60 - Fix a compile error (MDEV-6723)
modified:
  storage/connect/tabwmi.cpp

- Was change in revision 4029 but not listed then.
modified:
  storage/connect/mysql-test/connect/r/updelx.result
2014-09-17 00:51:40 +02:00
Olivier Bertrand
a1c3656e01 - Fix MDEV-6624 (indexing on void table)
modified:
  storage/connect/ha_connect.cc

- Suppress "Position array is null" warning.
modified:
  storage/connect/filamtxt.cpp
  storage/connect/mysql-test/connect/r/part_table.result
2014-09-06 18:08:28 +02:00
Olivier Bertrand
4aac44d257 - Fix MDEV-6686 (buffer overflow in MakeRecord)
modified:
  storage/connect/ha_connect.cc
2014-09-05 14:18:31 +02:00
Olivier Bertrand
7c1af793fc - Initialise min/max buffer to 0 to avoid valgrind complaining
that uninitialised characters be written in op file.
modified:
  storage/connect/tabdos.cpp

- Typo
modified:
  storage/connect/filamap.cpp
  storage/connect/filamdbf.cpp
  storage/connect/filamdbf.h
  storage/connect/valblk.cpp
  storage/connect/xindex.cpp
2014-09-02 01:40:15 +02:00
Olivier Bertrand
16de35114e - Avoid uninitialised warning from valgrind
modified:
  storage/connect/tabdos.cpp
2014-08-29 14:22:25 +02:00
Olivier Bertrand
86a3343191 - Fix a bug in DOSFAM::OpenTableFile. Bin was not set to TRUE for blocked
tables. This caused a CR character to be left in the line and in
  particular caused the updelx test to fail on Windows.
modified:
  storage/connect/filamtxt.cpp
2014-08-27 14:56:20 +02:00
Olivier Bertrand
66ffa09491 - Fix a test failure. Due to mmap on void file being accepted on Windows
while returning an error on Linux. Now accepted on linux.
modified:
  storage/connect/maputil.cpp

- Fix a BUG in the XHUGE class. lseek64 was wrongly regarded as in error
  when returning 0 instead of -1. This produced wrong index files.
modified:
  storage/connect/filamfix.cpp
  storage/connect/maputil.cpp
  storage/connect/xindex.cpp

- Fix length mismatch (tab instead of blanks?)
modified:
  storage/connect/mysql-test/connect/r/updelx.result
2014-08-27 00:49:07 +02:00
Olivier Bertrand
8f0e75285e - Adding a test for indexed UPDATE/DELETE
added:
  storage/connect/mysql-test/connect/r/updelx.result
  storage/connect/mysql-test/connect/t/updelx.inc
  storage/connect/mysql-test/connect/t/updelx.test
2014-08-25 18:51:53 +02:00
Olivier Bertrand
da69d41a29 - Make storing and sorting values using less memory allocation
(while doing indexed UPDATE/DELETE)
modified:
  storage/connect/array.cpp
  storage/connect/filamtxt.cpp

- Force unix like line endings
modified:
  storage/connect/tabvct.h
2014-08-25 18:34:51 +02:00
Olivier Bertrand
22e8ab422c - Fix a compile error on Linux
modified:
  storage/connect/tabmul.cpp
2014-08-24 11:19:02 +02:00
Olivier Bertrand
74a4672622 - Move DataPath from the MYCAT catalog to the ha_connect handler. Indeed
it belongs to each tables and the catalog being share between several
  instances of CONNECT, when a query implied several tables belonging to
  different databases, some where pointing on the wrong database. This
  fix bugs occuring in queries such as:
  INSERT into db1.t1 select * from db2.t2;
  Where the t1 data file was made in db2.
modified:
  storage/connect/catalog.h
  storage/connect/connect.cc
  storage/connect/filamdbf.cpp
  storage/connect/filamdbf.h
  storage/connect/ha_connect.cc
  storage/connect/ha_connect.h
  storage/connect/mycat.cc
  storage/connect/mycat.h
  storage/connect/plgdbsem.h
  storage/connect/plgdbutl.cpp
  storage/connect/reldef.cpp
  storage/connect/reldef.h
  storage/connect/tabfix.h
  storage/connect/tabfmt.cpp
  storage/connect/tabfmt.h
  storage/connect/tabmul.cpp
2014-08-23 19:17:15 +02:00
Olivier Bertrand
f930f4eda9 - Add a new CONNECT global variable allowing to tell whether or not
a temporary file should be used for UPDATE/DELETE of file tables.
  Also use the "sorted" argument of index_init to help decide if
  sorting of positions must be done.
modified:
  storage/connect/checklvl.h
  storage/connect/connect.cc
  storage/connect/connect.h
  storage/connect/filamdbf.cpp
  storage/connect/filamfix.cpp
  storage/connect/filamfix.h
  storage/connect/filamtxt.cpp
  storage/connect/ha_connect.cc
  storage/connect/mysql-test/connect/r/part_table.result
  storage/connect/plgdbsem.h
  storage/connect/plgdbutl.cpp
  storage/connect/reldef.cpp
  storage/connect/tabdos.cpp
  storage/connect/tabdos.h
  storage/connect/tabfix.cpp
  storage/connect/tabfmt.cpp
  storage/connect/tabvct.cpp
  storage/connect/tabvct.h
  storage/connect/xindex.cpp

- Fix a bug in TDBASE::ColDB that caused some special columns not to
  be found in the column list and reallocated without their Value
  causing a crash of some queries.
modified:
  storage/connect/table.cpp

- Fix a bug causing RestoreNrec to be called before closing a table
  causing a wrong value given to Spos
modified:
  storage/connect/tabdos.cpp
  storage/connect/xindex.cpp

- Add a new CONNECT global variable connect_exact_info. Set to ON, it
  tells CONNECT to return exact record numbers on info queries. If OFF
  it just gives an estimate. In version 10.0.13 this was unconditionally
  ON and caused info queries on remote tables to be extremely long and
  was the subject of MDEV-6612.
modified:
  storage/connect/ha_connect.cc
  storage/connect/tabdos.cpp
  storage/connect/tabmysql.cpp
  storage/connect/tabodbc.cpp
2014-08-22 17:30:22 +02:00
Olivier Bertrand
8b9ed85b8a - Remove a gcc warning
modified:
  storage/connect/xindex.cpp
2014-08-15 18:05:10 +02:00
Olivier Bertrand
3a69c854c5 - Modifies the way indexed UPDATE/DELETE are sorted in order to execute
them sorted by file position. Firstly a new value is stored in indexes
  to know if they are sorted, preventing to do the sorting when it is not
  needed. Secondly, almost all in now done in connect instead of being
  done by the different file access method classes. This pepares the future
  use of temporary files for all table types and also fix the bug that was
  occuring when partially using a multi-column index because of false MRR
  like call of position followed by unsorted rnd_pos no more using indexing.
modified:
  storage/connect/connect.cc
  storage/connect/filamap.cpp
  storage/connect/filamap.h
  storage/connect/filamdbf.cpp
  storage/connect/filamdbf.h
  storage/connect/filamfix.cpp
  storage/connect/filamfix.h
  storage/connect/filamtxt.cpp
  storage/connect/filamtxt.h
  storage/connect/filamvct.cpp
  storage/connect/filamvct.h
  storage/connect/tabdos.cpp
  storage/connect/tabdos.h
  storage/connect/tabfix.h
  storage/connect/tabfmt.cpp
  storage/connect/tabfmt.h
  storage/connect/xindex.cpp
  storage/connect/xindex.h
  storage/connect/xtable.h
2014-08-16 16:46:35 +02:00
Olivier Bertrand
78b1bdd2ba - Update part_file.result to match the test change
modified:
  storage/connect/mysql-test/connect/r/part_file.result
2014-08-08 19:53:44 +02:00
Olivier Bertrand
61c2e7b27d - Fix MDEV-6502
modified:
  storage/connect/ha_connect.cc

- Apply Sergei's fixes
modified:
  storage/connect/filamtxt.cpp
  storage/connect/mysql-test/connect/t/part_file.test
2014-08-08 19:46:02 +02:00
Olivier Bertrand
f835588cc2 - Commiting merge files 2014-08-07 19:12:45 +02:00
Olivier Bertrand
0219ac1e98 This is a major update that fixes most of the issues and bugs that
have been created by the last addition of new CONNECT features.
The version previous to this one is a preliminary test version and
should not be distributed.

- Handle indexed UPDATE/DELETE. Previously this was just tested and
  an error message send when it could not be done. Now CONNECT can
  do it in all the cases. It is done by a MRR like tchnique by making
  a list of all update or delete to do, sort them, then execute them.
modified:
  storage/connect/array.cpp
  storage/connect/array.h
  storage/connect/filamap.cpp
  storage/connect/filamap.h
  storage/connect/filamdbf.cpp
  storage/connect/filamfix.cpp
  storage/connect/filamfix.h
  storage/connect/filamtxt.cpp
  storage/connect/filamtxt.h
  storage/connect/filamvct.cpp
  storage/connect/filamvct.h
  storage/connect/filamzip.cpp
  storage/connect/filamzip.h
  storage/connect/global.h
  storage/connect/ha_connect.cc
  storage/connect/ha_connect.h

- Differenciate Cardinality that returns a true or estimated table size
  and GetMaxSize that return a value equal or greater than the table
  row number. This fixes the errors of non matching opt files.
modified:
  storage/connect/connect.cc
  storage/connect/tabdos.cpp
  storage/connect/tabdos.h
  storage/connect/tabfix.cpp
  storage/connect/table.cpp
  storage/connect/tabmac.h
  storage/connect/tabmysql.cpp
  storage/connect/tabmysql.h
  storage/connect/tabodbc.cpp
  storage/connect/tabodbc.h
  storage/connect/tabpivot.h
  storage/connect/tabtbl.cpp
  storage/connect/tabtbl.h
  storage/connect/tabutil.cpp
  storage/connect/tabutil.h
  storage/connect/tabwmi.h
  storage/connect/xtable.h

- Fix some errors and issues when making index and opt files.
  Erase opt and index files for void tables.
  Fix wrong calculation of Block and Last in MakeBlockValues.
  Invalidate indexes before making opt file.
  Fully handle blocked variable tables. Make opt file for blocked
  variable tables even when they have no optimised colums.
modified:
  storage/connect/tabdos.cpp
  storage/connect/xindex.h

- Fix some errors making index
  Return an error when the allocation is too small (should not
  really occur now that GetMaxSize is sure)
  Don't use XXROW index for DBF tables because of soft deleted lines.
modified:
  storage/connect/xindex.cpp

- Typo
modified:
  storage/connect/macutil.cpp
  storage/connect/tabdos.h
  storage/connect/tabsys.cpp
  storage/connect/tabsys.h
2014-08-07 17:59:21 +02:00
Olivier Bertrand
b81b6d3f83 - Fix failing tests. part_file.test failure was due to a new alter flag that
were not taken in acount in check_if_supported_inplace_alter. mysql.test
  failure is strange, the suppressed warning should not be made anyway.
modified:
  storage/connect/ha_connect.cc
  storage/connect/mysql-test/connect/r/mysql.result
2014-08-05 17:01:41 +02:00
Alexander Barkov
089938cd43 Merge 10.0->10.0-connect 2014-08-04 18:17:56 +04:00
Sergey Vojtovich
82ce2a2503 MDEV-6450 - MariaDB crash on Power8 when built with advance
tool chain

Reverted addition to the original patch:
InterlockedExchangeAcquire and InterlockedAndRelease are
supported only on Itanium-based systems.
2014-08-04 11:55:38 +04:00
Sergey Vojtovich
53360fd45f MDEV-6450 - MariaDB crash on Power8 when built with advance
tool chain

This is an addition to the original patch. On Windows
InterlockedExchange implies full memory barrier, whereas
only acquire/release barriers required.
2014-07-31 14:31:05 +04:00
Jan Lindström
c39a501cbe Try to fix compiler error seen on Labrador. 2014-07-31 14:43:35 +03:00
Sergei Golubchik
3e9d4541d5 MDEV-6340 Mariadb 10.0.12 fatal "Lost connection" error w/ GCC 4.9 'Release' build; workaround ~ CFLAGS="-fno-delete-null-pointer-checks"
don't use attribute nonnull for arguments that can be null
2014-07-31 09:51:05 +02:00
Jan Lindström
c2536764d8 MDEV-6506: InnoDB: Assertion failure in thread 2810182464 in file
buf0flu.cc line 549.

Analysis: If buf_page_get_state(bpage) == BUF_BLOCK_REMOVE_HASH then
buf_page_in_file(bpage) might not be true. 

Fix: ut_a(buf_page_in_file(bpage) || buf_page_get_state(bpage) == BUF_BLOCK_REMOVE_HASH);
2014-07-31 10:32:52 +03:00
Michael Widenius
f9eeeae3c9 Fixed failing testcase 2014-07-30 23:16:49 +03:00
Michael Widenius
1a3d33c5f7 Automatic merge 2014-07-30 22:05:47 +03:00
Jan Lindström
2936bfd220 Merge revision 4244 from 5.5. Fix compiler error on sparc. 2014-07-27 08:47:37 +03:00
Jan Lindström
476feba941 Fix unnecessary printout of same writer thread more than once. Fixed
also a compiler warning.
2014-07-26 20:17:59 +03:00
Olivier Bertrand
4d0587c331 - Fix an error pointed out by Valgrind due to uninitialised Correlated
variable. This variable is not to be used by CONNECT.
modified:
  storage/connect/array.cpp
  storage/connect/array.h
2014-07-25 11:37:07 +02:00
Jan Lindström
a3acd72570 Merge InnoDB fixes from 5.5 revisions 4229, 4230, 4233, 4237 and 4238 i.e.
4229: MDEV-5670: Assertion failure in file buf0lru.c line 2355
      Add more status information if repeatable.

4230: MDEV-5673: Crash while parallel dropping multiple tables under heavy load
      Improve long semaphore wait output to include all semaphore waits
      and try to find out if there is a sequence of waiters.

4233: Fix compiler errors on product build.

4237: Fix too agressive long semaphore wait output and add guard against introducing
      compression failures on insert buffer.

4238: Fix test failure caused by simulated compression failure on
      IBUF_DUMMY table.
2014-07-25 10:30:16 +03:00
Sergey Vojtovich
6192f0bffa MDEV-6483 - Deadlock around rw_lock_debug_mutex on PPC64
This problem affects only debug builds on PPC64.

There are at least two race conditions around
rw_lock_debug_mutex_enter and rw_lock_debug_mutex_exit:

- rw_lock_debug_waiters was loaded/stored without setting
  appropriate locks/memory barriers.
- there is a gap between calls to os_event_reset() and
  os_event_wait() and in such case we're supposed to pass
  return value of the former to the latter.

Fixed by replacing self-cooked spinlocks with system mutexes.
These days system mutexes offer much better performance. OTOH
performance is not that critical for debug builds.
2014-07-24 18:12:32 +04:00
Olivier Bertrand
de3ee460da - Try to fix some test failure
modified:
  storage/connect/mysql-test/connect/t/part_table.test
2014-07-24 15:50:29 +02:00
Olivier Bertrand
c1d1dc25dd - Modif avglen calculation and add AVG_ROW_LENGTH option to test
This is to get same test results on Linux and Windows
modified:
  storage/connect/mysql-test/connect/r/part_file.result
  storage/connect/mysql-test/connect/r/part_table.result
  storage/connect/mysql-test/connect/t/part_file.test
  storage/connect/mysql-test/connect/t/part_table.test
  storage/connect/tabdos.cpp
2014-07-22 19:45:25 +02:00
Jan Lindström
a1e41e3258 MDEV-6470: Restrict number of error messages about persistent statictic tables not found
If mysql.innodb_table_stats or mysql.innodb_index_stats is not found or has
unexpected structure output that error only once and no other error for
every table trying to use them. If they do exists, then print fetch or
recalculation errors only once / table or index.
2014-07-22 19:31:45 +03:00
Olivier Bertrand
decc23cbc2 - Fix bugs in handling of remote index when updating and deleting
modified:
  storage/connect/ha_connect.cc
  storage/connect/tabdos.cpp
  storage/connect/tabfmt.cpp
  storage/connect/tabmysql.cpp

- add AVG_REC_LENGTH option to avoid result mismatch between
  Windows and Linux
modified:
  storage/connect/mysql-test/connect/r/part_file.result
  storage/connect/mysql-test/connect/r/part_table.result
  storage/connect/mysql-test/connect/t/part_file.test
2014-07-22 15:51:21 +02:00
Jan Lindström
ef67c3a239 MDEV-6443: Server crashed with assertaion failure in file ha_innodb.cc
line 8473

In case InnoDB index is not found, print the MySQL and InnoDB index
name we were trying to find and all MySQL and InnoDB index names there
is for this table.
2014-07-22 13:17:16 +03:00
Jan Lindström
fe3859cc9d MDEV-6443: Server crashed with assertaion failure in file
ha_innodb.cc line 8473

If index is not found from InnoDB make sure we print what we
were trying to find and all mysql and InnoDB index names there
is for this table.
2014-07-22 13:08:32 +03:00
Jan Lindström
0bb0230e3a MDEV-6426: Maria DB crashes randomly on creating indexes
Improve OS error messages on Windows.
2014-07-22 10:10:56 +03:00
Olivier Bertrand
26e4b69ffd - FIX errors and some gcc warnings
modified:
  storage/connect/array.cpp
  storage/connect/array.h
  storage/connect/blkfil.cpp
  storage/connect/blkfil.h
  storage/connect/filter.cpp
  storage/connect/filter.h
  storage/connect/ha_connect.cc
  storage/connect/tabdos.cpp
  
- FIX problems of DIR table on LINUX:
  The order of the result is not the same than the one on Windows
  An error occurs when no file match the pattern
  Also the row numbers may also be different (not fixed yet)
modified:
  storage/connect/mysql-test/connect/r/part_file.result
  storage/connect/mysql-test/connect/r/part_table.result
  storage/connect/mysql-test/connect/t/part_file.test
2014-07-20 20:39:17 +02:00
Olivier Bertrand
4b2092ebea This is a new version of the CONNECT storage engine. It was developed in
a sub-branch of this one and merged by pushing all the changes from it.
This version adds the following to CONNECT:

- MRR support (similar to the MyISAM one)
- Block, Remote and dynamic indexing
- Partitioning support (using the PARTITION engine)

Here is a list of the commited changes made in the sub-branch:
========================================================================

------------------------------------------------------------
revno: 4009
committer: Olivier Bertrand <bertrandop@gmail.com>
branch nick: 10.0-connect
timestamp: Thu 2014-07-17 18:13:51 +0200
message:
  This commit brings many changes, in particular two important ones:
  1) Support of partitioning by connect. A table can be partitioned
     by files, this is an enhanced MULTIPLE table. It can be also
     partitioned by sub-tables like TBL and this enables table sharding.
  2) Handling a CONNECT bug that causes in some cases extraneous rows
     to remain in the table after an UPDATE or DELETE when the command
     uses indexing (for not fixed file tables). Until a real fix is
     done, CONNECT tries to ignore indexing and if it cannot do it
     abort the command with an error message.

  - Add tests on partitioning
  added:
    storage/connect/mysql-test/connect/r/part_file.result
    storage/connect/mysql-test/connect/r/part_table.result
    storage/connect/mysql-test/connect/t/part_file.test
    storage/connect/mysql-test/connect/t/part_table.test

  - Temporary fix
  modified:
    sql/sql_partition.cc

  - Add partition support
  modified:
    storage/connect/ha_connect.cc
    storage/connect/ha_connect.h
    storage/connect/reldef.cpp
    storage/connect/reldef.h
    storage/connect/tabdos.cpp

  - Add functions ha_connect::IsUnique and ha_connect::CheckColumnList
  modified:
    storage/connect/ha_connect.cc
    storage/connect/ha_connect.h

  - Prevent updating a partition table column that is part of
    the partition function (outward tables only)
  modified:
    storage/connect/ha_connect.cc

  - Support INSERT/UPDATE/DELETE for PROXY tables
  modified:
    storage/connect/tabutil.cpp

  - Handle the bug on updating rows via indexing. Waiting for a real fix,
    Don't use indexing when possible else raise an error and abort.
  modified:
    storage/connect/ha_connect.cc

  - dbuserp->UseTemp set to TMP_AUTO
  modified:
    storage/connect/connect.cc

  - Add members nox, abort and only
  modified:
    storage/connect/ha_connect.cc
    storage/connect/ha_connect.h

  - Add arguments nox and abort to CntCloseTable
  modified:
    storage/connect/connect.cc
    storage/connect/connect.h
    storage/connect/filamap.cpp
    storage/connect/filamap.h
    storage/connect/filamdbf.cpp
    storage/connect/filamdbf.h
    storage/connect/filamfix.cpp
    storage/connect/filamfix.h
    storage/connect/filamtxt.cpp
    storage/connect/filamtxt.h
    storage/connect/filamvct.cpp
    storage/connect/filamvct.h
    storage/connect/filamzip.cpp
    storage/connect/filamzip.h
    storage/connect/ha_connect.cc

  - Add arguments abort to CloseTableFile and RenameTempFile
  modified:
    storage/connect/filamap.cpp
    storage/connect/filamap.h
    storage/connect/filamdbf.cpp
    storage/connect/filamdbf.h
    storage/connect/filamfix.cpp
    storage/connect/filamfix.h
    storage/connect/filamtxt.cpp
    storage/connect/filamtxt.h
    storage/connect/filamvct.cpp
    storage/connect/filamvct.h
    storage/connect/filamzip.cpp
    storage/connect/filamzip.h
    storage/connect/tabdos.cpp
    storage/connect/tabdos.h
    storage/connect/tabvct.cpp
    storage/connect/xtable.h

  - Fix info->records when file does not exists
  modified:
    storage/connect/connect.cc

  - Close XML table when opened for info
  modified:
    storage/connect/connect.cc

  - Add function VCTFAM::GetFileLength
  modified:
    storage/connect/filamvct.cpp
    storage/connect/filamvct.h

  - Column option DISTRIB -> ENUM
  modified:
    storage/connect/ha_connect.cc

  - Options connect, query_string and partname allways available
  modified:
    storage/connect/ha_connect.cc

  - Add function MYSQLC::GetTableSize
  modified:
    storage/connect/myconn.cpp
    storage/connect/myconn.h

  - Add new special columns (PARTNAME, FNAME, FPATH, FTYPE and FDISK)
  modified:
    storage/connect/colblk.cpp
    storage/connect/colblk.h
    storage/connect/plgdbsem.h
    storage/connect/table.cpp

  - Add function ExtractFromPath
  modified:
    storage/connect/colblk.cpp
    storage/connect/plgdbsem.h
    storage/connect/plgdbutl.cpp

  - Enhance Cardinality for some table types
  modified:
    storage/connect/tabdos.cpp
    storage/connect/tabmysql.cpp
    storage/connect/tabmysql.h
    storage/connect/tabodbc.cpp
    storage/connect/tabodbc.h
    storage/connect/tabsys.cpp
    storage/connect/tabsys.h
    storage/connect/xindex.cpp
    storage/connect/xindex.h
    storage/connect/xtable.h

  - Add test on special column
  modified:
    storage/connect/tabfmt.cpp

  - Add new files (added for block indexing)
  modified:
    storage/connect/CMakeLists.txt
------------------------------------------------------------
revno: 4007 [merge]
committer: Olivier Bertrand <bertrandop@gmail.com>
branch nick: 10.0-connect
timestamp: Sat 2014-05-31 12:31:26 +0200
message:
  - Begin adding support of partition tables
  modified:
    storage/connect/ha_connect.cc
    storage/connect/ha_connect.h
    storage/connect/reldef.cpp

  - Add INSERT/UPDATE support to PROXY tables
  modified:
    storage/connect/tabutil.cpp
    storage/connect/tabutil.h

  - Take care of SPECIAL columns
  modified:
    storage/connect/filamdbf.cpp
    storage/connect/reldef.h
    storage/connect/tabfmt.cpp

  -Typo and misc
  modified:
    storage/connect/odbconn.cpp
    storage/connect/tabfix.cpp
    storage/connect/xindex.cpp
------------------------------------------------------------
revno: 4006
committer: Olivier Bertrand <bertrandop@gmail.com>
branch nick: 10.0-connect
timestamp: Sat 2014-05-10 12:21:08 +0200
message:
  - FIX some MAP and XMAP errors (such as mapped indexes not closed)
    Do not put version in XML files header
    Remove HTON_NO_PARTITION for testing
    Fix a wrong return (instead of DBUG_RETURN) in index_init
    Plus a few typos
  modified:
    storage/connect/connect.cc
    storage/connect/filter.cpp
    storage/connect/ha_connect.cc
    storage/connect/maputil.cpp
    storage/connect/mysql-test/connect/r/alter_xml.result
    storage/connect/mysql-test/connect/r/xml.result
    storage/connect/table.cpp
    storage/connect/tabxml.cpp
    storage/connect/xindex.cpp
    storage/connect/xindex.h
    storage/connect/xtable.h
------------------------------------------------------------
revno: 4005
committer: Olivier Bertrand <bertrandop@gmail.com>
branch nick: 10.0-connect
timestamp: Fri 2014-05-02 15:55:45 +0200
message:
  - Adding fetched columns to Dynamic index key (unique only)
    Fix two bugs concerning added KXYCOL's:
    1 - Not set during reading
    2 - Val_K not set in FastFind
  modified:
    storage/connect/connect.cc
    storage/connect/filamtxt.h
    storage/connect/tabdos.cpp
    storage/connect/tabfix.cpp
    storage/connect/table.cpp
    storage/connect/valblk.h
    storage/connect/xindex.cpp
    storage/connect/xindex.h
    storage/connect/xtable.h
------------------------------------------------------------
revno: 4003
committer: Olivier Bertrand <bertrandop@gmail.com>
branch nick: 10.0-connect
timestamp: Wed 2014-04-30 10:48:29 +0200
message:
  - Implementation of adding selected columns to dynamic indexes.
  modified:
    storage/connect/connect.cc
    storage/connect/ha_connect.cc
    storage/connect/ha_connect.h
    storage/connect/tabdos.cpp
    storage/connect/tabdos.h
    storage/connect/tabvct.cpp
    storage/connect/tabvct.h
    storage/connect/xindex.cpp
    storage/connect/xindex.h
------------------------------------------------------------
revno: 4001
committer: Olivier Bertrand <bertrandop@gmail.com>
branch nick: 10.0-connect
timestamp: Sat 2014-04-26 00:17:26 +0200
message:
  - Implement dynamic indexing
  modified:
    storage/connect/connect.cc
    storage/connect/filter.cpp
    storage/connect/filter.h
    storage/connect/ha_connect.cc
    storage/connect/ha_connect.h
    storage/connect/tabdos.cpp
    storage/connect/tabdos.h
    storage/connect/table.cpp
    storage/connect/xindex.cpp
    storage/connect/xindex.h
    storage/connect/xtable.h
------------------------------------------------------------
revno: 3995
committer: Olivier Bertrand <bertrandop@gmail.com>
branch nick: 10.0-connect
timestamp: Sun 2014-03-23 18:49:19 +0100
message:
  - Work in progress
  modified:
    storage/connect/filter.h
    storage/connect/ha_connect.cc
    storage/connect/ha_connect.h
    storage/connect/mysql-test/connect/r/alter.result
    storage/connect/mysql-test/connect/r/xml.result
------------------------------------------------------------
revno: 3991
committer: Olivier Bertrand <bertrandop@gmail.com>
branch nick: 10.0-connect
timestamp: Mon 2014-03-10 18:59:36 +0100
message:
  - Adding files needed for block indexing
  added:
    storage/connect/array.cpp
    storage/connect/array.h
    storage/connect/blkfil.cpp
    storage/connect/blkfil.h
    storage/connect/filter.cpp
    storage/connect/filter.h
========================================================================
This commit of the main branch adds:

- A change needed to have the engine function check_if_supported_inplace_alter
  called for partition tables (was done manually in the sub-branch) by adding
  the preparser define: PARTITION_SUPPORTS_INPLACE_ALTER
modified:
  sql/CMakeLists.txt

- A fix concerning the FileExists function. It was needed to force the function
  table_flags to return the same flags for all partitions. This is tested by
  the partition engine and raises an error if flags are not equal.
  The way file name, table name and connection string are retrieved has been
  modified to cope with it.
modified:
  storage/connect/ha_connect.cc
  storage/connect/ha_connect.h
  storage/connect/reldef.cpp

- A few typos, such as the version string.
modified:
  storage/connect/ha_connect.cc

- Updating some test result files because some warnings are no more raised.
modified:
  storage/connect/mysql-test/connect/r/occur.result
  storage/connect/mysql-test/connect/r/part_file.result
  storage/connect/mysql-test/connect/r/pivot.result
2014-07-20 12:31:42 +02:00
Michael Widenius
f0f2072d1f Fixed problem with very slow shutdown when using 100,000 MyISAM tables with delay_key_write
Reason for the problem was that the hash of changed files in the key cache was too small (was 128). Fixed by making the hash size larger and changeable.

- Introduced key-cache-file-hash-size (default 512) for MyISAM and aria_pagecache_file_hash_size (default 512) for Aria.
- Added new status variable "Feature_delay_key_write" which counts number of tables opened that are using delay_key_write


mysql-test/r/features.result:
  Added test of Feature_delay_key_write
mysql-test/r/key_cache.result:
  Updated tests as the number of blocks has changed
mysql-test/r/mysqld--help.result:
  Updated result
mysql-test/suite/maria/maria3.result:
  Updated result
mysql-test/suite/sys_vars/r/key_cache_file_hash_size_basic.result:
  Test new variable
mysql-test/suite/sys_vars/t/aria_pagecache_file_hash_size_basic.test:
  Test new variable
mysql-test/suite/sys_vars/t/key_cache_file_hash_size_basic.test:
  Test new variable
mysql-test/t/features.test:
  Added test of Feature_delay_key_write
mysql-test/t/key_cache.test:
  Updated tests as the number of blocks has changed
mysys/mf_keycache.c:
  Made CHANGED_BLOCKS_HASH dynamic
sql/handler.cc:
  Updated call to init_key_cache()
sql/mysqld.cc:
  Added "Feature_delay_key_write"
  Added support for key-cache-file-hash-size
sql/mysqld.h:
  Added support for key-cache-file-hash-size
sql/sql_class.h:
  Added feature_files_opened_with_delayed_keys
sql/sys_vars.cc:
  Added key_cache_file_hash_size
storage/maria/ha_maria.cc:
  Added pagecache_file_hash_size
  Added counting of files with delay_key_write
storage/maria/ma_checkpoint.c:
  Fixed compiler warning
storage/maria/ma_pagecache.c:
  Made PAGECACHE_CHANGED_BLOCKS_HASH into a variable
storage/maria/ma_pagecache.h:
  Made PAGECACHE_CHANGED_BLOCKS_HASH into a variable
storage/maria/ma_rt_test.c:
  Updated parameters for init_pagecache()
storage/maria/ma_test1.c:
  Updated parameters for init_pagecache()
storage/maria/ma_test2.c:
  Updated parameters for init_pagecache()
storage/maria/ma_test3.c:
  Updated parameters for init_pagecache()
storage/maria/maria_chk.c:
  Updated parameters for init_pagecache()
storage/maria/maria_ftdump.c:
  Updated parameters for init_pagecache()
storage/maria/maria_pack.c:
  Updated parameters for init_pagecache()
storage/maria/maria_read_log.c:
  Updated parameters for init_pagecache()
storage/maria/unittest/ma_pagecache_consist.c:
  Updated parameters for init_pagecache()
storage/maria/unittest/ma_pagecache_rwconsist.c:
  Updated parameters for init_pagecache()
storage/maria/unittest/ma_pagecache_rwconsist2.c:
  Updated parameters for init_pagecache()
storage/maria/unittest/ma_pagecache_single.c:
  Updated parameters for init_pagecache()
storage/maria/unittest/ma_test_loghandler-t.c:
  Updated parameters for init_pagecache()
storage/maria/unittest/ma_test_loghandler_first_lsn-t.c:
  Updated parameters for init_pagecache()
storage/maria/unittest/ma_test_loghandler_max_lsn-t.c:
  Updated parameters for init_pagecache()
storage/maria/unittest/ma_test_loghandler_multigroup-t.c:
  Updated parameters for init_pagecache()
storage/maria/unittest/ma_test_loghandler_multithread-t.c:
  Updated parameters for init_pagecache()
storage/maria/unittest/ma_test_loghandler_noflush-t.c:
  Updated parameters for init_pagecache()
storage/maria/unittest/ma_test_loghandler_nologs-t.c:
  Updated parameters for init_pagecache()
storage/maria/unittest/ma_test_loghandler_pagecache-t.c:
  Updated parameters for init_pagecache()
storage/maria/unittest/ma_test_loghandler_purge-t.c:
  Updated parameters for init_pagecache()
storage/myisam/ha_myisam.cc:
  Added counting of files with delay_key_write
storage/myisam/mi_check.c:
  Updated call to init_key_cache()
storage/myisam/mi_test1.c:
  Updated call to init_key_cache()
storage/myisam/mi_test2.c:
  Updated call to init_key_cache()
storage/myisam/mi_test3.c:
  Updated call to init_key_cache()
storage/myisam/mi_test_all.sh:
  Fixed broken test
storage/myisam/myisam_ftdump.c:
  Updated call to init_key_cache()
storage/myisam/myisamchk.c:
  Updated call to init_key_cache()
storage/myisam/myisamlog.c:
  Updated call to init_key_cache()
2014-07-19 17:46:08 +03:00
Sergey Vojtovich
c0ebb3f388 MDEV-6450 - MariaDB crash on Power8 when built with advance tool
chain

InnoDB mutex_exit() function calls __sync_test_and_set() to release
the lock. According to manual this function is supposed to create
"acquire" memory barrier whereas in fact we need "release" memory
barrier at mutex_exit().

The problem isn't repeatable with gcc because it creates
"acquire-release" memory barrier for __sync_test_and_set().
ATC creates just "acquire" barrier.

Fixed by creating proper barrier at mutex_exit() by using
__sync_lock_release() instead of __sync_test_and_set().
2014-07-18 15:16:25 +04:00
Olivier Bertrand
6c8fbe61ea Commit merged files.
- Fix result length mismatch because an error message was modified.
modified:
  storage/connect/mysql-test/connect/r/alter.result
2014-07-17 19:28:28 +02:00
Olivier Bertrand
1904284361 This commit brings many changes, in particular two important ones:
1) Support of partitioning by connect. A table can be partitioned
   by files, this is an enhanced MULTIPLE table. It can be also
   partitioned by sub-tables like TBL and this enables table sharding.
2) Handling a CONNECT bug that causes in some cases extraneous rows
   to remain in the table after an UPDATE or DELETE when the command
   uses indexing (for not fixed file tables). Until a real fix is
   done, CONNECT tries to ignore indexing and if it cannot do it
   abort the command with an error message.

- Add tests on partitioning
added:
  storage/connect/mysql-test/connect/r/part_file.result
  storage/connect/mysql-test/connect/r/part_table.result
  storage/connect/mysql-test/connect/t/part_file.test
  storage/connect/mysql-test/connect/t/part_table.test

- Temporary fix
modified:
  sql/sql_partition.cc

- Add partition support
modified:
  storage/connect/ha_connect.cc
  storage/connect/ha_connect.h
  storage/connect/reldef.cpp
  storage/connect/reldef.h
  storage/connect/tabdos.cpp

- Add functions ha_connect::IsUnique and ha_connect::CheckColumnList
modified:
  storage/connect/ha_connect.cc
  storage/connect/ha_connect.h

- Prevent updating a partition table column that is part of
  the partition function (outward tables only)
modified:
  storage/connect/ha_connect.cc

- Support INSERT/UPDATE/DELETE for PROXY tables
modified:
  storage/connect/tabutil.cpp

- Handle the bug on updating rows via indexing. Waiting for a real fix,
  Don't use indexing when possible else raise an error and abort.
modified:
  storage/connect/ha_connect.cc

- dbuserp->UseTemp set to TMP_AUTO
modified:
  storage/connect/connect.cc

- Add members nox, abort and only
modified:
  storage/connect/ha_connect.cc
  storage/connect/ha_connect.h

- Add arguments nox and abort to CntCloseTable
modified:
  storage/connect/connect.cc
  storage/connect/connect.h
  storage/connect/filamap.cpp
  storage/connect/filamap.h
  storage/connect/filamdbf.cpp
  storage/connect/filamdbf.h
  storage/connect/filamfix.cpp
  storage/connect/filamfix.h
  storage/connect/filamtxt.cpp
  storage/connect/filamtxt.h
  storage/connect/filamvct.cpp
  storage/connect/filamvct.h
  storage/connect/filamzip.cpp
  storage/connect/filamzip.h
  storage/connect/ha_connect.cc

- Add arguments abort to CloseTableFile and RenameTempFile
modified:
  storage/connect/filamap.cpp
  storage/connect/filamap.h
  storage/connect/filamdbf.cpp
  storage/connect/filamdbf.h
  storage/connect/filamfix.cpp
  storage/connect/filamfix.h
  storage/connect/filamtxt.cpp
  storage/connect/filamtxt.h
  storage/connect/filamvct.cpp
  storage/connect/filamvct.h
  storage/connect/filamzip.cpp
  storage/connect/filamzip.h
  storage/connect/tabdos.cpp
  storage/connect/tabdos.h
  storage/connect/tabvct.cpp
  storage/connect/xtable.h

- Fix info->records when file does not exists
modified:
  storage/connect/connect.cc

- Close XML table when opened for info
modified:
  storage/connect/connect.cc

- Add function VCTFAM::GetFileLength
modified:
  storage/connect/filamvct.cpp
  storage/connect/filamvct.h

- Column option DISTRIB -> ENUM
modified:
  storage/connect/ha_connect.cc

- Options connect, query_string and partname allways available
modified:
  storage/connect/ha_connect.cc

- Add function MYSQLC::GetTableSize
modified:
  storage/connect/myconn.cpp
  storage/connect/myconn.h

- Add new special columns (PARTNAME, FNAME, FPATH, FTYPE and FDISK)
modified:
  storage/connect/colblk.cpp
  storage/connect/colblk.h
  storage/connect/plgdbsem.h
  storage/connect/table.cpp

- Add function ExtractFromPath
modified:
  storage/connect/colblk.cpp
  storage/connect/plgdbsem.h
  storage/connect/plgdbutl.cpp

- Enhance Cardinality for some table types
modified:
  storage/connect/tabdos.cpp
  storage/connect/tabmysql.cpp
  storage/connect/tabmysql.h
  storage/connect/tabodbc.cpp
  storage/connect/tabodbc.h
  storage/connect/tabsys.cpp
  storage/connect/tabsys.h
  storage/connect/xindex.cpp
  storage/connect/xindex.h
  storage/connect/xtable.h

- Add test on special column
modified:
  storage/connect/tabfmt.cpp

- Add new files (added for block indexing)
modified:
  storage/connect/CMakeLists.txt
2014-07-17 18:13:51 +02:00
Kristian Nielsen
501c56ef1e MDEV-5262, MDEV-5914, MDEV-5941, MDEV-6020: Deadlocks during parallel replication causing replication to fail.
Merge the patches into MariaDB 10.0 main.

With this patch, parallel replication will now automatically retry a
transaction that fails due to deadlock or other temporary error, same as
single-threaded replication.

We catch deadlocks with InnoDB transactions due to enforced commit order. If
T1 must commit before T2 in parallel replication and T1 ends up waiting for T2
inside InnoDB, we kill T2 and retry it later to resolve the deadlock
automatically.
2014-07-11 12:06:47 +02:00
Kristian Nielsen
5b75891b7b Fix compile failure in non-debug build. 2014-07-10 14:24:53 +02:00
Sergey Vojtovich
afbb2e2901 Coding style fixes: remove trailing spaces. 2014-07-10 12:44:20 +04:00