Hi,
MySQL Server version: 5.0.64-enterprise-log MySQL Enterprise Server
(Commercial)
MySQL ++ version: 2.0.7
Is Null type supported in SSQLS in this version? See below,
Sql_create_4(stock_subset, 1, 0,
mysqlpp::Null<string>, item)
I changed custom6.cpp (example pgm) from string to mysqlpp::Null<string> and
it started throwing lot of compile time errors. See below,
custom6.cpp: In function `int sql_compare_stock_subset(const stock_subset&,
const stock_subset&) [with mysqlpp::sql_dummy_type dummy = sql_dummy]':
custom6.cpp:45: instantiated from here
custom6.cpp:45: passing `const mysqlpp::Null<std::string,
mysqlpp::NullisNull>'
as `this' argument of `mysqlpp::Null<Type, Behavior>::operator Type&()
[with
Type = std::string, Behavior = mysqlpp::NullisNull]' discards qualifiers
custom6.cpp:45: instantiated from here
custom6.cpp:45: invalid conversion from `std::basic_string<char,
std::char_traits<char>, std::allocator<char> >' to `const std::string'
custom6.cpp:45: initializing argument 1 of `int mysqlpp::sql_cmp(const
std::string&, const std::string&)'
custom6.cpp:45: passing `const mysqlpp::Null<std::string,
mysqlpp::NullisNull>'
as `this' argument of `mysqlpp::Null<Type, Behavior>::operator Type&()
[with
Type = std::string, Behavior = mysqlpp::NullisNull]' discards qualifiers
custom6.cpp:45: instantiated from here
custom6.cpp:45: invalid conversion from `std::basic_string<char,
std::char_traits<char>, std::allocator<char> >' to `const std::string'
custom6.cpp:45: initializing argument 2 of `int mysqlpp::sql_cmp(const
std::string&, const std::string&)'
../lib/null.h: In member function `mysqlpp::Null<Type, Behavior>::operator
Type&() [with Type = std::string, Behavior = mysqlpp::NullisNull]':
custom6.cpp:45: instantiated from `int sql_compare_stock_subset(const
stock_subset&, const stock_subset&) [with mysqlpp::sql_dummy_type dummy =
sql_dummy]'
custom6.cpp:45: instantiated from here
../lib/null.h:206: ambiguous overload for `std::string& =
mysqlpp::null_type'
operator
/usr/include/c++/3.2.3/bits/basic_string.h:338: candidates are:
std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT,
_Traits, _Alloc>::operator=(const std::basic_string<_CharT, _Traits,
_Alloc>&) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc =
std::allocator<char>]
/usr/include/c++/3.2.3/bits/basic_string.h:341:
std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT,
_Traits, _Alloc>::operator=(const _CharT*) [with _CharT = char, _Traits =
std::char_traits<char>, _Alloc = std::allocator<char>]
/usr/include/c++/3.2.3/bits/basic_string.h:344:
std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT,
_Traits, _Alloc>::operator=(_CharT) [with _CharT = char, _Traits =
std::char_traits<char>, _Alloc = std::allocator<char>]
../lib/coldata.h: In member function `mysqlpp::ColData_Tmpl<Str>::operator
mysqlpp::Null<T, B>() const [with T = std::string, B =
mysqlpp::NullisNull,
Str = mysqlpp::const_string]':
custom6.cpp:45: instantiated from `void
populate_stock_subset(stock_subset*, const mysqlpp::Row&) [with
mysqlpp::sql_dummy_type dummy = sql_dummy]'
custom6.cpp:45: instantiated from here
../lib/coldata.h:299: ISO C++ says that `const char&
mysqlpp::const_string::operator[](unsigned int) const' and `operator[]'
are
ambiguous even though the worst conversion for the former is better than
the
worst conversion for the latter
../lib/coldata.h:299: ISO C++ says that `const char&
mysqlpp::const_string::operator[](unsigned int) const' and `operator[]'
are
ambiguous even though the worst conversion for the former is better than
the
worst conversion for the latter
../lib/coldata.h:299: ISO C++ says that `const char&
mysqlpp::const_string::operator[](unsigned int) const' and `operator[]'
are
ambiguous even though the worst conversion for the former is better than
the
worst conversion for the latter
../lib/coldata.h:299: ISO C++ says that `const char&
mysqlpp::const_string::operator[](unsigned int) const' and `operator[]'
are
ambiguous even though the worst conversion for the former is better than
the
worst conversion for the latter
../lib/coldata.h: In member function `Type
mysqlpp::ColData_Tmpl<Str>::conv(Type) const [with Type =
std::basic_string<char, std::char_traits<char>, std::allocator<char>
>,
Str
= mysqlpp::const_string]':
../lib/coldata.h:307: instantiated from
`mysqlpp::ColData_Tmpl<Str>::operator mysqlpp::Null<T, B>() const [with T =
std::string, B = mysqlpp::NullisNull, Str = mysqlpp::const_string]'
custom6.cpp:45: instantiated from `void
populate_stock_subset(stock_subset*, const mysqlpp::Row&) [with
mysqlpp::sql_dummy_type dummy = sql_dummy]'
custom6.cpp:45: instantiated from here
../lib/coldata.h:319: invalid use of undefined type `struct
mysqlpp::mysql_convert<std::basic_string<char, std::char_traits<char>,
std::allocator<char> > >'
../lib/convert.h:45: declaration of `struct
mysqlpp::mysql_convert<std::basic_string<char, std::char_traits<char>,
std::allocator<char> > >'
make: *** [custom6.o] Error 1
Is there any patches which can be applied to fix this problem?
Thanks,
Mani.