Commit 2d108230 authored by monty@donna.mysql.com's avatar monty@donna.mysql.com
Browse files

SHOW [FULL] COLUMNS

Added timeouts to replication tests to handle concurrent inserts
parent 0f28f7a4
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -20129,7 +20129,7 @@ commands to examine and kill threads.
@example
   SHOW DATABASES [LIKE wild]
or SHOW [OPEN] TABLES [FROM db_name] [LIKE wild]
or SHOW COLUMNS FROM tbl_name [FROM db_name] [LIKE wild]
or SHOW [FULL] COLUMNS FROM tbl_name [FROM db_name] [LIKE wild]
or SHOW INDEX FROM tbl_name [FROM db_name]
or SHOW TABLE STATUS [FROM db_name] [LIKE wild]
or SHOW STATUS [LIKE wild]
@@ -20188,10 +20188,11 @@ db_name}.
the table cache. @xref{Table cache}.  The @code{Comment} field tells
how many times the table is @code{cached} and @code{in_use}.
@code{SHOW COLUMNS} lists the columns in a given table.  If the column
types are different than you expect them to be based on a @code{CREATE
TABLE} statement, note that @strong{MySQL} sometimes changes column
types.  @xref{Silent column changes}.
@code{SHOW COLUMNS} lists the columns in a given table.  If you specify
the @code{FULL} option, you will also get the privileges you have for
each column.  If the column types are different than you expect them to
be based on a @code{CREATE TABLE} statement, note that @strong{MySQL}
sometimes changes column types.  @xref{Silent column changes}.
The @code{DESCRIBE} statement provides information similar to
@code{SHOW COLUMNS}.
@@ -40712,6 +40713,9 @@ not yet 100 % confident in this code.
@appendixsubsec Changes in release 3.23.32
@itemize @bullet
@item
Added option @code{FULL} to @code{SHOW COLUMNS}. Now we only show the
privilege list for the columns if this option is given.
@item
Fixed bug in @code{SHOW LOGS} when there wheren't any BDB logs.
@item
Fixed a timing problem in replication that could delay sending an update
+1 −1
Original line number Diff line number Diff line
@@ -397,7 +397,7 @@ list_fields(MYSQL *mysql,const char *db,const char *table,
	    mysql_error(mysql));
    return 1;
  }
  end=strmov(strmov(query,"show columns from "),table);
  end=strmov(strmov(query,"show /*!32332 FULL */ columns from "),table);
  if (wild && wild[0])
    strxmov(end," like '",wild,"'",NullS);
  if (mysql_query(mysql,query) || !(result=mysql_store_result(mysql)))
+8 −0
Original line number Diff line number Diff line
@@ -12,6 +12,14 @@ test.t1 check status OK
Table	Op	Msg_type	Msg_text
test.t2	check	error	Table 't2' was not locked with LOCK TABLES
test.t1	check	status	OK
Field	Type	Null	Key	Default	Extra
a	int(11)		PRI	0	
b	int(11)		MUL	0	
c	int(11)			0	
Field	Type	Null	Key	Default	Extra	Privileges
a	int(11)		PRI	0		select,insert,update,references
b	int(11)		MUL	0		select,insert,update,references
c	int(11)			0		select,insert,update,references
Table	Non_unique	Key_name	Seq_in_index	Column_name	Collation	Cardinality	Sub_part	Packed	Comment
t1	0	PRIMARY	1	a	A	4	NULL	NULL	
t1	1	b	1	b	A	1	NULL	NULL	
+1 −1
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@ PRIMARY KEY (GROUP_ID,LANG_ID),
KEY NAME (NAME));
#show table status like "t1";
ALTER TABLE t1 CHANGE NAME NAME CHAR(80) not null;
SHOW COLUMNS FROM t1;
SHOW FULL COLUMNS FROM t1;
DROP TABLE t1;

#
+1 −0
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@ insert into foo values(1),(2);
save_master_pos;
connection slave;
sync_with_master;
sleep 1;
use test;
select * from foo;
select sum(length(word)) from t1;
Loading