summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge.Igor Babaev2014-06-108-24/+91
|\
| * Fixed bug mdev-6071.Igor Babaev2014-06-108-24/+91
| | | | | | | | | | | | | | | | The method JOIN_CACHE::init may fail (return 1) if some conditions on the used join buffer is not satisfied. For example it fails if join_buffer_size is greater than join_buffer_space_limit. The conditions should be checked when running the EXPLAIN command for the query. That's why the method JOIN_CACHE::init has to be called for EXPLAIN commands as well.
* | MDEV-4440 IF NOT EXISTS in multi-action ALTER does not work when the problem ↵Alexey Botchkov2014-06-103-29/+116
| | | | | | | | | | | | | | | | is created by a previous part of the ALTER. Loops added to the handle_if_exists_option() to check the CREATE/DROP lists for duplicates.
* | Merge spider fixes.Sergey Vojtovich2014-06-095-60/+61
|\ \
| * | fix wrong result for Spider testKentoku SHIBA2014-06-101-49/+44
| | |
| * | fix for Spider build error by abort_loop on windowsKentoku SHIBA2014-06-103-10/+17
| | |
* | | 10.0-connectSergei Golubchik2014-06-0918-510/+539
|\ \ \
| * | | - Eliminate virtual columns from CSV and FMT table fieldsOlivier Bertrand2014-05-306-36/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | modified: storage/connect/colblk.h storage/connect/reldef.h storage/connect/tabfmt.cpp - Fix length specification and writing (when using FIELD_FORMAT) of DECIMAL columns modified: storage/connect/ha_connect.cc storage/connect/tabdos.cpp - Add the D field_format option (specifying the decimal separator character) modified: storage/connect/tabdos.cpp storage/connect/tabdos.h storage/connect/tabfmt.cpp
| * | | - Fix a bug causing the tabname option to be ignored when the connectionOlivier Bertrand2014-05-272-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | string was not an URL but a server name. Also make the dbname option to be recignized in create (was only seached in option_list) modified: storage/connect/ha_connect.cc storage/connect/tabmysql.cpp
| * | | - Fix writing header of void CONNECT DBF tables on first insert. An errorOlivier Bertrand2014-05-1211-463/+465
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | occured when the table definition had a special column that was not skipped from the header. modified: storage/connect/filamdbf.cpp - Update some test cases to reflect a change of error message generated when trying to update or delete a read only table. modified: storage/connect/mysql-test/connect/r/csv.result storage/connect/mysql-test/connect/r/dbf.result storage/connect/mysql-test/connect/r/fix.result storage/connect/mysql-test/connect/r/ini.result storage/connect/mysql-test/connect/r/vec.result storage/connect/mysql-test/connect/t/csv.test storage/connect/mysql-test/connect/t/dbf.test storage/connect/mysql-test/connect/t/fix.test storage/connect/mysql-test/connect/t/ini.test storage/connect/mysql-test/connect/t/vec.test
| * | | - Fix wrong error "Invalid offset for CVS table" when a specialOlivier Bertrand2014-05-093-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | column is defined in a CSV table (MDEV-6187) modified: storage/connect/ha_connect.cc storage/connect/reldef.h storage/connect/tabfmt.cpp
* | | | MDEV-6320 - disable spider.spider_fixesSergei Golubchik2014-06-091-0/+1
| | | |
* | | | bzr ignore 'pcre/test*grep'Sergei Golubchik2014-06-091-0/+1
| | | |
* | | | merge of MDEV-6047unknown2014-06-0924-183/+189
|\ \ \ \ | |_|/ / |/| | |
| * | | MDEV-6047: Make exists_to_in optimization ON by defaultunknown2014-06-0924-183/+189
| | | |
* | | | merge Spider 3.2.4Kentoku SHIBA2014-06-0822-325/+1295
| | | |
* | | | MergeSergey Petrunya2014-06-073-0/+57
|\ \ \ \
| * | | | MDEV-6308: Server crashes in table_multi_eq_cond_selectivity with ...Sergey Petrunya2014-06-073-0/+57
| | | | | | | | | | | | | | | | | | | | - In table_cond_selectivity(), reset keyuse variable between the loops.
* | | | | MDEV-5976: TokuDB: Wrong query result using mrr=onSergey Petrunya2014-06-063-1/+201
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | - Key_value_records_iterator::get_next() should pass pointer to the key to handler->ha_index_next_same(). Because of a typo bug, pointer-to-pointer was passed instead in certain cases.
* | | | MDEV-6102 Comparison between TIME and DATETIME does not use CURRENT_DATEAlexander Barkov2014-06-0610-22/+151
| | | | | | | | | | | | | | | | | | | | MDEV-6101 Hybrid functions do not add CURRENT_DATE when converting TIME to DATETIME
* | | | revert tokudb changes that caused crashesSergei Golubchik2014-06-064-15/+14
| | | |
* | | | 5.5.38 mergeSergei Golubchik2014-06-06132-3328/+2524
|\ \ \ \
| * | | | fix range.testmariadb-5.5.38Sergei Golubchik2014-06-053-1/+56
| | | | |
| * | | | MDEV-6105: Emoji unicode character string search query makes mariadb ↵Sergey Petrunya2014-06-053-0/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | performance down - When range optimizer cannot the lookup value into [VAR]CHAR(n) column, it should produce: = "Impossible range" for equality = "no range" for non-equalities.
| * | | | Merge 5.3->5.5Alexander Barkov2014-06-051-2/+9
| |\ \ \ \
| | * | | | Fixing a valgrind warning introduced in the previous changeset:Alexander Barkov2014-06-051-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "have_warnings" was set to an uninialized value when converting a negative number to datetime.
| * | | | | Merge 5.3->5.5Alexander Barkov2014-06-0424-75/+220
| |\ \ \ \ \ | | |/ / / /
| | * | | | MDEV-4858 Wrong results for a huge unsigned value inserted into a TIME columnAlexander Barkov2014-06-0420-51/+194
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MDEV-6099 Bad results for DATE_ADD(.., INTERVAL 2000000000000000000.0 SECOND) MDEV-6097 Inconsistent results for CAST(int,decimal,double AS DATETIME) MDEV-6100 No warning on CAST(9000000 AS TIME)
| * | | | | MDEV-6163: Error while executing an update query that has the same table in ↵unknown2014-06-043-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a sub-query We have to run the derived table prepare before the unique table check to mark the derived table (in this case the unique table check can turn that table to materialized one).
| * | | | | mark tokudb in 5.5 as MariaDB_PLUGIN_MATURITY_GAMMA, not ↵Sergei Golubchik2014-06-031-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | MariaDB_PLUGIN_MATURITY_ALPHA.
| * | | | | cmake: mark AIO_LIBRARY, EVENT_LIBRARY, GROFF, NROFF as advanced;Sergei Golubchik2014-06-035-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | use -ggdb3 if supported
| * | | | | Add a test case for MySQL's:Sergei Golubchik2014-06-032-4/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug #18167356: EXPLAIN W/ EXISTS(SELECT* UNION SELECT*) WHERE ONE OF SELECT* IS DISTINCT FAILS. the bugfix itself was not merged - MariaDB doesn't have this bug.
| * | | | | mysql-5.5.38 mergeSergei Golubchik2014-06-0329-93/+529
| |\ \ \ \ \
| | * | | | | Increment release version to resolve upgrade conflict issuemysql-5.5.38Balasubramanian Kandasamy2014-05-111-1/+4
| | | | | | |
| | * | | | | Patch for Bug#18511348 (DDL_I18N_UTF8 AND DDL_I18N_KOI8RAlexander Nozdrin2014-04-303-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ARE PERMANENTLY SKIPPED IN 5.5/5.6). The problem was that some result files were not updated, so the tests were skipped. The fix is to record updated result files.
| | * | | | | Bug #18167356: EXPLAIN W/ EXISTS(SELECT* UNION SELECT*)mithun2014-04-282-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | WHERE ONE OF SELECT* IS DISTINCT FAILS. ISSUE: ------ There are 2 issues related to explain union. 1. If we have subquery with union of selects. And, one of the select need temp table to materialize its results then it will replace its query structure with a simple select from temporary table. Trying to display new internal temporary table scan resulted in crash. But to display the query plan, we should save the original query structure. 2. Multiple execution of prepared explain statement which have union of subqueries resulted in crash. If we have constant subqueries, fake select used in union operation will be evaluated once before using it for explain. During first execution we have set fake select options to SELECT_DESCRIBE, but did not reset after the explain. Hence during next execution of prepared statement during first time evaluation of fake select we had our select options as SELECT_DESCRIBE this resulted in improperly initialized data structures and crash. SOLUTION: --------- 1. If called by explain now we save the original query structure. And this will be used for displaying. 2. Reset the fake select options after it is called for explain of union. sql/sql_select.cc: Reset the fake select options after it is called for explain of union sql/sql_union.cc: If called by explain but not from select_describe and we need a temp table, then we create a temp join to preserve original query structure.
| | * | | | | BUG#17994219: CREATE TABLE .. SELECT PRODUCES INVALID STRUCTURE,Nisha Gopalakrishnan2014-04-283-4/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BREAKS RBR Analysis: -------- A table created using a query of the format: CREATE TABLE t1 AS SELECT REPEAT('A',1000) DIV 1 AS a; breaks the Row Based Replication. The query above creates a table having a field of datatype 'bigint' with a display width of 3000 which is beyond the maximum acceptable value of 255. In the RBR mode, CREATE TABLE SELECT statement is replicated as a combination of CREATE TABLE statement equivalent to one the returned by SHOW CREATE TABLE and row events for rows inserted. When this CREATE TABLE event is executed on the slave, an error is reported: Display width out of range for column 'a' (max = 255) The following is the output of 'SHOW CREATE TABLE t1': CREATE TABLE t1(`a` bigint(3000) DEFAULT NULL) ENGINE=InnoDB DEFAULT CHARSET=latin1; The problem is due to the combination of two facts: 1) The above CREATE TABLE SELECT statement uses the display width of the result of DIV operation as the display width of the column created without validating the width for out of bound condition. 2) The DIV operation incorrectly returns the length of its first argument as the display width of its result; thus allowing creation of a table with an incorrect display width of 3000 for the field. Fix: ---- This fix changes the DIV operation implementation to correctly evaluate the display width of its result. We check if DIV's results estimated width crosses maximum width for integer value (21) and if yes set it to this maximum value. This patch also fixes fixes maximum display width evaluation for DIV function when its first argument is in UCS2.
| | * | | | | - Support for enterprise packagesBalasubramanian Kandasamy2014-04-243-7/+79
| | |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Upgrade from MySQL-* packages - Fix Cflags for el7
| | | * | | | | updated optflags variable and cmake option for debug buildBalasubramanian Kandasamy2014-04-071-2/+3
| | | | | | | |
| | | * | | | | Fix Cflags for el7Balasubramanian Kandasamy2014-04-071-1/+6
| | | | | | | |
| | | * | | | | Changed permisison for filter-requires.sh and filter-provides.shBalasubramanian Kandasamy2014-04-042-0/+0
| | | | | | | |
| | | * | | | | Support for enterprise packagesBalasubramanian Kandasamy2014-04-031-5/+68
| | | | | | | |
| | * | | | | | BUG#18080920: CRASH; MY_REALLOC_STR DEREFERENCES NEGATIVE VALUE Nisha Gopalakrishnan2014-04-243-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | INTO CLIENT_ERRORS ARRAY Analysis: -------- The client may crash while executing a statement due to the missing mapping of the server error to it's equivalent client error. When trying to reallocate memory for the packet buffer, if the system is out of memory or the packet buffer is large, the server errors 'ER_OUT_OF_RESOURCES' or 'ER_PACKET_TOO_LARGE' is returned respectively. The client error number calculated is negative and when trying to dereference the array of client error messages with the calculated error number, the client crashes. Fix: ---- Map the server error returned to it's equivalent client error prior to dereferencing the array of client error messages. Note: Test case is not added since it is difficult to simulate the error condition.
| | * | | | | | Backport from trunk:Tor Didriksen2014-04-233-30/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug#18396916 MAIN.OUTFILE_LOADDATA TEST FAILS ON ARM, AARCH64, PPC/PPC64 The recorded results for the failing tests were wrong. They were introduced by the patch for Bug#30946 mysqldump silently ignores --default-character-set when used with --tab Correct results were returned for platforms where 'char' is implemented as unsigned. This was reported as Bug#46895 Test "outfile_loaddata" fails (reproducible) Bug#11755168 46895: TEST "OUTFILE_LOADDATA" FAILS (REPRODUCIBLE) The patch for that bug fixed only parts of the problem, leaving the incorrect results in the .result file. Solution: use 'uchar' for field_terminator and line_terminator on all platforms. Also: remove some un-necessary casts, leaving the ones we actually need.
| | * | | | | | Bug #17514920 MYSQL_THREAD_INIT() CALL WITHOUT MYSQL_INIT() IS CRASHING IN ↵Igor Solodovnikov2014-04-231-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | WINDOWS It is error to call mysql_thread_init() before libmysql is initialized with mysql_library_init(). Thus to fix this bug we need to detect if library was initialized and return error result if mysql_thread_init() is called with uninitialized library. Fixed by checking my_thread_global_init_done and returning nonzero if the library is not initialized.
| | * | | | | | Bug #18053212 MYSQL_GET_SERVER_VERSION() CALL WITHOUT A VALID CONNECTION ↵Igor Solodovnikov2014-04-171-6/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RESULTS IN SEG FAULT When there is no connection mysql_get_server_version() will return 0 and report CR_COMMANDS_OUT_OF_SYNC error.
| | * | | | | | Bug#17942050:KILL OF TRUNCATE TABLE WILL LEAD TO BINARY LOGSujatha Sivakumar2014-04-154-15/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | WRITTEN WHILE ROWS REMAINS Problem: ======== When truncate table fails while using transactional based engines even though the operation errors out we still continue and log it to binlog. Because of this master has data but the truncate will be written to binary log which will cause inconsistency. Analysis: ======== Truncate table can happen either through drop and create of table or by deleting rows. In the second case the existing code is written in such a way that even if an error occurs the truncate statement will always be binlogged. Which is not correct. Binlogging of TRUNCATE TABLE statement should check whether truncate is executed "transactionally or not". If the table is transaction based we log the TRUNCATE TABLE only on successful completion. If table is non transactional there are possibilities that on error we could have partial changes done hence in such cases we do log in spite of errors as some of the lines might have been removed, so the statement has to be sent to slave. Fix: === Using table handler whether truncate table is being executed in transaction based mode or not is identified and statement is binlogged accordingly. mysql-test/suite/binlog/r/binlog_truncate_kill.result: Added test case to test the fix for Bug#17942050. mysql-test/suite/binlog/t/binlog_truncate_kill.test: Added test case to test the fix for Bug#17942050. sql/sql_truncate.cc: Check if truncation is successful or not and retun appropriate return values so that binlogging can be done based on that. sql/sql_truncate.h: Added a new enum.
| | * | | | | | Addendum #1 to the fix for bug #18359924Georgi Kodinov2014-04-112-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removed unused variable. Fixed long (>80 lines)
| | * | | | | | Bug #18359924: INNODB AND MYISAM CORRUPTION ON PREFIX INDEXESGeorgi Kodinov2014-04-103-5/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem was in the validation of the input data for blob types. When assigned binary data, the character blob types were only checking if the length of these data is a multiple of the minimum char length for the destination charset. And since e.g. UTF-8's minimum character length is 1 (becuase it's variable length) even byte sequences that are invalid utf-8 strings (e.g. wrong leading byte etc) were copied verbatim into utf-8 columns when coming from binary strings or fields. Storing invalid data into string columns was having all kinds of ill effects on code that assumed that the encoding data are valid to begin with. Fixed by additionally checking the incoming binary string for validity when assigning it to a non-binary string column. Made sure the conversions to charsets with no known "invalid" ranges are not covered by the extra check. Removed trailing spaces. Test case added.
| | * | | | | | Description: When we execute a correlated subquery on anArun Kuruvila2014-04-101-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | archive table which is using an auto increment column, the server hangs. In order to recover the mysqld process, it has to be terminated abnormally using SIGKILL. The problem is observed in mysql-5.5. Bug #18065452 "PREPARING" STATE HOGS CPU WITH ARCHIVE + SUBQUERY Analysis: This happens because the server is trapped inside an infinite loop in the function, "subselect_indexsubquery_engine::exec()". This function resolves the correlated suquery by doing an index lookup for the appropriate engine. In case of archive engine, after reaching the end of records, "table->status" is not set to STATUS_NOT_FOUND. As a result the loop is not terminated. Fix: The "table->status" is set to STATUS_NOT_FOUND when the end of records is reached.