aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/db.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2010-05-14 17:38:47 +0200
committerHarald Welte <laforge@gnumonks.org>2010-05-14 17:38:47 +0200
commitd94d6a02d5e50c7d4b4bcddcb59ffdad23d7757b (patch)
treecaf342869ee71a1bf9c0a5e7ef73143c9c7a1bd4 /openbsc/src/db.c
parent1ccbf44d79544689e47b704f1f714a7bff63c1cf (diff)
DB: don't use reserved "index" word in SQL table field name
Diffstat (limited to 'openbsc/src/db.c')
-rw-r--r--openbsc/src/db.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/openbsc/src/db.c b/openbsc/src/db.c
index 57a7863c9..7f3c2211c 100644
--- a/openbsc/src/db.c
+++ b/openbsc/src/db.c
@@ -132,7 +132,7 @@ static char *create_stmts[] = {
"timestamp TIMESTAMP NOT NULL, "
"value INTEGER NOT NULL, "
"name TEXT NOT NULL, "
- "index INTEGER NOT NULL "
+ "idx INTEGER NOT NULL "
")",
"CREATE TABLE IF NOT EXISTS AuthKeys ("
"id INTEGER PRIMARY KEY AUTOINCREMENT, "
@@ -1202,7 +1202,7 @@ static int db_store_rate_ctr(struct rate_ctr_group *ctrg, unsigned int num,
result = dbi_conn_queryf(conn,
"Insert INTO RateCounters "
- "(timestamp,name,index,value) VALUES "
+ "(timestamp,name,idx,value) VALUES "
"(datetime('now'),%s.%s,%u,%"PRIu64")",
q_prefix, q_name, ctrg->idx, ctrg->ctr[num].current);