1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Merge 4.1 into 5.0 (first pass).

BitKeeper/etc/ignore:
  auto-union
BitKeeper/etc/logging_ok:
  auto-union
BitKeeper/deleted/.del-cron-build:
  Delete: netware/BUILD/cron-build
BitKeeper/deleted/.del-crontab:
  Delete: netware/BUILD/crontab
BitKeeper/triggers/post-commit:
  Auto merged
client/mysql.cc:
  Auto merged
client/mysqltest.c:
  Auto merged
configure.in:
  Auto merged
include/my_global.h:
  Auto merged
include/my_pthread.h:
  Auto merged
include/mysql_com.h:
  Auto merged
libmysqld/Makefile.am:
  Auto merged
myisam/mi_check.c:
  Auto merged
myisam/myisamchk.c:
  Auto merged
myisam/myisamdef.h:
  Auto merged
myisam/sort.c:
  Auto merged
mysql-test/r/connect.result:
  Auto merged
mysql-test/r/rpl_temporary.result:
  Auto merged
mysql-test/r/show_check.result:
  Auto merged
mysql-test/r/variables.result:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
netware/BUILD/compile-AUTOTOOLS:
  Auto merged
netware/BUILD/compile-linux-tools:
  Auto merged
netware/BUILD/compile-netware-END:
  Auto merged
netware/BUILD/compile-netware-START:
  Auto merged
netware/BUILD/compile-netware-all:
  Auto merged
netware/BUILD/compile-netware-debug:
  Auto merged
netware/BUILD/compile-netware-standard:
  Auto merged
netware/BUILD/mwasmnlm:
  Auto merged
netware/BUILD/mwccnlm:
  Auto merged
netware/BUILD/mwldnlm:
  Auto merged
netware/BUILD/nwbootstrap:
  Auto merged
sql/filesort.cc:
  Auto merged
sql/ha_myisam.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_create.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/log.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/protocol.cc:
  Auto merged
sql/records.cc:
  Auto merged
sql/repl_failsafe.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_db.cc:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_derived.cc:
  Auto merged
sql/sql_error.cc:
  Auto merged
sql/sql_load.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_repl.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_union.cc:
  Auto merged
This commit is contained in:
unknown
2003-07-08 17:50:23 +02:00
119 changed files with 6324 additions and 929 deletions

View File

@@ -68,7 +68,7 @@ int mysql_update(THD *thd,
SQL_SELECT *select;
READ_RECORD info;
TABLE_LIST *update_table_list= ((TABLE_LIST*)
thd->lex.select_lex.table_list.first);
thd->lex->select_lex.table_list.first);
TABLE_LIST tables;
List<Item> all_fields;
DBUG_ENTER("mysql_update");
@@ -79,7 +79,7 @@ int mysql_update(THD *thd,
if ((open_and_lock_tables(thd, table_list)))
DBUG_RETURN(-1);
thd->proc_info="init";
fix_tables_pointers(thd->lex.all_selects_list);
fix_tables_pointers(thd->lex->all_selects_list);
table= table_list->table;
table->file->info(HA_STATUS_VARIABLE | HA_STATUS_NO_LOCK);
@@ -94,11 +94,11 @@ int mysql_update(THD *thd,
if (setup_tables(update_table_list) ||
setup_conds(thd,update_table_list,&conds) ||
setup_ref_array(thd, &thd->lex.select_lex.ref_pointer_array,
setup_ref_array(thd, &thd->lex->select_lex.ref_pointer_array,
order_num) ||
setup_order(thd, thd->lex.select_lex.ref_pointer_array,
setup_order(thd, thd->lex->select_lex.ref_pointer_array,
&tables, all_fields, all_fields, order) ||
setup_ftfuncs(&thd->lex.select_lex))
setup_ftfuncs(&thd->lex->select_lex))
DBUG_RETURN(-1); /* purecov: inspected */
/* Check that we are not using table that we are updating in a sub select */
@@ -138,7 +138,7 @@ int mysql_update(THD *thd,
table->grant.want_privilege=(SELECT_ACL & ~table->grant.privilege);
if (setup_fields(thd, 0, update_table_list, values, 0, 0, 0))
{
free_underlaid_joins(thd, &thd->lex.select_lex);
free_underlaid_joins(thd, &thd->lex->select_lex);
DBUG_RETURN(-1); /* purecov: inspected */
}
@@ -149,7 +149,7 @@ int mysql_update(THD *thd,
(select && select->check_quick(safe_update, limit)) || !limit)
{
delete select;
free_underlaid_joins(thd, &thd->lex.select_lex);
free_underlaid_joins(thd, &thd->lex->select_lex);
if (error)
{
DBUG_RETURN(-1); // Error in where
@@ -160,7 +160,7 @@ int mysql_update(THD *thd,
/* If running in safe sql mode, don't allow updates without keys */
if (!table->quick_keys)
{
thd->lex.select_lex.options|=QUERY_NO_INDEX_USED;
thd->lex->select_lex.options|=QUERY_NO_INDEX_USED;
if (safe_update && !using_limit)
{
my_message(ER_UPDATE_WITHOUT_KEY_IN_SAFE_MODE,
@@ -168,7 +168,7 @@ int mysql_update(THD *thd,
goto err;
}
}
init_ftfuncs(thd, &thd->lex.select_lex, 1);
init_ftfuncs(thd, &thd->lex->select_lex, 1);
/* Check if we are modifying a key that we are used to search with */
if (select && select->quick)
used_key_is_modified= (!select->quick->unique_key_range() &&
@@ -343,7 +343,6 @@ int mysql_update(THD *thd,
log_delayed= (transactional_table || table->tmp_table);
if (updated && (error <= 0 || !transactional_table))
{
mysql_update_log.write(thd,thd->query,thd->query_length);
if (mysql_bin_log.is_open())
{
Query_log_event qinfo(thd, thd->query, thd->query_length,
@@ -367,9 +366,9 @@ int mysql_update(THD *thd,
}
delete select;
free_underlaid_joins(thd, &thd->lex.select_lex);
free_underlaid_joins(thd, &thd->lex->select_lex);
if (error >= 0)
send_error(thd,thd->killed ? ER_SERVER_SHUTDOWN : 0); /* purecov: inspected */
send_error(thd,thd->killed_errno()); /* purecov: inspected */
else
{
char buff[80];
@@ -421,7 +420,7 @@ int mysql_multi_update(THD *thd,
table_list->grant.want_privilege=(SELECT_ACL & ~table_list->grant.privilege);
if ((res=open_and_lock_tables(thd,table_list)))
DBUG_RETURN(res);
fix_tables_pointers(thd->lex.all_selects_list);
fix_tables_pointers(thd->lex->all_selects_list);
thd->select_limit=HA_POS_ERROR;
if (setup_fields(thd, 0, table_list, *fields, 1, 0, 0))
@@ -965,7 +964,6 @@ bool multi_update::send_eof()
if (updated && (local_error <= 0 || !trans_safe))
{
mysql_update_log.write(thd,thd->query,thd->query_length);
if (mysql_bin_log.is_open())
{
Query_log_event qinfo(thd, thd->query, thd->query_length,