mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/dlenev/src/mysql-5.0-bg7637
This commit is contained in:
@ -228,10 +228,6 @@ SOURCE=..\sql\ha_innodb.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\sql\ha_isammrg.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\sql\ha_myisam.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@ -169,10 +169,6 @@ SOURCE=..\sql\ha_innodb.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\sql\ha_isammrg.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\sql\ha_myisam.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@ -41,7 +41,7 @@ static char *HEADERFILE= (char*) "mysqld_error.h";
|
||||
static char *NAMEFILE= (char*) "mysqld_ername.h";
|
||||
static char *STATEFILE= (char*) "sql_state.h";
|
||||
static char *TXTFILE= (char*) "../sql/share/errmsg.txt";
|
||||
static char *DATADIR= (char*) "../sql/share/";
|
||||
static char *DATADIRECTORY= (char*) "../sql/share/";
|
||||
static char *default_dbug_option= (char*) "d:t:O,/tmp/comp_err.trace";
|
||||
|
||||
/* Header for errmsg.sys files */
|
||||
@ -112,8 +112,8 @@ static struct my_option my_long_options[]=
|
||||
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"in_file", 'F', "Input file", (gptr *) & TXTFILE, (gptr *) & TXTFILE,
|
||||
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"out_dir", 'D', "Output base directory", (gptr *) & DATADIR,
|
||||
(gptr *) & DATADIR,
|
||||
{"out_dir", 'D', "Output base directory", (gptr *) & DATADIRECTORY,
|
||||
(gptr *) & DATADIRECTORY,
|
||||
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"out_file", 'O', "Output filename (errmsg.sys)", (gptr *) & OUTFILE,
|
||||
(gptr *) & OUTFILE, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
@ -281,7 +281,7 @@ static int create_sys_files(struct languages *lang_head,
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
|
||||
outfile_end= strxmov(outfile, DATADIR,
|
||||
outfile_end= strxmov(outfile, DATADIRECTORY,
|
||||
tmp_lang->lang_long_name, NullS);
|
||||
if (!my_stat(outfile, &stat_info,MYF(0)))
|
||||
{
|
||||
|
@ -259,6 +259,8 @@ extern char wild_many,wild_one,wild_prefix;
|
||||
extern const char *charsets_dir;
|
||||
extern char *defaults_extra_file;
|
||||
|
||||
extern my_bool timed_mutexes;
|
||||
|
||||
typedef struct wild_file_pack /* Struct to hold info when selecting files */
|
||||
{
|
||||
uint wilds; /* How many wildcards */
|
||||
|
@ -82,10 +82,17 @@ ut_usectime(
|
||||
ulint* sec, /* out: seconds since the Epoch */
|
||||
ulint* ms) /* out: microseconds since the Epoch+*sec */
|
||||
{
|
||||
#ifdef __WIN__
|
||||
SYSTEMTIME st;
|
||||
GetLocalTime(&st);
|
||||
*sec = (ulint) st.wSecond;
|
||||
*ms = (ulint) st.wMilliseconds;
|
||||
#else
|
||||
struct timeval tv;
|
||||
gettimeofday(&tv,NULL);
|
||||
*sec = (ulint) tv.tv_sec;
|
||||
*ms = (ulint) tv.tv_usec;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**************************************************************
|
||||
|
@ -1740,7 +1740,7 @@ static int stmt_read_row_no_data(MYSQL_STMT *stmt, unsigned char **row);
|
||||
STMT_ATTR_UPDATE_MAX_LENGTH attribute is set.
|
||||
*/
|
||||
static void stmt_update_metadata(MYSQL_STMT *stmt, MYSQL_ROWS *data);
|
||||
static bool setup_one_fetch_function(MYSQL_BIND *bind, MYSQL_FIELD *field);
|
||||
static my_bool setup_one_fetch_function(MYSQL_BIND *bind, MYSQL_FIELD *field);
|
||||
|
||||
/*
|
||||
Maximum sizes of MYSQL_TYPE_DATE, MYSQL_TYPE_TIME, MYSQL_TYPE_DATETIME
|
||||
@ -3718,7 +3718,7 @@ static void fetch_float_with_conversion(MYSQL_BIND *param, MYSQL_FIELD *field,
|
||||
longlongstore(buffer, data);
|
||||
}
|
||||
*param->error= value != (param->is_unsigned ?
|
||||
(double) (*(ulonglong*) buffer) :
|
||||
ulonglong2double(*(ulonglong*) buffer) :
|
||||
(double) (*(longlong*) buffer));
|
||||
break;
|
||||
case MYSQL_TYPE_FLOAT:
|
||||
|
30
mysql-test/include/testdb_only.inc
Normal file
30
mysql-test/include/testdb_only.inc
Normal file
@ -0,0 +1,30 @@
|
||||
#################### include/testdb_only.inc ######################
|
||||
# #
|
||||
# We must prevent to work on databases created by customers, #
|
||||
# because we DROP/CREATE/MODIFY objects with sometimes common #
|
||||
# names like STAFF, EMPLOYEE etc. #
|
||||
# #
|
||||
# Therefore we check the environment variable USE_RUNNING_SERVER. #
|
||||
# USE_RUNNING_SERVER is exported by "mysql-test-run" and could #
|
||||
# contain the following values: #
|
||||
# 0 -- mysql-test-run was started without the --extern option #
|
||||
# That means the test will be performed within the test #
|
||||
# area 'mysql-test/var/...' . #
|
||||
# 1 -- mysql-test-run was started with the --extern option #
|
||||
# That means the test will be performed by an already #
|
||||
# running server and data modifications will most probably #
|
||||
# outside of the common test area 'mysql-test/var/...' . #
|
||||
# #
|
||||
# If USE_RUNNING_SERVER is not 0 the test will be skipped. #
|
||||
# #
|
||||
###################################################################
|
||||
|
||||
--disable_query_log
|
||||
eval set @USE_RUNNING_SERVER= '$USE_RUNNING_SERVER';
|
||||
--require r/testdb_only.require
|
||||
SELECT 'use extern server'
|
||||
AS "Variable_name ",
|
||||
IF(@USE_RUNNING_SERVER= '1','YES',
|
||||
IF(@USE_RUNNING_SERVER= '0','NO','UNEXPECTED'))
|
||||
AS "Value" ;
|
||||
--enable_query_log
|
@ -224,7 +224,7 @@ EXTRA_MASTER_OPT=""
|
||||
EXTRA_MYSQL_TEST_OPT=""
|
||||
EXTRA_MYSQLDUMP_OPT=""
|
||||
EXTRA_MYSQLBINLOG_OPT=""
|
||||
USE_RUNNING_SERVER=""
|
||||
USE_RUNNING_SERVER=0
|
||||
USE_NDBCLUSTER=""
|
||||
USE_RUNNING_NDBCLUSTER=""
|
||||
DO_GCOV=""
|
||||
@ -255,7 +255,7 @@ NDBD_EXTRA_OPTS=
|
||||
while test $# -gt 0; do
|
||||
case "$1" in
|
||||
--embedded-server) USE_EMBEDDED_SERVER=1 USE_MANAGER=0 NO_SLAVE=1 ; \
|
||||
USE_RUNNING_SERVER="" RESULT_EXT=".es" TEST_MODE="embedded" ;;
|
||||
USE_RUNNING_SERVER=0 RESULT_EXT=".es" TEST_MODE="embedded" ;;
|
||||
--user=*) DBUSER=`$ECHO "$1" | $SED -e "s;--user=;;"` ;;
|
||||
--force) FORCE=1 ;;
|
||||
--timer) USE_TIMER=1 ;;
|
||||
@ -265,8 +265,8 @@ while test $# -gt 0; do
|
||||
MASTER_MYSQLD=`$ECHO "$1" | $SED -e "s;--master-binary=;;"` ;;
|
||||
--slave-binary=*)
|
||||
SLAVE_MYSQLD=`$ECHO "$1" | $SED -e "s;--slave-binary=;;"` ;;
|
||||
--local) USE_RUNNING_SERVER="" ;;
|
||||
--extern) USE_RUNNING_SERVER="1" ;;
|
||||
--local) USE_RUNNING_SERVER=0 ;;
|
||||
--extern) USE_RUNNING_SERVER=1 ;;
|
||||
--with-ndbcluster)
|
||||
USE_NDBCLUSTER="--ndbcluster" ;;
|
||||
--ndb-connectstring=*)
|
||||
@ -303,7 +303,7 @@ while test $# -gt 0; do
|
||||
--no-manager | --skip-manager) USE_MANAGER=0 ;;
|
||||
--manager)
|
||||
USE_MANAGER=1
|
||||
USE_RUNNING_SERVER=
|
||||
USE_RUNNING_SERVER=0
|
||||
;;
|
||||
--start-and-exit)
|
||||
START_AND_EXIT=1
|
||||
@ -372,7 +372,7 @@ while test $# -gt 0; do
|
||||
EXTRA_SLAVE_MYSQLD_OPT="$EXTRA_SLAVE_MYSQLD_OPT --gdb"
|
||||
# This needs to be checked properly
|
||||
# USE_MANAGER=1
|
||||
USE_RUNNING_SERVER=""
|
||||
USE_RUNNING_SERVER=0
|
||||
;;
|
||||
--client-gdb )
|
||||
if [ x$BINARY_DIST = x1 ] ; then
|
||||
@ -385,7 +385,7 @@ while test $# -gt 0; do
|
||||
--manual-gdb )
|
||||
DO_GDB=1
|
||||
MANUAL_GDB=1
|
||||
USE_RUNNING_SERVER=""
|
||||
USE_RUNNING_SERVER=0
|
||||
EXTRA_MASTER_MYSQLD_OPT="$EXTRA_MASTER_MYSQLD_OPT --gdb"
|
||||
EXTRA_SLAVE_MYSQLD_OPT="$EXTRA_SLAVE_MYSQLD_OPT --gdb"
|
||||
;;
|
||||
@ -394,7 +394,7 @@ while test $# -gt 0; do
|
||||
$ECHO "Note: you will get more meaningful output on a source distribution compiled with debugging option when running tests with --ddd option"
|
||||
fi
|
||||
DO_DDD=1
|
||||
USE_RUNNING_SERVER=""
|
||||
USE_RUNNING_SERVER=0
|
||||
EXTRA_MASTER_MYSQLD_OPT="$EXTRA_MASTER_MYSQLD_OPT --gdb"
|
||||
EXTRA_SLAVE_MYSQLD_OPT="$EXTRA_SLAVE_MYSQLD_OPT --gdb"
|
||||
;;
|
||||
@ -412,7 +412,7 @@ while test $# -gt 0; do
|
||||
EXTRA_SLAVE_MYSQLD_OPT="$EXTRA_SLAVE_MYSQLD_OPT --skip-safemalloc --skip-bdb"
|
||||
SLEEP_TIME_AFTER_RESTART=10
|
||||
SLEEP_TIME_FOR_DELETE=60
|
||||
USE_RUNNING_SERVER=""
|
||||
USE_RUNNING_SERVER=0
|
||||
if test "$1" = "--valgrind-all"
|
||||
then
|
||||
VALGRIND="$VALGRIND -v --show-reachable=yes"
|
||||
@ -627,9 +627,9 @@ fi
|
||||
|
||||
if [ -z "$1" ]
|
||||
then
|
||||
USE_RUNNING_SERVER=""
|
||||
USE_RUNNING_SERVER=0
|
||||
fi
|
||||
if [ -n "$USE_RUNNING_SERVER" ]
|
||||
if [ $USE_RUNNING_SERVER -eq 1 ]
|
||||
then
|
||||
MASTER_MYSOCK=$LOCAL_SOCKET;
|
||||
DBUSER=${DBUSER:-test}
|
||||
@ -801,7 +801,7 @@ report_stats () {
|
||||
$ECHO "http://www.mysql.com/doc/en/MySQL_test_suite.html"
|
||||
fi
|
||||
|
||||
if test -z "$USE_RUNNING_SERVER"
|
||||
if [ $USE_RUNNING_SERVER -eq 0 ]
|
||||
then
|
||||
|
||||
# Report if there was any fatal warnings/errors in the log files
|
||||
@ -1511,7 +1511,7 @@ run_testcase ()
|
||||
done
|
||||
fi
|
||||
|
||||
if [ -z "$USE_RUNNING_SERVER" ] ;
|
||||
if [ $USE_RUNNING_SERVER -eq 0 ] ;
|
||||
then
|
||||
if [ -f $master_opt_file ] ;
|
||||
then
|
||||
@ -1655,7 +1655,7 @@ run_testcase ()
|
||||
if [ x$FORCE != x1 ] ; then
|
||||
$ECHO "Aborting: $tname failed in $TEST_MODE mode. To continue, re-run with '--force'."
|
||||
$ECHO
|
||||
if [ -z "$DO_GDB" ] && [ -z "$USE_RUNNING_SERVER" ] && \
|
||||
if [ -z "$DO_GDB" ] && [ $USE_RUNNING_SERVER -eq 0 ] && \
|
||||
[ -z "$DO_DDD" ] && [ -z "$USE_EMBEDDED_SERVER" ]
|
||||
then
|
||||
mysql_stop
|
||||
@ -1664,7 +1664,7 @@ run_testcase ()
|
||||
exit 1
|
||||
fi
|
||||
FAILED_CASES="$FAILED_CASES $tname"
|
||||
if [ -z "$DO_GDB" ] && [ -z "$USE_RUNNING_SERVER" ] && \
|
||||
if [ -z "$DO_GDB" ] && [ $USE_RUNNING_SERVER -eq 0 ] && \
|
||||
[ -z "$DO_DDD" ] && [ -z "$USE_EMBEDDED_SERVER" ]
|
||||
then
|
||||
mysql_restart
|
||||
@ -1683,7 +1683,7 @@ run_testcase ()
|
||||
[ "$DO_GCOV" ] && gcov_prepare
|
||||
[ "$DO_GPROF" ] && gprof_prepare
|
||||
|
||||
if [ -z "$USE_RUNNING_SERVER" ]
|
||||
if [ $USE_RUNNING_SERVER -eq 0 ]
|
||||
then
|
||||
if [ -z "$FAST_START" ]
|
||||
then
|
||||
@ -1744,6 +1744,9 @@ fi
|
||||
|
||||
$ECHO "Starting Tests"
|
||||
|
||||
# Some test cases need USE_RUNNING_SERVER
|
||||
export USE_RUNNING_SERVER
|
||||
|
||||
#
|
||||
# This can probably be deleted
|
||||
#
|
||||
@ -1816,7 +1819,7 @@ fi
|
||||
$ECHO $DASH72
|
||||
$ECHO
|
||||
|
||||
if [ -z "$DO_GDB" ] && [ -z "$USE_RUNNING_SERVER" ] && [ -z "$DO_DDD" ]
|
||||
if [ -z "$DO_GDB" ] && [ $USE_RUNNING_SERVER -eq 0 ] && [ -z "$DO_DDD" ]
|
||||
then
|
||||
mysql_stop
|
||||
fi
|
||||
|
@ -34,13 +34,13 @@ col5 enum('PENDING', 'ACTIVE', 'DISABLED') not null,
|
||||
col6 int not null, to_be_deleted int) ENGINE=ndbcluster;
|
||||
show table status;
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 ndbcluster 10 Dynamic 0 0 0 0 0 0 1 NULL NULL NULL latin1_swedish_ci NULL number_of_replicas: 2
|
||||
t1 ndbcluster 10 Dynamic 0 0 # # 0 # 1 # # # latin1_swedish_ci NULL #
|
||||
SET SQL_MODE=NO_AUTO_VALUE_ON_ZERO;
|
||||
insert into t1 values
|
||||
(0,4,3,5,"PENDING",1,7),(NULL,4,3,5,"PENDING",1,7),(31,4,3,5,"PENDING",1,7), (7,4,3,5,"PENDING",1,7), (NULL,4,3,5,"PENDING",1,7), (100,4,3,5,"PENDING",1,7), (99,4,3,5,"PENDING",1,7), (8,4,3,5,"PENDING",1,7), (NULL,4,3,5,"PENDING",1,7);
|
||||
show table status;
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 ndbcluster 10 Dynamic 9 96 131072 0 0 0 101 NULL NULL NULL latin1_swedish_ci NULL number_of_replicas: 2
|
||||
t1 ndbcluster 10 Dynamic 9 96 # # 0 # 101 # # # latin1_swedish_ci NULL #
|
||||
select * from t1 order by col1;
|
||||
col1 col2 col3 col4 col5 col6 to_be_deleted
|
||||
0 4 3 5 PENDING 1 7
|
||||
@ -60,7 +60,7 @@ change column col2 fourth varchar(30) not null after col3,
|
||||
modify column col6 int not null first;
|
||||
show table status;
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 ndbcluster 10 Dynamic 9 152 131072 0 0 0 102 NULL NULL NULL latin1_swedish_ci NULL number_of_replicas: 2
|
||||
t1 ndbcluster 10 Dynamic 9 152 # # 0 # 102 # # # latin1_swedish_ci NULL #
|
||||
select * from t1 order by col1;
|
||||
col6 col1 col3 fourth col4 col4_5 col5 col7 col8
|
||||
1 0 3 4 5 PENDING 0000-00-00 00:00:00
|
||||
@ -75,7 +75,7 @@ col6 col1 col3 fourth col4 col4_5 col5 col7 col8
|
||||
insert into t1 values (2, NULL,4,3,5,99,"PENDING","EXTRA",'2004-01-01 00:00:00');
|
||||
show table status;
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 ndbcluster 10 Dynamic 10 152 131072 0 0 0 103 NULL NULL NULL latin1_swedish_ci NULL number_of_replicas: 2
|
||||
t1 ndbcluster 10 Dynamic 10 152 # # 0 # 103 # # # latin1_swedish_ci NULL #
|
||||
select * from t1 order by col1;
|
||||
col6 col1 col3 fourth col4 col4_5 col5 col7 col8
|
||||
1 0 3 4 5 PENDING 0000-00-00 00:00:00
|
||||
|
@ -144,8 +144,8 @@ Handler_discover 1
|
||||
flush tables;
|
||||
show table status;
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t6 MyISAM 9 Fixed 1 260 # # # 0 NULL # # NULL # NULL
|
||||
t7 ndbcluster 9 Fixed 1 276 # # # 0 NULL # # NULL # NULL number_of_replicas: 2
|
||||
t6 MyISAM 9 Fixed 1 260 # # # 0 NULL # # NULL # NULL #
|
||||
t7 ndbcluster 9 Fixed 1 276 # # # 0 NULL # # NULL # NULL #
|
||||
show status like 'handler_discover%';
|
||||
Variable_name Value
|
||||
Handler_discover 2
|
||||
|
2
mysql-test/r/testdb_only.require
Normal file
2
mysql-test/r/testdb_only.require
Normal file
@ -0,0 +1,2 @@
|
||||
Variable_name Value
|
||||
use extern server NO
|
@ -47,10 +47,12 @@ col3 varchar (20) not null,
|
||||
col4 varchar(4) not null,
|
||||
col5 enum('PENDING', 'ACTIVE', 'DISABLED') not null,
|
||||
col6 int not null, to_be_deleted int) ENGINE=ndbcluster;
|
||||
--replace_column 7 # 8 # 10 # 12 # 13 # 14 # 18 #
|
||||
show table status;
|
||||
SET SQL_MODE=NO_AUTO_VALUE_ON_ZERO;
|
||||
insert into t1 values
|
||||
(0,4,3,5,"PENDING",1,7),(NULL,4,3,5,"PENDING",1,7),(31,4,3,5,"PENDING",1,7), (7,4,3,5,"PENDING",1,7), (NULL,4,3,5,"PENDING",1,7), (100,4,3,5,"PENDING",1,7), (99,4,3,5,"PENDING",1,7), (8,4,3,5,"PENDING",1,7), (NULL,4,3,5,"PENDING",1,7);
|
||||
--replace_column 7 # 8 # 10 # 12 # 13 # 14 # 18 #
|
||||
show table status;
|
||||
select * from t1 order by col1;
|
||||
alter table t1
|
||||
@ -59,9 +61,11 @@ add column col7 varchar(30) not null after col5,
|
||||
add column col8 datetime not null, drop column to_be_deleted,
|
||||
change column col2 fourth varchar(30) not null after col3,
|
||||
modify column col6 int not null first;
|
||||
--replace_column 7 # 8 # 10 # 12 # 13 # 14 # 18 #
|
||||
show table status;
|
||||
select * from t1 order by col1;
|
||||
insert into t1 values (2, NULL,4,3,5,99,"PENDING","EXTRA",'2004-01-01 00:00:00');
|
||||
--replace_column 7 # 8 # 10 # 12 # 13 # 14 # 18 #
|
||||
show table status;
|
||||
select * from t1 order by col1;
|
||||
delete from t1;
|
||||
|
@ -176,7 +176,7 @@ show status like 'handler_discover%';
|
||||
flush tables;
|
||||
system rm var/master-data/test/t7.frm ;
|
||||
|
||||
--replace_column 7 # 8 # 9 # 12 # 13 # 15 #
|
||||
--replace_column 7 # 8 # 9 # 12 # 13 # 15 # 18 #
|
||||
show table status;
|
||||
show status like 'handler_discover%';
|
||||
|
||||
|
@ -25,6 +25,8 @@
|
||||
#include "my_alarm.h"
|
||||
#endif
|
||||
|
||||
my_bool timed_mutexes= 0;
|
||||
|
||||
/* from my_init */
|
||||
my_string home_dir=0,my_progname=0;
|
||||
char NEAR curr_dir[FN_REFLEN]= {0},
|
||||
|
@ -1228,7 +1228,7 @@ public:
|
||||
int cmp(const char *a, const char *b)
|
||||
{ return cmp_binary(a, b); }
|
||||
int key_cmp(const byte *a, const byte *b)
|
||||
{ return cmp_binary(a, b); }
|
||||
{ return cmp_binary((char *) a, (char *) b); }
|
||||
int key_cmp(const byte *str, uint length);
|
||||
int cmp_offset(uint row_offset);
|
||||
void get_key_image(char *buff, uint length, imagetype type);
|
||||
|
@ -1234,7 +1234,7 @@ int composite_key_cmp(void* arg, byte* key1, byte* key2)
|
||||
{
|
||||
Field* f = *field;
|
||||
int len = *lengths++;
|
||||
int res = f->cmp(key1, key2);
|
||||
int res = f->cmp((char *) key1, (char *) key2);
|
||||
if (res)
|
||||
return res;
|
||||
key1 += len;
|
||||
@ -1688,7 +1688,7 @@ int group_concat_key_cmp_with_distinct(void* arg, byte* key1,
|
||||
{
|
||||
int res;
|
||||
uint offset= (uint) (field->ptr - record);
|
||||
if ((res= field->cmp(key1 + offset, key2 + offset)))
|
||||
if ((res= field->cmp((char *) key1 + offset, (char *) key2 + offset)))
|
||||
return res;
|
||||
}
|
||||
}
|
||||
@ -1722,7 +1722,7 @@ int group_concat_key_cmp_with_order(void* arg, byte* key1, byte* key2)
|
||||
{
|
||||
int res;
|
||||
uint offset= (uint) (field->ptr - record);
|
||||
if ((res= field->cmp(key1 + offset, key2 + offset)))
|
||||
if ((res= field->cmp((char *) key1 + offset, (char *) key2 + offset)))
|
||||
return (*order_item)->asc ? res : -res;
|
||||
}
|
||||
}
|
||||
|
@ -135,7 +135,7 @@ void key_copy(byte *to_key, byte *from_record, KEY *key_info, uint key_length)
|
||||
{
|
||||
key_length-= HA_KEY_BLOB_LENGTH;
|
||||
length= min(key_length, key_part->length);
|
||||
key_part->field->get_key_image(to_key, length, Field::itRAW);
|
||||
key_part->field->get_key_image((char *) to_key, length, Field::itRAW);
|
||||
to_key+= HA_KEY_BLOB_LENGTH;
|
||||
}
|
||||
else
|
||||
@ -217,7 +217,7 @@ void key_restore(byte *to_record, byte *from_key, KEY *key_info,
|
||||
{
|
||||
key_length-= HA_KEY_BLOB_LENGTH;
|
||||
length= min(key_length, key_part->length);
|
||||
key_part->field->set_key_image(from_key, length);
|
||||
key_part->field->set_key_image((char *) from_key, length);
|
||||
from_key+= HA_KEY_BLOB_LENGTH;
|
||||
}
|
||||
else
|
||||
|
@ -1002,7 +1002,6 @@ extern ulong table_cache_size;
|
||||
extern ulong max_connections,max_connect_errors, connect_timeout;
|
||||
extern ulong slave_net_timeout;
|
||||
extern uint max_user_connections;
|
||||
extern my_bool timed_mutexes;
|
||||
extern ulong what_to_log,flush_time;
|
||||
extern ulong query_buff_size, thread_stack,thread_stack_min;
|
||||
extern ulong binlog_cache_size, max_binlog_cache_size, open_files_limit;
|
||||
|
@ -336,7 +336,6 @@ ulong max_connections,max_used_connections,
|
||||
max_connect_errors;
|
||||
uint max_user_connections= 0;
|
||||
ulong thread_id=1L,current_pid;
|
||||
my_bool timed_mutexes= 0;
|
||||
ulong slow_launch_threads = 0, sync_binlog_period;
|
||||
ulong expire_logs_days = 0;
|
||||
ulong rpl_recovery_rank=0;
|
||||
|
@ -1891,7 +1891,7 @@ double get_sweep_read_cost(const PARAM *param, ha_rows records)
|
||||
else
|
||||
{
|
||||
double n_blocks=
|
||||
ceil((double)param->table->file->data_file_length / IO_SIZE);
|
||||
ceil(ulonglong2double(param->table->file->data_file_length) / IO_SIZE);
|
||||
double busy_blocks=
|
||||
n_blocks * (1.0 - pow(1.0 - 1.0/n_blocks, rows2double(records)));
|
||||
if (busy_blocks < 1.0)
|
||||
|
@ -1494,12 +1494,12 @@ static bool update_user_table(THD *thd, const char *host, const char *user,
|
||||
DBUG_RETURN(1); /* purecov: deadcode */
|
||||
table->field[0]->store(host,(uint) strlen(host), system_charset_info);
|
||||
table->field[1]->store(user,(uint) strlen(user), system_charset_info);
|
||||
key_copy(user_key, table->record[0], table->key_info,
|
||||
key_copy((byte *) user_key, table->record[0], table->key_info,
|
||||
table->key_info->key_length);
|
||||
|
||||
table->file->extra(HA_EXTRA_RETRIEVE_ALL_COLS);
|
||||
if (table->file->index_read_idx(table->record[0], 0,
|
||||
user_key, table->key_info->key_length,
|
||||
(byte *) user_key, table->key_info->key_length,
|
||||
HA_READ_KEY_EXACT))
|
||||
{
|
||||
my_message(ER_PASSWORD_NO_MATCH, ER(ER_PASSWORD_NO_MATCH),
|
||||
|
@ -305,7 +305,7 @@ int openfrm(THD *thd, const char *name, const char *alias, uint db_stat,
|
||||
if (!(record= (char *) alloc_root(&outparam->mem_root,
|
||||
rec_buff_length * records)))
|
||||
goto err; /* purecov: inspected */
|
||||
share->default_values= record;
|
||||
share->default_values= (byte *) record;
|
||||
if (my_pread(file,(byte*) record, (uint) share->reclength,
|
||||
(ulong) (uint2korr(head+6)+
|
||||
((uint2korr(head+14) == 0xffff ?
|
||||
@ -320,9 +320,9 @@ int openfrm(THD *thd, const char *name, const char *alias, uint db_stat,
|
||||
}
|
||||
else
|
||||
{
|
||||
outparam->record[0]= record+ rec_buff_length;
|
||||
outparam->record[0]= (byte *) record+ rec_buff_length;
|
||||
if (records > 2)
|
||||
outparam->record[1]= record+ rec_buff_length*2;
|
||||
outparam->record[1]= (byte *) record+ rec_buff_length*2;
|
||||
else
|
||||
outparam->record[1]= outparam->record[0]; // Safety
|
||||
}
|
||||
|
Reference in New Issue
Block a user