- 30 Dec, 2016 9 commits
-
-
Alexander Barkov authored
- Fixing Type_handler_short::name() to return "smallint" instead of "shortint". - Fixing test markers "End of 10.2 tests" and "End of 10.3 test"
-
Alexander Barkov authored
MDEV-11528 Split Item_func_min_max::val_xxx() and Item_func_min_max::get_date() into methods in Type_handler
-
Alexander Barkov authored
-
Marko Mäkelä authored
The configuration parameter innodb_use_fallocate, which is mapped to the variable srv_use_posix_fallocate, has no effect in MariaDB 10.2.2 or MariaDB 10.2.3. Thus the configuration parameter and the variable should be removed.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Alexander Barkov authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
- 29 Dec, 2016 11 commits
-
-
Marko Mäkelä authored
fsp_header_get_crypt_offset(): Remove. xdes_arr_size(): Remove. fsp_header_get_encryption_offset(): Make this an inline function. The correctness of this change was ensured with the following patch that ensures that the two functions returned the same value, only differing by FSP_HEADER_OFFSET (38 bytes): diff --git a/storage/innobase/fsp/fsp0fsp.cc b/storage/innobase/fsp/fsp0fsp.cc index f2a4c6bf218..e96c788b7df 100644 --- a/storage/innobase/fsp/fsp0fsp.cc +++ b/storage/innobase/fsp/fsp0fsp.cc @@ -850,6 +850,7 @@ fsp_parse_init_file_page( return(ptr); } +static ulint fsp_header_get_encryption_offset(const page_size_t&); /**********************************************************************//** Initializes the fsp system. */ void @@ -868,6 +869,31 @@ fsp_init(void) #endif /* Does nothing at the moment */ + + for (ulint sz = 4096; sz <= 65536; sz *= 2) { + ulint m; + if (sz <= 16384) { + for (ulint ph = 1024; ph <= sz; ph *= 2) { + const page_size_t ps(ph, sz, true); + ulint maria = fsp_header_get_crypt_offset(ps, &m), + oracle = fsp_header_get_encryption_offset(ps); + if (maria != oracle + 38) { + ib::error() << "zip size mismatch: " + << maria << "!=" << oracle + << "(" << ph <<","<<sz<<")" + << m; + } + } + } + const page_size_t p(sz, sz, false); + ulint maria = fsp_header_get_crypt_offset(p, &m), + oracle = fsp_header_get_encryption_offset(p); + if (maria != oracle + 38) { + ib::error() << "size mismatch: " + << maria << "!=" << oracle + << "(" <<sz<<")" << m; + } + } } /**********************************************************************//**
-
Marko Mäkelä authored
-
Sergei Golubchik authored
* some of these tests run just fine with InnoDB: -> s/have_xtradb/have_innodb/ * sys_var tests did basic tests for xtradb only variables -> remove them, they're useless anyway (sysvar_innodb does it better) * multi_update had innodb specific tests -> move to multi_update_innodb.test
-
Sergei Golubchik authored
-
Sergei Golubchik authored
-
Sergei Golubchik authored
-
Sergei Golubchik authored
-
Alexander Barkov authored
-
Alexander Barkov authored
Now after the patch for MDEV-11478 added a new method Type_handler::name(), using the new method in debug output to make test results for MDEV-11514 more readable (func_debug.result).
-
Alexander Barkov authored
-
Alexander Barkov authored
The problem happened because Item_ident_for_show::field_type() always returned MYSQL_TYPE_DOUBLE and ignored the actual data type of the referenced Field. As a result, the execution always used Item_ident_for_show::val_real() to send the default value of the field, so most default values for non-numeric types were displayed as '0'. This patch: 1. Cleanup: a. Removes Send_field::charsetnr, as it's been unused since introduction of Item::charset_for_protocol() in MySQL-5.5. b. Adds the "const" qualifier to Field::char_length(). This is needed for (5.a), see below. 2. Introduces a new virtual method Type_handler::charset_for_protocol(), returning item->collation.collation for string data types, or &my_charset_bin for non-string data types. 3. Changes Item::charset_for_protocol() from virtual to non-virtual. It now calls type_handler()->charset_for_protocol(). As a good side effect, duplicate code in Item::charset_for_protocol() and Item_temporal_hybrid_func::charset_for_protocol() is now gone. 4. Fixes Item_ident_for_show::field_type() to correctly return its data type according to the data type of the referenced field. This actually fixes the problem reported in MDEV-11672. Now the default value is sent using a correct method, e.g. val_str() for VARCHAR/TEXT, or val_int() for INT/BIGINT. This required additional changes: a. in DBUG_ASSERT in Protocol::store(const char *,size_t,CHARSET_INFO), This method is now used by mysqld_list_fields(), which (unlike normal SELECT queries) does not set field_types/field_pos/field_count. b. Item_ident_for_show::Item_ident_for_show() now set standard attributes (collation, decimals, max_length, unsigned_flag) according to the referenced field, to make charset_for_protocol() return the correct value and to make mysqld_list_fields() correctly send default values. 5. In order to share the code between Item_field::set_field() and Item_ident_for_show::Item_ident_for_show(): a. Introduces a new method Type_std_attributes::set(const Field*) b. To make (a) possible, moves Item::fix_char_length() from Item to Type_std_attributes, also moves char_to_byte_length_safe() from item.h to sql_type.h c. Additionally, moves Item::fix_length_and_charset() and Item::max_char_length() from Item to Type_std_attributes. This is not directly needed for the fix and is done just for symmetry with fix_char_length(), as these three methods are directly related to each other.
-
- 28 Dec, 2016 4 commits
-
-
Oleksandr Byelkin authored
Allocate password hash in statment memory
-
Oleksandr Byelkin authored
Allocate password hash in statment memory
-
Jan Lindström authored
MDEV-11656: 'Data structure corruption' IMPORT TABLESPACE doesn't work for encrypted InnoDB tables if space_id changed Problem was that for encryption we use temporary scratch area for reading and writing tablespace pages. But if page was not really decrypted the correct updated page was not moved to scratch area that was then written. This can happen e.g. for page 0 as it is newer encrypted even if encryption is enabled and as we write the contents of old page 0 to tablespace it contained naturally incorrect space_id that is then later noted and error message was written. Updated page with correct space_id was lost. If tablespace is encrypted we use additional temporary scratch area where pages are read for decrypting readptr == crypt_io_buffer != io_buffer. Destination for decryption is a buffer pool block block->frame == dst == io_buffer that is updated. Pages that did not require decryption even when tablespace is marked as encrypted are not copied instead block->frame is set to src == readptr. If tablespace was encrypted we copy updated page to writeptr != io_buffer. This fixes above bug. For encryption we again use temporary scratch area writeptr != io_buffer == dst that is then written to the tablespace (1) For normal tables src == dst == writeptr ut_ad(!encrypted && !page_compressed ? src == dst && dst == writeptr + (i * size):1); (2) For page compressed tables src == dst == writeptr ut_ad(page_compressed && !encrypted ? src == dst && dst == writeptr + (i * size):1); (3) For encrypted tables src != dst != writeptr ut_ad(encrypted ? src != dst && dst != writeptr + (i * size):1);
-
Marko Mäkelä authored
Replace all exit() calls in InnoDB with abort() [possibly via ut_a()]. Calling exit() in a multi-threaded program is problematic also for the reason that other threads could see corrupted data structures while some data structures are being cleaned up by atexit() handlers or similar. In the long term, all these calls should be replaced with something that returns an error all the way up the call stack.
-
- 27 Dec, 2016 3 commits
-
-
Elena Stepanova authored
MTR raises default wait_for_pos_timeout from 300 to 1500 when tests are run with valgrind. The same needs to be done for other replication-related waits
-
Alexander Barkov authored
-
Alexander Barkov authored
-
- 24 Dec, 2016 4 commits
-
-
Nirbhay Choubey authored
-
Daniel Bartholomew authored
-
Alexey Botchkov authored
Item_func_json_length fixed.
-
Alexey Botchkov authored
Array counter didn't increment after an item was found.
-
- 23 Dec, 2016 1 commit
-
-
Marko Mäkelä authored
fil_tablespace_iterate(): Call fil_space_destroy_crypt_data() to invoke mutex_free() for the mutex_create() that was done in fil_space_read_crypt_data(). Also, remember to free iter.crypt_io_buffer. The failure to call mutex_free() would cause sync_latch_meta_destroy() to access freed memory on shutdown. This affected the IMPORT of encrypted tablespaces.
-
- 22 Dec, 2016 7 commits
-
-
Marko Mäkelä authored
Copy and adapt the test from MySQL 5.7.17.
-
Marko Mäkelä authored
fil_space_crypt_cleanup(): Call mutex_free() to pair with fil_space_crypt_init(). fil_space_destroy_crypt_data(): Call mutex_free() to pair with fil_space_create_crypt_data() and fil_space_read_crypt_data(). fil_crypt_threads_cleanup(): Call mutex_free() to pair with fil_crypt_threads_init(). fil_space_free_low(): Invoke fil_space_destroy_crypt_data(). fil_close(): Invoke fil_space_crypt_cleanup(), just like fil_init() invoked fil_space_crypt_init(). Datafile::shutdown(): Set m_crypt_info=NULL without dereferencing the pointer. The object will be freed along with the fil_space_t in fil_space_free_low(). Remove some unnecessary conditions (ut_free(NULL) is OK). srv_shutdown_all_bg_threads(): Shut down the encryption threads by calling fil_crypt_threads_end(). srv_shutdown_bg_undo_sources(): Do not prematurely call fil_crypt_threads_end(). Many pages can still be written by change buffer merge, rollback of incomplete transactions, and purge, especially in slow shutdown (innodb_fast_shutdown=0). innobase_shutdown_for_mysql(): Call fil_crypt_threads_cleanup() also when innodb_read_only=1, because the threads will have been created also in that case. sync_check_close(): Re-enable the invocation of sync_latch_meta_destroy() to free the mutex list.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
Make some global fil_crypt_ variables static. fil_close(): Call mutex_free(&fil_system->mutex) also in InnoDB, not only in XtraDB. In InnoDB, sync_close() was called before fil_close(). innobase_shutdown_for_mysql(): Call fil_close() before sync_close(), similar to XtraDB shutdown. fil_space_crypt_cleanup(): Call mutex_free() to pair with fil_space_crypt_init(). fil_crypt_threads_cleanup(): Call mutex_free() to pair with fil_crypt_threads_init().
-
Jan Lindström authored
Try to stabilize test cases. These test behave badly when run in certain order.
-
Sergey Vojtovich authored
Merged fix for innodb_mysql from 5.7.
-
Vladislav Vaintroub authored
-
- 21 Dec, 2016 1 commit
-
-
Monty authored
-