summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* stop binlog background thread together with othersbb-fast-connectSergei Golubchik2016-06-043-11/+20
| | | | that fixes many rpl tests failures
* cleanup: thread_countSergei Golubchik2016-06-0414-68/+22
| | | | | | | move thread_count handling into THD: * increment thread_count in THD constructor * decrement thread_count in THD destructor * never modify thread_count directly!
* decrement thead_count *after* THD is destroyedSergei Golubchik2016-06-043-2/+4
| | | | | | | | because thread_count means just that: number of THDs and shutdown code looks at it to know when to free shared data structures that THD uses. This fixes random crashes in ~THD on shutdown
* fix the method nameSergei Golubchik2016-06-042-3/+3
| | | | | it's always assert_<statement>, not <do something>_if_<condition>
* THD:: cleanup() must be where it used toSergei Golubchik2016-06-041-2/+2
| | | | | | | between net_end() and ha_close_connection() this fixes lockups in main.locked_temporary-5955 and some other innodb tests.
* reset @@TIMESTAMP for COM_CHANGE_USERSergei Golubchik2016-06-043-1/+20
| | | | | this also fixes tokudb.type_year failure (in ./mtr tokudb.type_timestamp tokudb.type_year)
* fix XID comparisonSergei Golubchik2016-06-041-2/+2
| | | | | | | | | | | according to the standard, the gtrid/bqual pair must be "globally unique", so XIDs are equal if their gtrids and bquals are identical, formatID simply tells how gtrid/bqual were generated. But if formatID == -1 (it means "null") gtrid/bqual don't have any value at all. This fixes main.xa_sync failure in ./mtr main.quary_cache_debug main.xa_sync
* Reuse THD for new user connectionsMonty2016-06-0434-130/+220
| | | | | | | | | | | | | | - To ensure that mallocs are marked for the correct THD, even if it's allocated in another thread, I added the thread_id to the THD constructor - Added st_my_thread_var to thr_lock_info_init() to avoid a call to my_thread_var - Moved things from THD::THD() to THD::init() - Moved some things to THD::cleanup() - Added THD::free_connection() and THD::reset_for_reuse() - Added THD to CONNECT::create_thd() - Added THD::thread_dbug_id and st_my_thread_var->dbug_id. These are needed to ensure that we have a constant thread_id used for debugging with a THD, even if it changes thread_id (=connection_id) - Set variables.pseudo_thread_id in constructor. Removed not needed sets.
* Merge pull request #179 from ↵Jan Lindström2016-06-024-40/+0
|\ | | | | | | | | grooverdan/10.2-remove_btr_search_n_succ_AND_hash_fail MDEV-10168 - Remove btr_search_n_succ and btr_search_n_hash_fail counters
| * Remove btr_search_n_succ and btr_search_n_hash_fail countersDaniel Black2016-06-024-40/+0
|/
* Adding more tests for VIEWs with UNION.Alexander Barkov2016-06-022-0/+84
|
* MDEV-9154 : Remove workarounds (mainly dynamic function loading)Vladislav Vaintroub2016-06-0116-723/+62
| | | | for running obsolete versions of Windows
* fix compile error - inconsistent use of 'struct' and 'class' for TDC_elementVladislav Vaintroub2016-06-012-6/+12
|
* MDEV-6368: assertion xid_seqno > trx_sys_cur_xid_seqno (postfix)Nirbhay Choubey2016-06-013-3/+3
| | | | | - Fix build failure when built without wsrep (Win) - Update the expected warning in sys_vars.wsrep_start_position
* Move wait_for_mdl_deadlock_detector() call to tc_remove_table()Sergey Vojtovich2016-06-011-3/+2
| | | | | | | As a side effect tc_remove_all_unused_tables() has to call tc_wait_for_mdl_deadlock_detector() once per TABLE object now, while it called it only once before. This should be acceptable since actual wait will still be performed only once. It only adds redundant checks for all_tables_refs.
* Move table cache private functions out of headerSergey Vojtovich2016-06-012-155/+142
| | | | | | This is mostly needed to hide all references to free_tables, so that further implementation of multi-instance list can be done completely inside table_cache.cc
* Move common code to a separate functionSergey Vojtovich2016-06-011-26/+28
|
* MDEV-10101 Wrong error message of SELECT 1 UNION (SELECT 1 FROM t1 GROUP BY ↵Alexander Barkov2016-06-013-17/+97
| | | | 1 WITH ROLLUP)
* MDEV-10124 Incorrect usage of CUBE/ROLLUP and ORDER BY with GROUP_CONCAT(a ↵Alexander Barkov2016-06-013-14/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ORDER BY a) Allowing GROUP_CONCAT(... ORDER BY ..) in queries with ROLLUP. The story of the related code: 1. The original patch from Wax commit: 0b505fb437eedd1b31c99888247c2259539c095b date: Tue Mar 18 03:07:40 2003 opt_gorder_clause reused the regular order_clause, which already had some protection against ROLLUP queries: order_clause: ORDER_SYM BY { LEX *lex=Lex; if (lex->current_select->linkage != GLOBAL_OPTIONS_TYPE && lex->current_select->select_lex()->olap != UNSPECIFIED_OLAP_TYPE) { net_printf(lex->thd, ER_WRONG_USAGE, "CUBE/ROLLUP", "ORDER BY"); YYABORT; } } order_list; The assumption that ORDER BY in group_concat() had to have the same ROLLUP restriction (with order_clause) was wrong. Moreover, GROUP_CONCAT() in select_item_list was not affected by this restriction, because WITH ROLLUP goes after select_item_list and therefore sel->olap is always equal to UNSPECIFIED_OLAP_TYPE during select_item_list. GROUP BY was not affected for two reasons: - it goes before WITH ROLLUP and sel->olap is still UNSPECIFIED_OLAP_TYPE - Aggregate functions like AVG(), GROUP_CONCAT() in GROUP BY are not allowed So only GROUP_CONCAT() in HAVING and ORDER BY clauses were erroneously affected by this restriction. 2. Bug#27848 rollup in union part causes error with order of union commit: 3f6073ae63f9cb738cb6f0a6a8136e1d21ba0e1b Author: unknown <igor@olga.mysql.com> 2007-12-15 01:42:46 The condition in the ROLLUP protection code became more complex. Note, opt_gconcat_order still reused the regular order_clause. 3. Bug#16347426 ASSERTION FAILED: (SELECT_INSERT && !TABLES->NEXT_NAME_RESOLUTION_TABLE) || !TAB commit: 2d83663380f5c0ea720e31f51898912b0006cd9f author: Chaithra Gopalareddy <chaithra.gopalareddy@oracle.com> date: 2013-04-14 06:00:49 opt_gorder_clause was refactored not to use order_clause and to collect information directly to select->gorder_list. The ROLLUP protection code was duplicated from order_clause to the new version of opt_gorder_clause.
* MDEV-6368: assertion xid_seqno > trx_sys_cur_xid_seqnoNirbhay Choubey2016-05-3113-87/+219
| | | | | | | | | - Validate the specified wsrep_start_position value by also checking the return status of wsrep->sst_received. This also ensures that changes in wsrep_start_position is not allowed when the node is not in JOINING state. - Do not allow decrease in seqno within same UUID. - The initial checkpoint in SEs should be [0...:-1].
* Increase the version numberElena Stepanova2016-05-301-1/+1
|
* Follow-up for the previous commit - result change for a big testElena Stepanova2016-05-301-2/+2
|
* MDEV-3944: Allow derived tables in VIEWSOleksandr Byelkin2016-05-2815-57/+450
|
* sql_yacc.yy: Removing union_opt.Alexander Barkov2016-05-251-10/+14
| | | | | | Using /*empty*/, union_list, union_order_or_limit instead. This is to get rid of lex->current_select->braces easier (separately in union_list and in union_order_or_limit)
* Adding various tests for combinations ofAlexander Barkov2016-05-252-0/+439
| | | | UNION, ROLLUP, GROUP_CONCAT, for better coverage.
* Recording test results forgotten in 9a25c01f7848324dd63c64ea4e1c86ef1cebfbc8Alexander Barkov2016-05-251-1/+1
| | | | MDEV-10102 Disallow CREATE VIEW .. PROCEDURE ANALYSE() syntactically
* An sql_yacc.yy clean-upAlexander Barkov2016-05-241-9/+5
| | | | | | | | | | - Moving opt_union_order_or_limit inside union_opt, as it's not used in other places any more. - Changing union_opt to have no type. Earlier (before all MDEV-8909 dependency tasks) it had the <num> type, and it's return value was used to generate errors. Now union_opt does not need a return value because the grammar disallows ORDER and LIMIT clauses in wrong context.
* MDEV-10109 Disallow syntactically INSERT .. SELECT .. {ORDER BY ..| LIMIT ↵Alexander Barkov2016-05-245-27/+57
| | | | ..} .. UNION ..
* MDEV-10103 Disallow syntactically UNION SELECT .. PROCEDURE ANALYSE()Alexander Barkov2016-05-245-18/+62
|
* MDEV-10102 Disallow CREATE VIEW .. PROCEDURE ANALYSE() syntacticallyAlexander Barkov2016-05-2311-44/+85
|
* MDEV-10051 Fix subselect to return a syntax error instead of "Incorrect ↵Alexander Barkov2016-05-2310-41/+37
| | | | usage of UNION and LIMIT"
* MDEV-10095 Fix derived tables to return a syntax error instead of "Illegal ↵Alexander Barkov2016-05-2110-48/+61
| | | | usage of UNION and LIMIT"
* sql_yacc.yy: Removing unnecessary init_nested_join() and end_nested_join()Alexander Barkov2016-05-211-15/+1
| | | | from select_derived_init.
* A derived_query_specification clean-upAlexander Barkov2016-05-201-7/+6
| | | | | | | | | | | | | | | | | | | | (to simplify further MDEV-8909 changes) 1. Better semantic readability: - Moving get_select_lex_derived inside select_derived_init and decomposing it into get_select_lex and $1->init_nested_join(lex->thd) - Moving DBUG_ASSERT($1 == Lex->current_select) inside select_derived_init Now init_nested_join() and end_nested_join() reside inside the same rule select_derived_init. (It's very likely that they can be further removed, as there are no any joins in this rule). 3. Better grammar readability: Moving SELECT_SYM from select_derived_init to derived_query_specification. It's easier to read a rule when it starts from a terminal symbol.
* MDEV-8429: Change binlog_checksum default to match MySQL 5.6.6+Oleksandr Byelkin2016-05-2037-1499/+1571
|
* MDEV-10080 Derived tables allow double LIMIT clauseAlexander Barkov2016-05-203-9/+35
| | | | | | | | | | | | | | | | 1. Moving the "| get_select_lex_derived select_derived_init" part of select_derived into a separate new rule derived_query_specification. 2. Using derived_query_specification directly in select_derived_union rather than in select_derived. 3. Moving the sequence "opt_order_clause opt_limit_clause opt_select_lock_type" from select_derived2 to select_derived_union, after derived_query_specification. Effectively, the parser now does not go through the sequence "opt_order_clause opt_limit_clause ... opt_union_order_or_limit" any more. This fixes the problem with double LIMIT clause and removes 2 shift/reduce conflicts.
* This patch is a cleanup simplifying upcomingAlexander Barkov2016-05-191-20/+16
| | | | | | | | | | | | | | | | | | | "MDEV-8909 union parser cleanup" changes. When the server parses a query like SELECT * FROM (SELECT 1); a sequence of calls st_select_lex::init_nested_join() .. st_select_lex::end_nested_join() was performed two times (tested in gdb). Both pairs of calls seem to be redundant for a query like this, because there are actually no any joins here. This patch moved "table_ref_select" inside "select_derived", which revealed that one the pairs was definitely redundant: After this transformation we got an init_nested_join() immediately followed by end_nested_join() for the same st_select_lex, which has no any sense. So this pair of calls was removed.
* MDEV-9947: COM_MULTI united responseOleksandr Byelkin2016-05-1710-23/+57
|
* MDEV-6353 my_ismbchar() and my_mbcharlen() refactoringAlexander Barkov2016-05-1728-270/+118
|
* MDEV-10079 sql_yacc.yy: Remove non-parenthesized SELECT from table_refAlexander Barkov2016-05-174-10/+12
|
* sql_yacc.yy: Adding a helper rule get_select_lex_derived,Alexander Barkov2016-05-171-11/+14
| | | | to simplify further MDEV-8909 refactoring.
* MDEV-10078 sql_yacc.yy: Remove non-parenthesized SELECT from table_factorAlexander Barkov2016-05-171-23/+34
|
* Merge branch '10.2' of github.com:MariaDB/server into 10.2Igor Babaev2016-05-161-10/+19
|\
| * sql_yacc.yy cleanup, to simplify further changes for MDEV-8909.Alexander Barkov2016-05-161-10/+19
| | | | | | | | | | | | | | | | | | - Moving "SELECT_SYM select_init2_derived opt_table_expression" from query_term into a new separate rule query_specification, and using query_specification in the beginning of query_term. - query_term now does not have a %type, query_specification has a %type instead. This removes duplicate code that returns Lex->current_select->master_unit()->first_select();
* | Fixed bug mdev-10058.Igor Babaev2016-05-163-15/+70
|/ | | | | This was a bug in the parser. As a result it could accept queries with invalid derived tables if they used With clauses.
* attempt to fix debian build (gssapi plugins require 10.1 client or server ↵Vladislav Vaintroub2016-05-143-4/+8
| | | | instead of 10.2
* sql_yacc.yy: adding a new rule union_head_non_top, to reuse some codeAlexander Barkov2016-05-131-15/+13
| | | | | between select_derived_union and query_expression_body. An upcoming patch for MDEV-10035 will also reuse union_head_non_top.
* Fix of PSI & COM_MULTIOleksandr Byelkin2016-05-131-0/+8
|
* sql_yacc.yy:Alexander Barkov2016-05-131-7/+4
| | | | | | | - Moving select_options_and_item_list from select_init2 to select_init and view_select_aux - Renaming select_init2 to select_init3 This will simplify upcoming sql_yacc.yy fixes (e.g. MDEV-10035, MDEV-8909).
* close_open_tables() is not meaningful anymoreSergey Vojtovich2016-05-101-19/+2
|