hugowan / maatkit

Automatically exported from code.google.com/p/maatkit
0 stars 0 forks source link

mk-archiver missing row when looking by primary key #100

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
If this is a problem report, what steps will reproduce the problem?
1. create a table in mysql 5.0.51a-log on an ubuntu 5.1 box
2. create a simple table with id as a primary key
CREATE TABLE mytable (
    id INT NOT NULL AUTO_INCREMENT,
    user1 BIGINT(20) NOT NULL REFERENCES user(id),
    user2 BIGINT(20) NOT NULL REFERENCES user(id),
    createdate TIMESTAMP NOT NULL,
    PRIMARY KEY id(id),
    KEY user1(user1),
    KEY user2(user2),
    UNIQUE KEY user_ids (user1, user2)
) ENGINE InnoDB;

3. insert a row into mytable with an id of a value "x".
4. call mk-archiver to delete the row with an id of "x" where the "i"
switch is PRIMARY.

What is the expected output? What do you see instead?
the row should be deleted.  the row is not deleted

If I change the -i parameter to be a different index, then the row properly
deletes

What information do you get from mk-<toolname>--version?
mk-archiver  Ver 1.0.3 Distrib 1316 Changeset 1

What is your MySQL, Perl, DBI, and DBD::mysql version?

What is your operating system/distribution?
Ubuntu 5.1

If you think it'll be useful, please run the tool with MKDEBUG=1 and
capture the full output in a file, then attach the file.  For example,
MKDEBUG=1 mk-<toolname> [options] > debug.txt.  Is there anything in this
file that you think we should pay special attention to?  Please gzip the
file if it's large.

This generates no output for me.

Please provide any additional information below.

Original issue reported on code.google.com by brad.henrickson on 16 Oct 2008 at 10:10

GoogleCodeExporter commented 9 years ago
mysql version:  mysql 5.0.51a-log
Perl: 5.8.8
DBI:  1.607 
DBD::mysql   4.005 

Original comment by brad.henrickson on 16 Oct 2008 at 10:16

GoogleCodeExporter commented 9 years ago
Hi, thanks for the report.  This is actually "not a bug."  The --safeautoinc 
feature
enables and disables this feature, which prevents primary keys from being 
reused. 
The documentation for this option explains its behavior.

Original comment by baron.schwartz on 16 Oct 2008 at 11:19