首页 > MySQL客户端吃掉了SQL注解?

MySQL客户端吃掉了SQL注解?

通过MySQL原生的客户端发送一条包含注解的SQL语句:

/* sql=select * from test where id=1 */ select * from cama;

在服务端发现收到的SQL语句只保留了select * from cama;,而/* ... */之间的内容没有收到。

我的问题:
MySQL自带的原生客户端是否会把注解部分吃掉,不会发往服务端?
如果会吃掉注解,那么在哪里可以配置让它不吃掉注解,将sql语句原文发往服务端?、

谢谢!


mysql --help
..........

-c, --comments      Preserve comments. Send comments to the server. The
                    default is --skip-comments (discard comments), enable
                    with --comments.
                    
.......
【热门文章】
【热门文章】