Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.1(EOL)
-
None
Description
class Item_master_gtid_wait :public Item_int_func |
{
|
longlong val_int();
|
void fix_length_and_dec() { max_length=10+1+10+1+20+1; maybe_null=0;} |
};
|
|
longlong Item_master_gtid_wait::val_int()
|
{
|
if (args[0]->null_value) |
{
|
null_value= 1;
|
return 0; |
}
|
String *gtid_pos = args[0]->val_str(&value);
|
}
|
Few issues here:
- weird max_length for a integer function that can only ever return -1, 0, 1
- it promises maybe_null=0 and returns NULL
- it checks args[0]->null_value before args[0]->val_str()
Attachments
Activity
Field | Original Value | New Value |
---|---|---|
Description |
{code:c++}
class Item_master_gtid_wait :public Item_int_func { longlong val_int(); void fix_length_and_dec() { max_length=10+1+10+1+20+1; maybe_null=0;} }; longlong Item_master_gtid_wait::val_int() { if (args[0]->null_value) { null_value= 1; return 0; } String *gtid_pos = args[0]->val_str(&value); } {code} Few issues here: * weird {{max_length}} for a integer function that can only ever return -1, 0, 1 * it promises {{maybe_null=0}} and returns NULL * it checks {{args[0]->null_value}} before {{args[0]->val_str()}} |
{code:c++}
class Item_master_gtid_wait :public Item_int_func { longlong val_int(); void fix_length_and_dec() { max_length=10+1+10+1+20+1; maybe_null=0;} }; longlong Item_master_gtid_wait::val_int() { if (args[0]->null_value) { null_value= 1; return 0; } String *gtid_pos = args[0]->val_str(&value); } {code} Few issues here: * weird {{max_length}} for a integer function that can only ever return -1, 0, 1 * it promises {{maybe_null=0}} and returns NULL * it checks {{args\[0]\->null_value}} before {{args\[0]->val_str()}} |
Status | Open [ 1 ] | In Progress [ 3 ] |
Status | In Progress [ 3 ] | Stalled [ 10000 ] |
Fix Version/s | 10.1.24 [ 22541 ] | |
Fix Version/s | 10.2.7 [ 22543 ] | |
Fix Version/s | 10.1 [ 16100 ] | |
Resolution | Fixed [ 1 ] | |
Status | Stalled [ 10000 ] | Closed [ 6 ] |
Workflow | MariaDB v3 [ 80850 ] | MariaDB v4 [ 152176 ] |