summaryrefslogtreecommitdiff
path: root/sql
Commit message (Collapse)AuthorAgeFilesLines
* cleanup: s/const CHARSET_INFO/CHARSET_INFO/Sergei Golubchik2014-12-0412-23/+22
| | | | | as CHARSET_INFO is already const, using const on it is redundant and results in compiler warnings (on Windows)
* MDEV-6311 Add errors on CREATE SERVERSergei Golubchik2014-12-041-2/+15
| | | | | | | | fail CREATE SERVER foreign data wrapper is "mysql" and neither HOST nor SOCKET are specified. Also default PORT to 3306 (again, only for foreign data wrapper "mysql")
* cleanup: freshen up CREATE SERVER codeSergei Golubchik2014-12-046-153/+100
| | | | | | | | * pass LEX_STRING's from the parser, don't ignore the length only to strlen later * init LEX::server_options only for SERVER commands, not for every statement * don't put temporary values into a global persistent memroot but really it's just scratching a surface
* MDEV-6593 : domain_id based replication filtersNirbhay Choubey2014-12-038-77/+664
| | | | Implementation for domain ID based filtering of replication events.
* compiler warningSergei Golubchik2014-12-031-1/+1
|
* Merge branch '10.1' into bb-10.1-mergeSergei Golubchik2014-12-0325-551/+2099
|\
| * MDEV-7015: SET STATEMENT old_passwords has no effectMDEV-7015Oleksandr Byelkin2014-12-024-73/+76
| | | | | | | | | | Decision about algorihtm moved on prepare phase. Made possible to add mpore password algorithms.
| * MDEV-6996: SET STATEMENT default_week_format = .. has no effectOleksandr Byelkin2014-12-022-6/+9
| | | | | | | | Change constant with a system variable.
| * Code cleanupSergei Petrunia2014-12-023-84/+31
| |
| * EXPLAIN FORMAT=JSONSergei Petrunia2014-12-023-3/+32
| | | | | | | | | | Add support for semi-join strategies: FirstMatch, DuplicateWeedout, LooseScan.
| * EXPLAIN FORMAT=JSON: Do set usable_key_parts for key in the temp. tableSergei Petrunia2014-12-021-0/+1
| | | | | | | | | | | | If we didn't do it, SJ-Materialization table would appear to EXPLAIN JSON code as having different keyparts than it actually has. This caused unpredictable content in "used_key_parts"
| * Merge ../10.1 into bb-10.1-explain-jsonSergei Petrunia2014-12-0214-59/+914
| |\
| | * MDEV-7245: Incorrect display of subquery cache in union.resultSergei Petrunia2014-12-021-0/+3
| | | | | | | | | | | | - Do set nest_level and nest_level_base for fake_select_lex objects.
| * | EXPLAIN FORMAT=JSON: support SJ-MaterializationSergei Petrunia2014-12-013-73/+188
| | | | | | | | | | | | | | | | | | | | | | | | - Switch Explain data structure from "flat" representation of SJ-Materialization into nested one. - Update functions that print tabular output to operate on the nested structure. - Add function to generate JSON output.
| * | EXPLAIN FORMAT=JSON: support EXPLAIN FORMAT=JSON INSERT ...Sergei Petrunia2014-11-292-6/+16
| | |
| * | ANALYZE FORMAT=JSON: better output and testsSergei Petrunia2014-11-294-8/+55
| | | | | | | | | | | | | | | | | | - Print r_loops - Always print r_* members. Print NULL values if no scans took place - Added testcases.
| * | EXPLAIN FORMAT=JSON: Add support for non-merged semi-joinsSergei Petrunia2014-11-295-7/+69
| | |
| * | EXPLAIN FORMAT=JSON: support derived tablesSergei Petrunia2014-11-284-9/+57
| | |
| * | EXPLAIN FORMAT=JSON: Add support for single-table UPDATE/DELETE.Sergei Petrunia2014-11-287-193/+344
| | |
| * | EXPLAIN FORMAT=JSON: support join bufferingSergei Petrunia2014-11-273-12/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | - Basic support for JOIN buffering - The output is not polished but catches the main point: tab->select_cond and tab->cache_select->cond are printed separately. - Hash join support is poor still. - Also fixed identation in JOIN_TAB::save_explain_data
| * | EXPLAIN FORMAT=JSON: further developmentSergei Petrunia2014-11-277-14/+144
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Writing JSON: - Fix a bug in Single_line_formatting_helper - Add Json_writer_nesting_guard - safety class EXPLAIN JSON support - Add basic subquery support - Add tests for UNION/UNION ALL.
| * | Merge ../10.1-explain-json-r4 into 10.1Sergei Petrunia2014-11-2718-155/+1114
| |\ \
| | * | Make testsuite to passSergei Petrunia2014-11-211-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Drop all tables in explain_json.test - Tabular form should print ref='' when type='fulltext' (another peculiarity of the traditional EXPLAIN format) - String_list::append_str should allocate memory for \0, too - Some temporary code for EXPLAIN JSON and join buffering.
| | * | Better commentsSergei Petrunia2014-11-211-1/+7
| | | |
| | * | Better commentsSergei Petrunia2014-11-202-0/+24
| | | |
| | * | Merge ../10.1 into bb-10.1-explain-jsonSergei Petrunia2014-10-15126-21330/+12836
| | |\ \
| | * | | EXPLAIN FORMAT=JSON: produce used_key_parts, JSON-ish output for index_merge.Sergei Petrunia2014-08-144-39/+146
| | | | |
| | * | | EXPLAIN FORMAT=JSON: produce the 'ref' column.Sergei Petrunia2014-08-123-41/+48
| | | | |
| | * | | MDEV-6109: EXPLAIN JSONSergei Petrunia2014-08-122-16/+266
| | | | | | | | | | | | | | | | | | | | Add pretty-printing of possible_keys column.
| | * | | MDEV-6109: EXPLAIN JSONSergei Petrunia2014-08-096-20/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add first testcases - Don't overquote when printing conditions - Other small output fixes
| | * | | Merge 10.1 (with ANALYZE) and 10.1-explain-jsonSergei Petrunia2014-08-0914-104/+642
| | |\ \ \
| | | * | | MDEV-6109: EXPLAIN JSON10.1-explain-jsonSergei Petrunia2014-05-2714-111/+641
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - First code, "EXPLAIN FORMAT=JSON stmt" and "ANALYZE FORMAT=JSON stmt" work for basic queries. Complex constructs (e.g subqueries, etc) not yet supported. - No test infrastructure yet
* | | | | | Merge branch '10.0' into bb-10.1-mergeSergei Golubchik2014-12-02146-680/+1192
|\ \ \ \ \ \ | |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .bzrignore VERSION cmake/plugin.cmake debian/dist/Debian/control debian/dist/Ubuntu/control mysql-test/r/join_outer.result mysql-test/r/join_outer_jcl6.result mysql-test/r/null.result mysql-test/r/old-mode.result mysql-test/r/union.result mysql-test/t/join_outer.test mysql-test/t/null.test mysql-test/t/old-mode.test mysql-test/t/union.test packaging/rpm-oel/mysql.spec.in scripts/mysql_config.sh sql/ha_ndbcluster.cc sql/ha_ndbcluster_binlog.cc sql/ha_ndbcluster_cond.cc sql/item_cmpfunc.h sql/lock.cc sql/sql_select.cc sql/sql_show.cc sql/sql_update.cc sql/sql_yacc.yy storage/innobase/buf/buf0flu.cc storage/innobase/fil/fil0fil.cc storage/innobase/include/srv0srv.h storage/innobase/lock/lock0lock.cc storage/tokudb/CMakeLists.txt storage/xtradb/buf/buf0flu.cc storage/xtradb/fil/fil0fil.cc storage/xtradb/include/srv0srv.h storage/xtradb/lock/lock0lock.cc support-files/mysql.spec.sh
| * | | | | Fix wording in error log message, to be consistent with other messages ("IO ↵Kristian Nielsen2014-12-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | thread" -> "I/O thread").
| * | | | | MDEV-7144 Warnings "bytes lost" during server shutdown after running ↵Sergei Golubchik2014-11-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | connect.part_file test in buildbot
| * | | | | MDEV-7237: Parallel replication: incorrect relaylog position after ↵Kristian Nielsen2014-12-012-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | stop/start the slave The replication relay log position was sometimes updated incorrectly at the end of a transaction in parallel replication. This happened because the relay log file name was taken from the current Relay_log_info (SQL driver thread), not the correct value for the transaction in question. The result was that if a transaction was applied while the SQL driver thread was at least one relay log file ahead, _and_ the SQL thread was subsequently stopped before applying any events from the most recent relay log file, then the relay log position would be incorrect - wrong relay log file name. Thus, when the slave was started again, usually a relay log read error would result, or in rare cases, if the position happened to be readable, the slave might even skip arbitrary amounts of events. In GTID mode, the relay log position is reset when both slave threads are restarted, so this bug would only be seen in non-GTID mode, or in GTID mode when only the SQL thread, not the IO thread, was stopped.
| * | | | | MDEV-7149 Constant propagation erroneously applied for LIKEAlexander Barkov2014-11-281-1/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simply disallowing equality propagation into LIKE. A more delicate fix is be possible, but it would need too many changes, which is not desirable in 10.0 at this point.
| * | | | | Backporting a cleanup in boolean function from 10.1:Alexander Barkov2014-11-271-12/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Moving Item_bool_func2 and Item_func_opt_neg from Item_int_func to Item_bool_func. Now all functions that return is_bool_func()=true have a common root class Item_bool_func. This change is needed to fix MDEV-7149 properly.
| * | | | | MDEV-6582: DEBUG_SYNC does not reset mysys_var->current_mutex, causes ↵Kristian Nielsen2014-11-261-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | assertion "Trying to unlock mutex that wasn't locked" The bug was in DEBUG_SYNC. When waiting, debug_sync_execute() temporarily sets thd->mysys_var->current_mutex to a new value while waiting. However, if the old value of current_mutex was NULL, it was not restored, current_mutex remained set to the temporary value (debug_sync_global.ds_mutex). This made possible the following race: Thread T1 goes to KILL thread T2. In THD::awake(), T1 loads T2->mysys_var->current_mutex, it is set to ds_mutex, T1 locks this mutex. Now T2 runs, it does ENTER_COND, it sets T2->mysys_var->current_mutex to LOCK_wait_commit (for example). Then T1 resumes, it reloads mysys_var->current_mutex, now it is set to LOCK_wait_commit, T1 unlocks this mutex instead of the ds_mutex that it locked previously. This causes safe_mutex to assert with the message: "Trying to unlock mutex LOCK_wait_commit that wasn't locked". The fix is to ensure that DEBUG_SYNC also will restore mysys_var->current_mutex in the case where the original value was NULL.
| * | | | | MDEV-6903: gtid_slave_pos is incorrect after master crashKristian Nielsen2014-11-251-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a master slave restarts, it logs a special restart format description event in its binlog. When the slave sees this event, it knows it needs to roll back any active partial transaction, in case the master crashed previously in the middle of writing such transaction to its binlog. However, there was a bug where this rollback did not reset rgi->pending_gtid. This caused the @@gtid_slave_pos to be updated incorrectly with the GTID of the partial transaction that was rolled back. Fix this by always clearing rgi->pending_gtid in cleanup_context(), hopefully preventing similar bugs from turning up in other special cases where a transaction is rolled back during replication. Thanks to Pavel Ivanov for tracking down the issue and providing a test case.
| * | | | | MergeSergei Golubchik2014-11-2124-123/+179
| |\ \ \ \ \
| | * | | | | after merge fixes:Sergei Golubchik2014-11-211-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * adjust viossl.c to take account the new code (SSL_get_error is used now, cannot simply remap it) * remove unnecessary version check * update the test to 10.0
| | * | | | | 5.5 mergeSergei Golubchik2014-11-1912-57/+100
| | |\ \ \ \ \
| | | * \ \ \ \ 5.3 mergeSergei Golubchik2014-11-181-1/+7
| | | |\ \ \ \ \
| | | | * | | | | MDEV-6883 ST_WITHIN crashes server if (0,0) is matched to POLYGON((0 0)).Alexey Botchkov2014-11-151-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed the case when a polygon contains a single-point ring.
| | | | * | | | | MDEV-7068: MRR accessing uninitialised bytes, test case failure main.innodb_mrrSergey Petrunya2014-11-131-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport to 5.3: - Don't call index_reader->interrupt_read() if the index reader has returned all rows that matched its keys.
| | | * | | | | | MDEV-4513 Valgrind warnings (Conditional jump or move depends on ↵Sergei Golubchik2014-11-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | uninitialised value) in inflate on UNCOMPRESS
| | | * | | | | | MDEV-7113 difference between check_vcol_func_processor and ↵Sergei Golubchik2014-11-184-15/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | check_partition_func_processor MDEV-6789 segfault in Item_func_from_unixtime::get_date on updating table with virtual columns * prohibit VALUES in partitioning expression * prohibit user and system variables in virtual column expressions * fix Item_func_date_format to cache locale (for %M/%W to return the same as MONTHNAME/DAYNAME) * fix Item_func_from_unixtime to cache time_zone directly, not THD (and not to crash) * added tests for other incorrectly allowed (in vcols) functions to see that they don't crash
| | | * | | | | | MDEV-3940 Server crash or assertion `item->type() == Item::STRING_ITEM' ↵Sergei Golubchik2014-11-181-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | failure on LOAD DATA through a view with statement binary logging A "field" could be either an Item_field or (if loading into a view) an Item_direct_ref that references Item_field. Also: when iterating fields, use fields of the TABLE_LIST (table or view), not fields of a TABLE (actual underlying table - might have more columns).
| | | * | | | | | MDEV-6179: dynamic columns functions/cast()/convert() doesn't play nice with ↵Sergei Golubchik2014-11-082-13/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CREATE/ALTER TABLE When parsing a field declaration, grab type information from LEX before it's overwritten by further rules. Pass type information through the parser stack to the rule that needs it.