Re: [Maria-developers] [Commits] 9f3eab9: MDEV-7780 - Support for faking server version
Hi, Sergey! On Nov 26, Sergey Vojtovich wrote:
revision-id: 9f3eab98b93ae289c8c7fba6b4781ca632ec3c1d (mariadb-10.1.8-80-g9f3eab9) parent(s): 3e69db83a792e7de8a7e7dc501a75f9f22bb6196 committer: Sergey Vojtovich timestamp: 2015-11-26 13:23:18 +0400 message:
MDEV-7780 - Support for faking server version
Added --version=str (optional argument sets server version string).
diff --git a/mysql-test/suite/sys_vars/t/version.test b/mysql-test/suite/sys_vars/t/version.test new file mode 100644 index 0000000..08eae97 --- /dev/null +++ b/mysql-test/suite/sys_vars/t/version.test @@ -0,0 +1,2 @@ +SELECT @@version; +--exec $MYSQL -e "status" | perl -ne "print \$_ if /^Server version/"
Is that portable enough? Do we have other tests that do that? Normally for perl you should use 'perl' command of mysqltest. Like perl; print grep /Server version/, `$ENV{MYSQL} -e status` EOF Regards, Sergei
Hi Sergei, we have 2 "exec perl" and many pipes. Not much, so I can change as you suggest. Thanks, Sergey On Thu, Nov 26, 2015 at 10:32:52AM +0100, Sergei Golubchik wrote:
Hi, Sergey!
On Nov 26, Sergey Vojtovich wrote:
revision-id: 9f3eab98b93ae289c8c7fba6b4781ca632ec3c1d (mariadb-10.1.8-80-g9f3eab9) parent(s): 3e69db83a792e7de8a7e7dc501a75f9f22bb6196 committer: Sergey Vojtovich timestamp: 2015-11-26 13:23:18 +0400 message:
MDEV-7780 - Support for faking server version
Added --version=str (optional argument sets server version string).
diff --git a/mysql-test/suite/sys_vars/t/version.test b/mysql-test/suite/sys_vars/t/version.test new file mode 100644 index 0000000..08eae97 --- /dev/null +++ b/mysql-test/suite/sys_vars/t/version.test @@ -0,0 +1,2 @@ +SELECT @@version; +--exec $MYSQL -e "status" | perl -ne "print \$_ if /^Server version/"
Is that portable enough? Do we have other tests that do that? Normally for perl you should use 'perl' command of mysqltest. Like
perl; print grep /Server version/, `$ENV{MYSQL} -e status` EOF
Regards, Sergei
participants (2)
-
Sergei Golubchik
-
Sergey Vojtovich