From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp31.i.mail.ru (smtp31.i.mail.ru [94.100.177.91]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 44A13469719 for ; Tue, 17 Nov 2020 00:09:32 +0300 (MSK) Date: Mon, 16 Nov 2020 21:09:31 +0000 From: Nikita Pettik Message-ID: <20201116210931.GB13996@tarantool.org> References: <20201110112913.28083-1-sergos@tarantool.org> <20201116103129.GA324907@tarantool.org> <05C5398B-E522-4855-AA34-FB9B41606098@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <05C5398B-E522-4855-AA34-FB9B41606098@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH] sql: forbid data changes in read-only mode List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Sergey Ostanevich Cc: tarantool-patches@dev.tarantool.org 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); > + ]], { > + -- These comments are artifacts from porting SQLite test suite with auto-tools, they are not really needed in new tests :)