LINUX环境,MYSQL5.0,在my.cnf文件中把以下两项改大了,原值: set-variable = max_allowed_packet=1M
set-variable = net_buffer_length=2K 改成了16M和16K。按理说分配的空间应该是足够了。 我每次执行的插入语句是"insert into talbe1 values (...),(...),....,(...)",插入1000条的时候,会报一个错,“mysql_query err You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''71400fd075883d5127719cafinsert into as_telnum values' at line 1 ErrorNo=1064.”这里insert前出现的乱字符串很奇怪,应该不是我拼上去的。难到内存越界了?
有时候报这个错“mysql_query err You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '03113000','0311' at line 1 ErrorNo=1064.”这个错看上去正常点。 个人判断拼接的SQL语句应该没有错,否则插入500条以下的记录不会成功。初步怀疑是插入的SQL语句拼的太长,超出了允许范围。但改了上面的数据后,还是不对,请大家赐教。
set-variable = net_buffer_length=2K 改成了16M和16K。按理说分配的空间应该是足够了。 我每次执行的插入语句是"insert into talbe1 values (...),(...),....,(...)",插入1000条的时候,会报一个错,“mysql_query err You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''71400fd075883d5127719cafinsert into as_telnum values' at line 1 ErrorNo=1064.”这里insert前出现的乱字符串很奇怪,应该不是我拼上去的。难到内存越界了?
有时候报这个错“mysql_query err You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '03113000','0311' at line 1 ErrorNo=1064.”这个错看上去正常点。 个人判断拼接的SQL语句应该没有错,否则插入500条以下的记录不会成功。初步怀疑是插入的SQL语句拼的太长,超出了允许范围。但改了上面的数据后,还是不对,请大家赐教。
要么SQL有问题。
Error: 1064 就是这2种情况出现的时候才是1064