To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=106422 Issue #|106422 Summary|copytablewizard+ODBC crashes on binary data Component|Database access Version|OOO310m11 Platform|Unknown URL| OS/Version|Windows, all Status|UNCONFIRMED Status whiteboard| Keywords| Resolution| Issue type|DEFECT Priority|P3 Subcomponent|none Assigned to|dbaneedsconfirm Reported by|ludob
------- Additional comments from lu...@openoffice.org Thu Oct 29 09:41:38 +0000 2009 ------- Copying binary data to an ODBC datasource using the table wizard crashes OOO. The problem is that the pointer to the binary data used in SQLBindParameter is invalidated before SQLExecute is called. Tested with MySQL Connector/ODBC 5.1 and own ODBC driver. I traced into OOO and found the following: In OPreparedStatement::setParameter, a new buffer is allocated for the data. In OTools::bindData, the pointer to this buffer is changed to point to the original data instead of copying the data to the buffer: case SQL_VARBINARY: ... _pData = (sal_Int8*)((const ::com::sun::star::uno::Sequence< sal_Int8 > *)_pValue)->getConstArray(); Compare this to case SQL_VARCHAR: memcpy(_pData,aString.getStr(),aString.getLength()); The original data is destroyed immediately after the call to OPreparedStatement::setBytes and, of course, _pData is invalidated as well... MySQL Connector doesn't capture the invalid pointer exception and crashes OOO hard. OOO not capturing exceptions bubbling up from drivers (dll's) is a real annoyance. OOO is simply removed from memory and all work since last save (autosave) is lost. No indication at all of the type of exception that occured. I'm not talking about SQL_ERROR type of exceptions (issue 52335) but about windows exceptions or dll runtime exceptions. If you want I'll create a new issue for this problem. --------------------------------------------------------------------- Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@dba.openoffice.org For additional commands, e-mail: issues-h...@dba.openoffice.org --------------------------------------------------------------------- To unsubscribe, e-mail: allbugs-unsubscr...@openoffice.org For additional commands, e-mail: allbugs-h...@openoffice.org