Informix stuff

I’m planning on going through the InformixDatabase.java and bringing it up to snuff.  There are a couple of areas in which my colleagues have reported problems.

I’ll post a message on this forum before I make any commits.  Since Nathan has given anyone with a JIRA commit access, I hope this is sufficient.  I will keep my commits small, clean and easily reviewable.

Best,
Laird

My first change is to change line 1332 of InformixDatabase.java where a new UnexpectedLiquibaseException was being created but never thrown.  A gesture of goodwill, if you will.  :slight_smile:

Best,
Laird

My next change, called out by my colleague and fellow Liquibase forum poster Dan Maranan, is to change the InformixTypeConverter.java.

In its line 1119, it returns ‘t’ (note the single quotes) as the proper value for a boolean type conversion.  This causes a syntax error.  The correct result should simply be t (no single quotes; t, the literal, is apparently a valid value for a boolean field).  The same is true obviously of the false value.

Best,
Laird

Thanks, I’ll take a look at them.  The forum posts are a good help too.

Nathan

Originally posted by: Laird
My next change, called out by my colleague and fellow Liquibase forum poster Dan Maranan, is to change the InformixTypeConverter.java.

In its line 1119, it returns ‘t’ (note the single quotes) as the proper value for a boolean type conversion.  This causes a syntax error.  The correct result should simply be t (no single quotes; t, the literal, is apparently a valid value for a boolean field).  The same is true obviously of the false value.

This is actually incorrect as well.  The root issue lies elsewhere, as Informix does not in fact treat a single unquoted t as a boolean truth value (it seemed weird to me, but I don’t really know Informix that well).

In point of fact, the root issue lies in BooleanType.java, which will double quote certain string values when a TypeConverter returns an already-quoted value.  So it looks like this issue is not Informix-specific–it is specific to any TypeConverter implementation for any database that returns a quoted string for…well, probably for any data type.

There are various ways to fix this, but have a look at BooleanType.java line 1803 and the block that contains it.  I won’t check in an obvious fix (check not just for raw digits, but also for quoted values) until I’m told that’s the right way to proceed.

Best,
Laird

Hi,

this is my first post in this forum (I don’t like forums…). Anyway I worked on the initial support for Informix in April 2009, made a long break and started to get the tests green again, a 3 weeks ago. In the current SVN version all tests () are green.

The resulting SQL for boolean literals sent to the database has single quotes (see http://publib.boulder.ibm.com/infocenter/idshelp/v115/index.jsp?topic=/com.ibm.sqlr.doc/ids_sqr_099.htm).

The problem was, that at some point (I think it was BooleanType.java convertObjectToString) additional singlequotes were added.

Hi there; nice to meet you.  :slight_smile:

Our company works pretty heavily with Informix so I’m sure I’ll have questions for you along the way.  :slight_smile:

Best,
Laird