.版本
1)操作系统
cat /etc/issue
CentOS release 6.6 (Final)
Kernel \r on an \m
cat /proc/version
Linux version 2.6.32-504.el6.x86_64 ([email protected]) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-11) (GCC) ) #1 SMP Wed Oct 15 04:27:16 UTC 2014
2)mysql数据库版本
mysql --version
mysql Ver 14.14 Distrib 5.6.23, for linux-glibc2.5 (x86_64) using EditLine wrapper
2.问题描述
今天研发要求帮他们在现网的库的某张表里插入部分数据,我执行他们给的sql语句时报如下问题:
mysql> start transaction; Query OK, 0 rows affected (0.00 sec) mysql> insert into tf_s_tixxx_detail -> (id,tixxx_id,tixxx_name,code,prize_value, -> order_money,begin_time,end_time,intro,status, -> create_date) -> Display all 2165 possibilities? (y or n) -> Display all 2165 possibilities? (y or n) -> Display all 2165 possibilities? (y or n) -> Display all 2165 possibilities? (y or n) -> t.order_money,t.begin_time,t.end_time,t.intro,'0', -> Display all 2165 possibilities? (y or n) -> Display all 2165 possibilities? (y or n) -> now() -> from tf_s_ticxxxt,xxx_member a -> where t.id='8454ecd04f244c95a1082adad05fbe4a' -> LIMIT 10000;Ctrl-C -- exit! >>这里是因为我看到执行的语句有问题就执行了Ctrl+c退出了 Aborted##我们 看到Display all 2165 possibilities? (y or n) 类似这样的提示
研发邮件发给我的insert 语句如下:
insert into tf_s_tixxx_detail (id,tixxx_id,tixxx_name,code,prize_value, order_money,begin_time,end_time,intro,status, create_date) select REPLACE(UUID(),'-',''),t.id,t.name,CEILING(RAND()*50000000000+10000000000),t.price, t.order_money,t.begin_time,t.end_time,t.intro,'0', now() from tf_s_tixxx t,xxx_member a where t.id='8454ecd04f244c95a1082adad05fbe4a' LIMIT 10000;##上面的语句语法是没有任何问题的
3.问题处理
后来发现是语句中包含有tab键,导致的问题,删除语句中所有疑似tab键,再次执行,问题解决!