Transaction partially committed when database encoding differs from the java
encoding
-------------------------------------------------------------------------------------
Key: XWIKI-1736
URL: http://jira.xwiki.org/jira/browse/XWIKI-1736
Project: XWiki Platform
Issue Type: Bug
Components: Storage
Affects Versions: 1.1 RC2
Environment: latin1 mysql, utf8 xwiki 1.2 pre-M1
Reporter: Sergiu Dumitriu
I had an UTF8 instance of XWiki running on an mysql database. Since the default
database encoding was latin1, I manually converted all the tables to UTF8, but
when upgrading to the 1.2 trunk, the schema autoupdate created two new tables,
xwikircs and xwikirecyclebin, but using the default latin1 encoding.
After that, when saving a document with non-ascii characters, I got an error
saying that \x90\x60 is not a valid value for the field patch, although the
document was properly saved and could be retrieved from the database. After
that, when trying to save that document again, I kept getting a
NullPointerException at the XWikiRcsNodeInfo.setDiff method. At first, I
thought that there's a bug in the new document history code, by not setting
that field. After a closer look at the database, I discovered that several
fields of the corresponding xwikircs row were NULL. Now I could not save that
document, as the history couldn't be loaded, and I couldn't delete the document
for the same reason.
The only solution was to delete those rows, update the table to the right
encoding, and then resave the document.
As far as I know, a transaction is defined as an atomic operation, either all
the operations are successfully performed, or none of the operations are
performed. Why did only part of the transaction make it to the database? Does
it always work like that with hibernate?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.xwiki.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
notifications mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/notifications