Commit graph

8003 commits

Author SHA1 Message Date
Sergei Golubchik
86bc6b6ae8 tokudb: CLUSTERING=YES syntax for indexes 2013-09-09 13:34:50 +02:00
Sergei Golubchik
f2b5f1fdc6 tokudb: auto-increment not on the first keypart 2013-09-09 13:34:38 +02:00
Sergei Golubchik
36a22c1447 tokudb: extended keys support 2013-09-09 13:34:28 +02:00
Sergei Golubchik
c8a5da9676 tokudb: configure features, available in mariadb 5.5 2013-09-09 13:34:06 +02:00
Sergei Golubchik
905c9815f7 merge with git://github.com/Tokutek/ft-index.git up to tokudb-7.0.4 2013-09-09 11:32:39 +02:00
Sergei Golubchik
9b933e3be9 merge with git://github.com/Tokutek/ft-engine.git up to tokudb-7.0.4 2013-09-09 11:12:52 +02:00
Sergei Golubchik
6755944d08 remove PBXT 2013-08-30 11:25:49 +02:00
Sergei Golubchik
a73972bfea don't decide on extended keys by DB_TYPE_INNODB, use hton->flags 2013-08-26 21:13:17 +04:00
Jan Lindström
c97ae6b56f MDEV-4923 Incorrect merge on XtraDB os0file.c. Function os_file_set_atomic_writes returns TRUE when successfull and FALSE at failure. 2013-08-20 16:05:34 +03:00
Elena Stepanova
b9f61c14b7 Deliberate change in behavior introduced in MySQL 5.5.31 along with the
partitioning enhancement for Bug#14521864
2013-08-05 20:31:29 +04:00
Elena Stepanova
f596d28df6 Deliberate change in behavior introduced along with the fix for MDEV-4310 2013-08-05 18:30:12 +04:00
Sergey Petrunya
6fb1786584 Automatic merge 2013-07-31 13:37:01 +04:00
Rich Prohaska
d58b0523c8 #57 error our unpack_blobs if the blobs input buffer can not be parsed 2013-07-30 11:15:40 -04:00
zkasheff
ac2c1a4a31 Merge branch 'bugs/61' 2013-07-29 11:13:04 -04:00
zkasheff
9be800a47d refs #61, make blob expansion a non-hot operation 2013-07-29 11:11:47 -04:00
Vladislav Vaintroub
3ef0157daa MDEV-4815 - allow multiple mysql_server_init() / mysql_server_end() in the same process, for embedded library.
- Reset  static variables that are used to signal "init done"  for DBUG, in dbug_end()
- Set string server variables to NULL after memory for the value is freed - avoids double free()
- fix DBUG_ASSERTs that happened during reinitialization.
2013-07-29 16:03:41 +02:00
Sergey Petrunya
9a780a59d5 MDEV-4687: impossible where with < operation, but =-5 return one row
- Let _ma_record_pos() set SEARCH_PART_KEY when doing a search on
  a prefix of a [unique] key.  Otherwise, _ma_search_pos() would 
  find the first key equal to search key, and assume it is also 
  the last one, which will make a wrong estimate of key's position.

  A wrong key position may cause min_pos > max_pos and records_in_range()
  will return 0, which will make the optimizer think it's an impossible 
  range while in fact it is not.
2013-07-25 22:42:26 +04:00
unknown
9e13011efb Revert reverted patch (as workaround) to have no problem with ongoing fix. 2013-07-19 13:21:23 +03:00
Yoni Fogel
73ce418e2d Merge branch '6712' 2013-07-17 15:18:12 -07:00
Yoni Fogel
4780c8bbf7 Refs Tokutek/ft-engine#40 Rename c_restrict_to_range to c_set_bounds, delete c_pre_acquire_range_lock 2013-07-17 15:16:11 -07:00
Yoni Fogel
85a164fb09 Refs Tokutek/ft-engine/#40 Use c_restrict_to_range function to force cursor to keep track of prelocked range 2013-07-17 15:16:11 -07:00
unknown
c7973615e7 Revert of marko.makela@oracle.com-20130430103950-j353faze84zzk9xf for xtradb
(fix of http://bugs.mysql.com/bug.php?id=69623)
2013-07-17 17:03:59 +03:00
Sergei Golubchik
a5b534a08e merge Percona-Server-5.5.32-rel31.0.tar.gz 2013-07-16 19:30:39 +02:00
Sergei Golubchik
005c7e5421 mysql-5.5.32 merge 2013-07-16 19:09:54 +02:00
Sergey Petrunya
47c1b04079 MDEV-4778: Incorrect results from Aria/MyISAM SELECT using index with prefix length on TEXT column
Backport the fix olav.sandstaa@sun.com-20101102184747-qfuntqwj021imy9r:
"Fix for Bug#52660 Perf. regr. using ICP for MyISAM on range queries on an index containing TEXT" 
(together with further fixes in that code) into MyISAM and Aria.
2013-07-16 10:56:42 +04:00
Yoni Fogel
4279e16c5a Refs Tokutek/ft-index#28 attach gdb to the running process and extract information on fatal signal. 2013-07-05 14:11:31 -07:00
Zardosht Kasheff
e69e0cff9a refs #42, exit gracefully from ha_tokudb::create if we notice a field that is invalid 2013-06-24 15:07:20 -04:00
Sergei Golubchik
10be9160c1 MDEV-4466 Partitioned Aria table created by a previous version is recognized as TEST_SQL_DISCOVERY
Partitioning didn't store the name of default storage engine for partitions
in the frm file - it only store the typecode. Typecodes aren't stable, and
might vary depending on the order in which storage engines are loaded (can
be changed even from my.cnf without recompilation).

As a temporary workaround for 5.5, we hard-code Aria's typecode, to make sure it
never changes.
2013-06-15 16:02:43 +02:00
Sergei Golubchik
3ddfab5e3c MDEV-4444 Server crashes with "safe_mutex: Trying to destroy a mutex share->mutex that was locked" on attempt to recover an archive table 2013-06-13 15:13:13 +02:00
Sergei Golubchik
d0ce9cb832 MDEV-4468 Assertion `error != 0' fails or timeout occurs on select from a FEDERATED table which points at a non-existent table
Federated uses SHOW TABLE STATUS LIKE for ::info().
For nonexisting remote table it doesn't fail, but returns an empty result set.
We need to fake the error in the handler.
2013-06-07 15:35:13 +02:00
Michael Widenius
5730786041 Fixed some cache variables that could be set to higher value than what the code supported (size_t)
Fixed some cases that didn't work with > 4G buffers.
Fixed compiler warnings


include/mysql_com.h:
  Avoid compiler warning with strncmp()
sql-common/client.c:
  Fixed long comment; Added ()
sql/filesort.cc:
  Fix code to get filesort to work with big buffers
sql/sys_vars.cc:
  Fixed some cache variables that could be set to higher value than the size_t
  Limit query cache to ULONG_MAX as the query cache buffer variables are ulong
storage/federatedx/ha_federatedx.cc:
  Remove not used variable
storage/maria/ha_maria.cc:
  Fix that bulk_insert() works with big buffers
storage/maria/ma_write.c:
  Fix that bulk_insert() works with big buffers
storage/myisam/ha_myisam.cc:
  Fix that bulk_insert() works with big buffers
storage/myisam/mi_write.c:
  Fix that bulk_insert() works with big buffers
storage/sphinx/snippets_udf.cc:
  Fixed compiler warnings
2013-06-06 15:14:23 +03:00
Rich Prohaska
d081cd6732 strip carriage returns 2013-05-29 13:35:50 -04:00
Rich Prohaska
1200ca6dad svn #6706 add GPL headers to the tokudb handlerton 2013-05-28 08:33:07 -04:00
Rich Prohaska
d3f4822885 remove overactive assert in ha_tokudb::external_lock 2013-05-24 11:23:52 -04:00
Rich Prohaska
1b737dfda0 support upsert x=x+values(x) expressions 2013-05-24 11:01:40 -04:00
Rich Prohaska
ef67626331 #20 cleanup some static analysis issues 2013-05-24 10:59:07 -04:00
Rich Prohaska
a998803825 compile on mysql 5.6 2013-05-24 10:59:07 -04:00
Rich Prohaska
f239e32078 handle cardinality with alter add drop 2013-05-24 10:59:07 -04:00
Rich Prohaska
1b0261cc5c try to retain cardinality data after add/drop index 2013-05-24 10:59:07 -04:00
Vladislav Vaintroub
7ba2ff93ac MDEV-4548 - compile sphinx.so/dll and include into packages
replaced snippets_udf.cc with the latest version (2.0.8 from sphinxsource.com), fixed trivial errors on Windows.
It will be compiled and installed into plugins directory now.
2013-05-22 16:44:44 +02:00
Sergei Golubchik
d6315e29c8 MDEV-388 Creating a federated table with a non-existing server returns a random error code
(part 2)
2013-05-21 13:03:37 +02:00
Sergei Golubchik
62ab6982a4 MDEV-388 Creating a federated table with a non-existing server returns a random error code 2013-05-20 23:58:44 +02:00
Sergei Golubchik
d7a6c801ac 5.3 merge.
change maria.distinct to use a function that doesn't require ssl-enabled  builds
2013-05-20 12:36:30 +02:00
Sergei Golubchik
639a766096 5.2 merge 2013-05-20 11:13:07 +02:00
Sergei Golubchik
4ee5ae3e7f 5.1 merge 2013-05-20 10:53:04 +02:00
Rich Prohaska
51088922fb implement tokudb_fsync_log_period 2013-05-16 13:58:08 -04:00
Michael Widenius
d0265a632f When one does 'REPAIR TABLE', update uuid() to the current system
mysql-test/suite/maria/maria-autozerofill.result:
  Updated result
mysql-test/suite/maria/maria-autozerofill.test:
  Added test that zerofilled table should not give any warnings when table is used
mysql-test/suite/maria/maria-recovery2.result:
  More tests to make it easier to find bugs
mysql-test/suite/maria/maria-recovery2.test:
  More tests to make it easier to find bugs
storage/maria/ha_maria.cc:
  Set create_trid after repair (needed if table was moved from another system)
  Set uuid after repair (needed if table was moved from another system)
storage/maria/maria_chk.c:
  Reset share->state.create_trid if we reset share->state.create_rename_lsn.
  Make the table moveable
2013-05-14 18:32:16 +03:00
Michael Widenius
668306640e Fixed MDEV-4291: Assertion `trid >= info->s->state.create_trid' failure or data corruption (key points to record
outside datafile) on INSERT into an Aria table.

The isssue was that the check if a table was moved between systems didn't take into account that create_trid could be bigger than the current max trid on the new system.
This could only happen if one tried to move a table that one had just done a 'REPAIR TABLE' on.
Tables that one had run 'aria_chk --zerofill' on worked.

Fixed this by assuming that if create_trid is too big then the table has been moved from one system to another and we have to do an automatic zerofill.

Other fixed:

- Added a check to detect a wrong create_trid in 'check table'.
- aria_chk -dvv will now write out also the create_trid (to make future error finding easier)
- aria_chk --zerofill doesn't anymore require a aria_control_file
- Removed some warnings from safemalloc when using aria_chk, ma_test1 and ma_test2.


include/myisamchk.h:
  Removed wrong 'QQ' flags (the flags are used by myisamchk and aria_chk)
storage/maria/ha_maria.cc:
  maria_chk_status() can now also return an error.
storage/maria/ma_check.c:
  In maria_chk_status() check if create_trid value is too big.
storage/maria/ma_open.c:
  Changed check if table is moved so that we can detect wrong create_trid values.
  Don't set STATE_NOT_MOVABLE flag if we are doing repair/check. This was done so that aria_chk can print out the movable flag.
storage/maria/ma_test1.c:
  Added code to suppress memory leaks from safemalloc
storage/maria/ma_test2.c:
  Added code to suppress memory leaks from safemalloc
storage/maria/maria_chk.c:
  Added code to suppress memory leaks from safemalloc.
  Make help text a bit better for --HELP and --zerofill.
  Incresed version number.
  Don't require a control file if we are only doing --zerofill
  Print out 'create_trid' when doing --describe --verbose
storage/maria/unittest/ma_test_recovery.expected:
  Updated result file
2013-05-13 00:43:46 +03:00
Michael Widenius
3bd6e4b8ee MDEV-3999: Valgrind errors 'invalid write' or assorted server crashes on concurrent flow with partitioned Aria tables
MDEV-3989: Server crashes on import from MariaDB mysqldump export with partitioned Aria table.

Problem was that bulk insert in aria was not properly protected against concurrent selects.


storage/maria/ha_maria.cc:
  Move settings of file->state to _ma_block_start_trans() to ensure that lock_key_trees is not changed by a concurrent bulk_insert.
storage/maria/ma_check.c:
  Added DBUG_ASSERT()
storage/maria/ma_open.c:
  Set start_trans to ma_start_trans for default behaviour.
storage/maria/ma_pagecrc.c:
  Removed test for 'non_transactional' as a now_transactinal could be reset while a flush was happening.
storage/maria/ma_state.c:
  Moved setting of info->state from external_lock to start_trans to protect against concurrent running bulk inserts.
  This works as the other threads will wait in thr_lock() until bulk_insert is done and keys are re-generated.
storage/maria/ma_state.h:
  Added _ma_start_trans()
2013-05-12 11:29:16 +03:00
Michael Widenius
4e9bf37f1f MDEV-4280: Assertion `empty_size == empty_size_on_page' failure in ma_blockrec.c or ER_NOT_KEYFILE on query with DISTINCT and GROUP BY
This could happen when using Aria for internal temporary files (default case) and using DISTINCT.
_ma_scan_restore_block_record() didn't work correctly if there was rows inserted, updated or deleted on the handler
between calls to _ma_scan_remember_block_record() and _ma_scan_restore_block_record().
The effect was that some DISTINCT queries that used remove_dup_with_compare() could fail.

.bzrignore:
  Ignore sql_yacc.hh
mysql-test/suite/maria/r/distinct.result:
  Test case for MDEV-4280
mysql-test/suite/maria/t/distinct.test:
  Test case for MDEV-4280
mysql-test/t/mysql.test:
  Fixed test suite (we could get error -1 in some cases)
sql/sql_select.cc:
  Break loop if restart_rnd_next() gives an error
storage/maria/ha_maria.cc:
  scan_restore_pos() can return disk fault error.
storage/maria/ma_blockrec.c:
  _ma_scan_remember_block_record() did incorrectly update scan.dir instead of scan_save.dir .
  _ma_scan_restore_block_record() didn't work correctly if there was rows inserted,updated or deleted on the handler
  between calls to _ma_scan_remember_block_record() and _ma_scan_restore_block_record().
  Fixed by adding counters for row changes and reading the current scan page if changes had been made.
storage/maria/ma_blockrec.h:
  scan_restore_pos() can return disk fault error.
storage/maria/ma_delete.c:
  Increment row_changes
storage/maria/ma_scan.c:
  scan_restore_pos() can return disk fault error.
storage/maria/ma_update.c:
  Increment row_changes
storage/maria/ma_write.c:
  Increment row_changes
storage/maria/maria_def.h:
  scan_restore_pos() can return disk fault error.
2013-05-11 15:55:11 +03:00