heikki@127:~/mysql-5.1/storage/innobase$ diff -bu include ~/mysql-5.1.12-beta-nightly-20060728/storage/innobase/include diff -bu include/data0type.h /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/include/data0type.h --- include/data0type.h 2006-06-08 07:41:48.000000000 +0300 +++ /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/include/data0type.h 2006-07-28 07:40:00.000000000 +0300 @@ -332,7 +332,6 @@ /*************************************************************************** Returns the maximum size of a data type. Note: types in system tables may be incomplete and return incorrect information. */ -UNIV_INLINE ulint dtype_get_max_size( /*===============*/ diff -bu include/dict0dict.h /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/include/dict0dict.h --- include/dict0dict.h 2006-06-08 07:41:48.000000000 +0300 +++ /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/include/dict0dict.h 2006-07-28 07:40:00.000000000 +0300 @@ -45,15 +45,6 @@ const char* name); /* in: table name in the form dbname '/' tablename */ /************************************************************************ -Return the end of table name where we have removed dbname and '/'. */ - -const char* -dict_remove_db_name( -/*================*/ - /* out: table name */ - const char* name); /* in: table name in the form - dbname '/' tablename */ -/************************************************************************ Decrements the count of open MySQL handles to a table. */ void Only in /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/include: ha_prototypes.h diff -bu include/pars0grm.h /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/include/pars0grm.h --- include/pars0grm.h 2006-06-08 07:41:48.000000000 +0300 +++ /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/include/pars0grm.h 2006-07-28 07:39:59.000000000 +0300 @@ -69,59 +69,57 @@ PARS_WHERE_TOKEN = 295, PARS_FOR_TOKEN = 296, PARS_DDOT_TOKEN = 297, - PARS_READ_TOKEN = 298, - PARS_ORDER_TOKEN = 299, - PARS_BY_TOKEN = 300, - PARS_ASC_TOKEN = 301, - PARS_DESC_TOKEN = 302, - PARS_INSERT_TOKEN = 303, - PARS_INTO_TOKEN = 304, - PARS_VALUES_TOKEN = 305, - PARS_UPDATE_TOKEN = 306, - PARS_SET_TOKEN = 307, - PARS_DELETE_TOKEN = 308, - PARS_CURRENT_TOKEN = 309, - PARS_OF_TOKEN = 310, - PARS_CREATE_TOKEN = 311, - PARS_TABLE_TOKEN = 312, - PARS_INDEX_TOKEN = 313, - PARS_UNIQUE_TOKEN = 314, - PARS_CLUSTERED_TOKEN = 315, - PARS_DOES_NOT_FIT_IN_MEM_TOKEN = 316, - PARS_ON_TOKEN = 317, - PARS_ASSIGN_TOKEN = 318, - PARS_DECLARE_TOKEN = 319, - PARS_CURSOR_TOKEN = 320, - PARS_SQL_TOKEN = 321, - PARS_OPEN_TOKEN = 322, - PARS_FETCH_TOKEN = 323, - PARS_CLOSE_TOKEN = 324, - PARS_NOTFOUND_TOKEN = 325, - PARS_TO_CHAR_TOKEN = 326, - PARS_TO_NUMBER_TOKEN = 327, - PARS_TO_BINARY_TOKEN = 328, - PARS_BINARY_TO_NUMBER_TOKEN = 329, - PARS_SUBSTR_TOKEN = 330, - PARS_REPLSTR_TOKEN = 331, - PARS_CONCAT_TOKEN = 332, - PARS_INSTR_TOKEN = 333, - PARS_LENGTH_TOKEN = 334, - PARS_SYSDATE_TOKEN = 335, - PARS_PRINTF_TOKEN = 336, - PARS_ASSERT_TOKEN = 337, - PARS_RND_TOKEN = 338, - PARS_RND_STR_TOKEN = 339, - PARS_ROW_PRINTF_TOKEN = 340, - PARS_COMMIT_TOKEN = 341, - PARS_ROLLBACK_TOKEN = 342, - PARS_WORK_TOKEN = 343, - PARS_UNSIGNED_TOKEN = 344, - PARS_EXIT_TOKEN = 345, - PARS_FUNCTION_TOKEN = 346, - PARS_LOCK_TOKEN = 347, - PARS_SHARE_TOKEN = 348, - PARS_MODE_TOKEN = 349, - NEG = 350 + PARS_CONSISTENT_TOKEN = 298, + PARS_READ_TOKEN = 299, + PARS_ORDER_TOKEN = 300, + PARS_BY_TOKEN = 301, + PARS_ASC_TOKEN = 302, + PARS_DESC_TOKEN = 303, + PARS_INSERT_TOKEN = 304, + PARS_INTO_TOKEN = 305, + PARS_VALUES_TOKEN = 306, + PARS_UPDATE_TOKEN = 307, + PARS_SET_TOKEN = 308, + PARS_DELETE_TOKEN = 309, + PARS_CURRENT_TOKEN = 310, + PARS_OF_TOKEN = 311, + PARS_CREATE_TOKEN = 312, + PARS_TABLE_TOKEN = 313, + PARS_INDEX_TOKEN = 314, + PARS_UNIQUE_TOKEN = 315, + PARS_CLUSTERED_TOKEN = 316, + PARS_DOES_NOT_FIT_IN_MEM_TOKEN = 317, + PARS_ON_TOKEN = 318, + PARS_ASSIGN_TOKEN = 319, + PARS_DECLARE_TOKEN = 320, + PARS_CURSOR_TOKEN = 321, + PARS_SQL_TOKEN = 322, + PARS_OPEN_TOKEN = 323, + PARS_FETCH_TOKEN = 324, + PARS_CLOSE_TOKEN = 325, + PARS_NOTFOUND_TOKEN = 326, + PARS_TO_CHAR_TOKEN = 327, + PARS_TO_NUMBER_TOKEN = 328, + PARS_TO_BINARY_TOKEN = 329, + PARS_BINARY_TO_NUMBER_TOKEN = 330, + PARS_SUBSTR_TOKEN = 331, + PARS_REPLSTR_TOKEN = 332, + PARS_CONCAT_TOKEN = 333, + PARS_INSTR_TOKEN = 334, + PARS_LENGTH_TOKEN = 335, + PARS_SYSDATE_TOKEN = 336, + PARS_PRINTF_TOKEN = 337, + PARS_ASSERT_TOKEN = 338, + PARS_RND_TOKEN = 339, + PARS_RND_STR_TOKEN = 340, + PARS_ROW_PRINTF_TOKEN = 341, + PARS_COMMIT_TOKEN = 342, + PARS_ROLLBACK_TOKEN = 343, + PARS_WORK_TOKEN = 344, + PARS_UNSIGNED_TOKEN = 345, + PARS_EXIT_TOKEN = 346, + PARS_FUNCTION_TOKEN = 347, + NEG = 348 }; #endif #define PARS_INT_LIT 258 @@ -164,59 +162,57 @@ #define PARS_WHERE_TOKEN 295 #define PARS_FOR_TOKEN 296 #define PARS_DDOT_TOKEN 297 -#define PARS_READ_TOKEN 298 -#define PARS_ORDER_TOKEN 299 -#define PARS_BY_TOKEN 300 -#define PARS_ASC_TOKEN 301 -#define PARS_DESC_TOKEN 302 -#define PARS_INSERT_TOKEN 303 -#define PARS_INTO_TOKEN 304 -#define PARS_VALUES_TOKEN 305 -#define PARS_UPDATE_TOKEN 306 -#define PARS_SET_TOKEN 307 -#define PARS_DELETE_TOKEN 308 -#define PARS_CURRENT_TOKEN 309 -#define PARS_OF_TOKEN 310 -#define PARS_CREATE_TOKEN 311 -#define PARS_TABLE_TOKEN 312 -#define PARS_INDEX_TOKEN 313 -#define PARS_UNIQUE_TOKEN 314 -#define PARS_CLUSTERED_TOKEN 315 -#define PARS_DOES_NOT_FIT_IN_MEM_TOKEN 316 -#define PARS_ON_TOKEN 317 -#define PARS_ASSIGN_TOKEN 318 -#define PARS_DECLARE_TOKEN 319 -#define PARS_CURSOR_TOKEN 320 -#define PARS_SQL_TOKEN 321 -#define PARS_OPEN_TOKEN 322 -#define PARS_FETCH_TOKEN 323 -#define PARS_CLOSE_TOKEN 324 -#define PARS_NOTFOUND_TOKEN 325 -#define PARS_TO_CHAR_TOKEN 326 -#define PARS_TO_NUMBER_TOKEN 327 -#define PARS_TO_BINARY_TOKEN 328 -#define PARS_BINARY_TO_NUMBER_TOKEN 329 -#define PARS_SUBSTR_TOKEN 330 -#define PARS_REPLSTR_TOKEN 331 -#define PARS_CONCAT_TOKEN 332 -#define PARS_INSTR_TOKEN 333 -#define PARS_LENGTH_TOKEN 334 -#define PARS_SYSDATE_TOKEN 335 -#define PARS_PRINTF_TOKEN 336 -#define PARS_ASSERT_TOKEN 337 -#define PARS_RND_TOKEN 338 -#define PARS_RND_STR_TOKEN 339 -#define PARS_ROW_PRINTF_TOKEN 340 -#define PARS_COMMIT_TOKEN 341 -#define PARS_ROLLBACK_TOKEN 342 -#define PARS_WORK_TOKEN 343 -#define PARS_UNSIGNED_TOKEN 344 -#define PARS_EXIT_TOKEN 345 -#define PARS_FUNCTION_TOKEN 346 -#define PARS_LOCK_TOKEN 347 -#define PARS_SHARE_TOKEN 348 -#define PARS_MODE_TOKEN 349 -#define NEG 350 +#define PARS_CONSISTENT_TOKEN 298 +#define PARS_READ_TOKEN 299 +#define PARS_ORDER_TOKEN 300 +#define PARS_BY_TOKEN 301 +#define PARS_ASC_TOKEN 302 +#define PARS_DESC_TOKEN 303 +#define PARS_INSERT_TOKEN 304 +#define PARS_INTO_TOKEN 305 +#define PARS_VALUES_TOKEN 306 +#define PARS_UPDATE_TOKEN 307 +#define PARS_SET_TOKEN 308 +#define PARS_DELETE_TOKEN 309 +#define PARS_CURRENT_TOKEN 310 +#define PARS_OF_TOKEN 311 +#define PARS_CREATE_TOKEN 312 +#define PARS_TABLE_TOKEN 313 +#define PARS_INDEX_TOKEN 314 +#define PARS_UNIQUE_TOKEN 315 +#define PARS_CLUSTERED_TOKEN 316 +#define PARS_DOES_NOT_FIT_IN_MEM_TOKEN 317 +#define PARS_ON_TOKEN 318 +#define PARS_ASSIGN_TOKEN 319 +#define PARS_DECLARE_TOKEN 320 +#define PARS_CURSOR_TOKEN 321 +#define PARS_SQL_TOKEN 322 +#define PARS_OPEN_TOKEN 323 +#define PARS_FETCH_TOKEN 324 +#define PARS_CLOSE_TOKEN 325 +#define PARS_NOTFOUND_TOKEN 326 +#define PARS_TO_CHAR_TOKEN 327 +#define PARS_TO_NUMBER_TOKEN 328 +#define PARS_TO_BINARY_TOKEN 329 +#define PARS_BINARY_TO_NUMBER_TOKEN 330 +#define PARS_SUBSTR_TOKEN 331 +#define PARS_REPLSTR_TOKEN 332 +#define PARS_CONCAT_TOKEN 333 +#define PARS_INSTR_TOKEN 334 +#define PARS_LENGTH_TOKEN 335 +#define PARS_SYSDATE_TOKEN 336 +#define PARS_PRINTF_TOKEN 337 +#define PARS_ASSERT_TOKEN 338 +#define PARS_RND_TOKEN 339 +#define PARS_RND_STR_TOKEN 340 +#define PARS_ROW_PRINTF_TOKEN 341 +#define PARS_COMMIT_TOKEN 342 +#define PARS_ROLLBACK_TOKEN 343 +#define PARS_WORK_TOKEN 344 +#define PARS_UNSIGNED_TOKEN 345 +#define PARS_EXIT_TOKEN 346 +#define PARS_FUNCTION_TOKEN 347 +#define NEG 348 diff -bu include/pars0pars.h /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/include/pars0pars.h --- include/pars0pars.h 2006-06-08 07:41:48.000000000 +0300 +++ /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/include/pars0pars.h 2006-07-28 07:39:59.000000000 +0300 @@ -63,7 +63,7 @@ extern pars_res_word_t pars_desc_token; extern pars_res_word_t pars_open_token; extern pars_res_word_t pars_close_token; -extern pars_res_word_t pars_share_token; +extern pars_res_word_t pars_consistent_token; extern pars_res_word_t pars_unique_token; extern pars_res_word_t pars_clustered_token; diff -bu include/que0que.h /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/include/que0que.h --- include/que0que.h 2006-06-08 15:22:19.000000000 +0300 +++ /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/include/que0que.h 2006-07-28 07:39:59.000000000 +0300 @@ -143,12 +143,14 @@ /*===================*/ que_thr_t* thr); /* in: query thread */ /************************************************************************** -Run a query thread. Handles lock waits. */ +Runs query threads. Note that the individual query thread which is run +within this function may change if, e.g., the OS thread executing this +function uses a threshold amount of resources. */ void que_run_threads( /*============*/ - que_thr_t* thr); /* in: query thread */ + que_thr_t* thr); /* in: query thread which is run initially */ /************************************************************************** After signal handling is finished, returns control to a query graph error handling routine. (Currently, just returns the control to the root of the @@ -161,6 +163,19 @@ que_t* fork); /* in: query graph which was run before signal handling started, NULL not allowed */ /************************************************************************** +Handles an SQL error noticed during query thread execution. At the moment, +does nothing! */ + +void +que_thr_handle_error( +/*=================*/ + que_thr_t* thr, /* in: query thread */ + ulint err_no, /* in: error number */ + byte* err_str,/* in, own: error string or NULL; NOTE: the + function will take care of freeing of the + string! */ + ulint err_len);/* in: error string length */ +/************************************************************************** Moves a suspended query thread to the QUE_THR_RUNNING state and releases a single worker thread to execute it. This function should be used to end the wait state of a query thread waiting for a lock or a stored procedure @@ -322,14 +337,9 @@ ulint que_eval_sql( /*=========*/ - /* out: error code or DB_SUCCESS */ - pars_info_t* info, /* in: info struct, or NULL */ - const char* sql, /* in: SQL string */ - ibool reserve_dict_mutex, - /* in: if TRUE, acquire/release - dict_sys->mutex around call to pars_sql. */ + pars_info_t* info, /* out: error code or DB_SUCCESS */ + const char* sql, /* in: info struct, or NULL */ trx_t* trx); /* in: trx */ - /* Query graph query thread node: the fields are protected by the kernel mutex with the exceptions named below */ diff -bu include/trx0trx.h /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/include/trx0trx.h --- include/trx0trx.h 2006-06-08 07:41:48.000000000 +0300 +++ /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/include/trx0trx.h 2006-07-28 07:40:01.000000000 +0300 @@ -266,9 +266,11 @@ /******************************************************************** Sends a signal to a trx object. */ -void +ibool trx_sig_send( /*=========*/ + /* out: TRUE if the signal was + successfully delivered */ trx_t* trx, /* in: trx handle */ ulint type, /* in: signal type */ ulint sender, /* in: TRX_SIG_SELF or diff -bu include/univ.i /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/include/univ.i --- include/univ.i 2006-06-08 15:22:19.000000000 +0300 +++ /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/include/univ.i 2006-07-28 07:40:01.000000000 +0300 @@ -85,7 +85,6 @@ #if 0 #define UNIV_DEBUG #define UNIV_MEM_DEBUG -#define UNIV_DIRECT_SQL_DEBUG #define UNIV_IBUF_DEBUG #define UNIV_SYNC_DEBUG #define UNIV_SEARCH_DEBUG Only in /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/include: ut0list.h Only in /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/include: ut0list.ic diff -bu include/ut0ut.h /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/include/ut0ut.h --- include/ut0ut.h 2006-06-08 07:41:48.000000000 +0300 +++ /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/include/ut0ut.h 2006-07-28 07:40:01.000000000 +0300 @@ -214,19 +214,17 @@ FILE* f, /* in: output stream */ const char* name); /* in: name to print */ -/* Forward declaration of transaction handle */ -struct trx_struct; - /************************************************************************** Outputs a NUL-terminated string, quoted as an SQL identifier. */ +struct trx_struct; + void ut_print_name( /*==========*/ FILE* f, /* in: output stream */ struct trx_struct*trx, /* in: transaction */ - ibool table_id,/* in: TRUE=print a table name, - FALSE=print other identifier */ + ibool table_id,/* in: TRUE=decode table name */ const char* name); /* in: name to print */ /************************************************************************** @@ -237,8 +235,7 @@ /*===========*/ FILE* f, /* in: output stream */ struct trx_struct*trx, /* in: transaction (NULL=no quotes) */ - ibool table_id,/* in: TRUE=print a table name, - FALSE=print other identifier */ + ibool table_id,/* in: TRUE=decode table name */ const char* name, /* in: name to print */ ulint namelen);/* in: length of name */ Only in /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/include: ut0vec.h Only in /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/include: ut0vec.ic Only in /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/include: ut0wqueue.h heikki@127:~/mysql-5.1/storage/innobase$ diff -bu dict ~/mysql-5.1.12-beta-nightly-20060728/storage/innobase/dict Common subdirectories: dict/.deps and /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/dict/.deps Only in /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/dict: Makefile Only in /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/dict: Makefile.in Binary files dict/dict0boot.o and /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/dict/dict0boot.o differ diff -bu dict/dict0crea.c /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/dict/dict0crea.c --- dict/dict0crea.c 2006-06-08 15:22:19.000000000 +0300 +++ /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/dict/dict0crea.c 2006-07-28 07:39:59.000000000 +0300 @@ -1193,7 +1193,7 @@ "CREATE UNIQUE CLUSTERED INDEX ID_IND ON SYS_FOREIGN_COLS (ID, POS);\n" "COMMIT WORK;\n" "END;\n" - , FALSE, trx); + , trx); if (error != DB_SUCCESS) { fprintf(stderr, "InnoDB: error %lu in creation\n", @@ -1242,7 +1242,7 @@ ulint error; FILE* ef = dict_foreign_err_file; - error = que_eval_sql(info, sql, FALSE, trx); + error = que_eval_sql(info, sql, trx); if (error == DB_DUPLICATE_KEY) { mutex_enter(&dict_foreign_err_mutex); Binary files dict/dict0crea.o and /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/dict/dict0crea.o differ diff -bu dict/dict0dict.c /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/dict/dict0dict.c --- dict/dict0dict.c 2006-06-08 07:41:47.000000000 +0300 +++ /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/dict/dict0dict.c 2006-07-28 07:40:02.000000000 +0300 @@ -285,7 +285,7 @@ /************************************************************************ Return the end of table name where we have removed dbname and '/'. */ - +static const char* dict_remove_db_name( /*================*/ Binary files dict/dict0dict.o and /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/dict/dict0dict.o differ Binary files dict/dict0load.o and /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/dict/dict0load.o differ Binary files dict/dict0mem.o and /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/dict/dict0mem.o differ Binary files dict/libdict.a and /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/dict/libdict.a differ heikki@127:~/mysql-5.1/storage/innobase$ diff -bu ibuf ~/mysql-5.1.12-beta-nightly-20060728/storage/innobase/ibuf Common subdirectories: ibuf/.deps and /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/ibuf/.deps Only in /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/ibuf: Makefile Only in /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/ibuf: Makefile.in diff -bu ibuf/ibuf0ibuf.c /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/ibuf/ibuf0ibuf.c --- ibuf/ibuf0ibuf.c 2006-06-08 07:41:48.000000000 +0300 +++ /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/ibuf/ibuf0ibuf.c 2006-07-28 07:39:58.000000000 +0300 @@ -952,11 +952,14 @@ ibuf_fixed_addr_page( /*=================*/ /* out: TRUE if a fixed address ibuf i/o page */ - ulint space, /* in: space id */ ulint page_no)/* in: page number */ { - return((space == 0 && page_no == IBUF_TREE_ROOT_PAGE_NO) - || ibuf_bitmap_page(page_no)); + if ((ibuf_bitmap_page(page_no)) + || (page_no == IBUF_TREE_ROOT_PAGE_NO)) { + return(TRUE); + } + + return(FALSE); } /*************************************************************************** @@ -980,7 +983,7 @@ return(FALSE); } - if (ibuf_fixed_addr_page(space, page_no)) { + if (ibuf_fixed_addr_page(page_no)) { return(TRUE); } @@ -1028,7 +1031,7 @@ return(FALSE); } #endif - if (ibuf_fixed_addr_page(space, page_no)) { + if (ibuf_fixed_addr_page(page_no)) { return(TRUE); } @@ -3067,7 +3070,7 @@ return; } #endif - if (ibuf_fixed_addr_page(space, page_no) || fsp_descr_page(page_no) + if (ibuf_fixed_addr_page(page_no) || fsp_descr_page(page_no) || trx_sys_hdr_page(space, page_no)) { return; } Binary files ibuf/ibuf0ibuf.o and /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/ibuf/ibuf0ibuf.o differ Binary files ibuf/libibuf.a and /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/ibuf/libibuf.a differ heikki@127:~/mysql-5.1/storage/innobase$ diff -bu mem ~/mysql-5.1.12-beta-nightly-20060728/storage/innobase/mem Common subdirectories: mem/.deps and /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/mem/.deps Only in /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/mem: Makefile Only in /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/mem: Makefile.in Binary files mem/libmem.a and /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/mem/libmem.a differ diff -bu mem/mem0mem.c /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/mem/mem0mem.c --- mem/mem0mem.c 2006-06-08 07:41:47.000000000 +0300 +++ /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/mem/mem0mem.c 2006-07-28 07:39:59.000000000 +0300 @@ -144,7 +144,7 @@ void* res = mem_heap_alloc(heap, len1 + len2); memcpy(res, b1, len1); - memcpy(res + len1, b2, len2); + memcpy((char *)res + len1, b2, len2); return(res); } Binary files mem/mem0mem.o and /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/mem/mem0mem.o differ Binary files mem/mem0pool.o and /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/mem/mem0pool.o differ !!!!!!! Only in pars: pars0grm.y !!!!!!! Only in pars: pars0lex.l Binary files pars/pars0opt.o and /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/pars/pars0opt.o differ diff -bu pars/pars0pars.c /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/pars/pars0pars.c --- pars/pars0pars.c 2006-06-08 07:41:48.000000000 +0300 +++ /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/pars/pars0pars.c 2006-07-28 07:40:03.000000000 +0300 @@ -72,7 +72,7 @@ pars_res_word_t pars_desc_token = {PARS_DESC_TOKEN}; pars_res_word_t pars_open_token = {PARS_OPEN_TOKEN}; pars_res_word_t pars_close_token = {PARS_CLOSE_TOKEN}; -pars_res_word_t pars_share_token = {PARS_SHARE_TOKEN}; +pars_res_word_t pars_consistent_token = {PARS_CONSISTENT_TOKEN}; pars_res_word_t pars_unique_token = {PARS_UNIQUE_TOKEN}; pars_res_word_t pars_clustered_token = {PARS_CLUSTERED_TOKEN}; @@ -699,7 +699,8 @@ sym_node_t* table_list, /* in: table list */ que_node_t* search_cond, /* in: search condition or NULL */ pars_res_word_t* for_update, /* in: NULL or &pars_update_token */ - pars_res_word_t* lock_shared, /* in: NULL or &pars_share_token */ + pars_res_word_t* consistent_read,/* in: NULL or + &pars_consistent_token */ order_node_t* order_by) /* in: NULL or an order-by node */ { select_node->state = SEL_NODE_OPEN; @@ -733,24 +734,19 @@ } if (for_update) { - ut_a(!lock_shared); - + ut_a(!consistent_read); select_node->set_x_locks = TRUE; select_node->row_lock_mode = LOCK_X; - - select_node->consistent_read = FALSE; - select_node->read_view = NULL; - } else if (lock_shared){ - select_node->set_x_locks = FALSE; - select_node->row_lock_mode = LOCK_S; - - select_node->consistent_read = FALSE; - select_node->read_view = NULL; } else { select_node->set_x_locks = FALSE; select_node->row_lock_mode = LOCK_S; + } + if (consistent_read) { select_node->consistent_read = TRUE; + } else { + select_node->consistent_read = FALSE; + select_node->read_view = NULL; } select_node->order_by = order_by; @@ -980,7 +976,7 @@ sel_node = pars_select_list(NULL, NULL); pars_select_statement(sel_node, table_sym, search_cond, NULL, - &pars_share_token, NULL); + NULL, NULL); node->searched_update = TRUE; sel_node->common.parent = node; } @@ -1861,9 +1857,8 @@ #endif /* UNIV_SYNC_DEBUG */ pars_sym_tab_global = sym_tab_create(heap); + pars_sym_tab_global->sql_string = mem_heap_strdup(heap, str); pars_sym_tab_global->string_len = strlen(str); - pars_sym_tab_global->sql_string = mem_heap_dup(heap, str, - pars_sym_tab_global->string_len + 1); pars_sym_tab_global->next_char_pos = 0; pars_sym_tab_global->info = info; Binary files pars/pars0pars.o and /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/pars/pars0pars.o differ Binary files pars/pars0sym.o and /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/pars/pars0sym.o differ heikki@127:~/mysql-5.1/storage/innobase$ heikki@127:~/mysql-5.1/storage/innobase$ diff -bu que ~/mysql-5.1.12-beta-nightly-20060728/storage/innobase/que Common subdirectories: que/.deps and /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/que/.deps Only in /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/que: Makefile Only in /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/que: Makefile.in Binary files que/libque.a and /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/que/libque.a differ diff -bu que/que0que.c /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/que/que0que.c --- que/que0que.c 2006-06-08 15:22:19.000000000 +0300 +++ /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/que/que0que.c 2006-07-28 07:40:02.000000000 +0300 @@ -715,6 +715,27 @@ return(FALSE); } +/************************************************************************** +Handles an SQL error noticed during query thread execution. Currently, +does nothing! */ + +void +que_thr_handle_error( +/*=================*/ + que_thr_t* thr __attribute__((unused)), + /* in: query thread */ + ulint err_no __attribute__((unused)), + /* in: error number */ + byte* err_str __attribute__((unused)), + /* in, own: error string or NULL; NOTE: the + function will take care of freeing of the + string! */ + ulint err_len __attribute__((unused))) + /* in: error string length */ +{ + /* Does nothing */ +} + /******************************************************************** Performs an execution step on a thr node. */ static @@ -792,10 +813,11 @@ Decrements the query thread reference counts in the query graph and the transaction. May start signal handling, e.g., a rollback. *** NOTE ***: -This and que_thr_stop_for_mysql are the only functions where the reference -count can be decremented and this function may only be called from inside -que_run_threads or que_thr_check_if_switch! These restrictions exist to make -the rollback code easier to maintain. */ +This and que_thr_stop_for_mysql are +the only functions where the reference count can be decremented and +this function may only be called from inside que_run_threads or +que_thr_check_if_switch! These restrictions exist to make the rollback code +easier to maintain. */ static void que_thr_dec_refer_count( @@ -814,7 +836,7 @@ ibool stopped; fork = thr->common.parent; - trx = thr_get_trx(thr); + trx = thr->graph->trx; sess = trx->sess; mutex_enter(&kernel_mutex); @@ -834,12 +856,6 @@ stderr); */ if (next_thr && *next_thr == NULL) { - /* Normally srv_suspend_mysql_thread resets - the state to DB_SUCCESS before waiting, but - in this case we have to do it here, - otherwise nobody does it. */ - trx->error_state = DB_SUCCESS; - *next_thr = thr; } else { ut_a(0); @@ -1184,10 +1200,7 @@ trx_t* trx; ulint type; - trx = thr_get_trx(thr); - ut_ad(thr->state == QUE_THR_RUNNING); - ut_a(trx->error_state == DB_SUCCESS); thr->resource++; @@ -1223,6 +1236,7 @@ threads doing updating or inserting at the moment! */ if (thr->prev_node == que_node_get_parent(node)) { + trx = thr_get_trx(thr); trx->last_sql_stat_start.least_undo_no = trx->undo_no; } @@ -1284,28 +1298,24 @@ old_thr->prev_node = node; } - if (thr) { - ut_a(thr_get_trx(thr)->error_state == DB_SUCCESS); - } - return(thr); } /************************************************************************** -Run a query thread until it finishes or encounters e.g. a lock wait. */ -static +Runs query threads. Note that the individual query thread which is run +within this function may change if, e.g., the OS thread executing this +function uses a threshold amount of resources. */ + void -que_run_threads_low( -/*================*/ - que_thr_t* thr) /* in: query thread */ +que_run_threads( +/*============*/ + que_thr_t* thr) /* in: query thread which is run initially */ { que_thr_t* next_thr; ulint cumul_resource; ulint loop_count; ut_ad(thr->state == QUE_THR_RUNNING); - ut_a(thr_get_trx(thr)->error_state == DB_SUCCESS); - #ifdef UNIV_SYNC_DEBUG ut_ad(!mutex_own(&kernel_mutex)); #endif /* UNIV_SYNC_DEBUG */ @@ -1330,15 +1340,10 @@ next_thr = que_thr_step(thr); /*-------------------------*/ - ut_a(!next_thr || (thr_get_trx(next_thr)->error_state == DB_SUCCESS)); - loop_count++; if (next_thr != thr) { ut_a(next_thr == NULL); - - /* This can change next_thr to a non-NULL value if there was - a lock wait that already completed. */ que_thr_dec_refer_count(thr, &next_thr); if (next_thr == NULL) { @@ -1354,89 +1359,20 @@ goto loop; } -/************************************************************************** -Run a query thread. Handles lock waits. */ -void -que_run_threads( -/*============*/ - que_thr_t* thr) /* in: query thread */ -{ -loop: - ut_a(thr_get_trx(thr)->error_state == DB_SUCCESS); - que_run_threads_low(thr); - - mutex_enter(&kernel_mutex); - - switch (thr->state) { - - case QUE_THR_RUNNING: - /* There probably was a lock wait, but it already ended - before we came here: continue running thr */ - - mutex_exit(&kernel_mutex); - - goto loop; - - case QUE_THR_LOCK_WAIT: - mutex_exit(&kernel_mutex); - - /* The ..._mysql_... function works also for InnoDB's - internal threads. Let us wait that the lock wait ends. */ - - srv_suspend_mysql_thread(thr); - - if (thr_get_trx(thr)->error_state != DB_SUCCESS) { - /* thr was chosen as a deadlock victim or there was - a lock wait timeout */ - - que_thr_dec_refer_count(thr, NULL); - - return; - } - - goto loop; - - case QUE_THR_COMPLETED: - case QUE_THR_COMMAND_WAIT: - /* Do nothing */ - break; - - default: - ut_error; - } - - mutex_exit(&kernel_mutex); -} - /************************************************************************* -Evaluate the given SQL. */ +Evaluate the given SQL */ ulint que_eval_sql( /*=========*/ - /* out: error code or DB_SUCCESS */ - pars_info_t* info, /* in: info struct, or NULL */ - const char* sql, /* in: SQL string */ - ibool reserve_dict_mutex, - /* in: if TRUE, acquire/release - dict_sys->mutex around call to pars_sql. */ + pars_info_t* info, /* out: error code or DB_SUCCESS */ + const char* sql, /* in: info struct, or NULL */ trx_t* trx) /* in: trx */ { que_thr_t* thr; que_t* graph; - ut_a(trx->error_state == DB_SUCCESS); - - if (reserve_dict_mutex) { - mutex_enter(&dict_sys->mutex); - } - graph = pars_sql(info, sql); - - if (reserve_dict_mutex) { - mutex_exit(&dict_sys->mutex); - } - ut_a(graph); graph->trx = trx; Binary files que/que0que.o and /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/que/que0que.o differ heikki@127:~/mysql-5.1/storage/innobase$ diff -bu row ~/mysql-5.1.12-beta-nightly-20060728/storage/innobase/row Common subdirectories: row/.deps and /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/row/.deps Only in /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/row: Makefile Only in /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/row: Makefile.in Binary files row/librow.a and /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/row/librow.a differ Binary files row/row0ins.o and /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/row/row0ins.o differ diff -bu row/row0mysql.c /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/row/row0mysql.c --- row/row0mysql.c 2006-06-08 15:22:19.000000000 +0300 +++ /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/row/row0mysql.c 2006-07-28 07:40:07.000000000 +0300 @@ -53,7 +53,6 @@ static const char S_innodb_tablespace_monitor[] = "innodb_tablespace_monitor"; static const char S_innodb_table_monitor[] = "innodb_table_monitor"; static const char S_innodb_mem_validate[] = "innodb_mem_validate"; -static const char S_innodb_sql[] = "innodb_sql"; /* Name suffix for recovered orphaned temporary tables */ static const char S_recover_innodb_tmp_table[] = "_recover_innodb_tmp_table"; @@ -1129,48 +1128,6 @@ row_mysql_convert_row_to_innobase(node->row, prebuilt, mysql_rec); -#ifdef UNIV_DIRECT_SQL_DEBUG - if (strcmp(dict_remove_db_name(prebuilt->table->name), S_innodb_sql) - == 0) - { - mem_heap_t* heap = mem_heap_create(512); - dfield_t* df = dtuple_get_nth_field(node->row, 0); - char* str = mem_heap_dup(heap, - dfield_get_data(df), dfield_get_len(df) + 1); - - str[dfield_get_len(df)] = '\0'; - - /* TODO: If we someday add support in mem_heap_printf for - the maximum string length (%.*s), we can omit the - mem_heap_dup above and use dfield_get_data(df) directly - here. */ - str = mem_heap_printf(heap, - "PROCEDURE P() IS BEGIN %s END;", str); - - err = que_eval_sql(NULL, str, TRUE, trx); - - if (err != DB_SUCCESS) { - fprintf(stderr, "InnoDB: Error: Got error code %lu" - " from innodb_sql\n", (ulong)err); - - trx->error_state = DB_SUCCESS; - trx_general_rollback_for_mysql(trx, FALSE, NULL); - trx->op_info = ""; - - /* We can't return the specific error because the - error was generated accessing who knows what table, - while MySQL thinks we're accesssing "innodb_sql" - table, and for e.g. DB_DUPLICATE_KEY it crashes - trying to print the name of the key. */ - err = DB_ERROR; - } - - mem_heap_free(heap); - - return((int)err); - } -#endif - savept = trx_savept_take(trx); thr = que_fork_get_first_thr(prebuilt->ins_graph); @@ -1959,30 +1916,6 @@ fputs("Memory NOT validated (recompile with UNIV_MEM_DEBUG)\n", stderr); #endif /* UNIV_MEM_DEBUG */ - } else if (table_name_len == sizeof S_innodb_sql - && !memcmp(table_name, S_innodb_sql, - sizeof S_innodb_sql)) { - -#ifdef UNIV_DIRECT_SQL_DEBUG - /* Check that the table contains exactly one column of type - TEXT NOT NULL in Latin-1 encoding. */ - dtype_t* type; - - ut_a(dict_table_get_n_user_cols(table) == 1); - - type = dict_col_get_type(dict_table_get_nth_col(table, 0)); - - ut_a(dtype_get_mtype(type) == DATA_BLOB); - ut_a((dtype_get_prtype(type) & DATA_BINARY_TYPE) == 0); - ut_a(dtype_get_prtype(type) & DATA_NOT_NULL); - ut_a(dtype_get_charset_coll(dtype_get_prtype(type)) - == DATA_MYSQL_LATIN1_SWEDISH_CHARSET_COLL); - -#else - fputs("Created table 'innodb_sql' is not special since the\n" - "program was compiled without UNIV_DIRECT_SQL_DEBUG.\n", - stderr); -#endif } heap = mem_heap_create(512); @@ -2570,8 +2503,7 @@ "BEGIN\n" "SELECT ID INTO old_id\n" "FROM SYS_TABLES\n" - "WHERE NAME = :table_name\n" - "LOCK IN SHARE MODE;\n" + "WHERE NAME = :table_name;\n" "IF (SQL % NOTFOUND) THEN\n" " COMMIT WORK;\n" " RETURN;\n" @@ -2584,7 +2516,7 @@ " WHERE TABLE_ID = old_id;\n" "COMMIT WORK;\n" "END;\n" - , FALSE, trx); + , trx); if (err != DB_SUCCESS) { trx->error_state = DB_SUCCESS; @@ -2980,7 +2912,7 @@ " WHERE TABLE_ID = :old_id;\n" "COMMIT WORK;\n" "END;\n" - , FALSE, trx); + , trx); if (err != DB_SUCCESS) { trx->error_state = DB_SUCCESS; @@ -3250,8 +3182,7 @@ "BEGIN\n" "SELECT ID INTO table_id\n" "FROM SYS_TABLES\n" - "WHERE NAME = :table_name\n" - "LOCK IN SHARE MODE;\n" + "WHERE NAME = :table_name;\n" "IF (SQL % NOTFOUND) THEN\n" " COMMIT WORK;\n" " RETURN;\n" @@ -3259,8 +3190,7 @@ "found := 1;\n" "SELECT ID INTO sys_foreign_id\n" "FROM SYS_TABLES\n" - "WHERE NAME = 'SYS_FOREIGN'\n" - "LOCK IN SHARE MODE;\n" + "WHERE NAME = 'SYS_FOREIGN';\n" "IF (SQL % NOTFOUND) THEN\n" " found := 0;\n" "END IF;\n" @@ -3274,8 +3204,7 @@ " SELECT ID INTO foreign_id\n" " FROM SYS_FOREIGN\n" " WHERE FOR_NAME = :table_name\n" - " AND TO_BINARY(FOR_NAME) = TO_BINARY(:table_name)\n" - " LOCK IN SHARE MODE;\n" + " AND TO_BINARY(FOR_NAME) = TO_BINARY(:table_name);\n" " IF (SQL % NOTFOUND) THEN\n" " found := 0;\n" " ELSE" @@ -3287,8 +3216,7 @@ "WHILE found = 1 LOOP\n" " SELECT ID INTO index_id\n" " FROM SYS_INDEXES\n" - " WHERE TABLE_ID = table_id\n" - " LOCK IN SHARE MODE;\n" + " WHERE TABLE_ID = table_id;\n" " IF (SQL % NOTFOUND) THEN\n" " found := 0;\n" " ELSE" @@ -3301,7 +3229,7 @@ "DELETE FROM SYS_TABLES WHERE ID = table_id;\n" "COMMIT WORK;\n" "END;\n" - , FALSE, trx); + , trx); if (err != DB_SUCCESS) { ut_a(err == DB_OUT_OF_FILE_SPACE); @@ -3510,7 +3438,7 @@ "DELETE FROM SYS_FOREIGN_COLS WHERE ID = :id;\n" "DELETE FROM SYS_FOREIGN WHERE ID = :id;\n" "END;\n" - , FALSE, trx)); + , trx)); } /******************************************************************** @@ -3676,7 +3604,7 @@ "UPDATE SYS_TABLES SET NAME = :new_table_name\n" " WHERE NAME = :old_table_name;\n" "END;\n" - , FALSE, trx); + , trx); if (err != DB_SUCCESS) { @@ -3713,8 +3641,7 @@ " SELECT ID INTO foreign_id\n" " FROM SYS_FOREIGN\n" " WHERE FOR_NAME = :old_table_name\n" - " AND TO_BINARY(FOR_NAME) = TO_BINARY(:old_table_name)\n" - " LOCK IN SHARE MODE;\n" + " AND TO_BINARY(FOR_NAME) = TO_BINARY(:old_table_name);\n" " IF (SQL % NOTFOUND) THEN\n" " found := 0;\n" " ELSE\n" @@ -3750,7 +3677,7 @@ "WHERE REF_NAME = :old_table_name\n" " AND TO_BINARY(REF_NAME) = TO_BINARY(:old_table_name);\n" "END;\n" - , FALSE, trx); + , trx); } else if (n_constraints_to_drop > 0) { /* Drop some constraints of tmp tables. */ Binary files row/row0mysql.o and /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/row/row0mysql.o differ Binary files row/row0purge.o and /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/row/row0purge.o differ Binary files row/row0row.o and /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/row/row0row.o differ diff -bu row/row0sel.c /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/row/row0sel.c --- row/row0sel.c 2006-06-08 15:22:19.000000000 +0300 +++ /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/row/row0sel.c 2006-07-28 07:40:00.000000000 +0300 @@ -45,9 +45,6 @@ #define SEL_COST_LIMIT 100 -/* The lower limit for what we consider a "big" row */ -#define BIG_ROW_SIZE 1024 - /* Flags for search shortcut */ #define SEL_FOUND 0 #define SEL_EXHAUSTED 1 @@ -1135,12 +1132,11 @@ ut_ad(plan->pcur.latch_mode == node->latch_mode); plan->n_rows_fetched++; - ret = SEL_FOUND; func_exit: if (UNIV_LIKELY_NULL(heap)) { mem_heap_free(heap); } - return(ret); + return(SEL_FOUND); } /************************************************************************* @@ -1244,8 +1240,7 @@ mtr_start(&mtr); if (consistent_read && plan->unique_search && !plan->pcur_is_open - && !plan->must_get_clust - && (plan->table->max_row_size < BIG_ROW_SIZE)) { + && !plan->must_get_clust) { if (!search_latch_locked) { rw_lock_s_lock(&btr_search_latch); @@ -1359,12 +1354,6 @@ if (srv_locks_unsafe_for_binlog || trx->isolation_level == TRX_ISO_READ_COMMITTED) { - - if (page_rec_is_supremum(next_rec)) { - - goto skip_lock; - } - lock_type = LOCK_REC_NOT_GAP; } else { lock_type = LOCK_ORDINARY; @@ -1383,7 +1372,6 @@ } } -skip_lock: if (page_rec_is_infimum(rec)) { /* The infimum record on a page cannot be in the result set, @@ -1414,12 +1402,6 @@ if (srv_locks_unsafe_for_binlog || trx->isolation_level == TRX_ISO_READ_COMMITTED) { - - if (page_rec_is_supremum(rec)) { - - goto next_rec; - } - lock_type = LOCK_REC_NOT_GAP; } else { lock_type = LOCK_ORDINARY; @@ -1646,8 +1628,7 @@ } if ((plan->n_rows_fetched <= SEL_PREFETCH_LIMIT) - || plan->unique_search || plan->no_prefetch - || (plan->table->max_row_size >= BIG_ROW_SIZE)) { + || plan->unique_search || plan->no_prefetch) { /* No prefetch in operation: go to the next table */ @@ -1933,8 +1914,9 @@ err = lock_table(0, table_node->table, i_lock_mode, thr); if (err != DB_SUCCESS) { - thr_get_trx(thr)->error_state = err; + que_thr_handle_error(thr, DB_ERROR, + NULL, 0); return(NULL); } @@ -1970,8 +1952,17 @@ thr->graph->last_sel_node = node; - if (err != DB_SUCCESS) { - thr_get_trx(thr)->error_state = err; + if (err == DB_SUCCESS) { + /* Ok: do nothing */ + + } else if (err == DB_LOCK_WAIT) { + + return(NULL); + } else { + /* SQL error detected */ + fprintf(stderr, "SQL error %lu\n", (ulong) err); + + que_thr_handle_error(thr, DB_ERROR, NULL, 0); return(NULL); } @@ -2032,7 +2023,7 @@ fprintf(stderr, "InnoDB: Error: fetch called on a closed cursor\n"); - thr_get_trx(thr)->error_state = DB_ERROR; + que_thr_handle_error(thr, DB_ERROR, NULL, 0); return(NULL); } Binary files row/row0sel.o and /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/row/row0sel.o differ Binary files row/row0uins.o and /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/row/row0uins.o differ Binary files row/row0umod.o and /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/row/row0umod.o differ Binary files row/row0undo.o and /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/row/row0undo.o differ diff -bu row/row0upd.c /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/row/row0upd.c --- row/row0upd.c 2006-06-08 15:22:19.000000000 +0300 +++ /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/row/row0upd.c 2006-07-28 07:39:59.000000000 +0300 @@ -1984,7 +1984,12 @@ error_handling: trx->error_state = err; - if (err != DB_SUCCESS) { + if (err == DB_SUCCESS) { + /* Ok: do nothing */ + } else if (err == DB_LOCK_WAIT) { + + return(NULL); + } else { return(NULL); } Binary files row/row0upd.o and /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/row/row0upd.o differ Binary files row/row0vers.o and /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/row/row0vers.o differ heikki@127:~/mysql-5.1/storage/innobase$ heikki@127:~/mysql-5.1/storage/innobase$ diff -bu trx ~/mysql-5.1.12-beta-nightly-20060728/storage/innobase/trx Common subdirectories: trx/.deps and /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/trx/.deps Only in /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/trx: Makefile Only in /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/trx: Makefile.in Binary files trx/libtrx.a and /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/trx/libtrx.a differ Binary files trx/trx0purge.o and /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/trx/trx0purge.o differ Binary files trx/trx0rec.o and /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/trx/trx0rec.o differ diff -bu trx/trx0roll.c /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/trx/trx0roll.c --- trx/trx0roll.c 2006-06-08 07:41:47.000000000 +0300 +++ /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/trx/trx0roll.c 2006-07-28 07:40:02.000000000 +0300 @@ -1286,6 +1286,7 @@ que_thr_t* thr) /* in: query thread */ { roll_node_t* node; + ibool success; ulint sig_no; trx_savept_t* savept; @@ -1312,13 +1313,19 @@ /* Send a rollback signal to the transaction */ - trx_sig_send(thr_get_trx(thr), sig_no, TRX_SIG_SELF, thr, - savept, NULL); + success = trx_sig_send(thr_get_trx(thr), + sig_no, TRX_SIG_SELF, + thr, savept, NULL); thr->state = QUE_THR_SIG_REPLY_WAIT; mutex_exit(&kernel_mutex); + if (!success) { + /* Error in delivering the rollback signal */ + que_thr_handle_error(thr, DB_ERROR, NULL, 0); + } + return(NULL); } Binary files trx/trx0roll.o and /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/trx/trx0roll.o differ Binary files trx/trx0rseg.o and /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/trx/trx0rseg.o differ Binary files trx/trx0sys.o and /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/trx/trx0sys.o differ diff -bu trx/trx0trx.c /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/trx/trx0trx.c --- trx/trx0trx.c 2006-06-08 07:41:47.000000000 +0300 +++ /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/trx/trx0trx.c 2006-07-28 07:40:05.000000000 +0300 @@ -1223,9 +1223,11 @@ /******************************************************************** Sends a signal to a trx object. */ -void +ibool trx_sig_send( /*=========*/ + /* out: TRUE if the signal was + successfully delivered */ trx_t* trx, /* in: trx handle */ ulint type, /* in: signal type */ ulint sender, /* in: TRX_SIG_SELF or @@ -1252,9 +1254,11 @@ if (!trx_sig_is_compatible(trx, type, sender)) { /* The signal is not compatible with the other signals in - the queue: die */ + the queue: do nothing */ ut_error; + + return(FALSE); } /* Queue the signal object */ @@ -1295,6 +1299,11 @@ } if ((sender != TRX_SIG_SELF) || (type == TRX_SIG_BREAK_EXECUTION)) { + + /* The following call will add a TRX_SIG_ERROR_OCCURRED + signal to the end of the queue, if the session is not yet + in the error state: */ + ut_error; } @@ -1305,6 +1314,8 @@ trx_sig_start_handle(trx, next_thr); } + + return(TRUE); } /******************************************************************** @@ -1530,6 +1541,7 @@ { commit_node_t* node; que_thr_t* next_thr; + ibool success; node = thr->run_node; @@ -1550,11 +1562,16 @@ /* Send the commit signal to the transaction */ - trx_sig_send(thr_get_trx(thr), TRX_SIG_COMMIT, TRX_SIG_SELF, - thr, NULL, &next_thr); + success = trx_sig_send(thr_get_trx(thr), TRX_SIG_COMMIT, + TRX_SIG_SELF, thr, NULL, &next_thr); mutex_exit(&kernel_mutex); + if (!success) { + /* Error in delivering the commit signal */ + que_thr_handle_error(thr, DB_ERROR, NULL, 0); + } + return(next_thr); } Binary files trx/trx0trx.o and /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/trx/trx0trx.o differ Binary files trx/trx0undo.o and /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/trx/trx0undo.o differ heikki@127:~/mysql-5.1/storage/innobase$ heikki@127:~/mysql-5.1/storage/innobase$ diff -bu ut ~/mysql-5.1.12-beta-nightly-20060728/storage/innobase/ut Common subdirectories: ut/.deps and /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/ut/.deps Only in /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/ut: Makefile Only in /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/ut: Makefile.in Binary files ut/libut.a and /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/ut/libut.a differ Binary files ut/ut0byte.o and /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/ut/ut0byte.o differ Binary files ut/ut0dbg.o and /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/ut/ut0dbg.o differ Only in /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/ut: ut0list.c Only in /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/ut: ut0list.o Binary files ut/ut0mem.o and /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/ut/ut0mem.o differ Binary files ut/ut0rnd.o and /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/ut/ut0rnd.o differ diff -bu ut/ut0ut.c /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/ut/ut0ut.c --- ut/ut0ut.c 2006-06-08 07:41:47.000000000 +0300 +++ /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/ut/ut0ut.c2006-07-28 07:39:59.000000000 +0300 @@ -30,8 +30,7 @@ /*======================*/ FILE* f, /* in: output stream */ trx_t* trx, /* in: transaction */ - ibool table_id,/* in: TRUE=print a table name, - FALSE=print other identifier */ + ibool table_id,/* in: TRUE=decode table name */ const char* name, /* in: name to print */ ulint namelen);/* in: length of name */ #endif /* !UNIV_HOTBACKUP */ @@ -401,8 +400,7 @@ /*==========*/ FILE* f, /* in: output stream */ trx_t* trx, /* in: transaction */ - ibool table_id,/* in: TRUE=print a table name, - FALSE=print other identifier */ + ibool table_id,/* in: TRUE=decode table name */ const char* name) /* in: name to print */ { ut_print_namel(f, trx, table_id, name, strlen(name)); @@ -416,8 +414,7 @@ /*===========*/ FILE* f, /* in: output stream */ trx_t* trx, /* in: transaction (NULL=no quotes) */ - ibool table_id,/* in: TRUE=print a table name, - FALSE=print other identifier */ + ibool table_id,/* in: TRUE=decode table name */ const char* name, /* in: name to print */ ulint namelen)/* in: length of name */ { Binary files ut/ut0ut.o and /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/ut/ut0ut.o differ Only in /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/ut: ut0vec.c Only in /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/ut: ut0vec.o Only in /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/ut: ut0wqueue.c Only in /home/heikki/mysql-5.1.12-beta-nightly-20060728/storage/innobase/ut: ut0wqueue.o