Good point. On Thu, Jan 26, 2017, 2:36 AM Mike Jumper <[email protected]> wrote:
> On Wed, Jan 25, 2017 at 7:47 PM, David Landry <[email protected]> wrote: > > > Could it be a problem with mapping from JDBC VARCHAR to SQLite's INTEGER? > > Actually, I'm a little confused about why the MySQL JDBC type is a > VARCHAR, > > but Postgres has them as INTEGER (especially since the underlying type is > > an integer for both DBs). > > > > > Internal (within the Java side of Guacamole) storage of the database IDs is > strings, because connection identifiers are abstracted as generic strings > at the extension API level. The fact that those strings are actually > integers and translate into integer database IDs is an implementation > detail of the JDBC auth backend. These were initially mapped as VARCHAR > since they are, indeed, strings, and the expectation was that the database > engine would handle the conversion, and MySQL did behave that way. > PostgreSQL, on the other hand, did not do the same implicit conversion, and > it was necessary to explicitly cast to integer. > > It's certainly a quirk, but assuming SQLite doesn't implicitly convert like > MySQL, I don't think that it would likely result in an > ArrayIndexOutOfBoundsException. I'd expect any error due to the type of the > column to be thrown through the database engine out through the JDBC > driver, not prior to the query being shipped to the database engine when > the PreparedStatement is being populated. > > - Mike > -- --- David Landry
