summaryrefslogtreecommitdiff
path: root/mysql-test/t/mysqldump.test
Commit message (Collapse)AuthorAgeFilesLines
* Create 'main' test directory and move 't' and 'r' thereMichael Widenius2018-03-291-2691/+0
|
* System Versioning 1.0 pre5 [closes #407]Aleksey Midenkov2017-12-151-0/+43
|\ | | | | | | | | | | | | | | | | Merge branch '10.3' into trunk Both field_visibility and VERS_HIDDEN_FLAG exist independently. TODO: VERS_HIDDEN_FLAG should be replaced with SYSTEM_INVISIBLE (or COMPLETELY_INVISIBLE?).
| * mysqldump fix for invisible columnSachin Setiya2017-12-151-0/+43
| | | | | | | | | | | | | | | | | | | | | | Actually there are 2 issues in the case of invisible columns 1st `select fields from t1` will have more fields then `select * from t1`. So instead of `select * from t1` we are using `select a,b,invisible from t1` these fields are supplied from `select fields from t1`. 2nd We are using --complete-insert when we detect that this table is using invisible columns.
* | SQL,Client: mysqldump for TRT fix [#302]Aleksey Midenkov2017-11-171-1/+1
|/ | | | | | | | | Test results: main. mysqldump mysqldump-max mysqld--help openssl_1
* Merge branch '10.1' into 10.2Sergei Golubchik2017-05-091-0/+52
|\ | | | | | | | | Revert commit db0917f68f, because the fix for MDEV-12696 is coming from 5.5 and 10.1 in this merge.
| * Merge branch '10.0' 10.1Sergei Golubchik2017-04-281-0/+50
| |\
| | * Merge branch '5.5' into 10.0Sergei Golubchik2017-04-211-0/+50
| | |\
| | | * Merge remote-tracking branch 'mysql/5.5' into 5.5mariadb-5.5.55Sergei Golubchik2017-04-111-0/+50
| | | |\
| | | | * Bug #25717383: MYSQLDUMP MAY EXECUTE ANY ARBITRARY QUERYmysql-5.5.55Bharathy Satish2017-03-181-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While writing comments if database object names has a new line character, then next line is considered a command, rather than a comment. This patch fixes the way comments are constructed in mysqldump. (cherry picked from commit 1099f9d17b1c697c2760f86556f5bae7d202b444)
* | | | | MDEV-10431: Please implement mysqldump --add-drop-trigger from MySQL 5.6Oleksandr Byelkin2017-05-041-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Port of mysql changeset by Georgi Kodinov <Georgi.Kodinov@Oracle.com>: Bug #34325 : --add-drop-trigger option for mysqldump Implemented the --add-drop-trigger option to prepend each CREATE TRIGGER in the dump file with DROP TRIGGER. The option is off by default. Added a test case.
* | | | | Merge branch '10.1' into 10.2Sergei Golubchik2017-03-301-0/+9
|\ \ \ \ \ | |/ / / /
| * | | | Merge 10.0 into 10.1Marko Mäkelä2017-03-091-0/+9
| |\ \ \ \ | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, implement MDEV-11027 a little differently from 5.5 and 10.0: recv_apply_hashed_log_recs(): Change the return type back to void (DB_SUCCESS was always returned). Report progress also via systemd using sd_notifyf().
| | * | | Merge branch '5.5' into 10.0Vicențiu Ciorbaru2017-03-031-0/+8
| | |\ \ \ | | | |/ /
| | | * | MDEV-11505 wrong databasename in mysqldump commentSergei Golubchik2017-02-271-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | fix_for_comment() uses a static buffer. cannot have two fix_for_comment() calls as arguments to one printf().
* | | | | MDEV-7635: Update tests to adapt to the new default sql_modeNirbhay Choubey2017-02-101-1/+1
| | | | |
* | | | | MDEV-6112 multiple triggers per tableMonty2016-10-051-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is similar to MysQL Worklog 3253, but with a different implementation. The disk format and SQL syntax is identical with MySQL 5.7. Fetures supported: - "Any" ammount of any trigger - Supports FOLLOWS and PRECEDES to be able to put triggers in a certain execution order. Implementation details: - Class Trigger added to hold information about a trigger. Before this trigger information was stored in a set of lists in Table_triggers_list and in Table_triggers_list::bodies - Each Trigger has a next field that poinst to the next Trigger with the same action and time. - When accessing a trigger, we now always access all linked triggers - The list are now only used to load and save trigger files. - MySQL trigger test case (trigger_wl3253) added and we execute these identically. - Even more gracefully handling of wrong trigger files than before. This is useful if a trigger file uses functions or syntax not provided by the server. - Each trigger now has a "Created" field that shows when the trigger was created, with 2 decimals. Other comments: - Many of the changes in test files was done because of the new "Created" field in the trigger file. This shows up in SHOW ... TRIGGER and when using information_schema.trigger. - Don't check if all memory is released if on uses --gdb; This is needed to be able to get a list from safemalloc of not freed memory while debugging. - Added option to trim_whitespace() to know how many prefix characters was skipped. - Changed a few ulonglong sql_mode to sql_mode_t, to find some wrong usage of sql_mode.
* | | | | General spell fixing in comments and stringsOtto Kekäläinen2016-06-081-1/+1
|/ / / /
* | | | Merge branch '10.0' into 10.1Sergei Golubchik2016-03-211-1/+1
|\ \ \ \ | |/ / /
| * | | Fix spelling: occurred, execute, which etcOtto Kekäläinen2016-03-041-1/+1
| | | |
* | | | Merge branch '10.0' into 10.1Sergei Golubchik2015-12-211-0/+17
|\ \ \ \ | |/ / /
| * | | Merge branch '5.5' into 10.0Sergei Golubchik2015-12-131-0/+15
| |\ \ \ | | |/ /
| | * | fix main.mysqldump test on windowsSergei Golubchik2015-12-111-1/+6
| | | |
| | * | MDEV-9001 - [PATCH] Fix DB name quoting in mysqldump --routineSergey Vojtovich2015-12-031-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | mysqldump --routine fails to dump databases containing backslash ("\") character. This happened because escaped database name was being used as an identifier while changing current database. Such identifers are not supposed to be escaped, they must be properly quoted instead.
* | | | MDEV-9124 mysqldump does not dump data if table name is same as view earlier onElena Stepanova2015-11-131-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While querying INFORMATION SCHEMA, check for a table's engine only used table name, but not schema name; so, if there were different rows with the same table name, a wrong one could be retrieved. The result of the check affected the decision whether the contents of the table should be dumped, and whether a DELAYED option can be used. Fixed by adding a clause for table_schema to the query.
* | | | Merge branch '10.0' into 10.1Sergei Golubchik2015-10-121-6/+31
|\ \ \ \ | |/ / /
| * | | Merge branch '5.5' into 10.0Sergei Golubchik2015-10-091-6/+30
| |\ \ \ | | |/ /
| | * | Merge remote-tracking branch 'mysql/5.5' into 5.5Sergei Golubchik2015-10-081-6/+30
| | |\ \ | | | |/
| | | * BUG#11754258: INCORRECT ERROR MESSAGE WHEN CREATING UNSAFEKarthik Kamath2015-08-181-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | VIEW It appears that the code refactoring done as part of the patch for the MySQL BUG#11749859 fixed this issue. This issue is not reproducible on MySQL 5.5+ versions now. As part of this patch, the test file "mysqldump.test" has been updated to remove the comment which was referring to the bug and also the line which suppresses the warning.
| | | * Bug #20772273 : MYSQLIMPORT --USE-THREADS DOESN'T USEArun Kuruvila2015-06-301-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MULTIPLE THREADS Description:- The utility "mysqlimport" does not use multiple threads for the execution with option "--use-threads". "mysqlimport" while importing multiple files and multiple tables, uses a single thread even if the number of threads are specified with "--use-threads" option. Analysis:- This utility uses ifdef HAVE_LIBPTHREAD to check for libpthread library and if defined uses libpthread library for mutlithreaing. Since HAVE_LIBPTHREAD is not defined anywhere in the source, "--use-threads" option is silently ignored. Fix:- "-DTHREADS" is set to the COMPILE_FLAGS which will enable pthreads. HAVE_LIBPTHREAD macro is removed.
| | | * Bug #16996656: UNIQUE OPTION PREFIXES NOT DEPRECATED IN 5.5+Georgi Kodinov2013-06-261-11/+11
| | | | | | | | | | | | Backported the deprecation warnings from WL#6978 to 5.5
| | | * Bug #15930494 MYSQLDUMP TEST SOMETIMES FAILS DUE TO MIXING STDOUT ANDAkhila Maddukuri2012-12-071-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | STDERR Fix: Added a destination file to mysqldump.
| | | * Bug #11754178 45740: MYSQLDUMP DOESN'T DUMP GENERAL_LOG AND SLOW_QUERYVenkata Sidagam2012-05-071-0/+27
| | | |\ | | | | | | | | | | | | | | | | | | | | CAUSES RESTORE PROBLEM Merging the fix from mysql-5.1 to mysql-5.5
| | | | * Bug #11754178 45740: MYSQLDUMP DOESN'T DUMP GENERAL_LOG AND SLOW_QUERY Venkata Sidagam2012-05-041-3/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CAUSES RESTORE PROBLEM Problem Statement: ------------------ mysqldump is not having the dump stmts for general_log and slow_log tables. That is because of the fix for Bug#26121. Hence, after dropping the mysql database, and applying the dump by enabling the logging, "'general_log' table not found" errors are logged into the server log file. Analysis: --------- As part of the fix for Bug#26121, we skipped the dumping of tables for general_log and slow_log, because the data dump of those tables are taking LOCKS, which is not allowed for log tables. Fix: ---- We came up with an approach that instead of taking both meta data and data dump information for those tables, take only the meta data dump which doesn't need LOCKS. As part of fixing the issue we came up with below algorithm. Design before fix: 1) mysql database is having tables like db, event,... general_log, ... slow_log... 2) Skip general_log and slow_log while preparing the tables list 3) Take the TL_READ lock on tables which are present in the table list and do 'show create table'. 4) Release the lock. Design with the fix: 1) mysql database is having tables like db, event,... general_log, ... slow_log... 2) Skip general_log and slow_log while preparing the tables list 3) Explicitly call the 'show create table' for general_log and slow_log 3) Take the TL_READ lock on tables which are present in the table list and do 'show create table'. 4) Release the lock. While taking the meta data dump for general_log and slow_log the "CREATE TABLE" is replaced with "CREATE TABLE IF NOT EXISTS". This is because we skipped "DROP TABLE" for those tables, "DROP TABLE" fails for these tables if logging is enabled. Customer is applying the dump by enabling logging so, if the dump has "DROP TABLE" it will fail. Hence, removed the "DROP TABLE" stmts for those tables. After the fix we could observe "Table 'mysql.general_log' doesn't exist" errors initially that is because in the customer scenario they are dropping the mysql database by enabling the logging, Hence, those errors are expected. Once we apply the dump which is taken before the "drop database mysql", the errors will not be there.
| | | * | Merge of fix for bug#11760384 from mysql-5.1.Nirbhay Choubey2012-01-101-0/+112
| | | |\ \ | | | | |/
| | | | * BUG#11760384 - 52792: mysqldump in XML mode does not dumpNirbhay Choubey2012-01-101-0/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | routines. mysqldump in xml mode did not dump routines, events or triggers. This patch fixes this issue by fixing the if conditions that disallowed the dump of above mentioned objects in xml mode, and added the required code to enable dump in xml format.
| | | * | Bug#12809202 61854: MYSQLDUMP --SINGLE-TRANSACTIONNirbhay Choubey2011-12-241-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | --FLUSH-LOG BREAKS CONSISTENCY Post-fix for some failing tests.
| | | * | Bug#12809202 61854: MYSQLDUMP --SINGLE-TRANSACTIONNirbhay Choubey2011-12-231-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | --FLUSH-LOG BREAKS CONSISTENCY The transaction started by mysqldump gets committed implicitly when flush-log is specified along with single-transaction option, and hence can break consistency. This is because, COM_REFRESH is executed in order to flush logs and starting from 5.5 this command performs an implicit commit. Fixed by making sure that COM_REFRESH is executed before the transaction has started and not after it. Note : This patch triggers following behavioral changes in mysqldump : 1) After this patch we no longer flush logs before dumping each database if --single-transaction option is given like it was done before (in the absence of --lock-all-tables and --master-data options). 2) Also, after this patch, we start acquiring FTWRL before flushing logs in cases when only --single-transaction and --flush-logs are given. It becomes safe to use mysqldump with these two options and without --master-data parameter for backups.
| | | * | merge mysql-5.5->mysql-5.5-securityGeorgi Kodinov2011-03-211-0/+1
| | | |\ \
| | | | * \ Merge from mysql-5.1 -> mysql-5.5.Nirbhay Choubey2011-03-171-0/+2
| | | | |\ \ | | | | | |/
| | | | | * Minor fix in mysqldump test.Nirbhay Choubey2011-03-171-0/+2
| | | | | |
| | | * | | Fixed the test cleanup code post-mergeGeorgi Kodinov2011-03-171-0/+1
| | | |/ /
| | | * | Merge from mysql-5.5.10-releasehery.ramilison@oracle.com2011-03-161-0/+10
| | | |\ \
| | | | * | Fix for BUG#59894Guilhem Bichot2011-02-111-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "set optimizer_switch to e or d causes invalid memory writes/valgrind warnings": due to prefix support, the argument "e" was overwritten with its full value "engine_condition_pushdown", which caused a buffer overrun. This was wrong usage of find_type(); other wrong usages are fixed here too. Please start reading with the comment of typelib.c.
| | | * | | Merge of fix for bug#11766310 from mysql-5.1 -> mysql-5.5.Nirbhay Choubey2011-02-211-0/+21
| | | |\ \ \ | | | | |/ / | | | |/| / | | | | |/
| | | | * Bug#11766310 : 59398: MYSQLDUMP 5.1 CAN'T HANDLE A DASHNirbhay Choubey2011-02-211-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ("-") IN DATABASE NAMES IN ALTER DATABASE. mysqldump did not quote database name in 'ALTER DATABASE' statements in its output. This can further cause a failure while loading if database name contains a hyphen '-'. This happened as, while printing the 'ALTER DATABASE' statements, the database name was not quoted. Fixed by quoting the database name.
| | | * | Merging fix of Bug#13618 from mysql-5.1.Nirbhay Choubey2011-01-141-0/+9
| | | |\ \ | | | | |/
| | | | * Bug#13618 : mysqldump --xml omits comment on table fieldNirbhay Choubey2011-01-141-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When mysqldump tries to dump information in xml format, the result does not contain field level comments. In order to retrieve various informations for a field/column, mysqldump currently uses 'show fields from <tab>' statement. The attributes returned by the statement lacks the information regarding field comments. Fixed by changing the query to one that probes I_S to retrieve required field informations, including the field comment.
| | | * | Manual merge of mysql-5.1-bugteam to mysql-trunk-merge.Alexey Kopytov2010-05-241-0/+1
| | | |\ \ | | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: conflict Makefile.am conflict mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result conflict mysql-test/suite/rpl/t/rpl_tmp_table_and_DDL.test conflict sql/opt_sum.cc conflict sql/set_var.cc conflict sql/sql_base.cc conflict sql/sql_priv.h conflict sql/sql_show.cc
| | | | * BUG#52987: mysqldump fails if umask=0077Sven Sandberg2010-05-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: The test case mysqldump reads a file that must be world-readable. The test did not force the file to be world-readable, so if the tree was branched with a umask of 0077, the test would fail. Fix: chmod the file.
| | | * | Manual merge of mysql-5.1-bugteam to mysql-trunk-merge.Alexey Kopytov2010-05-091-0/+29
| | | |\ \ | | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Text conflict in mysql-test/r/grant.result Text conflict in mysql-test/t/grant.test Text conflict in mysys/mf_loadpath.c Text conflict in sql/slave.cc Text conflict in sql/sql_priv.h