https://bugs.documentfoundation.org/show_bug.cgi?id=146432

--- Comment #9 from Alex Thurgood <[email protected]> ---
I have now managed to test this against a MySQL server running 8.0.27 and

Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: 1d21a51d814b39711cb1cc7f925b0c620b42eaa7
CPU threads: 8; OS: Mac OS X 10.16; UI render: default; VCL: osx
Locale: fr-FR (fr_FR.UTF-8); UI: en-US
Calc: threaded

Confirming crash.

Loading the test ODB file when running a LLDB debug session displays the
following on the terminal :

(lldb) target create "/Applications/LibreOfficeDev.app"
Current executable set to '/Applications/LibreOfficeDev.app' (x86_64).
(lldb) run
Process 15615 launched:
'/Applications/LibreOfficeDev.app/Contents/MacOS/soffice' (x86_64)
2022-01-03 15:55:58.866763+0100 soffice[15615:523273] SecTaskLoadEntitlements
failed error=22 cs_flags=20, pid=15615
2022-01-03 15:55:58.867134+0100 soffice[15615:523273]
SecTaskCopyDebugDescription: soffice[15615]/0#-1 LF=0
warn:legacy.osl:15615:523273:dbaccess/source/core/dataaccess/ModelImpl.cxx:764:
ODatabaseModelImpl::getOrCreateRootStorage: no source to create the storage
from!
warn:legacy.osl:15615:523273:dbaccess/source/core/dataaccess/ModelImpl.cxx:764:
ODatabaseModelImpl::getOrCreateRootStorage: no source to create the storage
from!
warn:legacy.osl:15615:523273:dbaccess/source/core/dataaccess/ModelImpl.cxx:764:
ODatabaseModelImpl::getOrCreateRootStorage: no source to create the storage
from!
warn:dbaccess:15615:523273:dbaccess/source/filter/xml/xmlTable.cxx:78: unknown
attribute urn:oasis:names:tc:opendocument:xmlns:database:1.0 db:command
value=SELECT REGEXP_REPLACE( rpath, '/[^/]*$', '' ) FROM urls
warn:dbaccess:15615:523273:dbaccess/source/filter/xml/xmlTable.cxx:78: unknown
attribute urn:oasis:names:tc:opendocument:xmlns:database:1.0
db:escape-processing value=false
warn:dbaccess:15615:523273:dbaccess/source/filter/xml/xmlQuery.cxx:56: unknown
attribute urn:oasis:names:tc:opendocument:xmlns:database:1.0 db:name
value=REGXPURL
2022-01-03 15:57:59.494024+0100 soffice[15615:523273] SecTaskLoadEntitlements
failed error=22 cs_flags=20, pid=15615
2022-01-03 15:57:59.494164+0100 soffice[15615:523273]
SecTaskCopyDebugDescription: soffice[15615]/0#-1 LF=0



Ignoring the macOS security permissions error messages...

>From the above, we can see that the XML filter code used for parsing the ODB
file doesn't know how to parse the query reference (which I'd previously stored
in the ODB file when testing against a mysql 5.7 server), as shown by the
following warning :

warn:dbaccess:15615:523273:dbaccess/source/filter/xml/xmlTable.cxx:78: unknown
attribute urn:oasis:names:tc:opendocument:xmlns:database:1.0 db:command
value=SELECT REGEXP_REPLACE( rpath, '/[^/]*$', '' ) FROM urls
warn:dbaccess:15615:523273:dbaccess/source/filter/xml/xmlTable.cxx:78: unknown
attribute urn:oasis:names:tc:opendocument:xmlns:database:1.0
db:escape-processing value=false
warn:dbaccess:15615:523273:dbaccess/source/filter/xml/xmlQuery.cxx:56: unknown
attribute urn:oasis:names:tc:opendocument:xmlns:database:1.0 db:name
value=REGXPURL

When I then try to execute the saved query, e.g. by double-clicking on it in
the UI, I get the following output :

warn:legacy.osl:15615:523273:connectivity/source/drivers/mysqlc/mysqlc_general.cxx:188:
mysqlToOOOType: unhandled case, falling back to VARCHAR
Process 15615 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS
(code=1, address=0x0)
    frame #0: 0x00007ff8090258e2
libsystem_platform.dylib`_platform_memmove$VARIANT$Rosetta + 482
libsystem_platform.dylib`_platform_memmove$VARIANT$Rosetta:
->  0x7ff8090258e2 <+482>: movq   %r8, (%rcx)
    0x7ff8090258e5 <+485>: addq   $0x8, %rcx
    0x7ff8090258e9 <+489>: subq   $0x8, %rdx
    0x7ff8090258ed <+493>: jae    0x7ff8090258db            ; <+475>
Target 0: (soffice) stopped.


This shows that mysqlc_general.cxx doesn't know how to handle the data type
being provided by the function and therefore falls back to VARCHAR, which
causes LO to die.

Attaching backtrace of lldb session at point where EXC_BAD_ACESS occurs.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to