List:MySQL on Win32« Previous MessageNext Message »
From:David Vergin Date:June 12 2000 2:01am
Subject:execute failed: MySQL server has gone away... NOT
View as plain text  
Running MySQL installed from mysql-3_22_27-pc-linux-gnu-i686_tar.gz
Linux version is Red Hat 6.0

I have not seen this error before:
DBD::mysql::st execute failed: MySQL server has gone away at
/home/bmc/cgi-bin/b
mctool2.pm line 283.

But the server has not gone away. It is serving up data quite happily except
for this one routine. The docs state: "You can also get these errors if you
send a query to the server that is incorrect or too large."

Here's the offending routine:

sub max_child_id {
   my ($self, $node_id) = @_;
   my $dbh = $self->{dbh};
  warn "\nin max_child_id Sdbh [$dbh],  Snode_id [$node_id]\n\n";
   my $sql = qq{SELECT MAX(NodeID) FROM Cnodes WHERE ParentID="$node_id"};
  warn "\nSsql [" . $sql . "]\n\n";
   my $sth = $dbh->prepare($sql);
   $sth->execute ();                     # Line 283
   my ($maxID) = $sth->fetchrow_array ();
   $sth->finish;
   return($maxID);
}

Here's the log:

<log>
in max_child_id Sdbh [DBI::db=HASH(0x823d4ac)],  Snode_id [19001000]


bmctool::data_buffer::max_child_id('bmctool::data_buffer=HASH(0x826aaf8)
', 19001000) called at /home/bmc/cgi-bin/bmc2.pl line 365

Ssql [SELECT MAX(NodeID) FROM Cnodes WHERE ParentID="19001000"]


bmctool::data_buffer::max_child_id('bmctool::data_buffer=HASH(0x826aaf8)
', 19001000) called at /home/bmc/cgi-bin/bmc2.pl line 365
DBD::mysql::st execute failed: MySQL server has gone away at
/home/bmc/cgi-bin/b
mctool2.pm line 283.

bmctool::data_buffer::max_child_id('bmctool::data_buffer=HASH(0x826aaf8)
', 19001000) called at /home/bmc/cgi-bin/bmc2.pl line 365
[Sun Jun 11 10:31:04 2000] bmc2.pl: DBD::mysql::st execute failed: MySQL
server
has gone away at /home/bmc/cgi-bin/bmctool2.pm line 283.
</log>

The statement:

   SELECT MAX(NodeID) FROM Cnodes WHERE ParentID="19001000"

runs fine if cut from the log and pasted into MySQL Administrator for
Windows and returns the expected result.

As usual... clues, specific rtfm's, theories, debugging techniques,
suggested tests; gladly received.

TIA
david


Thread
Data Modeling SettingsRoger Niederland11 Jun
  • execute failed: MySQL server has gone away... NOTDavid Vergin12 Jun
    • Re: execute failed: MySQL server has gone away... NOTSinisa Milivojevic12 Jun
    • Re: execute failed: MySQL server has gone away... NOTBrian Smith12 Jun
      • MySQL server has gone away... SOLVEDDavid Vergin12 Jun
  • Re: Data Modeling SettingsTonci Grgin27 Jun
  • Re: Data Modeling SettingsRoger Niederland28 Jun
RE: MySQL server has gone away... SOLVEDNathan R. Neulinger12 Jun