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
3f4b1023
Commit
3f4b1023
authored
Dec 15, 2003
by
monty@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/my/mysql-4.1
parents
b24671ee
05c0c4ff
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
4 deletions
+24
-4
mysql-test/r/type_enum.result
mysql-test/r/type_enum.result
+10
-0
mysql-test/t/type_enum.test
mysql-test/t/type_enum.test
+10
-0
sql/sql_show.cc
sql/sql_show.cc
+4
-4
No files found.
mysql-test/r/type_enum.result
View file @
3f4b1023
...
...
@@ -1636,3 +1636,13 @@ t1 CREATE TABLE `t1` (
`a` enum('','a','b') NOT NULL default 'b'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 (a enum(0xE4, '1', '2') not null default 0xE4);
show columns from t1;
Field Type Null Key Default Extra
a enum('','1','2')
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` enum('','1','2') NOT NULL default '?'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
mysql-test/t/type_enum.test
View file @
3f4b1023
...
...
@@ -24,3 +24,13 @@ drop table t1;
create
table
t1
(
a
enum
(
' '
,
'a'
,
'b '
)
not
null
default
'b '
);
show
create
table
t1
;
drop
table
t1
;
#
# Bug #2077
#
create
table
t1
(
a
enum
(
0xE4
,
'1'
,
'2'
)
not
null
default
0xE4
);
show
columns
from
t1
;
# should be fixed ASAP
show
create
table
t1
;
drop
table
t1
;
sql/sql_show.cc
View file @
3f4b1023
...
...
@@ -688,14 +688,14 @@ mysqld_show_fields(THD *thd, TABLE_LIST *table_list,const char *wild,
{
byte
*
pos
;
uint
flags
=
field
->
flags
;
String
type
(
tmp
,
sizeof
(
tmp
),
system_charset_info
);
String
type
(
tmp
,
sizeof
(
tmp
),
field
->
charset
()
);
uint
col_access
;
bool
null_default_value
=
0
;
protocol
->
prepare_for_resend
();
protocol
->
store
(
field
->
field_name
,
system_charset_info
);
field
->
sql_type
(
type
);
protocol
->
store
(
type
.
ptr
(),
type
.
length
(),
system_charset_info
);
protocol
->
store
(
type
.
ptr
(),
type
.
length
(),
type
.
charset
()
);
if
(
verbose
)
protocol
->
store
(
field
->
has_charset
()
?
field
->
charset
()
->
name
:
"NULL"
,
system_charset_info
);
...
...
@@ -713,7 +713,7 @@ mysqld_show_fields(THD *thd, TABLE_LIST *table_list,const char *wild,
null_default_value
=
1
;
if
(
!
null_default_value
&&
!
field
->
is_null
())
{
// Not null by default
type
.
set
(
tmp
,
sizeof
(
tmp
),
system_charset_info
);
type
.
set
(
tmp
,
sizeof
(
tmp
),
field
->
charset
()
);
field
->
val_str
(
&
type
,
&
type
);
protocol
->
store
(
type
.
ptr
(),
type
.
length
(),
type
.
charset
());
}
...
...
@@ -1114,7 +1114,7 @@ store_create_info(THD *thd, TABLE *table, String *packet)
packet
->
append
(
" default "
,
9
);
if
(
!
field
->
is_null
())
{
// Not null by default
type
.
set
(
tmp
,
sizeof
(
tmp
),
&
my_charset_bin
);
type
.
set
(
tmp
,
sizeof
(
tmp
),
field
->
charset
()
);
field
->
val_str
(
&
type
,
&
type
);
if
(
type
.
length
())
append_unescaped
(
packet
,
type
.
ptr
(),
type
.
length
());
...
...
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