|
|
cb8e9e |
From 7bf79190a0e43e91ce96d0b0726afd590967f9cd Mon Sep 17 00:00:00 2001
|
|
|
cb8e9e |
From: Joseph Fernandes <josferna@redhat.com>
|
|
|
cb8e9e |
Date: Wed, 8 Jul 2015 14:35:45 +0530
|
|
|
cb8e9e |
Subject: [PATCH 227/234] libgfdb/sql: Fixing broken query of find_unchanged
|
|
|
cb8e9e |
|
|
|
cb8e9e |
The find_unchanged query should be
|
|
|
cb8e9e |
|
|
|
cb8e9e |
"write_heat <= defined_heat" AND "read_heat <= defined_heat"
|
|
|
cb8e9e |
and not
|
|
|
cb8e9e |
"write_heat <= defined_heat" OR "read_heat <= defined_heat"
|
|
|
cb8e9e |
|
|
|
cb8e9e |
>> Backport of http://review.gluster.org/#/c/11577/
|
|
|
cb8e9e |
>> Change-Id: Ie82e02aafbb7ea14563007307de3350ea022049a
|
|
|
cb8e9e |
>> BUG: 1240970
|
|
|
cb8e9e |
Signed-off-by: Joseph Fernandes <josferna@redhat.com>
|
|
|
cb8e9e |
|
|
|
cb8e9e |
Change-Id: I6d7a148925f13cc2048c3713e944f45e8b1a6853
|
|
|
cb8e9e |
BUG: 1240925
|
|
|
cb8e9e |
Reviewed-on: https://code.engineering.redhat.com/gerrit/52745
|
|
|
cb8e9e |
Reviewed-by: Kaleb Keithley <kkeithle@redhat.com>
|
|
|
cb8e9e |
Tested-by: Kaleb Keithley <kkeithle@redhat.com>
|
|
|
cb8e9e |
---
|
|
|
cb8e9e |
libglusterfs/src/gfdb/gfdb_sqlite3.c | 4 ++--
|
|
|
cb8e9e |
1 files changed, 2 insertions(+), 2 deletions(-)
|
|
|
cb8e9e |
|
|
|
cb8e9e |
diff --git a/libglusterfs/src/gfdb/gfdb_sqlite3.c b/libglusterfs/src/gfdb/gfdb_sqlite3.c
|
|
|
cb8e9e |
index 94553fb..349ff60 100644
|
|
|
cb8e9e |
--- a/libglusterfs/src/gfdb/gfdb_sqlite3.c
|
|
|
cb8e9e |
+++ b/libglusterfs/src/gfdb/gfdb_sqlite3.c
|
|
|
cb8e9e |
@@ -763,7 +763,7 @@ gf_sqlite3_find_unchanged_for_time (void *db_conn,
|
|
|
cb8e9e |
/*First condition: For writes*/
|
|
|
cb8e9e |
"((" GF_COL_TB_WSEC " * " TOSTRING(GFDB_MICROSEC) " + "
|
|
|
cb8e9e |
GF_COL_TB_WMSEC ") <= ? )"
|
|
|
cb8e9e |
- " OR "
|
|
|
cb8e9e |
+ " AND "
|
|
|
cb8e9e |
/*Second condition: For reads*/
|
|
|
cb8e9e |
"((" GF_COL_TB_RWSEC " * " TOSTRING(GFDB_MICROSEC) " + "
|
|
|
cb8e9e |
GF_COL_TB_RWMSEC ") <= ?)";
|
|
|
cb8e9e |
@@ -996,7 +996,7 @@ gf_sqlite3_find_unchanged_for_time_freq (void *db_conn,
|
|
|
cb8e9e |
"( (" GF_COL_TB_WFC " < ? ) AND"
|
|
|
cb8e9e |
"((" GF_COL_TB_WSEC " * " TOSTRING(GFDB_MICROSEC) " + "
|
|
|
cb8e9e |
GF_COL_TB_WMSEC ") >= ? ) ) )"
|
|
|
cb8e9e |
- " OR "
|
|
|
cb8e9e |
+ " AND "
|
|
|
cb8e9e |
/*Second condition: For Reads
|
|
|
cb8e9e |
* Files that have read wind time smaller than for_time
|
|
|
cb8e9e |
* OR
|
|
|
cb8e9e |
--
|
|
|
cb8e9e |
1.7.1
|
|
|
cb8e9e |
|