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
af878017
Commit
af878017
authored
Jan 18, 2005
by
dlenev@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/dlenev/src/mysql-4.1-merges
into mysql.com:/home/dlenev/src/mysql-5.0-merges
parents
04ee9572
0787a97b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
7 deletions
+22
-7
mysql-test/r/alter_table.result
mysql-test/r/alter_table.result
+4
-0
mysql-test/t/alter_table.test
mysql-test/t/alter_table.test
+11
-0
sql/field.h
sql/field.h
+7
-7
No files found.
mysql-test/r/alter_table.result
View file @
af878017
...
@@ -493,3 +493,7 @@ select hex(a) from t1;
...
@@ -493,3 +493,7 @@ select hex(a) from t1;
hex(a)
hex(a)
F2E5F1F2
F2E5F1F2
drop table t1;
drop table t1;
create table t1 ( a timestamp );
alter table t1 add unique ( a(1) );
ERROR HY000: Incorrect sub part key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique sub keys
drop table t1;
mysql-test/t/alter_table.test
View file @
af878017
...
@@ -336,3 +336,14 @@ select hex(a) from t1;
...
@@ -336,3 +336,14 @@ select hex(a) from t1;
alter
table
t1
convert
to
character
set
cp1251
;
alter
table
t1
convert
to
character
set
cp1251
;
select
hex
(
a
)
from
t1
;
select
hex
(
a
)
from
t1
;
drop
table
t1
;
drop
table
t1
;
#
# Test for bug #7884 "Able to add invalid unique index on TIMESTAMP prefix"
# MySQL should not think that packed field with non-zero decimals is
# geometry field and allow to create prefix index which is
# shorter than packed field length.
#
create
table
t1
(
a
timestamp
);
--
error
1089
alter
table
t1
add
unique
(
a
(
1
)
);
drop
table
t1
;
sql/field.h
View file @
af878017
...
@@ -1341,10 +1341,10 @@ int set_field_to_null_with_conversions(Field *field, bool no_conversions);
...
@@ -1341,10 +1341,10 @@ int set_field_to_null_with_conversions(Field *field, bool no_conversions);
#define FIELDFLAG_NUMBER 2
#define FIELDFLAG_NUMBER 2
#define FIELDFLAG_ZEROFILL 4
#define FIELDFLAG_ZEROFILL 4
#define FIELDFLAG_PACK 120 // Bits used for packing
#define FIELDFLAG_PACK 120 // Bits used for packing
#define FIELDFLAG_INTERVAL 256
#define FIELDFLAG_INTERVAL 256
// mangled with decimals!
#define FIELDFLAG_BITFIELD 512 // mangled with dec!
#define FIELDFLAG_BITFIELD 512 // mangled with dec
imals
!
#define FIELDFLAG_BLOB 1024 // mangled with dec!
#define FIELDFLAG_BLOB 1024 // mangled with dec
imals
!
#define FIELDFLAG_GEOM 2048
#define FIELDFLAG_GEOM 2048
// mangled with decimals!
#define FIELDFLAG_LEFT_FULLSCREEN 8192
#define FIELDFLAG_LEFT_FULLSCREEN 8192
#define FIELDFLAG_RIGHT_FULLSCREEN 16384
#define FIELDFLAG_RIGHT_FULLSCREEN 16384
...
@@ -1368,10 +1368,10 @@ int set_field_to_null_with_conversions(Field *field, bool no_conversions);
...
@@ -1368,10 +1368,10 @@ int set_field_to_null_with_conversions(Field *field, bool no_conversions);
#define f_decimals(x) ((uint8) (((x) >> FIELDFLAG_DEC_SHIFT) & FIELDFLAG_MAX_DEC))
#define f_decimals(x) ((uint8) (((x) >> FIELDFLAG_DEC_SHIFT) & FIELDFLAG_MAX_DEC))
#define f_is_alpha(x) (!f_is_num(x))
#define f_is_alpha(x) (!f_is_num(x))
#define f_is_binary(x) ((x) & FIELDFLAG_BINARY) // 4.0- compatibility
#define f_is_binary(x) ((x) & FIELDFLAG_BINARY) // 4.0- compatibility
#define f_is_enum(x) ((
x) &
FIELDFLAG_INTERVAL)
#define f_is_enum(x) ((
(x) & (FIELDFLAG_INTERVAL | FIELDFLAG_NUMBER)) ==
FIELDFLAG_INTERVAL)
#define f_is_bitfield(x)
((x) &
FIELDFLAG_BITFIELD)
#define f_is_bitfield(x)
(((x) & (FIELDFLAG_BITFIELD | FIELDFLAG_NUMBER)) ==
FIELDFLAG_BITFIELD)
#define f_is_blob(x) (((x) & (FIELDFLAG_BLOB | FIELDFLAG_NUMBER)) == FIELDFLAG_BLOB)
#define f_is_blob(x) (((x) & (FIELDFLAG_BLOB | FIELDFLAG_NUMBER)) == FIELDFLAG_BLOB)
#define f_is_geom(x) ((
x) &
FIELDFLAG_GEOM)
#define f_is_geom(x) ((
(x) & (FIELDFLAG_GEOM | FIELDFLAG_NUMBER)) ==
FIELDFLAG_GEOM)
#define f_is_equ(x) ((x) & (1+2+FIELDFLAG_PACK+31*256))
#define f_is_equ(x) ((x) & (1+2+FIELDFLAG_PACK+31*256))
#define f_settype(x) (((int) x) << FIELDFLAG_PACK_SHIFT)
#define f_settype(x) (((int) x) << FIELDFLAG_PACK_SHIFT)
#define f_maybe_null(x) (x & FIELDFLAG_MAYBE_NULL)
#define f_maybe_null(x) (x & FIELDFLAG_MAYBE_NULL)
...
...
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