Commit graph

178932 commits

Author SHA1 Message Date
Alexander Barkov
aa582dedcb MDEV-13966 Parameter data type control for Item_temporal_func 2017-09-30 11:17:19 +04:00
Alexander Barkov
ca38b93e35 MDEV-13965 Parameter data type control for Item_longlong_func 2017-09-29 22:44:07 +04:00
Alexander Barkov
dc41bc14e0 MDEV-13964 Parameter data type control for Item_real_func 2017-09-29 20:14:55 +04:00
Alexander Barkov
7131a0a803 Merge remote-tracking branch 'origin/10.2' into bb-10.2-ext 2017-09-28 18:42:14 +04:00
Alexander Barkov
139441d0a0 A cleanup for MDEV-13919 sql_mode=ORACLE: Derive length of VARCHAR SP param...
The intent of this patch is to avoid copying arguments from
a pair "Item **args, uint arg_count" to List<Item> in
sp_head::execute_function(). If the number of a stored function parameters
is huge, such copying can affect performance.

Change:
1. Adding a new method Row_definition_list::adjust_formal_params_to_actual_params,
   which accepts a pair of "Item **, uint".
2. Modifying the code to use the new method:
   - the calls for sp_rcontext::retrieve_field_definitions() and
     Row_definition_list::adjust_formal_params_to_actual_params() have
     been moved from sp_rcontext::create() to sp_head::rcontext_create(),
     to handle different argument notations easier (Item** vs List<Item>).
   - sp_rcontext::create() now assumes that the passed Row_definition_list
     is already adjusted to the actual SP parameters, and all "TYPE OF"
     and "ROWTYPE OF" references are resolved.
3. Removing creation of List<Item> in sp_head::execute_procedure(),
   using the code with "Item**, uint" notation instead.
4. Improvement of the code for MDEV-10577:
   As a good side effect, this patch gets rid of double security context
   switch inside sp_head::execute_trigger():
   sp_rcontext is created when the context is already switched,
   so the second context switch inside sp_head::rcontext_create() was
   redundant. This is solved by adding a "bool switch_secutiry_ctx" parameter
   to rcontext_create(), so now execute_function() and execute_procedure()
   pass "true", while execute_trigger() passes "false".
2017-09-28 17:48:33 +04:00
Alexander Barkov
596baeb1bf A cleanup for MDEV-10577 and MDEV-13919: moving a few sp_rcontext methods
Moving a few methods from sp_rcontext to different classes:

- Table_ident::resolve_table_rowtype_ref
- Qualified_column_ident::resolve_type_ref
- Row_definition_list::resolve_table_rowtype_ref
- Row_definition_list::adjust_formal_params_to_actual_params

It easier to reuse these methods this way in the future.
2017-09-28 17:26:23 +04:00
Alexander Barkov
3a6d94428f Fixing a warning introduced by MDEV-13919 ("true" instread of "return true") 2017-09-28 17:00:42 +04:00
Marko Mäkelä
de7c2e5e54 Avoid implicit conversion from unsigned to signed 2017-09-28 15:12:00 +03:00
Monty
5a0cd753be Added missing test if table is transactional or not in Aria
- The line was accidently removed by dd8474b1dc
- The effect of the missing test was just a few extra malloc when creating
  internal temporary tables. Nothing critical, but better got get fixed.
2017-09-28 11:59:28 +03:00
Alexander Barkov
c9a01420cf Additional tests for MDEV-13919 sql_mode=ORACLE: Derive length of VARCHAR... 2017-09-28 11:05:27 +04:00
Daniel Bartholomew
8d006b9b12 bump the VERSION 2017-09-27 18:25:32 -04:00
Monty
06f7a7620f Fixed compiler warning 2017-09-27 22:19:39 +03:00
Monty
2fdbe15032 Correct test output after variable comment change 2017-09-27 22:19:26 +03:00
Vladislav Vaintroub
c6e8d66e59 Fix buildbot error on windows.
Update.rdiff fle

Also, introduce my_popen()/my_fgets() wrapper function for popen()/fgets()
in mysqltest to workaround a popen() bug in Windows C runtime,
mentioned in MDEV-9409

This workaround was used previously for "exec". From now on, it is also
used are used also for "perl" snippets.
2017-09-27 19:06:06 +00:00
halfspawn
f44d5de689 MDEV-13919 sql_mode=ORACLE: Derive length of VARCHAR SP parameters with no length from actual parameters 2017-09-27 16:49:40 +02:00
Eugene Kosov
fd2c5d19d0 fix a data race
reapply 6192f0bffa

TSAN warnings count decreased from 206 to 195
2017-09-27 13:47:56 +04:00
Alexander Barkov
d387bc89ed MDEV-13907 compoind.test fails in build-bot for bb-10.2-ext 2017-09-26 08:03:08 +04:00
Monty
a02b81daea Moved autosetting of host_cache_size and back_log to proper place
- Clean up formulas and comments for host_cache_size and back_log
- Added test of autoset (for host_cache_size)
- Marked open_files_limit as auto_set
2017-09-26 00:13:04 +03:00
Marko Mäkelä
86c3ba65aa Merge 10.2 into bb-10.2-ext 2017-09-25 21:45:44 +03:00
Marko Mäkelä
742263df4f MDEV-13256 innodb.truncate_debug fails in buildbot
Ensure that no adaptive hash index exists for any system tables,
so that the blocked TRUNCATE TABLE t1 will not block the concurrent
TRUNCATE TABLE t2.
2017-09-25 21:44:54 +03:00
Marko Mäkelä
7dcb8816a1 Merge 10.1 into 10.2 2017-09-25 13:46:54 +03:00
Will
8acb2b7b28 README.md - Secure (HTTPS) Links
Made a few links in README.md secure (https).
2017-09-25 13:51:15 +04:00
Marko Mäkelä
84be33abe0 Merge 10.0 into 10.1 2017-09-25 09:50:24 +03:00
Marko Mäkelä
19d21b9366 Cherry-pick the MDEV-13898 test changes from 10.2 to 10.0 2017-09-25 09:34:15 +03:00
Marko Mäkelä
21614f4a85 MDEV-13898 Corruption during online table-rebuilding ALTER of ROW_FORMAT=REDUNDANT tables
This bug is a regression caused by the code refactoring in
commit f5a833c3e0. It was not present
in any release of the MariaDB server. The bug affects table-rebuilding
ALTER TABLE when the source table is in ROW_FORMAT=REDUNDANT and
contains no virtual columns.

row_log_table_low_redundant(): Log virtual column data only if
virtual columns are present.
2017-09-25 09:29:27 +03:00
Varun Gupta
f91eb71e1c MDEV-8840: ANALYZE FORMAT=JSON produces wrong data with BKA
The issue was that r_loops, r_rows and r_filtered in ANALYZE FORMAT= JSON were not
calculated for the table on which we were performing the MRR scan in the BKA join
Fixed this by adding respective counter in the JOIN_TAB_SCAN_MRR::open and JOIN_TAB_SCAN_MRR::next
2017-09-24 23:37:57 +05:30
Varun Gupta
ea2162b6aa MDEV-11846: ERROR 1114 (HY000) table full when performing GROUP BY
The problem is there is an overflow for the key_file_length.
Added the maximum limit for the key_file_length
2017-09-24 23:33:44 +05:30
Marko Mäkelä
78b63425a3 MDEV-13899 IMPORT TABLESPACE may corrupt ROW_FORMAT=REDUNDANT tables
The ALTER TABLE…IMPORT TABLESPACE adjustment code that was introduced by
WL#5522 in MySQL 5.6 is incorrectly invoking rec_get_status() on a
ROW_FORMAT=REDUNDANT record to determine if a record is a leaf page record.
The function rec_get_status(rec) is only to be called on
ROW_FORMAT=COMPACT, DYNAMIC or COMPRESSED records.
2017-09-24 10:11:16 +03:00
Vladislav Vaintroub
7128fefa4c Fix compile with -DWITHOUT_DYNAMIC_PLUGINS on Unix 2017-09-23 23:23:05 +02:00
Sergei Golubchik
80b9ce3593 MDEV-11553 Can't restore a PERSISTENT column that uses DATE_FORMAT()
3-argument form of DATE_FORMAT
2017-09-23 20:22:46 +02:00
Sergei Golubchik
1320ad5b92 Merge branch '10.2' into bb-10.2-ext 2017-09-23 20:22:30 +02:00
Sergei Golubchik
88adfd0cea compiler warning 2017-09-23 20:21:49 +02:00
Sergei Golubchik
b75ca7e086 cleanup: remove a duplicate check for GIT_EXECUTABLE 2017-09-23 20:21:44 +02:00
Sergei Golubchik
d1d3aff985 ignore generated file 2017-09-23 20:21:39 +02:00
Alexander Barkov
840f1310cb Fixing a few -Wconversion warnings 2017-09-23 15:48:47 +04:00
Vladislav Vaintroub
b652430f00 Fix tests 2017-09-22 23:59:28 +02:00
Alexander Barkov
884bd1d61b MDEV-13863 sql_mode=ORACLE: DECODE does not treat two NULLs as equivalent 2017-09-23 00:55:28 +04:00
Elena Stepanova
cd2a85e763 Updated list of unstable tests for 10.2.9 2017-09-22 21:47:38 +03:00
Elena Stepanova
d8fe5fa131 Updated list of unstable tests for 10.1.27 release 2017-09-22 17:54:23 +03:00
Sergei Golubchik
ca3c8d9b58 shut out Connect cmake-time warning about missing Findlibmondgodoc.cmake 2017-09-22 14:01:27 +02:00
Sergei Golubchik
68d1a598bc bugfix: copy timestamps correctly in INSERT...SELECT
Implement Field_timestamp::save_in_field(timestamp_field)
that stores timestamp values without converting them to MYSQL_TIME
and back, because this conversion is lossy around DST change time.
This fixes main.old-mode test.

This is 10.2 version of f8a800bec8
2017-09-22 14:01:26 +02:00
Sergei Golubchik
a5e1f60b31 bugfix: ALTER TABLE and TIMESTAMPs around DST change time
Implement a special Copy_func function for timestamps, that copies
timestamps without converting them to MYSQL_TIME (the conversion is
lossy around DST change time).

This fixes ALTER TABLE part of main.old-mode test.

This is 10.2 version of f4f48e0621
2017-09-22 14:01:26 +02:00
Sergei Golubchik
bc4409ab4e MDEV-13868 cannot insert 1288481126 in a timestamp column in Europe/Moscow
make insert NULL into a timestamp mark the field as having an
explicit value. So that the field won't be assigned the value
again in TABLE::update_default_field()

make Item_func_now_local::save_in_field(timestamp_field) not to go
through MYSQL_TIME - this conversion is lossy around DST change times.
This fixes inserting a default value into a timestamp field.
2017-09-22 13:58:00 +02:00
Sergei Golubchik
a753caf135 update rdiff after merge 2017-09-22 13:43:32 +02:00
Alexander Barkov
c39a744616 MDEV-13864 (final) Change Item_func_case to store the predicant in args[0] 2017-09-22 12:45:34 +04:00
Marko Mäkelä
e0ebe3d083 Merge 10.0 into 10.1 2017-09-22 10:31:49 +03:00
Marko Mäkelä
f6cb4f0a19 MDEV-13814 Extra logging when innodb_log_archive=ON
log_group_read_log_seg(): Only display the message during recovery,
not during normal operation. When the XtraDB configuration parameter
innodb_log_archive is set, this function will be called during
normal operation.
2017-09-22 10:28:14 +03:00
Alexander Barkov
e12390a3bd MDEV-13864 (partial) Change Item_func_case to store the predicant in args[0]
This is a preparatory step for MDEV-13864.
It does not change behavior in any ways. It simply splits methods into smaller peaces.
The intent of this separate patch is to make more readable the main patch for
MDEV-13864 (which will actually move the predicant to args[0]).

1. Splitting fix_length_and_dec() into smaller pieces, adding:
  - bool aggregate_then_and_else_arguments(THD *thd);
  - bool aggregate_switch_and_when_arguments(THD *thd);

2. Splitting find_item() into smaller pieces, adding:
  - Item *find_item_searched();
  - Item *find_item_simple();

3. Splitting print() into smaller pieces, adding:

  - void print_when_then_arguments(String *str, enum_query_type query_type,
                                   Item **items, uint count);
  - void print_else_argument(String *str, enum_query_type query_type, Item *item)

4. Moving the maybe_null handling part related to ELSE from fix_length_and_dec()
   to fix_fields(), as in all other Item_func's.

5. Removing the unused String* argument from find_item().

6. Moving find_item() from public to private, as it's not needed outside.
2017-09-22 10:51:36 +04:00
Sergei Golubchik
f1ce69f3a9 Merge branch '10.1' into 10.2
But without f4f48e06215..f8a800bec81 - fixes for MDEV-12672
and related issues. 10.2 specific fix follows...
2017-09-22 02:27:00 +02:00
Sergei Golubchik
f8a800bec8 bugfix: copy timestamps correctly in INSERT...SELECT
don't do it via MYSQL_TIME, that conversion is lossy
around DST change dates.
2017-09-21 22:03:28 +02:00