Fixed handling of errors after columns are determined

This commit is contained in:
Alexey Romanov
2012-04-19 16:40:16 +04:00
parent 95182366dd
commit a1e3fbc4b0
4 changed files with 49 additions and 26 deletions

View File

@@ -49,7 +49,8 @@ all_test_() ->
?FuncTest(nonexistent_table_info),
?FuncTest(large_number),
?FuncTest(unicode),
?FuncTest(acc_string_encoding)]}.
?FuncTest(acc_string_encoding),
?FuncTest(large_offset)]}.
open_db() ->
sqlite3:open(ct, [in_memory]).
@@ -295,6 +296,13 @@ script_test() ->
sqlite3:sql_exec_script(script, BadScript)),
sqlite3:close(script).
large_offset() ->
drop_table_if_exists(ct, large_offset),
ok = sqlite3:create_table(ct, large_offset, [{id, integer}]),
?assertEqual(
[{columns, ["id"]}, {rows, []}, {error, 20, "datatype mismatch"}],
sqlite3:sql_exec(ct, "select * from large_offset limit 1 offset 9223372036854775808")).
% create, read, update, delete
%%====================================================================
%% Internal functions