Field Count mismatch exception?

115 views
Skip to first unread message

Christoph Blank

unread,
Nov 21, 2013, 3:50:27 AM11/21/13
to datam...@googlegroups.com
Hi there,

Does anyone know what this Datamapper/mysql exception means?
ArgumentError (Field-count mismatch. Expected 1 fields, but the query yielded 8):

It happens not regularly, so I have no idea what it means
Shortly after it I get
DataObjects::SQLError (Lost connection to MySQL server during query)

Thanks a lot,
Christoph

Christoph Blank

unread,
Nov 29, 2013, 3:34:11 AM11/29/13
to datam...@googlegroups.com
anyone?

christian

unread,
Nov 29, 2013, 4:05:30 AM11/29/13
to datam...@googlegroups.com
yes, I have seen this before when I used mysql. we had a short discussion on it recently. it looks like concurrency problem (the guess on my side), but access to the DB should be per thread.

no solution. in my case it was on rails startup where there were some DB access in the init scripts (for configurations). so I could work around it with a "retry" or so.

so that is all I can tell you and I never saw with sqlite3 or postgres !!!

Alper Akgün

unread,
Nov 29, 2013, 4:14:10 AM11/29/13
to datam...@googlegroups.com

your running datamapper model has 1 field, but the database has 8. you must migrate your database each time you change your model and then restart your app. Jus a guess. Some code here might help.

--
You received this message because you are subscribed to the Google Groups "DataMapper" group.
To unsubscribe from this group and stop receiving emails from it, send an email to datamapper+...@googlegroups.com.
To post to this group, send email to datam...@googlegroups.com.
Visit this group at http://groups.google.com/group/datamapper.
For more options, visit https://groups.google.com/groups/opt_out.

Christoph Blank

unread,
Dec 6, 2013, 10:30:42 AM12/6/13
to datam...@googlegroups.com
Hi,

There are no pending migrations... so this cannot be the cause.
I think it is rather a connection issue..
Reply all
Reply to author
Forward
0 new messages