mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
Fixes for embedded MySQL
Some limit optimization BitKeeper/deleted/.del-ib_config.h.in~9e57db8504e55b7: Delete: innobase/ib_config.h.in BitKeeper/deleted/.del-ib_config.h~7539e26ffc614439: Delete: innobase/ib_config.h client/errmsg.c: Moved error messages from libmysqld/ client/mysql.cc: Removed warnings include/errmsg.h: New info for embedded versions include/mysql_com.h: Fixes for embedded MySQL libmysql/errmsg.c: Fixes for embedded MySQL libmysqld/Makefile.am: Added HANDLER code libmysqld/lib_sql.cc: Fixes for embedded MySQL libmysqld/lib_vio.c: Fixes for embedded MySQL BitKeeper/etc/ignore: Added libmysqld/sql_handler.cc to the ignore list libmysqld/libmysqld.c: Fixes for embedded MySQL mysql-test/r/null_key.result: Fixed result for 4.0 sql/net_serv.cc: Fixes for embedded MySQL sql/sql_parse.cc: Fixes for embedded MySQL where the query could be a const char* sql/sql_select.cc: Added limit optimization sql/sql_select.h: Added limit optimization
This commit is contained in:
@@ -133,7 +133,7 @@ static String glob_buffer,old_buffer;
|
||||
static int wait_time = 5;
|
||||
static STATUS status;
|
||||
static ulong select_limit,max_join_size,opt_connect_timeout=0;
|
||||
static char *xmlmeta[] = {
|
||||
static const char *xmlmeta[] = {
|
||||
"&", "&",
|
||||
"<", "<",
|
||||
0, 0
|
||||
@@ -173,8 +173,8 @@ static int sql_connect(char *host,char *database,char *user,char *password,
|
||||
uint silent);
|
||||
static int put_info(const char *str,INFO_TYPE info,uint error=0);
|
||||
static void safe_put_field(const char *pos,ulong length);
|
||||
static char *array_value(char **array, char *key);
|
||||
static char *xmlencode(char *dest, char *src);
|
||||
static const char *array_value(const char **array, char *key);
|
||||
static void xmlencode(char *dest, char *src);
|
||||
static void my_chomp(char *end);
|
||||
static void init_pager();
|
||||
static void end_pager();
|
||||
@@ -1739,8 +1739,8 @@ print_table_data_vertically(MYSQL_RES *result)
|
||||
}
|
||||
}
|
||||
|
||||
static char
|
||||
*array_value(char **array, char *key) {
|
||||
static const char
|
||||
*array_value(const char **array, char *key) {
|
||||
int x;
|
||||
for(x=0; array[x]; x+=2)
|
||||
if(!strcmp(array[x], key))
|
||||
@@ -1748,19 +1748,21 @@ static char
|
||||
return 0;
|
||||
}
|
||||
|
||||
static char
|
||||
*xmlencode(char *dest, char *src) {
|
||||
static void
|
||||
xmlencode(char *dest, char *src)
|
||||
{
|
||||
char *p = src;
|
||||
char *t;
|
||||
const char *t;
|
||||
char s[2] = { 0, 0 };
|
||||
*dest = 0;
|
||||
|
||||
do {
|
||||
do
|
||||
{
|
||||
s[0] = *p;
|
||||
if(!(t=array_value(xmlmeta, s))) t = s;
|
||||
strcat(dest, t);
|
||||
if (!(t=array_value(xmlmeta, s)))
|
||||
t = s;
|
||||
dest=strmov(dest, t);
|
||||
} while(*p++);
|
||||
return dest;
|
||||
}
|
||||
|
||||
static void
|
||||
|
Reference in New Issue
Block a user