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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
f96a9a7a
Commit
f96a9a7a
authored
Dec 07, 2004
by
jani@ua141d10.elisa.omakaista.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added some tests for new varchar.
parent
aa2f1161
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
0 deletions
+32
-0
mysql-test/r/type_varchar.result
mysql-test/r/type_varchar.result
+19
-0
mysql-test/t/type_varchar.test
mysql-test/t/type_varchar.test
+13
-0
No files found.
mysql-test/r/type_varchar.result
View file @
f96a9a7a
...
...
@@ -49,3 +49,22 @@ length(v) length(c) length(e) length(t)
3 2 3 4
3 1 3 7
drop table t1, vchar;
create table t1 (v varchar(20));
insert into t1 values('a ');
select v='a' from t1;
v='a'
1
select binary v='a' from t1;
binary v='a'
0
select binary v='a ' from t1;
binary v='a '
1
insert into t1 values('a');
alter table t1 add primary key (v);
ERROR 23000: Duplicate entry 'a' for key 1
drop table t1;
create table t1 (v varbinary(20));
insert into t1 values('a');
insert into t1 values('a ');
alter table t1 add primary key (v);
mysql-test/t/type_varchar.test
View file @
f96a9a7a
...
...
@@ -19,3 +19,16 @@ alter table vchar add i int;
show
create
table
vchar
;
select
length
(
v
),
length
(
c
),
length
(
e
),
length
(
t
)
from
vchar
;
drop
table
t1
,
vchar
;
create
table
t1
(
v
varchar
(
20
));
insert
into
t1
values
(
'a '
);
select
v
=
'a'
from
t1
;
select
binary
v
=
'a'
from
t1
;
select
binary
v
=
'a '
from
t1
;
insert
into
t1
values
(
'a'
);
--
error
1062
alter
table
t1
add
primary
key
(
v
);
drop
table
t1
;
create
table
t1
(
v
varbinary
(
20
));
insert
into
t1
values
(
'a'
);
insert
into
t1
values
(
'a '
);
alter
table
t1
add
primary
key
(
v
);
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