summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
authorJoseph Fernandes <josferna@redhat.com>2015-07-08 14:35:45 +0530
committerDan Lambright <dlambrig@redhat.com>2015-07-18 06:46:05 -0700
commitfa6509014ffd0c0b920e8623c4d0a72e3bf16fb3 (patch)
tree37c225fbcb62bc472cdfb83176a863edce99b9b5 /libglusterfs
parent85a7ad784e92f4b0bedb44f7e64bf4e9adfae5ce (diff)
libgfdb/sql: Fixing broken query of find_unchanged
The find_unchanged query should be "write_heat <= defined_heat" AND "read_heat <= defined_heat" and not "write_heat <= defined_heat" OR "read_heat <= defined_heat" >>Backport of http://review.gluster.org/#/c/11577/ >>Change-Id: Ie82e02aafbb7ea14563007307de3350ea022049a >>BUG: 1240970 >>Signed-off-by: Joseph Fernandes <josferna@redhat.com> Change-Id: Ie5d06fa2e3a3552741d2e6bd76807a69808c3d65 BUG: 1241776 Signed-off-by: Joseph Fernandes <josferna@redhat.com> Reviewed-on: http://review.gluster.org/11608 Reviewed-by: Dan Lambright <dlambrig@redhat.com> Reviewed-by: Pamela Ousley <pousley@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: Dan Lambright <dlambrig@redhat.com>
Diffstat (limited to 'libglusterfs')
-rw-r--r--libglusterfs/src/gfdb/gfdb_sqlite3.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libglusterfs/src/gfdb/gfdb_sqlite3.c b/libglusterfs/src/gfdb/gfdb_sqlite3.c
index 94553fba70d..349ff60f541 100644
--- a/libglusterfs/src/gfdb/gfdb_sqlite3.c
+++ b/libglusterfs/src/gfdb/gfdb_sqlite3.c
@@ -763,7 +763,7 @@ gf_sqlite3_find_unchanged_for_time (void *db_conn,
/*First condition: For writes*/
"((" GF_COL_TB_WSEC " * " TOSTRING(GFDB_MICROSEC) " + "
GF_COL_TB_WMSEC ") <= ? )"
- " OR "
+ " AND "
/*Second condition: For reads*/
"((" GF_COL_TB_RWSEC " * " TOSTRING(GFDB_MICROSEC) " + "
GF_COL_TB_RWMSEC ") <= ?)";
@@ -996,7 +996,7 @@ gf_sqlite3_find_unchanged_for_time_freq (void *db_conn,
"( (" GF_COL_TB_WFC " < ? ) AND"
"((" GF_COL_TB_WSEC " * " TOSTRING(GFDB_MICROSEC) " + "
GF_COL_TB_WMSEC ") >= ? ) ) )"
- " OR "
+ " AND "
/*Second condition: For Reads
* Files that have read wind time smaller than for_time
* OR