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
1814128b
Commit
1814128b
authored
Mar 09, 2010
by
Bjorn Munch
Browse files
Options
Browse Files
Download
Plain Diff
upmerge 45482
parents
bf98cc7b
937eabd3
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
31 deletions
+29
-31
mysql-test/lib/mtr_cases.pm
mysql-test/lib/mtr_cases.pm
+1
-1
mysql-test/r/csv.result
mysql-test/r/csv.result
+21
-22
mysql-test/t/csv.test
mysql-test/t/csv.test
+7
-8
No files found.
mysql-test/lib/mtr_cases.pm
View file @
1814128b
...
@@ -585,7 +585,7 @@ sub optimize_cases {
...
@@ -585,7 +585,7 @@ sub optimize_cases {
# Check that engine selected by
# Check that engine selected by
# --default-storage-engine=<engine> is supported
# --default-storage-engine=<engine> is supported
# =======================================================
# =======================================================
my
%
builtin_engines
=
('
myisam
'
=>
1
,
'
memory
'
=>
1
);
my
%
builtin_engines
=
('
myisam
'
=>
1
,
'
memory
'
=>
1
,
'
csv
'
=>
1
);
foreach
my
$opt
(
@
{
$tinfo
->
{
master_opt
}}
)
{
foreach
my
$opt
(
@
{
$tinfo
->
{
master_opt
}}
)
{
my
$default_engine
=
my
$default_engine
=
...
...
mysql-test/r/csv.result
View file @
1814128b
...
@@ -5138,7 +5138,7 @@ insert t1 values (1),(2),(3),(4),(5);
...
@@ -5138,7 +5138,7 @@ insert t1 values (1),(2),(3),(4),(5);
truncate table t1;
truncate table t1;
affected rows: 0
affected rows: 0
drop table t1;
drop table t1;
create table t1 (v varchar(32) not null);
create table t1 (v varchar(32) not null)
engine=csv
;
insert into t1 values ('def'),('abc'),('hij'),('3r4f');
insert into t1 values ('def'),('abc'),('hij'),('3r4f');
select * from t1;
select * from t1;
v
v
...
@@ -5146,14 +5146,14 @@ def
...
@@ -5146,14 +5146,14 @@ def
abc
abc
hij
hij
3r4f
3r4f
alter table t1 change v v2 varchar(32);
alter table t1 change v v2 varchar(32)
not null
;
select * from t1;
select * from t1;
v2
v2
def
def
abc
abc
hij
hij
3r4f
3r4f
alter table t1 change v2 v varchar(64);
alter table t1 change v2 v varchar(64)
not null
;
select * from t1;
select * from t1;
v
v
def
def
...
@@ -5163,35 +5163,34 @@ hij
...
@@ -5163,35 +5163,34 @@ hij
update t1 set v = 'lmn' where v = 'hij';
update t1 set v = 'lmn' where v = 'hij';
select * from t1;
select * from t1;
v
v
lmn
def
def
abc
abc
lmn
3r4f
3r4f
alter table t1 add i int
auto_increment not null primary key
first;
alter table t1 add i int
not null
first;
select * from t1;
select * from t1;
i v
i v
1 def
0 lmn
2 abc
0 def
3 lmn
0 abc
4
3r4f
0
3r4f
update t1 set i=
5 where i=3
;
update t1 set i=
3 where v = 'abc'
;
select * from t1;
select * from t1;
i v
i v
1 def
3 abc
2 abc
0 lmn
5 lmn
0 def
4
3r4f
0
3r4f
alter table t1 change i i bigint;
alter table t1 change i i bigint
not null
;
select * from t1;
select * from t1;
i v
i v
1 def
3 abc
2 abc
0 lmn
5 lmn
0 def
4 3r4f
0 3r4f
alter table t1 add unique key (i, v);
select * from t1 where i between 2 and 4 and v in ('def','3r4f','abc');
select * from t1 where i between 2 and 4 and v in ('def','3r4f','lmn');
i v
i v
4 3r4f
3 abc
drop table t1;
drop table t1;
create table bug15205 (val int(11) not null) engine=csv;
create table bug15205 (val int(11) not null) engine=csv;
create table bug15205_2 (val int(11) not null) engine=csv;
create table bug15205_2 (val int(11) not null) engine=csv;
...
...
mysql-test/t/csv.test
View file @
1814128b
...
@@ -1553,26 +1553,25 @@ drop table t1;
...
@@ -1553,26 +1553,25 @@ drop table t1;
# whole alter table code is being tested all around the test suite already.
# whole alter table code is being tested all around the test suite already.
#
#
create table t1 (v varchar(32) not null);
create table t1 (v varchar(32) not null)
engine=csv
;
insert into t1 values ('def'),('abc'),('hij'),('3r4f');
insert into t1 values ('def'),('abc'),('hij'),('3r4f');
select * from t1;
select * from t1;
# Fast alter, no copy performed
# Fast alter, no copy performed
alter table t1 change v v2 varchar(32);
alter table t1 change v v2 varchar(32)
not null
;
select * from t1;
select * from t1;
# Fast alter, no copy performed
# Fast alter, no copy performed
alter table t1 change v2 v varchar(64);
alter table t1 change v2 v varchar(64)
not null
;
select * from t1;
select * from t1;
update t1 set v = 'lmn' where v = 'hij';
update t1 set v = 'lmn' where v = 'hij';
select * from t1;
select * from t1;
# Regular alter table
# Regular alter table
alter table t1 add i int
auto_increment not null primary key
first;
alter table t1 add i int
not null
first;
select * from t1;
select * from t1;
update t1 set i=
5 where i=3
;
update t1 set i=
3 where v = 'abc'
;
select * from t1;
select * from t1;
alter table t1 change i i bigint;
alter table t1 change i i bigint
not null
;
select * from t1;
select * from t1;
alter table t1 add unique key (i, v);
select * from t1 where i between 2 and 4 and v in ('def','3r4f','abc');
select * from t1 where i between 2 and 4 and v in ('def','3r4f','lmn');
drop table t1;
drop table t1;
#
#
...
...
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