get start_pos out of while loop

This commit is contained in:
v-kaywon 2017-05-12 16:02:34 -07:00
parent 9e3252d4f4
commit 8de9669b39

View file

@ -415,8 +415,9 @@ void conn_string_parser:: parse_conn_string( TSRMLS_D )
// Primary function which parses out the named placeholders from a sql string. // Primary function which parses out the named placeholders from a sql string.
void sql_string_parser::parse_sql_string( TSRMLS_D ) { void sql_string_parser::parse_sql_string( TSRMLS_D ) {
try { try {
int start_pos = -1;
while ( !this->is_eos() ) { while ( !this->is_eos() ) {
int start_pos = -1; // if pos is -1, then reading from a string is an initialized read
if ( pos == -1 ) { if ( pos == -1 ) {
next(); next();
} }