summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
authorJoseph Fernandes <josferna@redhat.com>2015-07-08 14:35:45 +0530
committerVijay Bellur <vbellur@redhat.com>2015-07-10 07:02:19 -0700
commit79106a754d4804074e5c5c6bfe1c388f7d314535 (patch)
tree97b7b9cc6c3b523fa79a2c5e4c33ada547f4f8ed /libglusterfs
parent3524a03a5e264087e33a17ed46425674d58777fc (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" Change-Id: Ie82e02aafbb7ea14563007307de3350ea022049a BUG: 1240970 Signed-off-by: Joseph Fernandes <josferna@redhat.com> Reviewed-on: http://review.gluster.org/11577 Reviewed-by: Dan Lambright <dlambrig@redhat.com> Reviewed-by: mohammed rafi kc <rkavunga@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Joseph Fernandes Tested-by: Dan Lambright <dlambrig@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.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