mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 04:22:27 +01:00
MDEV-20591: Follow-up fix
calc_field_event_length(): For type=MYSQL_TYPE_BLOB and meta==0, return 0 instead of *ptr+1. This was noted by -Wimplicit-fallthrough.
This commit is contained in:
parent
896b869685
commit
f11d425a15
1 changed files with 7 additions and 5 deletions
|
@ -3423,16 +3423,18 @@ static size_t calc_field_event_length(const uchar *ptr, uint type, uint meta)
|
|||
case MYSQL_TYPE_SET:
|
||||
return meta & 0xFF;
|
||||
case MYSQL_TYPE_BLOB:
|
||||
if (meta > 4 )
|
||||
switch (meta) {
|
||||
default:
|
||||
return 0;
|
||||
if (meta == 1)
|
||||
case 1:
|
||||
return *ptr + 1;
|
||||
if (meta == 2)
|
||||
case 2:
|
||||
return uint2korr(ptr) + 2;
|
||||
if (meta == 3)
|
||||
case 3:
|
||||
return uint3korr(ptr) + 3;
|
||||
if (meta == 4)
|
||||
case 4:
|
||||
return uint4korr(ptr) + 4;
|
||||
}
|
||||
case MYSQL_TYPE_VARCHAR:
|
||||
case MYSQL_TYPE_VAR_STRING:
|
||||
length= meta;
|
||||
|
|
Loading…
Reference in a new issue