Bug #71010 sql/sql_resolver.cc refers to partition engine fields when building without it

Submitted: 26 Nov 2013 12:55 Modified: 8 Jan 2014 18:00
Reporter: Patrick Middleton Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:5.6.14GA OS:Any
Assigned to: CPU Architecture:Any
Tags: Contribution

[26 Nov 2013 12:55] Patrick Middleton
Description:
When building from source from cmake ..   -DWITH_PARTITION_STORAGE_ENGINE=OFF
sql/sql_resolver.cc refers to struct TABLE  field part_info, which will have been skipped by conditional compilation

How to repeat:
rm -rf bld
mkdir bld
cd bld
cmake .. \
  -DWITH_PARTITION_STORAGE_ENGINE=OFF \
  -DCMAKE_OSX_ARCHITECTURES="ppc;i386" \
  -DCMAKE_OSX_SYSROOT="/Developer/SDKs/MacOSX10.4u.sdk" \
  -DCMAKE_OSX_DEPLOYMENT_TARGET="10.4" \
  -DCURSES_LIBRARY="/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/libcurses.dylib" \
  -DCURSES_NCURSES_LIBRARY="/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/libncurses.dylib" \
  -DCURSES_FORM_LIBRARY="/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/libform.dylib"
  make install
cd ..

Suggested fix:
Wrap the reference in #ifdef WITH_PARTITION_STORAGE_ENGINE ... #endif.
Patch to be added.
This was found in 5.6.14GA.  In 5.7.2-m12 the affected section of sql/sql_resolver.cc has changed; I don't know enough abou the release trains to know if what I found is a problem beyond 5.6.x.
[26 Nov 2013 12:56] Patrick Middleton
Patch against sql/sql_resolver.cc 5.6.14GA

Attachment: sql_resolver.cc.patch (application/octet-stream, text), 497 bytes.

[29 Nov 2013 17:49] Sveta Smirnova
Thank you for the report.

Verified as described.
[29 Nov 2013 17:50] Sveta Smirnova
In order for us to accept your contribution you need to sign OCA as described in the "Contributions" tab.
[8 Jan 2014 18:00] Paul DuBois
Noted in 5.6.16, 5.7.4 changelogs.

sql_resolver.cc referred to partitioning code that should have been
protected by an #ifdef, even when MySQL was configured with
-DWITH_PARTITION_STORAGE_ENGINE=OFF.
[3 Feb 2014 11:05] Laurynas Biveinis
5.6$ bzr log -r 5676
------------------------------------------------------------
revno: 5676
committer: Roy Lyseng <roy.lyseng@oracle.com>
branch nick: mysql-5.6
timestamp: Tue 2013-12-10 09:24:24 +0100
message:
  Bug#71010: Bug#17876794: sql/sql_resolver.cc refers to partition engine fields
  
  An #ifdef was missed in this file.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.057 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.