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
9e2a6528
Commit
9e2a6528
authored
Nov 05, 2007
by
holyfoot/hf@hfmain.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk@192.168.21.1:mysql-5.0-opt
into mysql.com:/home/hf/work/31758/my50-31758
parents
02b913ad
18ab121a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
5 deletions
+31
-5
mysql-test/r/func_str.result
mysql-test/r/func_str.result
+15
-3
mysql-test/t/func_str.test
mysql-test/t/func_str.test
+13
-0
sql/item_strfunc.h
sql/item_strfunc.h
+3
-2
No files found.
mysql-test/r/func_str.result
View file @
9e2a6528
...
...
@@ -722,9 +722,9 @@ Warning 1265 Data truncated for column 'format(130,10)' at row 1
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`bin(130)` varchar(64)
NOT NULL default ''
,
`oct(130)` varchar(64)
NOT NULL default ''
,
`conv(130,16,10)` varchar(64)
NOT NULL default ''
,
`bin(130)` varchar(64)
default NULL
,
`oct(130)` varchar(64)
default NULL
,
`conv(130,16,10)` varchar(64)
default NULL
,
`hex(130)` varchar(6) NOT NULL default '',
`char(130)` varbinary(4) NOT NULL default '',
`format(130,10)` varchar(4) NOT NULL default '',
...
...
@@ -1095,6 +1095,18 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 system NULL NULL NULL NULL 0 const row not found
Warnings:
Note 1003 select decode('','zxcv') AS `enc` from `test`.`t1`
drop table t1;
create table t1 (a bigint not null)engine=myisam;
insert into t1 set a = 1024*1024*1024*4;
delete from t1 order by (inet_ntoa(a)) desc limit 10;
drop table t1;
create table t1 (a char(36) not null)engine=myisam;
insert ignore into t1 set a = ' ';
insert ignore into t1 set a = ' ';
select * from t1 order by (oct(a));
a
drop table t1;
End of 4.1 tests
create table t1 (d decimal default null);
...
...
mysql-test/t/func_str.test
View file @
9e2a6528
...
...
@@ -738,6 +738,19 @@ explain extended select encode(f1,'zxcv') as 'enc' from t1;
explain
extended
select
decode
(
f1
,
'zxcv'
)
as
'enc'
from
t1
;
drop
table
t1
;
#
# Bug #31758 inet_ntoa, oct, crashes server with null + filesort
#
create
table
t1
(
a
bigint
not
null
)
engine
=
myisam
;
insert
into
t1
set
a
=
1024
*
1024
*
1024
*
4
;
delete
from
t1
order
by
(
inet_ntoa
(
a
))
desc
limit
10
;
drop
table
t1
;
create
table
t1
(
a
char
(
36
)
not
null
)
engine
=
myisam
;
insert
ignore
into
t1
set
a
=
' '
;
insert
ignore
into
t1
set
a
=
' '
;
select
*
from
t1
order
by
(
oct
(
a
));
drop
table
t1
;
--
echo
End
of
4.1
tests
#
...
...
sql/item_strfunc.h
View file @
9e2a6528
...
...
@@ -584,7 +584,8 @@ public:
void
fix_length_and_dec
()
{
collation
.
set
(
default_charset
());
max_length
=
64
;
max_length
=
64
;
maybe_null
=
1
;
}
};
...
...
@@ -682,7 +683,7 @@ public:
}
String
*
val_str
(
String
*
str
);
const
char
*
func_name
()
const
{
return
"inet_ntoa"
;
}
void
fix_length_and_dec
()
{
decimals
=
0
;
max_length
=
3
*
8
+
7
;
}
void
fix_length_and_dec
()
{
decimals
=
0
;
max_length
=
3
*
8
+
7
;
maybe_null
=
1
;
}
};
class
Item_func_quote
:
public
Item_str_func
...
...
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