summaryrefslogtreecommitdiff
path: root/client
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-4425 REGEXP enhancementsAlexander Barkov2013-09-262-29/+28
|
* merge 5.5 -> 10.0-baseunknown2013-09-251-1/+9
|\
| * MDEV-4684 - Enhancement request: --init-command support for mysqlslapSergey Vojtovich2013-09-171-1/+9
| | | | | | | | | | | | Added --init-command argument to mysqlslap: SQL Command to execute when connecting to MySQL server. Will automatically be re-executed when reconnecting.
* | 5.5 merge and fixes for compiler/test errorsSergei Golubchik2013-09-183-34/+59
|\ \ | |/
| * MDEV-4941 make: AIX fails with 'Identifier not allowed in cast'; syntax ↵Sergei Golubchik2013-09-091-7/+7
| | | | | | | | | | | | error in include/my_global.h C++ comments in C files, and a typo in my_global.h
| * mysql-5.5.33 mergeSergei Golubchik2013-09-062-27/+52
| |\
| | * Bug#14236170 MYSQLDUMP 5.5.25 CLIENT FAILS TO DUMPVenkatesh Duggirala2013-05-171-26/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MYSQL DB FROM REMOTE 5.0.96 SERVER Problem: mysqldump tool assumes the existence of general_log and slow_log tables in the server. If mysqldump tool executes on a old server where there are no log tables like these, mysqldump tool fails. Analysis: general_log and slow_log tables are added in the ignore-table list as part of bug-26121 fix causes bug-45740 (MYSQLDUMP DOESN'T DUMP GENERAL_LOG AND SLOW_QUERY CAUSES RESTORE PROBLEM). As part of the bug-45740 fix, mysqldump tool adds create table queries for these two tables. But the fix assumes that on all the servers, general_log and slow_log will be there. If the new mysqldump tool is executed against a old server where there are no general_log and slow_log, the mysqldump tool fails with an error that 'there is no general_log table'. Fix: When mysqldump tool is trying to retrieve general_log and slow_log table structures, first the tool should check their existence of these tables in the server instead of trying to dump it blindly.
| | * Bug#16607258 :Linker Errors Due To Inclusion Of An Implementation FileShubhangi Garg2013-05-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In log_event.h DESCRIPTION: Due to inclusion of an implementation file, namely 'rpl_tblmap.cc' in a header file, namely 'log_event.h'; linker errors occur if log_event.h is included in an application containing multiple source files, such as in the case of Binlog API. Binlog API requires including log_event.h in its source files; which leads to multiple definition errors, for functions defined in rpl_tblmap.cc for class 'table_mapping'. FIX: Change the inclusion from header file(log_event.h) to source files using this header and have flag MYSQL_CLIENT set. The only file in the current server repository is mysqlbinlog.cc. client/mysqlbinlog.cc: Pulled in code of rpl_tblmap.cc sql/log_event.h: Removed inclusion of the implementation file from this header file
* | | merge 5.5 -> 10.0-baseunknown2013-08-201-1/+1
|\ \ \ | |/ /
| * | mysql --skip-column-names flag should not affect alignment of field values,Sergei Golubchik2013-08-081-1/+1
| | | | | | | | | | | | | | | | | | set num_flag[] unconditionally, not under "if (column_names)" http://ronaldbradford.com/blog/unexplained-trivial-mysql-behavior-2013-08-02/
* | | 5.5 mergeSergei Golubchik2013-07-1714-95/+342
|\ \ \ | |/ /
| * | mysql-5.5.32 mergeSergei Golubchik2013-07-1611-19/+109
| |\ \ | | |/
| | * BUG#16698172-CANNOT DO POINT-IN-TIME RECOVERY FORVenkatesh Duggirala2013-04-251-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SINGLE DATABASE; MYSQLBINLOG Problem: If last subevent inside a RBR event is skipped while replaying a binary log using mysqlbinlog with --database=... option, generated output is missing end marker('/*!*/;) for that RBR event. Thence causing syntax error while replaying the generated output. Fix: Append end marker ('/*!*/;) if the last subevent is getting skipped. Append end marker if the last subevent is getting skipped. client/mysqlbinlog.cc: Append end marker if the last subevent is getting skipped.
| | * BUG#16615117 MYSQLDUMP PRODUCES A CHANGE MASTER STATEMENTVenkatesh Duggirala2013-04-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | WITH A PORT NUMBER ENCLOSED IN QUOTES Problem: mysqldump --dump-slave --include-master-host-port prints the CHANGE MASTER command in the generated logical backup. The PORT number that is generated with this command is a string and should be an integer. Fix: Remove the Enclosed quotes for port number.
| | * Bug #16402124 - MTR PROCESSES CERTAIN ASSIGNED VARDIR VALUES WRONGsayantan dutta2013-03-291-3/+9
| | |
| | * Bug#16500013 : post-fixNirbhay Choubey2013-03-221-4/+8
| | |
| | * Bug#16500013 : ADD VERSION CHECK TO MYSQL_UPGRADENirbhay Choubey2013-03-211-2/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (Based on Sinisa's patch) Added a version checking facility to mysql_upgrade. The versions used for checking is the version of the server that mysql_upgrade is going to upgrade and the server version that mysql_upgrade was build/distributed with. Also added an option '--version-check' to enable/disable the version checking.
| | * Fix for Bug 16395495 - OLD FSF ADDRESS IN GPL HEADERMurthy Narkedimilli2013-03-196-7/+7
| | |
| | * merge from mysql-5.1 to mysql-5.5Sujatha Sivakumar2013-03-181-15/+31
| | |\
| | | * Bug#14771299 OUT-OF-BOUND READS WRITE IN MYSQLBINLOGSujatha Sivakumar2013-03-181-15/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: ======= Found using AddressSanitizer testing. The mysqlbinlog utility may result in out-of-bound heap buffer reads and thus, undefined behaviour, when processing RBR events in the old (pre-5.1 GA) format. The following code in process_event() would only be correct if Rows_log_event was the base class for Write,Update,Delete_rows_log_event_old classes: case PRE_GA_WRITE_ROWS_EVENT: case PRE_GA_DELETE_ROWS_EVENT: case PRE_GA_UPDATE_ROWS_EVENT: ... Rows_log_event *e= (Rows_log_event*) ev; Table_map_log_event *ignored_map= print_event_info->m_table_map_ignored.get_table(e->get_table_id()); ... if (e->get_flags(Rows_log_event::STMT_END_F)) { ... } However, Rows_log_event is only the base class for the Write,Update_Delete_rows_event family of classes, but not for their *_old counterparts. So the above typecasts are incorrect for the old-format RBR events and may result (and do result according to AddressSanitizer reports) in reading memory outside of the previously allocated on heap buffer. Fix: === The above mentioned invalid type cast has been replaced with appropriate old counterpart. Note:The above mentioned issue is present only mysql-5.1 and 5.5. This is fixed in mysql-5.6 and above as part of Bug#55790. Hence few of the relevant changes of Bug#55790 are being back ported to fix the current issue. client/mysqlbinlog.cc: The above mentioned invalid type cast of using new event object to read old events, has been replaced with appropriate old counterpart. Note:The above mentioned issue is present only mysql-5.1 and 5.5. This is fixed in mysql-5.6 and above as part of Bug#55790. Hence few of the relevant changes of Bug#55790 are being back ported to fix the current issue.
| | * | Merge of patch for bug#14685362 from mysql-5.1.Nirbhay Choubey2013-03-181-2/+18
| | |\ \ | | | |/
| | | * Bug#14685362 : MEMORY LEAKS IN MYSQL CLIENT INNirbhay Choubey2013-03-181-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | INTERACTIVE MODE In interactive mode, libedit/readline allocates memory for every new line entered & later the allocated memory never gets freed. Fixed by freeing the allocated memory blocks appropriately.
| | * | BUG#14593883-REPLICATION BREAKS WHEN SET DATA TYPE Venkatesh Duggirala2013-03-131-1/+2
| | |\ \ | | | |/ | | | | | | | | | | | | COLUMNS ARE USED INSIDE A STORED PROCEDURE Merging post-push fix from mysql-5.1
| | | * BUG#14593883-REPLICATION BREAKS WHEN SET DATA TYPE Venkatesh Duggirala2013-03-131-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | COLUMNS ARE USED INSIDE A STORED PROCEDURE Post-push fix. String::operator=() in client/sql_string.h also needs to be updated with fix.
| * | | MDEV-4576 : Aria storage engine's temporary files might not be deleted ↵Vladislav Vaintroub2013-06-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (Errcode : 13) See also MySQL Bug #39750 and similar ones. Fix my_delete() on Windows, to safely remvoe files on Windows, including files that are opened by another threads in the same process, antiviruses and backup applications. If file to be deleted is also opened by another thread, the file is renamed to unique name prior to deletion - this makes it possible to create file with the same name right after deletion. With this patch my_delete_allow_opened() becomes obsolete and is replaced with my_delete(). This patch is rework of the patch http://lists.mysql.com/commits/59327 for MySQL bug#39750.
| * | | MDEV-4601 : Allow MariaDB to be build without non-blocking client.Vladislav Vaintroub2013-06-151-3/+6
| | | | | | | | | | | | | | | | | | | | Non-blocking client currently can be build on Windows, GCC on i386 and x64, or any OS wth ucontext.h header. Prior to this patch, build failed if neither of these conditions is true. Fix to avoid compiler errors in these case - non-blocking API would not be useful on , but otherwise everything will work as before.
| * | | MDEV-4297 mysql --binary-modeSergei Golubchik2013-06-105-72/+226
| | | | | | | | | | | | | | | | backport mysql --binary-mode (bug#11747577, bug#33048)
* | | | 5.5 mergeSergei Golubchik2013-06-069-50/+85
|\ \ \ \ | |/ / /
| * | | 5.3 merge.Sergei Golubchik2013-05-201-3/+1
| |\ \ \ | | | | | | | | | | | | | | | change maria.distinct to use a function that doesn't require ssl-enabled builds
| | * \ \ 5.2 mergeSergei Golubchik2013-05-201-1/+1
| | |\ \ \
| | | * \ \ 5.1 mergeSergei Golubchik2013-05-201-1/+1
| | | |\ \ \
| | | | * | | Fixed compiler warningMichael Widenius2013-05-111-1/+1
| | | | | | |
| * | | | | | mysql-5.5.31 mergeSergei Golubchik2013-05-077-36/+71
| |\ \ \ \ \ \ | | | |_|_|/ / | | |/| | | |
| | * | | | | Updated/added copyright headersMurthy Narkedimilli2013-02-267-7/+10
| | |\ \ \ \ \ | | | | |_|_|/ | | | |/| | |
| | | * | | | Updated/added copyright headers.Murthy Narkedimilli2013-02-256-6/+6
| | | | | | |
| | * | | | | Bug#14521864: MYSQL 5.1 TO 5.5 BUGS PARTITIONINGMattias Jonsson2013-01-301-28/+62
| | |\ \ \ \ \ | | | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to an internal change in the server code in between 5.1 and 5.5 (wl#2649) the hash function used in KEY partitioning changed for numeric and date/time columns (from binary hash calculation to character based hash calculation). Also enum/set changed from latin1 ci based hash calculation to binary hash between 5.1 and 5.5. (bug#11759782). These changes makes KEY [sub]partitioned tables on any of the affected column types incompatible with 5.5 and above, since the calculation of partition id differs. Also since InnoDB asserts that a deleted row was previously read (positioned), the server asserts on delete of a row that is in the wrong partition. The solution for this situation is: 1) The partitioning engine will check that delete/update will go to the partition the row was read from and give an error otherwise, consisting of the rows partitioning fields. This will avoid asserts in InnoDB and also alert the user that there is a misplaced row. A detailed error message will be given, including an entry to the error log consisting of both table name, partition and row content (PK if exists, otherwise all partitioning columns). 2) A new optional syntax for KEY () partitioning in 5.5 is allowed: [SUB]PARTITION BY KEY [ALGORITHM = N] (list_of_cols) Where N = 1 uses the same hashing as 5.1 (Numeric/date/time fields uses binary hashing, ENUM/SET uses charset hashing) N = 2 uses the same hashing as 5.5 (Numeric/date/time fields uses charset hashing, ENUM/SET uses binary hashing). If not set on CREATE/ALTER it will default to 2. This new syntax should probably be ignored by NDB. 3) Since there is a demand for avoiding scanning through the full table, during upgrade the ALTER TABLE t PARTITION BY ... command is considered a no-op (only .frm change) if everything except ALGORITHM is the same and ALGORITHM was not set before, which allows manually upgrading such table by something like: ALTER TABLE t PARTITION BY KEY ALGORITHM = 1 () or ALTER TABLE t PARTITION BY KEY ALGORITHM = 2 () 4) Enhanced partitioning with CHECK/REPAIR to also check for/repair misplaced rows. (Also works for ALTER TABLE t CHECK/REPAIR PARTITION) CHECK FOR UPGRADE: If the .frm version is < 5.5.3 and uses KEY [sub]partitioning and an affected column type then it will fail with an message: KEY () partitioning changed, please run: ALTER TABLE `test`.`t1` PARTITION BY KEY ALGORITHM = 1 (a) PARTITIONS 12 (i.e. current partitioning clause, with the addition of ALGORITHM = 1) CHECK without FOR UPGRADE: if MEDIUM (default) or EXTENDED options are given: Scan all rows and verify that it is in the correct partition. Fail for the first misplaced row. REPAIR: if default or EXTENDED (i.e. not QUICK/USE_FRM): Scan all rows and every misplaced row is moved into its correct partitions. 5) Updated mysqlcheck (called by mysql_upgrade) to handle the new output from CHECK FOR UPGRADE, to run the ALTER statement instead of running REPAIR. This will allow mysql_upgrade (or CHECK TABLE t FOR UPGRADE) to upgrade a KEY [sub]partitioned table that has any affected field type and a .frm version < 5.5.3 to ALGORITHM = 1 without rebuild. Also notice that if the .frm has a version of >= 5.5.3 and ALGORITHM is not set, it is not possible to know if it consists of rows from 5.1 or 5.5! In these cases I suggest that the user does: (optional) LOCK TABLE t WRITE; SHOW CREATE TABLE t; (verify that it has no ALGORITHM = N, and to be safe, I would suggest backing up the .frm file, to be used if one need to change to another ALGORITHM = N, without needing to rebuild/repair) ALTER TABLE t <old partitioning clause, but with ALGORITHM = N>; which should set the ALGORITHM to N (if the table has rows from 5.1 I would suggest N = 1, otherwise N = 2) CHECK TABLE t; (here one could use the backed up .frm instead and change to a new N and run CHECK again and see if it passes) and if there are misplaced rows: REPAIR TABLE t; (optional) UNLOCK TABLES;
| | | * | | | BUG#14117025: UNABLE TO RESTORE DUMPAnirudh Mangipudi2013-01-161-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: When a view, with a specific character set and collation, is created on another view with a different character set and collation the dump restoration results in an illegal mix of collations error. SOLUTION: To avoid this confusion of collations, the create table datatype being used is hardcoded as "tinyint NOT NULL". This will not matter as the table created will be dropped at runtime and specifically tinyint is used to avoid hitting the row size conflicts.
| | * | | | | BUG#11757250: REPLACE(...) INSIDE A STORED PROCEDURE.Nisha Gopalakrishnan2013-01-121-1/+1
| | |\ \ \ \ \ | | | |/ / / / | | | | | | | | | | | | | | Merge from 5.1 to 5.5
| | | * | | | BUG#11757250: REPLACE(...) INSIDE A STORED PROCEDURE.Nisha Gopalakrishnan2013-01-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Analysis: -------- REPLACE operation provides incorrect output when user variable is supplied as an argument and there are multiple rows on which the operation is performed. Consider the example below: SET @var='(( 00000000 ++ 00000000 ))'; SELECT REPLACE(@var, '00000000', table_name) AS a FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='mysql'; Invalid output: +---------------------------------------+ | REPLACE(@var, '00000000', TABLE_NAME) | +---------------------------------------+ | (( columns_priv ++ columns_priv )) | | (( columns_priv ++ columns_priv )) | ...... ...... | (( columns_priv ++ columns_priv )) | | (( columns_priv ++ columns_priv )) | | (( columns_priv ++ columns_priv )) | +---------------------------------------+ The user argument supplied as the string to REPLACE operation is overwritten after the first iteration to '(( columns_priv ++ columns_priv ))'. The overwritten string after the first iteration is used for the subsequent REPLACE iteration. Since the pattern string is not found, it returns invalid output as mentioned above. Fix: --- If the Alloced_length is zero, realloc() and create a copy of the string which is then used for the REPLACE operation for every iteration.
| * | | | | | strmake_buf(X,Y) helper, equivalent to strmake(X,Y,sizeof(X)-1)Sergei Golubchik2013-04-172-13/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | with a bit of lame protection against abuse.
* | | | | | | 5.5 mergeSergei Golubchik2013-04-141-71/+96
|\ \ \ \ \ \ \ | |/ / / / / /
| * | | | | | 5.3 mergeSergei Golubchik2013-04-121-71/+96
| |\ \ \ \ \ \ | | | |_|/ / / | | |/| | | |
| | * | | | | 5.2 mergeSergei Golubchik2013-04-111-71/+96
| | |\ \ \ \ \ | | | | |_|/ / | | | |/| | |
| | | * | | | 5.1 mergeSergei Golubchik2013-04-111-64/+89
| | | |\ \ \ \ | | | | | |_|/ | | | | |/| |
| | | | * | | MDEV-4244 [PATCH] Buffer overruns and use-after-free errorsSergei Golubchik2013-04-061-64/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | fixes for gcc 4.8 - compilation warnings and -fsanitize=address
* | | | | | | my_dir() cleanupSergei Golubchik2013-04-071-9/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * replace pointer acrobatics with a struct * make sorting explicit: MY_DONT_SORT -> MY_WANT_SORT (if you want something to be done - say it. fixes all places where my_dir() was used without thinking) * typo s/number_off_files/number_of_files/ * directory_file_name() doesn't need to be extern * remove #ifdef __BORLANDC__ * ignore '.' and '..' entries
* | | | | | | 5.5 mergeSergei Golubchik2013-03-273-20/+19
|\ \ \ \ \ \ \ | |/ / / / / /
| * | | | | | merge with mysql-5.5.30 minus few incorrect or not applicable changesetsSergei Golubchik2013-02-283-20/+13
| |\ \ \ \ \ \ | | | |_|_|/ / | | |/| | | |
| | * | | | | merge 5.1 => 5.5Tor Didriksen2012-12-211-1/+1
| | |\ \ \ \ \ | | | | |_|_|/ | | | |/| | |
| | | * | | | Bug#16027468 ADDRESSSANITIZER BUG IN MYSQLTESTTor Didriksen2012-12-201-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DBUG_ENTER and DBUG_LEAVE must *always* match, otherwise all subsequent DBUG_ENTER calls will be poking into undefined stack frames.