this is a more "clean" conversion to 64 bit than the type-fixups branch, which does borrow some elements from it but has far less find and replace...it is about 98-99% done, notes to follow later

This commit is contained in:
DarthArgus
2017-01-24 03:35:59 +00:00
parent 42b949c3dc
commit 36686348e9
458 changed files with 2282 additions and 2367 deletions
@@ -26,7 +26,7 @@ namespace DB
/**
* A nullable string class similar to DB::BindableString, but uses std::string
* internally. Unlike DB::BindableString, it does not allocate the maximum
* size for the buffer if the data is shorter. This class will save memory
* size for the buffer if the data is int16_ter. This class will save memory
* over DB::BindableString if used in a buffer that stores a lot of rows.
* However, it cannot be bound directly in a query. It must be copied
* to a varray or a DB::BindableString first.
@@ -222,7 +222,7 @@ namespace DB
else
{
//-- Justin Randall [4/11/2001 5:56:56 PM] --
// @todo : value is currently a char, should be an short or Unicode::String::value_type or wchar_t
// @todo : value is currently a char, should be an int16_t or Unicode::String::value_type or wchar_t
return Unicode::String(Unicode::narrowToWide(m_value));
}
}
@@ -184,7 +184,7 @@ namespace DB
return str;
//-- Justin Randall [4/11/2001 5:56:56 PM] --
// @todo : value is currently a char, should be an short or Unicode::String::value_type or wchar_t
// @todo : value is currently a char, should be an int16_t or Unicode::String::value_type or wchar_t
//return Unicode::String(Unicode::narrowToWide(m_value));
}
}
@@ -138,6 +138,7 @@ bool BindableVarrayNumber::push_back(int value)
// ----------------------------------------------------------------------
#if not __x86_64__
bool BindableVarrayNumber::push_back(long int value)
{
OCINumber buffer;
@@ -153,9 +154,10 @@ bool BindableVarrayNumber::push_back(long int value)
return true;
}
#endif
// ----------------------------------------------------------------------
bool BindableVarrayNumber::push_back(int64 value)
bool BindableVarrayNumber::push_back(int64_t value)
{
OCINumber buffer;
@@ -230,6 +232,7 @@ bool BindableVarrayNumber::push_back(bool IsNULL, int value)
// ----------------------------------------------------------------------
#if not __x86_64__
bool BindableVarrayNumber::push_back(bool IsNULL, long int value)
{
OCINumber buffer;
@@ -254,9 +257,11 @@ bool BindableVarrayNumber::push_back(bool IsNULL, long int value)
return true;
}
#endif
// ----------------------------------------------------------------------
bool BindableVarrayNumber::push_back(bool IsNULL, int64 value)
bool BindableVarrayNumber::push_back(bool IsNULL, int64_t value)
{
OCINumber buffer;
@@ -59,12 +59,18 @@ namespace DB
public:
bool push_back(bool IsNULL, int value);
bool push_back(bool IsNULL, double value);
#if not __x86_64__
bool push_back(bool IsNULL, long int value);
bool push_back(bool IsNULL, int64 value);
#endif
bool push_back(bool IsNULL, int64_t value);
bool push_back(int value);
bool push_back(double value);
#if not __x86_64__
bool push_back(long int value);
bool push_back(int64 value);
#endif
bool push_back(int64_t value);
virtual std::string outputValue() const;
};
@@ -127,7 +127,7 @@ void DB::OCIQueryImpl::preprocessBinds()
(*i)->indicator=-1;
else
{
(*i)->length=(unsigned short)*((*i)->owner->getIndicator()); //TODO: something better
(*i)->length=(uint16_t)*((*i)->owner->getIndicator()); //TODO: something better
(*i)->indicator=1;
if ((*i)->stringAdjust)
++(*i)->length; //TODO: This feels like a hack