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
2c92b3f8
Commit
2c92b3f8
authored
Dec 24, 2004
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for bug: #7218: information_schema: errors in "tables"
parent
24ea59cf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
4 deletions
+23
-4
mysql-test/r/information_schema.result
mysql-test/r/information_schema.result
+8
-0
mysql-test/t/information_schema.test
mysql-test/t/information_schema.test
+7
-0
sql/sql_show.cc
sql/sql_show.cc
+8
-4
No files found.
mysql-test/r/information_schema.result
View file @
2c92b3f8
...
...
@@ -653,3 +653,11 @@ where table_schema="information_schema" and table_name="COLUMNS" and
column_type
varchar(64)
varchar(64)
select TABLE_ROWS from information_schema.tables where
table_schema="information_schema" and table_name="COLUMNS";
TABLE_ROWS
NULL
select table_type from information_schema.tables
where table_schema="mysql" and table_name="user";
table_type
BASE TABLE
mysql-test/t/information_schema.test
View file @
2c92b3f8
...
...
@@ -339,3 +339,10 @@ select column_type from information_schema.columns
where
table_schema
=
"information_schema"
and
table_name
=
"COLUMNS"
and
(
column_name
=
"character_set_name"
or
column_name
=
"collation_name"
);
#
# Bug#2718 information_schema: errors in "tables"
#
select
TABLE_ROWS
from
information_schema
.
tables
where
table_schema
=
"information_schema"
and
table_name
=
"COLUMNS"
;
select
table_type
from
information_schema
.
tables
where
table_schema
=
"mysql"
and
table_name
=
"user"
;
sql/sql_show.cc
View file @
2c92b3f8
...
...
@@ -2249,14 +2249,14 @@ static int get_schema_tables_record(THD *thd, struct st_table_list *tables,
TABLE
*
show_table
=
tables
->
table
;
handler
*
file
=
show_table
->
file
;
file
->
info
(
HA_STATUS_VARIABLE
|
HA_STATUS_TIME
|
HA_STATUS_NO_LOCK
);
if
(
table
->
tmp_table
==
TMP_TABLE
)
if
(
show_
table
->
tmp_table
==
TMP_TABLE
)
table
->
field
[
3
]
->
store
(
"TEMPORARY"
,
9
,
cs
);
else
table
->
field
[
3
]
->
store
(
"BASE TABLE"
,
10
,
cs
);
for
(
int
i
=
4
;
i
<
20
;
i
++
)
{
if
((
i
>
12
&&
i
<
17
)
||
i
==
18
)
if
(
i
==
7
||
(
i
>
12
&&
i
<
17
)
||
i
==
18
)
continue
;
table
->
field
[
i
]
->
set_notnull
();
}
...
...
@@ -2268,7 +2268,11 @@ static int get_schema_tables_record(THD *thd, struct st_table_list *tables,
(
show_table
->
db_options_in_use
&
HA_OPTION_PACK_RECORD
)
?
"Dynamic"
:
"Fixed"
);
table
->
field
[
6
]
->
store
(
tmp_buff
,
strlen
(
tmp_buff
),
cs
);
table
->
field
[
7
]
->
store
((
longlong
)
file
->
records
);
if
(
!
tables
->
schema_table
)
{
table
->
field
[
7
]
->
store
((
longlong
)
file
->
records
);
table
->
field
[
7
]
->
set_notnull
();
}
table
->
field
[
8
]
->
store
((
longlong
)
file
->
mean_rec_length
);
table
->
field
[
9
]
->
store
((
longlong
)
file
->
data_file_length
);
if
(
file
->
max_data_file_length
)
...
...
@@ -3481,7 +3485,7 @@ ST_FIELD_INFO tables_fields_info[]=
{
"CREATE_TIME"
,
0
,
MYSQL_TYPE_TIMESTAMP
,
0
,
1
,
"Create_time"
},
{
"UPDATE_TIME"
,
0
,
MYSQL_TYPE_TIMESTAMP
,
0
,
1
,
"Update_time"
},
{
"CHECK_TIME"
,
0
,
MYSQL_TYPE_TIMESTAMP
,
0
,
1
,
"Check_time"
},
{
"
COLLATION"
,
60
,
MYSQL_TYPE_STRING
,
0
,
1
,
"Collation"
},
{
"
TABLE_COLLATION"
,
64
,
MYSQL_TYPE_STRING
,
0
,
1
,
"Collation"
},
{
"CHECKSUM"
,
21
,
MYSQL_TYPE_LONG
,
0
,
1
,
"Checksum"
},
{
"CREATE_OPTIONS"
,
255
,
MYSQL_TYPE_STRING
,
0
,
1
,
"Create_options"
},
{
"TABLE_COMMENT"
,
80
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Comment"
},
...
...
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