Philippe,

----- Original Message ----- 
From: "Philippe Lewicki" <[EMAIL PROTECTED]>
Newsgroups: mailing.database.myodbc
Sent: Wednesday, April 07, 2004 12:51 AM
Subject: Re: read_key: Got error 146 when reading table


> Heikki,
>
> Its: mysql-standard-4.0.17-pc-linux-i686

thank you for the bug report. I have now removed that harmless warning from
4.0.19.

> Then I got an other question related, we get those errors after
> intensive insert select type of queries.
>
>  From MySQL documentation:
> To ensure that the binary log can be used to re-create the original
> tables, MySQL will not allow concurrent inserts during INSERT ... SELECT.
>
>  From InnoDB documentation:
> INSERT INTO T SELECT ... FROM S WHERE ...
>      sets an exclusive (non-next-key) lock on each row inserted into T.
> Normally does the search on S as a consistent read, but sets shared
> locks on S if the MySQL binlogging is on. InnoDB has to set locks in the
> latter case because in roll-forward recovery from a backup every SQL
> statement has to be executed in exactly the same way as it was done
> originally.
>
> Just to confirm on innoDB only the inserted rows are exclusive lock on T.
> T can accept concurrent inserts.

Yes. A newly inserted index record carries a 'lock only the record, not the
gap before it' -type exclusive lock.

> Thanks,
>
> Philippe

Best regards,

Heikki Tuuri
Innobase Oy
Foreign keys, transactions, and row level locking for MySQL
InnoDB Hot Backup - a hot backup tool for InnoDB which also backs up MyISAM
tables
http://www.innodb.com/order.php

Register now for the 2004 MySQL Users Conference!
http://www.mysql.com/events/uc2004/index.html



> Heikki Tuuri wrote:
> > Philippe,
> >
> > ----- Original Message ----- 
> > From: "Philippe Lewicki" <[EMAIL PROTECTED]>
> > Newsgroups: mailing.database.myodbc
> > Sent: Tuesday, April 06, 2004 5:56 AM
> > Subject: read_key: Got error 146 when reading table
> >
> >
> >
> >>Hi,
> >>
> >>Found that error in .err log file:
> >>read_key: Got error 146 when reading table './databasename/tablename'
> >>
> >>Its an InnoDB table that gets a lot of reads/write with multiple
> >>millions records.
> >>
> >>Does someone as more informations on that error ?
> >
> >
> > [EMAIL PROTECTED]:~/mysql-standard-4.0.17-pc-linux-i686/bin> perror 146
> > Error code 146:  Unknown error 146
> > 146 = Lock timed out; Retry transaction
> >
> > the warning is harmless.
> >
> > What MySQL version you are running? I think that about a year ago I
removed
> > most of those harmless warnings from the .err log.
> >
> >
> >>Philippe
> >
> >
> > Best regards,
> >
> > Heikki Tuuri
> > Innobase Oy
> > Foreign keys, transactions, and row level locking for MySQL
> > InnoDB Hot Backup - a hot backup tool for InnoDB which also backs up
MyISAM
> > tables
> > http://www.innodb.com/order.php
> >
> > Register now for the 2004 MySQL Users Conference!
> > http://www.mysql.com/events/uc2004/index.html
> >
> >
>
>
>
>
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]
>


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to