mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Fix of LEFT JOIN optimizer bug, problem with key cache on Windows and
a lot of portability issues. Docs/manual.texi: Changed FOREIGN KEY to FOREIGN KEY constraint client/mysqladmin.c: Don't flush MASTER or SLAVE on refresh configure.in: Fix for hpux 11.0 extra/perror.c: New error message include/my_pthread.h: Portability fix for windows myisam/mi_locking.c: Ensure that locking doesn't interfere with pread/pwrite on windows myisam/sort.c: checked with purecover mysys/mf_tempfile.c: Fix for windows mysys/my_lock.c: Ensure that locking doesn't interfere with pread/pwrite on windows mysys/my_winthread.c: Portability fix sql-bench/Results/ATIS-mysql-NT_4.0: New benchmark runs sql-bench/Results/RUN-mysql-NT_4.0: New benchmark runs sql-bench/Results/alter-table-mysql-NT_4.0: New benchmark runs sql-bench/Results/big-tables-mysql-NT_4.0: New benchmark runs sql-bench/Results/connect-mysql-NT_4.0: New benchmark runs sql-bench/Results/create-mysql-NT_4.0: New benchmark runs sql-bench/Results/insert-mysql-NT_4.0: New benchmark runs sql-bench/Results/select-mysql-NT_4.0: New benchmark runs sql-bench/Results/wisconsin-mysql-NT_4.0: New benchmark runs sql-bench/crash-me.sh: Fixed things for PostgreSQL sql-bench/limits/mysql-3.23.cfg: Update for new crash-me sql-bench/limits/mysql.cfg: Update for new crash-me sql-bench/print-limit-table: Fixed position for alter table rename sql-bench/test-insert.sh: Fix for PostgreSQL sql/field.cc: Fix for default values in CREATE ... SELECT sql/field.h: Fix for default values in CREATE ... SELECT sql/log.cc: Fixed typo sql/log_event.cc: Portability fix sql/mysqlbinlog.cc: Portability fix sql/mysqld.cc: Don't turn of concurrent insert with --skip-new or --safe sql/sql_base.cc: Portability fix sql/sql_class.cc: Portability fix sql/sql_class.h: Portability fix sql/sql_parse.cc: Fix for --log-slow-queries sql/sql_repl.cc: Portability fixes sql/sql_select.cc: Fixed optimizer bug for LEFT JOIN sql/sql_select.h: Fixed optimizer bug for LEFT JOIN sql/sql_table.cc: Fix for default values in CREATE ... SELECT sql/sql_yacc.yy: Added optional AS to: CREATE TABLE foo [ AS ] SELECT ...
This commit is contained in:
@@ -620,7 +620,10 @@ TABLE *create_table_from_items(THD *thd, HA_CREATE_INFO *create_info,
|
||||
|
||||
Field *field=create_tmp_field(&tmp_table,item,item->type(),
|
||||
(Item_result_field***) 0, &tmp_field,0,0);
|
||||
if (!field || !(cr_field=new create_field(field,1)))
|
||||
if (!field ||
|
||||
!(cr_field=new create_field(field,(item->type() == Item::FIELD_ITEM ?
|
||||
((Item_field *)item)->field : NULL)
|
||||
)))
|
||||
DBUG_RETURN(0);
|
||||
extra_fields->push_back(cr_field);
|
||||
}
|
||||
@@ -833,9 +836,13 @@ static int mysql_admin_table(THD* thd, TABLE_LIST* tables,
|
||||
{
|
||||
char table_name[NAME_LEN*2+2];
|
||||
char* db = (table->db) ? table->db : thd->db;
|
||||
bool fatal_error=0;
|
||||
strxmov(table_name,db ? db : "",".",table->name,NullS);
|
||||
|
||||
if (operator_func == &handler::repair || operator_func == &handler::check)
|
||||
thd->open_options|= HA_OPEN_FOR_REPAIR;
|
||||
table->table = open_ltable(thd, table, lock_type);
|
||||
thd->open_options&= ~HA_OPEN_FOR_REPAIR;
|
||||
packet->length(0);
|
||||
if (operator_func == &handler::restore)
|
||||
{
|
||||
@@ -909,6 +916,7 @@ static int mysql_admin_table(THD* thd, TABLE_LIST* tables,
|
||||
case HA_ADMIN_CORRUPT:
|
||||
net_store_data(packet, "error");
|
||||
net_store_data(packet, "Corrupt");
|
||||
fatal_error=1;
|
||||
break;
|
||||
|
||||
case HA_ADMIN_INVALID:
|
||||
@@ -919,8 +927,11 @@ static int mysql_admin_table(THD* thd, TABLE_LIST* tables,
|
||||
default: // Probably HA_ADMIN_INTERNAL_ERROR
|
||||
net_store_data(packet, "error");
|
||||
net_store_data(packet, "Unknown - internal error during operation");
|
||||
fatal_error=1;
|
||||
break;
|
||||
}
|
||||
if (fatal_error)
|
||||
table->table->flush_version=0; // Force close of table
|
||||
close_thread_tables(thd);
|
||||
if (my_net_write(&thd->net, (char*) packet->ptr(),
|
||||
packet->length()))
|
||||
@@ -1150,7 +1161,7 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
|
||||
}
|
||||
else
|
||||
{ // Use old field value
|
||||
create_list.push_back(def=new create_field(field));
|
||||
create_list.push_back(def=new create_field(field,field));
|
||||
if (def->sql_type == FIELD_TYPE_TIMESTAMP)
|
||||
use_timestamp=1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user