summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2006-03-30 03:11:37 +0300
committerunknown <monty@mysql.com>2006-03-30 03:11:37 +0300
commit4c0111460bae6b62999c1e17482f5560909cb482 (patch)
tree61eee37f41ff61237d032f69b555961c63a47442
parent2d6a51b4c8bac3cbed223836f8b2379b9a065d16 (diff)
downloadmariadb-git-4c0111460bae6b62999c1e17482f5560909cb482.tar.gz
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
-rw-r--r--sql/ha_heap.cc18
-rw-r--r--strings/ctype-ucs2.c4
-rw-r--r--tests/mysql_client_test.c6
3 files changed, 12 insertions, 16 deletions
diff --git a/sql/ha_heap.cc b/sql/ha_heap.cc
index ab0ab5d8b64..9c680daaf91 100644
--- a/sql/ha_heap.cc
+++ b/sql/ha_heap.cc
@@ -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];
}
diff --git a/strings/ctype-ucs2.c b/strings/ctype-ucs2.c
index e172ad3e3d3..2cbd104329e 100644
--- a/strings/ctype-ucs2.c
+++ b/strings/ctype-ucs2.c
@@ -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;
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c
index 71ae5e4f052..5133a9013d2 100644
--- a/tests/mysql_client_test.c
+++ b/tests/mysql_client_test.c
@@ -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);
}
}