From a9fde23474086117cb3128ed374967837ffb3cc0 Mon Sep 17 00:00:00 2001 From: "georg@lmy002.wdf.sap.corp" <> Date: Wed, 16 Mar 2005 08:51:57 +0100 Subject: [PATCH 1/4] typecast fix for windows 64-bit compilation error --- .bzrignore | 1 + client/mysql.cc | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.bzrignore b/.bzrignore index d2aa16da0a3..02a97d7d1af 100644 --- a/.bzrignore +++ b/.bzrignore @@ -1106,3 +1106,4 @@ vio/test-ssl vio/test-sslclient vio/test-sslserver vio/viotest-ssl +VC++Files/client/mysql_amd64.dsp diff --git a/client/mysql.cc b/client/mysql.cc index 16b26cd745d..a1071daffea 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -2154,7 +2154,7 @@ print_table_data_xml(MYSQL_RES *result) for (uint i=0; i < mysql_num_fields(result); i++) { tee_fprintf(PAGER, "\t"); xmlencode_print(cur[i], lengths[i]); tee_fprintf(PAGER, "\n"); From 19a82124a2d8c86166dd337bc21f2a0d6f95cfeb Mon Sep 17 00:00:00 2001 From: "marko@hundin.mysql.fi" <> Date: Wed, 16 Mar 2005 09:56:33 +0200 Subject: [PATCH 2/4] ha_innodb.cc: calc_row_difference(): Use non-inlined functions to avoid linking error. --- sql/ha_innodb.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc index 7132ab00bb9..537908f3472 100644 --- a/sql/ha_innodb.cc +++ b/sql/ha_innodb.cc @@ -3021,9 +3021,11 @@ calc_row_difference( col_pack_len, prebuilt->table->comp); ufield->new_val.data = - dfield_get_data(&dfield); + dfield_get_data_noninline( + &dfield); ufield->new_val.len = - dfield_get_len(&dfield); + dfield_get_len_noninline( + &dfield); } else { ufield->new_val.data = NULL; ufield->new_val.len = UNIV_SQL_NULL; From 72e2466c0d33961852537bad8aa38d2f4a5b3ae2 Mon Sep 17 00:00:00 2001 From: "kent@mysql.com" <> Date: Wed, 16 Mar 2005 09:23:38 +0100 Subject: [PATCH 3/4] mysql-test-run.sh: Check that there is a disabled.def before using it disabled.def: Reenable ndb tests accidently disabled --- mysql-test/mysql-test-run.sh | 14 ++++++++------ mysql-test/t/disabled.def | 8 -------- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh index b69bac1ad0b..4e970ca034d 100644 --- a/mysql-test/mysql-test-run.sh +++ b/mysql-test/mysql-test-run.sh @@ -1541,12 +1541,14 @@ run_testcase () disable_test $tname "$comment" return fi - comment=`$GREP "^$tname *: *" $TESTDIR/disabled.def`; - if [ -n "$comment" ] - then - comment=`echo $comment | sed 's/^[^:]*: *//'` - disable_test $tname "$comment" - return + if [ -f "$TESTDIR/disabled.def" ] ; then + comment=`$GREP "^$tname *: *" $TESTDIR/disabled.def`; + if [ -n "$comment" ] + then + comment=`echo $comment | sed 's/^[^:]*: *//'` + disable_test $tname "$comment" + return + fi fi if [ "x$USE_EMBEDDED_SERVER" != "x1" ] ; then diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index d2ab8158c51..9bfe9567d83 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -10,11 +10,3 @@ # ############################################################################## -ndb_alter_table : NDB team needs to fix -ndb_autodiscover : NDB team needs to fix -ndb_autodiscover2 : NDB team needs to fix -ndb_cache_multi : NDB team needs to fix -ndb_cache_multi2 : NDB team needs to fix -ndb_multi : NDB team needs to fix -ndb_restore : NDB team needs to fix - From 9a52ffbfa4a676c1293fe7d8b80bece264018764 Mon Sep 17 00:00:00 2001 From: "jan@hundin.mysql.fi" <> Date: Wed, 16 Mar 2005 10:35:18 +0200 Subject: [PATCH 4/4] Fixed a core dump bug after VARCHAR push in InnoDB. --- innobase/row/row0sel.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/innobase/row/row0sel.c b/innobase/row/row0sel.c index a09e09342e0..48bca5d7b6f 100644 --- a/innobase/row/row0sel.c +++ b/innobase/row/row0sel.c @@ -2100,9 +2100,12 @@ row_sel_convert_mysql_key_to_innobase( /* Calculate data length and data field total length */ - if (type == DATA_BLOB) { - /* The key field is a column prefix of a BLOB or - TEXT type column */ + if (type == DATA_BLOB || ( type == DATA_VARCHAR && + dtype_get_mysql_type(dfield_get_type(dfield)) + == DATA_MYSQL_TRUE_VARCHAR)) { + + /* The key field is a column prefix of a BLOB, + TEXT, OR TRUE VARCHAR type column */ ut_a(field->prefix_len > 0); @@ -2118,7 +2121,10 @@ row_sel_convert_mysql_key_to_innobase( data_len = key_ptr[data_offset] + 256 * key_ptr[data_offset + 1]; data_field_len = data_offset + 2 + field->prefix_len; - data_offset += 2; + + if (type == DATA_BLOB) { + data_offset += 2; + } /* now that we know the length, we store the column value like it would be a fixed char field */