Fix bad annotation causing parser to hang
This commit is contained in:
		@ -1181,7 +1181,7 @@ int64_t ObFastParserBase::is_hint_begin(int64_t pos)
 | 
				
			|||||||
    ch = raw_sql_.char_at(pos);
 | 
					    ch = raw_sql_.char_at(pos);
 | 
				
			||||||
    next_ch = raw_sql_.char_at(++pos);
 | 
					    next_ch = raw_sql_.char_at(++pos);
 | 
				
			||||||
    // check and ignore comment
 | 
					    // check and ignore comment
 | 
				
			||||||
    while (ch != '*' && next_ch != '/' && !raw_sql_.is_search_end()) {
 | 
					    while (ch != '*' && next_ch != '/' && !raw_sql_.is_search_end(pos)) {
 | 
				
			||||||
      ch = raw_sql_.char_at(pos);
 | 
					      ch = raw_sql_.char_at(pos);
 | 
				
			||||||
      next_ch = raw_sql_.char_at(++pos);
 | 
					      next_ch = raw_sql_.char_at(++pos);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
				
			|||||||
@ -87,6 +87,10 @@ struct ObRawSql {
 | 
				
			|||||||
	{
 | 
						{
 | 
				
			||||||
		return search_end_ || cur_pos_ > raw_sql_len_ - 1;
 | 
							return search_end_ || cur_pos_ > raw_sql_len_ - 1;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
						inline bool is_search_end(const int64_t pos)
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							return search_end_ || pos > raw_sql_len_ - 1;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
	inline char peek()
 | 
						inline char peek()
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		if (cur_pos_ >= raw_sql_len_ - 1) {
 | 
							if (cur_pos_ >= raw_sql_len_ - 1) {
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user