Author: sdumitriu
Date: 2007-12-12 11:29:40 +0100 (Wed, 12 Dec 2007)
New Revision: 6345
Modified:
xwiki-platform/pom/trunk/pom.xml
xwiki-platform/xwiki-tools/trunk/xwiki-configuration-resources/src/main/resources/hibernate.cfg.xml.vm
Log:
XWIKI-1945: Data truncation for boolean fields reported in some environments
Fixed.
Workaround needed because the way hibernate works with boolean fields in mysql.
Needs to be tested.
Modified: xwiki-platform/pom/trunk/pom.xml
===================================================================
--- xwiki-platform/pom/trunk/pom.xml 2007-12-11 21:54:44 UTC (rev 6344)
+++ xwiki-platform/pom/trunk/pom.xml 2007-12-12 10:29:40 UTC (rev 6345)
@@ -163,7 +163,8 @@
<xwiki.db.jdbc.groupId>mysql</xwiki.db.jdbc.groupId>
<xwiki.db.jdbc.artifactId>mysql-connector-java</xwiki.db.jdbc.artifactId>
<xwiki.db.jdbc.version>5.0.7</xwiki.db.jdbc.version>
-
<xwiki.db.connection.url>jdbc:mysql://localhost/xwiki?useServerPrepStmts=false</xwiki.db.connection.url>
+ <!-- We need to set the sql_mode to a less strict value, see
XWIKI-1945 -->
+
<xwiki.db.connection.url>jdbc:mysql://localhost/xwiki?useServerPrepStmts=false&sessionVariables=sql_mode=''</xwiki.db.connection.url>
<xwiki.db.connection.username>xwiki</xwiki.db.connection.username>
<xwiki.db.connection.password>xwiki</xwiki.db.connection.password>
<xwiki.db.connection.driver_class>com.mysql.jdbc.Driver</xwiki.db.connection.driver_class>
Modified:
xwiki-platform/xwiki-tools/trunk/xwiki-configuration-resources/src/main/resources/hibernate.cfg.xml.vm
===================================================================
---
xwiki-platform/xwiki-tools/trunk/xwiki-configuration-resources/src/main/resources/hibernate.cfg.xml.vm
2007-12-11 21:54:44 UTC (rev 6344)
+++
xwiki-platform/xwiki-tools/trunk/xwiki-configuration-resources/src/main/resources/hibernate.cfg.xml.vm
2007-12-12 10:29:40 UTC (rev 6345)
@@ -26,7 +26,7 @@
2) Uncomment the properties below for your specific DB
-->
- ## Only use a default configuration if the $xwikiDbConnectionUrl field
equal to "non". I would
+ ## Only use a default configuration if the $xwikiDbConnectionUrl field
equal to "none". I would
## have preferred to use an empty value but I couldn't make that work with
Maven.
#if ($xwikiDbConnectionUrl != "none")
<property name="connection.url">$xwikiDbConnectionUrl</property>
@@ -47,7 +47,8 @@
<!-- MySQL configuration.
Uncomment if you want to use MySQL and comment out other database
configurations.
Note that the database will be created automatically if it doesn't
already exist.
- <property
name="connection.url">jdbc:mysql://localhost/xwiki?useServerPrepStmts=false</property>
+ <!-- We need to set the sql_mode to a less strict value, see XWIKI-1945 -->
+ <property
name="connection.url">jdbc:mysql://localhost/xwiki?useServerPrepStmts=false&sessionVariables=sql_mode=''</property>
<property name="connection.username">xwiki</property>
<property name="connection.password">xwiki</property>
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
_______________________________________________
notifications mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/notifications