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
c406150f
Commit
c406150f
authored
Nov 13, 2007
by
evgen@moonbone.local
Browse files
Options
Browse Files
Download
Plain Diff
Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into moonbone.local:/work/30081-bug-5.1-opt-mysql
parents
bc08ff04
4fa7ee92
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
36 additions
and
24 deletions
+36
-24
client/mysql.cc
client/mysql.cc
+1
-0
include/mysql_com.h
include/mysql_com.h
+1
-0
mysql-test/r/grant.result
mysql-test/r/grant.result
+1
-1
mysql-test/r/information_schema.result
mysql-test/r/information_schema.result
+4
-2
mysql-test/r/log_tables.result
mysql-test/r/log_tables.result
+2
-2
mysql-test/r/metadata.result
mysql-test/r/metadata.result
+1
-1
mysql-test/r/ps_2myisam.result
mysql-test/r/ps_2myisam.result
+1
-1
mysql-test/r/ps_3innodb.result
mysql-test/r/ps_3innodb.result
+1
-1
mysql-test/r/ps_4heap.result
mysql-test/r/ps_4heap.result
+1
-1
mysql-test/r/ps_5merge.result
mysql-test/r/ps_5merge.result
+2
-2
mysql-test/r/show_check.result
mysql-test/r/show_check.result
+2
-2
mysql-test/r/type_ranges.result
mysql-test/r/type_ranges.result
+2
-2
mysql-test/r/type_timestamp.result
mysql-test/r/type_timestamp.result
+4
-4
mysql-test/t/information_schema.test
mysql-test/t/information_schema.test
+2
-1
sql/field.cc
sql/field.cc
+4
-0
sql/sql_show.cc
sql/sql_show.cc
+6
-3
tests/mysql_client_test.c
tests/mysql_client_test.c
+1
-1
No files found.
client/mysql.cc
View file @
c406150f
...
@@ -2447,6 +2447,7 @@ static char *fieldflags2str(uint f) {
...
@@ -2447,6 +2447,7 @@ static char *fieldflags2str(uint f) {
ff2s_check_flag
(
GROUP
);
ff2s_check_flag
(
GROUP
);
ff2s_check_flag
(
UNIQUE
);
ff2s_check_flag
(
UNIQUE
);
ff2s_check_flag
(
BINCMP
);
ff2s_check_flag
(
BINCMP
);
ff2s_check_flag
(
ON_UPDATE_NOW
);
#undef ff2s_check_flag
#undef ff2s_check_flag
if
(
f
)
if
(
f
)
sprintf
(
s
,
" unknows=0x%04x"
,
f
);
sprintf
(
s
,
" unknows=0x%04x"
,
f
);
...
...
include/mysql_com.h
View file @
c406150f
...
@@ -94,6 +94,7 @@ enum enum_server_command
...
@@ -94,6 +94,7 @@ enum enum_server_command
#define TIMESTAMP_FLAG 1024
/* Field is a timestamp */
#define TIMESTAMP_FLAG 1024
/* Field is a timestamp */
#define SET_FLAG 2048
/* field is a set */
#define SET_FLAG 2048
/* field is a set */
#define NO_DEFAULT_VALUE_FLAG 4096
/* Field doesn't have default value */
#define NO_DEFAULT_VALUE_FLAG 4096
/* Field doesn't have default value */
#define ON_UPDATE_NOW_FLAG 8192
/* Field is set to NOW on UPDATE */
#define NUM_FLAG 32768
/* Field is num (for clients) */
#define NUM_FLAG 32768
/* Field is num (for clients) */
#define PART_KEY_FLAG 16384
/* Intern; Part of some key */
#define PART_KEY_FLAG 16384
/* Intern; Part of some key */
#define GROUP_FLAG 32768
/* Intern: Group field */
#define GROUP_FLAG 32768
/* Intern: Group field */
...
...
mysql-test/r/grant.result
View file @
c406150f
...
@@ -529,7 +529,7 @@ Db char(64) NO PRI
...
@@ -529,7 +529,7 @@ Db char(64) NO PRI
User char(16) NO PRI
User char(16) NO PRI
Table_name char(64) NO PRI
Table_name char(64) NO PRI
Grantor char(77) NO MUL
Grantor char(77) NO MUL
Timestamp timestamp NO CURRENT_TIMESTAMP
Timestamp timestamp NO CURRENT_TIMESTAMP
on update CURRENT_TIMESTAMP
Table_priv set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') NO
Table_priv set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') NO
Column_priv set('Select','Insert','Update','References') NO
Column_priv set('Select','Insert','Update','References') NO
use test;
use test;
...
...
mysql-test/r/information_schema.result
View file @
c406150f
...
@@ -1141,11 +1141,13 @@ DROP FUNCTION func2;
...
@@ -1141,11 +1141,13 @@ DROP FUNCTION func2;
select column_type, group_concat(table_schema, '.', table_name), count(*) as num
select column_type, group_concat(table_schema, '.', table_name), count(*) as num
from information_schema.columns where
from information_schema.columns where
table_schema='information_schema' and
table_schema='information_schema' and
(column_type = 'varchar(7)' or column_type = 'varchar(20)')
(column_type = 'varchar(7)' or column_type = 'varchar(20)'
or column_type = 'varchar(27)')
group by column_type order by num;
group by column_type order by num;
column_type group_concat(table_schema, '.', table_name) num
column_type group_concat(table_schema, '.', table_name) num
varchar(27) information_schema.COLUMNS 1
varchar(7) information_schema.ROUTINES,information_schema.VIEWS 2
varchar(7) information_schema.ROUTINES,information_schema.VIEWS 2
varchar(20) information_schema.
COLUMNS,information_schema.FILES,information_schema.FILES,information_schema.PLUGINS,information_schema.PLUGINS,information_schema.PLUGINS 6
varchar(20) information_schema.
FILES,information_schema.FILES,information_schema.PLUGINS,information_schema.PLUGINS,information_schema.PLUGINS 5
create table t1(f1 char(1) not null, f2 char(9) not null)
create table t1(f1 char(1) not null, f2 char(9) not null)
default character set utf8;
default character set utf8;
select CHARACTER_MAXIMUM_LENGTH, CHARACTER_OCTET_LENGTH from
select CHARACTER_MAXIMUM_LENGTH, CHARACTER_OCTET_LENGTH from
...
...
mysql-test/r/log_tables.result
View file @
c406150f
...
@@ -50,7 +50,7 @@ general_log CREATE TABLE `general_log` (
...
@@ -50,7 +50,7 @@ general_log CREATE TABLE `general_log` (
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='General log'
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='General log'
show fields from mysql.general_log;
show fields from mysql.general_log;
Field Type Null Key Default Extra
Field Type Null Key Default Extra
event_time timestamp NO CURRENT_TIMESTAMP
event_time timestamp NO CURRENT_TIMESTAMP
on update CURRENT_TIMESTAMP
user_host mediumtext NO NULL
user_host mediumtext NO NULL
thread_id int(11) NO NULL
thread_id int(11) NO NULL
server_id int(11) NO NULL
server_id int(11) NO NULL
...
@@ -73,7 +73,7 @@ slow_log CREATE TABLE `slow_log` (
...
@@ -73,7 +73,7 @@ slow_log CREATE TABLE `slow_log` (
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log'
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log'
show fields from mysql.slow_log;
show fields from mysql.slow_log;
Field Type Null Key Default Extra
Field Type Null Key Default Extra
start_time timestamp NO CURRENT_TIMESTAMP
start_time timestamp NO CURRENT_TIMESTAMP
on update CURRENT_TIMESTAMP
user_host mediumtext NO NULL
user_host mediumtext NO NULL
query_time time NO NULL
query_time time NO NULL
lock_time time NO NULL
lock_time time NO NULL
...
...
mysql-test/r/metadata.result
View file @
c406150f
...
@@ -21,7 +21,7 @@ def test t1 t1 g g 5 4 0 Y 32768 3 63
...
@@ -21,7 +21,7 @@ def test t1 t1 g g 5 4 0 Y 32768 3 63
def test t1 t1 h h 246 7 0 Y 0 4 63
def test t1 t1 h h 246 7 0 Y 0 4 63
def test t1 t1 i i 13 4 0 Y 32864 0 63
def test t1 t1 i i 13 4 0 Y 32864 0 63
def test t1 t1 j j 10 10 0 Y 128 0 63
def test t1 t1 j j 10 10 0 Y 128 0 63
def test t1 t1 k k 7 19 0 N
1249
0 63
def test t1 t1 k k 7 19 0 N
9441
0 63
def test t1 t1 l l 12 19 0 Y 128 0 63
def test t1 t1 l l 12 19 0 Y 128 0 63
def test t1 t1 m m 254 1 0 Y 256 0 8
def test t1 t1 m m 254 1 0 Y 256 0 8
def test t1 t1 n n 254 3 0 Y 2048 0 8
def test t1 t1 n n 254 3 0 Y 2048 0 8
...
...
mysql-test/r/ps_2myisam.result
View file @
c406150f
...
@@ -63,7 +63,7 @@ def test t9 t9 c11 c11 246 9 6 Y 0 4 63
...
@@ -63,7 +63,7 @@ def test t9 t9 c11 c11 246 9 6 Y 0 4 63
def test t9 t9 c12 c12 246 10 6 Y 0 4 63
def test t9 t9 c12 c12 246 10 6 Y 0 4 63
def test t9 t9 c13 c13 10 10 10 Y 128 0 63
def test t9 t9 c13 c13 10 10 10 Y 128 0 63
def test t9 t9 c14 c14 12 19 19 Y 128 0 63
def test t9 t9 c14 c14 12 19 19 Y 128 0 63
def test t9 t9 c15 c15 7 19 19 N
1249
0 63
def test t9 t9 c15 c15 7 19 19 N
9441
0 63
def test t9 t9 c16 c16 11 8 8 Y 128 0 63
def test t9 t9 c16 c16 11 8 8 Y 128 0 63
def test t9 t9 c17 c17 13 4 4 Y 32864 0 63
def test t9 t9 c17 c17 13 4 4 Y 32864 0 63
def test t9 t9 c18 c18 1 4 1 Y 32768 0 63
def test t9 t9 c18 c18 1 4 1 Y 32768 0 63
...
...
mysql-test/r/ps_3innodb.result
View file @
c406150f
...
@@ -63,7 +63,7 @@ def test t9 t9 c11 c11 246 9 6 Y 0 4 63
...
@@ -63,7 +63,7 @@ def test t9 t9 c11 c11 246 9 6 Y 0 4 63
def test t9 t9 c12 c12 246 10 6 Y 0 4 63
def test t9 t9 c12 c12 246 10 6 Y 0 4 63
def test t9 t9 c13 c13 10 10 10 Y 128 0 63
def test t9 t9 c13 c13 10 10 10 Y 128 0 63
def test t9 t9 c14 c14 12 19 19 Y 128 0 63
def test t9 t9 c14 c14 12 19 19 Y 128 0 63
def test t9 t9 c15 c15 7 19 19 N
1249
0 63
def test t9 t9 c15 c15 7 19 19 N
9441
0 63
def test t9 t9 c16 c16 11 8 8 Y 128 0 63
def test t9 t9 c16 c16 11 8 8 Y 128 0 63
def test t9 t9 c17 c17 13 4 4 Y 32864 0 63
def test t9 t9 c17 c17 13 4 4 Y 32864 0 63
def test t9 t9 c18 c18 1 4 1 Y 32768 0 63
def test t9 t9 c18 c18 1 4 1 Y 32768 0 63
...
...
mysql-test/r/ps_4heap.result
View file @
c406150f
...
@@ -64,7 +64,7 @@ def test t9 t9 c11 c11 246 9 6 Y 0 4 63
...
@@ -64,7 +64,7 @@ def test t9 t9 c11 c11 246 9 6 Y 0 4 63
def test t9 t9 c12 c12 246 10 6 Y 0 4 63
def test t9 t9 c12 c12 246 10 6 Y 0 4 63
def test t9 t9 c13 c13 10 10 10 Y 128 0 63
def test t9 t9 c13 c13 10 10 10 Y 128 0 63
def test t9 t9 c14 c14 12 19 19 Y 128 0 63
def test t9 t9 c14 c14 12 19 19 Y 128 0 63
def test t9 t9 c15 c15 7 19 19 N
1249
0 63
def test t9 t9 c15 c15 7 19 19 N
9441
0 63
def test t9 t9 c16 c16 11 8 8 Y 128 0 63
def test t9 t9 c16 c16 11 8 8 Y 128 0 63
def test t9 t9 c17 c17 13 4 4 Y 32864 0 63
def test t9 t9 c17 c17 13 4 4 Y 32864 0 63
def test t9 t9 c18 c18 1 4 1 Y 32768 0 63
def test t9 t9 c18 c18 1 4 1 Y 32768 0 63
...
...
mysql-test/r/ps_5merge.result
View file @
c406150f
...
@@ -106,7 +106,7 @@ def test t9 t9 c11 c11 246 9 6 Y 0 4 63
...
@@ -106,7 +106,7 @@ def test t9 t9 c11 c11 246 9 6 Y 0 4 63
def test t9 t9 c12 c12 246 10 6 Y 0 4 63
def test t9 t9 c12 c12 246 10 6 Y 0 4 63
def test t9 t9 c13 c13 10 10 10 Y 128 0 63
def test t9 t9 c13 c13 10 10 10 Y 128 0 63
def test t9 t9 c14 c14 12 19 19 Y 128 0 63
def test t9 t9 c14 c14 12 19 19 Y 128 0 63
def test t9 t9 c15 c15 7 19 19 N
1249
0 63
def test t9 t9 c15 c15 7 19 19 N
9441
0 63
def test t9 t9 c16 c16 11 8 8 Y 128 0 63
def test t9 t9 c16 c16 11 8 8 Y 128 0 63
def test t9 t9 c17 c17 13 4 4 Y 32864 0 63
def test t9 t9 c17 c17 13 4 4 Y 32864 0 63
def test t9 t9 c18 c18 1 4 1 Y 32768 0 63
def test t9 t9 c18 c18 1 4 1 Y 32768 0 63
...
@@ -3128,7 +3128,7 @@ def test t9 t9 c11 c11 246 9 6 Y 0 4 63
...
@@ -3128,7 +3128,7 @@ def test t9 t9 c11 c11 246 9 6 Y 0 4 63
def test t9 t9 c12 c12 246 10 6 Y 0 4 63
def test t9 t9 c12 c12 246 10 6 Y 0 4 63
def test t9 t9 c13 c13 10 10 10 Y 128 0 63
def test t9 t9 c13 c13 10 10 10 Y 128 0 63
def test t9 t9 c14 c14 12 19 19 Y 128 0 63
def test t9 t9 c14 c14 12 19 19 Y 128 0 63
def test t9 t9 c15 c15 7 19 19 N
1249
0 63
def test t9 t9 c15 c15 7 19 19 N
9441
0 63
def test t9 t9 c16 c16 11 8 8 Y 128 0 63
def test t9 t9 c16 c16 11 8 8 Y 128 0 63
def test t9 t9 c17 c17 13 4 4 Y 32864 0 63
def test t9 t9 c17 c17 13 4 4 Y 32864 0 63
def test t9 t9 c18 c18 1 4 1 Y 32768 0 63
def test t9 t9 c18 c18 1 4 1 Y 32768 0 63
...
...
mysql-test/r/show_check.result
View file @
c406150f
...
@@ -979,7 +979,7 @@ def COLUMNS CHARACTER_SET_NAME CHARACTER_SET_NAME 253 192 0 Y 0 0 33
...
@@ -979,7 +979,7 @@ def COLUMNS CHARACTER_SET_NAME CHARACTER_SET_NAME 253 192 0 Y 0 0 33
def COLUMNS COLLATION_NAME COLLATION_NAME 253 192 0 Y 0 0 33
def COLUMNS COLLATION_NAME COLLATION_NAME 253 192 0 Y 0 0 33
def COLUMNS COLUMN_TYPE COLUMN_TYPE 252 589815 7 N 17 0 33
def COLUMNS COLUMN_TYPE COLUMN_TYPE 252 589815 7 N 17 0 33
def COLUMNS COLUMN_KEY COLUMN_KEY 253 9 3 N 1 0 33
def COLUMNS COLUMN_KEY COLUMN_KEY 253 9 3 N 1 0 33
def COLUMNS EXTRA EXTRA 253
60
0 N 1 0 33
def COLUMNS EXTRA EXTRA 253
81
0 N 1 0 33
def COLUMNS PRIVILEGES PRIVILEGES 253 240 31 N 1 0 33
def COLUMNS PRIVILEGES PRIVILEGES 253 240 31 N 1 0 33
def COLUMNS COLUMN_COMMENT COLUMN_COMMENT 253 765 0 N 1 0 33
def COLUMNS COLUMN_COMMENT COLUMN_COMMENT 253 765 0 N 1 0 33
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT
...
@@ -998,7 +998,7 @@ def COLUMNS COLUMN_TYPE Type 252 589815 7 N 17 0 33
...
@@ -998,7 +998,7 @@ def COLUMNS COLUMN_TYPE Type 252 589815 7 N 17 0 33
def COLUMNS IS_NULLABLE Null 253 9 2 N 1 0 33
def COLUMNS IS_NULLABLE Null 253 9 2 N 1 0 33
def COLUMNS COLUMN_KEY Key 253 9 3 N 1 0 33
def COLUMNS COLUMN_KEY Key 253 9 3 N 1 0 33
def COLUMNS COLUMN_DEFAULT Default 252 589815 0 Y 16 0 33
def COLUMNS COLUMN_DEFAULT Default 252 589815 0 Y 16 0 33
def COLUMNS EXTRA Extra 253
60
0 N 1 0 33
def COLUMNS EXTRA Extra 253
81
0 N 1 0 33
Field Type Null Key Default Extra
Field Type Null Key Default Extra
c int(11) NO PRI NULL
c int(11) NO PRI NULL
----------------------------------------------------------------
----------------------------------------------------------------
...
...
mysql-test/r/type_ranges.result
View file @
c406150f
...
@@ -57,7 +57,7 @@ ushort smallint(5) unsigned zerofill NULL NO MUL 00000 #
...
@@ -57,7 +57,7 @@ ushort smallint(5) unsigned zerofill NULL NO MUL 00000 #
umedium mediumint(8) unsigned NULL NO MUL 0 #
umedium mediumint(8) unsigned NULL NO MUL 0 #
ulong int(11) unsigned NULL NO MUL 0 #
ulong int(11) unsigned NULL NO MUL 0 #
ulonglong bigint(13) unsigned NULL NO MUL 0 #
ulonglong bigint(13) unsigned NULL NO MUL 0 #
time_stamp timestamp NULL NO CURRENT_TIMESTAMP #
time_stamp timestamp NULL NO CURRENT_TIMESTAMP
on update CURRENT_TIMESTAMP
#
date_field date NULL YES NULL #
date_field date NULL YES NULL #
time_field time NULL YES NULL #
time_field time NULL YES NULL #
date_time datetime NULL YES NULL #
date_time datetime NULL YES NULL #
...
@@ -225,7 +225,7 @@ ushort smallint(5) unsigned zerofill NULL NO 00000 #
...
@@ -225,7 +225,7 @@ ushort smallint(5) unsigned zerofill NULL NO 00000 #
umedium mediumint(8) unsigned NULL NO MUL 0 #
umedium mediumint(8) unsigned NULL NO MUL 0 #
ulong int(11) unsigned NULL NO MUL 0 #
ulong int(11) unsigned NULL NO MUL 0 #
ulonglong bigint(13) unsigned NULL NO MUL 0 #
ulonglong bigint(13) unsigned NULL NO MUL 0 #
time_stamp timestamp NULL NO CURRENT_TIMESTAMP #
time_stamp timestamp NULL NO CURRENT_TIMESTAMP
on update CURRENT_TIMESTAMP
#
date_field char(10) latin1_swedish_ci YES NULL #
date_field char(10) latin1_swedish_ci YES NULL #
time_field time NULL YES NULL #
time_field time NULL YES NULL #
date_time datetime NULL YES NULL #
date_time datetime NULL YES NULL #
...
...
mysql-test/r/type_timestamp.result
View file @
c406150f
...
@@ -251,7 +251,7 @@ t1 CREATE TABLE `t1` (
...
@@ -251,7 +251,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
) ENGINE=MyISAM DEFAULT CHARSET=latin1
show columns from t1;
show columns from t1;
Field Type Null Key Default Extra
Field Type Null Key Default Extra
t1 timestamp NO 2003-01-01 00:00:00
t1 timestamp NO 2003-01-01 00:00:00
on update CURRENT_TIMESTAMP
t2 datetime YES NULL
t2 datetime YES NULL
drop table t1;
drop table t1;
create table t1 (t1 timestamp default now() on update now(), t2 datetime);
create table t1 (t1 timestamp default now() on update now(), t2 datetime);
...
@@ -276,7 +276,7 @@ t1 CREATE TABLE `t1` (
...
@@ -276,7 +276,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
) ENGINE=MyISAM DEFAULT CHARSET=latin1
show columns from t1;
show columns from t1;
Field Type Null Key Default Extra
Field Type Null Key Default Extra
t1 timestamp NO CURRENT_TIMESTAMP
t1 timestamp NO CURRENT_TIMESTAMP
on update CURRENT_TIMESTAMP
t2 datetime YES NULL
t2 datetime YES NULL
drop table t1;
drop table t1;
create table t1 (t1 timestamp, t2 datetime, t3 timestamp);
create table t1 (t1 timestamp, t2 datetime, t3 timestamp);
...
@@ -302,7 +302,7 @@ t1 CREATE TABLE `t1` (
...
@@ -302,7 +302,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
) ENGINE=MyISAM DEFAULT CHARSET=latin1
show columns from t1;
show columns from t1;
Field Type Null Key Default Extra
Field Type Null Key Default Extra
t1 timestamp NO CURRENT_TIMESTAMP
t1 timestamp NO CURRENT_TIMESTAMP
on update CURRENT_TIMESTAMP
t2 datetime YES NULL
t2 datetime YES NULL
t3 timestamp NO 0000-00-00 00:00:00
t3 timestamp NO 0000-00-00 00:00:00
drop table t1;
drop table t1;
...
@@ -328,7 +328,7 @@ t1 CREATE TABLE `t1` (
...
@@ -328,7 +328,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
) ENGINE=MyISAM DEFAULT CHARSET=latin1
show columns from t1;
show columns from t1;
Field Type Null Key Default Extra
Field Type Null Key Default Extra
t1 timestamp NO CURRENT_TIMESTAMP
t1 timestamp NO CURRENT_TIMESTAMP
on update CURRENT_TIMESTAMP
t2 datetime YES NULL
t2 datetime YES NULL
truncate table t1;
truncate table t1;
insert into t1 values ('2004-04-01 00:00:00', '2004-04-01 00:00:00');
insert into t1 values ('2004-04-01 00:00:00', '2004-04-01 00:00:00');
...
...
mysql-test/t/information_schema.test
View file @
c406150f
...
@@ -807,7 +807,8 @@ DROP FUNCTION func2;
...
@@ -807,7 +807,8 @@ DROP FUNCTION func2;
select
column_type
,
group_concat
(
table_schema
,
'.'
,
table_name
),
count
(
*
)
as
num
select
column_type
,
group_concat
(
table_schema
,
'.'
,
table_name
),
count
(
*
)
as
num
from
information_schema
.
columns
where
from
information_schema
.
columns
where
table_schema
=
'information_schema'
and
table_schema
=
'information_schema'
and
(
column_type
=
'varchar(7)'
or
column_type
=
'varchar(20)'
)
(
column_type
=
'varchar(7)'
or
column_type
=
'varchar(20)'
or
column_type
=
'varchar(27)'
)
group
by
column_type
order
by
num
;
group
by
column_type
order
by
num
;
#
#
...
...
sql/field.cc
View file @
c406150f
...
@@ -4616,6 +4616,8 @@ Field_timestamp::Field_timestamp(uchar *ptr_arg, uint32 len_arg,
...
@@ -4616,6 +4616,8 @@ Field_timestamp::Field_timestamp(uchar *ptr_arg, uint32 len_arg,
/* This timestamp has auto-update */
/* This timestamp has auto-update */
share
->
timestamp_field
=
this
;
share
->
timestamp_field
=
this
;
flags
|=
TIMESTAMP_FLAG
;
flags
|=
TIMESTAMP_FLAG
;
if
(
unireg_check
!=
TIMESTAMP_DN_FIELD
)
flags
|=
ON_UPDATE_NOW_FLAG
;
}
}
}
}
...
@@ -4629,6 +4631,8 @@ Field_timestamp::Field_timestamp(bool maybe_null_arg,
...
@@ -4629,6 +4631,8 @@ Field_timestamp::Field_timestamp(bool maybe_null_arg,
{
{
/* For 4.0 MYD and 4.0 InnoDB compatibility */
/* For 4.0 MYD and 4.0 InnoDB compatibility */
flags
|=
ZEROFILL_FLAG
|
UNSIGNED_FLAG
;
flags
|=
ZEROFILL_FLAG
|
UNSIGNED_FLAG
;
if
(
unireg_check
!=
TIMESTAMP_DN_FIELD
)
flags
|=
ON_UPDATE_NOW_FLAG
;
}
}
...
...
sql/sql_show.cc
View file @
c406150f
...
@@ -3777,8 +3777,11 @@ static int get_schema_column_record(THD *thd, TABLE_LIST *tables,
...
@@ -3777,8 +3777,11 @@ static int get_schema_column_record(THD *thd, TABLE_LIST *tables,
end
=
tmp
;
end
=
tmp
;
if
(
field
->
unireg_check
==
Field
::
NEXT_NUMBER
)
if
(
field
->
unireg_check
==
Field
::
NEXT_NUMBER
)
end
=
strmov
(
tmp
,
"auto_increment"
);
table
->
field
[
16
]
->
store
(
STRING_WITH_LEN
(
"auto_increment"
),
cs
);
table
->
field
[
16
]
->
store
(
tmp
,
(
uint
)
(
end
-
tmp
),
cs
);
if
(
show_table
->
timestamp_field
==
field
&&
field
->
unireg_check
!=
Field
::
TIMESTAMP_DN_FIELD
)
table
->
field
[
16
]
->
store
(
STRING_WITH_LEN
(
"on update CURRENT_TIMESTAMP"
),
cs
);
table
->
field
[
18
]
->
store
(
field
->
comment
.
str
,
field
->
comment
.
length
,
cs
);
table
->
field
[
18
]
->
store
(
field
->
comment
.
str
,
field
->
comment
.
length
,
cs
);
if
(
schema_table_store_record
(
thd
,
table
))
if
(
schema_table_store_record
(
thd
,
table
))
...
@@ -5981,7 +5984,7 @@ ST_FIELD_INFO columns_fields_info[]=
...
@@ -5981,7 +5984,7 @@ ST_FIELD_INFO columns_fields_info[]=
{
"COLLATION_NAME"
,
64
,
MYSQL_TYPE_STRING
,
0
,
1
,
"Collation"
,
OPEN_FRM_ONLY
},
{
"COLLATION_NAME"
,
64
,
MYSQL_TYPE_STRING
,
0
,
1
,
"Collation"
,
OPEN_FRM_ONLY
},
{
"COLUMN_TYPE"
,
65535
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Type"
,
OPEN_FRM_ONLY
},
{
"COLUMN_TYPE"
,
65535
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Type"
,
OPEN_FRM_ONLY
},
{
"COLUMN_KEY"
,
3
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Key"
,
OPEN_FRM_ONLY
},
{
"COLUMN_KEY"
,
3
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Key"
,
OPEN_FRM_ONLY
},
{
"EXTRA"
,
2
0
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Extra"
,
OPEN_FRM_ONLY
},
{
"EXTRA"
,
2
7
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Extra"
,
OPEN_FRM_ONLY
},
{
"PRIVILEGES"
,
80
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Privileges"
,
OPEN_FRM_ONLY
},
{
"PRIVILEGES"
,
80
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Privileges"
,
OPEN_FRM_ONLY
},
{
"COLUMN_COMMENT"
,
255
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Comment"
,
OPEN_FRM_ONLY
},
{
"COLUMN_COMMENT"
,
255
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Comment"
,
OPEN_FRM_ONLY
},
{
0
,
0
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
{
0
,
0
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
...
...
tests/mysql_client_test.c
View file @
c406150f
...
@@ -7787,7 +7787,7 @@ static void test_explain_bug()
...
@@ -7787,7 +7787,7 @@ static void test_explain_bug()
verify_prepare_field
(
result
,
5
,
"Extra"
,
"EXTRA"
,
verify_prepare_field
(
result
,
5
,
"Extra"
,
"EXTRA"
,
mysql_get_server_version
(
mysql
)
<=
50000
?
mysql_get_server_version
(
mysql
)
<=
50000
?
MYSQL_TYPE_STRING
:
MYSQL_TYPE_VAR_STRING
,
MYSQL_TYPE_STRING
:
MYSQL_TYPE_VAR_STRING
,
0
,
0
,
""
,
2
0
,
0
);
0
,
0
,
""
,
2
7
,
0
);
mysql_free_result
(
result
);
mysql_free_result
(
result
);
mysql_stmt_close
(
stmt
);
mysql_stmt_close
(
stmt
);
...
...
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