missed the patch..
Sorry noscript ;)
On Friday, June 22, 2012 8:33:39 AM UTC+2, edmund wrote:
>
> Hi,
> I checked the h2 source and used the attached patch to get a second mysql
> profile "MySQLNullCheck" in which the insertZeroForNull flag is not set.
> works for me but doesnt comply with the weird behavior of mysql.
>
> Hope this helps other trying to use h2/mysql for testing...
>
> Best,
> Edmund
>
> On Thursday, June 21, 2012 5:35:12 PM UTC+2, edmund wrote:
>>
>> Hi,
>>
>> i stubled over a inconsistent behavior of mysql and h2/mysql:
>>
>> consider a table product with tiltle and desc both definded as not null.
>>
>> an insert like this will work in mysql and h2/mysql (as metioned in the
>> compatiblity doc):
>> > INSERT INTO `product` (`description`) VALUES ( 'asdf' );
>>
>> but this one should fail with some sql error just like in mysql:
>> > INSERT INTO `product` (`title`,`description`) VALUES (NULL, 'asdf' );
>>
>> A Hint where I might change that in h2 would be nice :)
>>
>> Best,
>> Edmund
>>
>
--
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/h2-database/-/HlY6awFfkXUJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/h2-database?hl=en.
Index: h2/src/main/org/h2/engine/Mode.java
===================================================================
--- h2/src/main/org/h2/engine/Mode.java (revision 4265)
+++ h2/src/main/org/h2/engine/Mode.java (working copy)
@@ -160,6 +160,12 @@
mode.lowerCaseIdentifiers = true;
mode.roundWhenConvertToLong = true;
add(mode);
+
+ mode = new Mode("MySQLNullCheck");
+ mode.indexDefinitionInCreateTable = true;
+ mode.lowerCaseIdentifiers = true;
+ mode.roundWhenConvertToLong = true;
+ add(mode);
mode = new Mode("Oracle");
mode.aliasColumnName = true;