Pear DB - "DB Error: syntax error" with no native code from mysql - STRANGE BEHAIVOR
| From: | j llarens | Date: | Thu, 19 Apr 2007 05:28:22 +0000 |
| Subject: | Pear DB - "DB Error: syntax error" with no native code from mysql - STRANGE BEHAIVOR | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-27094@lists.php.net to get a copy of this message | ||
Im totally lost. I don't understand what is happening.
First of all, I never user DB sequences, I always use mysql's AUTO_INCREMENT.
Now that I try i have totally strange problems...
From now on, let me say that at this point Im not sure on ANYTHING, a hardware problem, a
library problem, program problem database problem... Im LOST.
First symptom: a nextId('carnet') gives this:
[db_error: message="DB Error: syntax error" code=-2 mode=c
allback callback=pearLog prefix="" info="UPDATE carnet_seq SET id=LAST_INSERT_ID
(id+1) [DB Error: syntax error]"]
Seems to me odd, I don't see error in that sentence AND it havent a mysql native error
code. So I tried the above sentence in mysql console AND IT DID WORKED.
Few tries later, with same result, I just give up and go back with AUTO_INCREMENT field
in the original table 'carnet' and forgot 'carnet_seq'
And once the offensive code was wiped THE SAME KIND OF ERROR APPEARS IN AUTOEXECUTE(): an
allegedly syntax error (not an error at all, at less for mysql console). And that
particular autoExecute was never changed, all happend after the first usage of 'nextId'
I drop the database, rebuild it from a backup y tried with same result.
That was so strange that I suspect that the mysql was with some kind of problem, so I
tried another system in the same server, that uses a separate database. OK, no problems
in other database, so mysql is allegedly ok.
Later the ext3 indicates corruption and finally the partition go to ext3's heaven of
partitions. May be the lack of an UPS, may be anything.
Well I need to move on quick so I passed the problematic system to a production server.
And guess what: everything is fine until I test nextId: syntax error with no native code,
propagation of the error to other sentences.
At this point I'm really worried, I did this in a PRODUCTION server, in the highly
unlikely case of that use of pear DB causes partition corruption (odd), I JUST DOOMED A
PRODUCTION SERVER.
Has anybody an idea of what could be happening???
Test (and ruined) server: Mandriva 2007 - mysql 5 - php 5 (don't remember exact versions)
Production server: Mandriva 2006.0 - mysql 4.1.12 - PHP 5.0.4
Jorge Llarens
http://disquisidor.com.ar (linkeadme plis)
__________________________________________________
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
¡Probalo ya!
http://www.yahoo.com.ar/respuestas