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
c76c4206
Commit
c76c4206
authored
Nov 18, 2001
by
monty@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test of optimize table.
parent
7a45e7f2
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
167 additions
and
56 deletions
+167
-56
Docs/manual.texi
Docs/manual.texi
+129
-54
mysql-test/r/create.result
mysql-test/r/create.result
+9
-0
mysql-test/r/myisam.result
mysql-test/r/myisam.result
+17
-0
mysql-test/t/create.test
mysql-test/t/create.test
+10
-0
sql/item_func.cc
sql/item_func.cc
+2
-2
No files found.
Docs/manual.texi
View file @
c76c4206
This diff is collapsed.
Click to expand it.
mysql-test/r/create.result
View file @
c76c4206
...
@@ -68,3 +68,12 @@ select * from t2 where b="world";
...
@@ -68,3 +68,12 @@ select * from t2 where b="world";
a B
a B
3 world
3 world
drop table t1,t2;
drop table t1,t2;
create table t1(x varchar(50) );
create table t2 select x from t1 where 1=2;
describe t1;
Field Type Null Key Default Extra
x varchar(50) YES NULL
describe t2;
Field Type Null Key Default Extra
x char(50) YES NULL
drop table t1,t2;
mysql-test/r/myisam.result
View file @
c76c4206
...
@@ -31,3 +31,20 @@ check table t1;
...
@@ -31,3 +31,20 @@ check table t1;
Table Op Msg_type Msg_text
Table Op Msg_type Msg_text
test.t1 check status OK
test.t1 check status OK
drop table t1;
drop table t1;
create table t1 (a int not null auto_increment, b int not null, primary key (a), index(b));
insert into t1 (b) values (1),(2),(2),(2),(2);
optimize table t1;
Table Op Msg_type Msg_text
test.t1 optimize status OK
show index from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Comment
t1 0 PRIMARY 1 a A 5 NULL NULL
t1 1 b 1 b A 1 NULL NULL
optimize table t1;
Table Op Msg_type Msg_text
test.t1 optimize status Table is already up to date
show index from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Comment
t1 0 PRIMARY 1 a A 5 NULL NULL
t1 1 b 1 b A 1 NULL NULL
drop table t1;
mysql-test/t/create.test
View file @
c76c4206
...
@@ -65,3 +65,13 @@ create table t2 (key (b)) select * from t1;
...
@@ -65,3 +65,13 @@ create table t2 (key (b)) select * from t1;
explain
select
*
from
t2
where
b
=
"world"
;
explain
select
*
from
t2
where
b
=
"world"
;
select
*
from
t2
where
b
=
"world"
;
select
*
from
t2
where
b
=
"world"
;
drop
table
t1
,
t2
;
drop
table
t1
,
t2
;
#
# Test types after CREATE ... SELECT
#
create
table
t1
(
x
varchar
(
50
)
);
create
table
t2
select
x
from
t1
where
1
=
2
;
describe
t1
;
describe
t2
;
drop
table
t1
,
t2
;
sql/item_func.cc
View file @
c76c4206
...
@@ -621,8 +621,8 @@ double Item_func_rand::val()
...
@@ -621,8 +621,8 @@ double Item_func_rand::val()
{
{
if
(
arg_count
)
if
(
arg_count
)
{
// Only use argument once in query
{
// Only use argument once in query
ulong
tmp
=
((
ulong
)
args
[
0
]
->
val_int
())
+
55555555L
;
ulong
tmp
=
((
ulong
)
args
[
0
]
->
val_int
());
randominit
(
&
current_thd
->
rand
,
tmp
,
tmp
/
2
);
randominit
(
&
current_thd
->
rand
,
tmp
*
0x10001L
+
55555555L
,
tmp
*
0x10000001L
);
#ifdef DELETE_ITEMS
#ifdef DELETE_ITEMS
delete
args
[
0
];
delete
args
[
0
];
#endif
#endif
...
...
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