** Return true if zSql is a complete SQL statement. Return false if it ** ends in the middle of a string literal or C-style comment. */
| 26424 | ** ends in the middle of a string literal or C-style comment. |
| 26425 | */ |
| 26426 | static int line_is_complete(char *zSql, int nSql){ |
| 26427 | int rc; |
| 26428 | if( zSql==0 ) return 1; |
| 26429 | zSql[nSql] = ';'; |
| 26430 | zSql[nSql+1] = 0; |
| 26431 | rc = sqlite3_complete(zSql); |
| 26432 | zSql[nSql] = 0; |
| 26433 | return rc; |
| 26434 | } |
| 26435 | |
| 26436 | /* |
| 26437 | ** Run a single line of SQL. Return the number of errors. |