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
28000ac4
Commit
28000ac4
authored
Jan 16, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge serg@bk-internal.mysql.com:/home/bk/mysql-4.1/
into serg.mylan:/usr/home/serg/Abk/mysql-4.1
parents
a6bc03a2
da2ba0d2
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
53 additions
and
16 deletions
+53
-16
include/my_sys.h
include/my_sys.h
+1
-0
mysql-test/r/func_gconcat.result
mysql-test/r/func_gconcat.result
+5
-0
mysql-test/t/func_gconcat.test
mysql-test/t/func_gconcat.test
+7
-0
mysys/mf_iocache.c
mysys/mf_iocache.c
+35
-14
sql/filesort.cc
sql/filesort.cc
+2
-0
sql/item_sum.h
sql/item_sum.h
+3
-2
No files found.
include/my_sys.h
View file @
28000ac4
...
@@ -658,6 +658,7 @@ extern int init_io_cache(IO_CACHE *info,File file,uint cachesize,
...
@@ -658,6 +658,7 @@ extern int init_io_cache(IO_CACHE *info,File file,uint cachesize,
extern
my_bool
reinit_io_cache
(
IO_CACHE
*
info
,
enum
cache_type
type
,
extern
my_bool
reinit_io_cache
(
IO_CACHE
*
info
,
enum
cache_type
type
,
my_off_t
seek_offset
,
pbool
use_async_io
,
my_off_t
seek_offset
,
pbool
use_async_io
,
pbool
clear_cache
);
pbool
clear_cache
);
extern
void
setup_io_cache
(
IO_CACHE
*
info
);
extern
int
_my_b_read
(
IO_CACHE
*
info
,
byte
*
Buffer
,
uint
Count
);
extern
int
_my_b_read
(
IO_CACHE
*
info
,
byte
*
Buffer
,
uint
Count
);
#ifdef THREAD
#ifdef THREAD
extern
int
_my_b_read_r
(
IO_CACHE
*
info
,
byte
*
Buffer
,
uint
Count
);
extern
int
_my_b_read_r
(
IO_CACHE
*
info
,
byte
*
Buffer
,
uint
Count
);
...
...
mysql-test/r/func_gconcat.result
View file @
28000ac4
...
@@ -457,3 +457,8 @@ group_concat(distinct b order by b)
...
@@ -457,3 +457,8 @@ group_concat(distinct b order by b)
Warnings:
Warnings:
Warning 1260 2 line(s) were cut by GROUP_CONCAT()
Warning 1260 2 line(s) were cut by GROUP_CONCAT()
drop table t1;
drop table t1;
CREATE TABLE t1 (id int);
SELECT GROUP_CONCAT(id) AS gc FROM t1 HAVING gc IS NULL;
gc
NULL
DROP TABLE t1;
mysql-test/t/func_gconcat.test
View file @
28000ac4
...
@@ -277,3 +277,10 @@ select group_concat(b order by b) from t1 group by a;
...
@@ -277,3 +277,10 @@ select group_concat(b order by b) from t1 group by a;
select
group_concat
(
distinct
b
order
by
b
)
from
t1
group
by
a
;
select
group_concat
(
distinct
b
order
by
b
)
from
t1
group
by
a
;
drop
table
t1
;
drop
table
t1
;
#
# bug #7769: group_concat returning null is checked in having
#
CREATE
TABLE
t1
(
id
int
);
SELECT
GROUP_CONCAT
(
id
)
AS
gc
FROM
t1
HAVING
gc
IS
NULL
;
DROP
TABLE
t1
;
mysys/mf_iocache.c
View file @
28000ac4
...
@@ -70,9 +70,40 @@ static void my_aiowait(my_aio_result *result);
...
@@ -70,9 +70,40 @@ static void my_aiowait(my_aio_result *result);
#define IO_ROUND_UP(X) (((X)+IO_SIZE-1) & ~(IO_SIZE-1))
#define IO_ROUND_UP(X) (((X)+IO_SIZE-1) & ~(IO_SIZE-1))
#define IO_ROUND_DN(X) ( (X) & ~(IO_SIZE-1))
#define IO_ROUND_DN(X) ( (X) & ~(IO_SIZE-1))
/*
Setup internal pointers inside IO_CACHE
SYNOPSIS
setup_io_cache()
info IO_CACHE handler
NOTES
This is called on automaticly on init or reinit of IO_CACHE
It must be called externally if one moves or copies an IO_CACHE
object.
*/
void
setup_io_cache
(
IO_CACHE
*
info
)
{
/* Ensure that my_b_tell() and my_b_bytes_in_cache works */
if
(
info
->
type
==
WRITE_CACHE
)
{
info
->
current_pos
=
&
info
->
write_pos
;
info
->
current_end
=
&
info
->
write_end
;
}
else
{
info
->
current_pos
=
&
info
->
read_pos
;
info
->
current_end
=
&
info
->
read_end
;
}
}
static
void
static
void
init_functions
(
IO_CACHE
*
info
,
enum
cache_type
type
)
init_functions
(
IO_CACHE
*
info
)
{
{
enum
cache_type
type
=
info
->
type
;
switch
(
type
)
{
switch
(
type
)
{
case
READ_NET
:
case
READ_NET
:
/*
/*
...
@@ -96,17 +127,7 @@ init_functions(IO_CACHE* info, enum cache_type type)
...
@@ -96,17 +127,7 @@ init_functions(IO_CACHE* info, enum cache_type type)
info
->
write_function
=
_my_b_write
;
info
->
write_function
=
_my_b_write
;
}
}
/* Ensure that my_b_tell() and my_b_bytes_in_cache works */
setup_io_cache
(
info
);
if
(
type
==
WRITE_CACHE
)
{
info
->
current_pos
=
&
info
->
write_pos
;
info
->
current_end
=
&
info
->
write_end
;
}
else
{
info
->
current_pos
=
&
info
->
read_pos
;
info
->
current_end
=
&
info
->
read_end
;
}
}
}
...
@@ -236,7 +257,7 @@ int init_io_cache(IO_CACHE *info, File file, uint cachesize,
...
@@ -236,7 +257,7 @@ int init_io_cache(IO_CACHE *info, File file, uint cachesize,
info
->
end_of_file
=
end_of_file
;
info
->
end_of_file
=
end_of_file
;
info
->
error
=
0
;
info
->
error
=
0
;
info
->
type
=
type
;
info
->
type
=
type
;
init_functions
(
info
,
type
);
init_functions
(
info
);
#ifdef HAVE_AIOWAIT
#ifdef HAVE_AIOWAIT
if
(
use_async_io
&&
!
my_disable_async_io
)
if
(
use_async_io
&&
!
my_disable_async_io
)
{
{
...
@@ -358,7 +379,7 @@ my_bool reinit_io_cache(IO_CACHE *info, enum cache_type type,
...
@@ -358,7 +379,7 @@ my_bool reinit_io_cache(IO_CACHE *info, enum cache_type type,
}
}
info
->
type
=
type
;
info
->
type
=
type
;
info
->
error
=
0
;
info
->
error
=
0
;
init_functions
(
info
,
type
);
init_functions
(
info
);
#ifdef HAVE_AIOWAIT
#ifdef HAVE_AIOWAIT
if
(
use_async_io
&&
!
my_disable_async_io
&&
if
(
use_async_io
&&
!
my_disable_async_io
&&
...
...
sql/filesort.cc
View file @
28000ac4
...
@@ -803,6 +803,8 @@ int merge_many_buff(SORTPARAM *param, uchar *sort_buffer,
...
@@ -803,6 +803,8 @@ int merge_many_buff(SORTPARAM *param, uchar *sort_buffer,
if
(
flush_io_cache
(
to_file
))
if
(
flush_io_cache
(
to_file
))
break
;
/* purecov: inspected */
break
;
/* purecov: inspected */
temp
=
from_file
;
from_file
=
to_file
;
to_file
=
temp
;
temp
=
from_file
;
from_file
=
to_file
;
to_file
=
temp
;
setup_io_cache
(
from_file
);
setup_io_cache
(
to_file
);
*
maxbuffer
=
(
uint
)
(
lastbuff
-
buffpek
)
-
1
;
*
maxbuffer
=
(
uint
)
(
lastbuff
-
buffpek
)
-
1
;
}
}
close_cached_file
(
to_file
);
// This holds old result
close_cached_file
(
to_file
);
// This holds old result
...
...
sql/item_sum.h
View file @
28000ac4
...
@@ -739,9 +739,10 @@ class Item_func_group_concat : public Item_sum
...
@@ -739,9 +739,10 @@ class Item_func_group_concat : public Item_sum
String
*
res
;
String
*
res
;
char
*
end_ptr
;
char
*
end_ptr
;
int
error
;
int
error
;
res
=
val_str
(
&
str_value
);
if
(
!
(
res
=
val_str
(
&
str_value
)))
return
(
longlong
)
0
;
end_ptr
=
(
char
*
)
res
->
ptr
()
+
res
->
length
();
end_ptr
=
(
char
*
)
res
->
ptr
()
+
res
->
length
();
return
res
?
my_strtoll10
(
res
->
ptr
(),
&
end_ptr
,
&
error
)
:
(
longlong
)
0
;
return
my_strtoll10
(
res
->
ptr
(),
&
end_ptr
,
&
error
)
;
}
}
String
*
val_str
(
String
*
str
);
String
*
val_str
(
String
*
str
);
Item
*
copy_or_same
(
THD
*
thd
);
Item
*
copy_or_same
(
THD
*
thd
);
...
...
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