summaryrefslogtreecommitdiff
path: root/sql/sql_parse.cc
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2004-06-21 10:24:40 +0300
committerunknown <monty@mysql.com>2004-06-21 10:24:40 +0300
commit028dfdb3f723aed827475fe4ddcc9377f7805567 (patch)
tree0e02d42f7a1f1f532c1d780d1c57097202d7369d /sql/sql_parse.cc
parenta3c22ae7d2d719e6e4ba052056c1dba316390985 (diff)
parentb5dfd05662464d2c19da349942914cce897cdbaf (diff)
downloadmariadb-git-028dfdb3f723aed827475fe4ddcc9377f7805567.tar.gz
merge
BitKeeper/etc/ignore: auto-union BitKeeper/etc/logging_ok: auto-union Build-tools/Do-compile: Auto merged include/my_global.h: Auto merged innobase/row/row0ins.c: Auto merged libmysql/libmysql.c: Auto merged libmysqld/Makefile.am: Auto merged mysql-test/mysql-test-run.sh: Auto merged mysql-test/r/func_time.result: Auto merged mysql-test/r/subselect.result: Auto merged scripts/mysql_install_db.sh: Auto merged sql/field.cc: Auto merged sql/field.h: Auto merged sql/mysqld.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_select.cc: Auto merged innobase/fil/fil0fil.c: merge (Use heikki's code)
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r--sql/sql_parse.cc12
1 files changed, 9 insertions, 3 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index cfa6d6bb079..77ce9be45fb 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -1588,7 +1588,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
break;
}
mysql_log.write(thd,command,db);
- mysql_rm_db(thd,alias,0,0);
+ mysql_rm_db(thd, (lower_case_table_names == 2 ? alias : db), 0, 0);
break;
}
#ifndef EMBEDDED_LIBRARY
@@ -3135,7 +3135,8 @@ purposes internal to the MySQL server", MYF(0));
send_error(thd,ER_LOCK_OR_ACTIVE_TRANSACTION);
goto error;
}
- res=mysql_rm_db(thd,alias,lex->drop_if_exists,0);
+ res=mysql_rm_db(thd, (lower_case_table_names == 2 ? alias : lex->name),
+ lex->drop_if_exists, 0);
break;
}
case SQLCOM_ALTER_DB:
@@ -4207,7 +4208,12 @@ bool add_field_to_list(THD *thd, char *field_name, enum_field_types type,
break;
case FIELD_TYPE_DECIMAL:
if (!length)
- new_field->length= 10; // Default length for DECIMAL
+ {
+ if ((new_field->length= new_field->decimals))
+ new_field->length++;
+ else
+ new_field->length= 10; // Default length for DECIMAL
+ }
if (new_field->length < MAX_FIELD_WIDTH) // Skip wrong argument
{
new_field->length+=sign_len;