summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql-common/my_time.c2
-rw-r--r--sql/records.cc2
-rw-r--r--storage/xtradb/handler/ha_innodb.cc2
3 files changed, 3 insertions, 3 deletions
diff --git a/sql-common/my_time.c b/sql-common/my_time.c
index 03a124a341a..436e6b2761e 100644
--- a/sql-common/my_time.c
+++ b/sql-common/my_time.c
@@ -337,7 +337,7 @@ str_to_datetime(const char *str, uint length, MYSQL_TIME *l_time,
{
if (str[0] == 'p' || str[0] == 'P')
add_hours= 12;
- else if (str[0] != 'a' || str[0] != 'A')
+ else if (str[0] != 'a' && str[0] != 'A')
continue; /* Not AM/PM */
str+= 2; /* Skip AM/PM */
/* Skip space after AM/PM */
diff --git a/sql/records.cc b/sql/records.cc
index 827450201c9..a3aca6a14ac 100644
--- a/sql/records.cc
+++ b/sql/records.cc
@@ -621,7 +621,7 @@ static int rr_cmp(uchar *a,uchar *b)
if (a[4] != b[4])
return (int) a[4] - (int) b[4];
if (a[5] != b[5])
- return (int) a[1] - (int) b[5];
+ return (int) a[5] - (int) b[5];
if (a[6] != b[6])
return (int) a[6] - (int) b[6];
return (int) a[7] - (int) b[7];
diff --git a/storage/xtradb/handler/ha_innodb.cc b/storage/xtradb/handler/ha_innodb.cc
index b8784afe9d6..e0510663e30 100644
--- a/storage/xtradb/handler/ha_innodb.cc
+++ b/storage/xtradb/handler/ha_innodb.cc
@@ -6961,7 +6961,7 @@ ha_innobase::create(
if (srv_file_per_table
&& !mysqld_embedded
- && (!create_info->options & HA_LEX_CREATE_TMP_TABLE)) {
+ && !(create_info->options & HA_LEX_CREATE_TMP_TABLE)) {
if ((name[1] == ':')
|| (name[0] == '\\' && name[1] == '\\')) {