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
9a779d64
Commit
9a779d64
authored
Feb 01, 2005
by
igor@rurik.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge rurik.mysql.com:/home/igor/mysql-4.1
into rurik.mysql.com:/home/igor/dev/mysql-4.1-0
parents
ea5c1f32
0fb0dab4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
0 deletions
+51
-0
mysql-test/r/func_str.result
mysql-test/r/func_str.result
+23
-0
mysql-test/t/func_str.test
mysql-test/t/func_str.test
+27
-0
sql/item_strfunc.cc
sql/item_strfunc.cc
+1
-0
No files found.
mysql-test/r/func_str.result
View file @
9a779d64
...
...
@@ -703,3 +703,26 @@ NULL
select trim('xyz' from null) as "must_be_null";
must_be_null
NULL
CREATE TABLE t1 (
id int(11) NOT NULL auto_increment,
a bigint(20) unsigned default NULL,
PRIMARY KEY (id)
) ENGINE=MyISAM;
INSERT INTO t1 VALUES
('0','16307858876001849059');
SELECT CONV('e251273eb74a8ee3', 16, 10);
CONV('e251273eb74a8ee3', 16, 10)
16307858876001849059
EXPLAIN
SELECT id
FROM t1
WHERE a = 16307858876001849059;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 system NULL NULL NULL NULL 1
EXPLAIN
SELECT id
FROM t1
WHERE a = CONV('e251273eb74a8ee3', 16, 10);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 system NULL NULL NULL NULL 1
DROP TABLE t1;
mysql-test/t/func_str.test
View file @
9a779d64
...
...
@@ -443,3 +443,30 @@ select quote(trim(concat(' ', 'a')));
#
select
trim
(
null
from
'kate'
)
as
"must_be_null"
;
select
trim
(
'xyz'
from
null
)
as
"must_be_null"
;
#
# Bug #7751 - conversion for a bigint unsigned constant
#
CREATE
TABLE
t1
(
id
int
(
11
)
NOT
NULL
auto_increment
,
a
bigint
(
20
)
unsigned
default
NULL
,
PRIMARY
KEY
(
id
)
)
ENGINE
=
MyISAM
;
INSERT
INTO
t1
VALUES
(
'0'
,
'16307858876001849059'
);
SELECT
CONV
(
'e251273eb74a8ee3'
,
16
,
10
);
EXPLAIN
SELECT
id
FROM
t1
WHERE
a
=
16307858876001849059
;
EXPLAIN
SELECT
id
FROM
t1
WHERE
a
=
CONV
(
'e251273eb74a8ee3'
,
16
,
10
);
DROP
TABLE
t1
;
sql/item_strfunc.cc
View file @
9a779d64
...
...
@@ -2171,6 +2171,7 @@ String *Item_func_conv::val_str(String *str)
return
0
;
}
null_value
=
0
;
unsigned_flag
=
!
(
from_base
<
0
);
if
(
from_base
<
0
)
dec
=
my_strntoll
(
res
->
charset
(),
res
->
ptr
(),
res
->
length
(),
-
from_base
,
&
endptr
,
&
err
);
else
...
...
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