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
a5ed8bf6
Commit
a5ed8bf6
authored
Apr 07, 2006
by
serg@serg.mylan
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-5.1-new
into serg.mylan:/usr/home/serg/Abk/mysql-5.1
parents
216fb557
4a4c459f
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
105 additions
and
41 deletions
+105
-41
mysql-test/r/ctype_ucs.result
mysql-test/r/ctype_ucs.result
+8
-0
mysql-test/r/func_gconcat.result
mysql-test/r/func_gconcat.result
+5
-0
mysql-test/r/func_time.result
mysql-test/r/func_time.result
+36
-0
mysql-test/r/information_schema.result
mysql-test/r/information_schema.result
+0
-8
mysql-test/t/ctype_ucs.test
mysql-test/t/ctype_ucs.test
+8
-0
mysql-test/t/func_gconcat.test
mysql-test/t/func_gconcat.test
+8
-0
mysql-test/t/func_time.test
mysql-test/t/func_time.test
+18
-0
mysql-test/t/information_schema.test
mysql-test/t/information_schema.test
+0
-9
sql/item_sum.cc
sql/item_sum.cc
+4
-1
sql/item_timefunc.cc
sql/item_timefunc.cc
+1
-1
sql/opt_sum.cc
sql/opt_sum.cc
+7
-20
support-files/mysql.server.sh
support-files/mysql.server.sh
+10
-2
No files found.
mysql-test/r/ctype_ucs.result
View file @
a5ed8bf6
...
@@ -719,3 +719,11 @@ lily
...
@@ -719,3 +719,11 @@ lily
river
river
drop table t1;
drop table t1;
deallocate prepare stmt;
deallocate prepare stmt;
create table t1(a blob, b text charset utf8, c text charset ucs2);
select data_type, character_octet_length, character_maximum_length
from information_schema.columns where table_name='t1';
data_type character_octet_length character_maximum_length
blob 65535 65535
text 65535 65535
text 65535 32767
drop table t1;
mysql-test/r/func_gconcat.result
View file @
a5ed8bf6
...
@@ -626,3 +626,8 @@ latin1
...
@@ -626,3 +626,8 @@ latin1
latin1
latin1
drop table t1, t2, t3;
drop table t1, t2, t3;
set names default;
set names default;
create table t1 (c1 varchar(10), c2 int);
select charset(group_concat(c1 order by c2)) from t1;
charset(group_concat(c1 order by c2))
latin1
drop table t1;
mysql-test/r/func_time.result
View file @
a5ed8bf6
...
@@ -360,6 +360,42 @@ extract(SECOND FROM "1999-01-02 10:11:12")
...
@@ -360,6 +360,42 @@ extract(SECOND FROM "1999-01-02 10:11:12")
select extract(MONTH FROM "2001-02-00");
select extract(MONTH FROM "2001-02-00");
extract(MONTH FROM "2001-02-00")
extract(MONTH FROM "2001-02-00")
2
2
SELECT EXTRACT(QUARTER FROM '2004-01-15') AS quarter;
quarter
1
SELECT EXTRACT(QUARTER FROM '2004-02-15') AS quarter;
quarter
1
SELECT EXTRACT(QUARTER FROM '2004-03-15') AS quarter;
quarter
1
SELECT EXTRACT(QUARTER FROM '2004-04-15') AS quarter;
quarter
2
SELECT EXTRACT(QUARTER FROM '2004-05-15') AS quarter;
quarter
2
SELECT EXTRACT(QUARTER FROM '2004-06-15') AS quarter;
quarter
2
SELECT EXTRACT(QUARTER FROM '2004-07-15') AS quarter;
quarter
3
SELECT EXTRACT(QUARTER FROM '2004-08-15') AS quarter;
quarter
3
SELECT EXTRACT(QUARTER FROM '2004-09-15') AS quarter;
quarter
3
SELECT EXTRACT(QUARTER FROM '2004-10-15') AS quarter;
quarter
4
SELECT EXTRACT(QUARTER FROM '2004-11-15') AS quarter;
quarter
4
SELECT EXTRACT(QUARTER FROM '2004-12-15') AS quarter;
quarter
4
SELECT "1900-01-01 00:00:00" + INTERVAL 2147483648 SECOND;
SELECT "1900-01-01 00:00:00" + INTERVAL 2147483648 SECOND;
"1900-01-01 00:00:00" + INTERVAL 2147483648 SECOND
"1900-01-01 00:00:00" + INTERVAL 2147483648 SECOND
1968-01-20 03:14:08
1968-01-20 03:14:08
...
...
mysql-test/r/information_schema.result
View file @
a5ed8bf6
...
@@ -1084,14 +1084,6 @@ select 1 from (select 1 from test.t1) a;
...
@@ -1084,14 +1084,6 @@ select 1 from (select 1 from test.t1) a;
1
1
use test;
use test;
drop table t1;
drop table t1;
create table t1(a blob, b text charset utf8, c text charset ucs2);
select data_type, character_octet_length, character_maximum_length
from information_schema.columns where table_name='t1';
data_type character_octet_length character_maximum_length
blob 65535 65535
text 65535 65535
text 65535 32767
drop table t1;
create table t1 (f1 int(11));
create table t1 (f1 int(11));
create view v1 as select * from t1;
create view v1 as select * from t1;
drop table t1;
drop table t1;
...
...
mysql-test/t/ctype_ucs.test
View file @
a5ed8bf6
...
@@ -455,3 +455,11 @@ execute stmt using @param1;
...
@@ -455,3 +455,11 @@ execute stmt using @param1;
select
utext
from
t1
where
utext
like
'%%'
;
select
utext
from
t1
where
utext
like
'%%'
;
drop
table
t1
;
drop
table
t1
;
deallocate
prepare
stmt
;
deallocate
prepare
stmt
;
#
# Bug #14290: character_maximum_length for text fields
#
create
table
t1
(
a
blob
,
b
text
charset
utf8
,
c
text
charset
ucs2
);
select
data_type
,
character_octet_length
,
character_maximum_length
from
information_schema
.
columns
where
table_name
=
't1'
;
drop
table
t1
;
mysql-test/t/func_gconcat.test
View file @
a5ed8bf6
...
@@ -414,3 +414,11 @@ select charset(a) from t2;
...
@@ -414,3 +414,11 @@ select charset(a) from t2;
select
charset
(
a
)
from
t3
;
select
charset
(
a
)
from
t3
;
drop
table
t1
,
t2
,
t3
;
drop
table
t1
,
t2
,
t3
;
set
names
default
;
set
names
default
;
#
# Bug#18281 group_concat changes charset to binary
#
create
table
t1
(
c1
varchar
(
10
),
c2
int
);
select
charset
(
group_concat
(
c1
order
by
c2
))
from
t1
;
drop
table
t1
;
mysql-test/t/func_time.test
View file @
a5ed8bf6
...
@@ -139,6 +139,24 @@ select extract(MINUTE_SECOND FROM "10:11:12");
...
@@ -139,6 +139,24 @@ select extract(MINUTE_SECOND FROM "10:11:12");
select
extract
(
SECOND
FROM
"1999-01-02 10:11:12"
);
select
extract
(
SECOND
FROM
"1999-01-02 10:11:12"
);
select
extract
(
MONTH
FROM
"2001-02-00"
);
select
extract
(
MONTH
FROM
"2001-02-00"
);
#
# test EXTRACT QUARTER (Bug #18100)
#
SELECT
EXTRACT
(
QUARTER
FROM
'2004-01-15'
)
AS
quarter
;
SELECT
EXTRACT
(
QUARTER
FROM
'2004-02-15'
)
AS
quarter
;
SELECT
EXTRACT
(
QUARTER
FROM
'2004-03-15'
)
AS
quarter
;
SELECT
EXTRACT
(
QUARTER
FROM
'2004-04-15'
)
AS
quarter
;
SELECT
EXTRACT
(
QUARTER
FROM
'2004-05-15'
)
AS
quarter
;
SELECT
EXTRACT
(
QUARTER
FROM
'2004-06-15'
)
AS
quarter
;
SELECT
EXTRACT
(
QUARTER
FROM
'2004-07-15'
)
AS
quarter
;
SELECT
EXTRACT
(
QUARTER
FROM
'2004-08-15'
)
AS
quarter
;
SELECT
EXTRACT
(
QUARTER
FROM
'2004-09-15'
)
AS
quarter
;
SELECT
EXTRACT
(
QUARTER
FROM
'2004-10-15'
)
AS
quarter
;
SELECT
EXTRACT
(
QUARTER
FROM
'2004-11-15'
)
AS
quarter
;
SELECT
EXTRACT
(
QUARTER
FROM
'2004-12-15'
)
AS
quarter
;
#
#
# Test big intervals (Bug #3498)
# Test big intervals (Bug #3498)
#
#
...
...
mysql-test/t/information_schema.test
View file @
a5ed8bf6
...
@@ -742,15 +742,6 @@ select 1 from (select 1 from test.t1) a;
...
@@ -742,15 +742,6 @@ select 1 from (select 1 from test.t1) a;
use
test
;
use
test
;
drop
table
t1
;
drop
table
t1
;
#
# Bug #14290: character_maximum_length for text fields
#
create
table
t1
(
a
blob
,
b
text
charset
utf8
,
c
text
charset
ucs2
);
select
data_type
,
character_octet_length
,
character_maximum_length
from
information_schema
.
columns
where
table_name
=
't1'
;
drop
table
t1
;
#
#
# Bug#14476 `information_schema`.`TABLES`.`TABLE_TYPE` with empty value
# Bug#14476 `information_schema`.`TABLES`.`TABLE_TYPE` with empty value
#
#
...
...
sql/item_sum.cc
View file @
a5ed8bf6
...
@@ -3249,7 +3249,10 @@ Item_func_group_concat::fix_fields(THD *thd, Item **ref)
...
@@ -3249,7 +3249,10 @@ Item_func_group_concat::fix_fields(THD *thd, Item **ref)
}
}
if
(
agg_item_charsets
(
collation
,
func_name
(),
if
(
agg_item_charsets
(
collation
,
func_name
(),
args
,
arg_count
,
MY_COLL_ALLOW_CONV
))
args
,
/* skip charset aggregation for order columns */
arg_count
-
arg_count_order
,
MY_COLL_ALLOW_CONV
))
return
1
;
return
1
;
result
.
set_charset
(
collation
.
collation
);
result
.
set_charset
(
collation
.
collation
);
...
...
sql/item_timefunc.cc
View file @
a5ed8bf6
...
@@ -2168,7 +2168,7 @@ longlong Item_extract::val_int()
...
@@ -2168,7 +2168,7 @@ longlong Item_extract::val_int()
switch
(
int_type
)
{
switch
(
int_type
)
{
case
INTERVAL_YEAR
:
return
ltime
.
year
;
case
INTERVAL_YEAR
:
return
ltime
.
year
;
case
INTERVAL_YEAR_MONTH
:
return
ltime
.
year
*
100L
+
ltime
.
month
;
case
INTERVAL_YEAR_MONTH
:
return
ltime
.
year
*
100L
+
ltime
.
month
;
case
INTERVAL_QUARTER
:
return
ltime
.
month
/
3
+
1
;
case
INTERVAL_QUARTER
:
return
(
ltime
.
month
+
2
)
/
3
;
case
INTERVAL_MONTH
:
return
ltime
.
month
;
case
INTERVAL_MONTH
:
return
ltime
.
month
;
case
INTERVAL_WEEK
:
case
INTERVAL_WEEK
:
{
{
...
...
sql/opt_sum.cc
View file @
a5ed8bf6
...
@@ -123,8 +123,11 @@ int opt_sum_query(TABLE_LIST *tables, List<Item> &all_fields,COND *conds)
...
@@ -123,8 +123,11 @@ int opt_sum_query(TABLE_LIST *tables, List<Item> &all_fields,COND *conds)
If the storage manager of 'tl' gives exact row count, compute the total
If the storage manager of 'tl' gives exact row count, compute the total
number of rows. If there are no outer table dependencies, this count
number of rows. If there are no outer table dependencies, this count
may be used as the real count.
may be used as the real count.
Schema tables are filled after this function is invoked, so we can't
get row count
*/
*/
if
(
tl
->
table
->
file
->
table_flags
()
&
HA_NOT_EXACT_COUNT
)
if
((
tl
->
table
->
file
->
table_flags
()
&
HA_NOT_EXACT_COUNT
)
||
tl
->
schema_table
)
{
{
is_exact_count
=
FALSE
;
is_exact_count
=
FALSE
;
count
=
1
;
// ensure count != 0
count
=
1
;
// ensure count != 0
...
@@ -149,32 +152,16 @@ int opt_sum_query(TABLE_LIST *tables, List<Item> &all_fields,COND *conds)
...
@@ -149,32 +152,16 @@ int opt_sum_query(TABLE_LIST *tables, List<Item> &all_fields,COND *conds)
switch
(
item_sum
->
sum_func
())
{
switch
(
item_sum
->
sum_func
())
{
case
Item_sum
:
:
COUNT_FUNC
:
case
Item_sum
:
:
COUNT_FUNC
:
/*
/*
If the expr in
count
(expr) can never be null we can change this
If the expr in
COUNT
(expr) can never be null we can change this
to the number of rows in the tables if this number is exact and
to the number of rows in the tables if this number is exact and
there are no outer joins.
there are no outer joins.
*/
*/
if
(
!
conds
&&
!
((
Item_sum_count
*
)
item
)
->
args
[
0
]
->
maybe_null
&&
if
(
!
conds
&&
!
((
Item_sum_count
*
)
item
)
->
args
[
0
]
->
maybe_null
&&
!
outer_tables
&&
is_exact_count
)
!
outer_tables
&&
is_exact_count
)
{
longlong
count
=
1
;
TABLE_LIST
*
table
;
for
(
table
=
tables
;
table
;
table
=
table
->
next_leaf
)
{
if
(
outer_tables
||
(
table
->
table
->
file
->
table_flags
()
&
HA_NOT_EXACT_COUNT
)
||
table
->
schema_table
)
{
const_result
=
0
;
// Can't optimize left join
break
;
}
tables
->
table
->
file
->
info
(
HA_STATUS_VARIABLE
|
HA_STATUS_NO_LOCK
);
count
*=
table
->
table
->
file
->
records
;
}
if
(
!
table
)
{
{
((
Item_sum_count
*
)
item
)
->
make_const
(
count
);
((
Item_sum_count
*
)
item
)
->
make_const
(
count
);
recalc_const_item
=
1
;
recalc_const_item
=
1
;
}
}
}
else
else
const_result
=
0
;
const_result
=
0
;
break
;
break
;
...
...
support-files/mysql.server.sh
View file @
a5ed8bf6
...
@@ -72,6 +72,10 @@ else
...
@@ -72,6 +72,10 @@ else
libexecdir
=
"
$basedir
/libexec"
libexecdir
=
"
$basedir
/libexec"
fi
fi
# datadir_set is used to determine if datadir was set (and so should be
# *not* set inside of the --basedir= handler.)
datadir_set
=
#
#
# Use LSB init script functions for printing messages, if possible
# Use LSB init script functions for printing messages, if possible
#
#
...
@@ -105,11 +109,15 @@ parse_server_arguments() {
...
@@ -105,11 +109,15 @@ parse_server_arguments() {
case
"
$arg
"
in
case
"
$arg
"
in
--basedir
=
*
)
basedir
=
`
echo
"
$arg
"
|
sed
-e
's/^[^=]*=//'
`
--basedir
=
*
)
basedir
=
`
echo
"
$arg
"
|
sed
-e
's/^[^=]*=//'
`
bindir
=
"
$basedir
/bin"
bindir
=
"
$basedir
/bin"
if
test
-z
"
$datadir_set
"
;
then
datadir
=
"
$basedir
/data"
datadir
=
"
$basedir
/data"
fi
sbindir
=
"
$basedir
/sbin"
sbindir
=
"
$basedir
/sbin"
libexecdir
=
"
$basedir
/libexec"
libexecdir
=
"
$basedir
/libexec"
;;
;;
--datadir
=
*
)
datadir
=
`
echo
"
$arg
"
|
sed
-e
's/^[^=]*=//'
`
;;
--datadir
=
*
)
datadir
=
`
echo
"
$arg
"
|
sed
-e
's/^[^=]*=//'
`
datadir_set
=
1
;;
--user
=
*
)
user
=
`
echo
"
$arg
"
|
sed
-e
's/^[^=]*=//'
`
;;
--user
=
*
)
user
=
`
echo
"
$arg
"
|
sed
-e
's/^[^=]*=//'
`
;;
--pid-file
=
*
)
server_pid_file
=
`
echo
"
$arg
"
|
sed
-e
's/^[^=]*=//'
`
;;
--pid-file
=
*
)
server_pid_file
=
`
echo
"
$arg
"
|
sed
-e
's/^[^=]*=//'
`
;;
--use-mysqld_safe
)
use_mysqld_safe
=
1
;;
--use-mysqld_safe
)
use_mysqld_safe
=
1
;;
...
...
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