summaryrefslogtreecommitdiffstats
path: root/storage/maria/test_aria_s3_copy.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:07:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:07:14 +0000
commita175314c3e5827eb193872241446f2f8f5c9d33c (patch)
treecd3d60ca99ae00829c52a6ca79150a5b6e62528b /storage/maria/test_aria_s3_copy.sh
parentInitial commit. (diff)
downloadmariadb-10.5-a175314c3e5827eb193872241446f2f8f5c9d33c.tar.xz
mariadb-10.5-a175314c3e5827eb193872241446f2f8f5c9d33c.zip
Adding upstream version 1:10.5.12.upstream/1%10.5.12upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'storage/maria/test_aria_s3_copy.sh')
-rwxr-xr-xstorage/maria/test_aria_s3_copy.sh56
1 files changed, 56 insertions, 0 deletions
diff --git a/storage/maria/test_aria_s3_copy.sh b/storage/maria/test_aria_s3_copy.sh
new file mode 100755
index 00000000..ad39df69
--- /dev/null
+++ b/storage/maria/test_aria_s3_copy.sh
@@ -0,0 +1,56 @@
+#!/bin/bash
+
+#
+# Note that this test expact that there are tables test1 and test2 in
+# the current directory where test2 has also a .frm file
+#
+
+TMPDIR=tmpdir
+LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib64/
+
+my_cmp()
+{
+ if ! cmp $1 $TMPDIR/$1
+ then
+ echo "aborting"
+ exit 1;
+ fi
+}
+
+run_test()
+{
+ OPT=$1;
+ echo "******* Running test with options '$OPT' **********"
+ rm -rf $TMPDIR
+ mkdir $TMPDIR
+ cp test?.* $TMPDIR
+ if ! ./aria_s3_copy --op=to --force $OPT test1 test2
+ then
+ echo Got error $?
+ exit 1;
+ fi
+ rm test?.*
+ if ! ./aria_s3_copy --op=from $OPT test1 test2
+ then
+ echo Got error $?
+ exit 1;
+ fi
+ if ! ./aria_s3_copy --op=delete $OPT test1 test2
+ then
+ echo Got error $?
+ exit 1;
+ fi
+ my_cmp test1.MAI
+ my_cmp test1.MAD
+ my_cmp test2.MAI
+ my_cmp test2.MAD
+ my_cmp test2.frm
+ rm test?.*
+ cp $TMPDIR/* .
+ rm -r $TMPDIR
+}
+
+run_test ""
+run_test "--s3_block_size=64K --compress"
+run_test "--s3_block_size=4M"
+echo "ok"