Selasa, 06 Januari 2009

Cara membuat table dengan my sql

escription:
SHOW CREATE TABLE on any INFORMATION_SCHEMA table contains a MAX_ROWS=# where # is a
garbage (random) number.

How to repeat:
mysql> SHOW CREATE TABLE INFORMATION_SCHEMA.SCHEMATA;
===
CREATE TEMPORARY TABLE `SCHEMATA` (
`CATALOG_NAME` varchar(4096) default NULL,
`SCHEMA_NAME` varchar(64) NOT NULL default '',
`DEFAULT_CHARACTER_SET_NAME` varchar(64) NOT NULL default '',
`SQL_PATH` varchar(4096) default NULL
) ENGINE=MEMORY DEFAULT CHARSET=utf8 MAX_ROWS=671
===

Suggested fix:
The problem will be an unitialized variable.
This would only show up with virtual schemas as real tables will get their info from a
.frm file.

[24 Mar 2005 14:16] Sergey Gluhov

In this case the max_rows value is calculated using the following method
(sql_select.cc, create_tmp_table() function):

max_rows= min(thd->variables.tmp_table_size,
thd->variables.max_heap_table_size) :
thd->variables.tmp_table_size)/ table->s->reclength);

Tidak ada komentar:

Poskan Komentar