Bug #53912 Fails to build from source
Submitted: 22 May 2010 9:03 Modified: 14 Oct 2010 15:31
Reporter: Norbert Tretkowski Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S2 (Serious)
Version:5.1.47, 5.1.48-bzr, 5.1.48 OS:Linux (Debian)
Assigned to: Ramil Kalimullin CPU Architecture:Any

[22 May 2010 9:03] Norbert Tretkowski
Description:
g++ -DEMBEDDED_LIBRARY -DMYSQL_SERVER -DDEFAULT_MYSQL_HOME="\"/usr\"" -DMYSQL_DATADIR="\"/var/lib/mysql\"" -DSHAREDIR="\"/usr/share/mysql\"" -DPLUGINDIR="\"/
usr/lib/mysql/plugin\"" -I. -I../../libmysqld -I../include -I../include -I../../include -I../sql -I../../sql -I../../sql/examples -I../../regex  -I../../stor
age/federated/ -I../../storage/heap/ -I../../storage/myisam/ -I../../storage/myisammrg/    -O3 -DBIG_JOINS=1 -felide-constructors -fno-exceptions -fno-rtti  
  -fno-implicit-templates -fno-exceptions -fno-rtti -MT sql_parse.o -MD -MP -MF .deps/sql_parse.Tpo -c -o sql_parse.o sql_parse.cc
sql_connect.cc: In function 'int check_user(THD*, enum_server_command, const char*, uint, const char*, bool)':
sql_connect.cc:480: error: 'struct NET' has no member named 'skip_big_packet'
make[4]: *** [sql_connect.o] Error 1

How to repeat:
./configure --enable-shared --enable-static --enable-thread-safe-client --enable-local-infile --with-pstack --with-fast-mutexes --with-big-tables --with-mysqld-user=mysql --with-libwrap --without-readline --with-ssl --without-docs --with-extra-charsets=all --with-plugins=max --with-embedded-server --with-embedded-privilege-control --without-ndbcluster

make
[22 May 2010 9:11] Valeriy Kravchuk
Looks related to Bug #53908 (although that one is for 5.0.91). There is a patch suggested there.
[22 May 2010 10:03] Norbert Tretkowski
The patch from bug #53908 needs to be applied to sql/sql_connect.cc in MySQL 5.1, but it indeed fixes the problem.
[22 May 2010 15:23] Valeriy Kravchuk
Verified by code review of recent 5.1.48 from bzr (other errors prevents compilation at earlier stage). This is some code around line 480 of sql/sql_connect.cc:

      thd->password= test(passwd_len);          // remember for error messages
      /*
        Allow the network layer to skip big packets. Although a malicious
        authenticated session might use this to trick the server to read
        big packets indefinitely, this is a previously established behavior
        that needs to be preserved as to not break backwards compatibility.
      */
      thd->net.skip_big_packet= TRUE;
      /* Ready to handle queries */
      DBUG_RETURN(0);
    }

See solution (patch) and simpler ./configure command line in related Bug #53908.
[4 Jun 2010 17:59] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/110274

3416 Ramil Kalimullin	2010-06-04
      Fix for bug #53912: Fails to build from source
      
      NET::skip_big_packet isn't defined for the embedded server,
      hide it in such a case.
     @ sql/sql_connect.cc
        Fix for bug #53912: Fails to build from source
          - hide net.skip_big_packet for the embedded server,
        as it isn't defined there.
[17 Jun 2010 6:12] Bugs System
Pushed into 5.5.5-m3 (revid:alexey.kopytov@sun.com-20100615145247-8bj0vmuqlotbqsn9) (version source revid:ramil@mysql.com-20100604180910-ney741s5hbox2koo) (merge vers: 5.5.5-m3) (pib:16)
[17 Jun 2010 6:16] Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100615150216-cubqoyn1fj9b6a2p) (version source revid:alik@sun.com-20100607075151-xjus8wzgjv3g9ok0) (pib:16)
[17 Jun 2010 7:33] MC Brown
A note has been added to the 5.5.5. changelog
[18 Jun 2010 6:42] Norbert Tretkowski
5.1.48 release still affected
[19 Jul 2010 14:34] Bugs System
Pushed into 5.1.49 (revid:build@mysql.com-20100719143034-omcma40sblwmay3x) (version source revid:ramil@mysql.com-20100604175841-7c27oejbf3gbj5ab) (merge vers: 5.1.48) (pib:16)
[20 Jul 2010 13:21] MC Brown
Changelog entry has been updated to 5.1.49
[14 Oct 2010 8:33] Bugs System
Pushed into mysql-5.1-telco-7.0 5.1.51-ndb-7.0.20 (revid:martin.skold@mysql.com-20101014082627-jrmy9xbfbtrebw3c) (version source revid:vasil.dimov@oracle.com-20100531152341-x2d4hma644icamh1) (merge vers: 5.5.5-m3) (pib:21)
[14 Oct 2010 8:49] Bugs System
Pushed into mysql-5.1-telco-6.3 5.1.51-ndb-6.3.39 (revid:martin.skold@mysql.com-20101014083757-5qo48b86d69zjvzj) (version source revid:vasil.dimov@oracle.com-20100531152341-x2d4hma644icamh1) (merge vers: 5.5.5-m3) (pib:21)
[14 Oct 2010 9:03] Bugs System
Pushed into mysql-5.1-telco-6.2 5.1.51-ndb-6.2.19 (revid:martin.skold@mysql.com-20101014084420-y54ecj85j5we27oa) (version source revid:vasil.dimov@oracle.com-20100531152341-x2d4hma644icamh1) (merge vers: 5.5.5-m3) (pib:21)
[14 Oct 2010 15:31] Jon Stephens
Already documented in the 5.1.49 changelog; no new changelog entries required. Setting back to Closed state.ยง