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
ac1852b4
Commit
ac1852b4
authored
Feb 21, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/my/mysql-5.0
parents
32895fe3
80ddfccf
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
166 additions
and
10 deletions
+166
-10
mysql-test/r/analyse.result
mysql-test/r/analyse.result
+7
-0
mysql-test/r/cast.result
mysql-test/r/cast.result
+16
-0
mysql-test/r/func_group.result
mysql-test/r/func_group.result
+35
-0
mysql-test/r/innodb.result
mysql-test/r/innodb.result
+2
-0
mysql-test/r/subselect.result
mysql-test/r/subselect.result
+36
-0
mysql-test/r/type_bit.result
mysql-test/r/type_bit.result
+0
-2
mysql-test/t/analyse.test
mysql-test/t/analyse.test
+8
-0
mysql-test/t/cast.test
mysql-test/t/cast.test
+8
-0
mysql-test/t/func_group.test
mysql-test/t/func_group.test
+22
-0
mysql-test/t/innodb.test
mysql-test/t/innodb.test
+4
-0
mysql-test/t/subselect.test
mysql-test/t/subselect.test
+23
-0
mysql-test/t/type_bit.test
mysql-test/t/type_bit.test
+0
-3
ndb/src/kernel/blocks/dbdict/Dbdict.cpp
ndb/src/kernel/blocks/dbdict/Dbdict.cpp
+2
-2
sql/sp_head.cc
sql/sp_head.cc
+1
-1
sql/sql_class.h
sql/sql_class.h
+2
-2
No files found.
mysql-test/r/analyse.result
View file @
ac1852b4
...
...
@@ -102,3 +102,10 @@ select * from t1 procedure analyse();
Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype
test.t1.v " \\ 1 19 0 0 3.7619 NULL ENUM('"','""','"c','\'\0\\"','\'','\'\'','\'b','a\0\0\0b','a\0','a""""b','a\'\'\'\'b','abc','abc\'def\\hij"klm\0opq','a\\\\\\\\b','b\'','c"','d\\','The\ZEnd','\\','\\d','\\\\') NOT NULL
drop table t1;
create table t1 (df decimal(5,1));
insert into t1 values(1.1);
insert into t1 values(2.2);
select * from t1 procedure analyse();
Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype
test.t1.df 1.1 2.2 8 8 0 0 1.650000000 0.302500000 ENUM('1.1','2.2') NOT NULL
drop table t1;
mysql-test/r/cast.result
View file @
ac1852b4
...
...
@@ -187,3 +187,19 @@ timediff(cast('2004-12-30 12:00:00' as time), '12:00:00')
select timediff(cast('1 12:00:00' as time), '12:00:00');
timediff(cast('1 12:00:00' as time), '12:00:00')
24:00:00
select cast('1.2' as decimal(3,2));
cast('1.2' as decimal(3,2))
1.20
select 1e18 * cast('1.2' as decimal(3,2));
1e18 * cast('1.2' as decimal(3,2))
1.2e+18
select cast(cast('1.2' as decimal(3,2)) as signed);
cast(cast('1.2' as decimal(3,2)) as signed)
1
set @v1=1e18;
select cast(@v1 as decimal(22, 2));
cast(@v1 as decimal(22, 2))
1000000000000000000.00
select cast(-1e18 as decimal(22,2));
cast(-1e18 as decimal(22,2))
-1000000000000000000.00
mysql-test/r/func_group.result
View file @
ac1852b4
...
...
@@ -769,3 +769,38 @@ show columns from t2;
Field Type Null Key Default Extra
f2 datetime NO 0000-00-00 00:00:00
drop table t2, t1;
create table t2 (ff double);
insert into t2 values (2.2);
select cast(sum(distinct ff) as decimal(5,2)) from t2;
cast(sum(distinct ff) as decimal(5,2))
2.20
select cast(sum(distinct ff) as signed) from t2;
cast(sum(distinct ff) as signed)
2
select cast(variance(ff) as decimal(10,3)) from t2;
cast(variance(ff) as decimal(10,3))
0.000
select cast(min(ff) as decimal(5,2)) from t2;
cast(min(ff) as decimal(5,2))
2.20
create table t1 (df decimal(5,1));
insert into t1 values(1.1);
insert into t1 values(2.2);
select cast(sum(distinct df) as signed) from t1;
cast(sum(distinct df) as signed)
3
select cast(min(df) as signed) from t1;
cast(min(df) as signed)
0
select 1e8 * sum(distinct df) from t1;
1e8 * sum(distinct df)
330000000
select 1e8 * min(df) from t1;
1e8 * min(df)
110000000
create table t3 (ifl int);
insert into t3 values(1), (2);
select cast(min(ifl) as decimal(5,2)) from t3;
cast(min(ifl) as decimal(5,2))
1.00
drop table t1, t2, t3;
mysql-test/r/innodb.result
View file @
ac1852b4
...
...
@@ -1798,3 +1798,5 @@ Variable_name Value
innodb_thread_sleep_delay 10000
create table t1 (v varchar(16384)) engine=innodb;
ERROR 42000: Column length too big for column 'v' (max = 255); use BLOB instead
create table t1 (a bit, key(a)) engine=innodb;
ERROR 42000: The storage engine for the table doesn't support BIT FIELD
mysql-test/r/subselect.result
View file @
ac1852b4
...
...
@@ -2276,3 +2276,39 @@ pass userid parentid parentgroup childid groupname grouptypeid crse categoryid c
1 5141 12 group2 12 group2 5 1 2 88 Oct04
1 5141 12 group2 12 group2 5 1 2 89 Oct04
drop table if exists t1, t2, t3, t4, t5;
create table t1 (df decimal(5,1));
insert into t1 values(1.1);
insert into t1 values(2.2);
select * from t1 where df <= all (select avg(df) from t1 group by df);
df
1.1
select * from t1 where df >= all (select avg(df) from t1 group by df);
df
2.2
drop table t1;
create table t1 (df decimal(5,1));
insert into t1 values(1.1);
select 1.1 * exists(select * from t1);
1.1 * exists(select * from t1)
1.1
drop table t1;
CREATE TABLE t1 (
grp int(11) default NULL,
a decimal(10,2) default NULL);
insert into t1 values (1, 1), (2, 2), (2, 3), (3, 4), (3, 5), (3, 6), (NULL, NULL);
select * from t1;
grp a
1 1.00
2 2.00
2 3.00
3 4.00
3 5.00
3 6.00
NULL NULL
select min(a) from t1 group by grp;
min(a)
NULL
1.00
2.00
4.00
drop table t1;
mysql-test/r/type_bit.result
View file @
ac1852b4
...
...
@@ -44,8 +44,6 @@ t1 CREATE TABLE `t1` (
`a` bit(1) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 (a bit, key(a)) engine=innodb;
ERROR 42000: The storage engine for the table doesn't support BIT FIELD
create table t1 (a bit(64));
insert into t1 values
(b'1111111111111111111111111111111111111111111111111111111111111111'),
...
...
mysql-test/t/analyse.test
View file @
ac1852b4
...
...
@@ -47,3 +47,11 @@ create table t1 (v varchar(128));
insert
into
t1
values
(
'abc'
),(
'abc\'def\\hij\"klm\0opq'
),(
'\''
),(
'\"'
),(
'\\'
),(
'a\0'
),(
'b\''
),(
'c\"'
),(
'd\\'
),(
'\'b'
),(
'\"c'
),(
'\\d'
),(
'a\0\0\0b'
),(
'a\'\'\'\'b'
),(
'a\"\"\"\"b'
),(
'a\\\\\\\\b'
),(
'\'\0\\\"'
),(
'\'\''
),(
'\"\"'
),(
'\\\\'
),(
'The\ZEnd'
);
select
*
from
t1
procedure
analyse
();
drop
table
t1
;
#decimal-related test
create
table
t1
(
df
decimal
(
5
,
1
));
insert
into
t1
values
(
1.1
);
insert
into
t1
values
(
2.2
);
select
*
from
t1
procedure
analyse
();
drop
table
t1
;
mysql-test/t/cast.test
View file @
ac1852b4
...
...
@@ -118,3 +118,11 @@ select date_add(cast('2004-12-30 12:00:00' as date), interval 0 hour);
select
timediff
(
cast
(
'2004-12-30 12:00:00'
as
time
),
'12:00:00'
);
# Still we should not throw away "days" part of time value
select
timediff
(
cast
(
'1 12:00:00'
as
time
),
'12:00:00'
);
#decimal-related additions
select
cast
(
'1.2'
as
decimal
(
3
,
2
));
select
1
e18
*
cast
(
'1.2'
as
decimal
(
3
,
2
));
select
cast
(
cast
(
'1.2'
as
decimal
(
3
,
2
))
as
signed
);
set
@
v1
=
1
e18
;
select
cast
(
@
v1
as
decimal
(
22
,
2
));
select
cast
(
-
1
e18
as
decimal
(
22
,
2
));
mysql-test/t/func_group.test
View file @
ac1852b4
...
...
@@ -492,3 +492,25 @@ drop table t2;
create
table
t2
select
f2
from
(
select
now
()
f2
from
t1
)
a
;
show
columns
from
t2
;
drop
table
t2
,
t1
;
# decimal-related tests
create
table
t2
(
ff
double
);
insert
into
t2
values
(
2.2
);
select
cast
(
sum
(
distinct
ff
)
as
decimal
(
5
,
2
))
from
t2
;
select
cast
(
sum
(
distinct
ff
)
as
signed
)
from
t2
;
select
cast
(
variance
(
ff
)
as
decimal
(
10
,
3
))
from
t2
;
select
cast
(
min
(
ff
)
as
decimal
(
5
,
2
))
from
t2
;
create
table
t1
(
df
decimal
(
5
,
1
));
insert
into
t1
values
(
1.1
);
insert
into
t1
values
(
2.2
);
select
cast
(
sum
(
distinct
df
)
as
signed
)
from
t1
;
select
cast
(
min
(
df
)
as
signed
)
from
t1
;
select
1
e8
*
sum
(
distinct
df
)
from
t1
;
select
1
e8
*
min
(
df
)
from
t1
;
create
table
t3
(
ifl
int
);
insert
into
t3
values
(
1
),
(
2
);
select
cast
(
min
(
ifl
)
as
decimal
(
5
,
2
))
from
t3
;
drop
table
t1
,
t2
,
t3
;
mysql-test/t/innodb.test
View file @
ac1852b4
...
...
@@ -1278,3 +1278,7 @@ show variables like "innodb_thread_sleep_delay";
# InnoDB specific varchar tests
--
error
1074
create
table
t1
(
v
varchar
(
16384
))
engine
=
innodb
;
# The following should be moved to type_bit.test when innodb will support it
--
error
1178
create
table
t1
(
a
bit
,
key
(
a
))
engine
=
innodb
;
mysql-test/t/subselect.test
View file @
ac1852b4
...
...
@@ -1543,3 +1543,26 @@ group by
drop
table
if
exists
t1
,
t2
,
t3
,
t4
,
t5
;
#decimal-related tests
create
table
t1
(
df
decimal
(
5
,
1
));
insert
into
t1
values
(
1.1
);
insert
into
t1
values
(
2.2
);
select
*
from
t1
where
df
<=
all
(
select
avg
(
df
)
from
t1
group
by
df
);
select
*
from
t1
where
df
>=
all
(
select
avg
(
df
)
from
t1
group
by
df
);
drop
table
t1
;
create
table
t1
(
df
decimal
(
5
,
1
));
insert
into
t1
values
(
1.1
);
select
1.1
*
exists
(
select
*
from
t1
);
drop
table
t1
;
CREATE
TABLE
t1
(
grp
int
(
11
)
default
NULL
,
a
decimal
(
10
,
2
)
default
NULL
);
insert
into
t1
values
(
1
,
1
),
(
2
,
2
),
(
2
,
3
),
(
3
,
4
),
(
3
,
5
),
(
3
,
6
),
(
NULL
,
NULL
);
select
*
from
t1
;
select
min
(
a
)
from
t1
group
by
grp
;
drop
table
t1
;
mysql-test/t/type_bit.test
View file @
ac1852b4
...
...
@@ -26,9 +26,6 @@ create table t1 (a bit(0));
show
create
table
t1
;
drop
table
t1
;
--
error
1178
create
table
t1
(
a
bit
,
key
(
a
))
engine
=
innodb
;
create
table
t1
(
a
bit
(
64
));
insert
into
t1
values
(
b
'1111111111111111111111111111111111111111111111111111111111111111'
),
...
...
ndb/src/kernel/blocks/dbdict/Dbdict.cpp
View file @
ac1852b4
...
...
@@ -2245,9 +2245,9 @@ void Dbdict::checkSchemaStatus(Signal* signal)
restartCreateTab
(
signal
,
tableId
,
oldEntry
,
false
);
return
;
}
//if
ndbrequire
(
ok
);
break
;
}
ndbrequire
(
ok
);
break
;
}
case
SchemaFile
:
:
DROP_TABLE_STARTED
:
jam
();
...
...
sql/sp_head.cc
View file @
ac1852b4
...
...
@@ -504,6 +504,7 @@ sp_head::execute(THD *thd)
break
;
DBUG_PRINT
(
"execute"
,
(
"Instruction %u"
,
ip
));
ret
=
i
->
execute
(
thd
,
&
ip
);
thd
->
rollback_item_tree_changes
();
if
(
i
->
free_list
)
cleanup_items
(
i
->
free_list
);
// Check if an exception has occurred and a handler has been found
...
...
@@ -1195,7 +1196,6 @@ sp_instr_stmt::exec_stmt(THD *thd, LEX *lex)
res
=
mysql_execute_command
(
thd
);
lex
->
unit
.
cleanup
();
thd
->
rollback_item_tree_changes
();
if
(
thd
->
lock
||
thd
->
open_tables
||
thd
->
derived_tables
)
{
thd
->
proc_info
=
"closing tables"
;
...
...
sql/sql_class.h
View file @
ac1852b4
...
...
@@ -83,14 +83,14 @@ class TC_LOG_DUMMY: public TC_LOG // use it to disable the logging
#ifdef HAVE_MMAP
class
TC_LOG_MMAP
:
public
TC_LOG
{
private:
public:
// only to keep Sun Forte on sol9x86 happy
typedef
enum
{
POOL
,
// page is in pool
ERROR
,
// last sync failed
DIRTY
// new xids added since last sync
}
PAGE_STATE
;
private:
typedef
struct
st_page
{
struct
st_page
*
next
;
// page a linked in a fifo queue
my_xid
*
start
,
*
end
;
// usable area of a page
...
...
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