-
Type:
Change Request
-
Resolution: Fixed
-
Priority:
Minor
-
None
-
Affects Version/s: None
-
Component/s: Server (S)
-
None
-
Environment:RedHat 5 2.6.9-67.ELsmp, Oracle DB 10.2.0.1, php 5.2.8
The column date in table timeperiod is causing problems in several parts of zabbix. The word "date" is oracle reserved word and should not be used in column name. If it is used, it have to be enclosed into double quotes. Otherwise it is causing ORA-01747.
Everytime I install new version from trunk I have to edit files and change the code to be working with oracle.
I think it is better to change the column name now while it is not wide used in the code.
Thanks.
Affacted files:
timer.c -
./zabbix_server/timer/timer.c-303- result = DBselect(
./zabbix_server/timer/timer.c-304- "select m.maintenanceid,m.maintenance_type,m.active_since,tp.timeperiod_type,tp.every,"
./zabbix_server/timer/timer.c:305: "tp.month,tp.dayofweek,tp.day,tp.start_time,tp.period,tp.\"date\" "
./zabbix_server/timer/timer.c-306- "from maintenances m,maintenances_windows mw,timeperiods tp "
./zabbix_server/timer/timer.c-307- "where m.maintenanceid=mw.maintenanceid and "
./zabbix_server/timer/timer.c-308- "mw.timeperiodid=tp.timeperiodid and "
./zabbix_server/timer/timer.c-309- "%d between m.active_since and m.active_till",
./zabbix_server/timer/timer.c-310- now);
maintenances.inc.php -
./include/maintenances.inc.php:203: $result = DBexecute('INSERT INTO timeperiods (timeperiodid,timeperiod_type,every,month,dayofweek,day,start_time,period,"date") '.
./include/maintenances.inc.php-204- ' VALUES ('.$timeperiodid.','.
./include/maintenances.inc.php:205: $timeperiod['timeperiod_type'].','.
./include/maintenances.inc.php-206- $timeperiod['every'].','.
./include/maintenances.inc.php-207- $timeperiod['month'].','.
./include/maintenances.inc.php-208- $timeperiod['dayofweek'].','.
./include/maintenances.inc.php-209- $timeperiod['day'].','.
./include/maintenances.inc.php-210- $timeperiod['start_time'].','.
./include/maintenances.inc.php-211- $timeperiod['period'].','.
./include/maintenances.inc.php-212- $timeperiod['date'].')');
- duplicates
-
ZBX-637 Reserved word in a column name
-
- Closed
-