Commit graph

63 commits

Author SHA1 Message Date
jimw@rama.(none)
abc148000d Bug #21288: mysqldump segmentation fault when using --where
The problem was that the error handling was using a too-small buffer to
  print the error message generated. We fix this by not using a buffer at
  all, but by using fprintf() directly. There were also some problems with
  the error handling in table dumping that was exposed by this fix that were
  also corrected.
2006-08-17 14:09:24 -07:00
igreenhoe@mysql.com
85d130c58b Fix for bug #15977 (switch ordering of DISABLE KEYS/LOCK TABLE in mysqldump) 2006-06-21 00:12:23 -07:00
msvensson@neptunus.(none)
dcf9810cb1 Merge neptunus.(none):/home/msvensson/mysql/bug15328/my41-bug15328
into  neptunus.(none):/home/msvensson/mysql/mysql-4.1
2006-05-24 10:16:31 +02:00
ramil@mysql.com
13baf7575f Fix for bug #18536: mysqldump does not maintain table orders as per --tables option 2006-05-19 16:21:32 +05:00
msvensson@neptunus.(none)
22ff4c2865 Bug#15328 Segmentation fault occured if my.cnf is invalid for escape sequence
- Check that length of value is longer than 1 before decrementing length by 2.
 - Backport from 5.0, make it possible to use my_print_defaults in tests
2006-05-11 14:13:14 +02:00
tnurnberg@mysql.com
5becb110e0 Bug#19025 4.1 mysqldump doesn't correctly dump "auto_increment = [int]"
mysqldump / SHOW CREATE TABLE will show the NEXT available value for
the PK, rather than the *first* one that was available (that named in
the original CREATE TABLE ... AUTO_INCREMENT = ... statement).

This should produce correct and robust behaviour for the obvious use
cases -- when no data were inserted, then we'll produce a statement
featuring the same value the original CREATE TABLE had; if we dump
with values, INSERTing the values on the target machine should set the
correct next_ID anyway (and if not, we'll still have our AUTO_INCREMENT =
... to do that). Lastly, just the CREATE statement (with no data) for
a table that saw inserts would still result in a table that new values
could safely be inserted to).

There seems to be no robust way however to see whether the next_ID
field is > 1 because it was set to something else with CREATE TABLE
... AUTO_INCREMENT = ..., or because there is an AUTO_INCREMENT column
in  the table (but no initial value was set with AUTO_INCREMENT = ...)
and then one or more rows were INSERTed, counting up next_ID. This
means that in both cases, we'll generate an AUTO_INCREMENT =
... clause in SHOW CREATE TABLE / mysqldump.  As we also show info on,
say, charsets even if the user did not explicitly give that info in
their own CREATE TABLE, this shouldn't be an issue.

As per above, the next_ID will be affected by any INSERTs that have
taken place, though.  This /should/ result in correct and robust
behaviour, but it may look non-intuitive to some users if they CREATE
TABLE ... AUTO_INCREMENT = 1000 and later (after some INSERTs) have
SHOW CREATE TABLE give them a different value (say, CREATE TABLE
... AUTO_INCREMENT = 1006), so the docs should possibly feature a
caveat to that effect.

It's not very intuitive the way it works now (with the fix), but it's
*correct*.  We're not storing the original value anyway, if we wanted
that, we'd have to change on-disk representation?

If we do dump/load cycles with empty DBs, nothing will change.  This
changeset includes an additional test case that proves that tables
with rows will create the same next_ID for AUTO_INCREMENT = ... across
dump/restore cycles.

Confirmed by support as likely solution for client's problem.
2006-05-04 03:12:51 +02:00
patg@krsna.patg.net
7243b7bb49 BUG# 12123
Made change to mysqlimport to set character_set_database to binary to 
make importing various charsets/columns work correctly.
2005-10-25 14:50:08 -07:00
msvensson@neptunus.(none)
01b025c2d2 Fix so that my_progname is set to "mysqldump" 2005-06-22 20:37:14 +02:00
msvensson@neptunus.(none)
2dd6a58d58 BUG#9657 mysqldump xml ( -x ) does not format NULL fields correctly
- Importing the bug fixes by patch due to merge problems.
2005-06-22 20:22:54 +02:00
msvensson@neptunus.(none)[msvensson]
39636f48f0 patch 2005-06-21 14:19:56 +02:00
msvensson@neptunus.(none)
a152d29117 Bug #9558 mysqldump --no-data db t1 t2 format still dumps data
- Added testcases according to spec in bug report.
2005-06-10 16:26:23 +02:00
brian@zim.(none)
6182241268 Additions for --add-drop-database 2005-05-20 06:56:02 -07:00
jimw@mysql.com
9ef20027a6 Update mysqldump test and results 2005-05-18 09:40:12 -07:00
jimw@mysql.com
79ce5dcd90 Resolve bugfix merge 2005-05-18 09:25:06 -07:00
lenz@mysql.com
5cdf15a919 - added "--skip-comments" to the "mysqldump" test to avoid printing comments that include
version-dependent information (which causes test failures when running the test with a
  different version string)
2005-05-09 09:25:47 +02:00
jimw@mysql.com
e2a11cc15e Fix crash in mysqldump -c triggered by tables with a large number of long
field names. (Bug #10286)
2005-05-08 12:02:46 -07:00
brian@brian-akers-computer.local
39f4e5755d Patch for --insert-ignore 2005-05-07 09:49:39 -07:00
Sinisa@sinisa.nasamreza.org
172294e92e Fix to make builds possible 2005-03-08 20:06:08 +02:00
Sinisa@sinisa.nasamreza.org
5da6cd551d Merge sinisa@bk-internal.mysql.com:/home/bk/mysql-4.1
into sinisa.nasamreza.org:/mnt/work/mysql-4.1
2005-03-07 16:23:41 +02:00
Sinisa@sinisa.nasamreza.org
79ac22e324 A fix for a bug #8830, which occured when binary data from blob was
dumped with --hex-blob and --skip-extended-insert options.
2005-03-05 22:06:07 +02:00
bar@mysql.com
4a9176b418 Bugs: #8063: make test mysqldump [ fail ]
See mysqldump.test diff for more details
2005-03-03 15:43:00 +04:00
lars@mysql.com
1d3c67000b BUG#6662: Changes after Guilhems and Sergs review 2005-02-22 12:40:31 +01:00
lars@mysql.com
be28ef0a20 BUG#6662: Importing mysqldumps should not show any warnings of level "notes". 2005-02-21 18:40:28 +01:00
jimw@mysql.com
f95f820727 Fix test results for mysqldump test. Part of Bug #8148. 2005-01-28 12:13:01 -08:00
lars@mysql.com
967fac4ef6 WL#2319 V2: Exclude tables from dump
- Added a hash to keep track of database-table pairs.
- Specified database-table tables do not get dumped
2004-12-27 19:10:30 +01:00
bar@mysql.com
e53b446a73 Bug#7020: mysqldump --compatible=mysql40 still dumps in UTF8
See mysqldump.test comments for more details
2004-12-22 16:02:27 +04:00
ram@gw.mysql.r18.ru
3f741570e9 An additional test for 'CREATE DATABASE' with non-default character set. 2004-11-30 13:19:35 +04:00
ram@gw.mysql.r18.ru
ece5c9f293 A fix (bug #6101: mysqldump writes invalid SQL). 2004-10-19 11:00:44 +05:00
serg@serg.mylan
fc234f2e4c Bug#4261 - mysqldump omits NULLs with --skip-extended-insert 2004-06-23 21:46:17 +02:00
bar@bar.intranet.mysql.r18.ru
d04966e380 Sorry, forgot to commit together with the code change yesterday. 2004-06-08 11:33:16 +05:00
monty@mishka.local
e9cfe01db0 After merge fixes
Changed 'SHOW FIELD STATUS' to use 'Engine' instead of 'Type'
2004-04-27 15:33:40 +03:00
monty@mishka.local
21fd1d270e Merge with 4.0 2004-04-26 15:53:31 +03:00
vva@eagle.mysql.r18.ru
7b68b26623 fixed Bug #3361 "mysqldump quotes DECIMAL values" 2004-04-05 23:18:16 +05:00
serg@serg.mylan
ded8fa56eb my_strtod fixes:
sigsegv protection (exp overflow)
don't return inf!
use errno=EOVERFLOW to signal an overflow (as my_strntod uses errno anyway)
if errno will be too slow, my_strtod can be changed to return overflow status in a parameter (like my_strntod does)
2004-03-14 17:25:20 +01:00
vva@eagle.mysql.r18.ru
0be2ef688c merge correcttion in mysql-test/r/mysqldump.result 2004-03-11 22:43:10 +04:00
vva@eagle.mysql.r18.ru
bb6aee84ef Merge 2004-03-11 22:01:25 +04:00
vva@eagle.mysql.r18.ru
3c1ba83296 fixed bug #2591 "mysqldump quotas names inconsistently" 2004-03-11 18:46:27 +04:00
vva@eagle.mysql.r18.ru
a8bbcc52a9 - added commands --query_vertical and --query_horisontal to client/mysqltest.cc
- get my_strtod to return inf
- get Field_float::store(double) and Field_double::store(float) to set null for 
nan value 
(as extra serg's recomendations to fix for patch on 
 Bug #2082 'mysqldump converts "inf" to null')
2004-03-06 03:00:21 +04:00
vva@eagle.mysql.r18.ru
9585dd63df Merge eagle.mysql.r18.ru:/home/vva/work/mysql.orig/clear/mysql-4.1
into eagle.mysql.r18.ru:/home/vva/work/BUG_2705/mysql-4.1
2004-02-15 21:35:05 +04:00
vva@eagle.mysql.r18.ru
bdf696d0a4 fixed bug #2705 "mysqldump --tab extra output" 2004-02-14 01:21:46 +04:00
vva@eagle.mysql.r18.ru
c57ca85da5 fixed mistake after merge in mysql-test/r/mysqldump.result 2004-02-13 01:50:02 +04:00
vva@eagle.mysql.r18.ru
950b2df9f7 correcting mysql-test/r/mysqldump.result after merge 2004-02-10 19:29:28 +04:00
vva@eagle.mysql.r18.ru
fd03264469 Merge 2004-02-10 18:56:43 +04:00
monty@mysql.com
06432eac36 Added --compact to mysqlbinlog
Fixed output from mysqlbinlog when using --skip-comments
Fixed warnings from valgrind
Fixed ref_length when used with HEAP tables
More efficent need_conversion()
Fixed error handling in UPDATE with not updateable tables
Fixed bug in null handling in CAST to signed/unsigned
2004-02-09 12:31:03 +01:00
vva@eagle.mysql.r18.ru
cc1ff3c479 fixed bug #2592 mysqldump doesn't quote "tricky" names correctly 2004-02-07 02:22:12 +04:00
acurtis@pcgem.rdg.cyberkinetica.com
d0d54abcf2 Bug#2634
Emit "TYPE=" for 4.0 and 3.23 compatible modes
2004-02-05 02:30:28 +00:00
bell@sanja.is.com.ua
b781183f09 mysqldump results fixed 2004-01-17 12:03:14 +02:00
monty@mysql.com
031390a9a4 Fixes after merge with 4.0
Cleaned up embedded library access and query cache handling
Changed min stack size to 128K (to allow longer MyISAM keys)
Fixed wrong priority for XOR (should be less than NEG to get -1^1 to work)
2003-12-19 16:25:50 +02:00
monty@mysql.com
e0cc6799ec Merge with 4.0.17 2003-12-17 17:35:34 +02:00
monty@mysql.com
b24671ee2d Updated results 2003-12-15 18:10:46 +01:00