Hello.
> The table should not be locked, right :D
Most probably it will be locked. If you are not running in strict SQL
mode, any column not explicitly given a value is set to its default
(explicit or implicit) value. For example, if you specify a column list
that does not name all the columns i
Hi Gleb
Thanx a lot for explanation, make sense.
I haven't try with INSERT INTO Y (t_y_time,and so on) SELECT
(t_x_time, ... and so on) FROM X
excluding t_y_id
The table should not be locked, right :D
Thx
Gleb Paharenko wrote:
Hello.
It seems that the problem is in the t_y_id auto_in
Hello.
It seems that the problem is in the t_y_id auto_increment field. InnoDB
puts special AUTO-INC table lock, and prevent other threads from
inserting into Y. See:
http://dev.mysql.com/doc/refman/5.0/en/innodb-auto-increment-column.html
Ady Wicaksono wrote:
> Below is the SQL to create tabl
Below is the SQL to create table Y
CREATE TABLE `Y` (
`t_y_id` int(11) NOT NULL auto_increment,
`t_y_time` timestamp NOT NULL default CURRENT_TIMESTAMP,
`t_y_dest` varchar(16) NOT NULL default '',
`t_y_msg` varchar(160) NOT NULL default '',
`t_y_status` tinyint(2) NOT NULL default '0',
`t_y
Hello.
According to:
http://dev.mysql.com/doc/refman/5.0/en/innodb-locks-set.html
INSERT ... SELECT set a non-next-key lock on each row. So in most cases
you should be able to insert the record into Y. Please, provide
the CREATE statement for table Y and the output of 'show variables'
statement
I use MySQL 5.0.15
I have about 5 billion rows in table X, i create another table Y with
the same stucture with X
CREATE TABLE Y LIKE X;
Both X and Y is the InnoDB table, since i believe that both work on the
"row locking" models
I try to initiate 2 session
First session try to INSERT all