mycat 1.6.6.1 distinct报错问题
以前在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报错问题的更多相关文章
- 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 ...
- mycat未配置对应表导致报错
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: can't find table define in sch ...
- mycat偶尔会出现JVM报错double free or corruption并崩溃退出
mycat偶尔会出现JVM报错double free or corruption并崩溃退出 没有复杂的sql,也没有大量的io INFO | jvm | // :: | *** Error in `j ...
- 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 ...
- 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 ...
- Mycat分布式数据库架构解决方案--配置defaultAccount属性报错解决方案
echo编辑整理,欢迎转载,转载请声明文章来源.欢迎添加echo微信(微信号:t2421499075)交流学习. 百战不败,依不自称常胜,百败不颓,依能奋力前行.--这才是真正的堪称强大!!! 该文章 ...
- 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 ...
- mysql基于“报错”的注入
报错是如何转为xss的? mysql语句在页面报错,泄露信息 ===================================================================== ...
- 报错注入分析之(count()、rand()、group by)分析,被大佬称为floor报错注入
PS:在这几天的学习当中很多的文章都将此注入方式称之为“floor报错分析”但经过我这几天的学习.个人觉得不该如此称呼!若君有意请详细阅读此篇文章.特别感谢米怀特的开导,说句实在的研究这个注入有四天了 ...
随机推荐
- SMTPSenderRefused: (530, ‘5.5.1 Authentication Required. Learn more at \n5.5.1
在跟着<Flask Web开发:基于Python的Web应用开发实战>一书学习时,出现了以上错误提示. 问题出于第11章--博客文章.当运行 python manage.py runser ...
- 在SharePoint解决方案中使用JavaScript (0)
随着Web前段技术(JavaScript/HTML5)的日益发扬光大,在Web应用程序中,我们开始更多的使用JavaScript.很多以往是放在服务器上运行的逻辑,现在都开始逐渐的向前段转移.这种趋势 ...
- cakephp中sql查询between
$trading_list = $this->Trading->find('all', array('conditions' => array('buy_time BETWEEN ? ...
- mysql:查询数据库版本的几种方式
Mysql版本: 登入数据库的时候: select @@version; select version(); mysql> select @@version; +-----------+ | @ ...
- C# 集合的使用List<T>的使用
C# List<T>用法 所属命名空间:using System.Collections.Generic; List<T>类是 ArrayList 类的泛型等效类. 该类使用 ...
- 团体程序设计天梯赛L2-002 链表去重 2017-03-22 18:12 25人阅读 评论(0) 收藏
L2-002. 链表去重 时间限制 300 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 作者 陈越 给定一个带整数键值的单链表L,本题要求你编写程序,删除 ...
- mysql查询最近7天的数据,没有数据自动补0
问题描述 查询数据库表中最近7天的记录 select count(*),date(create_time) as date from task where datediff(now(),create_ ...
- 【微服务架构】SpringCloud之Eureka(注册中心集群篇)(三)
上一篇讲解了spring注册中心(eureka),但是存在一个单点故障的问题,一个注册中心远远无法满足实际的生产环境,那么我们需要多个注册中心进行集群,达到真正的高可用.今天我们实战来搭建一个Eure ...
- java的++和--操作符
只要是会java的都知道++和—操作符的用法,如 int i = 1; int j = i++; int k = ++i; 结果i为3,j为1,k为3. 那如下代码: int j = 0; for ( ...
- .net 有参属性 index (索引)
public class IndexTempte { public ArrayList nameList = new ArrayList(); public string this[int index ...