Commit 45f6c038 authored by mats@kindahl-laptop.dnsalias.net's avatar mats@kindahl-laptop.dnsalias.net
Browse files

Merge kindahl-laptop.dnsalias.net:/home/bkroot/mysql-5.1-rpl

into  kindahl-laptop.dnsalias.net:/home/bk/b31582-mysql-5.1-rpl
parents f136bde2 02ef77d8
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
#! /bin/sh
path=`dirname $0`
. "$path/SETUP.sh"
amd64_cflags="-m64 -mtune=athlon64"
extra_flags="$amd64_cflags $debug_cflags $max_cflags"
c_warnings="$c_warnings $debug_extra_warnings"
cxx_warnings="$cxx_warnings $debug_extra_warnings"
extra_configs="$amd64_configs $debug_configs $max_configs --enable-thread-safe-client"

. "$path/FINISH.sh"
+52 −0
Original line number Diff line number Diff line
#! /bin/sh

gmake -k clean || true
/bin/rm -f */.deps/*.P config.cache
 
path=`dirname $0`
. "$path/autorun.sh"

# For "optimal" code for this computer add -fast to EXTRA
# To compile 64 bit, add -xarch=v9 to EXTRA_64_BIT

EXTRA_64_BIT="-xarch=amd64"
EXTRA="-fast"

#
# The following should not need to be touched
#

export CC CXX CFLAGS CXXFLAGS
STD="-g -mt -D_FORTEC_ $EXTRA $EXTRA_64_BIT"
ASFLAGS="$EXTRA_64_BIT"
CC=cc-5.0
CFLAGS="-Xa -xstrconst $STD"
CXX=CC
CXXFLAGS="-noex $STD"
./configure \
    --prefix=/usr/local/mysql \
    --localstatedir=/usr/local/mysql/data \
    --libexecdir=/usr/local/mysql/bin \
    --with-extra-charsets=complex \
    --enable-thread-safe-client \
    --enable-local-infile \
    --with-zlib-dir=bundled \
    --with-big-tables \
    --with-readline \
    --with-archive-storage-engine \
    --with-named-curses=-lcurses \
    --with-big-tables \
    --with-innodb \
    --with-example-storage-engine \
    --with-blackhole-storage-engine \
    --with-federated-storage-engine \
    --with-csv-storage-engine \
    --with-ssl \
    --enable-assembler

# Not including:
#     --with-ndbcluster
#     --with-berkeley-db

gmake -j4
test $? = 0 && make test
+54 −0
Original line number Diff line number Diff line
#! /bin/sh

gmake -k clean || true
/bin/rm -f */.deps/*.P config.cache
 
path=`dirname $0`
. "$path/autorun.sh"

# To compile 64 bit, add -xarch=amd64 to EXTRA_64_BIT
EXTRA_64_BIT="-xarch=amd64"

# For "optimal" code for this computer add -fast to EXTRA. Note that
# this causes problem with debugging the program since -fast implies
# -xO5.
EXTRA=""

#
# The following should not need to be touched
#

export CC CXX CFLAGS CXXFLAGS
STD="-g -mt -D_FORTEC_ $EXTRA $EXTRA_64_BIT $debug_cflags"
ASFLAGS="$EXTRA_64_BIT"
CC=cc-5.0
CFLAGS="-Xa -xstrconst $STD"
CXX=CC
CXXFLAGS="-noex $STD"
./configure \
    --prefix=/usr/local/mysql \
    --localstatedir=/usr/local/mysql/data \
    --libexecdir=/usr/local/mysql/bin \
    --with-extra-charsets=complex \
    --enable-thread-safe-client \
    --enable-local-infile \
    --with-zlib-dir=bundled \
    --with-big-tables \
    --with-readline \
    --with-archive-storage-engine \
    --with-named-curses=-lcurses \
    --with-big-tables \
    --with-innodb \
    --with-example-storage-engine \
    --with-blackhole-storage-engine \
    --with-federated-storage-engine \
    --with-csv-storage-engine \
    --with-ssl \
    --with-debug \
    --enable-assembler

# Not including:
#     --with-ndbcluster
#     --with-berkeley-db

gmake -j4
+16 −0
Original line number Diff line number Diff line
@@ -159,6 +159,22 @@ static inline my_bool bitmap_cmp(const MY_BITMAP *map1, const MY_BITMAP *map2)
#define bitmap_set_all(MAP) \
  (memset((MAP)->bitmap, 0xFF, 4*no_words_in_map((MAP))))

/**
   check, set and clear a bit of interest of an integer.

   If the bit is out of range @retval -1. Otherwise
   bit_is_set   @return 0 or 1 reflecting the bit is set or not;
   bit_do_set   @return 1 (bit is set 1)
   bit_do_clear @return 0 (bit is cleared to 0)
*/

#define bit_is_set(I,B)   (sizeof(I) * CHAR_BIT > (B) ?                 \
                           (((I) & (ULL(1) << (B))) == 0 ? 0 : 1) : -1)
#define bit_do_set(I,B)   (sizeof(I) * CHAR_BIT > (B) ?         \
                           ((I) |= (ULL(1) << (B)), 1) : -1)
#define bit_do_clear(I,B) (sizeof(I) * CHAR_BIT > (B) ?         \
                           ((I) &= ~(ULL(1) << (B)), 0) : -1)

#ifdef	__cplusplus
}
#endif
+31 −0
Original line number Diff line number Diff line
@@ -32,3 +32,34 @@ SET FOREIGN_KEY_CHECKS=0;
DROP TABLE IF EXISTS t1,t2,t3;
SET FOREIGN_KEY_CHECKS=1;
sync_slave_with_master;

#
# Bug #32468 delete rows event on a table with foreign key constraint fails
#

connection master;

eval create table t1 (b int primary key) engine = $engine_type;
eval create table t2 (a int primary key, b int, foreign key (b) references t1(b))
       engine = $engine_type;

insert into t1 set b=1;
insert into t2 set a=1, b=1;

set foreign_key_checks=0;
set @@session.binlog_format=row;
delete from t1;

--echo must sync w/o a problem (could not with the buggy code)
sync_slave_with_master;
select count(*) from t1 /* must be zero */;


# cleanup for bug#32468

connection master;
drop table t2,t1;

sync_slave_with_master;

Loading