From 14fa1aada281ba8888187047d6d47d8c80434108 Mon Sep 17 00:00:00 2001 From: Marla Potterveld <5854253+hallaroo@users.noreply.github.com> Date: Fri, 20 Aug 2021 11:33:13 -0600 Subject: [PATCH 1/2] Add files via upload Signed-off-by: hallaroo --- examples/local/vtexplain_atomicity_method1.sh | 3 +++ examples/local/vtexplain_atomicity_method2.sh | 3 +++ .../vtexplain_atomicity_method2_reads.sh | 3 +++ .../vtexplain_atomicity_method2_working.sh | 3 +++ examples/local/vtexplain_atomicity_method3.sh | 4 ++++ examples/local/vtexplain_atomicity_schema.sql | 5 +++++ .../local/vtexplain_atomicity_vschema.json | 20 +++++++++++++++++++ 7 files changed, 41 insertions(+) create mode 100644 examples/local/vtexplain_atomicity_method1.sh create mode 100644 examples/local/vtexplain_atomicity_method2.sh create mode 100644 examples/local/vtexplain_atomicity_method2_reads.sh create mode 100644 examples/local/vtexplain_atomicity_method2_working.sh create mode 100644 examples/local/vtexplain_atomicity_method3.sh create mode 100644 examples/local/vtexplain_atomicity_schema.sql create mode 100644 examples/local/vtexplain_atomicity_vschema.json diff --git a/examples/local/vtexplain_atomicity_method1.sh b/examples/local/vtexplain_atomicity_method1.sh new file mode 100644 index 00000000000..b946ec7434f --- /dev/null +++ b/examples/local/vtexplain_atomicity_method1.sh @@ -0,0 +1,3 @@ +#!/bin/bash +set -x +vtexplain -vschema-file vschema.json -schema-file schema.sql -shards 4 -sql 'INSERT /*vt+ MULTI_SHARD_AUTOCOMMIT=1 */ INTO t1 (c1) values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),(13),(14),(15),(16),(17),(18),(19),(20);' diff --git a/examples/local/vtexplain_atomicity_method2.sh b/examples/local/vtexplain_atomicity_method2.sh new file mode 100644 index 00000000000..33a09cbfbee --- /dev/null +++ b/examples/local/vtexplain_atomicity_method2.sh @@ -0,0 +1,3 @@ +#!/bin/bash +set -x +vtexplain -vschema-file vschema.json -schema-file schema.sql -shards 4 -sql 'SET transaction_mode="single"; INSERT INTO t1 (c1) values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),(13),(14),(15),(16),(17),(18),(19),(20);' diff --git a/examples/local/vtexplain_atomicity_method2_reads.sh b/examples/local/vtexplain_atomicity_method2_reads.sh new file mode 100644 index 00000000000..f32732ccfc5 --- /dev/null +++ b/examples/local/vtexplain_atomicity_method2_reads.sh @@ -0,0 +1,3 @@ +#!/bin/bash +set -x +vtexplain -vschema-file vschema.json -schema-file schema.sql -shards 4 -sql 'SET transaction_mode="single"; BEGIN; SELECT * from t1; COMMIT;' diff --git a/examples/local/vtexplain_atomicity_method2_working.sh b/examples/local/vtexplain_atomicity_method2_working.sh new file mode 100644 index 00000000000..f9c84e87a72 --- /dev/null +++ b/examples/local/vtexplain_atomicity_method2_working.sh @@ -0,0 +1,3 @@ +#!/bin/bash +set -x +vtexplain -vschema-file vschema.json -schema-file schema.sql -shards 4 -sql 'SET transaction_mode="single"; INSERT INTO t1 (c1) values (10),(14),(15),(16);' diff --git a/examples/local/vtexplain_atomicity_method3.sh b/examples/local/vtexplain_atomicity_method3.sh new file mode 100644 index 00000000000..772bae21460 --- /dev/null +++ b/examples/local/vtexplain_atomicity_method3.sh @@ -0,0 +1,4 @@ +#!/bin/bash +set -x +# SET transaction_mode="multi" is implied by default +vtexplain -vschema-file vschema.json -schema-file schema.sql -shards 4 -sql 'INSERT INTO t1 (c1) values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),(13),(14),(15),(16),(17),(18),(19),(20);' diff --git a/examples/local/vtexplain_atomicity_schema.sql b/examples/local/vtexplain_atomicity_schema.sql new file mode 100644 index 00000000000..1bfc40eae4b --- /dev/null +++ b/examples/local/vtexplain_atomicity_schema.sql @@ -0,0 +1,5 @@ +CREATE TABLE `t1` ( + `c1` bigint unsigned NOT NULL, + PRIMARY KEY (`c1`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + diff --git a/examples/local/vtexplain_atomicity_vschema.json b/examples/local/vtexplain_atomicity_vschema.json new file mode 100644 index 00000000000..f6f869d758f --- /dev/null +++ b/examples/local/vtexplain_atomicity_vschema.json @@ -0,0 +1,20 @@ +{ + "ks1": { + "sharded": true, + "vindexes": { + "xxhash": { + "type": "xxhash" + } + }, + "tables": { + "t1": { + "columnVindexes": [ + { + "column": "c1", + "name": "xxhash" + } + ] + } + } + } +} From c868fabc0ea86cb7301c2b939fa7364473192b81 Mon Sep 17 00:00:00 2001 From: hallaroo Date: Fri, 20 Aug 2021 13:19:13 -0600 Subject: [PATCH 2/2] moving files Signed-off-by: hallaroo --- .../atomicity_method1.sh} | 0 .../atomicity_method2.sh} | 0 .../atomicity_method2_reads.sh} | 0 .../atomicity_method2_working.sh} | 0 .../atomicity_method3.sh} | 0 .../atomicity_schema.sql} | 0 .../atomicity_vschema.json} | 0 7 files changed, 0 insertions(+), 0 deletions(-) rename examples/local/{vtexplain_atomicity_method1.sh => vtexplain/atomicity_method1.sh} (100%) rename examples/local/{vtexplain_atomicity_method2.sh => vtexplain/atomicity_method2.sh} (100%) rename examples/local/{vtexplain_atomicity_method2_reads.sh => vtexplain/atomicity_method2_reads.sh} (100%) rename examples/local/{vtexplain_atomicity_method2_working.sh => vtexplain/atomicity_method2_working.sh} (100%) rename examples/local/{vtexplain_atomicity_method3.sh => vtexplain/atomicity_method3.sh} (100%) rename examples/local/{vtexplain_atomicity_schema.sql => vtexplain/atomicity_schema.sql} (100%) rename examples/local/{vtexplain_atomicity_vschema.json => vtexplain/atomicity_vschema.json} (100%) diff --git a/examples/local/vtexplain_atomicity_method1.sh b/examples/local/vtexplain/atomicity_method1.sh similarity index 100% rename from examples/local/vtexplain_atomicity_method1.sh rename to examples/local/vtexplain/atomicity_method1.sh diff --git a/examples/local/vtexplain_atomicity_method2.sh b/examples/local/vtexplain/atomicity_method2.sh similarity index 100% rename from examples/local/vtexplain_atomicity_method2.sh rename to examples/local/vtexplain/atomicity_method2.sh diff --git a/examples/local/vtexplain_atomicity_method2_reads.sh b/examples/local/vtexplain/atomicity_method2_reads.sh similarity index 100% rename from examples/local/vtexplain_atomicity_method2_reads.sh rename to examples/local/vtexplain/atomicity_method2_reads.sh diff --git a/examples/local/vtexplain_atomicity_method2_working.sh b/examples/local/vtexplain/atomicity_method2_working.sh similarity index 100% rename from examples/local/vtexplain_atomicity_method2_working.sh rename to examples/local/vtexplain/atomicity_method2_working.sh diff --git a/examples/local/vtexplain_atomicity_method3.sh b/examples/local/vtexplain/atomicity_method3.sh similarity index 100% rename from examples/local/vtexplain_atomicity_method3.sh rename to examples/local/vtexplain/atomicity_method3.sh diff --git a/examples/local/vtexplain_atomicity_schema.sql b/examples/local/vtexplain/atomicity_schema.sql similarity index 100% rename from examples/local/vtexplain_atomicity_schema.sql rename to examples/local/vtexplain/atomicity_schema.sql diff --git a/examples/local/vtexplain_atomicity_vschema.json b/examples/local/vtexplain/atomicity_vschema.json similarity index 100% rename from examples/local/vtexplain_atomicity_vschema.json rename to examples/local/vtexplain/atomicity_vschema.json