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
7e0733fe
Commit
7e0733fe
authored
Apr 10, 2006
by
jonas@perch.ndb.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge perch.ndb.mysql.com:/home/jonas/src/50-jonas
into perch.ndb.mysql.com:/home/jonas/src/mysql-5.0
parents
2d284fe0
5b387117
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
149 additions
and
48 deletions
+149
-48
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/r/sp.result
mysql-test/r/sp.result
+11
-0
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
mysql-test/t/sp.test
mysql-test/t/sp.test
+15
-0
ndb/src/ndbapi/NdbDictionaryImpl.cpp
ndb/src/ndbapi/NdbDictionaryImpl.cpp
+6
-1
ndb/src/ndbapi/NdbLinHash.hpp
ndb/src/ndbapi/NdbLinHash.hpp
+10
-3
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
sql/sql_delete.cc
sql/sql_delete.cc
+1
-2
sql/sql_parse.cc
sql/sql_parse.cc
+1
-1
support-files/mysql.server.sh
support-files/mysql.server.sh
+10
-2
No files found.
mysql-test/r/ctype_ucs.result
View file @
7e0733fe
...
...
@@ -719,3 +719,11 @@ lily
river
drop table t1;
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 @
7e0733fe
...
...
@@ -626,3 +626,8 @@ latin1
latin1
drop table t1, t2, t3;
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 @
7e0733fe
...
...
@@ -360,6 +360,42 @@ extract(SECOND FROM "1999-01-02 10:11:12")
select extract(MONTH FROM "2001-02-00");
extract(MONTH FROM "2001-02-00")
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;
"1900-01-01 00:00:00" + INTERVAL 2147483648 SECOND
1968-01-20 03:14:08
...
...
mysql-test/r/information_schema.result
View file @
7e0733fe
...
...
@@ -1041,14 +1041,6 @@ select 1 from (select 1 from test.t1) a;
1
use test;
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 view v1 as select * from t1;
drop table t1;
...
...
mysql-test/r/sp.result
View file @
7e0733fe
...
...
@@ -4811,6 +4811,17 @@ begin
declare x int;
select id from t1 order by x;
end|
drop procedure if exists bug14945|
create table t3 (id int not null auto_increment primary key)|
create procedure bug14945() deterministic truncate t3|
insert into t3 values (null)|
call bug14945()|
insert into t3 values (null)|
select * from t3|
id
1
drop table t3|
drop procedure bug14945|
create procedure bug16474_2(x int)
select id from t1 order by x|
call bug16474_1()|
...
...
mysql-test/t/ctype_ucs.test
View file @
7e0733fe
...
...
@@ -455,3 +455,11 @@ execute stmt using @param1;
select
utext
from
t1
where
utext
like
'%%'
;
drop
table
t1
;
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 @
7e0733fe
...
...
@@ -414,3 +414,11 @@ select charset(a) from t2;
select
charset
(
a
)
from
t3
;
drop
table
t1
,
t2
,
t3
;
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 @
7e0733fe
...
...
@@ -139,6 +139,24 @@ select extract(MINUTE_SECOND FROM "10:11:12");
select
extract
(
SECOND
FROM
"1999-01-02 10:11:12"
);
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)
#
...
...
mysql-test/t/information_schema.test
View file @
7e0733fe
...
...
@@ -738,15 +738,6 @@ select 1 from (select 1 from test.t1) a;
use
test
;
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
#
...
...
mysql-test/t/sp.test
View file @
7e0733fe
...
...
@@ -5666,6 +5666,21 @@ begin
select
id
from
t1
order
by
x
;
end
|
#
# BUG#14945: Truncate table doesn't reset the auto_increment counter
#
--
disable_warnings
drop
procedure
if
exists
bug14945
|
--
enable_warnings
create
table
t3
(
id
int
not
null
auto_increment
primary
key
)
|
create
procedure
bug14945
()
deterministic
truncate
t3
|
insert
into
t3
values
(
null
)
|
call
bug14945
()
|
insert
into
t3
values
(
null
)
|
select
*
from
t3
|
drop
table
t3
|
drop
procedure
bug14945
|
# This does NOT order by column index; variable is an expression.
create
procedure
bug16474_2
(
x
int
)
select
id
from
t1
order
by
x
|
...
...
ndb/src/ndbapi/NdbDictionaryImpl.cpp
View file @
7e0733fe
...
...
@@ -1109,9 +1109,14 @@ NdbDictInterface::getTable(const BaseString& name, bool fullyQualifiedNames)
// Copy name to m_buffer to get a word sized buffer
m_buffer
.
clear
();
m_buffer
.
grow
(
namelen_words
*
4
);
m_buffer
.
grow
(
namelen_words
*
4
+
4
);
m_buffer
.
append
(
name
.
c_str
(),
namelen
);
#ifndef IGNORE_VALGRIND_WARNINGS
Uint32
pad
=
0
;
m_buffer
.
append
(
&
pad
,
4
);
#endif
LinearSectionPtr
ptr
[
1
];
ptr
[
0
].
p
=
(
Uint32
*
)
m_buffer
.
get_data
();
ptr
[
0
].
sz
=
namelen_words
;
...
...
ndb/src/ndbapi/NdbLinHash.hpp
View file @
7e0733fe
...
...
@@ -427,19 +427,26 @@ NdbLinHash<C>::getNext(NdbElement_t<C> * curr){
return
curr
->
next
;
int
dir
=
0
,
seg
=
0
;
if
(
curr
!=
0
){
int
counts
;
if
(
curr
!=
0
)
{
getBucket
(
curr
->
hash
,
&
dir
,
&
seg
);
counts
=
seg
+
1
;
}
else
{
counts
=
0
;
}
for
(
int
countd
=
dir
;
countd
<
DIRECTORYSIZE
;
countd
++
){
if
(
directory
[
countd
]
!=
0
)
{
for
(
int
counts
=
seg
+
1
;
counts
<
SEGMENTSIZE
;
counts
++
){
for
(;
counts
<
SEGMENTSIZE
;
counts
++
){
if
(
directory
[
countd
]
->
elements
[
counts
]
!=
0
)
{
return
directory
[
countd
]
->
elements
[
counts
];
}
}
}
counts
=
0
;
}
return
0
;
...
...
sql/item_sum.cc
View file @
7e0733fe
...
...
@@ -3226,7 +3226,10 @@ Item_func_group_concat::fix_fields(THD *thd, Item **ref)
}
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
;
result
.
set_charset
(
collation
.
collation
);
...
...
sql/item_timefunc.cc
View file @
7e0733fe
...
...
@@ -2213,7 +2213,7 @@ longlong Item_extract::val_int()
switch
(
int_type
)
{
case
INTERVAL_YEAR
:
return
ltime
.
year
;
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_WEEK
:
{
...
...
sql/opt_sum.cc
View file @
7e0733fe
...
...
@@ -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
number of rows. If there are no outer table dependencies, this 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
;
count
=
1
;
// ensure count != 0
...
...
@@ -149,31 +152,15 @@ int opt_sum_query(TABLE_LIST *tables, List<Item> &all_fields,COND *conds)
switch
(
item_sum
->
sum_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
there are no outer joins.
*/
if
(
!
conds
&&
!
((
Item_sum_count
*
)
item
)
->
args
[
0
]
->
maybe_null
&&
!
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
);
recalc_const_item
=
1
;
}
((
Item_sum_count
*
)
item
)
->
make_const
(
count
);
recalc_const_item
=
1
;
}
else
const_result
=
0
;
...
...
sql/sql_delete.cc
View file @
7e0733fe
...
...
@@ -842,8 +842,7 @@ bool mysql_truncate(THD *thd, TABLE_LIST *table_list, bool dont_send_ok)
table_list
->
db
,
table_list
->
table_name
);
DBUG_RETURN
(
TRUE
);
}
if
(
!
ha_check_storage_engine_flag
(
table_type
,
HTON_CAN_RECREATE
)
||
thd
->
lex
->
sphead
)
if
(
!
ha_check_storage_engine_flag
(
table_type
,
HTON_CAN_RECREATE
))
goto
trunc_by_del
;
if
(
lock_and_wait_for_table_name
(
thd
,
table_list
))
DBUG_RETURN
(
TRUE
);
...
...
sql/sql_parse.cc
View file @
7e0733fe
...
...
@@ -3350,7 +3350,7 @@ mysql_execute_command(THD *thd)
Don't allow this within a transaction because we want to use
re-generate table
*/
if
(
(
thd
->
locked_tables
&&
!
lex
->
sphead
)
||
thd
->
active_transaction
())
if
(
thd
->
locked_tables
||
thd
->
active_transaction
())
{
my_message
(
ER_LOCK_OR_ACTIVE_TRANSACTION
,
ER
(
ER_LOCK_OR_ACTIVE_TRANSACTION
),
MYF
(
0
));
...
...
support-files/mysql.server.sh
View file @
7e0733fe
...
...
@@ -72,6 +72,10 @@ else
libexecdir
=
"
$basedir
/libexec"
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
#
...
...
@@ -105,11 +109,15 @@ parse_server_arguments() {
case
"
$arg
"
in
--basedir
=
*
)
basedir
=
`
echo
"
$arg
"
|
sed
-e
's/^[^=]*=//'
`
bindir
=
"
$basedir
/bin"
datadir
=
"
$basedir
/data"
if
test
-z
"
$datadir_set
"
;
then
datadir
=
"
$basedir
/data"
fi
sbindir
=
"
$basedir
/sbin"
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/^[^=]*=//'
`
;;
--pid-file
=
*
)
server_pid_file
=
`
echo
"
$arg
"
|
sed
-e
's/^[^=]*=//'
`
;;
--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