mirror of
https://github.com/netdata/netdata.git
synced 2025-04-17 11:12:42 +00:00
Fix a parameter binding issue when storing chart names in the database (#10717)
This commit is contained in:
parent
1160fe5436
commit
790af9620f
2 changed files with 9 additions and 4 deletions
database/sqlite
4
database/sqlite/Makefile.am
Normal file
4
database/sqlite/Makefile.am
Normal file
|
@ -0,0 +1,4 @@
|
|||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
AUTOMAKE_OPTIONS = subdir-objects
|
||||
MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
|
|
@ -530,11 +530,12 @@ int sql_store_chart(
|
|||
goto bind_fail;
|
||||
|
||||
param++;
|
||||
if (name) {
|
||||
if (name && *name)
|
||||
rc = sqlite3_bind_text(res, 5, name, -1, SQLITE_STATIC);
|
||||
if (unlikely(rc != SQLITE_OK))
|
||||
goto bind_fail;
|
||||
}
|
||||
else
|
||||
rc = sqlite3_bind_null(res, 5);
|
||||
if (unlikely(rc != SQLITE_OK))
|
||||
goto bind_fail;
|
||||
|
||||
param++;
|
||||
rc = sqlite3_bind_text(res, 6, family, -1, SQLITE_STATIC);
|
||||
|
|
Loading…
Add table
Reference in a new issue