summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'mysql/5.5' into 5.5Sergei Golubchik2016-02-0949-295/+927
|\ | | | | | | | | reverted about half of commits as either not applicable or outright wrong
| * BUG#22530768 Innodb freeze running REPLACE statementsmysql-5.5.48Shaohua Wang2016-01-152-17/+21
| | | | | | | | | | | | | | | | | | | | we can see from the hang stacktrace, srv_monitor_thread is blocked when getting log_sys::mutex, so that sync_arr_wake_threads_if_sema_free cannot get a change to break the mutex deadlock. The fix is simply removing any mutex wait in srv_monitor_thread. Patch is reviewed by Sunny over IM.
| * Updated copyright year in user visible textBjorn Munch2016-01-113-5/+5
| |
| * Bug #22295186: CERTIFICATE VALIDATION BUG IN MYSQL MAY ALLOW MITMYashwant Sahu2016-01-111-5/+1
| | | | | | | | Test fix for 5.5 and 5.6
| * Bug #22295186: CERTIFICATE VALIDATION BUG IN MYSQL MAY ALLOW MITM.Yashwant Sahu2016-01-111-2/+2
| | | | | | | | Test Fix
| * Bug #22295186: CERTIFICATE VALIDATION BUG IN MYSQL MAY ALLOW MITMYashwant Sahu2016-01-118-26/+230
| |
| * Bug #22232332: SAVING TEXT FIELD TO TEXT VARIABLE IN ASreeharsha Ramanavarapu2016-01-081-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PROCEDURE RESULTS IN GARBAGE BYTES Issue: ----- This problem occurs under the following conditions: a) Stored procedure has a variable is declared as TEXT/BLOB. b) Data is copied into the the variable using the SELECT...INTO syntax from a TEXT/BLOB column. Data corruption can occur in such cases. SOLUTION: --------- The blob type does not allocate space for the string to be stored. Instead it contains a pointer to the source string. Since the source is deallocated immediately after the select statement, this can cause data corruption. As part of the fix for Bug #21143080, when the source was part of the table's write-set, blob would allocate the neccessary space. But this fix missed the possibility that, as in the above case, the target might be a variable. The fix will add the copy_blobs check that was removed by the earlier fix.
| * Bug#21770366 backport bug#21657078 to 5.5 and 5.6Ajo Robert2016-01-079-35/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem Statement ========= Fix various issues when building MySQL with Visual Studio 2015. Fix: ======= - Visual Studio 2015 adds support for timespec. Add check and related code to use this and only use our replacement if timespec is not defined. - Rename lfind/lsearch to my* to avoid redefinition problems. - Set default value for TMPDIR to "" on Windows as P_tmpdir no longer exists. - using VS definition of snprintf if available - tzname are now renamed to _tzname.
| * Description: yaSSL was only handling the cases of zero orV S Murthy Sidagam2016-01-046-15/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | one leading zeros for the key agreement instead of potentially any number. There is about 1 in 50,000 connections to fail when using DHE cipher suites. The second problem was the case where a server would send a public value shorter than the prime value, causing about 1 in 128 client connections to fail, and also caused the yaSSL client to read off the end of memory. All client side DHE cipher suite users should update. Note: The patch is received from YaSSL people
| * Bug #21564557: INCONSISTENT OUTPUT FROM 5.5 AND 5.6Sreeharsha Ramanavarapu2015-12-314-5/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | UNIX_TIMESTAMP(STR_TO_DATE('201506', "%Y%M" Issue: ----- When an invalid date is supplied to the UNIX_TIMESTAMP function from STR_TO_DATE, no check is performed before converting it to a timestamp value. SOLUTION: --------- Add the check_date function and only if it succeeds, proceed to the timestamp conversion. No warning will be returned for dates having zero in month/date, since partial dates are allowed. UNIX_TIMESTAMP will return only a zero for such values. The problem has been handled in 5.6+ with WL#946.
| * BUG#21902059: "CREATE TEMPORARY TABLE SELECT ..." AND BIT(1)Karthik Kamath2015-12-291-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | COLUMNS ANALYSIS: ========= A valgrind error is reported when CREATE TABLE .. SELECT involving BIT columns triggers a column type redefinition. In general the pack_flag is set for BIT columns in 'mysql_prepare_create_table()'. However, during the above operation, redefined column types was handled after the special handling for BIT columns and thus pack_flag ended up not being set correctly triggering the valgrind error. FIX: ==== The patch fixes this problem by setting pack_flag correctly for BIT columns in the case of column type redefinition.
| * Bug#22361702 - /USR/BIN/MYSQL-SYSTEMD-START DOES NOT RETURN CONTROL TO ↵Balasubramanian Kandasamy2015-12-164-4/+4
| | | | | | | | | | | | | | COMMAND LINE If the configuration files contains multiple datadir lines, use the last datadir entry in the RPM installation scripts
| * Bug#22278455: MYSQL 5.5:RPL_BINLOG_INDEX FAILS IN VALGRIND.Sujatha Sivakumar2015-12-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: ======= rpl_binlog_index.test fails with following valgrind error. line Conditional jump or move depends on uninitialised value(s) at 0x4C2F842: __memcmp_sse4_1 (in /usr/lib64/valgrind/ vgpreload_memcheck-amd64-linux.so) 0x739E39: find_uniq_filename(char*) (log.cc:2212) 0x73A11B: MYSQL_LOG::generate_new_name(char*, char const*) (log.cc:2492) 0x73A1ED: MYSQL_LOG::init_and_set_log_file_name(char const*, char const*, enum_log_type, cache_type) (log.cc:2289) 0x73B6F5: MYSQL_BIN_LOG::open(char const*, enum_log_type, Analysis and fix: ================= This issue was fixed as part of Bug#20459363 fix in 5.6 and above. Hence backporting the fix to MySQL-5.5.
| * Bug#21205695 DROP TABLE MAY CAUSE SLAVES TO BREAKVenkatesh Duggirala2015-12-016-32/+173
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: ======== 1) Drop table queries are re-generated by server before writing the events(queries) into binlog for various reasons. If table name/db name contains a non regular characters (like latin characters), the generated query is wrong. Hence it breaks the replication. 2) In the edge case, when table name/db name contains 64 characters, server is throwing an assert assert(M_TBLLEN < 128) 3) In the edge case, when db name contains 64 latin characters, binlog content is interpreted badly which is leading replication failure. Analysis & Fix : ================ 1) Parser reads the table name from the query and converts it to standard charset(utf8) and stores it in table_name variable. When drop table query is regenerated with the same table_name variable, it should be converted back to the original charset from standard charset(utf8). 2) Latin character takes two bytes for each character. Limit of the identifier is 64. SYSTEM_CHARSET_MBMAXLEN is set to '3'. So there is a possiblity that tablename/dbname contains 3 * 64. Hence assert is changed to (M_TBLLEN <= NAME_CHAR_LEN*SYSTEM_CHARSET_MBMAXLEN) 3) db_len in the binlog event header is taking 1 byte. db_len is ranged from 0 to 192 bytes (3 * 64). While reading the db_len from the event, server is casting to uint instead of uchar which is leading to bad db_len. This problem is fixed by changing the cast type to uchar.
| * Bug #17047208 REPLICATION DIFFERENCE FOR MULTIPLE TRIGGERSVenkatesh Duggirala2015-11-211-1/+3
| | | | | | | | | | | | Fixing pb2 valgrind failure Missed a 'if condition' check while moving the logic from one place to another place.
| * Bug#19941403: FATAL_SIGNAL(SIG 6) IN BUILD_EQUAL_ITEMS_FOR_COND | IN ↵Chaithra Gopalareddy2015-11-208-13/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SQL/SQL_OPTIMIZER.CC:1657 Problem: At the end of first execution select_lex->prep_where is pointing to a runtime created object (temporary table field). As a result server exits trying to access a invalid pointer during second execution. Analysis: While optimizing the join conditions for the query, after the permanent transformation, optimizer makes a copy of the new where conditions in select_lex->prep_where. "prep_where" is what is used as the "where condition" for the query at the start of execution. W.r.t the query in question, "where" condition is actually pointing to a field in the temporary table. As a result, for the second execution the pointer is no more valid resulting in server exit. Fix: At the end of the first execution, select_lex->where will have the original item of the where condition. Make prep_where the new place where the original item of select->where has to be rolled back. Fixed in 5.7 with the wl#7082 - Move permanent transformations from JOIN::optimize to JOIN::prepare Patch for 5.5 includes the following backports from 5.6: Bugfix for Bug12603141 - This makes the first execute statement in the testcase pass in 5.5 However it was noted later in in Bug16163596 that the above bugfix needed to be modified. Although Bug16163596 is reproducible only with changes done for Bug12582849, we have decided include the fix. Considering that Bug12582849 is related to Bug12603141, the fix is also included here. However this results in Bug16317817, Bug16317685, Bug16739050. So fix for the above three bugs is also part of this patch.
| * Bug #22214867: MYSQL 5.5: MAIN.SUBSELECT AND OTHERS FAILSreeharsha Ramanavarapu2015-11-201-4/+4
| | | | | | | | | | | | | | | | | | WITH NEW VALGRIND Issue: ------ Function signature in valgrind.supp requires a change with valgrind 3.11. Static function is replaced with wild card.
| * Bug#17047208 REPLICATION DIFFERENCE FOR MULTIPLE TRIGGERSVenkatesh Duggirala2015-11-195-155/+365
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem & Analysis: If DML invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column, that DML has to be marked as 'unsafe' statement. If the tables are locked in the transaction prior to DML statement (using LOCK TABLES), then the same statement is not marked as 'unsafe' statement. The logic of checking whether unsafeness is protected with if (!thd->locked_tables_mode). Hence if we lock the tables prior to DML statement, it is *not* entering into this if condition. Hence the statement is not marked as unsafe statement. Fix: Irrespective of locked_tables_mode value, the unsafeness check should be done. Now with this patch, the code is moved out to 'decide_logging_format()' function where all these checks are happening and also with out 'if(!thd->locked_tables_mode)'. Along with the specified test case in the bug scenario (BINLOG_STMT_UNSAFE_AUTOINC_COLUMNS), we also identified that other cases BINLOG_STMT_UNSAFE_AUTOINC_NOT_FIRST, BINLOG_STMT_UNSAFE_WRITE_AUTOINC_SELECT, BINLOG_STMT_UNSAFE_INSERT_TWO_KEYS are also protected with thd->locked_tables_mode which is not right. All of those checks also moved to 'decide_logging_format()' function.
| * Bug #22214852: MYSQL 5.5 AND 5.6: MAIN.KEY AND OTHERSreeharsha Ramanavarapu2015-11-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FAILURE WITH VALGRIND FOR RELEASE BUILD Issue: ------ Initialization of variable with UNINIT_VAR is flagged by valgrind 3.11. SOLUTION: --------- Initialize the variable to 0. This is a backport of Bug# 14580121.
| * Bug#20691429 ASSERTION `CHILD_L' FAILED IN STORAGE/MYISAMMRG/Ajo Robert2015-11-131-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | HA_MYISAMMRG.CC:631 Analysis ======== Any attempt to open a temporary MyISAM merge table consisting of a view in its list of tables (not the last table in the list) under LOCK TABLES causes the server to exit. Current implementation doesn't perform sanity checks during merge table creation. This allows merge table to be created with incompatible tables (table with non-myisam engine), views or even with table doesn't exist in the system. During view open, check to verify whether requested view is part of a merge table is missing under LOCK TABLES path in open_table(). This leads to opening of underlying table with parent_l having NULL value. Later when attaching child tables to parent, this hits an ASSERT as all child tables should have parent_l pointing to merge parent. If the operation does not happen under LOCK TABLES mode, open_table() checks for view's parent_l and returns error. Fix: ====== Check added before opening view Under LOCK TABLES in open_table() to verify whether it is part of merge table. Error is returned if the view is part of a merge table.
| * Bug#19817021 CRASH IN TABLE_LIST::PREPARE_SECURITY WHENAjo Robert2015-11-133-18/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DOING BAD DDL IN PREPARED STATEMENT Analysis ======== A repeat execution of the prepared statement 'ALTER TABLE v1 CHECK PARTITION' where v1 is a view leads to server exit. ALTER TABLE ... CHECK PARTITION is not applicable for views and check for the same check is missing. This leads to further execution and creation of derived table for the view (Allocated under temp_table mem_root). Any reference to open view or related pointers from second execution leads to server exit as the same was freed at previous execution closure. Fix: ====== Added check for view in mysql_admin_table() on PARTITION operation. This will prevent mysql_admin_table() from going ahead and creating temp table and related issues. Changed message on admin table view operation error to be more appropriate.
| * Raise version number after cloning 5.5.47Bjorn Munch2015-11-091-1/+1
| |
* | MDEV-9024 Build fails with VS2015Sergei Golubchik2016-02-0611-88/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cherry-pick f1daf9ce from 10.0 branch ------------------------------------- Fix build failures caused by new C runtime library - isnan, snprintf, struct timespec are now defined, attempt to redefine them leads - P_tmpdir, tzname are no more defined - lfind() and lsearch() in lf_hash.c had to be renamed, declaration conflicts with some C runtime functions with the same name declared in a header included by stdlib.h Also fix couple of annoying warnings : - remove #define NOMINMAX from config.h to avoid "redefined" compiler warnings(NOMINMAX is already in compile flags) - disable incremental linker in Debug as well (feature not used much and compiler crashes often) Also simplify package building with Wix, require Wix 3.9 or later (VS2015 is not compatible with old Wix 3.5/3.6)
* | MDEV-4664 mysql_upgrade crashes if root's password contains an ↵Sergei Golubchik2016-02-062-7/+8
| | | | | | | | | | | | | | apostrophe/single quotation mark fix dynstr_append_os_quoted() to escape single quotes correctly for a POSIX shell
* | unit test for dynstr_append_os_quoted()Sergei Golubchik2016-02-063-10/+82
| | | | | | | | and a trivial cleanup to avoid manually-specified lengths
* | MDEV-9462: Out of memory using explain on 2 empty tablesOleksandr Byelkin2016-02-065-11/+604
| | | | | | | | Fixed adding derived tables items to outer one.
* | MDEV-9453 mysql_upgrade.exe error when mysql is migrated to mariadbSergei Golubchik2016-02-064-12/+47
| | | | | | | | | | mysqlcheck tool can be used even if opt_systables_only is true (to upgrade views from mysql - that overrides opt_systables_only)
* | MDEV-9175 Query parser tansforms MICROSECOND into SECOND_FRAC, which does ↵Sergei Golubchik2016-02-063-1/+23
| | | | | | | | not work
* | MDEV-9314 fatal build error: viosslfactories.c:58:5: error: dereferencing ↵Sergei Golubchik2016-02-062-8/+4
| | | | | | | | | | | | pointer to incomplete type ‘DH {aka struct dh_st} fixes for openssl that was built with -DOPENSSL_NO_DEPRECATED
* | Merge pull request #148 from grooverdan/5.5-rpl_reporting-cppcheck-va_endVicențiu-Marian Ciorbaru2016-02-061-0/+1
|\ \ | | | | | | MDEV-9433: Add va_end to sql/rpl_reporting.cc to make cppcheck happy
| * | Add va_end to make cppcheck happyDaniel Black2016-01-191-0/+1
| | |
* | | MDEV-7827: Assertion `!table || (!table->read_set || ↵Oleksandr Byelkin2016-02-053-0/+60
| | | | | | | | | | | | | | | | | | | | | bitmap_is_set(table->read_set, field_index))' failed in Field_long::val_str on EXPLAIN EXTENDED (Solution by Sergei Petrunia) It appeared that semijoin conditions was not iterated when we were updating used tables. So now they do.
* | | MDEV-9093 Persistent computed column is not updated when update query ↵Oleksandr Byelkin2016-02-054-0/+85
| | | | | | | | | | | | | | | | | | contains join added lost virtual fields update call
* | | Fix function visibility as it is used on row0mysql.c in Windows.Jan Lindström2016-02-034-2/+30
| | |
* | | MDEV-9471: Server crashes or returns an error while trying to alter ↵Jan Lindström2016-02-032-0/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | partitioning on a table moved from Windows to Linux At alter table when server renames the table to temporal name, old name uses normal partioned table naming rules. However, if tables are created on Windows and then transfered to Linux and lower-case-table-names=1 we should modify the old name on rename to lower case to be able to find it from the InnoDB dictionary.
* | | MDEV-9466 : Exception handler on Windows does not output any text,Vladislav Vaintroub2016-02-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | if mysqld runs as service The bug is caused by the attempt to write to filedescriptor 2 (STDERR_FILENO), however in case of a service stderr has different fd (debugging shows fileno(stderr) is 4 after freopen, and -1 before it) Fixed definition of STDERR_FILENO for Windows to be fileno(stderr).
* | | Merge MDEV-9112 into 5.5Kristian Nielsen2016-02-014-2/+6
|\ \ \
| * | | MDEV-9112: Non-blocking client API missing on non-x86 platformsGeorg Richter2016-02-014-2/+6
| |/ / | | | | | | | | | | | | | | | | | | The check for UCONTEXT in cmake was somehow become broken, disabling the fallback to ucontext. This caused the non-blocking client API to not be available for non-x86 platforms, on which no hand-crafted assembler implementation of my_context is available.
* | | If one compiled with too long MYSQL_SERVER_SUFFIX this caused a memoryMonty2016-01-291-6/+9
| | | | | | | | | | | | | | | | | | overrun that caused some test to fail. Fixed by ensuring we don't overwrite "server_version"
* | | my_decimal didn't compile properly with debugMonty2016-01-291-1/+1
|/ /
* | MDEV-9106 Audit plugin not working with MySQL 5.7.Alexey Botchkov2016-01-151-3/+44
| | | | | | | | fixing Windows crash.
* | MDEV-9106 Audit plugin doesnt run with MySQL 5.7.Alexey Botchkov2016-01-131-3/+6
| | | | | | | | updata thread_pool_server_audit test result.
* | MDEV-9106 Audit Plugin doesn't run with MySQL 5.7.Alexey Botchkov2016-01-131-17/+39
| | | | | | | | | | | | MariaDB 5.5 built in debug gets unhappy with mutexes. Although everything is correct, some DBUG_ASSERT can happen. So this patch keeps safe_mutex silent.
* | MDEV-9106 Audit plugin compiled with MariaDB can't install on MySQL 5.7.Alexey Botchkov2016-01-126-264/+1262
| | | | | | | | | | The audit API was seriously changed in MySQL 5.7. so we had to adapt the plugin's code to that.
* | MDEV-9298 : Build failure when linking libmysql.Vladislav Vaintroub2016-01-071-0/+5
| | | | | | | | | | | | | | | | | | If GCC or CLang compile with link time optimization (-flto), they throw an error during link , when lto sees a function (e.g mysql_real_connect) is redeclared as "external void *" in libmysql_exports.cc The fix disables -flto for generated libmysql_exports.cc
* | Fix process handle leak in buildbot. GenerateConsoleCtrlEvent sent to ↵Vladislav Vaintroub2015-12-301-5/+5
| | | | | | | | non-existing process will add a process handle to this non-existing process to console host process conhost.exe
* | Moving Field_blob::store_length() back from protected to public,Alexander Barkov2015-12-291-5/+5
| | | | | | | | as it's needed for Cassandra in 10.0.
* | MDEV-9319 ALTER from a bigger to a smaller blob type truncates too much dataAlexander Barkov2015-12-2910-14/+152
| |
* | MDEV-9249 MariaDB un-buildable on linux64: fails @ "error: ↵Sergei Golubchik2015-12-213-1/+10
| | | | | | | | | | | | | | ‘ERR_remove_state’ was not declared in this scope" when linking against OpenSSL 1.0.2e ERR_remove_state is deprecated, use ERR_remove_thread_state if possible
* | MDEV-7526: TokuDB doesn't build on OS XDevilSatan2015-12-191-1/+1
| | | | | | | | | | | | A string definition is inconsistent and thus causes a compilation error. Signed-off-by: Vicențiu Ciorbaru <vicentiu@mariadb.org>