mysql max_allowed_pa​​cket在超出时不会返回错误

时间:2012-10-02 21:31:30

标签: mysql

我想知道这是一个错误还是我在这里做错了什么?

mysql> select @@max_allowed_packet
    -> ;
+----------------------+
| @@max_allowed_packet |
+----------------------+
|                 1024 |
+----------------------+
1 row in set (0.00 sec)

mysql> insert into Lookups values ('sasdfsadf12345654545=86672562768234jdfhasjkdfhaskldfhsadf','asdfhasjkfhaskdfjaksdfhasjkdfhaksldfjhskajdfhaskdfhksjdfhkalsdfasdfasdfhjasdfhjkasdfhjkahsdfasdfhasjkfhaskdfjaksdfhasjkdfhaksldfjhskajdfhaskdasdfhasjkfhaskdfjaksdfhasjkdfhaksldfjhskajdfhaskdfhksjdfhkalsdfasdfasdfhjasdfhjkasdfhjkahsdfasdfhasjkfhaskdfjaksdfhasjkdfhaksldfjhskajdfhaskdfhksjdfhkalsdfasdfasdfhjasdfhjkasdfhjkahsdfasdfhasjkfhaskdfjaksdfhasjkdfhaksldfjhskajdfhaskdfhksjdfhkalsdfasdfasdfhjasdfhjkasdfhjkahsdfasdfhasjkfhaskdfjaksdfhasjkdfhaksldfjhskajdfhaskdfhksjdfhkalsdfasdfasdfhjasdfhjkasdfhjkahsdfasdfhasjkfhaskdfjaksdfhasjkdfhaksldfjhskajdfhaskdfhksjdfhkalsdfasdfasdfhjasdfhjkasdfhjkahsdfasdfhasjkfhaskdfjaksdfhasjkdfhaksldfjhskajdfhaskdfhksjdfhkalsdfasdfasdfhjasdfhjkasdfhjkahsdfasdfhasjkfhaskdfjaksdfhasjkdfhaksldfjhskajdfhaskdfhksjdfhkalsdfasdfasdfhjasdfhjkasdfhjkahsdfasdfhasjkfhaskdfjaksdfhasjkdfhaksldfjhskajdfhaskdfhksjdfhkalsdfasdfasdfhjasdfhjkasdfhjkahsdfasdfhasjkfhaskdfjaksdfhasjkdfhaksldfjhskajdfhaskdfhksjdfhkalsdfasdfasdfhjasdfhjkasdfhjkahsdf');
Query OK, 1 row affected (0.00 sec)

mysql> show create table Lookups;
+---------+---------------------------------------------------------------------------------------------+
| Table   | Create Table                                                                                       |
+---------+---------------------------------------------------------------------------------------------+
| Lookups | CREATE TABLE `Lookups` (
  `name` text,
  `val` text
 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 |
 +---------+---------------------------------------------------------------------------------------------+
 1 row in set (0.00 sec)

 mysql> select version();
 +-----------+
 | version() |
 +-----------+
 | 5.0.77    |
 +-----------+

insert语句是1055个charactors long,它应该超过max_allowed_pa​​cket变量,但它不会返回任何错误

0 个答案:

没有答案