Loading BUILD/check-cpu +1 −2 Original line number Diff line number Diff line Loading @@ -167,8 +167,7 @@ check_cpu () { touch __test.c while [ "$cpu_arg" ] ; do # FIXME: echo -n isn't portable - see contortions autoconf goes through echo -n testing $cpu_arg "... " >&2 printf "testing $cpu_arg ... " >&2 # compile check check_cpu_cflags=`eval echo $check_cpu_args` Loading client/mysqldump.c +13 −5 Original line number Diff line number Diff line Loading @@ -2589,6 +2589,8 @@ static char *primary_key_fields(const char *table_name) char show_keys_buff[15 + 64 * 2 + 3]; uint result_length = 0; char *result = 0; char buff[NAME_LEN * 2 + 3]; char *quoted_field; my_snprintf(show_keys_buff, sizeof(show_keys_buff), "SHOW KEYS FROM %s", table_name); Loading @@ -2612,8 +2614,10 @@ static char *primary_key_fields(const char *table_name) { /* Key is unique */ do result_length += strlen(row[4]) + 1; /* + 1 for ',' or \0 */ while ((row = mysql_fetch_row(res)) && atoi(row[3]) > 1); { quoted_field= quote_name(row[4], buff, 0); result_length+= strlen(quoted_field) + 1; /* + 1 for ',' or \0 */ } while ((row= mysql_fetch_row(res)) && atoi(row[3]) > 1); } /* Build the ORDER BY clause result */ Loading @@ -2627,9 +2631,13 @@ static char *primary_key_fields(const char *table_name) } mysql_data_seek(res, 0); row = mysql_fetch_row(res); end = strmov(result, row[4]); quoted_field= quote_name(row[4], buff, 0); end= strmov(result, quoted_field); while ((row= mysql_fetch_row(res)) && atoi(row[3]) > 1) end = strxmov(end, ",", row[4], NullS); { quoted_field= quote_name(row[4], buff, 0); end= strxmov(end, ",", quoted_field, NullS); } } cleanup: Loading configure.in +5 −1 Original line number Diff line number Diff line Loading @@ -2990,10 +2990,14 @@ AM_CONDITIONAL(HAVE_NETWARE, test "$netware_dir" = "netware") export CC CXX CFLAGS CXXFLAGS LD LDFLAGS AR ac_configure_args="$ac_configure_args CFLAGS='$CFLAGS' CXXFLAGS='$CXXFLAGS'" if test "$with_server" = "yes" -o "$THREAD_SAFE_CLIENT" != "no" if test "$with_server" != "no" -o "$THREAD_SAFE_CLIENT" != "no" then AC_DEFINE([THREAD], [1], [Define if you want to have threaded code. This may be undef on client code]) fi if test "$with_server" != "no" then # Avoid _PROGRAMS names THREAD_LPROGRAMS="test_thr_alarm\$(EXEEXT) test_thr_lock\$(EXEEXT)" AC_SUBST(THREAD_LPROGRAMS) Loading heap/hp_block.c +1 −1 Original line number Diff line number Diff line Loading @@ -76,7 +76,7 @@ int hp_get_new_block(HP_BLOCK *block, ulong *alloc_length) and my_default_record_cache_size we get about 1/128 unused memory. */ *alloc_length=sizeof(HP_PTRS)*i+block->records_in_block* block->recbuffer; if (!(root=(HP_PTRS*) my_malloc(*alloc_length,MYF(0)))) if (!(root=(HP_PTRS*) my_malloc(*alloc_length,MYF(MY_WME)))) return 1; if (i == 0) Loading heap/hp_write.c +9 −3 Original line number Diff line number Diff line Loading @@ -68,11 +68,17 @@ int heap_write(HP_INFO *info, const byte *record) DBUG_RETURN(0); err: if (my_errno == HA_ERR_FOUND_DUPP_KEY) DBUG_PRINT("info",("Duplicate key: %d", keydef - share->keydef)); info->errkey= keydef - share->keydef; if (keydef->algorithm == HA_KEY_ALG_BTREE) /* We don't need to delete non-inserted key from rb-tree. Also, if we got ENOMEM, the key wasn't inserted, so don't try to delete it either. Otherwise for HASH index on HA_ERR_FOUND_DUPP_KEY the key was inserted and we have to delete it. */ if (keydef->algorithm == HA_KEY_ALG_BTREE || my_errno == ENOMEM) { /* we don't need to delete non-inserted key from rb-tree */ keydef--; } while (keydef >= share->keydef) Loading Loading
BUILD/check-cpu +1 −2 Original line number Diff line number Diff line Loading @@ -167,8 +167,7 @@ check_cpu () { touch __test.c while [ "$cpu_arg" ] ; do # FIXME: echo -n isn't portable - see contortions autoconf goes through echo -n testing $cpu_arg "... " >&2 printf "testing $cpu_arg ... " >&2 # compile check check_cpu_cflags=`eval echo $check_cpu_args` Loading
client/mysqldump.c +13 −5 Original line number Diff line number Diff line Loading @@ -2589,6 +2589,8 @@ static char *primary_key_fields(const char *table_name) char show_keys_buff[15 + 64 * 2 + 3]; uint result_length = 0; char *result = 0; char buff[NAME_LEN * 2 + 3]; char *quoted_field; my_snprintf(show_keys_buff, sizeof(show_keys_buff), "SHOW KEYS FROM %s", table_name); Loading @@ -2612,8 +2614,10 @@ static char *primary_key_fields(const char *table_name) { /* Key is unique */ do result_length += strlen(row[4]) + 1; /* + 1 for ',' or \0 */ while ((row = mysql_fetch_row(res)) && atoi(row[3]) > 1); { quoted_field= quote_name(row[4], buff, 0); result_length+= strlen(quoted_field) + 1; /* + 1 for ',' or \0 */ } while ((row= mysql_fetch_row(res)) && atoi(row[3]) > 1); } /* Build the ORDER BY clause result */ Loading @@ -2627,9 +2631,13 @@ static char *primary_key_fields(const char *table_name) } mysql_data_seek(res, 0); row = mysql_fetch_row(res); end = strmov(result, row[4]); quoted_field= quote_name(row[4], buff, 0); end= strmov(result, quoted_field); while ((row= mysql_fetch_row(res)) && atoi(row[3]) > 1) end = strxmov(end, ",", row[4], NullS); { quoted_field= quote_name(row[4], buff, 0); end= strxmov(end, ",", quoted_field, NullS); } } cleanup: Loading
configure.in +5 −1 Original line number Diff line number Diff line Loading @@ -2990,10 +2990,14 @@ AM_CONDITIONAL(HAVE_NETWARE, test "$netware_dir" = "netware") export CC CXX CFLAGS CXXFLAGS LD LDFLAGS AR ac_configure_args="$ac_configure_args CFLAGS='$CFLAGS' CXXFLAGS='$CXXFLAGS'" if test "$with_server" = "yes" -o "$THREAD_SAFE_CLIENT" != "no" if test "$with_server" != "no" -o "$THREAD_SAFE_CLIENT" != "no" then AC_DEFINE([THREAD], [1], [Define if you want to have threaded code. This may be undef on client code]) fi if test "$with_server" != "no" then # Avoid _PROGRAMS names THREAD_LPROGRAMS="test_thr_alarm\$(EXEEXT) test_thr_lock\$(EXEEXT)" AC_SUBST(THREAD_LPROGRAMS) Loading
heap/hp_block.c +1 −1 Original line number Diff line number Diff line Loading @@ -76,7 +76,7 @@ int hp_get_new_block(HP_BLOCK *block, ulong *alloc_length) and my_default_record_cache_size we get about 1/128 unused memory. */ *alloc_length=sizeof(HP_PTRS)*i+block->records_in_block* block->recbuffer; if (!(root=(HP_PTRS*) my_malloc(*alloc_length,MYF(0)))) if (!(root=(HP_PTRS*) my_malloc(*alloc_length,MYF(MY_WME)))) return 1; if (i == 0) Loading
heap/hp_write.c +9 −3 Original line number Diff line number Diff line Loading @@ -68,11 +68,17 @@ int heap_write(HP_INFO *info, const byte *record) DBUG_RETURN(0); err: if (my_errno == HA_ERR_FOUND_DUPP_KEY) DBUG_PRINT("info",("Duplicate key: %d", keydef - share->keydef)); info->errkey= keydef - share->keydef; if (keydef->algorithm == HA_KEY_ALG_BTREE) /* We don't need to delete non-inserted key from rb-tree. Also, if we got ENOMEM, the key wasn't inserted, so don't try to delete it either. Otherwise for HASH index on HA_ERR_FOUND_DUPP_KEY the key was inserted and we have to delete it. */ if (keydef->algorithm == HA_KEY_ALG_BTREE || my_errno == ENOMEM) { /* we don't need to delete non-inserted key from rb-tree */ keydef--; } while (keydef >= share->keydef) Loading