Commit graph

8362 commits

Author SHA1 Message Date
Rich Prohaska
4e6d8249db #192 support HTON_SUPPORTS_CLUSTERED_KEYS 2014-02-26 14:39:06 -05:00
Rich Prohaska
7c506b017b #191 support -DTOKUDB_VERSION=SOME_VERSION_STRING 2014-02-26 10:58:44 -05:00
Rich Prohaska
e9b9fd9077 #188 keep track of and cleanup last_lock_timeout memory 2014-02-24 09:46:24 -05:00
Rich Prohaska
b77c0addba #190 zero out new null bytes to force valgrind to quit complaining about uninitialized bytes 2014-02-21 15:53:05 -05:00
Rich Prohaska
3fbd54a96d #189 add tokudb_kill_time session variable to set lock tree kill callback frequency 2014-02-21 08:21:31 -05:00
Rich Prohaska
f07613f140 #186 update cardinality on first table open 2014-02-20 07:41:11 -05:00
Murthy Narkedimilli
075a2fb716 Updated/added copyright header. Added line "use is subject to license terms"
to copyright header.
2014-02-17 18:19:04 +05:30
Thirunarayanan B
9ea02a1c09 Bug #18010711 UNIQUE PREFIX INDEX ON BINARY COLUMN:
FAILING ASSERTION: FLEN == LEN

Problem:
       Broken invariant triggered when building a unique index on a
binary column and the input data contains duplicate keys. This was broken
in debug builds only.

Fix:
       Fixed length of the binary datatype can be greater than length of
the shorter prefix on which index is being created.
2014-02-17 13:45:34 +05:30
Rich Prohaska
2e7e13af2d #185 fix out of range read from uint3korr 2014-02-14 10:11:51 -05:00
Rich Prohaska
a8ca3e2ab3 #184 fix mismatch between table_share->key_parts and the number really there. mysql increments key_parts for the extended keys. 2014-02-13 20:13:36 -05:00
Sergei Golubchik
913beda8c8 5.2 merge 2014-02-13 10:15:03 +01:00
Michael Widenius
800a278fd0 Fixed a compiler failure and removed some warnings in windows
extra/replace.c:
  Removed compiler warning
sql/unireg.cc:
  Removed compiler warning
storage/maria/ma_blockrec.c:
  Removed compiler warning
storage/maria/ma_dynrec.c:
  Fixed compiler failure
storage/maria/ma_unique.c:
  Removed compiler warning
storage/myisam/mi_check.c:
  Removed compiler warning
storage/myisam/mi_checksum.c:
  Removed compiler warning
2014-03-11 16:53:24 +02:00
Michael Widenius
599eb0dc86 Fixed MDEV-5724 "Server crashes on SQL select containing more group by and left join statements using innodb tables"
The problem was that a big record was allocated on the stack, which casued stack to run out.
  
Fixed by using my_safe_alloca() instead of my_alloca() when allocating records.
Now only records <= 16384 are allocated on the stack.

mysql-test/r/stack-crash.result:
  Added test case
mysql-test/t/stack-crash.test:
  Added test case
storage/maria/ma_blockrec.c:
  Use my_safe_alloca() instead of my_alloca()
storage/maria/ma_dynrec.c:
  Use my_safe_alloca() instead of my_alloca()
storage/maria/maria_def.h:
  Added MARIA_MAX_RECORD_ON_STACK
storage/maria/maria_pack.c:
  Use my_safe_alloca() instead of my_alloca()
2014-03-10 21:40:27 +02:00
Jan Lindström
752ba087c8 MDEV-5746: Slow file extend when innodb_use_fallocate=1 and SSD
file storage.

Analysis: posix_fallocate was called using 0 as offset and len as
desired size. This is not optimal for SSDs.

Fix: Call posix_fallocate with correct offset i.e. current file size
and extend the file from there len bytes.
2014-02-26 13:49:50 +02:00
Jan Lindström
e479829a15 MDEV-5742: Assertion failure node->n_pending on fil0fil.c line 5039
on debug build when innodb_use_fallocate=1

Analysis: There was merge error that caused additional call to 
fil_node_complete_io.

Fixed by removing incorrect call and fixed calculation of extended
file size.
2014-02-26 12:06:12 +02:00
Sergei Golubchik
004642525d Fix "cmake . && cmake -DWITHOUT_TOKUDB=1" to disable tokudb 2014-02-21 23:42:29 +01:00
Sergei Golubchik
ea0915dcad federatedx: avoid unnecessary bzero. improve dbug traces 2014-02-21 00:52:58 +01:00
Sergei Golubchik
e840d323e2 MDEV-5698 Using ORDER BY in a FederatedX table is abnormally slow
In ::position() federated needs to know an element before the
current ("data_cursor") in the single-linked list. Replace list
traversal for every ::position() call (which is O(n^2)) with remembering
the current element before it's advanced by mysql_fetch_row().

storage/federatedx/federatedx_io_mysql.cc:
  mdev:5698
2014-02-21 00:52:50 +01:00
Sergei Golubchik
84c96a263e different fix for internal Oracle MySQL bug#16324629 that doesn't crash
(simply, copied from FederatedX)
2014-02-17 11:09:33 +01:00
Sergei Golubchik
84651126c0 MySQL-5.5.36 merge
(without few incorrect bugfixes and with 1250 files where only a copyright year was changed)
2014-02-17 11:00:51 +01:00
Sergei Golubchik
64f96de766 fix SphinxSE to not leave Sphinx_error status variable uninitialized 2014-02-14 15:16:23 +01:00
Sergei Golubchik
48445f3556 5.1 merge 2014-02-13 08:25:33 +01:00
Sergei Golubchik
5f5d2db141 fix embedded tests
(mainly by backporting 5.5. changes)

mysql-test/suite/maria/t/distinct.test:
  Remove the test that requires SSL. One test case for a bug is enough.
sql/scheduler.cc:
  make it the same as in 5.5
storage/innodb_plugin/row/row0mysql.c:
  make it the same as in 5.5
storage/innodb_plugin/row/row0sel.c:
  make it the same as in 5.5
storage/xtradb/row/row0mysql.c:
  make it the same as in 5.5
storage/xtradb/row/row0sel.c:
  make it the same as in 5.5
2014-02-13 08:09:07 +01:00
Rich Prohaska
bc07ccf8a7 #182 fix dbt array memory leak 2014-02-12 15:07:44 -05:00
Rich Prohaska
d06d73633d #181 fix memory leak of the inserted bytes partitioned counter 2014-02-11 14:24:02 -05:00
Annamalai Gurusami
6193c63211 Bug#18185930 UPD_NODE_INSERT_BLOB CAUSES BTR_EXTERN_OWNER_FLAG ASSERTION
Problem:

In the clustered index, when an update operation is done the overall
scenario (after rb#4479) is as follows:

1.  Delete mark the old record that is to be updated.
2.  The old record disowns the blobs.
3.  Insert the new record into clustered index.
4.  For non-updated blobs, new record must own it. Verified by assert.
5.  For non-updated blobs, in new record marked as inherited.

Scenario involving DB_LOCK_WAIT:

If step 3 times out, then we will skip 1 and 2 and will continue from
step 3.  This skipping is achieved by the UPD_NODE_INSERT_BLOB state.
In this case, step 4 is not correct.  Because of step 1, the new
record need not own the blobs.  Hence the assert failure.

Solution:

The assert in step 4 is removed.  Instead code is added to ensure that
the record owns the blob.  

Note:

This is a regression caused by rb#4479.

rb#4571 approved by Marko
2014-02-11 16:44:37 +05:30
Thirunarayanan B
7acdf29cb4 Bug #14049391 INNODB MISCALCULATES AUTO-INCREMENT AFTER DECREASING
AUTO_INCREMENT_INCREMENT
Problem:
=======
When auto_increment_increment system variable decreases,
immediate next value of auto increment column is not affected.

Solution:
========
	Get the previous inserted value of auto increment column by
subtracting the previous auto_increment_increment from next
auto increment value. After that calculate the current autoinc value
using newly changed auto_increment_increment variable.

	Approved by Sunny [rb#4394]
2014-02-10 10:13:35 +05:30
Rich Prohaska
dfe4872524 #180 avoid thd_proc_info pointing to invalid info (like when a function sets proc info with a local variable and then returns) 2014-02-07 12:58:10 -05:00
Rich Prohaska
b7e362e48c #178 clean up hatoku_defines.h a bit. it is a mess. 2014-02-07 12:07:53 -05:00
Rich Prohaska
04b8c2f63c #177 disable inline alter table drop default, add key, drop key, rename column when null bytes changed 2014-02-05 15:38:06 -05:00
Rich Prohaska
be8aa787db #175 compare enums using eq_def 2014-02-03 16:12:57 -05:00
Rich Prohaska
8e26447aa3 #172 simplify test case for -30994 leak 2014-01-31 14:00:23 -05:00
Ritheesh Vedire
bebb3427f2 Bug#16814264: FILTER OUT THE PERFORMANCE_SCHEMA RELAY LOG EVENTS FROM RELAY LOG
Performance schema tables are local to a server and they should not
  be allowed to be executed by the slave from the relay log.
  From 5.6.10, P_S events are not written into the binary log.
  But prior to that, from mysql 5.5 onwards, P_S events are written 
  to the binary log by master.
  The following are problematic scenarios:
      
  1. Master 5.5 -> Slave 5.5
     ========================
    A) RBR: Slave crashes
    B) SBR: P_S statements are replicated.
      
  2.Master 5.5 -> Slave 5.6
    ========================
    A) RBR: SQL thd generates error
    B) SBR : P_S statements are replicated
      
  3. 5.5 binlog executed on a server 5.5 using mysqlbinlog|mysql
     =================================================================
     A) RBR: Server crash  (because of BINLOG'... statement)
     B) SBR: P_S statements are executed
      
  4. 5.5 binlog executed on server 5.6 using mysqlbinlog|mysql
     ================================================================
     A) RBR: SQL error (because of BINLOG'... statement)
     B) SBR: P_S statements are executed.
      
      
    The generalized behaviour should be:
    a) Slave SQL thread should certainly ignore P_S events read from
       the relay log.
    b) mysqlbinlog|mysql should replay the binlog succesfully.
2014-01-31 04:25:39 +05:30
Annamalai Gurusami
d13408f8e4 Bug #14668683 ASSERT REC_GET_DELETED_FLAG(REC, PAGE_IS_COMP(PAGE))
Problem:

The function row_upd_changes_ord_field_binary() is used to decide whether to
use row_upd_clust_rec_by_insert() or row_upd_clust_rec().  The function
row_upd_changes_ord_field_binary() does not make use of charset information.
Based on binary comparison it decides that r1 and r2 differ in their ordering
fields.

In the function row_upd_clust_rec_by_insert(), an update is done by delete +
insert.  These operations internally make use of cmp_dtuple_rec_with_match()
to compare records r1 and r2.  This comparison takes place with the use of
charset information.

This means that it is possible for the deleted record to be reused in the
subsequent insert.  In the given scenario, the characters 'a' and 'A' are
considered equal in the my_charset_latin1.  When this happens, the ownership
information of externally stored blobs are not correctly handled.

Solution:

When an update is done by delete followed by insert, disown the relevant
externally stored fields during the delete marking itself (within the same
mtr).  If the insert succeeds, then nothing with respect to blob ownership
needs to be done.  If the insert fails, then the disown done earlier will be
removed when the operation is rolled back.

rb#4479 approved by Marko.
2014-01-30 12:38:13 +05:30
Rich Prohaska
2ea52a40ca #172 map ydb errors to handler errors in prelocking functions 2014-01-29 14:03:00 -05:00
Sergei Golubchik
b4dd13b519 MDEV-5405 RQG induced crash in mi_assign_to_key_cache in safe mutex unlock
if two threads were calling mi_assign_to_key_cache() for the same table,
one could change share->key_cache while the other was having
share->key_cache->op_lock locked. The other thread would crash then,
trying to unlock share->key_cache->op_lock (because it would be a different mutex).

fixed by caching the value of share->key_cache in a local variable. The thread can still
call flush_key_blocks() for an unassigned keycache, but it's harmless.
2014-01-27 12:11:04 +01:00
Sergei Golubchik
ebaac51c2f mtr: check that tests clean up debug_sync. fix tests that didn't. 2014-01-27 12:10:53 +01:00
Sergei Golubchik
879a05ce3f improve oqgraph boost check to filter out newer boost versions 2014-01-26 21:49:39 +01:00
Michael Widenius
46c4f3a785 speed up tokudb tests by adding begin/commit around insert loops
Marked very long running tests as big_test
2014-01-26 20:46:15 +02:00
Michael Widenius
3d67c68ad1 Fixed MDEV-4970: Wrong result with Aria table populated with disabled keys
Problem was that ALTER TABLE DISABLE KEYS incremented create_trid for the table,
which made the new index entries invisible until the global trid catched up.

Fixed by only updating create_trid if we are rewriting all rows and indexes.


mysql-test/suite/maria/alter.result:
  Added test case
mysql-test/suite/maria/alter.test:
  Added test case
storage/maria/ha_maria.cc:
  Only updating create_trid if we are doing a full repair (and thus rewriting all rows and indexes).
storage/maria/trnman.c:
  More DBUG_PRINT
2014-01-25 15:41:08 +02:00
unknown
31249744fe merge 5.3->5.5 2014-01-26 16:41:15 +02:00
Rich Prohaska
2c1dff7228 #171 add a field types array to classify types into fixed, variable and blob types 2014-01-24 15:33:19 -05:00
Rich Prohaska
459aa71b9c #171 clean up tokudb comparison APIs a bit 2014-01-24 13:54:16 -05:00
Michael Widenius
7335c6f2a4 Fixed failures in tokudb test cases
storage/tokudb/mysql-test/tokudb_bugs/r/5733_innodb.result:
  Speed up test
storage/tokudb/mysql-test/tokudb_bugs/r/5733_tokudb.result:
  Speed up test
  Fix results
storage/tokudb/mysql-test/tokudb_bugs/r/xa-6.result:
  Ensure that mysql.proc is properly closed
storage/tokudb/mysql-test/tokudb_bugs/t/5733_innodb.test:
  Speed up test
storage/tokudb/mysql-test/tokudb_bugs/t/5733_tokudb.test:
  Speed up test
  Accept both index and range scan for one query
storage/tokudb/mysql-test/tokudb_bugs/t/xa-6.test:
  Ensure that mysql.proc is properly closed
2014-01-24 14:30:19 +02:00
unknown
93609b57c6 BUG 18117322 - DEFINE INNODB_THREAD_SLEEP_DELAY MAX VALUE
The maximum value for innodb_thread_sleep_delay is 4294967295 (32-bit) or
18446744073709551615 (64-bit) microseconds. This is way too big, since
the max value of innodb_thread_sleep_delay is limited by
innodb_adaptive_max_sleep_delay if that value is set to non-zero value
(its default is 150,000).

Solution
The maximum value of innodb_thread_sleep_delay should be the same as
the maximum value of innodb_adaptive_max_sleep_delay, which is 1000000.

Approved by Jimmy, rb#4429
2014-01-24 09:57:25 +08:00
Sergei Golubchik
3b5f66dbf9 fix XtraDB to compile on Windows 2014-01-23 00:02:08 +01:00
Sergei Golubchik
ec34edd9c3 Percona-Server-5.5.35-rel33.0.tar.gz 2014-01-22 15:35:42 +01:00
Sergei Golubchik
37d240ecf9 MySQL-5.5.35 merge 2014-01-22 15:29:36 +01:00
Rich Prohaska
3ec9648f3d Tokutek/mysql56#54 fix to tokudb::external_lock for the alter table assert bug, plus a rewrite of the tokudb debug tracing 2014-01-22 08:54:46 -05:00
Sergei Golubchik
e8f6f40292 clarify plugin-load usage in tokudb.cnf file 2014-01-21 17:20:51 +01:00
Michael Widenius
04bee0af2e Fix for MDEV-5547: Bad error message when moving very old .frm files to MariaDB 5.5.
mysql_upgrade --help now also prints out --default options and variable values.
mysql_upgrade now prints permission errors.
mysql_upgrade doesn't print some non essential info if --silent is used.
Added handler error message about incompatible versions
Fixed that mysqlbug and mysql_install_db have the executable flag set.
Removed executable flag for some non executable files.
Changed in mysql_install_db askmonty.org to mariadb.com.
Ensured that all client executables prints --default options the same way.
Allow REPAIR ... USE_FRM for old .frm files if the are still compatible.
Extended shown error for storage engine messages.


client/mysql.cc:
  print_defaults() should be first (as in all other programs)
client/mysql_upgrade.c:
  --help now also prints out --default options and variable values
  Print out error if wrong permissions
  Don't print info if --silent
client/mysqladmin.cc:
  print_defaults() should be first (as in all other programs)
client/mysqlbinlog.cc:
  Added print_defaults() to --help
client/mysqlcheck.c:
  Added empty line in --help
client/mysqlimport.c:
  Added empty line in --help
client/mysqlshow.c:
  Made --help compatible
client/mysqlslap.c:
  Made --help compatible
client/mysqltest.cc:
  Added print_defaults() to --help
include/handler_ername.h:
  Added handler error message
include/my_base.h:
  Added handler error message
mysql-test/r/mysql_upgrade.result:
  Updated results
mysql-test/r/repair.result:
  Added test case for better error messages
mysql-test/std_data/host_old.MYD:
  Added test case for better error messages
mysql-test/std_data/host_old.MYI:
  Added test case for better error messages
mysql-test/std_data/host_old.frm:
  Added test case for better error messages
mysql-test/t/repair.test:
  Added test case for better error messages
mysys/my_handler_errors.h:
  Added handler error message
scripts/CMakeLists.txt:
  Fixed that mysqlbug and mysql_install_db have the executable flag set
scripts/mysql_install_db.sh:
  askmonty.org -> mariadb.com
sql/ha_partition.cc:
  Sometimes table_type() can be called for errors even if partition didn't manage to open any files
sql/handler.cc:
  Write clear text for not handled, but defined error messages.
sql/share/errmsg-utf8.txt:
  Extended shown error for storage engine messages
sql/sql_admin.cc:
  Allow REPAIR ... USE_FRM for old .frm files if the are still compatible
storage/myisam/ha_myisam.cc:
  Use new error message
2014-01-22 15:16:57 +02:00
Sergei Golubchik
bea9f82653 5.2 merge 2014-01-21 09:56:12 +01:00
Sergei Golubchik
aa2f88baa0 5.1 merge 2014-01-21 09:41:28 +01:00
Rich Prohaska
babd7525a9 #169 simplify the tokudb config for mariadb 5.5 2014-01-20 14:49:39 -05:00
Sergei Golubchik
283af34a6d MDEV-5543 MyISAM repair unsafe usage of TMD files 2014-01-20 19:09:01 +01:00
Rich Prohaska
4a9dccc9ac #168 remove obsolete is_fast_alter_running 2014-01-15 17:28:56 -05:00
Rich Prohaska
0d6c69d760 #167 use a serializable cursor to check for PK duplicate 2014-01-15 11:51:10 -05:00
Rich Prohaska
907eaff9e4 #167 ignore dictionary too new errors 2014-01-14 15:57:30 -05:00
Rich Prohaska
c258157515 #166 pretty print external lock type 2014-01-14 15:06:07 -05:00
Rich Prohaska
c7836bb38d #166 add this handler to debug enter and return 2014-01-14 14:00:58 -05:00
Aditya A
dc1365d6b4 Bug#16287752 INNODB_DATA_FILE_PATH MINIMUM SIZE
IN DOCUMENTATION
Problem 
-------
The documentation says that we support 'K' prefix 
while specifiying size for innodb datafile in the
server variable for innodb_data_file_path ,but the
function srv_parse_megabytes() only handles only 
'M' (megabytes) and 'G' (gigabytes) .

Fix
---
Modify srv_parse_megabytes() to handle Kilobytes. 

Add in documentation that while specifying size 
in KB it should be mentioned in multiples of 1024
other wise they will be rounded off to nearest
MB (megabyte) boundry .(eg if size mentioned
as 2313KB will be considered as 2 MB ).

[ Approved by Marko #rb 2387 ]
2014-01-08 22:25:41 +05:30
Rich Prohaska
3a789b41f6 #159 set last_auto_increment from create info 2014-01-08 08:01:40 -05:00
Murthy Narkedimilli
c92223e198 Updated/added copyright headers 2014-01-06 10:52:35 +05:30
Arun Kuruvila
1f8d86b42e Bug #16324629 : SERVER CRASHES ON UPDATE/JOIN FEDERATED +
LOCAL TABLE WHEN ONLY 1 LOCAL ROW

Description: When updating a federated table with UPDATE...
JOIN, the server consistently crashes with Signal 11 when
only 1 row exists in the local table involved in the join 
and that 1 row can be joined with a row in the federated 
table.

Analysis: Interaction between the federated engine and the
optimizer results in the crash. In our scenario, ie, local
table having only one row, the program is following a 
different path because the table is treated as a constant
table by the join optimizer. So in this scenario 
"index_read()" is happening in the prepare phase,
since optimizer plan is different for constant table joins.
In this case, "index_read_idx_map()" (inside handler.cc) is
calling "index_read()" and inside "index_read()", matching 
rows are fetched and "stored_result" gets populated by 
calling "store_result()". And just after "index_read()", 
"index_end()" function is called. And in the "index_end()",
its freeing the "stored_result" by calling "free_result()".
So when it reaches the execution phase, in "position()" 
function, we are getting assertion at 
"DBUG_ASSERT(stored_result);". In all other scenarios (ie, 
table with more than 1 row), optimizer plan is different 
and "index_read()" is happening in the execution phase.

Fix: So my fix is to have a separate ha_federated member
function for "index_read_idx_map()" which will handle 
federated engine separately. So that position() will be 
called before index_end() call in constant table scenario.
2013-12-30 11:39:55 +05:30
Aditya A
64b697ca99 Bug#12762390 SHOW INNODB STATUS REPORTS NON-FK
ERRORS IN THE FK SECTION

ANALYSIS
--------

Any error during the renaming of the table was 
incorrectly logged in the dict_foreign_err_file
and it showed up in foreign key section when
we give the query "show engine innodb status".

FIX
---
Prevent renaming error from being logged in 
dict_foreign_err_file section.  

[Aprooved by marko #rb 2501 ]
2013-12-29 16:55:24 +05:30
Rich Prohaska
1e3a1b0f52 #158 support slave exec mode idempotent 2013-12-27 08:20:57 -05:00
Rich Prohaska
876b3a7909 #148 change the default of tokudb_hide_default_row_format to ON 2013-12-22 16:03:10 -05:00
Rich Prohaska
6e3e7fb5fc register the tokudb_alter_print_error variable 2013-12-20 09:14:56 -05:00
Rich Prohaska
8bcf6c5379 add a session variable that controls whether or not alter table errors are printed to stderr 2013-12-20 07:28:08 -05:00
unknown
1555f1801d make 5.1 compiling with modern gcc. 2013-12-20 12:35:47 +02:00
Rich Prohaska
295947c6f8 #157 fix tokudb::index_next_same error handling 2013-12-18 16:04:05 -05:00
Sergei Golubchik
50808b30d2 MDEV-5396 Assertion `Handlerton: r==0 ' failed (errno=0) on EXPLAIN with TokuDB tables
Fix EXPLAIN and CREATE SELECT to join_free() (and, thus, ha_index_end())
before ha_commit_trans().
2013-12-17 17:26:54 +01:00
Rich Prohaska
5c147cc943 Tokutek/mysql56#42 turn on HA_PRIMARY_KEY_REQUIRED_FOR_POSITION to fix failing partition tests on mysql 5.6 2013-12-16 07:47:36 -05:00
Sergei Golubchik
39a8d7965d don't run tokudb tests for --embedded by default 2013-12-15 15:55:15 +01:00
Sergei Golubchik
47b615d84b Fix tokudb.hotindex-insert-bigchar failure in buildbot.
This test needs at least 320M for tokudb-max-lock-memory.
Normally tokudb-max-lock-memory is auto-sized to be 1/16th
of the available RAM size, and many our test VMs have 4G of RAM.
2013-12-15 11:31:57 +01:00
Rich Prohaska
484c30bdf2 #152 fix MDEV-5399 2013-12-14 10:05:22 -05:00
Sergei Golubchik
e68bccc743 5.3 merge 2013-12-13 13:00:38 +01:00
Rich Prohaska
503863aeac remove junk debug code 2013-12-12 16:23:15 -05:00
Rich Prohaska
5172855d16 #150 cleanup cursor when a txn is retired 2013-12-12 16:14:12 -05:00
Sergei Golubchik
5313e00199 fix tokudb tests that fail in --ps-protocol
https://github.com/Tokutek/ft-engine/issues/153
2013-12-12 14:58:44 +01:00
Sergei Golubchik
976e242c78 update tokudb version. mask tests that are broken there. 2013-12-12 11:42:00 +01:00
Rich Prohaska
521cf40b4e port to mysql 5.6.15 2013-12-11 15:47:25 -05:00
Marc Alff
82eed657a6 Bug#17928281 'CHECK_PERFORMANCE_SCHEMA()' LEAVES 'CURRENT_THD' REFERRING
DESTRUCTED THD OBJ 

Prior to fix, function check_performance_schema() could leave
behind stale pointers in thread local storage, for the following keys:
- THR_THD (used by _current_thd)
- THR_MALLOC (used for memory allocation)
This is an unsafe practice, which can potentially cause crashes,
and that can cause other bugs when code is modified during maintenance.

With this fix, thread local storage keys used temporarily within
function check_performance_schema() are cleaned up after use.
2013-12-11 11:15:23 +01:00
Rich Prohaska
2924878769 #141 fix another open close race 2013-12-10 17:16:57 -05:00
Rich Prohaska
12e3e629a4 #141 fix table open and close race 2013-12-09 15:55:53 -05:00
Rich Prohaska
610474f974 #150 cleanup indexing cursor when a txn is retired 2013-12-08 16:36:37 -05:00
Rich Prohaska
b65e6e3d74 #141 redo table open and close locking to avoid table opening pileup 2013-12-05 11:59:34 -05:00
Rich Prohaska
7e71d5fd62 #142 remove tokudb meta dictionary 2013-12-03 13:50:34 -05:00
Rich Prohaska
dde0c43553 #142 remove tokudb_meta_mutex 2013-12-03 13:34:21 -05:00
Rich Prohaska
11e4b8b84c Tokutek/mysql#10 use DB_TYPE_TOKUDB in mysql 5.5 2013-12-02 14:49:08 -05:00
Rich Prohaska
affe5ac600 #15 set the tokudb plugin type to DB_TYPE_TOKUDB 2013-12-02 12:46:28 -05:00
Sergei Golubchik
a3b99778fc 5.2 merge 2013-12-02 12:32:43 +01:00
Rich Prohaska
4c988a01bc #17 support mariadb clustering option 2013-12-01 17:56:16 -05:00
Sergei Golubchik
7e431dc379 5.1 merge 2013-12-01 20:12:19 +01:00
Sergei Golubchik
f534708bd6 MDEV-5266 MySQL:57657 - Temporary MERGE table with temporary underlying is broken by ALTER
Fix ha_myisammrg::update_create_info() to do what ha_myisammrg::append_create_info() does -
take sub-table names from TABLE_LIST, not reverse engineer tablefile names.

Backport praveenkumar.hulakund@oracle.com-20120127081643-u7dxy23i8yyqarm7 from mysql-5.6
2013-11-29 20:21:05 +01:00
Rich Prohaska
2df023d3dd Tokutek/mariadb#12 rebase to mariadb-5.5.34 2013-11-28 09:51:21 -05:00
Sergei Golubchik
c2839e2cf2 mysql-test: allow suite.pm add its suite to the default list.
run tokudb suites by default.
mark big and slow tests tokudb.change_column_all_1000_1 and
tokudb.change_column_all_1000_10 test as --big
2013-11-27 21:58:36 +01:00
Rich Prohaska
215d477904 #147 change column names in the tokudb_file_map 2013-11-22 06:33:16 -05:00
Rich Prohaska
3840ef6b44 #87 grab exclusive MDL in the tokudb alter table commit function 2013-11-21 17:42:54 -05:00
Sergei Golubchik
98c609248b set CMP0022 policy to avoid cmake warnings 2013-11-20 11:50:27 +01:00
Michael Widenius
bbda717e93 Fixed compiler errors and warnings
extra/jemalloc/src/ctl.c:
  Fixed compiler warning
include/mysql/service_logger.h:
  Fixed compile failure with clang compiler
storage/maria/ma_check.c:
  Fixed compiler warning
support-files/compiler_warnings.supp:
  Suppressed warnings in jemalloc
tests/bug25714.c:
  Fixed compiler warning
2013-12-02 22:22:43 +02:00
Elena Stepanova
f130443707 Fixes for storage_engine tests 2013-11-28 20:02:51 +04:00
Elena Stepanova
253ed701e9 A fix for MySQL#65146 introduced a new warning.
Minor wording changes in skip messages.
2013-11-28 19:54:07 +04:00
Jan Lindström
a5e236db54 Add additional srv_use_fallocate guard for completing the IO with
read.
2013-11-28 11:34:43 +02:00
Jan Lindström
57a70a635a MDEV-5355: InnoDB assertion at shutdown if posix_fallocate is used in ut_a(node->n_pending == 0 || node->space->stop_new_ops);
Analysis: When filespace is extended there is first prepare for IO. But if
posix_fallocate is used there was no complete IO causing assertion
at shutdown indicating that all IO is not finished.

Fix: If posix_fallocate is used to extend the filespace, there
is no need to wait for IO to complete, thus we treat this
operation as a read operation. We need to mark IO as
completed or there would be assertion on shutdown at
fil_node_close_file() because all pending IO is not finished.
2013-11-27 20:24:52 +02:00
Sergei Golubchik
af2848a423 Percona-Server-5.5.34-rel32.0 merge 2013-11-19 15:43:22 +01:00
Sergei Golubchik
ff41edab6c merge with ft-engine and ft-index up to tag:tokudb-7.1.0 2013-11-19 15:35:31 +01:00
Sergei Golubchik
fa3f8a18b2 mysql-5.5.34 merge
(some patches reverted, test case added)
2013-11-19 13:16:25 +01:00
Sergei Golubchik
efab095c7f MDEV-5236 Status variables are not all listed alphabetically
sort xtradb status variables
2013-11-19 13:11:42 +01:00
Jan Lindström
e730c91688 Added test case for new system variable innodb_use_stacktrace and made sure that it can be used only on startup. Fixed compiler problems on solaris and other platforms that do not contain necessary headers and functions. 2013-11-15 15:24:42 +02:00
Jan Lindström
338587d2f4 MDEV-5247: DB locked up at btr0cur.c line 568. Additional fixes to inconsistent usage of have_LRU_mutex and added additional debug assertions to guard incorrect usage of this mutex. Fixes issues found on additional testing and mysql test suite. 2013-11-15 11:32:02 +02:00
Rich Prohaska
466b63aa48 #146 add debug trace to tokudb info schema tables 2013-11-14 21:32:38 -05:00
Jan Lindström
10467ec7b3 Fix compiler error introduced on revision 3937, make sure that stackdump is compiled only on __linux__. 2013-11-14 14:27:46 +02:00
Jan Lindström
5d1ec1b951 MDEV-5247: DB locked up at btr0cur.c line 568. There is inconsistent and non logical usage of have_LRU_mutex and incorrect value on ha_innodb.cc when buf_LRU_free_block is called. Additionally, for future long semaphore wait cases added a new configuration variable innodb_use_stacktrace. If this variable is true a signal handler for SIGUSR2 is installed when InnoDB server starts and when a long semaphore wait is detected at sync/sync0array.c we send SIGUSR2 signal to waiting thread and thread that has acuired RW-latch. For both threads a full stacktrace is produced as well as its is possible. 2013-11-14 12:57:28 +02:00
Sergei Golubchik
ea78785b8b MDEV-4723 "State" column of SHOW PROCESSLIST returns wrong values (non-ascii chars) for some states
allocate thd_proc_info string in thd memroot, not on the stack, so that it
won't be overwritten while another thread might be printing it
2013-11-11 22:53:40 +01:00
Sergei Golubchik
fb46f35f05 mark ft-index cmake variables as advanced 2013-11-11 17:20:10 +01:00
Sergei Golubchik
db635ab590 MDEV-5124 cmake failure when fullhostname is not resolved
expand fullhostname inside the string, to have an empty string, not nothing,
when fullhostname is not defined
2013-11-11 09:30:48 +01:00
Sergei Golubchik
3d57c343e5 MDEV-5038 put tokudb into the server package 2013-11-11 09:30:35 +01:00
Rich Prohaska
fb6d749f2f start port of tokudb to mariadb 10 2013-11-10 16:45:11 -05:00
Rich Prohaska
b8d7ee9795 basic tokudb running in mysql 5.7 2013-11-09 16:55:12 -05:00
Elena Stepanova
700397a8e2 Fix for overlayed include files on Windows and a test case 2013-11-10 14:37:32 +04:00
Michael Widenius
afa49d7919 Fixed core dump when doing "SET GLOBAL innodb_buffer_pool_evict='uncompressed'"
storage/xtradb/handler/ha_innodb.cc:
  Fixed wrong last argument to buf_LRU_free_block(): The LRU chain is already locked by this function.
2013-11-05 20:28:24 +02:00
Rich Prohaska
76a9489f9b Tokutek/mysql56#5 optimize read only transactions 2013-11-04 09:45:42 -05:00
unknown
52dea41052 Merge 5.3->5.5 2013-10-29 18:50:36 +02:00
unknown
f4cf756204 Testcase i_innodb.innodb-alter-restart.test fails on some Windows platforms
possibly since it was introduced in the patch for Bug#16720368 around 
2013-04-30.  This fix is simply to adjust the mtr.add_suppression() lines
in the testcase and to add a missing "\n" in the error message.

Approved by Marko in RB 3746
2013-10-29 11:39:04 -05:00
unknown
5ce11d8b4c MariaDB made be compiled by gcc 4.8.1
There was 2 problems:
  1) coping/moving of the same type (usually casting) as sizeof() (solved in different ways depends on the cause);
  2) using 'const' in SSL_CTX::getVerifyCallback() which return object (not reference) and so copy of the object will be created and 'const' has no sens.
2013-10-29 17:50:13 +02:00
Mattias Jonsson
6d483cf3ab post-push fix for bug#17565888/bug#14621190 2013-10-28 17:08:31 +01:00
Rich Prohaska
97f1989efb compile when tokudb row format compression types are not defined 2013-10-24 08:30:19 -04:00
Rich Prohaska
a8af167fe3 tokutek/mysql56#23 turn on extended keys for tokudb 2013-10-23 12:30:07 -04:00
Zardosht Kasheff
62abb74a6c refs Tokutek/mongo#645, fix call to hot_optimize 2013-10-21 16:22:01 -04:00
Mattias Jonsson
7a524cee32 post-push fix for bug17565888. 2013-10-19 15:29:51 +02:00
Mattias Jonsson
a91fcaf460 post-push fix for bug17565888.
Too restrictive assertion, failing during purge
2013-10-18 23:49:35 +02:00
Mattias Jonsson
e6a734a7cf post-push fix for bug17565888.
Too restrictive assertion, can fail during purge
2013-10-18 23:39:15 +02:00
Rich Prohaska
43dec55024 #131 make fast and small aliases for quicklz and lzma 2013-10-18 15:25:37 -04:00
Mattias Jonsson
20f579ea16 Bug#17565888: UP TO 75% INCREASE IN DBT3 QUERY (Q7) EXECUTION TIME
Regression from bug#14621190 due to disabled optimistic restoration
of cursor, which required full key lookup instead of verifying
if previously positioned btree cursor could be reused.

Fixed by enable optimistic restore and adjust cursor afterward.

rb#3324 approved by Marko.
2013-10-18 19:25:59 +02:00
Rich Prohaska
dc4e26d618 #131 make small and fast aliases for quicklz and lzma 2013-10-18 13:01:59 -04:00
Rich Prohaska
09ce3fad57 #128 change the comment on the lock timeout session variable 2013-10-17 11:50:57 -04:00
Anil Toshniwal
7c3d3f192e Bug#17513737 INTRODUCE CHECK TABLE...QUICK
--Implemented CHECK TABLE...QUICK.
  Introduce CHECK TABLE...QUICK that would skip the btr_validate_index()
  and btr_search_validate() call, and count the no. of records in each index.

Approved by Marko and Kevin. (rb#3567).
2013-10-17 18:09:04 +05:30
Rich Prohaska
056b8ee352 #127 make tokudb_loader_memory_size a session variable 2013-10-15 10:29:48 -04:00
Rich Prohaska
d7e467295e #128 change tokudb_lock_timeout to session variable 2013-10-10 16:25:57 -04:00
Praveenkumar Hulakund
c66a037dca Bug#17474166 - EXECUTING STATEMENT LIKE 'SHOW ENGINE INNODB'
AND 'KILL SESSION' LEAD TO CRASH               

Analysis:
--------
This situation occurs when the connection executes query 
"show engine innodb status" and this connection is killed by
executing statement "kill <con>" by another connection.

In function "innodb_show_status", function "stat_print"
is called to print the status but return value of function
is not checked.  After killing connection, if write to 
connection fails then error is returned and same is set
in Diagnostic area. Since FALSE is returned from
"innodb_show_status" now, assert to check no error
is set in function "set_eof_status" (called from
my_eof) is failing. 

Fix:
----
Changed code to check return value of function "stat_print"
in "innodb_show_status".
2013-10-09 13:32:31 +05:30
Rich Prohaska
ef6add4cac #122 change default compression to zlib and add a session variable to control create info row format 2013-10-07 09:11:51 -04:00
rich prohaska
1e46d54027 tokutek/ft-engine#94 tokutek/ft-index#80 configure an upper bound on loader memory reservations
Merge branch 'loadermem80'
2013-10-07 08:38:50 -04:00
Yasufumi Kinoshita
f071aca09f Merge mysql-5.1 to mysql-5.5. 2013-10-07 15:17:56 +09:00
Yasufumi Kinoshita
4db0c831a5 Bug#17431533 : FAILING ASSERTION: INDEX->PAGE != 0XFFFFFFFF AFTER DISCARDING TABLESPACE
ha_innobase::records_in_range() should return HA_POS_ERROR for the table during discarded without requesting pages.
The later other handler method should treat the error correctly.

Approved by Sunny in rb#3433
2013-10-07 15:16:31 +09:00
Rich Prohaska
36737f6c36 tokutek/ft-index#76 add US Patent 8,489,638 2013-10-04 16:44:43 -04:00
Rich Prohaska
e0ecc3f2f5 #121 change default basement node size to 64KB from 128KB 2013-10-04 16:05:34 -04:00
Rich Prohaska
26ccf76d45 tokutek/ft-index#80 tokutek/ft-engine#94 add tokudb_loader_memory_size system variable that controls the size of each loader memory size 2013-10-03 13:56:57 -04:00
Rich Prohaska
2277254793 #90 set tokudb_last_lock_timeout to a string parsable by the python json module 2013-10-02 12:14:14 -04:00
Mattias Jonsson
6ca4be9c03 Bug#14621190: HA_INNOBASE::INDEX_NEXT SKIPS A RECORD IF PREVIOUS
INDEX_READ_MAP HAD NO MATCH

If index_read_map is called for exact search and no matching records
exists it will position the cursor on the next record, but still having the
relative position to BTR_PCUR_ON.
This will make a call for index_next to read yet another next record,
instead of returning the record the cursor points to.

Fixed by setting pcur->rel_pos = BTR_PCUR_BEFORE if an exact
[prefix] search is done, but failed.

Also avoids optimistic restoration if rel_pos != BTR_PCUR_ON,
since btr_cur may be different than old_rec.

rb#3324, approved by Marko and Jimmy
2013-10-01 10:05:45 +02:00