Description:
I'm facing a problem with the
Traceback (most recent call last):
File "test20.py", line 51, in ?
_c.query("SELECT sha1, md5, size, sequence_id, sequence_string FROM sequence WHERE sequence_id = 79")
_mysql_exceptions.OperationalError: (2020, "Got packet bigger than 'max_allowed_packet' bytes")
I can issue the SELECT interactively and it works - return data. But the very same command does not return anything through the _mysql module wrapped by mysqldb.
Anyway, what I report here mainly is that I cannot set net_buffer_length variable over a certain limit. I use 4.1.11 official gcc binaries on 2.6.11.6 linux.
mysql> set net_buffer_length=4096;
Query OK, 0 rows affected (0.00 sec)
mysql> select @@net_buffer_length;
+---------------------+
| @@net_buffer_length |
+---------------------+
| 4096 |
+---------------------+
1 row in set (0.00 sec)
mysql> set net_buffer_length=40960;
Query OK, 0 rows affected (0.01 sec)
mysql> select @@net_buffer_length;
+---------------------+
| @@net_buffer_length |
+---------------------+
| 40960 |
+---------------------+
1 row in set (0.00 sec)
mysql> set net_buffer_length=409600;
Query OK, 0 rows affected (0.00 sec)
mysql> select @@net_buffer_length;
+---------------------+
| @@net_buffer_length |
+---------------------+
| 409600 |
+---------------------+
1 row in set (0.00 sec)
mysql> set net_buffer_length=4096000;
Query OK, 0 rows affected (0.01 sec)
mysql> select @@net_buffer_length;
+---------------------+
| @@net_buffer_length |
+---------------------+
| 1048576 |
+---------------------+
1 row in set (0.00 sec)
mysql>
How to repeat:
mysql> select @@max_allowed_packet;
+----------------------+
| @@max_allowed_packet |
+----------------------+
| 1073740800 |
+----------------------+
1 row in set (0.00 sec)
mysql> select @@net_buffer_length;
+---------------------+
| @@net_buffer_length |
+---------------------+
| 1048576 |
+---------------------+
1 row in set (0.00 sec)
mysql> set net_buffer_length=4096000;
Query OK, 0 rows affected (0.00 sec)
mysql> select @@net_buffer_length;
+---------------------+
| @@net_buffer_length |
+---------------------+
| 1048576 |
+---------------------+
1 row in set (0.00 sec)
mysql>