[PATCH] osmo-hlr[master]: cosmetic: multi-line DB_STMT_AUC_BY_IMSI

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Tue Oct 10 01:31:58 UTC 2017


Review at  https://gerrit.osmocom.org/4173

cosmetic: multi-line DB_STMT_AUC_BY_IMSI

In multiple lines, the statement becomes more readable.

I'd like to get this change out of the way before upcoming SQL statement edits
and additions.

Change-Id: Icf09f4bbb298a516aa52c81e3ca67d9d91d8c7c2
---
M src/db.c
1 file changed, 6 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/73/4173/1

diff --git a/src/db.c b/src/db.c
index 4bba2f0..2c10ba0 100644
--- a/src/db.c
+++ b/src/db.c
@@ -29,7 +29,12 @@
 	[DB_STMT_SEL_BY_IMSI] = "SELECT id,imsi,msisdn,vlr_number,sgsn_number,sgsn_address,periodic_lu_tmr,periodic_rau_tau_tmr,nam_cs,nam_ps,lmsi,ms_purged_cs,ms_purged_ps FROM subscriber WHERE imsi = ?",
 	[DB_STMT_UPD_VLR_BY_ID] = "UPDATE subscriber SET vlr_number = ? WHERE id = ?",
 	[DB_STMT_UPD_SGSN_BY_ID] = "UPDATE subscriber SET sgsn_number = ? WHERE id = ?",
-	[DB_STMT_AUC_BY_IMSI] = "SELECT id, algo_id_2g, ki, algo_id_3g, k, op, opc, sqn, ind_bitlen FROM subscriber LEFT JOIN auc_2g ON auc_2g.subscriber_id = subscriber.id LEFT JOIN auc_3g ON auc_3g.subscriber_id = subscriber.id WHERE imsi = ?",
+	[DB_STMT_AUC_BY_IMSI] =
+		"SELECT id, algo_id_2g, ki, algo_id_3g, k, op, opc, sqn, ind_bitlen"
+		" FROM subscriber"
+		" LEFT JOIN auc_2g ON auc_2g.subscriber_id = subscriber.id"
+		" LEFT JOIN auc_3g ON auc_3g.subscriber_id = subscriber.id"
+		" WHERE imsi = ?",
 	[DB_STMT_AUC_UPD_SQN] = "UPDATE auc_3g SET sqn = ? WHERE subscriber_id = ?",
 	[DB_STMT_UPD_PURGE_CS_BY_IMSI] = "UPDATE subscriber SET ms_purged_cs=1 WHERE imsi = ?",
 	[DB_STMT_UPD_PURGE_PS_BY_IMSI] = "UPDATE subscriber SET ms_purged_ps=1 WHERE imsi = ?",

-- 
To view, visit https://gerrit.osmocom.org/4173
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icf09f4bbb298a516aa52c81e3ca67d9d91d8c7c2
Gerrit-PatchSet: 1
Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>


More information about the gerrit-log mailing list