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
c2b83beb
Commit
c2b83beb
authored
Oct 21, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge abarkov@bk-internal:/home/bk/mysql-5.0
into mysql.com:/usr/home/bar/mysql-5.0.b12371
parents
06164d5d
6e2f09ee
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
160 additions
and
14 deletions
+160
-14
client/mysql.cc
client/mysql.cc
+2
-0
configure.in
configure.in
+2
-2
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+1
-1
mysql-test/r/im_life_cycle.result
mysql-test/r/im_life_cycle.result
+1
-1
mysql-test/r/select.result
mysql-test/r/select.result
+57
-0
mysql-test/t/im_life_cycle.imtest
mysql-test/t/im_life_cycle.imtest
+1
-0
mysql-test/t/select.test
mysql-test/t/select.test
+39
-0
server-tools/instance-manager/instance.cc
server-tools/instance-manager/instance.cc
+13
-3
sql/item_cmpfunc.cc
sql/item_cmpfunc.cc
+9
-0
sql/item_cmpfunc.h
sql/item_cmpfunc.h
+5
-2
sql/sql_help.cc
sql/sql_help.cc
+2
-1
sql/sql_lex.cc
sql/sql_lex.cc
+1
-0
sql/sql_lex.h
sql/sql_lex.h
+2
-0
sql/sql_yacc.yy
sql/sql_yacc.yy
+8
-4
support-files/mysql.spec.sh
support-files/mysql.spec.sh
+17
-0
No files found.
client/mysql.cc
View file @
c2b83beb
...
...
@@ -1010,10 +1010,12 @@ static int read_and_execute(bool interactive)
#elif defined(__WIN__)
if
(
!
tmpbuf
.
is_alloced
())
tmpbuf
.
alloc
(
65535
);
tmpbuf
.
length
(
0
);
buffer
.
length
(
0
);
unsigned
long
clen
;
do
{
line
=
my_cgets
((
char
*
)
tmpbuf
.
ptr
(),
tmpbuf
.
alloced_length
()
-
1
,
&
clen
);
buffer
.
append
(
line
,
clen
);
/*
if we got buffer fully filled than there is a chance that
...
...
configure.in
View file @
c2b83beb
...
...
@@ -7,7 +7,7 @@ AC_INIT(sql/mysqld.cc)
AC_CANONICAL_SYSTEM
# The Docs Makefile.am parses this line!
# remember to also change ndb version below and update version.c in ndb
AM_INIT_AUTOMAKE
(
mysql, 5.0.1
5
)
AM_INIT_AUTOMAKE
(
mysql, 5.0.1
6
)
AM_CONFIG_HEADER
(
config.h
)
PROTOCOL_VERSION
=
10
...
...
@@ -18,7 +18,7 @@ SHARED_LIB_VERSION=15:0:0
# ndb version
NDB_VERSION_MAJOR
=
5
NDB_VERSION_MINOR
=
0
NDB_VERSION_BUILD
=
1
5
NDB_VERSION_BUILD
=
1
6
NDB_VERSION_STATUS
=
""
# Set all version vars based on $VERSION. How do we do this more elegant ?
...
...
mysql-test/mysql-test-run.pl
View file @
c2b83beb
...
...
@@ -243,7 +243,7 @@ our $opt_sleep_time_after_restart= 1;
our
$opt_sleep_time_for_delete
=
10
;
our
$opt_testcase_timeout
;
our
$opt_suite_timeout
;
my
$default_testcase_timeout
=
1
0
;
# 10
min max
my
$default_testcase_timeout
=
1
5
;
# 15
min max
my
$default_suite_timeout
=
120
;
# 2 hours max
our
$opt_socket
;
...
...
mysql-test/r/im_life_cycle.result
View file @
c2b83beb
...
...
@@ -21,7 +21,7 @@ instance_name status version
mysqld2 online VERSION
SHOW VARIABLES LIKE 'port';
Variable_name Value
port
9312
port
IM_MYSQLD1_PORT
STOP INSTANCE mysqld2;
SHOW INSTANCES;
instance_name status
...
...
mysql-test/r/select.result
View file @
c2b83beb
...
...
@@ -2965,6 +2965,63 @@ NULL
SELECT IFNULL(NULL, NULL);
IFNULL(NULL, NULL)
NULL
SET @OLD_SQL_MODE12595=@@SQL_MODE, @@SQL_MODE='';
SHOW LOCAL VARIABLES LIKE 'SQL_MODE';
Variable_name Value
sql_mode
CREATE TABLE BUG_12595(a varchar(100));
INSERT INTO BUG_12595 VALUES ('hakan%'), ('hakank'), ("ha%an");
SELECT * FROM BUG_12595 WHERE a LIKE 'hakan\%';
a
hakan%
SELECT * FROM BUG_12595 WHERE a LIKE 'hakan*%' ESCAPE '*';
a
hakan%
SELECT * FROM BUG_12595 WHERE a LIKE 'hakan**%' ESCAPE '**';
ERROR HY000: Incorrect arguments to ESCAPE
SELECT * FROM BUG_12595 WHERE a LIKE 'hakan%' ESCAPE '';
a
hakan%
hakank
SELECT * FROM BUG_12595 WHERE a LIKE 'hakan\%' ESCAPE '';
a
SELECT * FROM BUG_12595 WHERE a LIKE 'ha\%an' ESCAPE 0x5c;
a
ha%an
SELECT * FROM BUG_12595 WHERE a LIKE 'ha%%an' ESCAPE '%';
a
ha%an
SELECT * FROM BUG_12595 WHERE a LIKE 'ha\%an' ESCAPE '\\';
a
ha%an
SELECT * FROM BUG_12595 WHERE a LIKE 'ha|%an' ESCAPE '|';
a
ha%an
SET @@SQL_MODE='NO_BACKSLASH_ESCAPES';
SHOW LOCAL VARIABLES LIKE 'SQL_MODE';
Variable_name Value
sql_mode NO_BACKSLASH_ESCAPES
SELECT * FROM BUG_12595 WHERE a LIKE 'hakan\%';
a
SELECT * FROM BUG_12595 WHERE a LIKE 'hakan*%' ESCAPE '*';
a
hakan%
SELECT * FROM BUG_12595 WHERE a LIKE 'hakan**%' ESCAPE '**';
ERROR HY000: Incorrect arguments to ESCAPE
SELECT * FROM BUG_12595 WHERE a LIKE 'hakan\%' ESCAPE '\\';
ERROR HY000: Incorrect arguments to ESCAPE
SELECT * FROM BUG_12595 WHERE a LIKE 'hakan%' ESCAPE '';
ERROR HY000: Incorrect arguments to ESCAPE
SELECT * FROM BUG_12595 WHERE a LIKE 'ha\%an' ESCAPE 0x5c;
a
ha%an
SELECT * FROM BUG_12595 WHERE a LIKE 'ha|%an' ESCAPE '|';
a
ha%an
SELECT * FROM BUG_12595 WHERE a LIKE 'hakan\n%' ESCAPE '\n';
ERROR HY000: Incorrect arguments to ESCAPE
SET @@SQL_MODE=@OLD_SQL_MODE12595;
DROP TABLE BUG_12595;
create table t1 (a char(1));
create table t2 (a char(1));
insert into t1 values ('a'),('b'),('c');
...
...
mysql-test/t/im_life_cycle.imtest
View file @
c2b83beb
...
...
@@ -46,6 +46,7 @@ SHOW INSTANCE STATUS mysqld2;
--connect (mysql_con,localhost,root,,mysql,$IM_MYSQLD1_PORT,$IM_MYSQLD1_SOCK)
--connection mysql_con
--replace_result $IM_MYSQLD1_PORT IM_MYSQLD1_PORT
SHOW VARIABLES LIKE 'port';
--connection default
...
...
mysql-test/t/select.test
View file @
c2b83beb
...
...
@@ -2517,6 +2517,45 @@ SELECT CAST(IFNULL(NULL, NULL) AS DECIMAL);
SELECT
ABS
(
IFNULL
(
NULL
,
NULL
));
SELECT
IFNULL
(
NULL
,
NULL
);
#
# BUG #12595 (ESCAPE must be exactly one)
#
SET
@
OLD_SQL_MODE12595
=@@
SQL_MODE
,
@@
SQL_MODE
=
''
;
SHOW
LOCAL
VARIABLES
LIKE
'SQL_MODE'
;
CREATE
TABLE
BUG_12595
(
a
varchar
(
100
));
INSERT
INTO
BUG_12595
VALUES
(
'hakan%'
),
(
'hakank'
),
(
"ha%an"
);
SELECT
*
FROM
BUG_12595
WHERE
a
LIKE
'hakan\%'
;
SELECT
*
FROM
BUG_12595
WHERE
a
LIKE
'hakan*%'
ESCAPE
'*'
;
--
error
1210
SELECT
*
FROM
BUG_12595
WHERE
a
LIKE
'hakan**%'
ESCAPE
'**'
;
# this should work when sql_mode is not NO_BACKSLASH_ESCAPES
SELECT
*
FROM
BUG_12595
WHERE
a
LIKE
'hakan%'
ESCAPE
''
;
SELECT
*
FROM
BUG_12595
WHERE
a
LIKE
'hakan\%'
ESCAPE
''
;
SELECT
*
FROM
BUG_12595
WHERE
a
LIKE
'ha\%an'
ESCAPE
0x5c
;
SELECT
*
FROM
BUG_12595
WHERE
a
LIKE
'ha%%an'
ESCAPE
'%'
;
SELECT
*
FROM
BUG_12595
WHERE
a
LIKE
'ha\%an'
ESCAPE
'\\'
;
SELECT
*
FROM
BUG_12595
WHERE
a
LIKE
'ha|%an'
ESCAPE
'|'
;
SET
@@
SQL_MODE
=
'NO_BACKSLASH_ESCAPES'
;
SHOW
LOCAL
VARIABLES
LIKE
'SQL_MODE'
;
SELECT
*
FROM
BUG_12595
WHERE
a
LIKE
'hakan\%'
;
SELECT
*
FROM
BUG_12595
WHERE
a
LIKE
'hakan*%'
ESCAPE
'*'
;
--
error
1210
SELECT
*
FROM
BUG_12595
WHERE
a
LIKE
'hakan**%'
ESCAPE
'**'
;
--
error
1210
SELECT
*
FROM
BUG_12595
WHERE
a
LIKE
'hakan\%'
ESCAPE
'\\'
;
#this gives an error when NO_BACKSLASH_ESCAPES is set
--
error
1210
SELECT
*
FROM
BUG_12595
WHERE
a
LIKE
'hakan%'
ESCAPE
''
;
SELECT
*
FROM
BUG_12595
WHERE
a
LIKE
'ha\%an'
ESCAPE
0x5c
;
SELECT
*
FROM
BUG_12595
WHERE
a
LIKE
'ha|%an'
ESCAPE
'|'
;
--
error
1210
SELECT
*
FROM
BUG_12595
WHERE
a
LIKE
'hakan\n%'
ESCAPE
'\n'
;
SET
@@
SQL_MODE
=@
OLD_SQL_MODE12595
;
DROP
TABLE
BUG_12595
;
#
# Bug #6495 Illogical requirement for column qualification in NATURAL join
#
...
...
server-tools/instance-manager/instance.cc
View file @
c2b83beb
...
...
@@ -138,15 +138,25 @@ static int wait_process(My_process_info *pi)
static
int
start_process
(
Instance_options
*
instance_options
,
My_process_info
*
pi
)
{
#ifndef __QNX__
*
pi
=
fork
();
#else
/*
On QNX one cannot use fork() in multithreaded environment and we
should use spawn() or one of it's siblings instead.
Here we use spawnv(), which is a combination of fork() and execv()
in one call. It returns the pid of newly created process (>0) or -1
*/
*
pi
=
spawnv
(
P_NOWAIT
,
instance_options
->
mysqld_path
,
instance_options
->
argv
);
#endif
switch
(
*
pi
)
{
case
0
:
case
0
:
/* never happens on QNX */
execv
(
instance_options
->
mysqld_path
,
instance_options
->
argv
);
/* exec never returns */
exit
(
1
);
case
1
:
log_info
(
"cannot
fork()
to start instance %s"
,
case
-
1
:
log_info
(
"cannot
create a new process
to start instance %s"
,
instance_options
->
instance_name
);
return
1
;
}
...
...
sql/item_cmpfunc.cc
View file @
c2b83beb
...
...
@@ -2958,6 +2958,15 @@ bool Item_func_like::fix_fields(THD *thd, Item **ref)
String
*
escape_str
=
escape_item
->
val_str
(
&
tmp_value1
);
if
(
escape_str
)
{
if
(
escape_used_in_parsing
&&
(
(((
thd
->
variables
.
sql_mode
&
MODE_NO_BACKSLASH_ESCAPES
)
&&
escape_str
->
numchars
()
!=
1
)
||
escape_str
->
numchars
()
>
1
)))
{
my_error
(
ER_WRONG_ARGUMENTS
,
MYF
(
0
),
"ESCAPE"
);
return
TRUE
;
}
if
(
use_mb
(
cmp
.
cmp_collation
.
collation
))
{
CHARSET_INFO
*
cs
=
escape_str
->
charset
();
...
...
sql/item_cmpfunc.h
View file @
c2b83beb
...
...
@@ -985,13 +985,16 @@ class Item_func_like :public Item_bool_func2
enum
{
alphabet_size
=
256
};
Item
*
escape_item
;
bool
escape_used_in_parsing
;
public:
int
escape
;
Item_func_like
(
Item
*
a
,
Item
*
b
,
Item
*
escape_arg
)
Item_func_like
(
Item
*
a
,
Item
*
b
,
Item
*
escape_arg
,
bool
escape_used
)
:
Item_bool_func2
(
a
,
b
),
canDoTurboBM
(
FALSE
),
pattern
(
0
),
pattern_len
(
0
),
bmGs
(
0
),
bmBc
(
0
),
escape_item
(
escape_arg
)
{}
bmGs
(
0
),
bmBc
(
0
),
escape_item
(
escape_arg
),
escape_used_in_parsing
(
escape_used
)
{}
longlong
val_int
();
enum
Functype
functype
()
const
{
return
LIKE_FUNC
;
}
optimize_type
select_optimize
()
const
;
...
...
sql/sql_help.cc
View file @
c2b83beb
...
...
@@ -599,7 +599,8 @@ SQL_SELECT *prepare_select_for_name(THD *thd, const char *mask, uint mlen,
{
Item
*
cond
=
new
Item_func_like
(
new
Item_field
(
pfname
),
new
Item_string
(
mask
,
mlen
,
pfname
->
charset
()),
new
Item_string
(
"
\\
"
,
1
,
&
my_charset_latin1
));
new
Item_string
(
"
\\
"
,
1
,
&
my_charset_latin1
),
FALSE
);
if
(
thd
->
is_fatal_error
)
return
0
;
// OOM
return
prepare_simple_select
(
thd
,
cond
,
table
,
error
);
...
...
sql/sql_lex.cc
View file @
c2b83beb
...
...
@@ -175,6 +175,7 @@ void lex_start(THD *thd, uchar *buf,uint length)
lex
->
spcont
=
NULL
;
lex
->
proc_list
.
first
=
0
;
lex
->
query_tables_own_last
=
0
;
lex
->
escape_used
=
FALSE
;
if
(
lex
->
sroutines
.
records
)
my_hash_reset
(
&
lex
->
sroutines
);
...
...
sql/sql_lex.h
View file @
c2b83beb
...
...
@@ -894,6 +894,8 @@ typedef struct st_lex
during replication ("LOCAL 'filename' REPLACE INTO" part).
*/
uchar
*
fname_start
,
*
fname_end
;
bool
escape_used
;
st_lex
();
...
...
sql/sql_yacc.yy
View file @
c2b83beb
...
...
@@ -4314,9 +4314,9 @@ predicate:
{ $$= new Item_func_eq(new Item_func_soundex($1),
new Item_func_soundex($4)); }
| bit_expr LIKE simple_expr opt_escape
{ $$= new Item_func_like($1,$3,$4); }
{ $$= new Item_func_like($1,$3,$4
,Lex->escape_used
); }
| bit_expr not LIKE simple_expr opt_escape
{ $$= new Item_func_not(new Item_func_like($1,$4,$5)); }
{ $$= new Item_func_not(new Item_func_like($1,$4,$5
, Lex->escape_used
)); }
| bit_expr REGEXP bit_expr { $$= new Item_func_regex($1,$3); }
| bit_expr not REGEXP bit_expr
{ $$= negate_expression(YYTHD, new Item_func_regex($1,$4)); }
...
...
@@ -5678,10 +5678,14 @@ having_clause:
;
opt_escape:
ESCAPE_SYM simple_expr { $$= $2; }
ESCAPE_SYM simple_expr
{
Lex->escape_used= TRUE;
$$= $2;
}
| /* empty */
{
Lex->escape_used= FALSE;
$$= ((YYTHD->variables.sql_mode & MODE_NO_BACKSLASH_ESCAPES) ?
new Item_string("", 0, &my_charset_latin1) :
new Item_string("\\", 1, &my_charset_latin1));
...
...
support-files/mysql.spec.sh
View file @
c2b83beb
%define mysql_version @VERSION@
# use "rpmbuild --with static" or "rpm --define '_with_static 1'" (for RPM 3.x)
# to enable static linking (off by default)
%
{
?_with_static:%define STATIC_BUILD 1
}
%
{!
?_with_static:%define STATIC_BUILD 0
}
# use "rpmbuild --with yassl" or "rpm --define '_with_yassl 1'" (for RPM 3.x)
# to build with yaSSL support (off by default)
%
{
?_with_yassl:%define YASSL_BUILD 1
}
%
{!
?_with_yassl:%define YASSL_BUILD 0
}
%if %
{
STATIC_BUILD
}
%define release 0
%else
...
...
@@ -239,6 +246,9 @@ sh -c "PATH=\"${MYSQL_BUILD_PATH:-$PATH}\" \
--with-unix-socket-path=/var/lib/mysql/mysql.sock
\
--prefix=/
\
--with-extra-charsets=complex
\
%if %{YASSL_BUILD}
--with-yassl
\
%endif
--exec-prefix=%{_exec_prefix}
\
--libexecdir=%{_sbindir}
\
--libdir=%{_libdir}
\
...
...
@@ -684,6 +694,13 @@ fi
# itself - note that they must be ordered by date (important when
# merging BK trees)
%changelog
*
Wed Oct 19 2005 Kent Boortz <kent@mysql.com>
- Made yaSSL support an option
(
off by default
)
*
Wed Oct 19 2005 Kent Boortz <kent@mysql.com>
- Enabled yaSSL support
*
Sat Oct 15 2005 Kent Boortz <kent@mysql.com>
...
...
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