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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
4c98800a
Commit
4c98800a
authored
Apr 08, 2011
by
Alexander Nozdrin
Browse files
Options
Browse Files
Download
Plain Diff
Auto-merge from mysql-5.5.
parents
93cca38d
31e7450c
Changes
24
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
231 additions
and
145 deletions
+231
-145
client/client_priv.h
client/client_priv.h
+1
-0
client/mysqlslap.c
client/mysqlslap.c
+8
-3
include/violite.h
include/violite.h
+3
-1
mysql-test/extra/rpl_tests/rpl_extra_col_master.test
mysql-test/extra/rpl_tests/rpl_extra_col_master.test
+5
-3
mysql-test/include/mix1.inc
mysql-test/include/mix1.inc
+4
-0
mysql-test/include/mtr_warnings.sql
mysql-test/include/mtr_warnings.sql
+1
-43
mysql-test/lib/mtr_misc.pl
mysql-test/lib/mtr_misc.pl
+9
-2
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+80
-51
mysql-test/r/mysqlslap.result
mysql-test/r/mysqlslap.result
+22
-0
mysql-test/r/order_by.result
mysql-test/r/order_by.result
+1
-0
mysql-test/r/show_check.result
mysql-test/r/show_check.result
+1
-0
mysql-test/r/sp-destruct.result
mysql-test/r/sp-destruct.result
+1
-0
mysql-test/r/view.result
mysql-test/r/view.result
+9
-0
mysql-test/suite/rpl/r/rpl_extra_col_master_innodb.result
mysql-test/suite/rpl/r/rpl_extra_col_master_innodb.result
+0
-5
mysql-test/suite/rpl/r/rpl_extra_col_master_myisam.result
mysql-test/suite/rpl/r/rpl_extra_col_master_myisam.result
+0
-5
mysql-test/t/mysqlslap.test
mysql-test/t/mysqlslap.test
+15
-0
mysql-test/t/order_by.test
mysql-test/t/order_by.test
+1
-2
mysql-test/t/show_check.test
mysql-test/t/show_check.test
+1
-0
mysql-test/t/sp-destruct.test
mysql-test/t/sp-destruct.test
+1
-0
mysql-test/t/view.test
mysql-test/t/view.test
+12
-0
sql/hostname.cc
sql/hostname.cc
+22
-28
sql/item.cc
sql/item.cc
+1
-1
sql/item.h
sql/item.h
+4
-0
vio/viosocket.c
vio/viosocket.c
+29
-1
No files found.
client/client_priv.h
View file @
4c98800a
...
...
@@ -75,6 +75,7 @@ enum options_client
OPT_SLAP_POST_SYSTEM
,
OPT_SLAP_COMMIT
,
OPT_SLAP_DETACH
,
OPT_SLAP_NO_DROP
,
OPT_MYSQL_REPLACE_INTO
,
OPT_BASE64_OUTPUT_MODE
,
OPT_SERVER_ID
,
OPT_FIX_TABLE_NAMES
,
OPT_FIX_DB_NAMES
,
OPT_SSL_VERIFY_SERVER_CERT
,
OPT_AUTO_VERTICAL_OUTPUT
,
...
...
client/mysqlslap.c
View file @
4c98800a
...
...
@@ -128,7 +128,7 @@ const char *delimiter= "\n";
const
char
*
create_schema_string
=
"mysqlslap"
;
static
my_bool
opt_preserve
=
TRUE
;
static
my_bool
opt_preserve
=
TRUE
,
opt_no_drop
=
FALSE
;
static
my_bool
debug_info_flag
=
0
,
debug_check_flag
=
0
;
static
my_bool
opt_only_print
=
FALSE
;
static
my_bool
opt_compress
=
FALSE
,
tty_password
=
FALSE
,
...
...
@@ -607,6 +607,8 @@ static struct my_option my_long_options[] =
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"iterations"
,
'i'
,
"Number of times to run the tests."
,
&
iterations
,
&
iterations
,
0
,
GET_UINT
,
REQUIRED_ARG
,
1
,
0
,
0
,
0
,
0
,
0
},
{
"no-drop"
,
OPT_SLAP_NO_DROP
,
"Do not drop the schema after the test."
,
&
opt_no_drop
,
&
opt_no_drop
,
0
,
GET_BOOL
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"number-char-cols"
,
'x'
,
"Number of VARCHAR columns to create in table if specifying --auto-generate-sql."
,
&
num_char_cols_opt
,
&
num_char_cols_opt
,
0
,
GET_STR
,
REQUIRED_ARG
,
...
...
@@ -1149,8 +1151,11 @@ get_options(int *argc,char ***argv)
if
(
!
user
)
user
=
(
char
*
)
"root"
;
/* If something is created we clean it up, otherwise we leave schemas alone */
if
(
create_string
||
auto_generate_sql
)
/*
If something is created and --no-drop is not specified, we drop the
schema.
*/
if
(
!
opt_no_drop
&&
(
create_string
||
auto_generate_sql
))
opt_preserve
=
FALSE
;
if
(
auto_generate_sql
&&
(
create_string
||
user_supplied_query
))
...
...
include/violite.h
View file @
4c98800a
/* Copyright (
C) 2000 MySQL AB
/* Copyright (
c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
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
...
...
@@ -93,6 +93,8 @@ ssize_t vio_pending(Vio *vio);
my_bool
vio_get_normalized_ip_string
(
const
struct
sockaddr
*
addr
,
int
addr_length
,
char
*
ip_string
,
size_t
ip_string_size
);
my_bool
vio_is_no_name_error
(
int
err_code
);
int
vio_getnameinfo
(
const
struct
sockaddr
*
sa
,
char
*
hostname
,
size_t
hostname_size
,
char
*
port
,
size_t
port_size
,
...
...
mysql-test/extra/rpl_tests/rpl_extra_col_master.test
View file @
4c98800a
...
...
@@ -122,11 +122,13 @@ SELECT f1,f2,f3,f4,f5,f6,f7,f8,f9,
#connection slave;
--
disable_query_log
call
mtr
.
add_suppression
(
"Slave SQL.*Table definition on master and slave does not match: Column 2 type mismatch.* 1535"
);
call
mtr
.
add_suppression
(
"Slave
SQL.*Error .Can.t DROP .c7.; check that column.key exists. on query.*
1091"
);
call
mtr
.
add_suppression
(
"Slave
SQL.*Error .Unknown column .c7. in .t15.. on query.*
1054"
);
call
mtr
.
add_suppression
(
"Slave
SQL.*Error .Key column .c6. doesn.t exist in table. on query.*
1072"
);
call
mtr
.
add_suppression
(
"Slave
.*Can.t DROP .c7.; check that column.key exists.* Error_code:
1091"
);
call
mtr
.
add_suppression
(
"Slave
.*Unknown column .c7. in .t15.* Error_code:
1054"
);
call
mtr
.
add_suppression
(
"Slave
.*Key column .c6. doesn.t exist in table.* Error_code:
1072"
);
call
mtr
.
add_suppression
(
"Slave SQL.*Column 2 of table .test.t1.. cannot be converted from type.* Error_code: 1677"
);
--
enable_query_log
sync_slave_with_master
;
--
echo
...
...
mysql-test/include/mix1.inc
View file @
4c98800a
...
...
@@ -634,6 +634,10 @@ drop table t1;
drop
table
bug29807
;
create
table
bug29807
(
a
int
);
drop
table
bug29807
;
--
disable_query_log
call
mtr
.
add_suppression
(
"InnoDB: Error: table .test...bug29807. does not exist in the InnoDB internal"
);
call
mtr
.
add_suppression
(
"Cannot find or open table test\/bug29807 from"
);
--
enable_query_log
#
...
...
mysql-test/include/mtr_warnings.sql
View file @
4c98800a
...
...
@@ -71,7 +71,7 @@ SET @@collation_connection = @collation_connection_saved||
-- Insert patterns that should always be suppressed
--
INSERT
INTO
global_suppressions
VALUES
(
"
'SELECT UNIX_TIMESTAMP
\\
(
\\
)'
failed on master"
),
(
"
.SELECT UNIX_TIMESTAMP...
failed on master"
),
(
"Aborted connection"
),
(
"Client requested master to start replication from impossible position"
),
(
"Could not find first log file name in binary log"
),
...
...
@@ -128,7 +128,6 @@ INSERT INTO global_suppressions VALUES
(
"Sort aborted"
),
(
"Time-out in NDB"
),
(
"Warning:
\s
+One can only use the --user.*root"
),
(
"Warning:
\s
+Setting lower_case_table_names=2"
),
(
"Warning:
\s
+Table:.* on (delete|rename)"
),
(
"You have an error in your SQL syntax"
),
(
"deprecated"
),
...
...
@@ -141,53 +140,20 @@ INSERT INTO global_suppressions VALUES
(
"slave SQL thread aborted"
),
(
"Slave: .*Duplicate entry"
),
/*
Special case, made as specific as possible, for:
Bug #28436: Incorrect position in SHOW BINLOG EVENTS causes
server coredump
*/
(
"Error in Log_event::read_log_event
\\\(\\\)
: 'Sanity check failed', data_len: 258, event_type: 49"
),
(
"Statement may not be safe to log in statement format"
),
/* test case for Bug#bug29807 copies a stray frm into database */
(
"InnoDB: Error: table `test`.`bug29807` does not exist in the InnoDB internal"
),
(
"Cannot find or open table test
\/
bug29807 from"
),
/* innodb foreign key tests that fail in ALTER or RENAME produce this */
(
"InnoDB: Error: in ALTER TABLE `test`.`t[123]`"
),
(
"InnoDB: Error: in RENAME TABLE table `test`.`t1`"
),
(
"InnoDB: Error: table `test`.`t[123]` does not exist in the InnoDB internal"
),
/* Test case for Bug#14233 produces the following warnings: */
(
"Stored routine 'test'.'bug14233_1': invalid value in column mysql.proc"
),
(
"Stored routine 'test'.'bug14233_2': invalid value in column mysql.proc"
),
(
"Stored routine 'test'.'bug14233_3': invalid value in column mysql.proc"
),
/*
BUG#32080 - Excessive warnings on Solaris: setrlimit could not
change the size of core files
*/
(
"setrlimit could not change the size of core files to 'infinity'"
),
/*
rpl_extrColmaster_*.test, the slave thread produces warnings
when it get updates to a table that has more columns on the
master
*/
(
"Slave: Unknown column 'c7' in 't15' Error_code: 1054"
),
(
"Slave: Can't DROP 'c7'.* 1091"
),
(
"Slave: Key column 'c6'.* 1072"
),
(
"The slave I.O thread stops because a fatal error is encountered when it try to get the value of SERVER_ID variable from master."
),
(
".SELECT UNIX_TIMESTAMP... failed on master, do not trust column Seconds_Behind_Master of SHOW SLAVE STATUS"
),
/* Special case for Bug #26402 in show_check.test
- Question marks are not valid file name parts on Windows. Ignore
this error message.
*/
(
"Can't find file: '.
\\\\
test
\\\\\\
?{8}.frm'"
),
(
"Slave: Unknown table 't1' Error_code: 1051"
),
/* Added 2009-08-XX after fixing Bug #42408 */
...
...
@@ -215,14 +181,6 @@ INSERT INTO global_suppressions VALUES
(
"==[0-9]*== Warning: invalid file descriptor -1 in syscall write()"
),
(
"==[0-9]*== Warning: invalid file descriptor -1 in syscall read()"
),
/*
Transient network failures that cause warnings on reconnect.
BUG#47743 and BUG#47983.
*/
(
"Slave I/O: Get master SERVER_ID failed with error:.*"
),
(
"Slave I/O: Get master clock failed with error:.*"
),
(
"Slave I/O: Get master COLLATION_SERVER failed with error:.*"
),
(
"Slave I/O: Get master TIME_ZONE failed with error:.*"
),
/*
BUG#42147 - Concurrent DML and LOCK TABLE ... READ for InnoDB
table cause warnings in errlog
...
...
mysql-test/lib/mtr_misc.pl
View file @
4c98800a
# -*- cperl -*-
# Copyright (c) 2004, 201
0
, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2004, 201
1
, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
...
...
@@ -36,6 +36,7 @@ sub start_timer($);
sub
has_expired
($);
sub
init_timers
();
sub
mark_time_used
($);
sub
mark_time_idle
();
sub
add_total_times
($);
sub
print_times_used
($$);
sub
print_total_times
($);
...
...
@@ -224,6 +225,7 @@ my %time_used= (
'
ch-warn
'
=>
0
,
'
test
'
=>
0
,
'
init
'
=>
0
,
'
admin
'
=>
0
,
);
my
%
time_text
=
(
...
...
@@ -232,7 +234,8 @@ my %time_text= (
'
check
'
=>
"
Check-testcase
",
'
ch-warn
'
=>
"
Check for warnings
",
'
test
'
=>
"
Test execution
",
'
init
'
=>
"
Initialization etc.
",
'
init
'
=>
"
Initialization/cleanup
",
'
admin
'
=>
"
Test administration
",
);
# Counts number of reports from workers
...
...
@@ -255,6 +258,10 @@ sub mark_time_used($) {
$last_timer_set
=
$curr_time
;
}
sub
mark_time_idle
()
{
$last_timer_set
=
gettimeofday
()
if
$opt_report_times
;
}
sub
add_total_times
($)
{
my
(
$dummy
,
$num
,
@line
)
=
split
("
",
$_
[
0
]);
...
...
mysql-test/mysql-test-run.pl
View file @
4c98800a
...
...
@@ -219,9 +219,12 @@ our %gprof_dirs;
our
$glob_debugger
=
0
;
our
$opt_gdb
;
our
$opt_client_gdb
;
our
$opt_dbx
;
our
$opt_client_dbx
;
our
$opt_ddd
;
our
$opt_client_ddd
;
our
$opt_manual_gdb
;
our
$opt_manual_dbx
;
our
$opt_manual_ddd
;
our
$opt_manual_debug
;
our
$opt_debugger
;
...
...
@@ -546,7 +549,9 @@ sub run_test_server ($$$) {
my
$s
=
IO::
Select
->
new
();
$s
->
add
(
$server
);
while
(
1
)
{
mark_time_used
('
admin
');
my
@ready
=
$s
->
can_read
(
1
);
# Wake up once every second
mark_time_idle
();
foreach
my
$sock
(
@ready
)
{
if
(
$sock
==
$server
)
{
# New client connected
...
...
@@ -888,7 +893,7 @@ sub run_worker ($) {
if
(
$opt_gprof
)
{
gprof_collect
(
find_mysqld
(
$basedir
),
keys
%
gprof_dirs
);
}
mark_time_used
('
init
');
mark_time_used
('
admin
');
print_times_used
(
$server
,
$thread_num
);
exit
(
$valgrind_reports
);
}
...
...
@@ -1001,6 +1006,9 @@ sub command_line_setup {
'
ddd
'
=>
\
$opt_ddd
,
'
client-ddd
'
=>
\
$opt_client_ddd
,
'
manual-ddd
'
=>
\
$opt_manual_ddd
,
'
dbx
'
=>
\
$opt_dbx
,
'
client-dbx
'
=>
\
$opt_client_dbx
,
'
manual-dbx
'
=>
\
$opt_manual_dbx
,
'
debugger=s
'
=>
\
$opt_debugger
,
'
client-debugger=s
'
=>
\
$opt_client_debugger
,
'
strace-client:s
'
=>
\
$opt_strace_client
,
...
...
@@ -1426,6 +1434,12 @@ sub command_line_setup {
$opt_ddd
=
undef
;
}
if
(
$opt_dbx
)
{
mtr_warning
("
Silently converting --dbx to --client-dbx in embedded mode
");
$opt_client_dbx
=
$opt_dbx
;
$opt_dbx
=
undef
;
}
if
(
$opt_debugger
)
{
mtr_warning
("
Silently converting --debugger to --client-debugger in embedded mode
");
...
...
@@ -1434,7 +1448,7 @@ sub command_line_setup {
}
if
(
$opt_gdb
||
$opt_ddd
||
$opt_manual_gdb
||
$opt_manual_ddd
||
$opt_manual_debug
||
$opt_debugger
)
$opt_manual_debug
||
$opt_debugger
||
$opt_dbx
||
$opt_manual_dbx
)
{
mtr_error
("
You need to use the client debug options for the
",
"
embedded server. Ex: --client-gdb
");
...
...
@@ -1462,6 +1476,7 @@ sub command_line_setup {
# --------------------------------------------------------------------------
if
(
$opt_gdb
||
$opt_client_gdb
||
$opt_ddd
||
$opt_client_ddd
||
$opt_manual_gdb
||
$opt_manual_ddd
||
$opt_manual_debug
||
$opt_dbx
||
$opt_client_dbx
||
$opt_manual_dbx
||
$opt_debugger
||
$opt_client_debugger
)
{
# Indicate that we are using debugger
...
...
@@ -3762,7 +3777,7 @@ sub run_testcase ($) {
do_before_run_mysqltest
(
$tinfo
);
mark_time_used
('
init
');
mark_time_used
('
admin
');
if
(
$opt_check_testcases
and
check_testcase
(
$tinfo
,
"
before
")
){
# Failed to record state of server or server crashed
...
...
@@ -4704,6 +4719,9 @@ sub mysqld_start ($$) {
{
ddd_arguments
(
\
$args
,
\
$exe
,
$mysqld
->
name
());
}
if
(
$opt_dbx
||
$opt_manual_dbx
)
{
dbx_arguments
(
\
$args
,
\
$exe
,
$mysqld
->
name
());
}
elsif
(
$opt_debugger
)
{
debugger_arguments
(
\
$args
,
\
$exe
,
$mysqld
->
name
());
...
...
@@ -5232,7 +5250,7 @@ sub start_mysqltest ($) {
my
$exe
=
$exe_mysqltest
;
my
$args
;
mark_time_used
('
init
');
mark_time_used
('
admin
');
mtr_init_args
(
\
$args
);
...
...
@@ -5374,6 +5392,9 @@ sub start_mysqltest ($) {
{
ddd_arguments
(
\
$args
,
\
$exe
,
"
client
");
}
if
(
$opt_client_dbx
)
{
dbx_arguments
(
\
$args
,
\
$exe
,
"
client
");
}
elsif
(
$opt_client_debugger
)
{
debugger_arguments
(
\
$args
,
\
$exe
,
"
client
");
...
...
@@ -5408,23 +5429,11 @@ sub gdb_arguments {
# Remove the old gdbinit file
unlink
(
$gdb_init_file
);
if
(
$type
eq
"
client
"
)
{
# write init file for client
mtr_tofile
(
$gdb_init_file
,
"
set args
$str
\n
"
.
"
break main
\n
");
}
else
{
# write init file for mysqld
mtr_tofile
(
$gdb_init_file
,
"
set args
$str
\n
"
.
"
break mysql_parse
\n
"
.
"
commands 1
\n
"
.
"
disable 1
\n
"
.
"
end
\n
");
}
# write init file for mysqld or client
mtr_tofile
(
$gdb_init_file
,
"
set args
$str
\n
"
.
"
break main
\n
"
.
"
run
");
if
(
$opt_manual_gdb
)
{
...
...
@@ -5471,24 +5480,12 @@ sub ddd_arguments {
# Remove the old gdbinit file
unlink
(
$gdb_init_file
);
if
(
$type
eq
"
client
"
)
{
# write init file for client
mtr_tofile
(
$gdb_init_file
,
"
set args
$str
\n
"
.
"
break main
\n
");
}
else
{
# write init file for mysqld
mtr_tofile
(
$gdb_init_file
,
"
file $
$exe
\n
"
.
"
set args
$str
\n
"
.
"
break mysql_parse
\n
"
.
"
commands 1
\n
"
.
"
disable 1
\n
"
.
"
end
");
}
# write init file for mysqld or client
mtr_tofile
(
$gdb_init_file
,
"
file $
$exe
\n
"
.
"
set args
$str
\n
"
.
"
break main
\n
"
.
"
run
");
if
(
$opt_manual_ddd
)
{
...
...
@@ -5517,6 +5514,46 @@ sub ddd_arguments {
}
#
# Modify the exe and args so that program is run in dbx in xterm
#
sub
dbx_arguments
{
my
$args
=
shift
;
my
$exe
=
shift
;
my
$type
=
shift
;
# Put $args into a single string
my
$str
=
join
"
",
@$$args
;
if
(
$opt_manual_dbx
)
{
print
"
\n
To start dbx for
$type
, type in another window:
\n
";
print
"
cd
$glob_mysql_test_dir
; dbx -c
\"
stop in main;
"
.
"
run
$str
\"
$
$exe
\n
";
# Indicate the exe should not be started
$$exe
=
undef
;
return
;
}
$$args
=
[]
;
mtr_add_arg
(
$$args
,
"
-title
");
mtr_add_arg
(
$$args
,
"
$type
");
mtr_add_arg
(
$$args
,
"
-e
");
if
(
$exe_libtool
)
{
mtr_add_arg
(
$$args
,
$exe_libtool
);
mtr_add_arg
(
$$args
,
"
--mode=execute
");
}
mtr_add_arg
(
$$args
,
"
dbx
");
mtr_add_arg
(
$$args
,
"
-c
");
mtr_add_arg
(
$$args
,
"
stop in main; run
$str
");
mtr_add_arg
(
$$args
,
"
$
$exe
");
$$exe
=
"
xterm
";
}
#
# Modify the exe and args so that program is run in the selected debugger
#
...
...
@@ -5547,18 +5584,6 @@ sub debugger_arguments {
# Set exe to debuggername
$$exe
=
$debugger
;
}
elsif
(
$debugger
eq
"
dbx
"
)
{
# xterm -e dbx -r exe arg1 .. argn
unshift
(
@$$args
,
$$exe
);
unshift
(
@$$args
,
"
-r
");
unshift
(
@$$args
,
$debugger
);
unshift
(
@$$args
,
"
-e
");
$$exe
=
"
xterm
";
}
else
{
...
...
@@ -5860,6 +5885,7 @@ Options for debugging the product
client-ddd Start mysqltest client in ddd
client-debugger=NAME Start mysqltest in the selected debugger
client-gdb Start mysqltest client in gdb
client-dbx Start mysqltest client in dbx
ddd Start mysqld in ddd
debug Dump trace output for all servers and client programs
debug-common Same as debug, but sets 'd' debug flags to
...
...
@@ -5868,12 +5894,15 @@ Options for debugging the product
tracing
debugger=NAME Start mysqld in the selected debugger
gdb Start the mysqld(s) in gdb
dbx Start the mysqld(s) in dbx
manual-debug Let user manually start mysqld in debugger, before
running test(s)
manual-gdb Let user manually start mysqld in gdb, before running
test(s)
manual-ddd Let user manually start mysqld in ddd, before running
test(s)
manual-dbx Let user manually start mysqld in dbx, before running
test(s)
strace-client[=path] Create strace output for mysqltest client, optionally
specifying name and path to the trace program to use.
Example: $0 --strace-client=ktrace
...
...
mysql-test/r/mysqlslap.result
View file @
4c98800a
...
...
@@ -225,3 +225,25 @@ DROP SCHEMA IF EXISTS `mysqlslap`;
DROP PROCEDURE IF EXISTS p1;
CREATE PROCEDURE p1() SELECT 1;
DROP PROCEDURE p1;
#
# Bug #11765157 - 58090: mysqlslap drops schema specified in
# create_schema if auto-generate-sql also set.
#
# 'bug58090' database should not be present.
SHOW DATABASES;
Database
information_schema
mtr
mysql
performance_schema
test
# 'bug58090' database should be present.
SHOW DATABASES;
Database
information_schema
bug58090
mtr
mysql
performance_schema
test
DROP DATABASE bug58090;
mysql-test/r/order_by.result
View file @
4c98800a
...
...
@@ -1429,6 +1429,7 @@ CALL mtr.add_suppression("Out of sort memory");
select * from t1 order by b;
ERROR HY001: Out of sort memory, consider increasing server sort buffer size
drop table t1;
call mtr.add_suppression("Out of sort memory; increase server sort buffer size");
#
# Bug #39844: Query Crash Mysql Server 5.0.67
#
...
...
mysql-test/r/show_check.result
View file @
4c98800a
...
...
@@ -1338,6 +1338,7 @@ Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length I
DROP DATABASE ``;
show columns from `#mysql50#????????`;
Got one of the listed errors
call mtr.add_suppression("Can.t find file: '.\\\\test\\\\\\?{8}.frm'");
DROP TABLE IF EXISTS t1;
DROP PROCEDURE IF EXISTS p1;
CREATE TABLE t1(c1 INT);
...
...
mysql-test/r/sp-destruct.result
View file @
4c98800a
call mtr.add_suppression("Column count of mysql.proc is wrong. Expected 20, found 19. The table is probably corrupted");
call mtr.add_suppression("Stored routine .test...bug14233_[123].: invalid value in column mysql.proc");
use test;
drop procedure if exists bug14233;
drop function if exists bug14233;
...
...
mysql-test/r/view.result
View file @
4c98800a
...
...
@@ -4012,6 +4012,15 @@ DROP TABLE t1;
#
CREATE VIEW v1 AS SELECT 1 IN (1 LIKE 2,0) AS f;
DROP VIEW v1;
#
# Bug 11829681 - 60295: ERROR 1356 ON VIEW THAT EXECUTES FINE AS A QUERY
#
CREATE TABLE t1 (a INT);
CREATE VIEW v1 AS SELECT s.* FROM t1 s, t1 b HAVING a;
SELECT * FROM v1;
a
DROP VIEW v1;
DROP TABLE t1;
# -----------------------------------------------------------------
# -- End of 5.1 tests.
# -----------------------------------------------------------------
...
...
mysql-test/suite/rpl/r/rpl_extra_col_master_innodb.result
View file @
4c98800a
...
...
@@ -57,11 +57,6 @@ f1 f2 f3 f4 f5 f6 f7 f8 f9 hex(f10) hex(f11)
27 27 27 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
29 29 29 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
30 30 30 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 2 type mismatch.* 1535");
call mtr.add_suppression("Slave SQL.*Error .Can.t DROP .c7.; check that column.key exists. on query.* 1091");
call mtr.add_suppression("Slave SQL.*Error .Unknown column .c7. in .t15.. on query.* 1054");
call mtr.add_suppression("Slave SQL.*Error .Key column .c6. doesn.t exist in table. on query.* 1072");
call mtr.add_suppression("Slave SQL.*Column 2 of table .test.t1.. cannot be converted from type.* Error_code: 1677");
* Select count and 20 rows from Slave *
...
...
mysql-test/suite/rpl/r/rpl_extra_col_master_myisam.result
View file @
4c98800a
...
...
@@ -57,11 +57,6 @@ f1 f2 f3 f4 f5 f6 f7 f8 f9 hex(f10) hex(f11)
27 27 27 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
29 29 29 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
30 30 30 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 2 type mismatch.* 1535");
call mtr.add_suppression("Slave SQL.*Error .Can.t DROP .c7.; check that column.key exists. on query.* 1091");
call mtr.add_suppression("Slave SQL.*Error .Unknown column .c7. in .t15.. on query.* 1054");
call mtr.add_suppression("Slave SQL.*Error .Key column .c6. doesn.t exist in table. on query.* 1072");
call mtr.add_suppression("Slave SQL.*Column 2 of table .test.t1.. cannot be converted from type.* Error_code: 1677");
* Select count and 20 rows from Slave *
...
...
mysql-test/t/mysqlslap.test
View file @
4c98800a
...
...
@@ -53,3 +53,18 @@ CREATE PROCEDURE p1() SELECT 1;
--
exec
$MYSQL_SLAP
--
create
-
schema
=
test
--
delimiter
=
";"
--
query
=
"CALL p1; SELECT 1;"
--
silent
2
>&
1
DROP
PROCEDURE
p1
;
--
echo
#
--
echo
# Bug #11765157 - 58090: mysqlslap drops schema specified in
--
echo
# create_schema if auto-generate-sql also set.
--
echo
#
--
exec
$MYSQL_SLAP
--
silent
--
create
-
schema
=
bug58090
--
concurrency
=
5
--
iterations
=
20
--
auto
-
generate
-
sql
--
echo
# 'bug58090' database should not be present.
SHOW
DATABASES
;
--
exec
$MYSQL_SLAP
--
silent
--
create
-
schema
=
bug58090
--
no
-
drop
--
auto
-
generate
-
sql
--
echo
# 'bug58090' database should be present.
SHOW
DATABASES
;
DROP
DATABASE
bug58090
;
mysql-test/t/order_by.test
View file @
4c98800a
...
...
@@ -847,8 +847,7 @@ CALL mtr.add_suppression("Out of sort memory");
--
error
ER_OUT_OF_SORTMEMORY
select
*
from
t1
order
by
b
;
drop
table
t1
;
call
mtr
.
add_suppression
(
"Out of sort memory; increase server sort buffer size"
);
--
echo
#
--
echo
# Bug #39844: Query Crash Mysql Server 5.0.67
--
echo
#
...
...
mysql-test/t/show_check.test
View file @
4c98800a
...
...
@@ -1082,6 +1082,7 @@ DROP DATABASE `
#
--
error
ER_NO_SUCH_TABLE
,
ER_FILE_NOT_FOUND
show
columns
from
`#mysql50#????????`
;
call
mtr
.
add_suppression
(
"Can.t find file: '.
\\\\
test
\\\\\\
?
{
8
}
.frm'"
);
#
# SHOW CREATE TRIGGER test.
...
...
mysql-test/t/sp-destruct.test
View file @
4c98800a
...
...
@@ -14,6 +14,7 @@
# Supress warnings written to the log file
call
mtr
.
add_suppression
(
"Column count of mysql.proc is wrong. Expected 20, found 19. The table is probably corrupted"
);
call
mtr
.
add_suppression
(
"Stored routine .test...bug14233_[123].: invalid value in column mysql.proc"
);
# Backup proc table
let
$MYSQLD_DATADIR
=
`select @@datadir`
;
...
...
mysql-test/t/view.test
View file @
4c98800a
...
...
@@ -3979,6 +3979,18 @@ DROP TABLE t1;
CREATE
VIEW
v1
AS
SELECT
1
IN
(
1
LIKE
2
,
0
)
AS
f
;
DROP
VIEW
v1
;
--
echo
#
--
echo
# Bug 11829681 - 60295: ERROR 1356 ON VIEW THAT EXECUTES FINE AS A QUERY
--
echo
#
CREATE
TABLE
t1
(
a
INT
);
CREATE
VIEW
v1
AS
SELECT
s
.*
FROM
t1
s
,
t1
b
HAVING
a
;
SELECT
*
FROM
v1
;
DROP
VIEW
v1
;
DROP
TABLE
t1
;
--
echo
# -----------------------------------------------------------------
--
echo
# -- End of 5.1 tests.
--
echo
# -----------------------------------------------------------------
...
...
sql/hostname.cc
View file @
4c98800a
/* 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
it under the terms of the GNU General Public License as published by
...
...
@@ -366,41 +366,35 @@ bool ip_to_hostname(struct sockaddr_storage *ip_storage,
err_code
=
vio_getnameinfo
(
ip
,
hostname_buffer
,
NI_MAXHOST
,
NULL
,
0
,
NI_NAMEREQD
);
if
(
err_code
==
EAI_NONAME
)
if
(
err_code
)
{
/*
There is no reverse address mapping for the IP address. A host name
can not be resolved.
*/
// NOTE: gai_strerror() returns a string ending by a dot.
DBUG_PRINT
(
"error"
,
(
"IP address '%s' could not be resolved:
"
"no reverse address mapping."
,
(
const
char
*
)
ip_key
));
DBUG_PRINT
(
"error"
,
(
"IP address '%s' could not be resolved:
%s"
,
(
const
char
*
)
ip_key
,
(
const
char
*
)
gai_strerror
(
err_code
)
));
sql_print_warning
(
"IP address '%s' could not be resolved:
"
"no reverse address mapping."
,
(
const
char
*
)
ip_key
);
sql_print_warning
(
"IP address '%s' could not be resolved:
%s"
,
(
const
char
*
)
ip_key
,
(
const
char
*
)
gai_strerror
(
err_code
)
);
err_status
=
add_hostname
(
ip_key
,
NULL
);
if
(
vio_is_no_name_error
(
err_code
))
{
/*
The no-name error means that there is no reverse address mapping
for the IP address. A host name can not be resolved.
*
hostname
=
NULL
;
*
connect_errors
=
0
;
/* New IP added to the cache. */
If it is not the no-name error, we should not cache the hostname
(or rather its absence), because the failure might be transient.
*/
DBUG_RETURN
(
err_status
);
}
else
if
(
err_code
)
{
DBUG_PRINT
(
"error"
,
(
"IP address '%s' could not be resolved: "
"getnameinfo() returned %d."
,
(
const
char
*
)
ip_key
,
(
int
)
err_code
));
add_hostname
(
ip_key
,
NULL
);
sql_print_warning
(
"IP address '%s' could not be resolved: "
"getnameinfo() returned error (code: %d)."
,
(
const
char
*
)
ip_key
,
(
int
)
err_code
);
*
hostname
=
NULL
;
*
connect_errors
=
0
;
/* New IP added to the cache. */
}
DBUG_RETURN
(
TRU
E
);
DBUG_RETURN
(
FALS
E
);
}
DBUG_PRINT
(
"info"
,
(
"IP '%s' resolved to '%s'."
,
...
...
sql/item.cc
View file @
4c98800a
...
...
@@ -6479,7 +6479,7 @@ void Item_ref::print(String *str, enum_query_type query_type)
{
THD
*
thd
=
current_thd
;
append_identifier
(
thd
,
str
,
(
*
ref
)
->
real_item
()
->
name
,
(
*
ref
)
->
real_item
()
->
name_length
);
strlen
((
*
ref
)
->
real_item
()
->
name
)
);
}
else
(
*
ref
)
->
print
(
str
,
query_type
);
...
...
sql/item.h
View file @
4c98800a
...
...
@@ -548,6 +548,10 @@ public:
*/
Item
*
next
;
uint32
max_length
;
/* Maximum length, in bytes */
/*
TODO: convert name and name_length fields into String to keep them in sync
(see bug #11829681/60295 etc).
*/
uint
name_length
;
/* Length of name */
int8
marker
;
uint8
decimals
;
...
...
vio/viosocket.c
View file @
4c98800a
/* Copyright (
C) 2000 MySQL AB
/* Copyright (
c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
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
...
...
@@ -1059,6 +1059,34 @@ ssize_t vio_pending(Vio *vio)
}
/**
Checks if the error code, returned by vio_getnameinfo(), means it was the
"No-name" error.
Windows-specific note: getnameinfo() returns WSANO_DATA instead of
EAI_NODATA or EAI_NONAME when no reverse mapping is available at the host
(i.e. Windows can't get hostname by IP-address). This error should be
treated as EAI_NONAME.
@return if the error code is actually EAI_NONAME.
@retval true if the error code is EAI_NONAME.
@retval false otherwise.
*/
my_bool
vio_is_no_name_error
(
int
err_code
)
{
#ifdef _WIN32
return
err_code
==
WSANO_DATA
||
err_code
==
EAI_NONAME
;
#else
return
err_code
==
EAI_NONAME
;
#endif
}
/**
This is a wrapper for the system getnameinfo(), because different OS
differ in the getnameinfo() implementation:
...
...
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