You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
feat(memory): custom OOM exception
This commit is contained in:
@ -53,7 +53,7 @@
|
||||
2012 ERR_EXTENT_DISK_SPACE Not able to add extent; adding extent would exceed max file system disk usage. %1%
|
||||
2013 ERR_NON_NUMERIC_DATA Not able to convert the input data; Data value %1% does not match data type.
|
||||
2014 ERR_JOBLIST Error in making/executing job steps in DML
|
||||
2015 ERR_ORDERBY_TOO_BIG Sorting length exceeded. Session variable max_length_for_sort_data needs to be set higher.
|
||||
2015 ERR_ORDERBY_TOO_BIG Memory limit is exceeded running ORDER BY.
|
||||
2016 ERR_NON_SUPPORT_GROUP_BY Non supported item %1% on the GROUP BY list.
|
||||
2017 ERR_IN_DELIVERY ExeMgr failed to deliver result set to connector.
|
||||
2018 ERR_LIMIT_TOO_BIG Not enough memory to process the LIMIT. Consider raising TotalUmMemory or reducing memory usage.
|
||||
@ -111,6 +111,7 @@
|
||||
2061 ERR_NOT_SUPPORTED_GROUPBY_ORDERBY_EXPRESSION %1% is not in GROUP BY clause, not a column or an expression that contains function.
|
||||
|
||||
2063 ERR_TNS_DISTINCT_IS_TOO_BIG DISTINCT memory limit is exceeded whilst running TNS step.
|
||||
2064 ERR_OUT_OF_MEMORY Out of memory.
|
||||
|
||||
# Sub-query errors
|
||||
3001 ERR_NON_SUPPORT_SUB_QUERY_TYPE This subquery type is not supported yet.
|
||||
|
48
utils/loggingcpp/outofmemoryexcept.h
Normal file
48
utils/loggingcpp/outofmemoryexcept.h
Normal file
@ -0,0 +1,48 @@
|
||||
/* Copyright (C) 2024 MariaDB Corporation
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; version 2 of
|
||||
the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
MA 02110-1301, USA. */
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <new>
|
||||
#include <string>
|
||||
#include <cstdint>
|
||||
#include "idberrorinfo.h"
|
||||
|
||||
namespace logging
|
||||
{
|
||||
|
||||
/** @brief Exception class for out of memory conditions with custom error message
|
||||
* Extends std::bad_alloc to provide IDB-specific error messages
|
||||
*/
|
||||
class OutOfMemoryExcept : public std::bad_alloc
|
||||
{
|
||||
public:
|
||||
explicit OutOfMemoryExcept(uint16_t code)
|
||||
: fMessage(IDBErrorInfo::instance()->errorMsg(code))
|
||||
{
|
||||
}
|
||||
|
||||
const char* what() const noexcept override
|
||||
{
|
||||
return fMessage.c_str();
|
||||
}
|
||||
|
||||
private:
|
||||
std::string fMessage;
|
||||
};
|
||||
|
||||
} // namespace logging
|
Reference in New Issue
Block a user