Commit graph

89025 commits

Author SHA1 Message Date
Jan Lindström
2936bfd220 Merge revision 4244 from 5.5. Fix compiler error on sparc. 2014-07-27 08:47:37 +03:00
Sergei Golubchik
1987819281 MDEV-6428 [PATCH] MariaDB start script doesn't realize failure of MariaDB startup
abort the wait loop if mysqld_safe is not running
2014-07-26 23:08:38 +02:00
Jan Lindström
42b9758814 Fix compiler error on sparc. 2014-07-27 08:44:45 +03:00
Jan Lindström
8ae267400c Fix InnoDB: Assertion failure in thread 2868898624 in file buf0lru.c line 1000
InnoDB: Failing assertion: mutex_own(&buf_pool->LRU_list_mutex)

and

InnoDB: Assertion failure in thread 2868898624 in file buf0lru.c line 1077
InnoDB: Failing assertion: mutex_own(&buf_pool->LRU_list_mutex)

Analysis: Function buf_LRU_free_block might release LRU_list_mutex on
same cases to avoid mutex order problems, we need to take it back 
before accessing list.
2014-07-26 21:14:21 +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
Sergey Vojtovich
35c78a1fcf MDEV-6489 - rpl.rpl_insert, rpl.rpl_insert_delayed and
main.mysqlslap fail on PPC64

There seem to be a bug on Power8 which doesn't guarantee
a signal to be delivered to waiting thread if broadcast
is called outside of mutex.

For now workaround it by calling broadcast while mutex is
still held.
2014-07-25 17:02:47 +04:00
Sergei Golubchik
be667b8c42 MDEV-5706 MariaDB does not build on hurd-i386
backport from 10.0 the fix for:
  MDEV-5756 CMake option to build without thread pool
2014-07-25 14:15:33 +02: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
Sergei Golubchik
44aacfc5c3 fix remaining warnings in manpages (for debian lint ?) 2014-07-24 09:51:51 +02:00
Sergei Golubchik
8fc3724421 MDEV-5958 Inconsitent handling of invalid arguments for mysqld_safe
issue an error for unrecognized options in the [mysqld_safe] section of my.cnf
but don't abort the script
2014-07-23 21:44:35 +02:00
Sergei Golubchik
4e6e720160 MDEV-6290 Crash in KILL HARD QUERY USER x@y when slave threads are running
KILL USER should ignore system threads where sctx->user=sctx->host=NULL
2014-07-23 19:36:15 +02:00
Sergei Golubchik
1907bf042a MDEV-6409 CREATE VIEW replication problem if error occurs in mysql_register_view
fix by Sriram Patil
2014-07-23 12:01:05 +02:00
Jan Lindström
c104965746 Fix test failure caused by simulated compression failure on
IBUF_DUMMY table.
2014-07-25 09:34:05 +03:00
Jan Lindström
7bf45bec54 Fix too agressive long semaphore wait output and add guard against introducing
compression failures on insert buffer.
2014-07-24 14:35:09 +03:00
Sergey Petrunya
06655a192d MDEV-6322: The PARTITION engine can return wrong query results
MySQL Bug#71095: Wrong results with PARTITION BY LIST COLUMNS()
MySQL Bug#72803: Wrong "Impossible where" with LIST partitioning
MDEV-6240: Wrong "Impossible where" with LIST partitioning
- Backprot the fix from MySQL Bug#71095.
2014-07-23 22:48:31 +04:00
Sergey Petrunya
6b353dd1de MDEV-6289 : Unexpected results when querying information_schema
- When traversing JOIN_TABs with first_linear_tab/next_linear_tab(), don't forget
  to enter the semi-join nest when it is the first table in the join order.
  Failure to do so could cause e.g. I_S tables not to be filled.
2014-07-23 19:53:29 +04:00
Alexander Barkov
07cb53c58b Merge 5.3->5.5 2014-07-23 14:59:23 +04:00
Jan Lindström
be00265557 Fix compiler errors on product build. 2014-07-23 13:52:17 +03:00
Alexander Barkov
80708da138 MDEV-5750 Assertion `ltime->year == 0' fails on a query with EXTRACT DAY_MINUTE and TIME column
Item_func_min_max::get_date() did not clear ltime->year when returning a TIME value.
2014-07-23 13:38:48 +04:00
Sergey Vojtovich
d466ed90fd MDEV-6473 - main.statistics fails on PPC64
mysql.column_stats wasn't stored/restored properly on big-endian
with histogram_type=DOUBLE_PREC_HB.

Store histogram values using int2store()/uint2korr().

Note that this patch invalidates previously calculated histogram
values on big-endian.
2014-07-23 12:55:26 +04: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
Alexey Botchkov
15a529e128 gis-precise.test fixed to work on Power8. 2014-07-22 15:28:15 +05:00
Sergey Vojtovich
2b61466733 MDEV-6469 - rpl.rpl_gtid_basic, rpl.rpl_gtid_stop_start,
rpl.rpl_gtid_crash fail on PPC64

GTID order in @@gtid_binlog_pos depends on internal hash order,
so requires to be hidden for stable test output.
2014-07-22 14:54:38 +04: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
Alexey Botchkov
4ad2abc55b MDEV-5756 CMake option to build without thread pool.
Check if the threadpool is available on the system and set HAVE_POOL_OF_THREADS respectively.
2014-07-22 10:49:28 +05: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
Alexey Botchkov
dd1d92122b gis-precise test fixed to pass on Power8. 2014-07-21 13:07:48 +05:00
Sergey Vojtovich
7e02ba555e MDEV-6465 - rpl.rpl_gtid_master_promote fails on PPC64
GTID order in @@gtid_binlog_pos depends on internal hash order,
so requires --replace_result for stable test output.
2014-07-21 13:16:08 +04: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
Michael Widenius
ff205b25d5 Fixed assert in perfschema/pfs.cc::start_idle_wait_v1 when using performance schema and big packets in debug version.
The bug was that my_real_read() called net_before_header_psi() multiple times for long packets.
Fixed by adding a flag when we are reading a header.
Did also some cleanups to interface of my_net_read() to avoid unnecessary calls if performance schema is not used.

- Added my_net_read_packet() as a replacement for my_net_read(). my_net_read() is still in the client library for old clients.
- Removed THD->m_server_idle (not needed anymore as this is now given as argument to my_net_read_packet()
- Added my_net_read_packet(), which is a new version of my_net_read() with a new parameter if we are doing a read for a new command from the server.
- Added tests for compressed protocol and big packets





include/mysql.h.pp:
  Added my_net_read_packet() as a replacement for my_net_read()
include/mysql_com.h:
  Added my_net_read_packet() as a replacement for my_net_read()
mysql-test/r/mysql_client_test_comp.result:
  New test
mysql-test/t/mysql_client_test-master.opt:
  Added max_allowed_packet to be able to test big packets and packet size overflows.
mysql-test/t/mysql_client_test_comp-master.opt:
  New test
mysql-test/t/mysql_client_test_nonblock-master.opt:
  Added max_allowed_packet to be able to test big packets and packet size overflows.
sql-common/client.c:
  Use my_net_read_packet()
sql/mf_iocache.cc:
  Use my_net_read_packet()
sql/mysqld.cc:
  Removed THD->m_server_idle (not needed anymore as this is now given as argument to my_net_read_packet()
sql/net_serv.cc:
  Added argument to my_real_read() to indicte if we are reading the first block of the next statement and should call performance schema.
  Added 'compatibilty function' my_net_read().
  Added my_net_read_packet(), which is a new version of my_net_read() with a new parameter if we are doing a read for a new command from the server.
sql/sql_class.cc:
  Removed m_server_idle (not needed anymore)
sql/sql_class.h:
  Removed m_server_idle (not needed anymore)
sql/sql_parse.cc:
  Removed m_server_idle (not needed anymore)
tests/mysql_client_test.c:
  Added tests for compressed protocol and big packets
2014-07-19 13:38:40 +03:00
Ashish Agarwal
e9b2f5bf15 WL#7219: Reverting the wl#7219 patch in mysql-5.5.39-release branch 2014-07-19 11:24:21 +05:30
Sergey Vojtovich
54538b481d MDEV-6459 - max_relay_log_size and sql_slave_skip_counter
misbehave on PPC64

There was a mix of ulong and uint casts/variables which caused
incorrect value to be passed to/retrieved from max_relay_log_size
and sql_slave_skip_counter.

This mix failed to work on big-endian PPC64 where sizeof(int)= 4,
sizeof(long)= 8. E.g. session_var(thd, uint)= 1 will in fact store
0x100000000.
2014-07-18 19:45:21 +04:00
unknown
d94c2e2fe0 2014-07-18 20:55:52 +05:30
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
Ashish Agarwal
e892e71969 WL#7219: Pushing it to release 5.5.39-release branch 2014-07-17 19:21:56 +05:30
Jan Lindström
c599cc6c03 MDEV-6444: sys_vars.innodb_simulate_comp_failures_basic missing result file 2014-07-15 10:57:53 +03: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
fd0abecaf4 Fix test failure seen in buildbot on power8.
GTID order in @@gtid_binlog_pos depends on internal hash order,
so requires --replace_result for stable test output.
2014-07-11 11:17:50 +02:00
Kristian Nielsen
e81ecc9c72 MDEV-5262, MDEV-5914, MDEV-5941, MDEV-6020: Deadlocks during parallel replication causing replication to fail.
Fix a bug discovered in Buildbot valgrind. The logic in checking for slave
init thread completion was reversed, so depending on thread scheduling server
startup could hang.

Also add another variant of SSL valgrind suppression, needed for different
library version.
2014-07-11 10:54:43 +02:00
Kristian Nielsen
5b75891b7b Fix compile failure in non-debug build. 2014-07-10 14:24:53 +02:00