Merge lp:~laurynas-biveinis/percona-server/bug902472 into lp:percona-server/5.1

Proposed by Laurynas Biveinis
Status: Merged
Approved by: Stewart Smith
Approved revision: no longer in the source branch.
Merged at revision: 476
Proposed branch: lp:~laurynas-biveinis/percona-server/bug902472
Merge into: lp:percona-server/5.1
Diff against target: 42 lines (+16/-16)
1 file modified
Percona-Server/config/ac-macros/misc.m4 (+16/-16)
To merge this branch: bzr merge lp:~laurynas-biveinis/percona-server/bug902472
Reviewer Review Type Date Requested Status
Stewart Smith (community) Approve
Review via email: mp+121307@code.launchpad.net

Description of the change

Fix bug 902472 (main.subselect_notembedded fails on Ubuntu Oneiric in
Jenkins) and upstream bug http://bugs.mysql.com/bug.php?id=62856.

The issue is the Autoconf stack direction test, which relies on
the undefined behaviour and compilers not optimizing the test too
much. Adjust the test to work with GCC 4.6 by taking the contributed
patch from the upstream bug, which in turn is the 5.5 test backported
from CMake to Autoconf.

Jenkins: http://jenkins.percona.com/job/percona-server-5.1-param/389/

5.5 already contains the correct test, thus should be null-merged to 5.5

To post a comment you must log in.
Revision history for this message
Stewart Smith (stewart) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Percona-Server/config/ac-macros/misc.m4'
--- Percona-Server/config/ac-macros/misc.m4 2009-11-04 23:08:21 +0000
+++ Percona-Server/config/ac-macros/misc.m4 2012-08-25 10:32:21 +0000
@@ -460,22 +460,22 @@
460#if defined(__HP_cc) || defined (__HP_aCC) || defined (__hpux)460#if defined(__HP_cc) || defined (__HP_aCC) || defined (__hpux)
461#pragma noinline461#pragma noinline
462#endif462#endif
463 int find_stack_direction ()463/* Check stack direction (0-down, 1-up) */
464 {464int f(int *a)
465 static char *addr = 0;465{
466 auto char dummy;466 int b;
467 if (addr == 0)467 return(&b > a)?1:-1;
468 {468}
469 addr = &dummy;469/*
470 return find_stack_direction ();470 Prevent compiler optimizations by calling function
471 }471 through pointer.
472 else472*/
473 return (&dummy > addr) ? 1 : -1;473volatile int (*ptr_f)(int *) = f;
474 }474int main()
475 int main ()475{
476 {476 int a;
477 exit (find_stack_direction() < 0);477 exit(ptr_f(&a) < 0);
478 }], ac_cv_c_stack_direction=1, ac_cv_c_stack_direction=-1,478}], ac_cv_c_stack_direction=1, ac_cv_c_stack_direction=-1,
479 ac_cv_c_stack_direction=)])479 ac_cv_c_stack_direction=)])
480 AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction)480 AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction)
481])dnl481])dnl

Subscribers

People subscribed via source and target branches