Merge from 5.1.
This commit is contained in:
commit
12f651ac9d
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 2002-2004 MySQL AB
|
/* Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
|
||||||
|
|
||||||
#ifndef _my_getopt_h
|
#ifndef _my_getopt_h
|
||||||
#define _my_getopt_h
|
#define _my_getopt_h
|
||||||
@ -86,7 +86,9 @@ struct my_option
|
|||||||
|
|
||||||
|
|
||||||
typedef my_bool (*my_get_one_option)(int, const struct my_option *, char *);
|
typedef my_bool (*my_get_one_option)(int, const struct my_option *, char *);
|
||||||
typedef void (*my_error_reporter)(enum loglevel level, const char *format, ...);
|
typedef void (*my_error_reporter)(enum loglevel level, const char *format, ...)
|
||||||
|
ATTRIBUTE_FORMAT_FPTR(printf, 2, 3);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Used to retrieve a reference to the object (variable) that holds the value
|
Used to retrieve a reference to the object (variable) that holds the value
|
||||||
for the given option. For example, if var_type is GET_UINT, the function
|
for the given option. For example, if var_type is GET_UINT, the function
|
||||||
|
@ -9,7 +9,6 @@ funcs_1.charset_collation_1 # depends on compile-time decisions
|
|||||||
main.func_math @freebsd # Bug#43020 2010-05-04 alik main.func_math fails on FreeBSD in PB2
|
main.func_math @freebsd # Bug#43020 2010-05-04 alik main.func_math fails on FreeBSD in PB2
|
||||||
main.gis-rtree @freebsd # Bug#38965 2010-05-04 alik test cases gis-rtree, type_float, type_newdecimal fail in embedded server
|
main.gis-rtree @freebsd # Bug#38965 2010-05-04 alik test cases gis-rtree, type_float, type_newdecimal fail in embedded server
|
||||||
main.lock_multi_bug38499 # Bug#47448 2009-09-19 alik main.lock_multi_bug38499 times out sporadically
|
main.lock_multi_bug38499 # Bug#47448 2009-09-19 alik main.lock_multi_bug38499 times out sporadically
|
||||||
main.outfile_loaddata @solaris # Bug#46895 2010-01-20 alik Test "outfile_loaddata" fails (reproducible)
|
|
||||||
main.signal_demo3 @solaris # Bug#47791 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
|
main.signal_demo3 @solaris # Bug#47791 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
|
||||||
main.sp @solaris # Bug#47791 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
|
main.sp @solaris # Bug#47791 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
|
||||||
main.type_float @freebsd # Bug#38965 2010-05-04 alik test cases gis-rtree, type_float, type_newdecimal fail in embedded server
|
main.type_float @freebsd # Bug#38965 2010-05-04 alik test cases gis-rtree, type_float, type_newdecimal fail in embedded server
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 2000-2005 MySQL AB, 2008-2009 Sun Microsystems, Inc
|
/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -11,8 +11,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@file
|
@file
|
||||||
@ -108,7 +107,6 @@ bool read_texts(const char *file_name, const char *language,
|
|||||||
char lang_path[FN_REFLEN];
|
char lang_path[FN_REFLEN];
|
||||||
uchar *buff;
|
uchar *buff;
|
||||||
uchar head[32],*pos;
|
uchar head[32],*pos;
|
||||||
const char *errmsg;
|
|
||||||
DBUG_ENTER("read_texts");
|
DBUG_ENTER("read_texts");
|
||||||
|
|
||||||
LINT_INIT(buff);
|
LINT_INIT(buff);
|
||||||
@ -185,18 +183,9 @@ Check that the above file is the right version for this program!",
|
|||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
|
|
||||||
err:
|
err:
|
||||||
switch (funktpos) {
|
sql_print_error((funktpos == 2) ? "Not enough memory for messagefile '%s'" :
|
||||||
case 2:
|
((funktpos == 1) ? "Can't read from messagefile '%s'" :
|
||||||
errmsg= "Not enough memory for messagefile '%s'";
|
"Can't find messagefile '%s'"), name);
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
errmsg= "Can't read from messagefile '%s'";
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
errmsg= "Can't find messagefile '%s'";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
sql_print_error(errmsg, name);
|
|
||||||
if (file != FERR)
|
if (file != FERR)
|
||||||
(void) mysql_file_close(file, MYF(MY_WME));
|
(void) mysql_file_close(file, MYF(MY_WME));
|
||||||
DBUG_RETURN(1);
|
DBUG_RETURN(1);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
|
/* Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -445,7 +445,7 @@ Events::update_event(THD *thd, Event_parse_data *parse_data,
|
|||||||
!sortcmp_lex_string(parse_data->name, *new_name,
|
!sortcmp_lex_string(parse_data->name, *new_name,
|
||||||
system_charset_info))
|
system_charset_info))
|
||||||
{
|
{
|
||||||
my_error(ER_EVENT_SAME_NAME, MYF(0), parse_data->name.str);
|
my_error(ER_EVENT_SAME_NAME, MYF(0));
|
||||||
DBUG_RETURN(TRUE);
|
DBUG_RETURN(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
13
sql/field.cc
13
sql/field.cc
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
|
/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -11,8 +11,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@file
|
@file
|
||||||
@ -9268,7 +9267,7 @@ bool Create_field::init(THD *thd, char *fld_name, enum_field_types fld_type,
|
|||||||
if (decimals >= NOT_FIXED_DEC)
|
if (decimals >= NOT_FIXED_DEC)
|
||||||
{
|
{
|
||||||
my_error(ER_TOO_BIG_SCALE, MYF(0), decimals, fld_name,
|
my_error(ER_TOO_BIG_SCALE, MYF(0), decimals, fld_name,
|
||||||
NOT_FIXED_DEC-1);
|
static_cast<ulong>(NOT_FIXED_DEC - 1));
|
||||||
DBUG_RETURN(TRUE);
|
DBUG_RETURN(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -9338,8 +9337,8 @@ bool Create_field::init(THD *thd, char *fld_name, enum_field_types fld_type,
|
|||||||
my_decimal_trim(&length, &decimals);
|
my_decimal_trim(&length, &decimals);
|
||||||
if (length > DECIMAL_MAX_PRECISION)
|
if (length > DECIMAL_MAX_PRECISION)
|
||||||
{
|
{
|
||||||
my_error(ER_TOO_BIG_PRECISION, MYF(0), length, fld_name,
|
my_error(ER_TOO_BIG_PRECISION, MYF(0), static_cast<int>(length),
|
||||||
DECIMAL_MAX_PRECISION);
|
fld_name, static_cast<ulong>(DECIMAL_MAX_PRECISION));
|
||||||
DBUG_RETURN(TRUE);
|
DBUG_RETURN(TRUE);
|
||||||
}
|
}
|
||||||
if (length < decimals)
|
if (length < decimals)
|
||||||
@ -9563,7 +9562,7 @@ bool Create_field::init(THD *thd, char *fld_name, enum_field_types fld_type,
|
|||||||
if (length > MAX_BIT_FIELD_LENGTH)
|
if (length > MAX_BIT_FIELD_LENGTH)
|
||||||
{
|
{
|
||||||
my_error(ER_TOO_BIG_DISPLAYWIDTH, MYF(0), fld_name,
|
my_error(ER_TOO_BIG_DISPLAYWIDTH, MYF(0), fld_name,
|
||||||
MAX_BIT_FIELD_LENGTH);
|
static_cast<ulong>(MAX_BIT_FIELD_LENGTH));
|
||||||
DBUG_RETURN(TRUE);
|
DBUG_RETURN(TRUE);
|
||||||
}
|
}
|
||||||
pack_length= (length + 7) / 8;
|
pack_length= (length + 7) / 8;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 2000-2003 MySQL AB, 2008-2009 Sun Microsystems, Inc
|
/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -11,8 +11,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@file
|
@file
|
||||||
@ -8699,7 +8698,7 @@ NDB_SHARE *ndbcluster_get_share(const char *key, TABLE *table,
|
|||||||
DBUG_PRINT("error", ("get_share: failed to alloc share"));
|
DBUG_PRINT("error", ("get_share: failed to alloc share"));
|
||||||
if (!have_lock)
|
if (!have_lock)
|
||||||
mysql_mutex_unlock(&ndbcluster_mutex);
|
mysql_mutex_unlock(&ndbcluster_mutex);
|
||||||
my_error(ER_OUTOFMEMORY, MYF(0), sizeof(*share));
|
my_error(ER_OUTOFMEMORY, MYF(0), static_cast<int>(sizeof(*share)));
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 2000-2003 MySQL AB, 2008-2009 Sun Microsystems, Inc
|
/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -11,8 +11,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
|
||||||
*/
|
|
||||||
|
|
||||||
#include "sql_priv.h"
|
#include "sql_priv.h"
|
||||||
#include "unireg.h" // REQUIRED: for other includes
|
#include "unireg.h" // REQUIRED: for other includes
|
||||||
@ -1225,12 +1224,14 @@ ndbcluster_update_slock(THD *thd,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ndb_error)
|
if (ndb_error)
|
||||||
|
{
|
||||||
|
char buf[1024];
|
||||||
|
my_snprintf(buf, sizeof(buf), "Could not release lock on '%s.%s'",
|
||||||
|
db, table_name);
|
||||||
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
|
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
|
||||||
ER_GET_ERRMSG, ER(ER_GET_ERRMSG),
|
ER_GET_ERRMSG, ER(ER_GET_ERRMSG),
|
||||||
ndb_error->code,
|
ndb_error->code, ndb_error->message, buf);
|
||||||
ndb_error->message,
|
}
|
||||||
"Could not release lock on '%s.%s'",
|
|
||||||
db, table_name);
|
|
||||||
if (trans)
|
if (trans)
|
||||||
ndb->closeTransaction(trans);
|
ndb->closeTransaction(trans);
|
||||||
ndb->setDatabaseName(save_db);
|
ndb->setDatabaseName(save_db);
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
This handler was developed by Mikael Ronstrom for version 5.1 of MySQL.
|
This handler was developed by Mikael Ronstrom for version 5.1 of MySQL.
|
||||||
@ -1066,6 +1066,10 @@ static int handle_opt_part(THD *thd, HA_CHECK_OPT *check_opt,
|
|||||||
(modelled after mi_check_print_msg)
|
(modelled after mi_check_print_msg)
|
||||||
TODO: move this into the handler, or rewrite mysql_admin_table.
|
TODO: move this into the handler, or rewrite mysql_admin_table.
|
||||||
*/
|
*/
|
||||||
|
static bool print_admin_msg(THD* thd, const char* msg_type,
|
||||||
|
const char* db_name, const char* table_name,
|
||||||
|
const char* op_name, const char *fmt, ...)
|
||||||
|
ATTRIBUTE_FORMAT(printf, 6, 7);
|
||||||
static bool print_admin_msg(THD* thd, const char* msg_type,
|
static bool print_admin_msg(THD* thd, const char* msg_type,
|
||||||
const char* db_name, const char* table_name,
|
const char* db_name, const char* table_name,
|
||||||
const char* op_name, const char *fmt, ...)
|
const char* op_name, const char *fmt, ...)
|
||||||
|
@ -278,7 +278,7 @@ handler *get_ha_partition(partition_info *part_info)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
my_error(ER_OUTOFMEMORY, MYF(0), sizeof(ha_partition));
|
my_error(ER_OUTOFMEMORY, MYF(0), static_cast<int>(sizeof(ha_partition)));
|
||||||
}
|
}
|
||||||
DBUG_RETURN(((handler*) partition));
|
DBUG_RETURN(((handler*) partition));
|
||||||
}
|
}
|
||||||
@ -1638,7 +1638,8 @@ int ha_recover(HASH *commit_list)
|
|||||||
}
|
}
|
||||||
if (!info.list)
|
if (!info.list)
|
||||||
{
|
{
|
||||||
sql_print_error(ER(ER_OUTOFMEMORY), info.len*sizeof(XID));
|
sql_print_error(ER(ER_OUTOFMEMORY),
|
||||||
|
static_cast<int>(info.len*sizeof(XID)));
|
||||||
DBUG_RETURN(1);
|
DBUG_RETURN(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (c) 2000, 2010 Oracle and/or its affiliates. All rights reserved.
|
/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@file
|
@file
|
||||||
@ -5215,8 +5215,8 @@ create_func_cast(THD *thd, Item *a, Cast_target cast_type,
|
|||||||
decoded_size= strtoul(c_len, NULL, 10);
|
decoded_size= strtoul(c_len, NULL, 10);
|
||||||
if (errno != 0)
|
if (errno != 0)
|
||||||
{
|
{
|
||||||
my_error(ER_TOO_BIG_PRECISION, MYF(0), c_len, a->name,
|
my_error(ER_TOO_BIG_PRECISION, MYF(0), INT_MAX, a->name,
|
||||||
DECIMAL_MAX_PRECISION);
|
static_cast<ulong>(DECIMAL_MAX_PRECISION));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
len= decoded_size;
|
len= decoded_size;
|
||||||
@ -5229,8 +5229,8 @@ create_func_cast(THD *thd, Item *a, Cast_target cast_type,
|
|||||||
decoded_size= strtoul(c_dec, NULL, 10);
|
decoded_size= strtoul(c_dec, NULL, 10);
|
||||||
if ((errno != 0) || (decoded_size > UINT_MAX))
|
if ((errno != 0) || (decoded_size > UINT_MAX))
|
||||||
{
|
{
|
||||||
my_error(ER_TOO_BIG_SCALE, MYF(0), c_dec, a->name,
|
my_error(ER_TOO_BIG_SCALE, MYF(0), INT_MAX, a->name,
|
||||||
DECIMAL_MAX_SCALE);
|
static_cast<ulong>(DECIMAL_MAX_SCALE));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
dec= decoded_size;
|
dec= decoded_size;
|
||||||
@ -5243,14 +5243,14 @@ create_func_cast(THD *thd, Item *a, Cast_target cast_type,
|
|||||||
}
|
}
|
||||||
if (len > DECIMAL_MAX_PRECISION)
|
if (len > DECIMAL_MAX_PRECISION)
|
||||||
{
|
{
|
||||||
my_error(ER_TOO_BIG_PRECISION, MYF(0), len, a->name,
|
my_error(ER_TOO_BIG_PRECISION, MYF(0), static_cast<int>(len), a->name,
|
||||||
DECIMAL_MAX_PRECISION);
|
static_cast<ulong>(DECIMAL_MAX_PRECISION));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (dec > DECIMAL_MAX_SCALE)
|
if (dec > DECIMAL_MAX_SCALE)
|
||||||
{
|
{
|
||||||
my_error(ER_TOO_BIG_SCALE, MYF(0), dec, a->name,
|
my_error(ER_TOO_BIG_SCALE, MYF(0), dec, a->name,
|
||||||
DECIMAL_MAX_SCALE);
|
static_cast<ulong>(DECIMAL_MAX_SCALE));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
res= new (thd->mem_root) Item_decimal_typecast(a, len, dec);
|
res= new (thd->mem_root) Item_decimal_typecast(a, len, dec);
|
||||||
|
@ -11,8 +11,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@file
|
@file
|
||||||
@ -1094,7 +1093,7 @@ err:
|
|||||||
push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
|
push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
|
||||||
ER_WARN_DATA_OUT_OF_RANGE,
|
ER_WARN_DATA_OUT_OF_RANGE,
|
||||||
ER(ER_WARN_DATA_OUT_OF_RANGE),
|
ER(ER_WARN_DATA_OUT_OF_RANGE),
|
||||||
name, 1);
|
name, 1L);
|
||||||
return dec;
|
return dec;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3152,7 +3151,7 @@ udf_handler::fix_fields(THD *thd, Item_result_field *func,
|
|||||||
|
|
||||||
if (!tmp_udf)
|
if (!tmp_udf)
|
||||||
{
|
{
|
||||||
my_error(ER_CANT_FIND_UDF, MYF(0), u_d->name.str, errno);
|
my_error(ER_CANT_FIND_UDF, MYF(0), u_d->name.str);
|
||||||
DBUG_RETURN(TRUE);
|
DBUG_RETURN(TRUE);
|
||||||
}
|
}
|
||||||
u_d=tmp_udf;
|
u_d=tmp_udf;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 2000-2006 MySQL AB, 2008-2009 Sun Microsystems, Inc
|
/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -11,8 +11,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@file
|
@file
|
||||||
@ -3702,7 +3701,8 @@ String *Item_func_uncompress::val_str(String *str)
|
|||||||
push_warning_printf(current_thd,MYSQL_ERROR::WARN_LEVEL_WARN,
|
push_warning_printf(current_thd,MYSQL_ERROR::WARN_LEVEL_WARN,
|
||||||
ER_TOO_BIG_FOR_UNCOMPRESS,
|
ER_TOO_BIG_FOR_UNCOMPRESS,
|
||||||
ER(ER_TOO_BIG_FOR_UNCOMPRESS),
|
ER(ER_TOO_BIG_FOR_UNCOMPRESS),
|
||||||
current_thd->variables.max_allowed_packet);
|
static_cast<int>(current_thd->variables.
|
||||||
|
max_allowed_packet));
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
if (buffer.realloc((uint32)new_size))
|
if (buffer.realloc((uint32)new_size))
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 2005 MySQL AB, 2008-2009 Sun Microsystems, Inc
|
/* Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
|
||||||
|
|
||||||
#ifndef LOG_H
|
#ifndef LOG_H
|
||||||
#define LOG_H
|
#define LOG_H
|
||||||
@ -687,7 +687,7 @@ void sql_print_warning(const char *format, ...) ATTRIBUTE_FORMAT(printf, 1, 2);
|
|||||||
void sql_print_information(const char *format, ...)
|
void sql_print_information(const char *format, ...)
|
||||||
ATTRIBUTE_FORMAT(printf, 1, 2);
|
ATTRIBUTE_FORMAT(printf, 1, 2);
|
||||||
typedef void (*sql_print_message_func)(const char *format, ...)
|
typedef void (*sql_print_message_func)(const char *format, ...)
|
||||||
ATTRIBUTE_FORMAT(printf, 1, 2);
|
ATTRIBUTE_FORMAT_FPTR(printf, 1, 2);
|
||||||
extern sql_print_message_func sql_print_message_handlers[];
|
extern sql_print_message_func sql_print_message_handlers[];
|
||||||
|
|
||||||
int error_log_print(enum loglevel level, const char *format,
|
int error_log_print(enum loglevel level, const char *format,
|
||||||
|
@ -117,7 +117,8 @@ void sys_var_end()
|
|||||||
sys_var constructor
|
sys_var constructor
|
||||||
|
|
||||||
@param chain variables are linked into chain for mysql_add_sys_var_chain()
|
@param chain variables are linked into chain for mysql_add_sys_var_chain()
|
||||||
@param name_arg the name of the variable. @sa my_option::name
|
@param name_arg the name of the variable. Must be 0-terminated and exist
|
||||||
|
for the liftime of the sys_var object. @sa my_option::name
|
||||||
@param comment shown in mysqld --help, @sa my_option::comment
|
@param comment shown in mysqld --help, @sa my_option::comment
|
||||||
@param flags_arg or'ed flag_enum values
|
@param flags_arg or'ed flag_enum values
|
||||||
@param off offset of the global variable value from the
|
@param off offset of the global variable value from the
|
||||||
@ -164,8 +165,8 @@ sys_var::sys_var(sys_var_chain *chain, const char *name_arg,
|
|||||||
*/
|
*/
|
||||||
DBUG_ASSERT(parse_flag == PARSE_NORMAL || getopt_id <= 0 || getopt_id >= 255);
|
DBUG_ASSERT(parse_flag == PARSE_NORMAL || getopt_id <= 0 || getopt_id >= 255);
|
||||||
|
|
||||||
name.str= name_arg;
|
name.str= name_arg; // ER_NO_DEFAULT relies on 0-termination of name_arg
|
||||||
name.length= strlen(name_arg);
|
name.length= strlen(name_arg); // and so does this.
|
||||||
DBUG_ASSERT(name.length <= NAME_CHAR_LEN);
|
DBUG_ASSERT(name.length <= NAME_CHAR_LEN);
|
||||||
|
|
||||||
bzero(&option, sizeof(option));
|
bzero(&option, sizeof(option));
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
|
||||||
|
|
||||||
#include "my_global.h" /* NO_EMBEDDED_ACCESS_CHECKS */
|
#include "my_global.h" /* NO_EMBEDDED_ACCESS_CHECKS */
|
||||||
#include "sql_priv.h"
|
#include "sql_priv.h"
|
||||||
@ -1066,7 +1066,7 @@ void sp_head::recursion_level_error(THD *thd)
|
|||||||
if (m_type == TYPE_ENUM_PROCEDURE)
|
if (m_type == TYPE_ENUM_PROCEDURE)
|
||||||
{
|
{
|
||||||
my_error(ER_SP_RECURSION_LIMIT, MYF(0),
|
my_error(ER_SP_RECURSION_LIMIT, MYF(0),
|
||||||
thd->variables.max_sp_recursion_depth,
|
static_cast<int>(thd->variables.max_sp_recursion_depth),
|
||||||
m_name.str);
|
m_name.str);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -2275,13 +2275,12 @@ static int replace_user_table(THD *thd, TABLE *table, const LEX_USER &combo,
|
|||||||
*/
|
*/
|
||||||
else if (!password_len && !combo.plugin.length && no_auto_create)
|
else if (!password_len && !combo.plugin.length && no_auto_create)
|
||||||
{
|
{
|
||||||
my_error(ER_PASSWORD_NO_MATCH, MYF(0), combo.user.str, combo.host.str);
|
my_error(ER_PASSWORD_NO_MATCH, MYF(0));
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
else if (!can_create_user)
|
else if (!can_create_user)
|
||||||
{
|
{
|
||||||
my_error(ER_CANT_CREATE_USER_WITH_GRANT, MYF(0),
|
my_error(ER_CANT_CREATE_USER_WITH_GRANT, MYF(0));
|
||||||
thd->security_ctx->user, thd->security_ctx->host_or_ip);
|
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
else if (combo.plugin.str[0])
|
else if (combo.plugin.str[0])
|
||||||
@ -2309,8 +2308,8 @@ static int replace_user_table(THD *thd, TABLE *table, const LEX_USER &combo,
|
|||||||
/* what == 'N' means revoke */
|
/* what == 'N' means revoke */
|
||||||
if (combo.plugin.length && what != 'N')
|
if (combo.plugin.length && what != 'N')
|
||||||
{
|
{
|
||||||
my_error(ER_GRANT_PLUGIN_USER_EXISTS, MYF(0), combo.user.length,
|
my_error(ER_GRANT_PLUGIN_USER_EXISTS, MYF(0),
|
||||||
combo.user.str);
|
static_cast<int>(combo.user.length), combo.user.str);
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
if (combo.password.str) // If password given
|
if (combo.password.str) // If password given
|
||||||
@ -8901,7 +8900,7 @@ err:
|
|||||||
if (mpvio->status == MPVIO_EXT::FAILURE)
|
if (mpvio->status == MPVIO_EXT::FAILURE)
|
||||||
{
|
{
|
||||||
inc_host_errors(mpvio->ip);
|
inc_host_errors(mpvio->ip);
|
||||||
my_error(ER_HANDSHAKE_ERROR, MYF(0), mpvio->auth_info.host_or_ip);
|
my_error(ER_HANDSHAKE_ERROR, MYF(0));
|
||||||
}
|
}
|
||||||
DBUG_RETURN(-1);
|
DBUG_RETURN(-1);
|
||||||
}
|
}
|
||||||
@ -9487,7 +9486,7 @@ static int native_password_authenticate(MYSQL_PLUGIN_VIO *vio,
|
|||||||
}
|
}
|
||||||
|
|
||||||
inc_host_errors(mpvio->ip);
|
inc_host_errors(mpvio->ip);
|
||||||
my_error(ER_HANDSHAKE_ERROR, MYF(0), mpvio->auth_info.host_or_ip);
|
my_error(ER_HANDSHAKE_ERROR, MYF(0));
|
||||||
DBUG_RETURN(CR_ERROR);
|
DBUG_RETURN(CR_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -9541,7 +9540,7 @@ static int old_password_authenticate(MYSQL_PLUGIN_VIO *vio,
|
|||||||
}
|
}
|
||||||
|
|
||||||
inc_host_errors(mpvio->ip);
|
inc_host_errors(mpvio->ip);
|
||||||
my_error(ER_HANDSHAKE_ERROR, MYF(0), mpvio->auth_info.host_or_ip);
|
my_error(ER_HANDSHAKE_ERROR, MYF(0));
|
||||||
return CR_ERROR;
|
return CR_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3854,7 +3854,7 @@ static bool auto_repair_table(THD *thd, TABLE_LIST *table_list)
|
|||||||
{
|
{
|
||||||
/* Give right error message */
|
/* Give right error message */
|
||||||
thd->clear_error();
|
thd->clear_error();
|
||||||
my_error(ER_NOT_KEYFILE, MYF(0), share->table_name.str, my_errno);
|
my_error(ER_NOT_KEYFILE, MYF(0), share->table_name.str);
|
||||||
sql_print_error("Couldn't repair table: %s.%s", share->db.str,
|
sql_print_error("Couldn't repair table: %s.%s", share->db.str,
|
||||||
share->table_name.str);
|
share->table_name.str);
|
||||||
if (entry->file)
|
if (entry->file)
|
||||||
@ -7921,7 +7921,7 @@ bool setup_tables(THD *thd, Name_resolution_context *context,
|
|||||||
}
|
}
|
||||||
if (tablenr > MAX_TABLES)
|
if (tablenr > MAX_TABLES)
|
||||||
{
|
{
|
||||||
my_error(ER_TOO_MANY_TABLES,MYF(0),MAX_TABLES);
|
my_error(ER_TOO_MANY_TABLES,MYF(0), static_cast<int>(MAX_TABLES));
|
||||||
DBUG_RETURN(1);
|
DBUG_RETURN(1);
|
||||||
}
|
}
|
||||||
for (table_list= tables;
|
for (table_list= tables;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 2005-2006 MySQL AB
|
/* Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -242,7 +242,7 @@ void mysql_client_binlog_statement(THD* thd)
|
|||||||
TODO: Maybe a better error message since the BINLOG statement
|
TODO: Maybe a better error message since the BINLOG statement
|
||||||
now contains several events.
|
now contains several events.
|
||||||
*/
|
*/
|
||||||
my_error(ER_UNKNOWN_ERROR, MYF(0), "Error executing BINLOG statement");
|
my_error(ER_UNKNOWN_ERROR, MYF(0));
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,8 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
**
|
**
|
||||||
@ -2191,7 +2192,7 @@ bool select_export::send_data(List<Item> &items)
|
|||||||
ER_TRUNCATED_WRONG_VALUE_FOR_FIELD,
|
ER_TRUNCATED_WRONG_VALUE_FOR_FIELD,
|
||||||
ER(ER_TRUNCATED_WRONG_VALUE_FOR_FIELD),
|
ER(ER_TRUNCATED_WRONG_VALUE_FOR_FIELD),
|
||||||
"string", printable_buff,
|
"string", printable_buff,
|
||||||
item->name, row_count);
|
item->name, static_cast<long>(row_count));
|
||||||
}
|
}
|
||||||
else if (from_end_pos < res->ptr() + res->length())
|
else if (from_end_pos < res->ptr() + res->length())
|
||||||
{
|
{
|
||||||
@ -2200,7 +2201,7 @@ bool select_export::send_data(List<Item> &items)
|
|||||||
*/
|
*/
|
||||||
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
|
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
|
||||||
WARN_DATA_TRUNCATED, ER(WARN_DATA_TRUNCATED),
|
WARN_DATA_TRUNCATED, ER(WARN_DATA_TRUNCATED),
|
||||||
item->full_name(), row_count);
|
item->full_name(), static_cast<long>(row_count));
|
||||||
}
|
}
|
||||||
cvt_str.length(bytes);
|
cvt_str.length(bytes);
|
||||||
res= &cvt_str;
|
res= &cvt_str;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 2007 MySQL AB, 2008-2009 Sun Microsystems, Inc
|
/* Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -11,8 +11,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Functions to autenticate and handle reqests for a connection
|
Functions to autenticate and handle reqests for a connection
|
||||||
@ -466,7 +465,7 @@ static int check_connection(THD *thd)
|
|||||||
|
|
||||||
if (vio_peer_addr(net->vio, ip, &thd->peer_port, NI_MAXHOST))
|
if (vio_peer_addr(net->vio, ip, &thd->peer_port, NI_MAXHOST))
|
||||||
{
|
{
|
||||||
my_error(ER_BAD_HOST_ERROR, MYF(0), thd->main_security_ctx.host_or_ip);
|
my_error(ER_BAD_HOST_ERROR, MYF(0));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
if (!(thd->main_security_ctx.ip= my_strdup(ip,MYF(MY_WME))))
|
if (!(thd->main_security_ctx.ip= my_strdup(ip,MYF(MY_WME))))
|
||||||
@ -477,7 +476,7 @@ static int check_connection(THD *thd)
|
|||||||
if (ip_to_hostname(&net->vio->remote, thd->main_security_ctx.ip,
|
if (ip_to_hostname(&net->vio->remote, thd->main_security_ctx.ip,
|
||||||
&thd->main_security_ctx.host, &connect_errors))
|
&thd->main_security_ctx.host, &connect_errors))
|
||||||
{
|
{
|
||||||
my_error(ER_BAD_HOST_ERROR, MYF(0), ip);
|
my_error(ER_BAD_HOST_ERROR, MYF(0));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Copyright 2000-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc.
|
/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -11,8 +11,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
|
||||||
|
|
||||||
|
|
||||||
/* Insert of records */
|
/* Insert of records */
|
||||||
|
|
||||||
@ -3889,7 +3888,7 @@ select_create::prepare(List<Item> &values, SELECT_LEX_UNIT *u)
|
|||||||
|
|
||||||
if (table->s->fields < values.elements)
|
if (table->s->fields < values.elements)
|
||||||
{
|
{
|
||||||
my_error(ER_WRONG_VALUE_COUNT_ON_ROW, MYF(0), 1);
|
my_error(ER_WRONG_VALUE_COUNT_ON_ROW, MYF(0), 1L);
|
||||||
DBUG_RETURN(-1);
|
DBUG_RETURN(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
|
||||||
|
|
||||||
#define MYSQL_LEX 1
|
#define MYSQL_LEX 1
|
||||||
#include "my_global.h"
|
#include "my_global.h"
|
||||||
@ -3412,8 +3412,7 @@ end_with_restore_list:
|
|||||||
hostname_requires_resolving(user->host.str))
|
hostname_requires_resolving(user->host.str))
|
||||||
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
|
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
|
||||||
ER_WARN_HOSTNAME_WONT_WORK,
|
ER_WARN_HOSTNAME_WONT_WORK,
|
||||||
ER(ER_WARN_HOSTNAME_WONT_WORK),
|
ER(ER_WARN_HOSTNAME_WONT_WORK));
|
||||||
user->host.str);
|
|
||||||
// Are we trying to change a password of another user
|
// Are we trying to change a password of another user
|
||||||
DBUG_ASSERT(user->host.str != 0);
|
DBUG_ASSERT(user->host.str != 0);
|
||||||
|
|
||||||
@ -5305,7 +5304,7 @@ mysql_new_select(LEX *lex, bool move_down)
|
|||||||
lex->nest_level++;
|
lex->nest_level++;
|
||||||
if (lex->nest_level > (int) MAX_SELECT_NESTING)
|
if (lex->nest_level > (int) MAX_SELECT_NESTING)
|
||||||
{
|
{
|
||||||
my_error(ER_TOO_HIGH_LEVEL_OF_NESTING_FOR_SELECT,MYF(0),MAX_SELECT_NESTING);
|
my_error(ER_TOO_HIGH_LEVEL_OF_NESTING_FOR_SELECT, MYF(0));
|
||||||
DBUG_RETURN(1);
|
DBUG_RETURN(1);
|
||||||
}
|
}
|
||||||
select_lex->nest_level= lex->nest_level;
|
select_lex->nest_level= lex->nest_level;
|
||||||
|
@ -7024,7 +7024,7 @@ void set_key_field_ptr(KEY *key_info, const uchar *new_buf,
|
|||||||
|
|
||||||
void mem_alloc_error(size_t size)
|
void mem_alloc_error(size_t size)
|
||||||
{
|
{
|
||||||
my_error(ER_OUTOFMEMORY, MYF(0), size);
|
my_error(ER_OUTOFMEMORY, MYF(0), static_cast<int>(size));
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WITH_PARTITION_STORAGE_ENGINE
|
#ifdef WITH_PARTITION_STORAGE_ENGINE
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 2005 MySQL AB, 2009 Sun Microsystems, Inc.
|
/* Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
|
||||||
|
|
||||||
#include "sql_priv.h" // SHOW_MY_BOOL
|
#include "sql_priv.h" // SHOW_MY_BOOL
|
||||||
#include "unireg.h"
|
#include "unireg.h"
|
||||||
@ -548,7 +548,8 @@ static st_plugin_dl *plugin_dl_add(const LEX_STRING *dl, int report)
|
|||||||
if (!cur)
|
if (!cur)
|
||||||
{
|
{
|
||||||
free_plugin_mem(&plugin_dl);
|
free_plugin_mem(&plugin_dl);
|
||||||
report_error(report, ER_OUTOFMEMORY, plugin_dl.dl.length);
|
report_error(report, ER_OUTOFMEMORY,
|
||||||
|
static_cast<int>(plugin_dl.dl.length));
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
@ -570,7 +571,8 @@ static st_plugin_dl *plugin_dl_add(const LEX_STRING *dl, int report)
|
|||||||
if (! (plugin_dl.dl.str= (char*) my_malloc(plugin_dl.dl.length, MYF(0))))
|
if (! (plugin_dl.dl.str= (char*) my_malloc(plugin_dl.dl.length, MYF(0))))
|
||||||
{
|
{
|
||||||
free_plugin_mem(&plugin_dl);
|
free_plugin_mem(&plugin_dl);
|
||||||
report_error(report, ER_OUTOFMEMORY, plugin_dl.dl.length);
|
report_error(report, ER_OUTOFMEMORY,
|
||||||
|
static_cast<int>(plugin_dl.dl.length));
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
}
|
}
|
||||||
plugin_dl.dl.length= copy_and_convert(plugin_dl.dl.str, plugin_dl.dl.length,
|
plugin_dl.dl.length= copy_and_convert(plugin_dl.dl.str, plugin_dl.dl.length,
|
||||||
@ -581,7 +583,8 @@ static st_plugin_dl *plugin_dl_add(const LEX_STRING *dl, int report)
|
|||||||
if (! (tmp= plugin_dl_insert_or_reuse(&plugin_dl)))
|
if (! (tmp= plugin_dl_insert_or_reuse(&plugin_dl)))
|
||||||
{
|
{
|
||||||
free_plugin_mem(&plugin_dl);
|
free_plugin_mem(&plugin_dl);
|
||||||
report_error(report, ER_OUTOFMEMORY, sizeof(struct st_plugin_dl));
|
report_error(report, ER_OUTOFMEMORY,
|
||||||
|
static_cast<int>(sizeof(struct st_plugin_dl)));
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
}
|
}
|
||||||
DBUG_RETURN(tmp);
|
DBUG_RETURN(tmp);
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@file
|
@file
|
||||||
@ -1467,7 +1467,7 @@ static int mysql_test_select(Prepared_statement *stmt,
|
|||||||
|
|
||||||
if (!lex->result && !(lex->result= new (stmt->mem_root) select_send))
|
if (!lex->result && !(lex->result= new (stmt->mem_root) select_send))
|
||||||
{
|
{
|
||||||
my_error(ER_OUTOFMEMORY, MYF(0), sizeof(select_send));
|
my_error(ER_OUTOFMEMORY, MYF(0), static_cast<int>(sizeof(select_send)));
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2543,7 +2543,7 @@ void mysqld_stmt_execute(THD *thd, char *packet_arg, uint packet_length)
|
|||||||
if (!(stmt= find_prepared_statement(thd, stmt_id)))
|
if (!(stmt= find_prepared_statement(thd, stmt_id)))
|
||||||
{
|
{
|
||||||
char llbuf[22];
|
char llbuf[22];
|
||||||
my_error(ER_UNKNOWN_STMT_HANDLER, MYF(0), sizeof(llbuf),
|
my_error(ER_UNKNOWN_STMT_HANDLER, MYF(0), static_cast<int>(sizeof(llbuf)),
|
||||||
llstr(stmt_id, llbuf), "mysqld_stmt_execute");
|
llstr(stmt_id, llbuf), "mysqld_stmt_execute");
|
||||||
DBUG_VOID_RETURN;
|
DBUG_VOID_RETURN;
|
||||||
}
|
}
|
||||||
@ -2597,7 +2597,7 @@ void mysql_sql_stmt_execute(THD *thd)
|
|||||||
if (!(stmt= (Prepared_statement*) thd->stmt_map.find_by_name(name)))
|
if (!(stmt= (Prepared_statement*) thd->stmt_map.find_by_name(name)))
|
||||||
{
|
{
|
||||||
my_error(ER_UNKNOWN_STMT_HANDLER, MYF(0),
|
my_error(ER_UNKNOWN_STMT_HANDLER, MYF(0),
|
||||||
name->length, name->str, "EXECUTE");
|
static_cast<int>(name->length), name->str, "EXECUTE");
|
||||||
DBUG_VOID_RETURN;
|
DBUG_VOID_RETURN;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2639,7 +2639,7 @@ void mysqld_stmt_fetch(THD *thd, char *packet, uint packet_length)
|
|||||||
if (!(stmt= find_prepared_statement(thd, stmt_id)))
|
if (!(stmt= find_prepared_statement(thd, stmt_id)))
|
||||||
{
|
{
|
||||||
char llbuf[22];
|
char llbuf[22];
|
||||||
my_error(ER_UNKNOWN_STMT_HANDLER, MYF(0), sizeof(llbuf),
|
my_error(ER_UNKNOWN_STMT_HANDLER, MYF(0), static_cast<int>(sizeof(llbuf)),
|
||||||
llstr(stmt_id, llbuf), "mysqld_stmt_fetch");
|
llstr(stmt_id, llbuf), "mysqld_stmt_fetch");
|
||||||
DBUG_VOID_RETURN;
|
DBUG_VOID_RETURN;
|
||||||
}
|
}
|
||||||
@ -2699,7 +2699,7 @@ void mysqld_stmt_reset(THD *thd, char *packet)
|
|||||||
if (!(stmt= find_prepared_statement(thd, stmt_id)))
|
if (!(stmt= find_prepared_statement(thd, stmt_id)))
|
||||||
{
|
{
|
||||||
char llbuf[22];
|
char llbuf[22];
|
||||||
my_error(ER_UNKNOWN_STMT_HANDLER, MYF(0), sizeof(llbuf),
|
my_error(ER_UNKNOWN_STMT_HANDLER, MYF(0), static_cast<int>(sizeof(llbuf)),
|
||||||
llstr(stmt_id, llbuf), "mysqld_stmt_reset");
|
llstr(stmt_id, llbuf), "mysqld_stmt_reset");
|
||||||
DBUG_VOID_RETURN;
|
DBUG_VOID_RETURN;
|
||||||
}
|
}
|
||||||
@ -2774,7 +2774,7 @@ void mysql_sql_stmt_close(THD *thd)
|
|||||||
|
|
||||||
if (! (stmt= (Prepared_statement*) thd->stmt_map.find_by_name(name)))
|
if (! (stmt= (Prepared_statement*) thd->stmt_map.find_by_name(name)))
|
||||||
my_error(ER_UNKNOWN_STMT_HANDLER, MYF(0),
|
my_error(ER_UNKNOWN_STMT_HANDLER, MYF(0),
|
||||||
name->length, name->str, "DEALLOCATE PREPARE");
|
static_cast<int>(name->length), name->str, "DEALLOCATE PREPARE");
|
||||||
else if (stmt->is_in_use())
|
else if (stmt->is_in_use())
|
||||||
my_error(ER_PS_NO_RECURSION, MYF(0));
|
my_error(ER_PS_NO_RECURSION, MYF(0));
|
||||||
else
|
else
|
||||||
|
@ -86,7 +86,7 @@ bool reload_acl_and_cache(THD *thd, unsigned long options,
|
|||||||
When an error is returned, my_message may have not been called and
|
When an error is returned, my_message may have not been called and
|
||||||
the client will hang waiting for a response.
|
the client will hang waiting for a response.
|
||||||
*/
|
*/
|
||||||
my_error(ER_UNKNOWN_ERROR, MYF(0), "FLUSH PRIVILEGES failed");
|
my_error(ER_UNKNOWN_ERROR, MYF(0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1490,7 +1490,7 @@ bool change_master(THD* thd, Master_info* mi)
|
|||||||
get_dynamic(&lex_mi->repl_ignore_server_ids, (uchar*) &s_id, i);
|
get_dynamic(&lex_mi->repl_ignore_server_ids, (uchar*) &s_id, i);
|
||||||
if (s_id == ::server_id && replicate_same_server_id)
|
if (s_id == ::server_id && replicate_same_server_id)
|
||||||
{
|
{
|
||||||
my_error(ER_SLAVE_IGNORE_SERVER_IDS, MYF(0), s_id);
|
my_error(ER_SLAVE_IGNORE_SERVER_IDS, MYF(0), static_cast<int>(s_id));
|
||||||
ret= TRUE;
|
ret= TRUE;
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
@ -2618,7 +2618,8 @@ int prepare_create_field(Create_field *sql_field,
|
|||||||
MAX_FIELD_CHARLENGTH)
|
MAX_FIELD_CHARLENGTH)
|
||||||
{
|
{
|
||||||
my_printf_error(ER_TOO_BIG_FIELDLENGTH, ER(ER_TOO_BIG_FIELDLENGTH),
|
my_printf_error(ER_TOO_BIG_FIELDLENGTH, ER(ER_TOO_BIG_FIELDLENGTH),
|
||||||
MYF(0), sql_field->field_name, MAX_FIELD_CHARLENGTH);
|
MYF(0), sql_field->field_name,
|
||||||
|
static_cast<ulong>(MAX_FIELD_CHARLENGTH));
|
||||||
DBUG_RETURN(1);
|
DBUG_RETURN(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3614,12 +3615,12 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
|
|||||||
(MODE_STRICT_TRANS_TABLES | MODE_STRICT_ALL_TABLES)))
|
(MODE_STRICT_TRANS_TABLES | MODE_STRICT_ALL_TABLES)))
|
||||||
{
|
{
|
||||||
my_error(ER_TOO_LONG_INDEX_COMMENT, MYF(0),
|
my_error(ER_TOO_LONG_INDEX_COMMENT, MYF(0),
|
||||||
key_info->name, (uint) INDEX_COMMENT_MAXLEN);
|
key_info->name, static_cast<ulong>(INDEX_COMMENT_MAXLEN));
|
||||||
DBUG_RETURN(-1);
|
DBUG_RETURN(-1);
|
||||||
}
|
}
|
||||||
char warn_buff[MYSQL_ERRMSG_SIZE];
|
char warn_buff[MYSQL_ERRMSG_SIZE];
|
||||||
my_snprintf(warn_buff, sizeof(warn_buff), ER(ER_TOO_LONG_INDEX_COMMENT),
|
my_snprintf(warn_buff, sizeof(warn_buff), ER(ER_TOO_LONG_INDEX_COMMENT),
|
||||||
key_info->name, (uint) INDEX_COMMENT_MAXLEN);
|
key_info->name, static_cast<ulong>(INDEX_COMMENT_MAXLEN));
|
||||||
/* do not push duplicate warnings */
|
/* do not push duplicate warnings */
|
||||||
if (!check_duplicate_warning(thd, warn_buff, strlen(warn_buff)))
|
if (!check_duplicate_warning(thd, warn_buff, strlen(warn_buff)))
|
||||||
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
|
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
|
||||||
@ -3747,7 +3748,8 @@ static bool prepare_blob_field(THD *thd, Create_field *sql_field)
|
|||||||
MODE_STRICT_ALL_TABLES)))
|
MODE_STRICT_ALL_TABLES)))
|
||||||
{
|
{
|
||||||
my_error(ER_TOO_BIG_FIELDLENGTH, MYF(0), sql_field->field_name,
|
my_error(ER_TOO_BIG_FIELDLENGTH, MYF(0), sql_field->field_name,
|
||||||
MAX_FIELD_VARCHARLENGTH / sql_field->charset->mbmaxlen);
|
static_cast<ulong>(MAX_FIELD_VARCHARLENGTH /
|
||||||
|
sql_field->charset->mbmaxlen));
|
||||||
DBUG_RETURN(1);
|
DBUG_RETURN(1);
|
||||||
}
|
}
|
||||||
sql_field->sql_type= MYSQL_TYPE_BLOB;
|
sql_field->sql_type= MYSQL_TYPE_BLOB;
|
||||||
|
@ -695,7 +695,7 @@ static bool event_scheduler_update(sys_var *self, THD *thd, enum_var_type type)
|
|||||||
: Events::stop();
|
: Events::stop();
|
||||||
mysql_mutex_lock(&LOCK_global_system_variables);
|
mysql_mutex_lock(&LOCK_global_system_variables);
|
||||||
if (ret)
|
if (ret)
|
||||||
my_error(ER_EVENT_SET_VAR_ERROR, MYF(0));
|
my_error(ER_EVENT_SET_VAR_ERROR, MYF(0), 0);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2504,7 +2504,7 @@ static bool update_last_insert_id(THD *thd, set_var *var)
|
|||||||
{
|
{
|
||||||
if (!var->value)
|
if (!var->value)
|
||||||
{
|
{
|
||||||
my_error(ER_NO_DEFAULT, MYF(0), var->var->name);
|
my_error(ER_NO_DEFAULT, MYF(0), var->var->name.str);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
thd->first_successful_insert_id_in_prev_stmt=
|
thd->first_successful_insert_id_in_prev_stmt=
|
||||||
@ -2553,7 +2553,7 @@ static bool update_insert_id(THD *thd, set_var *var)
|
|||||||
{
|
{
|
||||||
if (!var->value)
|
if (!var->value)
|
||||||
{
|
{
|
||||||
my_error(ER_NO_DEFAULT, MYF(0), var->var->name);
|
my_error(ER_NO_DEFAULT, MYF(0), var->var->name.str);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
thd->force_one_auto_inc_interval(var->save_result.ulonglong_value);
|
thd->force_one_auto_inc_interval(var->save_result.ulonglong_value);
|
||||||
@ -2576,7 +2576,7 @@ static bool update_rand_seed1(THD *thd, set_var *var)
|
|||||||
{
|
{
|
||||||
if (!var->value)
|
if (!var->value)
|
||||||
{
|
{
|
||||||
my_error(ER_NO_DEFAULT, MYF(0), var->var->name);
|
my_error(ER_NO_DEFAULT, MYF(0), var->var->name.str);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
thd->rand.seed1= (ulong) var->save_result.ulonglong_value;
|
thd->rand.seed1= (ulong) var->save_result.ulonglong_value;
|
||||||
@ -2598,7 +2598,7 @@ static bool update_rand_seed2(THD *thd, set_var *var)
|
|||||||
{
|
{
|
||||||
if (!var->value)
|
if (!var->value)
|
||||||
{
|
{
|
||||||
my_error(ER_NO_DEFAULT, MYF(0), var->var->name);
|
my_error(ER_NO_DEFAULT, MYF(0), var->var->name.str);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
thd->rand.seed2= (ulong) var->save_result.ulonglong_value;
|
thd->rand.seed2= (ulong) var->save_result.ulonglong_value;
|
||||||
|
@ -2422,7 +2422,7 @@ void open_table_error(TABLE_SHARE *share, int error, int db_errno, int errarg)
|
|||||||
default: /* Better wrong error than none */
|
default: /* Better wrong error than none */
|
||||||
case 4:
|
case 4:
|
||||||
strxmov(buff, share->normalized_path.str, reg_ext, NullS);
|
strxmov(buff, share->normalized_path.str, reg_ext, NullS);
|
||||||
my_error(ER_NOT_FORM_FILE, errortype, buff, 0);
|
my_error(ER_NOT_FORM_FILE, errortype, buff);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
DBUG_VOID_RETURN;
|
DBUG_VOID_RETURN;
|
||||||
@ -3009,7 +3009,8 @@ Table_check_intact::check(TABLE *table, const TABLE_FIELD_DEF *table_def)
|
|||||||
report_error(ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE,
|
report_error(ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE,
|
||||||
ER(ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE),
|
ER(ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE),
|
||||||
table->alias, table_def->count, table->s->fields,
|
table->alias, table_def->count, table->s->fields,
|
||||||
table->s->mysql_version, MYSQL_VERSION_ID);
|
static_cast<int>(table->s->mysql_version),
|
||||||
|
MYSQL_VERSION_ID);
|
||||||
DBUG_RETURN(TRUE);
|
DBUG_RETURN(TRUE);
|
||||||
}
|
}
|
||||||
else if (MYSQL_VERSION_ID == table->s->mysql_version)
|
else if (MYSQL_VERSION_ID == table->s->mysql_version)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 2000-2006 MySQL AB, 2008-2009 Sun Microsystems, Inc
|
/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -11,8 +11,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Functions to create a unireg form-file from a FIELD and a fieldname-fieldinfo
|
Functions to create a unireg form-file from a FIELD and a fieldname-fieldinfo
|
||||||
@ -230,13 +229,13 @@ bool mysql_create_frm(THD *thd, const char *file_name,
|
|||||||
(MODE_STRICT_TRANS_TABLES | MODE_STRICT_ALL_TABLES)))
|
(MODE_STRICT_TRANS_TABLES | MODE_STRICT_ALL_TABLES)))
|
||||||
{
|
{
|
||||||
my_error(ER_TOO_LONG_TABLE_COMMENT, MYF(0),
|
my_error(ER_TOO_LONG_TABLE_COMMENT, MYF(0),
|
||||||
real_table_name, (uint) TABLE_COMMENT_MAXLEN);
|
real_table_name, static_cast<ulong>(TABLE_COMMENT_MAXLEN));
|
||||||
my_free(screen_buff);
|
my_free(screen_buff);
|
||||||
DBUG_RETURN(1);
|
DBUG_RETURN(1);
|
||||||
}
|
}
|
||||||
char warn_buff[MYSQL_ERRMSG_SIZE];
|
char warn_buff[MYSQL_ERRMSG_SIZE];
|
||||||
my_snprintf(warn_buff, sizeof(warn_buff), ER(ER_TOO_LONG_TABLE_COMMENT),
|
my_snprintf(warn_buff, sizeof(warn_buff), ER(ER_TOO_LONG_TABLE_COMMENT),
|
||||||
real_table_name, (uint) TABLE_COMMENT_MAXLEN);
|
real_table_name, static_cast<ulong>(TABLE_COMMENT_MAXLEN));
|
||||||
/* do not push duplicate warnings */
|
/* do not push duplicate warnings */
|
||||||
if (!check_duplicate_warning(current_thd, warn_buff, strlen(warn_buff)))
|
if (!check_duplicate_warning(current_thd, warn_buff, strlen(warn_buff)))
|
||||||
push_warning(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
|
push_warning(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
|
||||||
@ -737,13 +736,14 @@ static bool pack_header(uchar *forminfo, enum legacy_db_type table_type,
|
|||||||
if ((current_thd->variables.sql_mode &
|
if ((current_thd->variables.sql_mode &
|
||||||
(MODE_STRICT_TRANS_TABLES | MODE_STRICT_ALL_TABLES)))
|
(MODE_STRICT_TRANS_TABLES | MODE_STRICT_ALL_TABLES)))
|
||||||
{
|
{
|
||||||
my_error(ER_TOO_LONG_FIELD_COMMENT, MYF(0),
|
my_error(ER_TOO_LONG_FIELD_COMMENT, MYF(0), field->field_name,
|
||||||
field->field_name, (uint) COLUMN_COMMENT_MAXLEN);
|
static_cast<ulong>(COLUMN_COMMENT_MAXLEN));
|
||||||
DBUG_RETURN(1);
|
DBUG_RETURN(1);
|
||||||
}
|
}
|
||||||
char warn_buff[MYSQL_ERRMSG_SIZE];
|
char warn_buff[MYSQL_ERRMSG_SIZE];
|
||||||
my_snprintf(warn_buff, sizeof(warn_buff), ER(ER_TOO_LONG_FIELD_COMMENT),
|
my_snprintf(warn_buff, sizeof(warn_buff), ER(ER_TOO_LONG_FIELD_COMMENT),
|
||||||
field->field_name, (uint) COLUMN_COMMENT_MAXLEN);
|
field->field_name,
|
||||||
|
static_cast<ulong>(COLUMN_COMMENT_MAXLEN));
|
||||||
/* do not push duplicate warnings */
|
/* do not push duplicate warnings */
|
||||||
if (!check_duplicate_warning(current_thd, warn_buff, strlen(warn_buff)))
|
if (!check_duplicate_warning(current_thd, warn_buff, strlen(warn_buff)))
|
||||||
push_warning(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
|
push_warning(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
|
||||||
@ -831,7 +831,7 @@ static bool pack_header(uchar *forminfo, enum legacy_db_type table_type,
|
|||||||
|
|
||||||
if (reclength > (ulong) file->max_record_length())
|
if (reclength > (ulong) file->max_record_length())
|
||||||
{
|
{
|
||||||
my_error(ER_TOO_BIG_ROWSIZE, MYF(0), (uint) file->max_record_length());
|
my_error(ER_TOO_BIG_ROWSIZE, MYF(0), static_cast<long>(file->max_record_length()));
|
||||||
DBUG_RETURN(1);
|
DBUG_RETURN(1);
|
||||||
}
|
}
|
||||||
/* Hack to avoid bugs with small static rows in MySQL */
|
/* Hack to avoid bugs with small static rows in MySQL */
|
||||||
|
@ -984,7 +984,7 @@ static int show_func_example(MYSQL_THD thd, struct st_mysql_show_var *var,
|
|||||||
var->type= SHOW_CHAR;
|
var->type= SHOW_CHAR;
|
||||||
var->value= buf; // it's of SHOW_VAR_FUNC_BUFF_SIZE bytes
|
var->value= buf; // it's of SHOW_VAR_FUNC_BUFF_SIZE bytes
|
||||||
my_snprintf(buf, SHOW_VAR_FUNC_BUFF_SIZE,
|
my_snprintf(buf, SHOW_VAR_FUNC_BUFF_SIZE,
|
||||||
"enum_var is %u, ulong_var is %lu, %.6b", // %b is MySQL extension
|
"enum_var is %lu, ulong_var is %lu, %.6b", // %b is MySQL extension
|
||||||
srv_enum_var, srv_ulong_var, "really");
|
srv_enum_var, srv_ulong_var, "really");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user