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