I have seen something weird when I test MySQL Cluster with one of my
perl script.
Here are the table:
CREATE TABLE log (logid bigint(20) NOT NULL auto_increment, entityid
bigint(20) NOT NULL default 0, timestamp bigint(20) NOT NULL default 0,
entitylogid bigint(20) NOT NULL default 0, entitylogtimestamp bigint(20)
NOT NULL default 0, logtype bigint(20) NOT NULL default 0, PRIMARY KEY
(logid)) ENGINE=NDB;
With this script, auto_increment doesnt work properly. 192.168.101.4 and
192.168.101.7 are my api node. The auto_increment jump by a factor of
32...
#!/usr/bin/perl
use DBI;
use POSIX qw(strftime);
while (true) {
if ( $server eq "192.168.101.4") {
$server = "192.168.101.7";
}
else {
$server = "192.168.101.4";
};
my $dbh = DBI->connect("DBI:mysql:test:$server", mytest)
or die "Couldn't connect to database: " . DBI->errstr;
my $sql = qq{ INSERT INTO log VALUE ( NULL, 1, 2, 3, 4, 5) };
$dbh->do($sql);
$time = strftime "%H:%M:%S", localtime;
print "$time : INSERT INTO log VALUE ( NULL, 1, 2, 3, 4, 5 )
FROM server $server\n";
sleep(1);
$dbh->disconnect;
};
--
Pascal Gauthier
Cel: 514-668-9966
http://www.nihilisme.ca
Attachment: [application/pgp-signature] This is a digitally signed message part signature.asc
Attachment: [application/pgp-signature] This is a digitally signed message part signature.asc