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
278b26a3
Commit
278b26a3
authored
Jun 21, 2006
by
evgen@moonbone.local
Browse files
Options
Browse Files
Download
Plain Diff
Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into moonbone.local:/work/tmp_merge-5.0-opt-mysql
parents
6043f298
bb53b6ee
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
52 additions
and
3 deletions
+52
-3
mysql-test/r/insert_select.result
mysql-test/r/insert_select.result
+4
-0
mysql-test/r/select.result
mysql-test/r/select.result
+6
-0
mysql-test/t/insert_select.test
mysql-test/t/insert_select.test
+13
-0
mysql-test/t/select.test
mysql-test/t/select.test
+19
-0
sql/item_cmpfunc.cc
sql/item_cmpfunc.cc
+2
-1
sql/sql_select.cc
sql/sql_select.cc
+8
-2
No files found.
mysql-test/r/insert_select.result
View file @
278b26a3
...
...
@@ -686,3 +686,7 @@ ERROR 42S22: Unknown column 'z' in 'field list'
insert into t1(x,y) select x,z from t2 on duplicate key update x=values(t2.x);
ERROR 42S22: Unknown column 't2.x' in 'field list'
drop table t1,t2;
CREATE TABLE t1 (a int PRIMARY KEY);
INSERT INTO t1 values (1), (2);
INSERT INTO t1 SELECT a + 2 FROM t1 LIMIT 1;
DROP TABLE t1;
mysql-test/r/select.result
View file @
278b26a3
...
...
@@ -3389,3 +3389,9 @@ a t1.b + 0 t1.c + 0 a t2.b + 0 c d
1 0 1 1 0 1 NULL
2 0 1 NULL NULL NULL NULL
drop table t1,t2;
CREATE TABLE t1 (i BIGINT UNSIGNED NOT NULL);
INSERT INTO t1 VALUES (10);
SELECT i='1e+01',i=1e+01, i in (1e+01), i in ('1e+01') FROM t1;
i='1e+01' i=1e+01 i in (1e+01) i in ('1e+01')
0 1 1 1
DROP TABLE t1;
mysql-test/t/insert_select.test
View file @
278b26a3
...
...
@@ -224,4 +224,17 @@ insert into t1(x,y) select x,z from t2 on duplicate key update x=values(z);
insert
into
t1
(
x
,
y
)
select
x
,
z
from
t2
on
duplicate
key
update
x
=
values
(
t2
.
x
);
drop
table
t1
,
t2
;
#
# Bug #9676: INSERT INTO x SELECT .. FROM x LIMIT 1; slows down with big
# tables
#
#Note: not an exsaustive test : just a check of the code path.
CREATE
TABLE
t1
(
a
int
PRIMARY
KEY
);
INSERT
INTO
t1
values
(
1
),
(
2
);
INSERT
INTO
t1
SELECT
a
+
2
FROM
t1
LIMIT
1
;
DROP
TABLE
t1
;
# End of 4.1 tests
mysql-test/t/select.test
View file @
278b26a3
...
...
@@ -2285,6 +2285,25 @@ EXPLAIN SELECT * FROM t1 FORCE INDEX (a);
DROP
TABLE
t1
;
#
# Bug #18759 "Incorrect string to numeric conversion"
#
# This test is here so that the behavior will not be changed to 4.1
# and not to 5.0 either. In 4.1 and 5.0 sending an integer as a string
# will be converted internally to real (double) value and it is not
# as accurate as bigint (longlong) for integers. Thus the results may
# vary. In 5.1 internally it is decimal, which is a string type and
# will be more accurate. Due to rather big changes needed to fix this
# in 4.1 or 5.0 it is not desired to do it in the stable versions.
#
# This test is here only to make sure that behavior is not changed in
# 4.1 and 5.0
#
CREATE
TABLE
t1
(
i
BIGINT
UNSIGNED
NOT
NULL
);
INSERT
INTO
t1
VALUES
(
10
);
SELECT
i
=
'1e+01'
,
i
=
1
e
+
01
,
i
in
(
1
e
+
01
),
i
in
(
'1e+01'
)
FROM
t1
;
DROP
TABLE
t1
;
# End of 4.1 tests
#
...
...
sql/item_cmpfunc.cc
View file @
278b26a3
...
...
@@ -138,7 +138,8 @@ static void agg_cmp_type(THD *thd, Item_result *type, Item **items, uint nitems)
}
continue
;
}
if
((
res
=
items
[
i
]
->
real_item
()
->
type
())
==
Item
::
FIELD_ITEM
)
if
((
res
=
items
[
i
]
->
real_item
()
->
type
())
==
Item
::
FIELD_ITEM
&&
items
[
i
]
->
result_type
()
!=
INT_RESULT
)
{
field
=
((
Item_field
*
)
items
[
i
]
->
real_item
())
->
field
;
break
;
...
...
sql/sql_select.cc
View file @
278b26a3
...
...
@@ -1068,8 +1068,9 @@ JOIN::optimize()
group_list
?
0
:
select_distinct
,
group_list
&&
simple_group
,
select_options
,
(
order
==
0
||
skip_sort_order
)
?
select_limit
:
HA_POS_ERROR
,
(
order
==
0
||
skip_sort_order
||
test
(
select_options
&
OPTION_BUFFER_RESULT
))
?
select_limit
:
HA_POS_ERROR
,
(
char
*
)
""
)))
DBUG_RETURN
(
1
);
...
...
@@ -8814,6 +8815,11 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
keyinfo
->
key_length
+=
key_part_info
->
length
;
}
}
else
{
set_if_smaller
(
table
->
max_rows
,
rows_limit
);
param
->
end_write_records
=
rows_limit
;
}
if
(
distinct
&&
field_count
!=
param
->
hidden_field_count
)
{
...
...
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