From 28efc7403de179a7737edee577fac25b1c2baeb9 Mon Sep 17 00:00:00 2001 From: Paul Guo Date: Sun, 9 Oct 2016 17:47:32 +0800 Subject: [PATCH] HAWQ-1092. lc_collate and lc_ctype do not work after setting through hawq init --- src/backend/access/transam/xlog.c | 2 ++ src/test/feature/README.md | 2 +- src/test/feature/catalog/ans/guc.ans | 12 ++++++++++++ src/test/feature/catalog/sql/guc.sql | 2 ++ 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index a0b3c82c5f..eeef04ec0d 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -5299,6 +5299,8 @@ XLOGShmemInit(void) void XLogStartupInit(void) { + if (!IsBootstrapProcessingMode()) + ReadControlFile(); } /* diff --git a/src/test/feature/README.md b/src/test/feature/README.md index 229c7c4789..2e27f97194 100644 --- a/src/test/feature/README.md +++ b/src/test/feature/README.md @@ -12,7 +12,7 @@ Also, you could enter the `$HAWQ_HOME/src/test/feature` folder to `make` and `ma Before building the code of feature tests part, just make sure your compiler supports C++11 and you have apache HAWQ successfully compiled. # Run -1. Make sure HAWQ is running correctly. If not, `init` or `start` HAWQ at first. +1. Make sure HAWQ is running correctly. If not, `init` or `start` HAWQ at first. Note please don't set locale related arguments for hawq init. 2. Load environment configuration by running `source $INSTALL_PREFIX/greenplum_path.sh`. 3. Load hdfs configuration. For example, `export HADOOP_HOME=/Users/wuhong/hadoop-2.7.2 && export PATH=${PATH}:${HADOOP_HOME}/bin`. Since some test cases need `hdfs` and `hadoop` command, just ensure these commands work before running. Otherwise you will get failure. 4. Run `./feature-test`, you could use `--gtest_filter` option to filter test cases(both positive and negative patterns are supported). Please see more options by running `./feature-test --help`. diff --git a/src/test/feature/catalog/ans/guc.ans b/src/test/feature/catalog/ans/guc.ans index 7c4595c6d5..117d3654ee 100644 --- a/src/test/feature/catalog/ans/guc.ans +++ b/src/test/feature/catalog/ans/guc.ans @@ -24,3 +24,15 @@ SELECT f1 FROM DATE_TBL; 09-04-1957 (1 row) +--- Partially test JIRA HAWQ-1092 lc_collate and lc_ctype do not work after setting through hawq init +SELECT name, setting from pg_settings where name like 'lc%' + name | setting +-------------+------------ + lc_collate | en_US.utf8 + lc_ctype | en_US.utf8 + lc_messages | en_US.utf8 + lc_monetary | en_US.utf8 + lc_numeric | en_US.utf8 + lc_time | en_US.utf8 +(6 rows) + diff --git a/src/test/feature/catalog/sql/guc.sql b/src/test/feature/catalog/sql/guc.sql index cf16538405..f22fb8ce62 100644 --- a/src/test/feature/catalog/sql/guc.sql +++ b/src/test/feature/catalog/sql/guc.sql @@ -9,3 +9,5 @@ SELECT f1 FROM DATE_TBL; SET DATESTYLE TO 'POSTGRES, DMY'; SELECT f1 FROM DATE_TBL; +--- Partially test JIRA HAWQ-1092 lc_collate and lc_ctype do not work after setting through hawq init +SELECT name, setting from pg_settings where name like 'lc%'