Skip to content

Commit 41d9840

Browse files
kevgsmidenok
authored andcommitted
SQL: remove unneded return value
1 parent e851c14 commit 41d9840

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

sql/field.cc

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4356,12 +4356,11 @@ void Field_longlong::sql_type(String &res) const
43564356
add_zerofill_and_unsigned(res);
43574357
}
43584358

4359-
bool Field_longlong::set_max()
4359+
void Field_longlong::set_max()
43604360
{
43614361
ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED;
43624362
set_notnull();
43634363
int8store(ptr, unsigned_flag ? ULONGLONG_MAX : LONGLONG_MAX);
4364-
return FALSE;
43654364
}
43664365

43674366
bool Field_longlong::is_max()
@@ -5444,7 +5443,7 @@ void Field_timestampf::store_TIME(my_time_t timestamp, ulong sec_part)
54445443
my_timestamp_to_binary(&tm, ptr, dec);
54455444
}
54465445

5447-
bool Field_timestampf::set_max()
5446+
void Field_timestampf::set_max()
54485447
{
54495448
DBUG_ENTER("Field_timestampf::set_max");
54505449
ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED;
@@ -5453,7 +5452,7 @@ bool Field_timestampf::set_max()
54535452
mi_int4store(ptr, TIMESTAMP_MAX_VALUE);
54545453
memset(ptr + 4, 0x0, value_length() - 4);
54555454

5456-
DBUG_RETURN(FALSE);
5455+
DBUG_VOID_RETURN;
54575456
}
54585457

54595458
bool Field_timestampf::is_max()

sql/field.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -677,8 +677,8 @@ class Field: public Value_source
677677
/**
678678
Used by System Versioning.
679679
*/
680-
virtual bool set_max()
681-
{ DBUG_ASSERT(0); return false; }
680+
virtual void set_max()
681+
{ DBUG_ASSERT(0); }
682682
virtual bool is_max()
683683
{ DBUG_ASSERT(0); return false; }
684684

@@ -2129,7 +2129,7 @@ class Field_longlong :public Field_num {
21292129
return unpack_int64(to, from, from_end);
21302130
}
21312131

2132-
bool set_max();
2132+
void set_max();
21332133
bool is_max();
21342134
};
21352135

@@ -2540,7 +2540,7 @@ class Field_timestampf :public Field_timestamp_with_dec {
25402540
{
25412541
return memcmp(a_ptr, b_ptr, pack_length());
25422542
}
2543-
bool set_max();
2543+
void set_max();
25442544
bool is_max();
25452545
void store_TIME(my_time_t timestamp, ulong sec_part);
25462546
my_time_t get_timestamp(const uchar *pos= NULL, ulong *sec_part= NULL) const;

sql/table.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7602,8 +7602,7 @@ void TABLE::vers_update_fields()
76027602

76037603
if (vers_start_field()->set_time())
76047604
DBUG_ASSERT(0);
7605-
if (vers_end_field()->set_max())
7606-
DBUG_ASSERT(0);
7605+
vers_end_field()->set_max();
76077606

76087607
DBUG_VOID_RETURN;
76097608
}

0 commit comments

Comments
 (0)