Skip to content

Commit eb918fe

Browse files
authored
[Core] Fix switch_console.c for Galera Mariadb cluster
Fix in switch_console.c file. Adds column names when inserting data. Calls to use the complete table in Galera Multi-Master Cluster
1 parent 665745c commit eb918fe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/switch_console.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1849,7 +1849,7 @@ SWITCH_DECLARE(switch_status_t) switch_console_set_complete(const char *string)
18491849
SWITCH_STANDARD_STREAM(mystream);
18501850

18511851
if (!strcasecmp(argv[0], "stickyadd")) {
1852-
mystream.write_function(&mystream, "insert into complete values (1,");
1852+
mystream.write_function(&mystream, "insert into complete (sticky, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, hostname) values (1,");
18531853
for (x = 0; x < 10; x++) {
18541854
if (argv[x + 1] && !strcasecmp(argv[x + 1], "_any_")) {
18551855
mystream.write_function(&mystream, "%s", "'', ");
@@ -1865,7 +1865,7 @@ SWITCH_DECLARE(switch_status_t) switch_console_set_complete(const char *string)
18651865
switch_core_sql_exec(mystream.data);
18661866
status = SWITCH_STATUS_SUCCESS;
18671867
} else if (!strcasecmp(argv[0], "add")) {
1868-
mystream.write_function(&mystream, "insert into complete values (0,");
1868+
mystream.write_function(&mystream, "insert into complete (sticky, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, hostname) values (0,");
18691869
for (x = 0; x < 10; x++) {
18701870
if (argv[x + 1] && !strcasecmp(argv[x + 1], "_any_")) {
18711871
mystream.write_function(&mystream, "%s", "'', ");

0 commit comments

Comments
 (0)