1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Creation of mysql-trunk = {summit + "Innodb plugin replacing the builtin"}:

bzr branch mysql-5.1-performance-version mysql-trunk # Summit
cd mysql-trunk
bzr merge mysql-5.1-innodb_plugin # which is 5.1 + Innodb plugin 
bzr rm innobase # remove the builtin
Next step: build, test fixes.
This commit is contained in:
Guilhem Bichot
2009-08-04 13:25:19 +02:00
1102 changed files with 135685 additions and 71431 deletions

View File

@ -196,11 +196,8 @@ bool begin_trans(THD *thd)
error= -1;
else
{
LEX *lex= thd->lex;
thd->options|= OPTION_BEGIN;
thd->server_status|= SERVER_STATUS_IN_TRANS;
if (lex->start_transaction_opt & MYSQL_START_TRANS_OPT_WITH_CONS_SNAPSHOT)
error= ha_start_consistent_snapshot(thd);
}
return error;
}
@ -1173,12 +1170,12 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
}
case COM_STMT_EXECUTE:
{
mysql_stmt_execute(thd, packet, packet_length);
mysqld_stmt_execute(thd, packet, packet_length);
break;
}
case COM_STMT_FETCH:
{
mysql_stmt_fetch(thd, packet, packet_length);
mysqld_stmt_fetch(thd, packet, packet_length);
break;
}
case COM_STMT_SEND_LONG_DATA:
@ -1188,17 +1185,17 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
}
case COM_STMT_PREPARE:
{
mysql_stmt_prepare(thd, packet, packet_length);
mysqld_stmt_prepare(thd, packet, packet_length);
break;
}
case COM_STMT_CLOSE:
{
mysql_stmt_close(thd, packet);
mysqld_stmt_close(thd, packet);
break;
}
case COM_STMT_RESET:
{
mysql_stmt_reset(thd, packet);
mysqld_stmt_reset(thd, packet);
break;
}
case COM_QUERY:
@ -1372,7 +1369,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
if (check_access(thd, CREATE_ACL, db.str , 0, 1, 0,
is_schema_db(db.str)))
break;
general_log_print(thd, command, packet);
general_log_print(thd, command, "%.*s", db.length, db.str);
bzero(&create_info, sizeof(create_info));
mysql_create_db(thd, (lower_case_table_names == 2 ? alias.str : db.str),
&create_info, 0);
@ -1397,7 +1394,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
ER(ER_LOCK_OR_ACTIVE_TRANSACTION), MYF(0));
break;
}
general_log_write(thd, command, db.str, db.length);
general_log_write(thd, command, "%.*s", db.length, db.str);
mysql_rm_db(thd, db.str, 0, 0);
break;
}
@ -1582,14 +1579,6 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
break;
}
/* If commit fails, we should be able to reset the OK status. */
thd->main_da.can_overwrite_status= TRUE;
ha_autocommit_or_rollback(thd, thd->is_error());
thd->main_da.can_overwrite_status= FALSE;
thd->transaction.stmt.reset();
/* report error issued during command execution */
if (thd->killed_errno())
{
@ -1602,6 +1591,13 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
thd->mysys_var->abort= 0;
}
/* If commit fails, we should be able to reset the OK status. */
thd->main_da.can_overwrite_status= TRUE;
ha_autocommit_or_rollback(thd, thd->is_error());
thd->main_da.can_overwrite_status= FALSE;
thd->transaction.stmt.reset();
net_end_statement(thd);
query_cache_end_of_result(thd);
@ -3946,7 +3942,9 @@ end_with_restore_list:
res= mysql_routine_grant(thd, all_tables,
lex->type == TYPE_ENUM_PROCEDURE,
lex->users_list, grants,
lex->sql_command == SQLCOM_REVOKE, 0);
lex->sql_command == SQLCOM_REVOKE, TRUE);
if (!res)
my_ok(thd);
}
else
{
@ -4090,6 +4088,11 @@ end_with_restore_list:
}
if (begin_trans(thd))
goto error;
if (lex->start_transaction_opt & MYSQL_START_TRANS_OPT_WITH_CONS_SNAPSHOT)
{
if (ha_start_consistent_snapshot(thd))
goto error;
}
my_ok(thd);
break;
case SQLCOM_COMMIT:
@ -5230,7 +5233,7 @@ check_access(THD *thd, ulong want_access, const char *db, ulong *save_priv,
if (schema_db)
{
if (!(sctx->master_access & FILE_ACL) && (want_access & FILE_ACL) ||
if ((!(sctx->master_access & FILE_ACL) && (want_access & FILE_ACL)) ||
(want_access & ~(SELECT_ACL | EXTRA_ACL | FILE_ACL)))
{
if (!no_errors)
@ -5264,7 +5267,7 @@ check_access(THD *thd, ulong want_access, const char *db, ulong *save_priv,
DBUG_RETURN(FALSE);
}
if (((want_access & ~sctx->master_access) & ~(DB_ACLS | EXTRA_ACL)) ||
! db && dont_check_global_grants)
(! db && dont_check_global_grants))
{ // We can never grant this
DBUG_PRINT("error",("No possible access"));
if (!no_errors)
@ -5542,7 +5545,7 @@ bool check_some_access(THD *thd, ulong want_access, TABLE_LIST *table)
if (!check_access(thd, access, table->db,
&table->grant.privilege, 0, 1,
test(table->schema_table)) &&
!check_grant(thd, access, table, 0, 1, 1))
!check_grant(thd, access, table, 0, 1, 1))
DBUG_RETURN(0);
}
}
@ -5798,7 +5801,7 @@ mysql_new_select(LEX *lex, bool move_down)
/*
Don't evaluate this subquery during statement prepare even if
it's a constant one. The flag is switched off in the end of
mysql_stmt_prepare.
mysqld_stmt_prepare.
*/
if (thd->stmt_arena->is_stmt_prepare())
select_lex->uncacheable|= UNCACHEABLE_PREPARE;
@ -7873,7 +7876,7 @@ bool parse_sql(THD *thd,
/* Check that if MYSQLparse() failed, thd->is_error() is set. */
DBUG_ASSERT(!mysql_parse_status ||
mysql_parse_status && thd->is_error());
(mysql_parse_status && thd->is_error()));
/* Reset parser state. */