[Tickets #12498] Re: SQL Syntax error or access violation updating Horde_History DB schema

noreply at bugs.horde.org noreply at bugs.horde.org
Sat Jul 27 14:38:34 UTC 2013


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/12498
------------------------------------------------------------------------------
  Ticket             | 12498
  Updated By         | lp.allard.1 at gmail.com
  Summary            | SQL Syntax error or access violation updating
                     | Horde_History DB schema
  Queue              | Horde Framework Packages
  Version            | Git master
  Type               | Bug
  State              | Feedback
  Priority           | 2. Medium
  Milestone          |
  Patch              |
  Owners             |
+New Attachment     | ISS8.jpeg
------------------------------------------------------------------------------


lp.allard.1 at gmail.com (2013-07-27 14:38) wrote:

>> OK so I am not a MySQL Guru, can someone recommend a MySQL command to
>> try to fix this?
>
> I fixed it with the following steps:
> * horde-db-migrate show Horde_History schema version: 4 and the SQL error.
> * comment out the up function in the following files  
> (/usr/share/php/data/Horde_History/migration):
>   5_horde_history_remove_compositeindex.php
>   6_horde_history_fix_botchedindexes.php
> * run horde-db-migrate to update to Horde_History schema version: 6
> * I use phpmyadmin to delete all indexes in the horde_histories  
> table except the "PRIMARY key
> * at last add the indexes with the following commands
> ALTER TABLE `HORDE_DB_NAME`.`horde_histories` ADD INDEX  
> `index_horde_histories_on_history_action` ( `history_action` )
> ALTER TABLE `HORDE_DB_NAME`.`horde_histories` ADD INDEX  
> `index_horde_histories_on_history_ts` ( `history_ts` )
> ALTER TABLE `HORDE_DB_NAME`.`horde_histories` ADD INDEX  
> `index_horde_histories_on_history_modseq` ( `history_modseq` )
> ALTER TABLE `HORDE_DB_NAME`.`horde_histories` ADD INDEX  
> `index_horde_histories_on_object_uid` ( `object_uid` )
>
> I hope this helps.
>

OK Half of your procedure worked, the SQL part didnt.

I am not sure exactly how to execute these SQL commands ..  I tried in  
phpmyadmin, going into the horde_db then navigting in horde_histories  
table then clicking on the SQL (Run SQL Query) and copy paste the  
commands you provided, I get

#1064 - You have an error in your SQL syntax; check the manual that  
corresponds to your MySQL server version for the right syntax to use  
near 'ALTER TABLE `hordedb`.`horde_histories` ADD INDEX  
`index_horde_histories_on_hist' at line 2

I tried one by one thinking SQL didnt like the back-to-back with  
multiple commands in the same query (I know it can do many commands in  
one query but...)

and I got:

#1072 - Key column 'history_ts' doesn't exist in table

Not sure how to push these commands in SQL.  Can you help ?
Very aprpeciated!



lp.allard.1 at gmail.com (2013-07-27 14:38) uploaded: ISS8.jpeg

http://bugs.horde.org/h/services/download/?app=whups&actionID=download_file&file=ISS8.jpeg&ticket=12498&fn=%2FISS8.jpeg





More information about the bugs mailing list