Commit 4c011146 authored by unknown's avatar unknown

Cleanup during review of new pushed code


sql/ha_heap.cc:
  Indentation fixes
strings/ctype-ucs2.c:
  Simplify code
tests/mysql_client_test.c:
  Remove compiler warnings
parent 2d6a51b4
......@@ -480,17 +480,13 @@ ha_rows ha_heap::records_in_range(uint inx, key_range *min_key,
min_key->flag != HA_READ_KEY_EXACT ||
max_key->flag != HA_READ_AFTER_KEY)
return HA_POS_ERROR; // Can only use exact keys
else
{
if (records <= 1)
return records;
else
{
/* Assert that info() did run. We need current statistics here. */
DBUG_ASSERT(key_stat_version == file->s->key_stat_version);
return key->rec_per_key[key->key_parts-1];
}
}
if (records <= 1)
return records;
/* Assert that info() did run. We need current statistics here. */
DBUG_ASSERT(key_stat_version == file->s->key_stat_version);
return key->rec_per_key[key->key_parts-1];
}
......
......@@ -253,8 +253,8 @@ static int my_strnncollsp_ucs2(CHARSET_INFO *cs __attribute__((unused)),
uint minlen;
/* extra safety to make sure the lengths are even numbers */
slen= (slen >> 1) << 1;
tlen= (tlen >> 1) << 1;
slen= slen & ~(uint) 1;
tlen= tlen & ~(uint) 1;
se= s + slen;
te= t + tlen;
......
......@@ -11719,13 +11719,13 @@ static void test_bug12744()
rc= mysql_kill(mysql, mysql_thread_id(mysql));
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");
else
{
printf("Error!");
printf("Error!\n");
DIE_UNLESS(1==0);
}
}
......
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