2021-10-20, 10:26 AM
db is MySQLi, maybe other variables apply, but this is my current SQL Mode setting
sql mode
ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
Since I am not a database wizard, I am not sure of the pros/cons of ONLY_FULL_GROUP_BY directive.
I'd appreciate your scrutiny and suggestion for resolution.
Larry
sql mode
ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
Since I am not a database wizard, I am not sure of the pros/cons of ONLY_FULL_GROUP_BY directive.
I'd appreciate your scrutiny and suggestion for resolution.
Larry
Code:
Your copy of MyBB has experienced an error. Details of the error include:
---
Type: 20
File: (Line no. 0)
Message
SQL Error: 1055 - Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'hlf_dbHLFv2.c.cid' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
Query:
SELECT * FROM (
SELECT c.cid,
c.uid,
GROUP_CONCAT(p.uid) AS puids,
c.subject
FROM mybb_cnv_conversations c
LEFT OUTER JOIN mybb_cnv_participants p
ON p.cid = c.cid
WHERE c.subject = 'New Reply to 6 years ago'
AND
c.uid IS NULL
GROUP BY p.cid
) innerqry
WHERE puids = '98'
ORDER BY cid DESC
LIMIT 1
Back Trace: #0 errorHandler->email_error(20, SQL Error: 1055 - Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'hlf_dbHLFv2.c.cid' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
Query:
SELECT * FROM (
SELECT c.cid,
c.uid,
GROUP_CONCAT(p.uid) AS puids,
c.subject
FROM mybb_cnv_conversations c
LEFT OUTER JOIN mybb_cnv_participants p
ON p.cid = c.cid
WHERE c.subject = 'New Reply to 6 years ago'
AND
c.uid IS NULL
GROUP BY p.cid
) innerqry
WHERE puids = '98'
ORDER BY cid DESC
LIMIT 1, , 0) called at [/home/hlf/public_html/forum/inc/class_error.php:195]
#1 errorHandler->error(20, Array ([error_no] => 1055,[error] => Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'hlf_dbHLFv2.c.cid' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by,[query] =>
SELECT * FROM (
SELECT c.cid,
c.uid,
GROUP_CONCAT(p.uid) AS puids,
c.subject
FROM mybb_cnv_conversations c
LEFT OUTER JOIN mybb_cnv_participants p
ON p.cid = c.cid
WHERE c.subject = 'New Reply to 6 years ago'
AND
c.uid IS NULL
GROUP BY p.cid
) innerqry
WHERE puids = '98'
ORDER BY cid DESC
LIMIT 1)) called at [/home/hlf/public_html/forum/inc/db_mysqli.php:597]
#2 DB_MySQLi->error(
SELECT * FROM (
SELECT c.cid,
c.uid,
GROUP_CONCAT(p.uid) AS puids,
c.subject
FROM mybb_cnv_conversations c
LEFT OUTER JOIN mybb_cnv_participants p
ON p.cid = c.cid
WHERE c.subject = 'New Reply to 6 years ago'
AND
c.uid IS NULL
GROUP BY p.cid
) innerqry
WHERE puids = '98'
ORDER BY cid DESC
LIMIT 1) called at [/home/hlf/public_html/forum/inc/db_mysqli.php:337]
#3 DB_MySQLi->query(
SELECT * FROM (
SELECT c.cid,
c.uid,
GROUP_CONCAT(p.uid) AS puids,
c.subject
FROM mybb_cnv_conversations c
LEFT OUTER JOIN mybb_cnv_participants p
ON p.cid = c.cid
WHERE c.subject = 'New Reply to 6 years ago'
AND
c.uid IS NULL
GROUP BY p.cid
) innerqry
WHERE puids = '98'
ORDER BY cid DESC
LIMIT 1) called at [/home/hlf/public_html/forum/inc/plugins/converse/converse-pm-datahandler-override.php:149]
#4 PMDataHandler->insert_pm() called at [/home/hlf/public_html/forum/inc/functions.php:8816]
#5 send_pm(Array ([subject] => New Reply to 6 years ago,[message] => dingo,
WiMStang has just replied to a thread which you have subscribed to. This thread is titled 6 years ago.