Still get lock tables error message in 5.0.10
Hi,
I'm still getting the error message
ERROR 1100 (HY000): Table 't1' was not locked with LOCK TABLES
at some tables using a trigger in MySQL 5.0.10, although this problem should already be solved regarding to the ChangeLog.
I've also tried examples from Andrew Gilfrin's www.mysqldevelopment.com site that worked fine.
Here's the concrete example that failed:
DROP TABLE IF EXISTS `mpopp_test`.`t1`;
CREATE TABLE `t1` (
`id` int(11) NOT NULL auto_increment,
`value` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
delimiter //
drop trigger mpopp_test.bi_t1 //
create trigger bi_t1 before insert on t1 for each row
BEGIN
if new.value > 3 and new.value < 7 then
insert into t1 (id, value) values (new.id, new.value);
end if;
END //
delimiter ;
mysql> insert into t1 values (6, 4);
ERROR 1100 (HY000): Table 't1' was not locked with LOCK TABLES
Any ideas what's wrong?
Markus
--
Markus Popp, Web Developer, mysql.com
Oracle Austria
Subject
Views
Written By
Posted
Still get lock tables error message in 5.0.10
4838
August 03, 2005 05:30PM
2525
August 03, 2005 08:45PM
2395
August 04, 2005 04:22AM
2457
August 04, 2005 06:29PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.