On Tue, Jan 24, 2017 at 6:14 PM Mike Jumper <[email protected]>
wrote:

> Does the SQLite JDBC driver perhaps not support multiple result sets in one
> query? The driver might only be looking at the first statement, ignoring
> the last two, and thus only sees 2 of the 6 parameters.
>

Could be. I don't know, but that's a direction to look into.

On Jan 24, 2017 14:28, "James Muehlner" <[email protected]> wrote:
>
> > <snip>
> > It seems like maybe MyBatis is having a hard time mapping the two
> > parameters provided into the 6 parameters in the prepared statement. It
> > looks like having multiple selects in a single prepared statement trips
> it
> > up. Maybe a bug in MyBatis that only manifests when talking to SQLite?
>

I'm wondering that too. Maybe it's a MyBatis-SQLite thing. Or maybe, like
Mike suggests, it's a problem with the SQLite connector itself.

>
> > I'm curious - have you tried using either the MySQL or
> > PostgreSQL extensions? MyBatis should just be using JDBC to prepare
> > statements; I don't see how it would matter what's on the other end.
> Maybe
> > I'm missing something obvious.
>

I've tested with the MySQL extension recently. It's actually the same
query. The Postgres query is slightly different (only some data types I
think).

I haven't stepped through the MySQL call stack, though, only the SQLite one.

In the SQLite call stack, when it's making the PreparedStatement, it pulls
out all three 'identifiers' parameters and replaces it internally with
something like '_frch_identifier_0',  '_frch_identifier_1',
'_frch_identifier_2'.
But in the parameter mapping, you still only have a collection called
'identifiers'. I'm not too familiar with MyBatis. Is that normal behavior?
-- 

---

David Landry

Reply via email to