mehov / mooha

Automatically exported from code.google.com/p/mooha
1 stars 0 forks source link

SQL-Errors on MySQL 4.x #9

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. MySQL 4.0.16 or 4.1.22 instead of 5.x as server-database

What is the expected output? What do you see instead?

Fatal error: SyncmlException: Mysql query error: Column: 'user_id' in where
clause is ambiguous query was: SELECT client_item_id FROM mooha_map JOIN
mooha_dbs USING(user_id) WHERE user_id = '1' AND db_name = 'contacts' AND
client = 'fol-SFA4MjIwOlRoZWtsYQ==' AND item_id = '3469' in
/wwwroot/htdocs/mooha/inc/MoohaServer.php on line 180 in
/wwwroot/htdocs/mooha/config.php on line 58

What version of the product are you using? On what operating system?
Server 0.21b, PHP 5.x, MySQL 4.x, Clients are Funambol for Outlook
I changed all length of varchar-field in the file mooha.sql to 255, because
a lenght of 256 fails under MySQL 4.x booth on winXP and Linux.

Thank you for any help.

Original issue reported on code.google.com by tom...@tiscali.ch on 15 Apr 2010 at 6:01

GoogleCodeExporter commented 9 years ago
I found a turnaround: As I have only one user, I just changed line 569 of
moohaServer.php as follow:

OLD>> $query = 'SELECT client_item_id FROM .mooha_map JOIN .mooha_dbs 
USING(user_id)
WHERE user_id = :user_id AND db_name = :db_name AND client = :client AND 
item_id =
:item_id';

NEW>>$query = 'SELECT client_item_id FROM .mooha_map JOIN .mooha_dbs 
USING(user_id)
WHERE db_name = :db_name AND client = :client AND item_id = :item_id';

I hope to get no other problems by doing so :-)

Original comment by tom...@tiscali.ch on 15 Apr 2010 at 8:45

GoogleCodeExporter commented 9 years ago
Seems like the work with Mysql 4.x should be seriously improved.
So for now it is reasonable to say that Mooha requires Mysql 5.x to work 
correctly.
I'm not sure that your hot fix is enough to get completely working server even 
for one user.
I will install old Mysql and do check all the issues but not right now, so 
please be patient and wait a while or use 
it right now with Mysql 5.x

Original comment by artico.b...@gmail.com on 16 Apr 2010 at 2:46

GoogleCodeExporter commented 9 years ago
It's decided to not improve Mooha for work with old MySQL 4.x
Please use contemporary version - MySQL 5.x

Original comment by artico.b...@gmail.com on 21 May 2010 at 7:07