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
60cdfe07
Commit
60cdfe07
authored
Nov 03, 2000
by
sasha@mysql.sashanet.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed bugs in elt() and make_set()
added two new test cases
parent
96815f82
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
60 additions
and
4 deletions
+60
-4
.bzrignore
.bzrignore
+8
-0
mysql-test/r/3.23/sel000004.result
mysql-test/r/3.23/sel000004.result
+4
-2
mysql-test/r/3.23/sel000005.result
mysql-test/r/3.23/sel000005.result
+4
-2
mysql-test/t/3.23/sel000004.test
mysql-test/t/3.23/sel000004.test
+21
-0
mysql-test/t/3.23/sel000005.test
mysql-test/t/3.23/sel000005.test
+21
-0
sql/item_strfunc.cc
sql/item_strfunc.cc
+2
-0
No files found.
.bzrignore
View file @
60cdfe07
...
...
@@ -164,3 +164,11 @@ PENDING/2000-10-25.01
PENDING/2000-10-25.02
support-files/mysql-3.23.27-beta.spec
.gdb_history
mysql-test/r/3.23/sel000004.result.reject
mysql-test/var/lib/mysql-bin.006
mysql-test/var/lib/test/elt_ck1.frm
mysql-test/var/lib/test/elt_ck1.MYD
mysql-test/var/lib/test/elt_ck1.MYI
mysql-test/var/lib/test/elt_ck2.frm
mysql-test/var/lib/test/elt_ck2.MYD
mysql-test/var/lib/test/elt_ck2.MYI
mysql-test/r/3.23/sel000004.result
View file @
60cdfe07
1+1 1-1 1+1*2 8/5 8%5 MOD(8,5) MOD(8,5)|0 -(1+1)*-2 SIGN(-5)
2 0 3 1.60 3 3 3 4 -1
id elt(two.val,'one','two')
1 one
2 one
4 two
mysql-test/r/3.23/sel000005.result
View file @
60cdfe07
FLOOR(5.5) FLOOR(-5.5) CEILING(5.5) CEILING(-5.5) ROUND(5.5) ROUND(-5.5)
5 -6 6 -5 6 -6
id elt(two.val,'one','two')
1 one
2 one
4 two
mysql-test/t/3.23/sel000004.test
0 → 100644
View file @
60cdfe07
# sel000004
#
# Versions
# --------
# 3.22
# 3.23
#
# Description
# -----------
# test for a bug with elt() and order by
drop
table
if
exists
elt_ck1
,
elt_ck2
;
create
table
elt_ck1
(
id
int
(
10
)
not
null
unique
);
create
table
elt_ck2
(
id
int
(
10
)
not
null
primary
key
,
val
int
(
10
)
not
null
);
insert
into
elt_ck1
values
(
1
),(
2
),(
4
);
insert
into
elt_ck2
values
(
1
,
1
),(
2
,
1
),(
3
,
1
),(
4
,
2
);
@
r
/
3.23
/
sel000004
.
result
select
one
.
id
,
elt
(
two
.
val
,
'one'
,
'two'
)
from
elt_ck1
one
,
elt_ck2
two
where
two
.
id
=
one
.
id
order
by
one
.
id
;
mysql-test/t/3.23/sel000005.test
0 → 100644
View file @
60cdfe07
# sel000004
#
# Versions
# --------
# 3.22
# 3.23
#
# Description
# -----------
# test for a bug with elt()
drop
table
if
exists
elt_ck1
,
elt_ck2
;
create
table
elt_ck1
(
id
int
(
10
)
not
null
unique
);
create
table
elt_ck2
(
id
int
(
10
)
not
null
primary
key
,
val
int
(
10
)
not
null
);
insert
into
elt_ck1
values
(
1
),(
2
),(
4
);
insert
into
elt_ck2
values
(
1
,
1
),(
2
,
1
),(
3
,
1
),(
4
,
2
);
@
r
/
3.23
/
sel000005
.
result
select
one
.
id
,
elt
(
two
.
val
,
'one'
,
'two'
)
from
elt_ck1
one
,
elt_ck2
two
where
two
.
id
=
one
.
id
;
sql/item_strfunc.cc
View file @
60cdfe07
...
...
@@ -1190,6 +1190,7 @@ void Item_func_elt::fix_length_and_dec()
}
maybe_null
=
1
;
// NULL if wrong first arg
used_tables_cache
|=
item
->
used_tables
();
const_item_cache
&=
item
->
const_item
();
}
...
...
@@ -1245,6 +1246,7 @@ void Item_func_make_set::fix_length_and_dec()
for
(
uint
i
=
1
;
i
<
arg_count
;
i
++
)
max_length
+=
args
[
i
]
->
max_length
;
used_tables_cache
|=
item
->
used_tables
();
const_item_cache
&=
item
->
const_item
();
}
...
...
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