1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Update of interface for BDB tables.

Fixed bug in SHOW CREATE TABLE


Build-tools/mysql-copyright:
  Shorter error message
Docs/manual.texi:
  Update of myisamchk stuff
acinclude.m4:
  Force use of Berkeley DB 3.2.3 or newer
include/m_string.h:
  Changed type of arguments to bmove()
myisam/mi_check.c:
  Nicer error message
mysql.proj:
  Updated
sql/ha_berkeley.cc:
  Use new key compare interface
sql/sql_select.cc:
  Call join_free() early to free all cursors
sql/sql_show.cc:
  Fixed CREATE TABLE when used with auto_increment columns
strings/bmove.c:
  Changed type of arguments to bmove()
This commit is contained in:
unknown
2000-10-24 02:39:54 +03:00
parent a468c8f9a9
commit 101a583f0e
10 changed files with 82 additions and 40 deletions

View File

@@ -718,17 +718,16 @@ store_create_info(THD *thd, TABLE *table, String *packet)
field->sql_type(type);
packet->append(type.ptr(),type.length());
bool null_default_value = (field->type() == FIELD_TYPE_TIMESTAMP ||
field->unireg_check == Field::NEXT_NUMBER);
bool has_default = (field->type() != FIELD_TYPE_BLOB);
bool has_default = (field->type() != FIELD_TYPE_BLOB &&
field->type() != FIELD_TYPE_TIMESTAMP &&
field->unireg_check != Field::NEXT_NUMBER);
if (flags & NOT_NULL_FLAG)
packet->append(" NOT NULL", 9);
if((flags & NOT_NULL_FLAG) && !null_default_value)
packet->append(" NOT NULL", 9);
if(has_default)
if (has_default)
{
packet->append(" default ", 9);
if (!null_default_value && !field->is_null())
if (!field->is_null())
{ // Not null by default
type.set(tmp,sizeof(tmp));
field->val_str(&type,&type);
@@ -736,7 +735,7 @@ store_create_info(THD *thd, TABLE *table, String *packet)
packet->append(type.ptr(),type.length());
packet->append('\'');
}
else if (field->maybe_null() || null_default_value)
else if (field->maybe_null())
packet->append("NULL", 4); // Null as default
else
packet->append(tmp,0);