Merge lp:~vkolesnikov/maria/maria-pbxt-bug-439889 into lp:~maria-captains/maria/5.1-converting
Proposed by
Vladimir Kolesnikov
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Kristian Nielsen | ||||
Approved revision: | not available | ||||
Merged at revision: | not available | ||||
Proposed branch: | lp:~vkolesnikov/maria/maria-pbxt-bug-439889 | ||||
Merge into: | lp:~maria-captains/maria/5.1-converting | ||||
Diff against target: |
60 lines (+11/-10) 4 files modified
config/ac-macros/plugins.m4 (+7/-5) sql/sql_plugin.cc (+3/-3) storage/pbxt/plug.in (+1/-0) storage/pbxt/src/Makefile.am (+0/-2) |
||||
To merge this branch: | bzr merge lp:~vkolesnikov/maria/maria-pbxt-bug-439889 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Kristian Nielsen | Approve | ||
Review via email: mp+15899@code.launchpad.net |
To post a comment you must log in.
The original problem happened because pbxt had dependencies on mysql structures in several sources but macro MYSQL_PLUGIN_ DEPENDS_ ON_MYSQL_ INTERNALS did not work for > 1 files. So some of the dependent source were built with wrong options. After fixing this problem wrong object files were still used. This was because of the following: libmysqld build script extracts object files from all plugin libraries and puts them into a single temporary archive. Next, object code of the files that depend on mysql internals are put into that same archive in replacement mode, so that if we already have e.g. ha_pbxt.o (compiled for normal server) in the archive then it will be replaced with the correct version built for embedded server. The problem was that pbxt used CXXFLAGS automake variable in its Makefile.am and in such case automake automatically adds target-specific prefix to the output object file to avoid conflicts when the same source is built several times with different options. In our case we got something like libpbxt_ a-ha_pbxt. o. The result was that the old ha_pbxt.o was not replaced in the archive and linker used symbols from there (by a chance I guess). The solution was not to use CXXFLAGS (we didn't really need them) but this is an undocumented limitation and might be a problem in future for other plugins too.