You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
MCOL-266 Support true/false DDL default values
This commit is contained in:
@ -29,6 +29,7 @@
|
||||
#include <string.h>
|
||||
using namespace std;
|
||||
#include <boost/algorithm/string/case_conv.hpp>
|
||||
#include <boost/algorithm/string.hpp>
|
||||
using namespace boost::algorithm;
|
||||
#include <boost/tokenizer.hpp>
|
||||
#include "calpontsystemcatalog.h"
|
||||
@ -138,6 +139,15 @@ int64_t number_int_value(const string& data,
|
||||
if (y != string::npos)
|
||||
throw QueryDataExcept("')' is not matched.", formatErr);
|
||||
|
||||
if (boost::iequals(valStr, "true"))
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
if (boost::iequals(valStr, "false"))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
// convert to fixed-point notation if input is in scientific notation
|
||||
if (valStr.find('E') < string::npos || valStr.find('e') < string::npos)
|
||||
{
|
||||
|
Reference in New Issue
Block a user