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
03c79129
Commit
03c79129
authored
Dec 11, 2006
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge kpettersson@bk-internal:/home/bk/mysql-5.0-maint
into naruto.:C:/cpp/mysql-5.0-maint
parents
792aacc6
721b8f87
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
89 additions
and
26 deletions
+89
-26
Makefile.am
Makefile.am
+28
-12
client/mysqlbinlog.cc
client/mysqlbinlog.cc
+19
-0
client/mysqltest.c
client/mysqltest.c
+18
-7
include/mysql.h
include/mysql.h
+1
-1
include/mysql_h.ic
include/mysql_h.ic
+1
-0
mysql-test/Makefile.am
mysql-test/Makefile.am
+1
-1
mysql-test/r/func_in.result
mysql-test/r/func_in.result
+4
-0
mysql-test/t/func_in.test
mysql-test/t/func_in.test
+7
-0
mysql-test/t/kill.test
mysql-test/t/kill.test
+4
-1
mysql-test/t/mysqladmin.test
mysql-test/t/mysqladmin.test
+2
-2
mysys/my_getopt.c
mysys/my_getopt.c
+1
-0
scripts/make_binary_distribution.sh
scripts/make_binary_distribution.sh
+1
-1
sql/opt_range.cc
sql/opt_range.cc
+2
-1
No files found.
Makefile.am
View file @
03c79129
...
@@ -109,7 +109,11 @@ dist-hook:
...
@@ -109,7 +109,11 @@ dist-hook:
tags
:
tags
:
support-files/build-tags
support-files/build-tags
.PHONY
:
init-db bin-dist
.PHONY
:
init-db bin-dist
\
test test-force test-full test-force-full test-force-mem
\
test-pl test-force-pl test-full-pl test-force-full-pl test-force-pl-mem
\
test-ps test-ns
# Target 'test' will run the regression test suite using the built server.
# Target 'test' will run the regression test suite using the built server.
#
#
...
@@ -119,21 +123,33 @@ tags:
...
@@ -119,21 +123,33 @@ tags:
# will then calculate the various port numbers it needs from this,
# will then calculate the various port numbers it needs from this,
# making sure each user use different ports.
# making sure each user use different ports.
test
:
test-ps
:
cd
mysql-test
;
\
@PERL@ ./mysql-test-run.pl
$(force)
--ps-protocol
test-ns
:
cd
mysql-test
;
\
cd
mysql-test
;
\
./mysql-test-run
&&
\
@PERL@ ./mysql-test-run.pl
$(force)
./mysql-test-run
--ps-protocol
test
:
test-ns test-ps
# To ease script-writing, although in 5.0 it is identical to 'test'
test-full
:
test
test-force
:
test-force
:
cd
mysql-test
;
\
$(MAKE)
force
=
--force
test
./mysql-test-run
--force
&&
\
./mysql-test-run
--ps-protocol
--force
test-force-mem
:
test-force-full
:
cd
mysql-test
;
\
$(MAKE)
force
=
--force
test-full
./mysql-test-run
--force
--mem
&&
\
./mysql-test-run
--ps-protocol
--force
--mem
#used by autopush.pl to run memory based tests
#used by autopush.pl to run memory based tests
test-force-mem
:
$(MAKE)
'force=--force --mem'
test
# Keep these for a while
test-pl
:
test
test-full-pl
:
test-full
test-force-pl
:
test-force
test-force-pl-mem
:
test-force-mem
test-force-full-pl
:
test-force-full
client/mysqlbinlog.cc
View file @
03c79129
...
@@ -1310,6 +1310,25 @@ static int dump_local_log_entries(const char* logname)
...
@@ -1310,6 +1310,25 @@ static int dump_local_log_entries(const char* logname)
}
}
else
// reading from stdin;
else
// reading from stdin;
{
{
/*
Bug fix: #23735
Author: Chuck Bell
Description:
Windows opens stdin in text mode by default. Certain characters
such as CTRL-Z are interpeted as events and the read() method
will stop. CTRL-Z is the EOF marker in Windows. to get past this
you have to open stdin in binary mode. Setmode() is used to set
stdin in binary mode. Errors on setting this mode result in
halting the function and printing an error message to stderr.
*/
#if defined (__WIN__) || (_WIN64)
if
(
_setmode
(
fileno
(
stdin
),
O_BINARY
)
==
-
1
)
{
fprintf
(
stderr
,
"Could not set binary mode on stdin.
\n
"
);
return
1
;
}
#endif
if
(
init_io_cache
(
file
,
fileno
(
stdin
),
0
,
READ_CACHE
,
(
my_off_t
)
0
,
if
(
init_io_cache
(
file
,
fileno
(
stdin
),
0
,
READ_CACHE
,
(
my_off_t
)
0
,
0
,
MYF
(
MY_WME
|
MY_NABP
|
MY_DONT_CHECK_FILESIZE
)))
0
,
MYF
(
MY_WME
|
MY_NABP
|
MY_DONT_CHECK_FILESIZE
)))
return
1
;
return
1
;
...
...
client/mysqltest.c
View file @
03c79129
...
@@ -103,6 +103,7 @@ static my_bool disable_query_log= 0, disable_result_log= 0;
...
@@ -103,6 +103,7 @@ static my_bool disable_query_log= 0, disable_result_log= 0;
static
my_bool
disable_warnings
=
0
,
disable_ps_warnings
=
0
;
static
my_bool
disable_warnings
=
0
,
disable_ps_warnings
=
0
;
static
my_bool
disable_info
=
1
;
static
my_bool
disable_info
=
1
;
static
my_bool
abort_on_error
=
1
;
static
my_bool
abort_on_error
=
1
;
static
my_bool
server_initialized
=
0
;
static
char
**
default_argv
;
static
char
**
default_argv
;
static
const
char
*
load_default_groups
[]
=
{
"mysqltest"
,
"client"
,
0
};
static
const
char
*
load_default_groups
[]
=
{
"mysqltest"
,
"client"
,
0
};
...
@@ -770,13 +771,18 @@ void free_used_memory()
...
@@ -770,13 +771,18 @@ void free_used_memory()
free_all_replace
();
free_all_replace
();
my_free
(
pass
,
MYF
(
MY_ALLOW_ZERO_PTR
));
my_free
(
pass
,
MYF
(
MY_ALLOW_ZERO_PTR
));
free_defaults
(
default_argv
);
free_defaults
(
default_argv
);
mysql_server_end
();
free_re
();
free_re
();
#ifdef __WIN__
#ifdef __WIN__
free_tmp_sh_file
();
free_tmp_sh_file
();
free_win_path_patterns
();
free_win_path_patterns
();
#endif
#endif
DBUG_VOID_RETURN
;
/* Only call mysql_server_end if mysql_server_init has been called */
if
(
server_initialized
)
mysql_server_end
();
/* Don't use DBUG after mysql_server_end() */
return
;
}
}
...
@@ -1240,7 +1246,9 @@ void var_set(const char *var_name, const char *var_name_end,
...
@@ -1240,7 +1246,9 @@ void var_set(const char *var_name, const char *var_name_end,
v
->
int_dirty
=
0
;
v
->
int_dirty
=
0
;
v
->
str_val_len
=
strlen
(
v
->
str_val
);
v
->
str_val_len
=
strlen
(
v
->
str_val
);
}
}
strxmov
(
buf
,
v
->
name
,
"="
,
v
->
str_val
,
NullS
);
my_snprintf
(
buf
,
sizeof
(
buf
),
"%.*s=%.*s"
,
v
->
name_len
,
v
->
name
,
v
->
str_val_len
,
v
->
str_val
);
if
(
!
(
v
->
env_s
=
my_strdup
(
buf
,
MYF
(
MY_WME
))))
if
(
!
(
v
->
env_s
=
my_strdup
(
buf
,
MYF
(
MY_WME
))))
die
(
"Out of memory"
);
die
(
"Out of memory"
);
putenv
(
v
->
env_s
);
putenv
(
v
->
env_s
);
...
@@ -4679,10 +4687,9 @@ void run_query_normal(struct st_connection *cn, struct st_command *command,
...
@@ -4679,10 +4687,9 @@ void run_query_normal(struct st_connection *cn, struct st_command *command,
}
}
/*
/*
Store the result. If res is NULL, use mysql_field_count to
Store the result of the query if it will return any fields
determine if that was expected
*/
*/
if
(
!
(
res
=
mysql_store_result
(
mysql
))
&&
mysql_field_count
(
mysql
))
if
(
mysql_field_count
(
mysql
)
&&
((
res
=
mysql_store_result
(
mysql
))
==
0
))
{
{
handle_error
(
command
,
mysql_errno
(
mysql
),
mysql_error
(
mysql
),
handle_error
(
command
,
mysql_errno
(
mysql
),
mysql_error
(
mysql
),
mysql_sqlstate
(
mysql
),
ds
);
mysql_sqlstate
(
mysql
),
ds
);
...
@@ -4734,7 +4741,10 @@ void run_query_normal(struct st_connection *cn, struct st_command *command,
...
@@ -4734,7 +4741,10 @@ void run_query_normal(struct st_connection *cn, struct st_command *command,
}
}
if
(
res
)
if
(
res
)
{
mysql_free_result
(
res
);
mysql_free_result
(
res
);
res
=
0
;
}
counter
++
;
counter
++
;
}
while
(
!
(
err
=
mysql_next_result
(
mysql
)));
}
while
(
!
(
err
=
mysql_next_result
(
mysql
)));
if
(
err
>
0
)
if
(
err
>
0
)
...
@@ -4801,7 +4811,7 @@ void handle_error(struct st_command *command,
...
@@ -4801,7 +4811,7 @@ void handle_error(struct st_command *command,
err_errno
,
err_error
);
err_errno
,
err_error
);
/* Abort the run of this test, pass the failed query as reason */
/* Abort the run of this test, pass the failed query as reason */
abort_not_supported_test
(
"Query '%s' failed, required functionality"
\
abort_not_supported_test
(
"Query '%s' failed, required functionality
"
\
"not supported"
,
command
->
query
);
"not supported"
,
command
->
query
);
}
}
...
@@ -5621,6 +5631,7 @@ int main(int argc, char **argv)
...
@@ -5621,6 +5631,7 @@ int main(int argc, char **argv)
embedded_server_args
,
embedded_server_args
,
(
char
**
)
embedded_server_groups
))
(
char
**
)
embedded_server_groups
))
die
(
"Can't initialize MySQL server"
);
die
(
"Can't initialize MySQL server"
);
server_initialized
=
1
;
if
(
cur_file
==
file_stack
&&
cur_file
->
file
==
0
)
if
(
cur_file
==
file_stack
&&
cur_file
->
file
==
0
)
{
{
cur_file
->
file
=
stdin
;
cur_file
->
file
=
stdin
;
...
...
include/mysql.h
View file @
03c79129
...
@@ -65,9 +65,9 @@ typedef int my_socket;
...
@@ -65,9 +65,9 @@ typedef int my_socket;
#endif
/* my_socket_defined */
#endif
/* my_socket_defined */
#endif
/* _global_h */
#endif
/* _global_h */
#include "mysql_version.h"
#include "mysql_com.h"
#include "mysql_com.h"
#include "mysql_time.h"
#include "mysql_time.h"
#include "mysql_version.h"
#include "typelib.h"
#include "typelib.h"
#include "my_list.h"
/* for LISTs used in 'MYSQL' and 'MYSQL_STMT' */
#include "my_list.h"
/* for LISTs used in 'MYSQL' and 'MYSQL_STMT' */
...
...
include/mysql_h.ic
View file @
03c79129
...
@@ -575,6 +575,7 @@ enum mysql_enum_shutdown_level
...
@@ -575,6 +575,7 @@ enum mysql_enum_shutdown_level
SHUTDOWN_WAIT_UPDATES = (unsigned char)((1 << 3)),
SHUTDOWN_WAIT_UPDATES = (unsigned char)((1 << 3)),
SHUTDOWN_WAIT_ALL_BUFFERS = ((unsigned char)((1 << 3)) << 1),
SHUTDOWN_WAIT_ALL_BUFFERS = ((unsigned char)((1 << 3)) << 1),
SHUTDOWN_WAIT_CRITICAL_BUFFERS = (((unsigned char)((1 << 3)) << 1) + 1),
SHUTDOWN_WAIT_CRITICAL_BUFFERS = (((unsigned char)((1 << 3)) << 1) + 1),
KILL_QUERY = 254,
KILL_CONNECTION = 255,
KILL_CONNECTION = 255,
};
};
# 154 "mysql.h"
# 154 "mysql.h"
...
...
mysql-test/Makefile.am
View file @
03c79129
...
@@ -98,7 +98,7 @@ install-data-local:
...
@@ -98,7 +98,7 @@ install-data-local:
$(INSTALL_DATA)
$(srcdir)
/std_data/Moscow_leap
$(DESTDIR)$(testdir)
/std_data
$(INSTALL_DATA)
$(srcdir)
/std_data/Moscow_leap
$(DESTDIR)$(testdir)
/std_data
$(INSTALL_DATA)
$(srcdir)
/std_data/
*
.pem
$(DESTDIR)$(testdir)
/std_data
$(INSTALL_DATA)
$(srcdir)
/std_data/
*
.pem
$(DESTDIR)$(testdir)
/std_data
$(INSTALL_DATA)
$(srcdir)
/std_data/
*
.frm
$(DESTDIR)$(testdir)
/std_data
$(INSTALL_DATA)
$(srcdir)
/std_data/
*
.frm
$(DESTDIR)$(testdir)
/std_data
$(INSTALL_DATA)
$(srcdir)
/std_data/
*
.MY
*
$(distdir)
/std_data
$(INSTALL_DATA)
$(srcdir)
/std_data/
*
.MY
*
$(
DESTDIR)$(
distdir)
/std_data
$(INSTALL_DATA)
$(srcdir)
/std_data/
*
.cnf
$(DESTDIR)$(testdir)
/std_data
$(INSTALL_DATA)
$(srcdir)
/std_data/
*
.cnf
$(DESTDIR)$(testdir)
/std_data
$(INSTALL_DATA)
$(srcdir)
/lib/init_db.sql
$(DESTDIR)$(testdir)
/lib
$(INSTALL_DATA)
$(srcdir)
/lib/init_db.sql
$(DESTDIR)$(testdir)
/lib
$(INSTALL_DATA)
$(srcdir)
/lib/
*
.pl
$(DESTDIR)$(testdir)
/lib
$(INSTALL_DATA)
$(srcdir)
/lib/
*
.pl
$(DESTDIR)$(testdir)
/lib
...
...
mysql-test/r/func_in.result
View file @
03c79129
...
@@ -350,5 +350,9 @@ select some_id from t1 where some_id not in(-4,-1,3423534,2342342);
...
@@ -350,5 +350,9 @@ select some_id from t1 where some_id not in(-4,-1,3423534,2342342);
some_id
some_id
1
1
2
2
select some_id from t1 where some_id not in('-1', '0');
some_id
1
2
drop table t1;
drop table t1;
End of 5.0 tests
End of 5.0 tests
mysql-test/t/func_in.test
View file @
03c79129
...
@@ -252,6 +252,13 @@ insert into t1 values (1),(2);
...
@@ -252,6 +252,13 @@ insert into t1 values (1),(2);
select
some_id
from
t1
where
some_id
not
in
(
2
,
-
1
);
select
some_id
from
t1
where
some_id
not
in
(
2
,
-
1
);
select
some_id
from
t1
where
some_id
not
in
(
-
4
,
-
1
,
-
4
);
select
some_id
from
t1
where
some_id
not
in
(
-
4
,
-
1
,
-
4
);
select
some_id
from
t1
where
some_id
not
in
(
-
4
,
-
1
,
3423534
,
2342342
);
select
some_id
from
t1
where
some_id
not
in
(
-
4
,
-
1
,
3423534
,
2342342
);
#
# BUG#24261: crash when WHERE contains NOT IN ('<negative value>') for unsigned column type
#
select
some_id
from
t1
where
some_id
not
in
(
'-1'
,
'0'
);
drop
table
t1
;
drop
table
t1
;
...
...
mysql-test/t/kill.test
View file @
03c79129
...
@@ -76,11 +76,14 @@ insert into t2 select id from t1;
...
@@ -76,11 +76,14 @@ insert into t2 select id from t1;
create
table
t3
(
kill_id
int
);
create
table
t3
(
kill_id
int
);
insert
into
t3
values
(
connection_id
());
insert
into
t3
values
(
connection_id
());
connect
(
conn2
,
localhost
,
root
,,);
connection
conn2
;
connection
conn1
;
--
disable_result_log
--
disable_result_log
send
select
id
from
t1
where
id
in
(
select
distinct
id
from
t2
);
send
select
id
from
t1
where
id
in
(
select
distinct
id
from
t2
);
--
enable_result_log
--
enable_result_log
connect
(
conn2
,
localhost
,
root
,,);
connection
conn2
;
connection
conn2
;
select
((
@
id
:=
kill_id
)
-
kill_id
)
from
t3
;
select
((
@
id
:=
kill_id
)
-
kill_id
)
from
t3
;
--
sleep
1
--
sleep
1
...
...
mysql-test/t/mysqladmin.test
View file @
03c79129
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
database
=
db1
database
=
db1
EOF
EOF
--
replace_regex
/
\
/.*
mysqladmin
/
mysqladmi
n
/
--
replace_regex
/
.*
mysqladmin
.*:
unknown
/
mysqladmin
:
unknow
n
/
--
error
7
--
error
7
--
exec
$MYSQLADMIN
--
defaults
-
file
=
$MYSQLTEST_VARDIR
/
tmp
/
bug10608
.
cnf
-
S
$MASTER_MYSOCK
-
P
$MASTER_MYPORT
-
u
root
--
password
=
ping
2
>&
1
--
exec
$MYSQLADMIN
--
defaults
-
file
=
$MYSQLTEST_VARDIR
/
tmp
/
bug10608
.
cnf
-
S
$MASTER_MYSOCK
-
P
$MASTER_MYPORT
-
u
root
--
password
=
ping
2
>&
1
...
@@ -27,6 +27,6 @@ EOF
...
@@ -27,6 +27,6 @@ EOF
loose
-
database
=
db2
loose
-
database
=
db2
EOF
EOF
--
replace_regex
/
Warning
:
.*
mysqladmin
/
Warning
:
mysqladmi
n
/
--
replace_regex
/
Warning
:
.*
mysqladmin
.*:
unknown
/
Warning
:
mysqladmin
:
unknow
n
/
--
exec
$MYSQLADMIN
--
defaults
-
file
=
$MYSQLTEST_VARDIR
/
tmp
/
bug10608
.
cnf
-
S
$MASTER_MYSOCK
-
P
$MASTER_MYPORT
-
u
root
--
password
=
ping
2
>&
1
--
exec
$MYSQLADMIN
--
defaults
-
file
=
$MYSQLTEST_VARDIR
/
tmp
/
bug10608
.
cnf
-
S
$MASTER_MYSOCK
-
P
$MASTER_MYPORT
-
u
root
--
password
=
ping
2
>&
1
mysys/my_getopt.c
View file @
03c79129
...
@@ -70,6 +70,7 @@ static void default_reporter(enum loglevel level,
...
@@ -70,6 +70,7 @@ static void default_reporter(enum loglevel level,
fprintf
(
stderr
,
"%s"
,
"Info: "
);
fprintf
(
stderr
,
"%s"
,
"Info: "
);
vfprintf
(
stderr
,
format
,
args
);
vfprintf
(
stderr
,
format
,
args
);
va_end
(
args
);
va_end
(
args
);
fflush
(
stderr
);
}
}
/*
/*
...
...
scripts/make_binary_distribution.sh
View file @
03c79129
...
@@ -245,7 +245,7 @@ $CP mysql-test/t/*.def $BASE/mysql-test/t
...
@@ -245,7 +245,7 @@ $CP mysql-test/t/*.def $BASE/mysql-test/t
$CP
mysql-test/std_data/
*
.dat mysql-test/std_data/
*
.frm
\
$CP
mysql-test/std_data/
*
.dat mysql-test/std_data/
*
.frm
\
mysql-test/std_data/
*
.pem mysql-test/std_data/Moscow_leap
\
mysql-test/std_data/
*
.pem mysql-test/std_data/Moscow_leap
\
mysql-test/std_data/des_key_file mysql-test/std_data/
*
.
*
001
\
mysql-test/std_data/des_key_file mysql-test/std_data/
*
.
*
001
\
mysql-test/std_data/
*
.cnf
\
mysql-test/std_data/
*
.cnf
mysql-test/std_data/
*
.MY
*
\
$BASE
/mysql-test/std_data
$BASE
/mysql-test/std_data
$CP
mysql-test/t/
*
.test mysql-test/t/
*
.imtest
\
$CP
mysql-test/t/
*
.test mysql-test/t/
*
.imtest
\
mysql-test/t/
*
.disabled mysql-test/t/
*
.opt
\
mysql-test/t/
*
.disabled mysql-test/t/
*
.opt
\
...
...
sql/opt_range.cc
View file @
03c79129
...
@@ -3703,7 +3703,8 @@ static SEL_TREE *get_func_mm_tree(PARAM *param, Item_func *cond_func,
...
@@ -3703,7 +3703,8 @@ static SEL_TREE *get_func_mm_tree(PARAM *param, Item_func *cond_func,
for
(
uint
idx
=
0
;
idx
<
param
->
keys
;
idx
++
)
for
(
uint
idx
=
0
;
idx
<
param
->
keys
;
idx
++
)
{
{
SEL_ARG
*
new_interval
,
*
last_val
;
SEL_ARG
*
new_interval
,
*
last_val
;
if
(((
new_interval
=
tree2
->
keys
[
idx
]))
&&
if
(((
new_interval
=
tree2
->
keys
[
idx
]))
&&
(
tree
->
keys
[
idx
])
&&
((
last_val
=
tree
->
keys
[
idx
]
->
last
())))
((
last_val
=
tree
->
keys
[
idx
]
->
last
())))
{
{
new_interval
->
min_value
=
last_val
->
max_value
;
new_interval
->
min_value
=
last_val
->
max_value
;
...
...
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