Commit graph

1846 commits

Author SHA1 Message Date
Sergei Golubchik
2f20d297f8 Merge branch '10.0' into 10.1 2016-12-11 09:53:42 +01:00
Sergei Golubchik
3e8155c637 Merge branch '5.5' into 10.0 2016-12-09 16:33:48 +01:00
Sergei Golubchik
4a3acbcfd0 MDEV-11241 Certain combining marks cause MariaDB to crash when doing Full-Text searches
Don't assume that a word of n bytes can match a word of
at most n * charset->mbmaxlen bytes, always go for the worst.
2016-12-03 22:03:38 +01:00
Monty
97b21a1953 MDEV-10759 Fix Aria to support 2-byte collation IDs
- Used same fix as for MyISAM: High level collation byte stored in unused
  bit_end position.
- Moved language from header to base_info
- Removed unused bit_end part in HA_KEY_SEG
2016-12-02 14:05:16 +02:00
Vicențiu Ciorbaru
525e214111 Remove labs() warning from maria and myisam storage engines 2016-12-01 15:01:33 +01:00
Sergei Golubchik
6b1863b830 Merge branch '10.0' into 10.1 2016-08-25 12:40:09 +02:00
Sergei Golubchik
309c08c17c Merge branch '5.5' into 10.0 2016-08-10 19:19:05 +02:00
Sergei Golubchik
5e23b6344f MDEV-10506 Protocol::end_statement(): Assertion `0' failed upon ALTER TABLE
thd->clear_error() destroyed already existing error status
2016-08-07 11:02:42 +02:00
Sergei Golubchik
3361aee591 Merge branch '10.0' into 10.1 2016-06-28 22:01:55 +02:00
Sergei Golubchik
c081c978a2 Merge branch '5.5' into bb-10.0 2016-06-21 14:11:02 +02:00
Vicențiu Ciorbaru
12ae840375 Fix typo bug that cause myisam repair to fail
We need to return TRUE if got_error == 1, not error, which is
initialized to FALSE.
2016-06-16 22:04:24 +03:00
Vicențiu Ciorbaru
7ab7abdb51 Fix compilation failure when compiling with std=c90
Change variable declaration to be before any other statements.
2016-06-16 18:52:46 +03:00
Vicențiu Ciorbaru
1bf25092cb MDEV-10162: Update repair testcase 2016-06-14 19:17:29 +03:00
Vicențiu Ciorbaru
2b47832a2d Fixed compilation failure using clang
Both aria and myisam storage engines feature a logic path in
thr_find_all_keys that leads to undefined behaviour by bypassing the
initialization code of variables after my_thread_init().

By refactoring the nested logic into a separate function, this problem
is resolved.
2016-06-14 19:17:29 +03:00
Vicențiu Ciorbaru
6a34ba3130 [Code cleanup] Refactor duplicate code within myisam and maria sort.cc 2016-06-14 19:17:29 +03:00
Elena Stepanova
f9d453e893 Follow-up for commit 38b89a61c3
Altering a comment or a default field's value needs "NO_LOCK", not EXCLUSIVE -
storage_engine test result updated
2016-05-28 13:11:09 +03:00
Sergei Golubchik
87e3e67f43 Merge branch '10.0' into 10.1 2016-05-04 15:23:26 +02:00
Sergei Golubchik
872649c7ba Merge branch '5.5' into 10.0 2016-04-26 23:05:26 +02:00
Sergei Golubchik
b069d19284 Merge branch 'mysql/5.5' into 5.5 2016-04-20 15:25:55 +02:00
Sergei Golubchik
3b0c7ac1f9 Merge branch '10.0' into 10.1 2016-03-21 13:02:53 +01:00
Otto Kekäläinen
1777fd5f55 Fix spelling: occurred, execute, which etc 2016-03-04 02:09:37 +02:00
Vicențiu Ciorbaru
0e20137a80 [Code cleanup] Refactor duplicate code within myisam and maria sort.cc 2016-02-23 13:05:16 +02:00
Arun Kuruvila
83d20ca3fb 2016-02-23 11:41:03 +05:30
Vicențiu Ciorbaru
e7a89b46d4 Revert "[Code cleanup] Refactor duplicate code within myisam and maria sort.cc"
This reverts commit 727f92fe00.
2016-01-17 22:57:37 +02:00
Vicențiu Ciorbaru
acc837981f Revert "Fixed compilation failure on MacOSX"
This reverts commit df32495c85.
2016-01-17 22:57:27 +02:00
Vicențiu Ciorbaru
df32495c85 Fixed compilation failure on MacOSX
Due to a hack that has propagated to the maria storage engine, undefined
behaviour would result by bypassing the initialization code of variables
after my_thread_init().

By refactoring the nested logic into a separate function, this problem
is resolved.
2016-01-17 14:20:08 +02:00
Vicențiu Ciorbaru
727f92fe00 [Code cleanup] Refactor duplicate code within myisam and maria sort.cc
Setting read and write methods for the SORT_PARAM struct based on
variable length key is done within a single function.
2016-01-17 14:20:08 +02:00
Sergei Golubchik
923b6dc888 remove HA_ERR_INFO, use ER_ALTER_INFO 2015-12-23 15:59:56 +01:00
Monty
deef90eb75 Don't send error 0 to my_printf_error()
Fixed by adding HA_ERR_INFO as a informational warning to by used by MyISAM
This is used to inform when we create a backup copy of the data file.

Also improved informational messages when creating backup copies of data and index files
2015-12-23 11:57:42 +02:00
Sergei Golubchik
a2bcee626d Merge branch '10.0' into 10.1 2015-12-21 21:24:22 +01:00
Sergey Vojtovich
d09c60cff9 MDEV-8571 - After mysqloptimize sometimes one of the tables is marked as crashed
OPTIMIZE TABLE against MyISAM/Aria table may fail and leave stale temporary file
if mysql_file_create() returns 0 file descriptor. This was due to wrong
condition, which considered 0 as failure.

5.5 doesn't have fix for MDEV-5679, thus 0 file descriptor is always occupied
by stdin and this bug is not reproducible.

10.1 has fix for MDEV-8475, which hides this bug.

No test case since it mostly depends on how OS returns file descriptors.
2015-12-11 11:42:04 +04:00
Sergei Golubchik
abf9d35213 Merge branch 'mysql/5.5' into 5.5 2015-12-09 10:00:49 +01:00
Sreeharsha Ramanavarapu
63dc9c3f42 Bug #22214852: MYSQL 5.5 AND 5.6: MAIN.KEY AND OTHER
FAILURE WITH VALGRIND FOR RELEASE BUILD

Issue:
------
Initialization of variable with UNINIT_VAR is flagged by
valgrind 3.11.

SOLUTION:
---------
Initialize the variable to 0.

This is a backport of Bug# 14580121.
2015-11-18 08:04:04 +05:30
Sergei Golubchik
daf3551cce add missing DBUG_RETURN-s 2015-11-16 07:55:55 +01:00
Sreeharsha Ramanavarapu
5e9a50efc3 Bug #22023218: MYSQL 5.5: MAIN.FULLTEXT HAS VALGRIND ISSUES.
Issue
-----
This problem occurs when varchar columns are used in a
internal temporary table. The type of the field is set
incorrectly to the generic FIELD_NORMAL type. This in turn
results in an inaccurate calculation of the record length.
Valgrind issues will occur since initialization has not
happend for some bytes.

Fix
----
While creating the temporary table, the type of the field
needs to be to set FIELD_VARCHAR. This will allow myisam
to calculate the record length accurately.

This fix is a backport of BUG#13350136.
2015-11-03 07:43:54 +05:30
Sergei Golubchik
dfb74dea30 Merge branch '10.0' into 10.1 2015-10-12 00:37:58 +02:00
Elena Stepanova
80089a60e5 Follow-up for MDEV-8675 and MDEV-8676
type_spatial_indexes test is now be re-enabled, and the new result file
can be used for creating engine-specific rdiffs
2015-09-14 03:12:54 +03:00
Oleksandr Byelkin
0ce0b88080 MDEV-8450: PATCH] Wrong macro expansion in Query_cache::send_result_to_client()
Expression in macro protected by ()
2015-09-06 22:26:33 +02:00
Elena Stepanova
cf154cc9d2 MDEV-8676 Some storage_engine tests fail on 10.1
- foreign_keys: adjusted according to code changes;
- type_spatial: adjusted according to code changes;
- type_spatial_indexes (for MyISAM): disabled till MDEV-8675 is fixed
2015-08-26 02:09:57 +03:00
Monty
92fd658327 MDEV-8475 stale .TMM file causes MyiSAM and Aria engine to stop serving the table
Issue was two fold (both in MyISAM and Aria)
- optimize and repair failed if there was an old .TMM file around. As optimized and repair are protected against multiple execution, I decided to change so that we just truncate the file if it exists.
- I had missed to check for error condition if creation of the temporary index file failed. This caused the strange behaviour that it looked as if optimized would have worked once.
2015-08-18 11:18:57 +03:00
Monty
9bb8b74e99 Merge branch '10.1' of github.com:MariaDB/server into 10.1
Conflicts:
	sql/item_subselect.cc

Fixed also typo in comment
2015-07-09 14:47:32 +03:00
Monty
7332af49e4 - Renaming variables so that they don't shadow others (After this patch one can compile with -Wshadow and get much fewer warnings)
- Changed ER(ER_...) to ER_THD(thd, ER_...) when thd was known or if there was many calls to current_thd in the same function.
- Changed ER(ER_..) to ER_THD_OR_DEFAULT(current_thd, ER...) in some places where current_thd is not necessary defined.
- Removing calls to current_thd when we have access to thd

Part of this is optimization (not calling current_thd when not needed),
but part is bug fixing for error condition when current_thd is not defined
(For example on startup and end of mysqld)

Notable renames done as otherwise a lot of functions would have to be changed:
- In JOIN structure renamed:
   examined_rows -> join_examined_rows
   record_count -> join_record_count
- In Field, renamed new_field() to make_new_field()

Other things:
- Added DBUG_ASSERT(thd == tmp_thd) in Item_singlerow_subselect() just to be safe.
- Removed old 'tab' prefix in JOIN_TAB::save_explain_data() and use members directly
- Added 'thd' as argument to a few functions to avoid calling current_thd.
2015-07-06 20:24:14 +03:00
Alexander Barkov
9ad8ff666c MDEV-8415 utf8: compare broken bytes as "greater than any non-broken character" 2015-07-03 17:24:16 +04:00
Sergei Golubchik
658992699b Merge tag 'mariadb-10.0.20' into 10.1 2015-06-27 20:35:26 +02:00
Sergei Golubchik
810cf362ea Merge branch '5.5' into 10.0 2015-06-11 20:20:35 +02:00
Sergey Vojtovich
80f6b22593 MDEV-3870 - Valgrind warnings on OPTIMIZE MyISAM or Aria TABLE with disabled
keys

Fixed that OPTIMIZE TABLE against MyISAM/Aria table may write uninitialized key
root position for disabled keys.
2015-06-09 23:24:03 +04:00
Sergei Golubchik
f84f577aa1 Merge tag 'mysql-5.5.44' into bb-5.5-serg 2015-06-05 02:06:51 +02:00
Sergei Golubchik
d9340d6c8e MDEV-8126 encryption for temp files
IO_CACHE tempfiles encryption
2015-06-02 18:53:37 +02:00
Sergei Golubchik
318c826e93 always use my_b_pread() instead of mysql_file_pread()
when working with IO_CACHE's, don't access IO_CACHE::file directly
2015-06-02 18:53:37 +02:00
Sergei Golubchik
196e852983 misc IO_CACHE cleanups
* remove unused (and not implemented) WRITE_NET type
* remove cast in my_b_write() macro. my_b_* macros are
  function-like, casts are responsibility of the caller
* replace hackish _my_b_write(info,0,0) with the explicit
  my_b_flush_io_cache() in my_b_write_byte()
* remove unused my_b_fill_cache()
* replace pbool -> my_bool
* make internal IO_CACHE functions static
* reformat comments, correct typos, remove obsolete comments (ISAM)
* assert valid cache type in init_functions()
* use IO_ROUND_DN() macro where appropriate
* remove unused DBUG_EXECUTE_IF in _my_b_cache_write()
* remove unnecessary __attribute__((unused))
* fix goto error in parse_file.cc
* remove redundant reinit_io_cache() in uniques.cc
* don't do reinit_io_cache() if the cache was not initialized
  in ma_check.c
* extract duplicate functionality from various _my_b_*_read
  functions into a common wrapper. Same for _my_b_*_write
* create _my_b_cache_write_r instead of having if's in
  _my_b_cache_write (similar to existing _my_b_cache_read and
  _my_b_cache_read_r)
* don't call mysql_file_write() from my_b_flush_io_cache(),
  call info->write_function() instead
2015-06-02 18:53:37 +02:00