Commit 553c9c36 authored by Sunny Bains's avatar Sunny Bains

Fix a bug reported by PushBuild on OSX 10.6.3. It turned out to be a compiler

bug. The code has been changed to work around it. To reprocude the bug simply
revert this change and build the binary with:

GCC Using built-in specs.
Target: i686-apple-darwin10
Configured with: /var/tmp/gcc/gcc-5659~1/src/configure --disable-checking --enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin10 --program-prefix=i686-apple-darwin10- --host=x86_64-apple-darwin10 --target=i686-apple-darwin10 --with-gxx-include-dir=/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Apple Inc. build 5659)

export LDFLAGS='-g -arch i386'
export CFLAGS='-g -no-cpp-precomp -arch i386 -O2'
export CXXFLAGS='-g -no-cpp-precomp -arch i386 -O2'

./configure --enable-thread-safe-client --enable-local-infile --with-pic --with-client-ldflags=-static --with-mysqld-ldflags=-static --with-zlib-dir=bundled --without-ndb-debug --with-big-tables --with-ssl --with-readline --with-embedded-server --with-archive-storage-engine --with-blackhole-storage-engine --with-csv-storage-engine --with-example-storage-engine --with-federated-storage-engine --with-partition --with-extra-charsets=all --with-innodb --with-ndbcluster --with-libevent --target=i386-apple-darwin --program-transform-name=

Approved by Marko on IM.
parent 52223f72
...@@ -274,6 +274,7 @@ row_merge_buf_add( ...@@ -274,6 +274,7 @@ row_merge_buf_add(
const dict_index_t* index; const dict_index_t* index;
dfield_t* entry; dfield_t* entry;
dfield_t* field; dfield_t* field;
const dict_field_t* ifield;
if (buf->n_tuples >= buf->max_tuples) { if (buf->n_tuples >= buf->max_tuples) {
return(FALSE); return(FALSE);
...@@ -292,14 +293,14 @@ row_merge_buf_add( ...@@ -292,14 +293,14 @@ row_merge_buf_add(
data_size = 0; data_size = 0;
extra_size = UT_BITS_IN_BYTES(index->n_nullable); extra_size = UT_BITS_IN_BYTES(index->n_nullable);
for (i = 0; i < n_fields; i++, field++) { ifield = dict_index_get_nth_field(index, 0);
const dict_field_t* ifield;
for (i = 0; i < n_fields; i++, field++, ifield++) {
const dict_col_t* col; const dict_col_t* col;
ulint col_no; ulint col_no;
const dfield_t* row_field; const dfield_t* row_field;
ulint len; ulint len;
ifield = dict_index_get_nth_field(index, i);
col = ifield->col; col = ifield->col;
col_no = dict_col_get_no(col); col_no = dict_col_get_no(col);
row_field = dtuple_get_nth_field(row, col_no); row_field = dtuple_get_nth_field(row, col_no);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment