Adding pgsm_query_id for pgsm_store_error function

pull/392/head
Hamid Akhtar 2023-03-01 18:03:01 +05:00 committed by Muhammad Usama
parent 9ecd2ccbb7
commit cf5be6dd5d
1 changed files with 2 additions and 0 deletions

View File

@ -1556,6 +1556,8 @@ pgsm_store_error(const char *query, ErrorData *edata)
entry = pgsm_create_hash_entry(0, queryid, NULL);
entry->query_text.query_pointer = pnstrdup(query, len);
entry->pgsm_query_id = get_pgsm_query_id_hash(query, len);
entry->counters.error.elevel = edata->elevel;
snprintf(entry->counters.error.message, ERROR_MESSAGE_LEN, "%s", edata->message);
snprintf(entry->counters.error.sqlcode, SQLCODE_LEN, "%s", unpack_sql_state(edata->sqlerrcode));