Summary | Syntax error in Horde_ActiveSync_State_History->listDevices() |
Queue | Horde Framework Packages |
Queue Version | Git master |
Type | Bug |
State | Resolved |
Priority | 1. Low |
Owners | mrubinsk (at) horde (dot) org |
Requester | botner (at) univention (dot) de |
Created | 07/15/2011 (5105 days ago) |
Due | |
Updated | 07/22/2011 (5098 days ago) |
Assigned | 07/19/2011 (5101 days ago) |
Resolved | 07/22/2011 (5098 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
State ⇒ Resolved
[mjr] use AS in column aliases to make postgres happy (
Bug #10346).3 files changed, 4 insertions(+), 1 deletions(-)
http://git.horde.org/horde-git/-/commit/9828418c8462b553011def736ec9a81a8d0b2238
a column alias for "d.device_id". We don't want two columns of
device_id returned (they are the same value). It's used so the
returned data is keyed as "device_id" and not "d.device_id".
However, maybe postgres doesn't like the alias to be named the same
as a column name.
names for output columns
-> SELECT d.device_id AS device_id, device_type, device_agent, ...
State ⇒ Assigned
"device_id" is ambiguous, something like this works:
column alias for "d.device_id". We don't want two columns of device_id
returned (they are the same value). It's used so the returned data is
keyed as "device_id" and not "d.device_id". However, maybe postgres
doesn't like the alias to be named the same as a column name.
device_policykey, ...
+ SELECT d.device_id, u.device_id, device_type, device_agent,
device_policykey, ...
d.device_id column name with the same name as the column (device_id)?
It seems there is a comma missing and the column reference "device_id"
is ambiguous, something like this works:
- SELECT d.device_id device_id, device_type, device_agent,
device_policykey, ...
+ SELECT d.device_id, u.device_id, device_type, device_agent,
device_policykey, ...
State ⇒ Feedback
Assigned to Michael Rubinsky
d.device_id column name with the same name as the column (device_id)?
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ Syntax error in Horde_ActiveSync_State_History->listDevices()
Queue ⇒ Horde Framework Packages
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
* clicked on "Administration" -> "ActiveSync Devices"
Then i got the following error message:
A fatal error has occurred
SQLSTATE[42601]: Syntax error: 7 FEHLER: Syntaxfehler bei »device_id«
LINE 1: SELECT d.device_id device_id, device_type, device_agent,
dev... ^
1. Horde_ActiveSync_State_History->listDevices()
/usr/share/horde4/admin/activesync.php:58
Details
The full error message is logged in Horde's log file, and is shown
below only to administrators. Non-administrative users will not see
error details.
Horde_ActiveSync_Exception Object
(
[_previous:private] => Horde_Db_Exception Object
(
[_previous:private] =>
[details] =>
[message:protected] => SQLSTATE[42601]: Syntax error: 7
FEHLER: Syntaxfehler bei »device_id«
LINE 1: SELECT d.device_id device_id, device_type, device_agent, dev...
^
[string:private] =>
[code:protected] => 42601
[file:protected] => /usr/share/php/Horde/Db/Adapter/Base.php
[line:protected] => 556
[trace:private] => Array
(
[0] => Array
(
[file] =>
/usr/share/php/Horde/Db/Adapter/Pdo/Base.php
[line] => 83
[function] => execute
[class] => Horde_Db_Adapter_Base
[type] => ->
[args] => Array
(
[0] => SELECT d.device_id
device_id, device_type, device_agent, device_policykey,
device_rwstatus, device_user FROM horde_activesync_device d INNER JOIN
horde_activesync_device_users u ON d.device_id = u.device_id
[1] => Array
(
)
[2] =>
)
)
[1] => Array
(
[file] =>
/usr/share/php/Horde/ActiveSync/State/History.php
[line] => 561
[function] => selectAll
[class] => Horde_Db_Adapter_Pdo_Base
[type] => ->
[args] => Array
(
[0] => SELECT d.device_id
device_id, device_type, device_agent, device_policykey,
device_rwstatus, device_user FROM horde_activesync_device d INNER JOIN
horde_activesync_device_users u ON d.device_id = u.device_id
[1] => Array
(
)
)
)
[2] => Array
(
[file] => /usr/share/horde4/admin/activesync.php
[line] => 58
[function] => listDevices
[class] => Horde_ActiveSync_State_History
[type] => ->
[args] => Array
(
)
)
)
)
[details] =>
[message:protected] => SQLSTATE[42601]: Syntax error: 7 FEHLER:
Syntaxfehler bei »device_id«
LINE 1: SELECT d.device_id device_id, device_type, device_agent, dev...
^
[string:private] =>
[code:protected] => 42601
[file:protected] => /usr/share/php/Horde/ActiveSync/State/History.php
[line:protected] => 563
[trace:private] => Array
(
[0] => Array
(
[file] => /usr/share/horde4/admin/activesync.php
[line] => 58
[function] => listDevices
[class] => Horde_ActiveSync_State_History
[type] => ->
[args] => Array
(
)
)
)
)