--- misc/mysql_splitter/splitter.cpp 2011/04/10 20:37:28 1282 +++ misc/mysql_splitter/splitter.cpp 2011/04/11 05:14:37 1284 @@ -15,17 +15,39 @@ const int BUFSIZE = 1024*1024; -string getLastWord(string input) { +string remove_comments(string in) { + bool isComment = false; + ostringstream out; + for (int i=0; i words; words = boost::split(words, input, boost::is_any_of(" ") ); string last = words.back(); - - boost::erase_all(last, ";"); boost::trim(last); - - return last; } @@ -93,7 +115,7 @@ } boost::trim(line); - string dbname = getLastWord(line); + string dbname = get_db_name(line); cout << ">" << dbname << endl;