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
387dd035
Commit
387dd035
authored
Feb 02, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/data0/mysqldev/my/mysql-4.1
into mysql.com:/data0/mysqldev/my/mysql-4.1-build
parents
b924ec2d
28e313fb
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
45 additions
and
30 deletions
+45
-30
client/mysqladmin.cc
client/mysqladmin.cc
+1
-0
mysql-test/r/func_str.result
mysql-test/r/func_str.result
+13
-6
mysql-test/t/func_str.test
mysql-test/t/func_str.test
+12
-6
scripts/make_binary_distribution.sh
scripts/make_binary_distribution.sh
+8
-4
sql/item_strfunc.cc
sql/item_strfunc.cc
+6
-11
sql/item_strfunc.h
sql/item_strfunc.h
+1
-0
sql/sql_parse.cc
sql/sql_parse.cc
+2
-1
vio/viosocket.c
vio/viosocket.c
+1
-1
vio/viossl.c
vio/viossl.c
+1
-1
No files found.
client/mysqladmin.cc
View file @
387dd035
...
@@ -1008,6 +1008,7 @@ static void usage(void)
...
@@ -1008,6 +1008,7 @@ static void usage(void)
print_defaults
(
"my"
,
load_default_groups
);
print_defaults
(
"my"
,
load_default_groups
);
puts
(
"
\n
Where command is a one or more of: (Commands may be shortened)
\n
\
puts
(
"
\n
Where command is a one or more of: (Commands may be shortened)
\n
\
create databasename Create a new database
\n
\
create databasename Create a new database
\n
\
debug Instruct server to write debug information to log
\n
\
drop databasename Delete a database and all its tables
\n
\
drop databasename Delete a database and all its tables
\n
\
extended-status Gives an extended status message from the server
\n
\
extended-status Gives an extended status message from the server
\n
\
flush-hosts Flush all cached hosts
\n
\
flush-hosts Flush all cached hosts
\n
\
...
...
mysql-test/r/func_str.result
View file @
387dd035
...
@@ -325,6 +325,19 @@ trim(trailing 'foo' from 'foo')
...
@@ -325,6 +325,19 @@ trim(trailing 'foo' from 'foo')
select trim(leading 'foo' from 'foo');
select trim(leading 'foo' from 'foo');
trim(leading 'foo' from 'foo')
trim(leading 'foo' from 'foo')
select quote(ltrim(concat(' ', 'a')));
quote(ltrim(concat(' ', 'a')))
'a'
select quote(trim(concat(' ', 'a')));
quote(trim(concat(' ', 'a')))
'a'
CREATE TABLE t1 SELECT 1 UNION SELECT 2 UNION SELECT 3;
SELECT QUOTE('A') FROM t1;
QUOTE('A')
'A'
'A'
'A'
DROP TABLE t1;
select 1=_latin1'1';
select 1=_latin1'1';
1=_latin1'1'
1=_latin1'1'
1
1
...
@@ -691,12 +704,6 @@ select count(*) as total, left(c,10) as reg from t1 group by reg order by reg de
...
@@ -691,12 +704,6 @@ select count(*) as total, left(c,10) as reg from t1 group by reg order by reg de
total reg
total reg
10 2004-12-10
10 2004-12-10
drop table t1;
drop table t1;
select quote(ltrim(concat(' ', 'a')));
quote(ltrim(concat(' ', 'a')))
'a'
select quote(trim(concat(' ', 'a')));
quote(trim(concat(' ', 'a')))
'a'
select trim(null from 'kate') as "must_be_null";
select trim(null from 'kate') as "must_be_null";
must_be_null
must_be_null
NULL
NULL
...
...
mysql-test/t/func_str.test
View file @
387dd035
...
@@ -195,6 +195,18 @@ select trim(trailing 'foo' from 'foo');
...
@@ -195,6 +195,18 @@ select trim(trailing 'foo' from 'foo');
select
trim
(
leading
'foo'
from
'foo'
);
select
trim
(
leading
'foo'
from
'foo'
);
#
#
# crashing bug with QUOTE() and LTRIM() or TRIM() fixed
# Bug #7495
#
select
quote
(
ltrim
(
concat
(
' '
,
'a'
)));
select
quote
(
trim
(
concat
(
' '
,
'a'
)));
# Bad results from QUOTE(). Bug #8248
CREATE
TABLE
t1
SELECT
1
UNION
SELECT
2
UNION
SELECT
3
;
SELECT
QUOTE
(
'A'
)
FROM
t1
;
DROP
TABLE
t1
;
# Test collation and coercibility
# Test collation and coercibility
#
#
...
@@ -429,12 +441,6 @@ create table t1 (a int not null primary key, b varchar(40), c datetime);
...
@@ -429,12 +441,6 @@ create table t1 (a int not null primary key, b varchar(40), c datetime);
insert
into
t1
(
a
,
b
,
c
)
values
(
1
,
'Tom'
,
'2004-12-10 12:13:14'
),(
2
,
'ball games'
,
'2004-12-10 12:13:14'
),
(
3
,
'Basil'
,
'2004-12-10 12:13:14'
),
(
4
,
'Dean'
,
'2004-12-10 12:13:14'
),(
5
,
'Ellis'
,
'2004-12-10 12:13:14'
),
(
6
,
'Serg'
,
'2004-12-10 12:13:14'
),
(
7
,
'Sergei'
,
'2004-12-10 12:13:14'
),(
8
,
'Georg'
,
'2004-12-10 12:13:14'
),(
9
,
'Salle'
,
'2004-12-10 12:13:14'
),(
10
,
'Sinisa'
,
'2004-12-10 12:13:14'
);
insert
into
t1
(
a
,
b
,
c
)
values
(
1
,
'Tom'
,
'2004-12-10 12:13:14'
),(
2
,
'ball games'
,
'2004-12-10 12:13:14'
),
(
3
,
'Basil'
,
'2004-12-10 12:13:14'
),
(
4
,
'Dean'
,
'2004-12-10 12:13:14'
),(
5
,
'Ellis'
,
'2004-12-10 12:13:14'
),
(
6
,
'Serg'
,
'2004-12-10 12:13:14'
),
(
7
,
'Sergei'
,
'2004-12-10 12:13:14'
),(
8
,
'Georg'
,
'2004-12-10 12:13:14'
),(
9
,
'Salle'
,
'2004-12-10 12:13:14'
),(
10
,
'Sinisa'
,
'2004-12-10 12:13:14'
);
select
count
(
*
)
as
total
,
left
(
c
,
10
)
as
reg
from
t1
group
by
reg
order
by
reg
desc
limit
0
,
12
;
select
count
(
*
)
as
total
,
left
(
c
,
10
)
as
reg
from
t1
group
by
reg
order
by
reg
desc
limit
0
,
12
;
drop
table
t1
;
drop
table
t1
;
# crashing bug with QUOTE() and LTRIM() or TRIM() fixed
# Bug #7495
#
select
quote
(
ltrim
(
concat
(
' '
,
'a'
)));
select
quote
(
trim
(
concat
(
' '
,
'a'
)));
#
#
# Bug#7455 unexpected result: TRIM(<NULL> FROM <whatever>) gives NOT NULL
# Bug#7455 unexpected result: TRIM(<NULL> FROM <whatever>) gives NOT NULL
...
...
scripts/make_binary_distribution.sh
View file @
387dd035
...
@@ -107,8 +107,11 @@ BIN_FILES="extra/comp_err$BS extra/replace$BS extra/perror$BS \
...
@@ -107,8 +107,11 @@ BIN_FILES="extra/comp_err$BS extra/replace$BS extra/perror$BS \
client/mysql
$BS
client/mysqlshow
$BS
client/mysqladmin
$BS
\
client/mysql
$BS
client/mysqlshow
$BS
client/mysqladmin
$BS
\
client/mysqldump
$BS
client/mysqlimport
$BS
\
client/mysqldump
$BS
client/mysqlimport
$BS
\
client/mysqltest
$BS
client/mysqlcheck
$BS
\
client/mysqltest
$BS
client/mysqlcheck
$BS
\
client/mysqlbinlog
$BS
client/mysqlbinlog
$BS
\
"
;
tests/mysql_client_test
$BS
\
libmysqld/examples/mysql_client_test_embedded
$BS
\
libmysqld/examples/mysqltest_embedded
$BS
\
"
;
# Platform-specific bin dir files:
# Platform-specific bin dir files:
if
[
$BASE_SYSTEM
=
"netware"
]
;
then
if
[
$BASE_SYSTEM
=
"netware"
]
;
then
...
@@ -127,8 +130,9 @@ else
...
@@ -127,8 +130,9 @@ else
client/.libs/mysqltest client/.libs/mysqlcheck
\
client/.libs/mysqltest client/.libs/mysqlcheck
\
client/.libs/mysqlbinlog client/.libs/mysqlmanagerc
\
client/.libs/mysqlbinlog client/.libs/mysqlmanagerc
\
client/.libs/mysqlmanager-pwgen tools/.libs/mysqlmanager
\
client/.libs/mysqlmanager-pwgen tools/.libs/mysqlmanager
\
tests/.libs/mysql_client_test libmysqld/examples/mysql_client_test_embedded
\
tests/.libs/mysql_client_test
\
libmysqld/examples/mysqltest_embedded
\
libmysqld/examples/.libs/mysql_client_test_embedded
\
libmysqld/examples/.libs/mysqltest_embedded
\
"
;
"
;
fi
fi
...
...
sql/item_strfunc.cc
View file @
387dd035
...
@@ -2614,18 +2614,13 @@ String *Item_func_quote::val_str(String *str)
...
@@ -2614,18 +2614,13 @@ String *Item_func_quote::val_str(String *str)
for
(
from
=
(
char
*
)
arg
->
ptr
(),
end
=
from
+
arg_length
;
from
<
end
;
from
++
)
for
(
from
=
(
char
*
)
arg
->
ptr
(),
end
=
from
+
arg_length
;
from
<
end
;
from
++
)
new_length
+=
get_esc_bit
(
escmask
,
(
uchar
)
*
from
);
new_length
+=
get_esc_bit
(
escmask
,
(
uchar
)
*
from
);
/*
if
(
tmp_value
.
alloc
(
new_length
))
We have to use realloc() instead of alloc() as we want to keep the
old result in arg
*/
if
(
arg
->
realloc
(
new_length
))
goto
null
;
goto
null
;
/*
/*
As 'arg' and 'str' may be the same string, we must replace characters
We replace characters from the end to the beginning
from the end to the beginning
*/
*/
to
=
(
char
*
)
arg
->
ptr
()
+
new_length
-
1
;
to
=
(
char
*
)
tmp_value
.
ptr
()
+
new_length
-
1
;
*
to
--=
'\''
;
*
to
--=
'\''
;
for
(
start
=
(
char
*
)
arg
->
ptr
(),
end
=
start
+
arg_length
;
end
--
!=
start
;
to
--
)
for
(
start
=
(
char
*
)
arg
->
ptr
(),
end
=
start
+
arg_length
;
end
--
!=
start
;
to
--
)
{
{
...
@@ -2653,10 +2648,10 @@ String *Item_func_quote::val_str(String *str)
...
@@ -2653,10 +2648,10 @@ String *Item_func_quote::val_str(String *str)
}
}
}
}
*
to
=
'\''
;
*
to
=
'\''
;
arg
->
length
(
new_length
);
tmp_value
.
length
(
new_length
);
str
->
set_charset
(
collation
.
collation
);
tmp_value
.
set_charset
(
collation
.
collation
);
null_value
=
0
;
null_value
=
0
;
return
arg
;
return
&
tmp_value
;
null:
null:
null_value
=
1
;
null_value
=
1
;
...
...
sql/item_strfunc.h
View file @
387dd035
...
@@ -588,6 +588,7 @@ class Item_func_inet_ntoa : public Item_str_func
...
@@ -588,6 +588,7 @@ class Item_func_inet_ntoa : public Item_str_func
class
Item_func_quote
:
public
Item_str_func
class
Item_func_quote
:
public
Item_str_func
{
{
String
tmp_value
;
public:
public:
Item_func_quote
(
Item
*
a
)
:
Item_str_func
(
a
)
{}
Item_func_quote
(
Item
*
a
)
:
Item_str_func
(
a
)
{}
const
char
*
func_name
()
const
{
return
"quote"
;
}
const
char
*
func_name
()
const
{
return
"quote"
;
}
...
...
sql/sql_parse.cc
View file @
387dd035
...
@@ -660,6 +660,8 @@ static int check_connection(THD *thd)
...
@@ -660,6 +660,8 @@ static int check_connection(THD *thd)
DBUG_PRINT
(
"info"
,
DBUG_PRINT
(
"info"
,
(
"New connection received on %s"
,
vio_description
(
net
->
vio
)));
(
"New connection received on %s"
,
vio_description
(
net
->
vio
)));
vio_in_addr
(
net
->
vio
,
&
thd
->
remote
.
sin_addr
);
if
(
!
thd
->
host
)
// If TCP/IP connection
if
(
!
thd
->
host
)
// If TCP/IP connection
{
{
char
ip
[
30
];
char
ip
[
30
];
...
@@ -704,7 +706,6 @@ static int check_connection(THD *thd)
...
@@ -704,7 +706,6 @@ static int check_connection(THD *thd)
DBUG_PRINT
(
"info"
,(
"Host: %s"
,
thd
->
host
));
DBUG_PRINT
(
"info"
,(
"Host: %s"
,
thd
->
host
));
thd
->
host_or_ip
=
thd
->
host
;
thd
->
host_or_ip
=
thd
->
host
;
thd
->
ip
=
0
;
thd
->
ip
=
0
;
bzero
((
char
*
)
&
thd
->
remote
,
sizeof
(
struct
sockaddr
));
}
}
vio_keepalive
(
net
->
vio
,
TRUE
);
vio_keepalive
(
net
->
vio
,
TRUE
);
ulong
pkt_len
=
0
;
ulong
pkt_len
=
0
;
...
...
vio/viosocket.c
View file @
387dd035
...
@@ -276,7 +276,7 @@ void vio_in_addr(Vio *vio, struct in_addr *in)
...
@@ -276,7 +276,7 @@ void vio_in_addr(Vio *vio, struct in_addr *in)
{
{
DBUG_ENTER
(
"vio_in_addr"
);
DBUG_ENTER
(
"vio_in_addr"
);
if
(
vio
->
localhost
)
if
(
vio
->
localhost
)
bzero
((
char
*
)
in
,
sizeof
(
*
in
));
/* This should never be executed */
bzero
((
char
*
)
in
,
sizeof
(
*
in
));
else
else
*
in
=
vio
->
remote
.
sin_addr
;
*
in
=
vio
->
remote
.
sin_addr
;
DBUG_VOID_RETURN
;
DBUG_VOID_RETURN
;
...
...
vio/viossl.c
View file @
387dd035
...
@@ -259,7 +259,7 @@ void vio_ssl_in_addr(Vio *vio, struct in_addr *in)
...
@@ -259,7 +259,7 @@ void vio_ssl_in_addr(Vio *vio, struct in_addr *in)
{
{
DBUG_ENTER
(
"vio_ssl_in_addr"
);
DBUG_ENTER
(
"vio_ssl_in_addr"
);
if
(
vio
->
localhost
)
if
(
vio
->
localhost
)
bzero
((
char
*
)
in
,
sizeof
(
*
in
));
/* This should never be executed */
bzero
((
char
*
)
in
,
sizeof
(
*
in
));
else
else
*
in
=
vio
->
remote
.
sin_addr
;
*
in
=
vio
->
remote
.
sin_addr
;
DBUG_VOID_RETURN
;
DBUG_VOID_RETURN
;
...
...
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