Commit graph

89823 commits

Author SHA1 Message Date
Jan Lindström
3486135bb5 MDEV-6928: Add trx pointer to struct mtr_t
Merge Facebook commit 25295d003cb0c17aa8fb756523923c77250b3294
authored by Steaphan Greene from https://github.com/facebook/mysql-5.6

This adds a pointer to the trx to each mtr.
This allows the trx to be accessed in parts of the code
where it was otherwise not available. This is needed later.
2014-10-24 22:26:31 +03:00
Jan Lindström
ca0bdc4d5c MDEV-6937: buf_flush_LRU() does not return correct number in case of
compressed pages

buf_flush_LRU() returns the number of pages processed. There are
two types of processing that can happen. A page can get evicted or
a page can get flushed. These two numbers are quite distinct and
should not be mixed.
2014-10-24 22:02:54 +03:00
Olivier Bertrand
652b964827 - Fix a bug in XCOL tables. When a row was filtered internally the XColumn
was not reset causing rows to be lost.
modified:
  storage/connect/connect.cc
  storage/connect/ha_connect.cc
  storage/connect/tabxcl.cpp

- Typo
modified:
  storage/connect/connect.cc
  storage/connect/ha_connect.cc
2014-10-24 19:22:05 +02:00
Rich Prohaska
57f2f606f0 DB-745 merge clustering key is covering key for mariadb 10 2014-10-24 12:34:55 -04:00
Jan Lindström
78e31f0a2e MDEV-6931: Page cleaner should do LRU flushing regardless of server activity
Merge Facebook commit 926a077b14b73c14094de7fc7aa913241b801b4d
authored by Inaam Rana from https://github.com/facebook/mysql-5.6.

This is fix for upstream bugs
http://bugs.mysql.com/bug.php?id=71988
http://bugs.mysql.com/bug.php?id=70500

page_cleaner should work whether or not there is server activity.
Its iterations become a noop when there is no work to do but we
should not tie it to the server activity.

The page_cleaner thread does spurious background flushing
because of conditional sleep between iterations. The solution
is not to make sleep dependent on server activity etc.
2014-10-24 18:58:04 +03:00
Rich Prohaska
ac995231d6 DB-746 merge clustering key is covering key for mariadb 10 2014-10-24 11:23:54 -04:00
Jan Lindström
7e71dfa9f5 MDEV-6933: Spurious lock_wait_timeout_thread wakeup in lock_wait_suspend_thread()
Merged Facebooks commit 6e06bbfa315ffb97d713dd6e672d6054036ddc21
authored by Inaam Rana from https://github.com/facebook/mysql-5.6.

Fixes MySQL bug http://bugs.mysql.com/bug.php?id=72123

lock_timeout thread works in a tight loop waking up every second
and checking for lock_wait_timeout. In addition, when a mysql
thread is forced to wait on a lock, it signals the lock_timeout thread
as well. This call is not required. In a heavily contended workload
each thread going to wait will signal the lock_timeout thread making
it work all the time. As lock_timeout thread scans the array of
waiting threads under lock_sys::wait_mutex which is already very
hot in contneded loads, these extra scans can cause significanct
performance regression.

Also, in various codepaths lock_timeout thread is signalled where
actual intention was to signal the innodb monitor thread.
2014-10-24 17:56:04 +03:00
Olivier Bertrand
c4cf40c21b - Fix bug: Server crash when using a special column in XCOL tables
modified:
  storage/connect/mysql-test/connect/r/xcol.result
  storage/connect/mysql-test/connect/t/xcol.test
  storage/connect/tabxcl.cpp
2014-10-24 16:21:39 +02:00
Jan Lindström
f0debf2feb MDEV-6934: os_event_wait_time_low(): wait time calculation is messed up
Merged Facebook commit bdab302a7e3c37da21a1bffe1550cdbe6c906695
by Inaam Rana from https://github.com/facebook/mysql-5.6.

In os_event_wait_time_low() the logic to calculate abs_time
for wait is broken. The bug has been present at least since
5.5. It gets acutely sensitized when sub-second wait intervals
are passed. It is particularly relevant to us because the
page_cleaner thread will mostly request sub-second wait
intervals. This can potentially lead to a near tight loop
behaviour of page_cleaner with much less sleep then what we'd
actually expect.
2014-10-24 17:11:09 +03:00
Rich Prohaska
ad4af10218 DB-744 ER_GET_ERRNO has additional parameter on MariaDB 10 which crashes tokudb 2014-10-24 05:36:18 -04:00
Sergey Vojtovich
27bd1b44a1 Merged mroonga updates. 2014-10-24 10:01:01 +04:00
Kentoku SHIBA
323fe245a0 Disable foreign_key_create test. 2014-10-24 06:37:53 +09:00
Sergey Petrunya
bb58a18b86 Better comments 2014-10-23 12:31:13 +04:00
Kentoku SHIBA
64593e7c57 Skip Mroonga if platform is big endian. Remove last test disabling. 2014-10-23 00:31:01 +09:00
Sergey Vojtovich
d67c2313ca Merged mroonga updates. 2014-10-22 18:33:49 +04:00
Olivier Bertrand
4f59b65fb0 - Remove some gcc warnings
modified:
  storage/connect/filamvct.cpp
  storage/connect/ha_connect.cc
2014-10-22 13:51:33 +02:00
Olivier Bertrand
554746afe3 - Fix (gcc error) passing cmd instead of cmd.Getstr() to htrc
modified:
  storage/connect/myconn.cpp

- Remove an unuseful test (gcc warning)
modified:
  storage/connect/myconn.cpp
2014-10-22 12:02:46 +02:00
Kentoku SHIBA
6cd18ec86c Disable tests for Power8. 2014-10-22 03:43:19 +09:00
Sergey Vojtovich
c767a66199 Merged mroonga updates. 2014-10-21 22:20:21 +04:00
Rich Prohaska
424c9f3c0d DB-743 test case for TC get_active_from_pool crash 2014-10-21 13:21:42 -04:00
Olivier Bertrand
56e2771321 1) Handling string memory allocation with a new STRING class. This is only
the beginning. Defining the STRING class and begining to use it (MYSQL)

2) Change the xtrace, use_tempfile and exact_info connect variables from
   GLOBAL to SESSION. Remaining GLOBAL variables have been made readonly.

3) Take care of LEX_STRING variables. The .str should not be regarded as
   allways being 0 terminated. This is handled by the Strz functions that
   make sure to return 0 terminated strings.

Bug fix:
- When inserting in MYSQL table with special column(s) a query such as:
insert into t2 values(0,4,'new04'),(0,5,'new05');
failed saying: column id (the special column) not found in t2.
It is now accepted but must be counted in values (these 0 are ignored)
- ROWID was returning row numbers based 0. Now it is from base 1.

modified:
  storage/connect/array.cpp
  storage/connect/blkfil.cpp
  storage/connect/colblk.cpp
  storage/connect/connect.cc
  storage/connect/filamap.cpp
  storage/connect/filamdbf.cpp
  storage/connect/filamfix.cpp
  storage/connect/filamtxt.cpp
  storage/connect/filamvct.cpp
  storage/connect/filamzip.cpp
  storage/connect/filamzip.h
  storage/connect/filter.cpp
  storage/connect/global.h
  storage/connect/ha_connect.cc
  storage/connect/ha_connect.h
  storage/connect/libdoc.cpp
  storage/connect/mycat.cc
  storage/connect/myconn.cpp
  storage/connect/odbconn.cpp
  storage/connect/plgdbutl.cpp
  storage/connect/plugutil.c
  storage/connect/reldef.cpp
  storage/connect/tabcol.cpp
  storage/connect/tabdos.cpp
  storage/connect/tabfix.cpp
  storage/connect/tabfmt.cpp
  storage/connect/table.cpp
  storage/connect/tabmul.cpp
  storage/connect/tabmysql.cpp
  storage/connect/tabmysql.h
  storage/connect/taboccur.cpp
  storage/connect/tabodbc.cpp
  storage/connect/tabpivot.cpp
  storage/connect/tabsys.cpp
  storage/connect/tabtbl.cpp
  storage/connect/tabutil.cpp
  storage/connect/tabvct.cpp
  storage/connect/tabwmi.cpp
  storage/connect/tabwmi.h
  storage/connect/tabxcl.cpp
  storage/connect/tabxml.cpp
  storage/connect/user_connect.cc
  storage/connect/valblk.cpp
  storage/connect/value.cpp
  storage/connect/value.h
  storage/connect/xindex.cpp
  storage/connect/xobject.cpp
  storage/connect/xobject.h
  storage/connect/xtable.h
2014-10-21 17:29:51 +02:00
Sergey Vojtovich
b8b4d27779 Merge mroonga. 2014-10-21 10:52:55 +04:00
Sergey Petrunya
135bf1fcfb Merge 2014-10-21 00:02:24 +04:00
Kentoku SHIBA
7f3d555087 Update Mroonga to the latest version on 2014-10-21T04:51:38+0900 2014-10-21 04:51:38 +09:00
Sergey Petrunya
1a996bde1e MDEV-6879: Dereference of NULL primary_file->table in DsMrr_impl::get_disk_sweep_mrr_cost()
(Attempt #2)
- Don't attempt to use BKA for materialized derived tables. The 
  table is neither filled nor fully opened yet, so attempt to 
  call handler->multi_range_read_info() causes crash.
2014-10-20 23:35:34 +04:00
Kentoku SHIBA
1cdd679ce5 Merge from trunk 2014-10-21 01:56:56 +09:00
Alexander Barkov
81194d9203 MDEV-6649 Different warnings for TIME and TIME(N) when @@old_mode=zero_date_time_cast 2014-10-20 16:42:00 +04:00
Rich Prohaska
a7b311bd9c update README to 7.5.2 2014-10-19 12:24:07 -04:00
Rich Prohaska
1549f0bf4f Merge branch 'master' into releases/tokudb-7.5 2014-10-19 12:15:37 -04:00
Rich Prohaska
c5bf055079 DB-742 combine mysql and mariadb plugin declarations 2014-10-18 10:58:38 -04:00
Rich Prohaska
cfbe8342da DB-742 use consistent version macros 2014-10-17 21:23:17 -04:00
Rich Prohaska
5788312433 DB-742 set plugin version to tokudb_version_major.tokudb_version_minor 2014-10-17 13:46:15 -04:00
Sergey Vojtovich
52fb08ac31 MDEV-6886 - Add RHEL7 RPM layout
Set proper alternative names on RHEL7: they should match Fedora names.
2014-10-17 15:08:50 +04:00
Nirbhay Choubey
24603033e3 MDEV-6939 : Dots in file names of configuration files
Use fn_ext2() (backported from 10.0) to get the file
extension from last occurrence of FN_EXTCHAR ('.')
instead.
2014-10-29 22:20:58 -04:00
Kristian Nielsen
848d1166b6 Attempt to fix a failure in test case innodb.innodb_information_schema seen occasionally in Buildbot.
The test case waits for other threads to complete, but the wait is only 2
seconds. This is likely to sometimes be too little on our heavily loaded
buildbot VMs, that can easily stall for more than 2 seconds from time to time.

So let's try to increase the timeout (to about 40 seconds) and see if it
helps.
2014-10-29 15:10:02 +01:00
Kristian Nielsen
2fdb88e870 Fix a spurious test failure in rpl.rpl_show_slave_hosts
The test case runs SHOW SLAVE HOSTS. The output of this is only stable after
all slaves have had time to register with the master; this happens
asynchroneously.

The test was waiting for the slave with server_id=3 to appear in the output,
but it was missing a similar wait for server_id=2. Thus, if server_id=2 was
much slower to connect for some reason, it could be missing from the output,
causing the test to fail.
2014-10-29 14:44:40 +01:00
Kristian Nielsen
8e63a7fe27 Yet another attempt at fixing random failures in test case main.myisam-metadata
I think I finally found the problem, managed to reproduce locally using a
sleep in the test case to simulate the particular race condition that causes
the test to fail often in Buildbot.

The test starts an ALTER TABLE that does repair by sort in one thread, then
another thread waits for the sort to be visible in SHOW PROCESSLIST and runs a
SHOW statement in parallel.

The problem happens when the sort manages to run to completion before the
other thread has the time to look at SHOW PROCESSLIST. In this case, the wait
times out because the state looked for has already passed.

Earlier I added some DEBUG_SYNC to prevent this race, but it turns out that
DEBUG_SYNC itself changes the state in the processlist. So when the debug sync
point was hit, the processlist was showing the wrong state, so the wait would
still time out.

Fixed now by looking for the processlist to contain either the "Repair by
sorting" state or the debug sync wait stage.

Also clean up previous attempts to fix it. Set the wait timeout back to
reasonable 60 seconds, and simplify the DEBUG_SYNC operations to work closer
to how the original test case was intended.
2014-10-29 13:39:22 +01:00
Sergey Petrunya
ad66fafbbb Merge 2014-10-29 14:22:25 +03:00
Kristian Nielsen
5b99f4d330 Increase timeout for check-testcase and friends, in an attempt to cure some random buildbot test failures. 2014-10-28 12:45:39 +01:00
Kristian Nielsen
bd3d16754b Increase wait timeout in test main.myisam-metadata, in an attempt to get rid of Buildbot random failures. 2014-10-22 15:05:59 +02:00
Kristian Nielsen
64af1ecc20 Fix two races in test main.processlist that could cause random failures (seen in Buildbot)
1. Do not use NULL `info' field in processlist to select the thread of
interest. This can fail if the read of processlist ends up happening after
REAP succeeds, but before the `info' field is reset. Instead, select on the
CONNECTION_ID(), making sure we still scan the whole list to trigger the same
code as in the original test case.

2. Wait for the query to really complete before reading it in the
processlist. When REAP returns, it only means that ack has been sent to
client, the reset of query stage happens a bit later in the code.
2014-10-22 13:51:33 +02:00
Kristian Nielsen
a050a87f78 Raise version number after 5.0.40 release. 2014-10-21 15:33:04 +02:00
Kristian Nielsen
b27a09561f Attempt to fix a rare random test error in main.information_schema.
Add missing REAP to the test.

A later test failed with strange incorrect values for COM_SELECT
in information_schema.global_status. Since global_status is updated
at the end of session activity, it seems appropriate to ensure that
all background connections have completed before accessing it.

(I checked that the original bug still triggers the test case after
the modification with REAP).
2014-10-21 15:23:40 +02:00
Kristian Nielsen
4c07b93bdb Fix missing UNIV_INTERN on dict_table_check_foreign_keys().
When UNIV_INTERN is missing in built-in XtraDB, this causes the
innodb_plugin to call the XtraDB version of the function instead
of its own (seen in --embedded-server test failure in Buildbot).
This in turn causes bad things to happen in case of difference
between XtranDB and innodb_plugin.
2014-10-20 10:50:10 +02:00
Kristian Nielsen
2b4445e60e Fix test failure in perfschema.myisam_file_io when perfschema is not compiled into the server. 2014-10-20 09:36:41 +02:00
Rich Prohaska
178a511217 DB-742 set the tokudb plugin version string for mariadb 2014-10-16 19:50:53 -04:00
Sergey Petrunya
af4d469a8d MDEV-6879: Dereference of NULL primary_file->table in DsMrr_impl::get_disk_sweep_mrr_cost()
- Don't attempt to use BKA for materialized derived tables. The 
  table is neither filled nor fully opened yet, so attempt to 
  call handler->multi_range_read_info() causes crash.
2014-10-16 22:58:08 +04:00
Sergey Petrunya
8925b4a935 MDEV-6878: Use of uninitialized saved_primary_key in Mrr_ordered_index_reader::resume_read()
- Make Mrr_ordered_index_reader::resume_read() restore index position 
  only if it was saved before with Mrr_ordered_index_reader::interrupt_read().
2014-10-16 17:57:13 +04:00
Sergey Vojtovich
f09a8ba6a0 MDEV-6872 - innodb.innodb fails on PPC64
innodb_buffer_pool_pages_total depends on page size. On Power8 it is 65k
compared to 4k on Intel. As we round allocations on page size we may get
slightly more memory for buffer pool.
2014-10-15 12:11:34 +04:00
Igor Babaev
1e1a8a7fc9 Fixed bug mdev-6705.
After constant row substitution the WHERE condition may be simplified and its multiple equality
may be changed. In this case the references to these multiple equalities from the COND_EQUAL
objects associated with ON expressions must be updated.
Also we have to take into account that this simplification may lead to equalities of the form
field=const that are mutually exclusive with some of the equalities in ON expressions.
2014-10-14 19:11:39 -07:00