summaryrefslogtreecommitdiff
path: root/storage/myisam
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.5' into 10.1Alexander Barkov2019-09-2419-29/+29
|\
| * Fix spelling mistakes in MyISAM code commentsIan Gilfillan2019-09-2019-29/+29
| |
* | imporve clang buildEugene Kosov2019-06-252-5/+4
| | | | | | | | | | | | | | | | | | cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Debug Maintainer mode makes all warnings errors. This patch fix warnings. Mostly about deprecated `register` keyword. Too much warnings came from Mroonga and I gave up on it.
* | Merge branch '5.5' into 10.1Vicențiu Ciorbaru2019-05-1177-77/+77
|\ \ | |/
| * Update FSF AddressVicențiu Ciorbaru2019-05-1177-77/+77
| | | | | | | | * Update wrong zip-code
* | Merge branch '5.5' into 10.1Vicențiu Ciorbaru2019-05-111-1/+1
|\ \ | |/
| * Update FSF addressMichal Schorm2019-05-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit is based on the work of Michal Schorm, rebased on the earliest MariaDB version. Th command line used to generate this diff was: find ./ -type f \ -exec sed -i -e 's/Foundation, Inc., 59 Temple Place, Suite 330, Boston, /Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, /g' {} \; \ -exec sed -i -e 's/Foundation, Inc. 59 Temple Place.* Suite 330, Boston, /Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, /g' {} \; \ -exec sed -i -e 's/MA.*.....-1307.*USA/MA 02110-1335 USA/g' {} \; \ -exec sed -i -e 's/Foundation, Inc., 59 Temple/Foundation, Inc., 51 Franklin/g' {} \; \ -exec sed -i -e 's/Place, Suite 330, Boston, MA.*02111-1307.*USA/Street, Fifth Floor, Boston, MA 02110-1335 USA/g' {} \; \ -exec sed -i -e 's/MA.*.....-1307/MA 02110-1335/g' {} \;
* | Fixing -Werror=format-overflow errors (found by gcc-8.3.1)Alexander Barkov2019-04-222-3/+3
| |
* | fix gcc 8 compiler warningsSergei Golubchik2019-03-142-13/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were two newly enabled warnings: 1. cast for a function pointers. Affected sql_analyse.h, mi_write.c and ma_write.cc, mf_iocache-t.cc, mysqlbinlog.cc, encryption.cc, etc 2. memcpy/memset of nontrivial structures. Fixed as: * the warning disabled for InnoDB * TABLE, TABLE_SHARE, and TABLE_LIST got a new method reset() which does the bzero(), which is safe for these classes, but any other bzero() will still cause a warning * Table_scope_and_contents_source_st uses `TABLE_LIST *` (trivial) instead of `SQL_I_List<TABLE_LIST>` (not trivial) so it's safe to bzero now. * added casts in debug_sync.cc and sql_select.cc (for JOIN) * move assignment method for MDL_request instead of memcpy() * PARTIAL_INDEX_INTERSECT_INFO::init() instead of bzero() * remove constructor from READ_RECORD() to make it trivial * replace some memcpy() with c++ copy assignments
* | Merge branch '10.0' into 10.1Oleksandr Byelkin2018-07-313-3/+15
|\ \
| * \ Merge 5.5 into 10.0Marko Mäkelä2018-07-303-3/+15
| |\ \ | | |/
| | * Merge remote-tracking branch 'mysql/5.5' into 5.5Oleksandr Byelkin2018-07-293-3/+15
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We do not accept: 1. We did not have this problem (fixed earlier and better) d982e717aba67227ec40761a21a4211db91aa0e2 Bug#27510150: MYSQLDUMP FAILS FOR SPECIFIC --WHERE CLAUSES 2. We do not have such options (an DBUG_ASSERT put just in case) bbc2e37fe4e0ca3a7cfa1437a763dc43829e98e2 Bug#27759871: BACKRONYM ISSUE IS STILL IN MYSQL 5.7 3. Serg fixed it in other way in this release: e48d775c6f066add457fa8cfb2ebc4d5ff0c7613 Bug#27980823: HEAP OVERFLOW VULNERABILITIES IN MYSQL CLIENT LIBRARY
| | | * Bug#25541037: MYSQL BUG ON DELETEArun Kuruvila2018-05-213-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Description:- MyISAM table gets corrupted with concurrent executions of INSERT, DELETE statements in a particular sequence. Analysis:- Due to the inappropriate manipulation of w_lock and r_lock associated with a MyISAM table, there arises a scenario where the table's state information becomes invalid. Fix:- A lock is introduced to resolve this issue.
* | | | Merge remote-tracking branch 'origin/10.0' into 10.1Alexander Barkov2018-06-201-1/+1
|\ \ \ \ | |/ / /
| * | | Merge remote-tracking branch 'origin/5.5' into 10.0Alexander Barkov2018-06-201-1/+1
| |\ \ \ | | |/ /
| | * | MDEV-16534 PPC64: Unexpected error with a negative value into auto-increment ↵Alexander Barkov2018-06-201-1/+1
| | | | | | | | | | | | | | | | columns in HEAP, MyISAM, ARIA
* | | | Merge branch '10.0-galera' into 10.1Vicențiu Ciorbaru2018-06-121-4/+4
|\ \ \ \
| * \ \ \ Merge remote-tracking branch 'origin/5.5-galera' into 10.0-galeraJan Lindström2018-05-071-4/+4
| |\ \ \ \
| | * | | | MDEV-8743: protect myisam/aria MYI with O_CLOEXECDaniel Black2018-03-021-2/+2
| | | | | |
| | * | | | MDEV-8743: protect myisam/aria MYD files and aria log filesDaniel Black2018-03-021-2/+2
| | | | | |
* | | | | | Merge branch '10.0' into 10.1Vicențiu Ciorbaru2018-06-121-1/+1
|\ \ \ \ \ \ | | |_|/ / / | |/| | | |
| * | | | | Merge branch '5.5' into 10.0Vicențiu Ciorbaru2018-06-121-1/+1
| |\ \ \ \ \ | | |/ / / / | |/| | / / | | | |/ / | | |/| |
| | * | | MDEV-16342 SHOW ENGINES: MyISAM description is uselessSergei Golubchik2018-06-111-1/+1
| | |/ / | | | | | | | | | | | | rewrite tautological engine descriptions
* | | | MDEV-14265 - RPMLint warning: shared-lib-calls-exitSergey Vojtovich2018-03-162-6/+2
| | | | | | | | | | | | | | | | Eliminated last exit() call from libmysqld.
* | | | Merge branch 'github/10.0' into 10.1Sergei Golubchik2018-02-021-2/+6
|\ \ \ \ | |/ / /
| * | | Merge remote-tracking branch '5.5' into 10.0Vicențiu Ciorbaru2018-01-241-2/+6
| |\ \ \ | | |/ /
| | * | Merge branch 'mysql/5.5' into 5.5Sergei Golubchik2018-01-181-2/+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#25451091:CREATE TABLE DATA DIRECTORY / INDEX DIRECTORYNisha Gopalakrishnan2017-05-122-14/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SYMLINK CHECK RACE CONDITIONS ANALYSIS: ========= A potential defect exists in the handling of CREATE TABLE .. DATA DIRECTORY/ INDEX DIRECTORY which gives way to the user to gain access to another user table or a system table. FIX: ==== The lstat and fstat output of the target files are now stored which help in determining the identity of the target files thus preventing the unauthorized access to other files.
| | | * Bug #25447551: HANDLE_FATAL_SIGNAL (SIG=11) INKailasnath Nagarkar2017-03-151-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FT_BOOLEAN_CHECK_SYNTAX_STRING ISSUE: my_isalnum macro used for checking if character is alphanumeric dereferences uninitialized pointer in default character set structure resulting in server exiting abnormally. FIX: Used standard isalnum function instead of macro my_isalnum.
| | | * Bug#24388746: PRIVILEGE ESCALATION AND RACE CONDITION USING CREATE TABLEJon Olav Hauglid2016-08-193-23/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During REPAIR TABLE of a MyISAM table, a temporary data file (.TMD) is created. When repair finishes, this file is renamed to the original .MYD file. The problem was that during this rename, we copied the stats from the old file to the new file with chmod/chown. If a user managed to replace the temporary file before chmod/chown was executed, it was possible to get an arbitrary file with the privileges of the mysql user. This patch fixes the problem by not copying stats from the old file to the new file. This is not needed as the new file was created with the correct stats. This fix only changes server behavior - external utilities such as myisamchk still does chmod/chown. No test case provided since the problem involves synchronization with file system operations.
* | | | Merge 10.0 into 10.1Marko Mäkelä2018-01-031-7/+7
|\ \ \ \ | |/ / /
| * | | Merge 5.5 into 10.0Marko Mäkelä2018-01-031-7/+7
| |\ \ \ | | |/ /
| | * | Silence some -Wimplicit-fallthrough by proper spellingMarko Mäkelä2018-01-031-7/+7
| | | |
* | | | cleanup: ha_myisam::data_file_name and index_file_nameSergei Golubchik2017-12-251-22/+25
| | | | | | | | | | | | | | | | | | | | | | | | don't allocate them on THD::mem_root on every init(HA_STATUS_CONST) call, do it once in open() (because they don't change) on TABLE::mem_root (so they stay valid until the table is closed)
* | | | Merge branch '10.0' into 10.1Sergei Golubchik2017-10-221-1/+1
|\ \ \ \ | |/ / /
| * | | Merge branch '5.5' into 10.0Sergei Golubchik2017-10-181-1/+1
| |\ \ \ | | |/ /
| | * | MDEV-13459 Warnings, when compiling with gcc-7.xSergei Golubchik2017-10-171-1/+2
| | | | | | | | | | | | | | | | mostly caused by -Wimplicit-fallthrough
* | | | MDEV-13636 ALTER TABLE ... DELAY_KEY_WRITE=1 creates table copy for MyISAM ↵Sergei Golubchik2017-09-181-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | table with DATA DIRECTORY/INDEX DIRECTORY options correct detection of changes in DATA/INDEX DIRECTORY
* | | | Merge branch '10.0' into 10.1Sergei Golubchik2017-08-082-1/+3
|\ \ \ \ | |/ / /
| * | | Merge remote-tracking branch 'origin/5.5' into 10.0Vicențiu Ciorbaru2017-07-252-1/+3
| |\ \ \ | | |/ /
| | * | ma_check/mi_check: maria_repair_parallel initialization for !quickDaniel Black2017-07-181-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | end_io_call uses uninitialized values from the new_data_cache As such we the buffer 0 and check this before calling end_io_cache on it. Thanks Sergey Vojtovich for the review and for this solution. Found by Coverity (ref 972481).
| | * | Add storage_engine/parts overlay for MyISAMElena Stepanova2017-07-181-0/+0
| | | |
* | | | MDEV-13097 Online alter of a partitioned MyISAM table with auto_incrementSergei Golubchik2017-06-221-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MyISAM only allows online alter if autoincrement didn't change. MyISAM detects that by comparing new autoinc value from create_info, with the old one, stored in MYI. But in partitioned tables, create_info->auto_increment_value is for the whole table, max of autoinc values of individual MYI partitions. So *some* MYI partitions will inevitably think that alter table changes auto_increment value and will deny online alter. Fix: only compare autoinc values, if the user has used AUTO_INCREMENT in the ALTER TABLE statement.
* | | | MDEV-11335 Changing delay_key_write option for MyISAM table should not copy rowsSergei Golubchik2017-05-241-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't rebuild the table for ALTER TABLE delay_key_write changes. After that, delay_key_write value in .frm may differ from the value in .MYI. We'll do what .frm says.
* | | | Merge 10.0 into 10.1Marko Mäkelä2017-05-232-2/+2
|\ \ \ \ | |/ / /
| * | | MDEV-6262 analyze the coverity report on mariadbSergei Golubchik2017-05-192-2/+2
| | | | | | | | | | | | | | | | | | | | uploaded 10.0, analyzed everything with the Impact=High (and a couple of Medium)
* | | | Merge 10.0 into 10.1Marko Mäkelä2017-05-191-11/+9
|\ \ \ \ | |/ / /
| * | | Silence bogus GCC 7 warnings -Wimplicit-fallthroughMarko Mäkelä2017-05-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not silence uncertain cases, or fix any bugs. The only functional change should be that ha_federated::extra() is not calling DBUG_PRINT to report an unhandled case for HA_EXTRA_PREPARE_FOR_DROP.
| * | | MDEV-12761 Error return from external_lock make the server crashSergei Golubchik2017-05-151-11/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bunch of bugs when external_lock() fails on unlock: * mi_lock_database() used mi_mark_crashed() under share->intern_lock, but mi_mark_crashed() itself locks this mutex. * handler::close() required table to be unlocked, but failed external_lock didn't count as unlock * mysql_unlock_tables() ignored all unlock errors, but they still set the error status in stmt_da.