Hi All,
I've been trying to figure out what's going on with this for a little
bit now.
I've just upgraded to MySQL-5 on a system running RHAS-3. Everything
seemed to go smoothly for the upgrade, but I'm noticing something I'm
calling a bug (although I could be doing something wrong, as I Am Not A
DBA).
I have a bit of perl code that inserts iptables logs into a database.
The code seems to insert the row into the database but when I do a
SELECT * from fw_logs; I don't see the newly inserted data.
If I do the same insert from the mysql cli client and then do a SELECT I
see that the fw_id has auto incremented by two places (one presumably
being the attempt to insert via the perl code). But I only see the row
that was inserted via the mysql cli client.
At first I thought that perhaps the rpms of the client needed to get
updated, so I removed all of the mysql-* rpms, perl-DBI rpms, and
perl-DBD-Mysql rpms and installed, the rpms from mysql.com as well as
downloading and installing the latest versions of DBI and DBD::Mysql
from cpan.org. I am still having the same exact problem.
I'd be happy to provide any other info if that would help.
Thanks,
Harry
Here is the table.
CREATE TABLE fw_logs (
fw_id bigint(50) NOT NULL auto_increment,
sid int unsigned,
date datetime NOT NULL default '-00-00 00:00:00',
iface varchar(12) NOT NULL default '',
srcaddr varchar(64) NOT NULL default '',
srcport int(5) NOT NULL default '0',
dstaddr varchar(64) NOT NULL default '',
dstport int(5) NOT NULL default '0',
proto varchar(50) NOT NULL default '',
PRIMARY KEY (fw_id),
FOREIGN KEY (sid) REFERENCES sensor(sid) on delete cascade,
INDEX (date),
INDEX (srcaddr),
INDEX (srcport),
INDEX (dstaddr),
INDEX (dstport)
) TYPE INNODB;
Here is the table with the foreign key:
CREATE TABLE sensor (
sid INT UNSIGNED NOT NULL AUTO_INCREMENT,
hostnameTEXT,
interface TEXT,
filter TEXT,
detail TINYINT,
encodingTINYINT,
last_cidINT UNSIGNED NOT NULL,
PRIMARY KEY (sid)
) TYPE INNODB;
Here is the query log:
/usr/sbin/mysqld, Version: 5.0.15-standard-log. started with:
Tcp port: 3306 Unix socket: /var/lib/mysql/mysql.sock
Time Id CommandArgument
051102 15:14:51 1 Connect [EMAIL PROTECTED] on palantir
1 Query set autocommit=0
1 Prepare [1]
1 Execute [1] INSERT INTO
fw_logs(sid,date,iface,srcaddr,srcport,dstaddr,dstport,proto)
VALUES('1','2005-10-27
20:17:32','eth0','1xx.xx2.xx3.123','1734','1xx.xx2.xx3.38','139','TCP')
1 Quit
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]