summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* WIP Merge 5.5 into bb-10.0-vicentiu10.0-mergeMarko Mäkelä2018-01-2331-88/+328
|\ | | | | | | | | | | | | | | Unresolved conflicts: both modified: sql/item_cmpfunc.cc both modified: sql/item_cmpfunc.h both modified: sql/sql_partition.cc both modified: storage/tokudb/CMakeLists.txt
| * Add ASAN instrumentation (and more strict Valgrind) to InnoDBMarko Mäkelä2018-01-2312-50/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mem_heap_free_heap_top(): Remove UNIV_MEM_ASSERT_W() and unpoison the memory region first, because part of it may have been poisoned by an earlier mem_heap_free_top() call. Poison the address range at the end. mem_heap_block_free(): Poison the address range at the end. UNIV_MEM_ASSERT_AND_ALLOC(): Replace with UNIV_MEM_ALLOC(). We want to keep the address ranges poisoned (unaccessible) as long as possible. UNIV_MEM_ASSERT_AND_FREE(): Replace with UNIV_MEM_FREE().
| * Silence -Wimplicit-fallthroughMarko Mäkelä2018-01-232-0/+2
| |
| * MDEV-14786: Server crashes in Item_cond::transform on 2nd execution of SP ↵Oleksandr Byelkin2018-01-238-1/+97
| | | | | | | | | | | | | | | | | | | | querying from a view MDEV-14957: JOIN::prepare gets unusable "conds" as argument Do not touch merged derived (it is irreversible) Fix first argument of in_optimizer for calls possible before fix_fields()
| * Fix Item tree changes/rollback debug printOleksandr Byelkin2018-01-232-4/+8
| |
| * MDEV-14586 Assertion `0' failed in retrieve_auto_increment ...Sachin Setiya2018-01-233-2/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem:- If we create table using myisam/aria then this crashes the server. CREATE TABLE t1(a bit(1), b int auto_increment , index(a,b)); insert into t1 values(1,1); Or this query CREATE TABLE t1 (b BIT(1), pk INTEGER AUTO_INCREMENT PRIMARY KEY); ALTER TABLE t1 ADD INDEX(b,pk); INSERT INTO t1 VALUES (1,b'1'); ALTER TABLE t1 DROP PRIMARY KEY; Reason:- The reason for this is 1st- find_ref_key() finds what key an auto_increment field belongs to by comparing key_part->offset and field->ptr. But BIT fields might have zero length in the record, so a key might have many key parts with the same offset. That is, comparing offsets cannot uniquely identify the correct key part. 2nd- Since next_number_key_offset is zero it myisam/aria will think that auto_increment is in first part of key. 3nd- myisam/aria will call retrieve_auto_key which will see first key_part field as a bit field and call assert(0) Solution:- Many key parts might have the same offset, but BIT fields do not support auto_increment. So, we can skip all key parts over BIT fields, and then comparing offsets will be unambiguous.
| * MDEV-5510: Replace MySQL -> MariaDB in init scriptsDaniel Black2018-01-231-24/+24
| |
| * Fix error message typoKarim Geiger2018-01-231-1/+1
| |
| * mysql_install_db: correct hosting/source/maillist informationDaniel Black2018-01-231-2/+2
| |
| * mysql_install_db: correct --skip-grant-tables helpDaniel Black2018-01-231-1/+1
| |
| * fix build for recent clangEugene Kosov2018-01-231-1/+1
| | | | | | | | | | | | | | | | | | /home/kevg/work/mariadb/sql/sql_partition.cc:286:47: error: cannot initialize a parameter of type 'HA_CREATE_INFO *' (aka 'st_ha_create_information *') with an rvalue of type 'ulonglong' (aka 'unsigned long long') (ulonglong)0, (uint)0); ^~~~~~~~~~~~ /home/kevg/work/mariadb/sql/partition_info.h:281:72: note: passing argument to parameter 'info' here bool set_up_defaults_for_partitioning(handler *file, HA_CREATE_INFO *info, ^
| * Fix TokuDB Not buildingVicențiu Ciorbaru2018-01-231-1/+1
| | | | | | | | We don't check for DLSYM in CMake, check for DLOPEN instead.
| * improve ASAN instrumentation: clangSergei Golubchik2018-01-221-0/+8
| | | | | | | | translate clang __has_feature to gcc macros
* | Fix test failuresVicențiu Ciorbaru2018-01-233-3/+4
| |
* | Merge branch '5.5' into 10.0Vicențiu Ciorbaru2018-01-22130-586/+1665
|\ \ | |/
| * MDEV-14715: Assertion `!table || (!table->read_set... failed in ↵Vicențiu Ciorbaru2018-01-224-9/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Field_num::val_decimal The assertion failure was caused by an incorrectly set read_set for functions in the ORDER BY clause in part of a union, when we are using a mergeable view and the order by clause can be skipped (removed). An order by clause can be skipped if it's part of one part of the UNION as the result set is not meaningful when multiple SELECT queries are UNIONed. The server is aware of this optimization and tries to remove the order by clause before JOIN::prepare. The problem is that we need to throw an error when the ORDER BY clause contains invalid columns. To do this, we attempt resolving the ORDER BY expressions, then subsequently drop them if resolution succeeded. However, ORDER BY resolution had the side effect of adding the expressions to the all_fields list, which is used to construct temporary tables to store the result. We may be ignoring the ORDER BY statement, but the tmp table still tried to compute the values for the expressions, even if the columns are never used. The assertion only shows itself if the order by clause contains members which were not previously in the select list, and are part of a function. There is an additional question as to why this only manifests when using VIEWS and not when using a regular table. The difference lies with the "reset" of the read_set for the temporary table during SELECT_LEX::update_used_tables() in JOIN::optimize(). The changes introduced in fdf789a7eadf864ecc0e617f25f795fafda55026 cleared the read_set when a mergeable view is encountered in the TABLE_LIST defintion. Upon initial order_list resolution, the table's read_set is updated correctly. JOIN::optimize() will only reset the read_set if it encounters a VIEW. Since we no longer have ORDER BY clause in JOIN::optimize() we never get to correctly update the read_set again. Other relevant commit by Timour, which first introduced the order resolution when we "can_skip_sort_order": 883af99e7dac91e3f258135a2053e6b8e3c05fc3 Solution: Don't add the resolved ORDER BY elements to all_fields. We only resolve them to check if an error should be returned for the query. Ignore them completely otherwise.
| * Remove commented out code post merge fix in 2011Vicențiu Ciorbaru2018-01-221-2/+1
| |
| * improve ASAN instrumentation: InnoDB/XtraDBSergei Golubchik2018-01-222-14/+19
| |
| * Finally! Make './mtr --valgrind-mysqld --gdb' to work.Sergei Golubchik2018-01-222-5/+14
| | | | | | | | | | | | | | | | It has its limitations, e.g. it assumes that there's only one gdb and only one valgrind process is running. And a hard-coded one-second delay might be too short for slow machines. Still, it's better than "doesn't work at all"
| * Free memory in unit tests. Makes ASAN happier.Sergei Golubchik2018-01-223-1/+7
| |
| * improve ASAN instrumentation: table->record[0]Sergei Golubchik2018-01-222-3/+15
| | | | | | | | | | | | | | | | | | | | instrument table->record[0], table->record[1] and share->default_values. One should not access record image beyond share->reclength, even if table->record[0] has some unused space after it (functions that work with records, might get a copy of the record as an argument, and that copy - not being record[0] - might not have this buffer space at the end). See b80fa4000d6 and 444587d8a3c
| * improve ASAN instrumentation: mtrSergei Golubchik2018-01-221-0/+1
| |
| * improve ASAN instrumentation: MEM_ROOTSergei Golubchik2018-01-221-3/+6
| | | | | | | | more complete TRASH-ing of memroots
| * improve ASAN instrumentation: TRASHSergei Golubchik2018-01-221-4/+4
| | | | | | | | mark freed memory as not accessible, not merely undefined
| * Correct TRASH() macro usageSergei Golubchik2018-01-2217-36/+17
| | | | | | | | | | | | | | | | | | | | TRASH was mapped to TRASH_FREE and was supposed to be used for memory that should not be accessed anymore, while TRASH_ALLOC() is to be used for uninitialized but to-be-used memory. But sometimes TRASH() was used in the latter sense. Remove TRASH() macro, always use explicit TRASH_ALLOC() or TRASH_FREE().
| * Fix compilation without dlopenSergei Golubchik2018-01-224-3/+10
| |
| * MDEV-7049 MySQL#74585 - InnoDB: Failing assertion: *mbmaxlen < 5 in file ↵Marko Mäkelä2018-01-2231-338/+181
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ha_innodb.cc line 1904 InnoDB limited the maximum number of bytes per character to 4. But, the filename character set that was introduced in MySQL 5.1 uses up to 5 bytes per character. To allow InnoDB tables to be created with wider characters, let us split the mbminmaxlen fields into mbminlen, mbmaxlen, and increase the limit to 7 bytes per character. This will increase the payload size of dtype_t and dict_col_t by one bit. The storage size will be unchanged (54 bits and 77 bits will use the same number of bytes as the previous sizes 53 and 76 bits).
| * Add dummy defintion for Dl_info in case we're missing dladdrVicențiu Ciorbaru2018-01-191-0/+4
| |
| * bump the VERSIONDaniel Bartholomew2018-01-191-1/+1
| |
| * MDEV-14229: Stack trace is not resolved for shared objectsVicențiu Ciorbaru2018-01-195-32/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolving a stacktrace including functions in dynamic libraries requires us to look inside the libraries for the symbols. Addr2line needs to be started with the correct binary for each address on the stack. To do this, figure out which library it is using dladdr, then if the addr2line binary was started with a different binary, fork it again with the correct one. We only have one addr2line process running at any point during the stacktrace resolving step. The maximum number of forks for addr2line should generally be around 6. One for server stacktrace code, one for plugin code, one when going back into server code, one for pthread library, one for libc, one for the _start function in the server. More can come up if plugin calls server function which goes back to a plugin, etc.
| * MDEV-14241: Server crash in key_copy / get_matching_chain_by_join_key or ↵Varun Gupta2018-01-193-1/+49
| | | | | | | | | | | | | | | | | | valgrind warnings In this case we were using the optimization derived_with_keys but we could not create a key because the length of the key was greater than the max allowed(MI_MAX_KEY_LENGTH). To do the join we needed to create a hash join key instead, but in the explain output it showed that we were still referring to derived keys which were created but not used.
| * Fixed mdev-14960 [ERROR] mysqld got signal 11 with join_buffer and join_cacheIgor Babaev2018-01-183-1/+107
| | | | | | | | | | | | | | In the function JOIN::shrink_join_buffers the iteration over joined tables was organized in a wrong way. This could cause a crash if the optimizer chose to materialize a semi-join that used join caches for which the sizes must be adjusted.
| * Merge branch 'merge/merge-xtradb-5.5' into 5.5mariadb-5.5.59Sergei Golubchik2018-01-183-6/+10
| |\
| | * 5.5.58-38.10Sergei Golubchik2018-01-179-13/+24
| | |
| * | Merge branch 'mysql/5.5' into 5.5Sergei Golubchik2018-01-1815-16/+24
| |\ \
| | * | Updated copyright year in user visible textmysql-5.5.59Balasubramanian Kandasamy2017-11-273-3/+3
| | | |
| | * | Bug #24296076 INNODB REPORTS WARNING WHILE INNODB_UNDO_LOG_TRUNCATE IS ENABLEDAditya A2017-11-171-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PROBLEM ------- This warning message is printed when trx_sys->rseg_history_len is greater than some arbitrary magic number (2000000). By seeing the reproducing scenario where we keep a read view open and do a lot of transactions on table which increases the hitsory length it is entirely possible that trx_sys->rseg_history_len can exceed 2000000. So this is not a bug due to corruption of history length.The warning message was just added to test some scenario and not removed. FIX --- 1.Print this warning message only for debug versions. 2.Modified the warning message with more detailed information. 3.Don't crash even in debug versions. [#rb 17929 Reviewed by jimmy and satya]
| | * | Bug #26881946: INCORRECT BEHAVIOR WITH "VALUES"Sreeharsha Ramanavarapu2017-11-166-20/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue: ------ VALUES doesn't have a type() function and is considered a Item_field. Solution for 5.7: ----------------- Add a new type() function for Item_values_insert. On 8.0 and trunk it was fixed by Mithun's Bug#19601973. Solution for 5.6: ----------------- Additionally Bug#17458914 is backported. This will address the problem of using VALUES() in INSERT ... ON DUPLICATE KEY UPDATE. Create a field object only if it is in the UPDATE clause, else return a NULL item. This will also address the problems mentioned in Bug#14789787 and Bug#16756402. Solution for 5.5: ----------------- As mentioned above Bug#17458914 is backported. Additionally Bug#14786324 is also backported. When VALUES() is detected outside its meaningful place, it should be treated as NULL and is thus replaced with a Field_null object, with the same name as the original field. Fields with type NULL are generally not handled well inside the server (e.g Innodb will not accept them and it is impossible to create them in regular tables). So create a new const NULL item instead.
| | * | Bug#27072155 - DEFAULT PLUGIN_DIR SHOULD BE DIFFERENT FOR DEBUG BUILDBalasubramanian Kandasamy2017-11-132-2/+2
| | | | | | | | | | | | | | | | - Update the default plugin directory for debug builds
| | * | dos2unix cmake/mysql_add_executable.cmakeTor Didriksen2017-11-091-48/+48
| | | |
| | * | Bug#26022865 BUILD FOR WINDOWS-S12-64BIT,ADVANCED IS FAILING ON PB2 MYSQL-5.6Tor Didriksen2017-11-092-66/+1
| | | | | | | | | | | | | | | | | | | | | | | | Remove cmake code for signing executables. Automatic signing has always failed anyways. It should be done manually as part of the release process.
| | * | Bug #27021754 MYSQLTEST MAN PAGES WILL BE REMOVED, PACKAGING MUST BE PREPAREDBjorn Munch2017-11-033-23/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removed relevant man pages from file lists for RPM and DEB RPM: added conditional removal of them, so it works both before and after man pages are actually removed DEB: added to exclude list (5.6+)
| | * | Bug #26880757: MYISAM_USE_MMAP=1 ON WINDOWS FREQUENTLY DOESArun Kuruvila2017-10-261-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NOT UPDATE FILE ON DISK Description:- When the server variable, "myisam_use_mmap" is enabled, MyISAM tables on windows are not updating the file on disk even when the server variable "flush" is set to 1. This is inturn making the table corrupted when encountering a power failure. Analysis:- When the server variable "myisam_use_mmap" is set, files of MyISAM tables will be memory mapped using the OS APIs mmap()/munmap()/msync() on Unix and CreateFileMapping() /UnmapViewOfFile()/FlushViewOfFile() on Windows. msync() and FlushViewOfFile() is responsible for flushing the changes made to the in-core copy of a file that was mapped into memory using mmap()/CreateFileMapping() back to the file system. FLUSH is determined by the OS unless explicitly called using msync()/FlushViewOfFile(). When the server variables "myisam_use_mmap" and "flush" are enabled, MyISAM is only flushing the files from file system cache to disc using "mysql_file_sync()" and not the memory mapped file from memory to FS cache using "my_msync()". ["my_msync()" inturn calls msync() on Unix and FlushViewOfFile() on Windows. Fix:- As part of the fix, if server variable "myisam_use_mmap" is enabled along with "flush", "my_msync()" is invoked to flush the data in memory to file system cache and followed by "mysql_file_sync()" which will flush the data from file system cache to disk.
| | * | BUG#26529369: CREATE INDEX WITH LONG COMMENT CAUSEKarthik Kamath2017-10-231-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | UNEXPECTED ERROR ANALYSIS: ========= Creating many indexes with large amount of index information causes a server exit. FIX: ==== A appropriate error is reported when the cumulative index information length exceeds the 2 byte range (i.e 65535).
| | * | Bug #26867652: INCORRECT BEHAVIOR WITH PREPARE STATEMENTSreeharsha Ramanavarapu2017-10-191-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AND PARAM IN ORDER BY Issue: ------ This issue can occur when the ORDER BY list refers to a column that contains a parameter in the select list. Solution: --------- In JOIN::update_depend_map and get_sort_by_table, the ORDER BY list's used_tables isn't checked for parameters. This can result in incorrect behavior. This is a partial backport of Roy's
| | * | Merge branch 'mysql-5.5.58-release' into mysql-5.5Nawaz Nazeer Ahamed2017-10-160-0/+0
| | |\ \
| | * | | Backport patch for Bug#16877045 5.6-CLUSTER-7.3 WIN32 SQL_YACC.CC BUILD PROBLEMTor Didriksen2017-10-092-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Building with ninja shows the problem: cmake .. -G Ninja ninja ninja: error: dependency cycle: sql/GenServerSource -> sql/CMakeFiles/GenServerSource -> sql/sql_builtin.cc -> cmake_order_depends_target_sq sql/GenServerSource Bug#16877045 5.6-CLUSTER-7.3 WIN32 SQL_YACC.CC BUILD PROBLEM - Somewhat circular dependency caused by the configured files sql_builtin.cc being included as part of the files to generate in sql/ - Move sql_builtin.cc out of GEN_SOURCES variable. - Create new variable CONF_SOURCES to be used for configured files.
| | * | | (no commit message)mysql-builder@oracle.com2017-09-130-0/+0
| | | | |
| | * | | Bug#23072792 MYSQL_GROUP_SUFFIX DOES NOT WORKTor Didriksen2017-09-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reintroduce environment variable MYSQL_GROUP_SUFFIX to be used as --default-group-suffix value if not already set. The environment variable was accidentally renamed to DEFAULT_GROUP_SUFFIX_ENV in MySQL server 5.5.
| | * | | Bug#26372491 - RCE THROUGH THE MISHANDLE OF BACKSLASHAnushree Prakash B2017-09-081-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DESCRIPTION: =========== The bug is related to incorrect parsing of SQL queries when typed in on the CLI. The incorrect parsing can result in unexpected results. ANALYSIS: ======== The scenarios mainly happens for identifier names with a typical combination of backslashes and backticks. The incorrect parsing can either result in executing additional queries or can result in query truncation. This can impact mysqldump as well. FIX: === The fix makes sure that such identifier names are correctly parsed and a proper query is sent to the server for execution.