@@ -449,11 +449,13 @@ xmysqlnd_session_data::quote_name(const util::string_view& name)
449
449
util::string ret;
450
450
if (!name.empty ()) {
451
451
ret = ' `' ;
452
- boost::replace_all_copy (
453
- std::back_inserter (ret),
454
- name,
455
- " `" ,
456
- " ``" );
452
+ for ( const auto & elem : name ) {
453
+ if ( elem == ' `' ) {
454
+ ret += " ``" ;
455
+ } else {
456
+ ret += elem;
457
+ }
458
+ }
457
459
ret += ' `' ;
458
460
}
459
461
DBG_RETURN (ret);
@@ -2374,17 +2376,17 @@ xmysqlnd_session::get_server_version()
2374
2376
return 0 ;
2375
2377
}
2376
2378
2377
- std ::vector<std ::string> server_version_fragments;
2378
- const char * Version_separator{ " . " };
2379
- boost::split (server_version_fragments, server_version_string, boost::is_any_of (Version_separator) );
2379
+ util ::vector<util ::string> server_version_fragments;
2380
+ util::string version_string{ server_version_string };
2381
+ mysqlx::util::single_separator_split (server_version_fragments, version_string, ' . ' );
2380
2382
2381
2383
if (server_version_fragments.size () != 3 ) {
2382
2384
return 0 ;
2383
2385
}
2384
2386
2385
- zend_long major{ std::stol (server_version_fragments[0 ])};
2386
- zend_long minor{ std::stol (server_version_fragments[1 ])};
2387
- zend_long patch{ std::stol (server_version_fragments[2 ])};
2387
+ zend_long major{ std::stol (server_version_fragments[0 ]. c_str () )};
2388
+ zend_long minor{ std::stol (server_version_fragments[1 ]. c_str () )};
2389
+ zend_long patch{ std::stol (server_version_fragments[2 ]. c_str () )};
2388
2390
2389
2391
DBG_RETURN ( (zend_ulong)(major * Z_L (10000 ) + (zend_ulong)(minor * Z_L (100 ) + patch)) );
2390
2392
}
@@ -3095,22 +3097,26 @@ util::std_strings Extract_client_option::parse_single_or_array(const std::string
3095
3097
]&...
3096
3098
*/
3097
3099
assert (!value.empty ());
3098
- util::std_strings items;
3099
- if ((value.front () == ' [' ) && (value.back () == ' ]' )) {
3100
- const std::string contents (value.begin () + 1 , value.end () - 1 );
3100
+ util::string val{ value.c_str () };
3101
+ util::strings items;
3102
+ if ((val.front () == ' [' ) && (val.back () == ' ]' )) {
3103
+ const util::string contents (val.begin () + 1 , val.end () - 1 );
3101
3104
if (!contents.empty ()) {
3102
- const char * Items_separator{ " ," };
3103
- boost::split (items, contents, boost::is_any_of (Items_separator));
3105
+ mysqlx::util::single_separator_split (items, contents, ' ,' );
3104
3106
}
3105
3107
} else {
3106
- items.push_back (value );
3108
+ items.push_back (val );
3107
3109
}
3110
+ util::std_strings result;
3108
3111
std::for_each (
3109
3112
items.begin (),
3110
3113
items.end (),
3111
- [](std::string& str){ boost::trim<std::string>(str); }
3114
+ [&result](util::string& str){
3115
+ boost::trim<util::string>(str);
3116
+ result.push_back ( str.c_str () );
3117
+ }
3112
3118
);
3113
- return items ;
3119
+ return result ;
3114
3120
}
3115
3121
3116
3122
bool Extract_client_option::parse_boolean (const std::string& value_str) const
@@ -4170,7 +4176,8 @@ Session_auth_data* extract_auth_information(const util::Url& node_url)
4170
4176
*/
4171
4177
const util::string& query{ node_url.query };
4172
4178
util::vector<util::string> auth_data;
4173
- boost::split (auth_data, query, boost::is_any_of (" &" ));
4179
+
4180
+ mysqlx::util::single_separator_split (auth_data, query, ' &' );
4174
4181
4175
4182
for (const auto & auth_option : auth_data) {
4176
4183
if (auth_option.empty ()) {
@@ -4606,9 +4613,9 @@ parse_attribute( const util::string& attribute )
4606
4613
static const size_t max_attrib_key_size{ 32 };
4607
4614
static const size_t max_attrib_val_size{ 1024 };
4608
4615
util::vector<util::string> key_value;
4609
- boost::split ( key_value,
4616
+ mysqlx::util::single_separator_split ( key_value,
4610
4617
attribute,
4611
- boost::is_any_of ( " = " ) );
4618
+ ' = ' );
4612
4619
if ( key_value.empty () ) {
4613
4620
return { " " , " " };
4614
4621
}
@@ -4648,9 +4655,9 @@ enum_func_status parse_conn_attrib(
4648
4655
if ( is_a_list ) {
4649
4656
if ( user_attribs.size () ) {
4650
4657
util::vector<util::string> attributes;
4651
- boost::split ( attributes,
4658
+ mysqlx::util::single_separator_split ( attributes,
4652
4659
user_attribs,
4653
- boost::is_any_of ( " , " ) );
4660
+ ' , ' );
4654
4661
for ( const auto & cur_attrib : attributes ) {
4655
4662
if ( !cur_attrib.empty () ) {
4656
4663
auto result = parse_attribute ( cur_attrib );
0 commit comments