以前在mysql5.7上执行如下sql语句没有问题

SELECT DISTINCT u.*,c.content userCategory FROM m_user u LEFT JOIN m_category c ON u.user_category=c.category_id LEFT JOIN m_user_role mr ON u.user_id=mr.user_id WHERE 1=1 AND u.user_status=0 ORDER BY u.createtime DESC LIMIT 10

使用mycat 1.6.6.1后执行上面的sql语句报错如下:

1 queries executed, 0 success, 1 errors, 0 warnings

查询:SELECT DISTINCT u.*,c.content userCategory FROM m_user u LEFT JOIN m_category c ON u.user_category=c.category_id LEFT JOIN m_use...

错误代码: 1064
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 '*, c.content
ORDER BY u.createtime DESC
LIMIT 10' at line 5

执行耗时 : 0 sec
传送时间 : 0 sec
总耗时 : 0.008 sec

后来把mycat上执行的语句改为如下语句(把 distinct后的 * 号改为u表的每个字段)执行成功:

SELECT DISTINCT u.user_id,u.user_name,u.user_pwd,u.user_realname,u.user_email,u.mobile_phone,u.office_phone,u.user_category,u.user_subcategory,u.user_status,u.createtime,u.updatetime,u.createuser,u.user_ip,u.user_odm_id,c.content userCategory  FROM m_user u LEFT JOIN m_category c ON u.user_category=c.category_id LEFT JOIN m_user_role mr ON u.user_id=mr.user_id WHERE 1=1 AND u.user_status=0 ORDER BY u.createtime DESC LIMIT 10

mycat 1.6.6.1 distinct报错问题的更多相关文章

  1. Django使用distinct报错:DISTINCT ON fields is not supported by this database backend

    具体错误提示是:django.db.utils.NotSupportedError: DISTINCT ON fields is not supported by this database back ...

  2. mycat未配置对应表导致报错

    Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: can't find table define in sch ...

  3. mycat偶尔会出现JVM报错double free or corruption并崩溃退出

    mycat偶尔会出现JVM报错double free or corruption并崩溃退出 没有复杂的sql,也没有大量的io INFO | jvm | // :: | *** Error in `j ...

  4. mycat启动报错UnknownHostException(Temporary failure in name resolution)解决方法

    重启命令 ./mycat restart 查看日志 cd logs tail -f wrapper.log 报错信息 INFO | jvm 2 | 2018/05/09 11:28:28 | Erro ...

  5. mycat登录报错Host 'XXX' is blocked because of many connection errors的另一种解决思路

    报错时机 使用了mycat,而不是单纯使用了mysql. 报错信息 ERROR 1129 (HY000): Host '1.23.22.18' is blocked because of many c ...

  6. Mycat分布式数据库架构解决方案--配置defaultAccount属性报错解决方案

    echo编辑整理,欢迎转载,转载请声明文章来源.欢迎添加echo微信(微信号:t2421499075)交流学习. 百战不败,依不自称常胜,百败不颓,依能奋力前行.--这才是真正的堪称强大!!! 该文章 ...

  7. mycat重启报错Failed to connect to the Wrapper at port解决方法

    报错信息 ERROR | wrapper | 2018/05/11 14:01:55 | Startup failed: Timed out waiting for a signal from the ...

  8. mysql基于“报错”的注入

    报错是如何转为xss的? mysql语句在页面报错,泄露信息 ===================================================================== ...

  9. 报错注入分析之(count()、rand()、group by)分析,被大佬称为floor报错注入

    PS:在这几天的学习当中很多的文章都将此注入方式称之为“floor报错分析”但经过我这几天的学习.个人觉得不该如此称呼!若君有意请详细阅读此篇文章.特别感谢米怀特的开导,说句实在的研究这个注入有四天了 ...

随机推荐

  1. delete属性

     

  2. Mysql配置文件详解 my.cof

    Mysql配置文件详解 # For advice on how to change settings please see # http://dev.mysql.com/doc/refman/5.6/ ...

  3. 410. Split Array Largest Sum 把数组划分为m组,怎样使最大和最小

    [抄题]: Given an array which consists of non-negative integers and an integer m, you can split the arr ...

  4. ubuntu14.04 64位安装 g2o

    参考链接:http://blog.csdn.net/jiujiu932/article/details/52248577 http://www.cnblogs.com/gaoxiang12/p/473 ...

  5. SqlServer性能瓶颈分析

    SqlServer性能瓶颈分析 一.内存瓶颈分析--SQLServer:Buffer Manager SELECT TOP 312 * FROM  sys.dm_os_performance_coun ...

  6. It's not too late to start!

    It's not too late to start! 以此鼓励,希望能坚持下去,一个半路自学PHP的准PHPer!

  7. ethtool -p eth0 物理口一个灯在不停的闪烁

    摘自:https://blog.csdn.net/morigejile/article/details/78598645 你的  服务器有多个网卡并且已经配置好运行当中,你却没记得eth0.eth1. ...

  8. Photo4

    Story: 我手捧玫瑰,一个人,走在桥上.桥下是波澜壮阔的大海,一不小心,我就有失足的危险.海鸟的低鸣在我耳际盘旋着,浪汹涌,仿佛要把我吞噬掉.你也许奇怪,为何我一人手捧玫瑰走在桥上.只因,女骑从来 ...

  9. Web测试实践-任务进度-Day03

    小组成员 华同学.郭同学.覃同学.刘同学.穆同学.沈同学 任务进度 在经过任务分配阶段后,大家都投入到了各自的任务中,以下是大家今天任务的进度情况汇总. 华同学 & 刘同学(任务1) 1.再对 ...

  10. 【转】ACM各种WA的说明及可能的原因

    转载地址:http://blog.csdn.net/qq_15015129/article/details/52738184 1.答案错误 —— wrong answer 就是最常见的.这个没办法,基 ...