diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2023-05-17 14:58:11 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2023-05-17 14:58:11 +0200 |
commit | 2543673dd22782f59299fd2e72179601892bd967 (patch) | |
tree | b73641bd88c9d1572203c75da618fce1937518e8 /storage/connect/value.cpp | |
parent | 4e5b771e980edfdad5c5414aa62c81d409d585a4 (diff) | |
parent | ef911553f442cbb1baaac2af44c38b54fd058c41 (diff) | |
download | mariadb-git-bb-11.1-release.tar.gz |
Merge branch '11.0' into 11.1bb-11.1-release
Diffstat (limited to 'storage/connect/value.cpp')
-rw-r--r-- | storage/connect/value.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/storage/connect/value.cpp b/storage/connect/value.cpp index 498ec71a87f..7265b2ed0ca 100644 --- a/storage/connect/value.cpp +++ b/storage/connect/value.cpp @@ -163,9 +163,9 @@ PCSZ GetTypeName(int type) /***********************************************************************/ /* GetTypeSize: returns the PlugDB internal type size. */ /***********************************************************************/ -int GetTypeSize(int type, int len) - { - switch (type) { +unsigned GetTypeSize(int type, unsigned len) +{ + switch (type) { case TYPE_DECIM: case TYPE_BIN: case TYPE_STRING: len = len * sizeof(char); break; @@ -176,7 +176,7 @@ int GetTypeSize(int type, int len) case TYPE_DOUBLE: len = sizeof(double); break; case TYPE_TINY: len = sizeof(char); break; case TYPE_PCHAR: len = sizeof(char*); break; - default: len = -1; + default: len = 0; } // endswitch type return len; |