diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2022-07-27 11:02:57 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2022-07-27 11:02:57 +0200 |
commit | 3bb36e949534fc4a24d68d4297663ae8b80ba336 (patch) | |
tree | 09907f6c2e82d718f261323075ffb33cb350fef7 /storage/connect/tabpivot.cpp | |
parent | 9a897335eb4387980aed7698b832a893dbaa3d81 (diff) | |
parent | bd935a41060199a17019453d6e187e8edd7929ba (diff) | |
download | mariadb-git-3bb36e949534fc4a24d68d4297663ae8b80ba336.tar.gz |
Merge branch '10.3' into 10.4
Diffstat (limited to 'storage/connect/tabpivot.cpp')
-rw-r--r-- | storage/connect/tabpivot.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/storage/connect/tabpivot.cpp b/storage/connect/tabpivot.cpp index 1047a139f3b..d700cff0e41 100644 --- a/storage/connect/tabpivot.cpp +++ b/storage/connect/tabpivot.cpp @@ -193,7 +193,7 @@ PQRYRES PIVAID::MakePivotColumns(PGLOBAL g) *pcrp = crp->Next; } else if (!stricmp(Picol, crp->Name)) { if (crp->Nulls) { - sprintf(g->Message, "Pivot column %s cannot be nullable", Picol); + snprintf(g->Message, sizeof(g->Message), "Pivot column %s cannot be nullable", Picol); goto err; } // endif Nulls @@ -550,14 +550,14 @@ bool TDBPIVOT::MakePivotColumns(PGLOBAL g) // Now it is time to allocate the pivot and function columns if (!(Fcolp = Tdbp->ColDB(g, Fncol, 0))) { // Function column not found in table - sprintf(g->Message, MSG(COL_ISNOT_TABLE), Fncol, Tabname); + snprintf(g->Message, sizeof(g->Message), MSG(COL_ISNOT_TABLE), Fncol, Tabname); return true; } else if (Fcolp->InitValue(g)) return true; if (!(Xcolp = Tdbp->ColDB(g, Picol, 0))) { // Pivot column not found in table - sprintf(g->Message, MSG(COL_ISNOT_TABLE), Picol, Tabname); + snprintf(g->Message, sizeof(g->Message), MSG(COL_ISNOT_TABLE), Picol, Tabname); return true; } else if (Xcolp->InitValue(g)) return true; @@ -671,7 +671,7 @@ bool TDBPIVOT::OpenDB(PGLOBAL g) /*******************************************************************/ /* Currently PIVOT tables cannot be modified. */ /*******************************************************************/ - sprintf(g->Message, MSG(TABLE_READ_ONLY), "PIVOT"); + snprintf(g->Message, sizeof(g->Message), MSG(TABLE_READ_ONLY), "PIVOT"); return TRUE; } // endif Mode @@ -800,7 +800,7 @@ int TDBPIVOT::ReadDB(PGLOBAL g) /***********************************************************************/ int TDBPIVOT::WriteDB(PGLOBAL g) { - sprintf(g->Message, MSG(TABLE_READ_ONLY), "PIVOT"); + snprintf(g->Message, sizeof(g->Message), MSG(TABLE_READ_ONLY), "PIVOT"); return RC_FX; } // end of WriteDB @@ -809,7 +809,7 @@ int TDBPIVOT::WriteDB(PGLOBAL g) /***********************************************************************/ int TDBPIVOT::DeleteDB(PGLOBAL g, int) { - sprintf(g->Message, MSG(NO_TABLE_DEL), "PIVOT"); + snprintf(g->Message, sizeof(g->Message), MSG(NO_TABLE_DEL), "PIVOT"); return RC_FX; } // end of DeleteDB |