- 15 May, 2018 1 commit
-
-
Galina Shalygina authored
The logic and the implementation scheme are similar with the MDEV-9197 Pushdown conditions into non-mergeable views/derived tables How the push down is made on the example: select * from t1 where a>3 and b>10 and (a,b) in (select x,max(y) from t2 group by x); --> select * from t1 where a>3 and b>10 and (a,b) in (select x,max(y) from t2 where x>3 group by x having max(y)>10); The implementation scheme: 1. Search for the condition cond that depends only on the fields from the left part of the IN subquery (left_part) 2. Find fields F_group in the select of the right part of the IN subquery (right_part) that are used in the GROUP BY 3. Extract from the cond condition cond_where that depends only on the fields from the left_part that stay at the same places in the left_part (have the same indexes) as the F_group fields in the projection of the right_part 4. Transform cond_where so it can be pushed into the WHERE clause of the right_part and delete cond_where from the cond 5. Transform cond so it can be pushed into the HAVING clause of the right_part The optimization is made in the Item_in_subselect::pushdown_cond_for_in_subquery() and is controlled by the variable condition_pushdown_for_subquery. New test file in_subq_cond_pushdown.test is created. There are also some changes made for setup_jtbm_semi_joins(). Now it is decomposed into the 2 procedures: setup_degenerate_jtbm_semi_joins() that is called before optimize_cond() for cond and setup_jtbm_semi_joins() that is called after optimize_cond(). New setup_jtbm_semi_joins() is made in the way so that the result of its work is the same as if it was called before optimize_cond(). The code that is common for pushdown into materialized derived and into materialized IN subqueries is factored out into pushdown_cond_for_derived(), Item_in_subselect::pushdown_cond_for_in_subquery() and st_select_lex::pushdown_cond_into_where_clause().
-
- 11 May, 2018 1 commit
-
-
Sergey Vojtovich authored
Less ifdefs, disable main.connect-abstract until libmariadb is updated.
-
- 10 May, 2018 1 commit
-
-
Daniel Black authored
The functionality of the socket system variable is extended here such that a preciding '@' indicates that the socket will be an abstract socket. Thie socket name wil be the remainder of the name after the '@'. This is consistent with the approached used by systemd in socket activation. Thanks to Sergey Vojtovich: On OS X sockaddr_un is defined as: struct sockaddr_un { u_char sun_len; u_char sun_family; char sun_path[104]; }; There is a comment in man 7 unix (on linux): " On Linux, the above offsetof() expression equates to the same value as sizeof(sa_family_t), but some other implementations include other fields before sun_path, so the offsetof() expression more portably describes the size of the address structure. " As such, use the offsetof for Linux and use the previous sizeof(UNIXaddr) for non-unix platforms as that's what worked before and they don't support abstract sockets so there's no compatibility problem.. strace -fe trace=networking mysqld --skip-networking --socket @abc ... ... [pid 10578] socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0) = 22 [pid 10578] setsockopt(22, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0 [pid 10578] bind(22, {sa_family=AF_UNIX, sun_path=@"abc"}, 6) = 0 [pid 10578] listen(22, 80) = 0 ... Version: '10.3.6-MariaDB-log' socket: '@abc' port: 0 Source distribution $ lsof -p 10578 mysqld 10578 dan 22u unix 0x00000000087e688c 0t0 4787815 @abc type=STREAM
-
- 07 May, 2018 1 commit
-
-
Ian Gilfillan authored
-
- 13 Apr, 2018 5 commits
-
-
Sergei Golubchik authored
-
Andrei Elkin authored
Recent changes in semisync initialization via MDEV-13073 introduced instantiation of THD too early from the server components pov which led to segfault. Fixed with relocating the semisync component initialization to later time when thread specific memory can be used.
-
Jan Lindström authored
Fixed typo on select that is executed only when something unexpected happens.
-
Jan Lindström authored
MDEV-12632: Source and destination overlap in memcpy, encryption.innodb-discard-import-change fails in buildbot with valgrind Use block->page.offset for checking page number.
-
Jan Lindström authored
Problem was that we did not delete explain information when Galera must replay a query. Could not find easily repeatable test case that would not cause other problems.
-
- 12 Apr, 2018 10 commits
-
-
Sergei Golubchik authored
followup for 339b9055 don't use $opt_gdb for --client-gdb
-
Sergei Golubchik authored
mark CONNECTION_ID() as returning *unsigned* number
-
Sergei Golubchik authored
fix versioning.partition failures: * Make the test stable by setting timestamp to fixed values.
-
Jacob Mathew authored
The error occurs because of how the character set and collation are chosen for stored procedure parameters that have a character data type. If the character set and collation are not explicitly stated in the declaration, the server chooses the database character set and collation in effect at routine creation time. To fix the problem, I added explicit character set and collation attributes for the stored procedure parameters in the install_spider.sql script. Author: Jacob Mathew. Reviewer: Kentoku Shiba. Merged From: bb-10.3-MDEV-15692
-
Vladislav Vaintroub authored
It was on for alpha stages of 10.3, and now we're past that.
-
Vicențiu Ciorbaru authored
-
Jan Lindström authored
MDEV-12632: Source and destination overlap in memcpy, encryption.innodb-discard-import-change fails in buildbot with valgrind Problem was that if tablespace was encrypted we try to copy also page 0 from read buffer to write buffer that are in that case the same memory area. fil_iterate When tablespace is encrypted or compressed its first page (i.e. page 0) is not encrypted or compressed and there is no need to copy buffer.
-
Jan Lindström authored
MDEV-12632: Source and destination overlap in memcpy, encryption.innodb-discard-import-change fails in buildbot with valgrind Problem was that if tablespace was encrypted we try to copy also page 0 from read buffer to write buffer that are in that case the same memory area. fil_iterate When tablespace is encrypted or compressed its first page (i.e. page 0) is not encrypted or compressed and there is no need to copy buffer.
-
Jan Lindström authored
Wait until rotation has ended and shutdown before grep to make sure that dirty pages are on datafiles.
-
Vicențiu Ciorbaru authored
If we use hostnames, it will fail during name resolution on UNIX systems
-
- 11 Apr, 2018 5 commits
-
-
Vicentiu Ciorbaru authored
Also fix perfschema.hostcache_ipv6_max_con. The test case makes use of a debug switch to execute some special code. The code does hostname replacement. Every hostname sent during connect phase becomes santa.claus.ipv4.example.com (or ipv6). This causes a connection from root@localhost to fail, as root is not registered as santa claus user. The failure is only apparent on Windows as Unix systems make use of sockets, which bypass the name resolution check entirely.
-
Vladislav Vaintroub authored
Fix 10.2-specific bug - copy-back is not prepared to handle system tablespaces with absolute path.
-
Jan Lindström authored
Wait until rotation has ended and shutdown before grep to make sure that dirty pages are on datafiles.
-
Marko Mäkelä authored
row_undo_step(): If innodb_fast_shutdown=3 has been requested, abort the rollback of any non-DDL transactions. Starting with MDEV-12323, we aborted the rollback of recovered transactions. The transactions would be rolled back on subsequent server startup. trx_roll_report_progress(): Renamed from trx_roll_must_shutdown(), now that the shutdown check has been moved to the only caller. trx_commit_low(): Allow mtr=NULL for transactions that are aborted on rollback. trx_rollback_finish(): Clean up aborted transactions to avoid assertion failures and memory leaks on shutdown. This code was previously in trx_rollback_active(). trx_rollback_to_savepoint_low(), trx_rollback_for_mysql_low(): Remove some redundant assertions.
-
Igor Babaev authored
The implementations of the convert_to_basic_const_item() virtual function for the Item_cache classes should call cache_value() when value_cached == NULL.
-
- 10 Apr, 2018 16 commits
-
-
Vladislav Vaintroub authored
Also, shorten the test so it usually runs 2 seconds, not 3.
-
Vicențiu Ciorbaru authored
-
Vicențiu Ciorbaru authored
There was a missing argument to service_manager_extend_timeout call and the signness of arguments did not match.
-
Alexander Barkov authored
-
Sergei Golubchik authored
numerous fixes for CREATE ... SELECT with system versioning: In CREATE ... SELECT the table is created based on the result set, field properties do not count. That is * field invisibility is *not* copied over * AS ROW START/END is *not* copied over * the history is *not* copied over * system row_start/row_end fields can *not* be created from the SELECT part
-
Aleksey Midenkov authored
[closes tempesta-tech#472]
-
Sergei Golubchik authored
MDEV-15391 Server crashes in JOIN::fix_all_splittings_in_plan or Assertion `join->best_read < double(1.79...e+308L)' failed vers_setup_conds() used to AND all conditions on row_start/row_end columns and store it either in the WHERE clause or in the ON clause for some table. In some cases this caused ON clause to have conditions for tables that aren't part of that ON's join. Fixed to put a table's condition always in the ON clause of the corresponding table. Removed unnecessary ... `OR row_end IS NULL` clause, it's not needed in the ON clause. Simplified handling on PS and SP.
-
Sergei Golubchik authored
fix parsing of the AS OF clause
-
Eugene Kosov authored
get_schema_column_record(): print 'WITHOUT SYSTEM VERSIONING` in 'EXTRA' for such fields
-
Sergei Golubchik authored
--gdb now accepts an argument, it will be passed to gdb as a command. multiple commands can be separated by a (non-standard and not escapable) delimiter - semicolon (;). Old usage with a bare --gdb continues to work too, of course.
-
Sergei Golubchik authored
-
Aleksey Midenkov authored
disallow system versioning for tables in mysql database
-
Sergei Golubchik authored
-
Sergei Golubchik authored
use named methods instead.
-
Sergei Golubchik authored
the function xxx_eq(a,b) returns true if two elements are equal and false if they are not.
-
Sergei Golubchik authored
strmake_buf() macro should only be used with char[] arrays, and never with char* pointers. To distinguish between the two we create a new variable of the same type and initialize it using array initializer, this causes compilation failure with pointers. The variable is unused and will be removed by the compiler. It's enough to do this check only with gcc, so it doesn't have to be portable.
-