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
11e56722
Commit
11e56722
authored
Jun 21, 2001
by
monty@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UNIQUE keys are not anymore shown as PRIMARY KEY
parent
34b528f1
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
4 deletions
+30
-4
Docs/manual.texi
Docs/manual.texi
+3
-0
mysql-test/r/show_check.result
mysql-test/r/show_check.result
+10
-0
mysql-test/t/show_check.test
mysql-test/t/show_check.test
+7
-0
sql/mysqld.cc
sql/mysqld.cc
+3
-1
sql/sql_show.cc
sql/sql_show.cc
+7
-3
No files found.
Docs/manual.texi
View file @
11e56722
...
...
@@ -46425,6 +46425,9 @@ not yet 100% confident in this code.
Added option @code{--warnings} to @code{mysqld}. Now @code{mysqld}
only prints the error @code{Aborted connection} if this option is used.
@item
Fixed problem with @code{SHOW CREATE TABLE} when you didn't have a
@code{PRIMARY KEY}.
@item
Fixed properly the rename of @code{innodb_unix_file_flush_method} to
@code{innodb_flush_method}.
@item
mysql-test/r/show_check.result
View file @
11e56722
...
...
@@ -80,3 +80,13 @@ t1 CREATE TABLE `t1` (
`test_set` set('val1','val2','val3') NOT NULL default '',
`name` char(20) default 'O''Brien'
) TYPE=MyISAM COMMENT='it''s a table'
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL default '0',
UNIQUE KEY `aa` (`a`)
) TYPE=MyISAM
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL default '0',
PRIMARY KEY (`a`)
) TYPE=MyISAM
mysql-test/t/show_check.test
View file @
11e56722
...
...
@@ -65,3 +65,10 @@ create table t1 (
)
comment
=
'it\'s a table'
;
show
create
table
t1
;
drop
table
t1
;
create
table
t1
(
a
int
not
null
,
unique
aa
(
a
));
show
create
table
t1
;
drop
table
t1
;
create
table
t1
(
a
int
not
null
,
primary
key
(
a
));
show
create
table
t1
;
drop
table
t1
;
sql/mysqld.cc
View file @
11e56722
...
...
@@ -1190,7 +1190,7 @@ Some pointers may be invalid and cause the dump to abort...\n");
fprintf
(
stderr
,
"
\n
Successfully dumped variables, if you ran with --log, take a look at the
\n
\
details of what thread %ld did to cause the crash. In some cases of really
\n
\
bad corruption, the
above values
may be invalid
\n\n
"
,
bad corruption, the
values shown above
may be invalid
\n\n
"
,
thd
->
thread_id
);
}
fprintf
(
stderr
,
"\
...
...
@@ -3011,6 +3011,8 @@ static void usage(void)
Start without grant tables. This gives all users
\n
\
FULL ACCESS to all tables!
\n
\
--safe-mode Skip some optimize stages (for testing)
\n
\
--safe-show-database Don't show databases for which the user has no
\n
\
privileges
\n
\
--skip-concurrent-insert
\n
\
Don't use concurrent insert with MyISAM
\n
\
--skip-delay-key-write
\n
\
...
...
sql/sql_show.cc
View file @
11e56722
...
...
@@ -839,18 +839,22 @@ store_create_info(THD *thd, TABLE *table, String *packet)
for
(
uint
i
=
0
;
i
<
table
->
keys
;
i
++
,
key_info
++
)
{
KEY_PART_INFO
*
key_part
=
key_info
->
key_part
;
bool
found_primary
=
0
;
packet
->
append
(
",
\n
"
,
4
);
KEY_PART_INFO
*
key_part
=
key_info
->
key_part
;
if
(
i
==
primary_key
)
if
(
i
==
primary_key
&&
!
strcmp
(
key_info
->
name
,
"PRIMARY"
))
{
found_primary
=
1
;
packet
->
append
(
"PRIMARY "
,
8
);
}
else
if
(
key_info
->
flags
&
HA_NOSAME
)
packet
->
append
(
"UNIQUE "
,
7
);
else
if
(
key_info
->
flags
&
HA_FULLTEXT
)
packet
->
append
(
"FULLTEXT "
,
9
);
packet
->
append
(
"KEY "
,
4
);
if
(
i
!=
primary_ke
y
)
if
(
!
found_primar
y
)
append_identifier
(
thd
,
packet
,
key_info
->
name
);
packet
->
append
(
" ("
,
2
);
...
...
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