[Tarantool-patches] [PATCH] sql: forbid data changes in read-only mode

Nikita Pettik korablev at tarantool.org
Tue Nov 17 00:09:31 MSK 2020


On 16 Nov 23:36, Sergey Ostanevich wrote:
> diff --git a/test/sql-tap/gh-5231-box-execute-writes-in-ro.test.lua b/test/sql-tap/gh-5231-box-execute-writes-in-ro.test.lua
> new file mode 100755
> index 000000000..6d95adc2e
> --- /dev/null
> +++ b/test/sql-tap/gh-5231-box-execute-writes-in-ro.test.lua
> @@ -0,0 +1,105 @@
> +#!/usr/bin/env tarantool
> +
> +test = require("sqltester")
> +test:plan(9)
> +
> +local expected_err = "Can't modify data because this instance is in read-only mode."
> +
> +test:execsql([[
> +    CREATE TABLE TEST (A INT, B INT, PRIMARY KEY (A));
> +    INSERT INTO TEST (A, B) VALUES (3, 3);
> +]])
> +
> +box.cfg{read_only = true}
> +
> +test:do_catchsql_test(
> +    "sql-errors-1.1",
> +    [[
> +        INSERT INTO TEST (A, B) VALUES (1, 1);
> +    ]], {
> +        -- <sql-errors-1.1>

These comments are artifacts from porting SQLite test suite with
auto-tools, they are not really needed in new tests :)



More information about the Tarantool-patches mailing list