[FEAT MERGE] OB Support XMLType

Co-authored-by: simonjoylet <simonjoylet@gmail.com>
This commit is contained in:
obdev
2023-04-28 03:45:10 +00:00
committed by ob-robot
parent 58bb3d34b7
commit 17abf2818a
405 changed files with 18839 additions and 1573 deletions

View File

@ -10,18 +10,20 @@
* See the Mulan PubL v2 for more details.
*/
// DO NOT EDIT. This file is automatically generated from `ob_errno.def'.
#include "os_errno.h"
#include <string.h>
#include <cstdio>
using namespace oceanbase::common;
static const char* OS_ERRNO_NAME[OS_MAX_ERROR_CODE];
static const char* OS_ERRNO_MSG[OS_MAX_ERROR_CODE];
static const char *OS_ERRNO_NAME[OS_MAX_ERROR_CODE];
static const char *OS_ERRNO_MSG[OS_MAX_ERROR_CODE];
static int OS_ERRNO[OS_MAX_ERROR_CODE];
static struct OSStrErrorInit {
OSStrErrorInit()
{
static struct OSStrErrorInit
{
OSStrErrorInit() {
memset(OS_ERRNO_NAME, 0, sizeof(OS_ERRNO_NAME));
memset(OS_ERRNO_MSG, 0, sizeof(OS_ERRNO_MSG));
memset(OS_ERRNO, 0, sizeof(OS_ERRNO));
@ -419,32 +421,35 @@ static struct OSStrErrorInit {
OS_ERRNO_NAME[-OS_EHWPOISON] = "OS_EHWPOISON";
OS_ERRNO_MSG[-OS_EHWPOISON] = "Memory page has hardware error";
OS_ERRNO[-OS_EHWPOISON] = 133;
}
} local_init;
namespace oceanbase {
namespace common {
const char* str_os_error_name(const int err)
const char *str_os_error_name(const int err)
{
const char* ret = "Unknown error";
const char *ret = "Unknown error";
if (0 == err) {
ret = "OB_SUCCESS";
} else if (0 > err && err > -OS_MAX_ERROR_CODE) {
ret = OS_ERRNO_NAME[-err];
if (NULL == ret || '\0' == ret[0]) {
if (NULL == ret || '\0' == ret[0])
{
ret = "Unknown Error";
}
}
return ret;
}
const char* str_os_error_msg(const int err)
const char *str_os_error_msg(const int err)
{
const char* ret = NULL;
const char *ret = NULL;
if (0 == err) {
ret = NULL;
} else if (0 > err && err > -OS_MAX_ERROR_CODE) {
ret = OS_ERRNO_MSG[-err];
if (NULL == ret || '\0' == ret[0]) {
if (NULL == ret || '\0' == ret[0])
{
ret = NULL;
}
}
@ -458,5 +463,5 @@ int os_errno(const int err)
}
return ret;
}
} // end namespace common
} // end namespace oceanbase
} // end namespace common
} // end namespace oceanbase

View File

@ -10,6 +10,7 @@
* See the Mulan PubL v2 for more details.
*/
// DO NOT EDIT. This file is automatically generated from `ob_errno.def'.
#ifndef OBERROR_OS_ERRNO_H
#define OBERROR_OS_ERRNO_H
@ -158,7 +159,7 @@ constexpr int OS_EHWPOISON = -133;
const char* str_os_error_name(const int err);
const char* str_os_error_msg(const int err);
int os_errno(const int err);
} // end namespace common
} // end namespace oceanbase
} // end namespace common
} // end namespace oceanbase
#endif /* OBERROR_OS_ERRNO_H */