Bug #42233 console mysql client lost connection during query
Submitted: 21 Jan 2009 6:45 Modified: 29 Jan 2009 3:47
Reporter: Yuriy Ohonin Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.1.30 OS:Linux (client - FreeBSD)
Assigned to: CPU Architecture:Any

[21 Jan 2009 6:45] Yuriy Ohonin
Description:
Hello,

i'm using Arch Linux with MySql as a database server and i need to make some changes in DB from my gateway (FreeBSD 6.2-PRERELEASE amd64).

Here is the problem:

mysql> INSERT INTO table1 (param1, param2, param3, param4 ) VALUE ('1','1','1','1');
Query OK, 1 row affected (0.00 sec)

mysql> INSERT INTO table1 (param1, param2, param3, param4, param5) VALUE ('1','1','1','1', 'fagsdafj');
ERROR 2013 (HY000): Lost connection to MySQL server during query

Same query from server itself works fine.
Remote querying from my workstation (mysql -h <server ip> -u user -p) works fine.

Same query from gateway to another (old one) server with the same database works fine.

This problem apply to any table i have.

Here is tcpdump:
For "mysql> INSERT INTO switches (street_id, building, location, type_id) VALUE ('1','1','1','1');" - good one:
-------------------------------------------------------------------------------
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
10:14:08.255148 IP insider.cn.orionnet.ru.53070 > 37.16.65.80.ip.morning.ru.mysql: Flags [P.], ack 3592992170, win 33304, options [nop,nop,TS val 308428217 ecr 206575399], length 90
        0x0000:  4508 008e fd8c 4000 3f06 6dfd 5041 1f31  E.....@.?.m.PA.1
        0x0010:  5041 1025 cf4e 0cea 1af4 2bc3 d628 b5aa  PA.%.N....+..(..
        0x0020:  8018 8218 cbe3 0000 0101 080a 1262 3db9  .............b=.
        0x0030:  0c50 1727 5600 0000 0349 4e53 4552 5420  .P.'V....INSERT.
        0x0040:  494e 544f 2073 7769 7463 6865            INTO.switche
10:14:08.255401 IP 37.16.65.80.ip.morning.ru.mysql > insider.cn.orionnet.ru.53070: Flags [P.], ack 90, win 91, options [nop,nop,TS val 206597252 ecr 308428217], length 13
        0x0000:  4508 0041 8798 4000 4006 e33e 5041 1025  E..A..@.@..>PA.%
        0x0010:  5041 1f31 0cea cf4e d628 b5aa 1af4 2c1d  PA.1...N.(....,.
        0x0020:  8018 005b d00b 0000 0101 080a 0c50 6c84  ...[.........Pl.
        0x0030:  1262 3db9 0900 0001 0001 fc27 0102 0000  .b=........'....
        0x0040:  00                                       .
10:14:08.359716 IP insider.cn.orionnet.ru.53070 > 37.16.65.80.ip.morning.ru.mysql: Flags [.], ack 14, win 33304, options [nop,nop,TS val 308428320 ecr 206597252], length 0
        0x0000:  4508 0034 fd94 4000 3f06 6e4f 5041 1f31  E..4..@.?.nOPA.1
        0x0010:  5041 1025 cf4e 0cea 1af4 2c1d d628 b5b7  PA.%.N....,..(..
        0x0020:  8010 8218 ac4b 0000 0101 080a 1262 3e20  .....K.......b>.
        0x0030:  0c50 6c84                                .Pl.
^C
3 packets captured
3 packets received by filter
0 packets dropped by kernel
-------------------------------------------------------------------------------

For "INSERT INTO switches (street_id, building, location, type_id, model) VALUE ('1','1','1','1', 'fagsdafj');
ERROR 2013 (HY000): Lost connection to MySQL server during query"
-------------------------------------------------------------------------------
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
10:19:29.310597 IP insider.cn.orionnet.ru.53070 > 37.16.65.80.ip.morning.ru.mysql: Flags [R.], seq 452209802, ack 3592992183, win 33304, length 0
        0x0000:  4508 0028 8db2 4000 3f06 de3d 5041 1f31  E..(..@.?..=PA.1
        0x0010:  5041 1025 cf4e 0cea 1af4 2c8a d628 b5b7  PA.%.N....,..(..
        0x0020:  5014 8218 ae48 0000 0000 0000 0000       P....H........
 ------- client report error here, no more packets ----
^C
1 packets captured
1 packets received by filter
0 packets dropped by kernel

How to repeat:
I'm not able to repeat this bug on another mashine, maybe it is platform specific
[21 Jan 2009 7:35] Valeriy Kravchuk
Thank you for a probem report. Please, send exact MySQL versions (5.x.y) for both servers and mysql --version results for client. Send also SHOW CREATE TABLE results for the table used. Do you have any related messages in server's error log?
[22 Jan 2009 5:25] Yuriy Ohonin
SHOW CREATE TABLE result
------------------------------------------------------------------------------
CREATE TABLE `switches` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `street_id` int(11) DEFAULT NULL,
  `building` varchar(50) CHARACTER SET utf8 DEFAULT NULL,
  `location` varchar(50) CHARACTER SET utf8 DEFAULT NULL,
  `type_id` int(11) DEFAULT NULL,
  `producer_id` int(11) DEFAULT NULL,
  `model` varchar(50) CHARACTER SET utf8 DEFAULT NULL,
  `serial` varchar(50) CHARACTER SET utf8 DEFAULT NULL,
  `comment` varchar(50) CHARACTER SET utf8 DEFAULT NULL,
  `add_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `change_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `ip` varchar(15) NOT NULL DEFAULT '',
  `creator_id` int(11) NOT NULL DEFAULT '0',
  `editor_id` int(11) NOT NULL DEFAULT '0',
  `subnet_id` int(11) NOT NULL DEFAULT '0',
  `sendsms` tinyint(4) NOT NULL DEFAULT '1',
  `is_main` tinyint(4) NOT NULL DEFAULT '0',
  `type` tinyint(4) NOT NULL DEFAULT '0',
  `is_deleted` tinyint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `MODEL` (`model`),
  KEY `IDS` (`street_id`,`type_id`,`producer_id`,`creator_id`,`editor_id`,`subnet_id`),
  KEY `NONIDS` (`building`,`location`,`comment`,`add_date`,`change_date`,`ip`)
) ENGINE=MyISAM AUTO_INCREMENT=296 DEFAULT CHARSET=latin1
----------------------------------------------------------------------------

Server version 5.1.30

Client version 
# ./mysql --version
mysql  Ver 14.14 Distrib 5.1.30, for unknown-freebsd6.2 (x86_64) using  EditLine wrapper
------------------------------------------------------------------------------

No, i have no related messages in <servername>.err log, nor in mysqlbinlog. In bin log i have only messages about "good" query.
------------------------------------------------------------------------------
PS: Валерий, может имеет смысл гороврить по русски? Я чуствую себя донельзя глупо..
[23 Jan 2009 7:03] Sveta Smirnova
Thank you for the feedback.

Please send real queries you use, so we can know which fields you update. Please also send full server error log file and configuration file.

Regarding to speaking in Russian bug database used by people around the world and some of them could not understand discussion in native languages. This is why official language here in English and why we prefer have all discussion here in English.
[29 Jan 2009 3:47] Yuriy Ohonin
It was a hardware problem with network environment. Sorry about that.