Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
d8f0b7be
Commit
d8f0b7be
authored
Jan 26, 2005
by
dlenev@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/dlenev/src/mysql-5.0-bg7637
parents
e85f70ba
eb7b8380
Changes
22
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
92 additions
and
52 deletions
+92
-52
VC++Files/libmysqld/libmysqld.dsp
VC++Files/libmysqld/libmysqld.dsp
+0
-4
VC++Files/mysqldemb/mysqldemb.dsp
VC++Files/mysqldemb/mysqldemb.dsp
+0
-4
extra/comp_err.c
extra/comp_err.c
+4
-4
include/my_sys.h
include/my_sys.h
+2
-0
innobase/ut/ut0ut.c
innobase/ut/ut0ut.c
+7
-0
libmysql/libmysql.c
libmysql/libmysql.c
+2
-2
mysql-test/include/testdb_only.inc
mysql-test/include/testdb_only.inc
+30
-0
mysql-test/mysql-test-run.sh
mysql-test/mysql-test-run.sh
+20
-17
mysql-test/r/ndb_alter_table.result
mysql-test/r/ndb_alter_table.result
+4
-4
mysql-test/r/ndb_autodiscover.result
mysql-test/r/ndb_autodiscover.result
+2
-2
mysql-test/r/testdb_only.require
mysql-test/r/testdb_only.require
+2
-0
mysql-test/t/ndb_alter_table.test
mysql-test/t/ndb_alter_table.test
+4
-0
mysql-test/t/ndb_autodiscover.test
mysql-test/t/ndb_autodiscover.test
+1
-1
mysys/my_static.c
mysys/my_static.c
+2
-0
sql/field.h
sql/field.h
+1
-1
sql/item_sum.cc
sql/item_sum.cc
+3
-3
sql/key.cc
sql/key.cc
+2
-2
sql/mysql_priv.h
sql/mysql_priv.h
+0
-1
sql/mysqld.cc
sql/mysqld.cc
+0
-1
sql/opt_range.cc
sql/opt_range.cc
+1
-1
sql/sql_acl.cc
sql/sql_acl.cc
+2
-2
sql/table.cc
sql/table.cc
+3
-3
No files found.
VC++Files/libmysqld/libmysqld.dsp
View file @
d8f0b7be
...
...
@@ -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
...
...
VC++Files/mysqldemb/mysqldemb.dsp
View file @
d8f0b7be
...
...
@@ -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
...
...
extra/comp_err.c
View file @
d8f0b7be
...
...
@@ -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
*
DATADIR
ECTORY
=
(
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
*
)
&
DATADIR
ECTORY
,
(
gptr
*
)
&
DATADIR
ECTORY
,
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
,
DATADIR
ECTORY
,
tmp_lang
->
lang_long_name
,
NullS
);
if
(
!
my_stat
(
outfile
,
&
stat_info
,
MYF
(
0
)))
{
...
...
include/my_sys.h
View file @
d8f0b7be
...
...
@@ -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 */
...
...
innobase/ut/ut0ut.c
View file @
d8f0b7be
...
...
@@ -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
}
/**************************************************************
...
...
libmysql/libmysql.c
View file @
d8f0b7be
...
...
@@ -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
:
...
...
mysql-test/include/testdb_only.inc
0 → 100644
View file @
d8f0b7be
#################### 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
mysql-test/mysql-test-run.sh
View file @
d8f0b7be
...
...
@@ -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
...
...
mysql-test/r/ndb_alter_table.result
View file @
d8f0b7be
...
...
@@ -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
...
...
mysql-test/r/ndb_autodiscover.result
View file @
d8f0b7be
...
...
@@ -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
...
...
mysql-test/r/testdb_only.require
0 → 100644
View file @
d8f0b7be
Variable_name Value
use extern server NO
mysql-test/t/ndb_alter_table.test
View file @
d8f0b7be
...
...
@@ -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
;
...
...
mysql-test/t/ndb_autodiscover.test
View file @
d8f0b7be
...
...
@@ -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%'
;
...
...
mysys/my_static.c
View file @
d8f0b7be
...
...
@@ -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
},
...
...
sql/field.h
View file @
d8f0b7be
...
...
@@ -1228,7 +1228,7 @@ class Field_bit :public Field {
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
);
...
...
sql/item_sum.cc
View file @
d8f0b7be
...
...
@@ -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
;
}
}
...
...
sql/key.cc
View file @
d8f0b7be
...
...
@@ -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
...
...
sql/mysql_priv.h
View file @
d8f0b7be
...
...
@@ -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
;
...
...
sql/mysqld.cc
View file @
d8f0b7be
...
...
@@ -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
;
...
...
sql/opt_range.cc
View file @
d8f0b7be
...
...
@@ -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
)
...
...
sql/sql_acl.cc
View file @
d8f0b7be
...
...
@@ -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
),
...
...
sql/table.cc
View file @
d8f0b7be
...
...
@@ -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
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment