1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Cleanup during review of new pushed code

This commit is contained in:
monty@mysql.com
2006-03-30 03:11:37 +03:00
parent 84e7c9633a
commit c04660e85e
3 changed files with 12 additions and 16 deletions

View File

@ -480,17 +480,13 @@ ha_rows ha_heap::records_in_range(uint inx, key_range *min_key,
min_key->flag != HA_READ_KEY_EXACT || min_key->flag != HA_READ_KEY_EXACT ||
max_key->flag != HA_READ_AFTER_KEY) max_key->flag != HA_READ_AFTER_KEY)
return HA_POS_ERROR; // Can only use exact keys return HA_POS_ERROR; // Can only use exact keys
else
{ if (records <= 1)
if (records <= 1) return records;
return records;
else /* Assert that info() did run. We need current statistics here. */
{ DBUG_ASSERT(key_stat_version == file->s->key_stat_version);
/* Assert that info() did run. We need current statistics here. */ return key->rec_per_key[key->key_parts-1];
DBUG_ASSERT(key_stat_version == file->s->key_stat_version);
return key->rec_per_key[key->key_parts-1];
}
}
} }

View File

@ -253,8 +253,8 @@ static int my_strnncollsp_ucs2(CHARSET_INFO *cs __attribute__((unused)),
uint minlen; uint minlen;
/* extra safety to make sure the lengths are even numbers */ /* extra safety to make sure the lengths are even numbers */
slen= (slen >> 1) << 1; slen= slen & ~(uint) 1;
tlen= (tlen >> 1) << 1; tlen= tlen & ~(uint) 1;
se= s + slen; se= s + slen;
te= t + tlen; te= t + tlen;

View File

@ -11719,13 +11719,13 @@ static void test_bug12744()
rc= mysql_kill(mysql, mysql_thread_id(mysql)); rc= mysql_kill(mysql, mysql_thread_id(mysql));
DIE_UNLESS(rc==0); DIE_UNLESS(rc==0);
if (rc= mysql_stmt_execute(prep_stmt)) if ((rc= mysql_stmt_execute(prep_stmt)))
{ {
if (rc= mysql_stmt_reset(prep_stmt)) if ((rc= mysql_stmt_reset(prep_stmt)))
printf("OK!\n"); printf("OK!\n");
else else
{ {
printf("Error!"); printf("Error!\n");
DIE_UNLESS(1==0); DIE_UNLESS(1==0);
} }
} }