迁移 - mysql 5.6 - > mariadb 10.1 - > sql错误

时间:2015-11-20 23:30:02

标签: mysql mariadb

dyld: Library not loaded: @loader_path/../Frameworks/TestKit.framework/TestKit Referenced from: /Users/test/Library/Developer/CoreSimulator/Devices/C0CAD8E2-9371-47AE-855F-601FE289C585/data/Containers/Bundle/Application/51AECF63-CF31-4D69-821B-52571D64ED0B/Test.app/Test Reason: image not found 迁移到Mysql 5.6后,我收到了这些sql错误

SQL 1

MariaDB 10.1

错误1

SELECT dv.id,IF(de.id IS NULL,0,1) is_attached,dv.time,dv.label,dv.is_pdf_scan,dv.is_pic_low_resolution,dv.file_sha1,dv.file_ext,dv.file_ext_thumb,dv.file_size,dv.file_size_original,dv.file_name,u.name from_name,dv.from_email
FROM `data_voucher` dv
LEFT JOIN `data_voucher_enclosure` de ON de.data_voucher_id=dv.id
LEFT JOIN `user` u ON u.id=dv.user_id
WHERE IF(de.id IS NULL,0,1)=0 && dv.time>=1420070400 && dv.time<=1451606399 && dv.client_id=1 && dv.block_id=4544 && dv.is_ready=1 && dv.is_deleted=0
GROUP BY dv.id
ORDER BY dv.time DESC,dv.id DESC
LIMIT 0,25

SQL 2

#1055 - 'dynaccount.de.id' isn't in GROUP BY 

错误2

SELECT dv.id,dv.time,dv.label,dv.is_pdf_scan,dv.file_sha1,dv.file_ext,dv.file_ext_thumb
FROM `data_voucher` dv
LEFT JOIN `data_voucher_enclosure` de ON de.data_voucher_id=dv.id
WHERE de.enclosure_id=270729 && dv.client_id=1 && dv.block_id=4431 && dv.is_ready=1 && dv.is_deleted=0
GROUP BY dv.id
ORDER BY dv.time DESC,dv.id DESC

更新

#1055 'dynaccount.dv.time' isn't in GROUP BY 点击phpmyadmin标签

时出现类似错误

SQL

databases

错误

SELECT s.SCHEMA_NAME,s.DEFAULT_COLLATION_NAME
FROM `information_schema`.SCHEMATA s
GROUP BY BINARY s.SCHEMA_NAME
ORDER BY BINARY `SCHEMA_NAME` ASC

1 个答案:

答案 0 :(得分:1)

您的SQL_MODE系统变量似乎包含ONLY_FULL_GROUP_BY模式。

ONLY_FULL_GROUP_BY强制执行严格的ANSI SQL行为,并停用MySQL特定的GROUP BY扩展程序。

请参阅also,并注意此模式是MySQL 5.7中的默认模式,因此在从MySQL 5.6迁移到MySQL 5.7时也会遇到同样的问题