CAST type 'int' is not supported by MySQL
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Fix Released
|
High
|
Son Nguyen |
Bug Description
Version: 15.04
Platform: Apache 2.2, PHP 5.3, MySQL 5.5
Browser: any
This is a regression caused by https:/
I got the following error when accessing the Dashboard page
[WAR] 83 (lib/errors.
' at line 8] in EXECUTE("SELECT COUNT(*) FROM (
(
SELECT a.id, a.read, a.ctime, 'notification_
FROM "mh01_notificat
INNER JOIN "mh01_activity_
WHERE a.usr = '1'
AND at.name IN ('feedback'
)
UNION
(
SELECT a.id, CAST(b.read AS int), a.ctime, 'artefact_
FROM "mh01_artefact_
INNER JOIN "mh01_artefact_
ON a.id = b.notification
INNER JOIN "mh01_activity_
WHERE b.usr = '1'
AND b.deleted = '0'
AND b.role = 'recipient'
AND at.name IN ('feedback'
)) AS dummytable")
Command was: SELECT COUNT(*) FROM (
(
SELECT a.id, a.read, a.ctime, 'notification_
FROM "mh01_notificat
INNER JOIN "mh01_activity_
WHERE a.usr = ?
AND at.name IN ('feedback'
)
UNION
(
SELECT a.id, CAST(b.read AS int), a.ctime, 'artefact_
FROM "mh01_artefact_
INNER JOIN "mh01_artefact_
ON a.id = b.notification
INNER JOIN "mh01_activity_
WHERE b.usr = ?
AND b.deleted = '0'
AND b.role = 'recipient'
AND at.name IN ('feedback'
)) AS dummytable and values was (1,1)
Call stack (most recent first):
log_message("Failed to get a recordset: mysqli error: [1064: Yo...", 8, true, true) at /home/sonn/
log_warn("Failed to get a recordset: mysqli error: [1064: Yo...") at /home/sonn/
SQLException-
get_recordset_
count_records_
activitylistin(
PluginBlocktype
call_user_
call_static_
BlockInstance-
View->build_
View->build_
View->build_rows() at /home/sonn/
Changed in mahara: | |
status: | In Progress → Fix Committed |
Changed in mahara: | |
status: | Fix Committed → Fix Released |
Patch for "master" branch: https:/ /reviews. mahara. org/4201