Fix usage of mysqld option --new, --old, --safe and --skip_new to not disable things that are proven stable or enable things that are not usefull.

sql/field.cc:
  Remove feature of 'new_mode' that was never implemtented in a newer MySQL version.
sql/item_cmpfunc.cc:
  Boyer more is stable; Don't have to be protected by --skip-new anymore
sql/mysqld.cc:
  Don't disable some proven stable functions with --skip-new
sql/records.cc:
  Don't disable record caching with --safe-mode anymore
sql/sql_delete.cc:
  Do fast truncate even if --skip-new or --safe is used
sql/sql_parse.cc:
  Use always mysql_optimizer() for optimizer (instead of mysql_recreate_table() in case of --safe or --skip-new)
sql/sql_select.cc:
  Don't disable 'only_eq_ref_tables' if --safe is used.
sql/sql_yacc.yy:
  Removed not meaningfull test of --old
This commit is contained in:
Michael Widenius 2010-09-23 19:30:44 +03:00
commit 5ce4825b63
8 changed files with 4 additions and 18 deletions

View file

@ -6703,8 +6703,7 @@ void Field_string::sql_type(String &res) const
length= cs->cset->snprintf(cs,(char*) res.ptr(),
res.alloced_length(), "%s(%d)",
((type() == MYSQL_TYPE_VAR_STRING &&
!thd->variables.new_mode) ?
(type() == MYSQL_TYPE_VAR_STRING ?
(has_charset() ? "varchar" : "varbinary") :
(has_charset() ? "char" : "binary")),
(int) field_length / charset()->mbmaxlen);