mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Merge branch '10.3' into 10.4
This commit is contained in:
@@ -399,15 +399,19 @@ PQRYRES SrcColumns(PGLOBAL g, const char *host, const char *db,
|
||||
int w;
|
||||
MYSQLC myc;
|
||||
PQRYRES qrp = NULL;
|
||||
const char *p;
|
||||
|
||||
if (!port)
|
||||
port = mysqld_port;
|
||||
|
||||
if (!strnicmp(srcdef, "select ", 7) || strstr(srcdef, "%s")) {
|
||||
query = (char *)PlugSubAlloc(g, NULL, strlen(srcdef) + 10);
|
||||
query = (char *)PlugSubAlloc(g, NULL, strlen(srcdef) + 10);
|
||||
|
||||
if (strstr(srcdef, "%s"))
|
||||
sprintf(query, srcdef, "1=1"); // dummy where clause
|
||||
if ((p= strstr(srcdef, "%s")))
|
||||
{
|
||||
/* Replace %s with 1=1 */
|
||||
sprintf(query, "%.*s1=1%s", (int) (p - srcdef), srcdef, p + 2); // dummy where clause
|
||||
}
|
||||
else
|
||||
strcpy(query, srcdef);
|
||||
|
||||
|
Reference in New Issue
Block a user