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
bdc33e23
Commit
bdc33e23
authored
Sep 12, 2005
by
monty@mishka.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mishka.mysql.com:/home/my/mysql-4.1
parents
40cc9e5c
0965bfa8
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
39 additions
and
15 deletions
+39
-15
client/mysqltest.c
client/mysqltest.c
+2
-1
mysql-test/r/innodb.result
mysql-test/r/innodb.result
+11
-0
mysql-test/t/innodb.test
mysql-test/t/innodb.test
+10
-0
sql/filesort.cc
sql/filesort.cc
+1
-1
sql/item_cmpfunc.cc
sql/item_cmpfunc.cc
+9
-7
sql/sql_select.cc
sql/sql_select.cc
+6
-6
No files found.
client/mysqltest.c
View file @
bdc33e23
...
...
@@ -2170,7 +2170,8 @@ int read_line(char *buf, int size)
if
(
feof
(
cur_file
->
file
))
{
found_eof:
if
(
cur_file
->
file
!=
stdin
){
if
(
cur_file
->
file
!=
stdin
)
{
my_fclose
(
cur_file
->
file
,
MYF
(
0
));
cur_file
->
file
=
0
;
}
...
...
mysql-test/r/innodb.result
View file @
bdc33e23
...
...
@@ -1674,3 +1674,14 @@ select * from t1;
a
42
drop table t1;
create table t1 (a int not null, b int not null, c blob not null, d int not null, e int, primary key (a,b,c(255),d)) engine=innodb;
insert into t1 values (2,2,"b",2,2),(1,1,"a",1,1),(3,3,"ab",3,3);
select * from t1 order by a,b,c,d;
a b c d e
1 1 a 1 1
2 2 b 2 2
3 3 ab 3 3
explain select * from t1 order by a,b,c,d;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using filesort
drop table t1;
mysql-test/t/innodb.test
View file @
bdc33e23
...
...
@@ -1220,4 +1220,14 @@ insert into t1 values (42);
select
*
from
t1
;
drop
table
t1
;
#
# Bug #13025 Server crash during filesort
#
create
table
t1
(
a
int
not
null
,
b
int
not
null
,
c
blob
not
null
,
d
int
not
null
,
e
int
,
primary
key
(
a
,
b
,
c
(
255
),
d
))
engine
=
innodb
;
insert
into
t1
values
(
2
,
2
,
"b"
,
2
,
2
),(
1
,
1
,
"a"
,
1
,
1
),(
3
,
3
,
"ab"
,
3
,
3
);
select
*
from
t1
order
by
a
,
b
,
c
,
d
;
explain
select
*
from
t1
order
by
a
,
b
,
c
,
d
;
drop
table
t1
;
# End of 4.1 tests
sql/filesort.cc
View file @
bdc33e23
...
...
@@ -443,7 +443,7 @@ static ha_rows find_all_keys(SORTPARAM *param, SQL_SELECT *select,
ha_store_ptr
(
ref_pos
,
ref_length
,
record
);
// Position to row
record
+=
sort_form
->
db_record_offset
;
}
else
else
if
(
!
error
)
file
->
position
(
sort_form
->
record
[
0
]);
}
if
(
error
&&
error
!=
HA_ERR_RECORD_DELETED
)
...
...
sql/item_cmpfunc.cc
View file @
bdc33e23
...
...
@@ -51,7 +51,8 @@ static void agg_cmp_type(Item_result *type, Item **items, uint nitems)
type
[
0
]
=
item_cmp_type
(
type
[
0
],
items
[
i
]
->
result_type
());
}
static
void
my_coll_agg_error
(
DTCollation
&
c1
,
DTCollation
&
c2
,
const
char
*
fname
)
static
void
my_coll_agg_error
(
DTCollation
&
c1
,
DTCollation
&
c2
,
const
char
*
fname
)
{
my_error
(
ER_CANT_AGGREGATE_2COLLATIONS
,
MYF
(
0
),
c1
.
collation
->
name
,
c1
.
derivation_name
(),
...
...
@@ -850,8 +851,8 @@ longlong Item_func_interval::val_int()
1 got error
*/
bool
Item_func_between
::
fix_fields
(
THD
*
thd
,
struct
st_table_list
*
tables
,
Item
**
ref
)
bool
Item_func_between
::
fix_fields
(
THD
*
thd
,
struct
st_table_list
*
tables
,
Item
**
ref
)
{
if
(
Item_func_opt_neg
::
fix_fields
(
thd
,
tables
,
ref
))
return
1
;
...
...
@@ -861,8 +862,9 @@ Item_func_between::fix_fields(THD *thd, struct st_table_list *tables, Item **ref
return
0
;
/* not_null_tables_cache == union(T1(e), intersection(T1(e1),T1(e2))) */
not_null_tables_cache
=
args
[
0
]
->
not_null_tables
()
|
(
args
[
1
]
->
not_null_tables
()
&
args
[
2
]
->
not_null_tables
());
not_null_tables_cache
=
(
args
[
0
]
->
not_null_tables
()
|
(
args
[
1
]
->
not_null_tables
()
&
args
[
2
]
->
not_null_tables
()));
return
0
;
}
...
...
@@ -1106,8 +1108,8 @@ Item_func_if::fix_fields(THD *thd, struct st_table_list *tlist, Item **ref)
if
(
Item_func
::
fix_fields
(
thd
,
tlist
,
ref
))
return
1
;
not_null_tables_cache
=
(
args
[
1
]
->
not_null_tables
()
&
args
[
2
]
->
not_null_tables
());
not_null_tables_cache
=
(
args
[
1
]
->
not_null_tables
()
&
args
[
2
]
->
not_null_tables
());
return
0
;
}
...
...
sql/sql_select.cc
View file @
bdc33e23
...
...
@@ -9307,12 +9307,12 @@ static bool change_group_ref(THD *thd, Item_func *expr, ORDER *group_list,
if
(
expr
->
arg_count
)
{
Item
**
arg
,
**
arg_end
;
bool
arg_changed
=
FALSE
;
for
(
arg
=
expr
->
arguments
(),
arg_end
=
expr
->
arguments
()
+
expr
->
arg_count
;
arg
!=
arg_end
;
arg
++
)
{
Item
*
item
=
*
arg
;
bool
arg_changed
=
FALSE
;
if
(
item
->
type
()
==
Item
::
FIELD_ITEM
||
item
->
type
()
==
Item
::
REF_ITEM
)
{
ORDER
*
group_tmp
;
...
...
@@ -9333,11 +9333,11 @@ static bool change_group_ref(THD *thd, Item_func *expr, ORDER *group_list,
if
(
change_group_ref
(
thd
,
(
Item_func
*
)
item
,
group_list
,
&
arg_changed
))
return
1
;
}
if
(
arg_changed
)
{
expr
->
maybe_null
=
1
;
*
changed
=
TRUE
;
}
}
if
(
arg_changed
)
{
expr
->
maybe_null
=
1
;
*
changed
=
TRUE
;
}
}
return
0
;
...
...
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