From: monty Date: April 26 2005 1:03pm Subject: bk commit into 4.1 tree (monty:1.2207) List-Archive: http://lists.mysql.com/internals/24314 Message-Id: <20050426130325.51F6B3DD49@narttu.mysql.com> Below is the list of changes that have just been committed into a local 4.1 repository of monty. When monty does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet 1.2207 05/04/26 16:03:20 monty@stripped +1 -0 Merge bk-internal.mysql.com:/home/bk/mysql-4.1 into mysql.com:/home/my/mysql-4.1 sql/mysqld.cc 1.569 05/04/26 16:03:19 monty@stripped +0 -0 Auto merged # This is a BitKeeper patch. What follows are the unified diffs for the # set of deltas contained in the patch. The rest of the patch, the part # that BitKeeper cares about, is below these diffs. # User: monty # Host: narttu.mysql.com # Root: /home/my/mysql-4.1/RESYNC --- 1.568/sql/mysqld.cc 2005-04-06 15:53:30 +03:00 +++ 1.569/sql/mysqld.cc 2005-04-26 16:03:19 +03:00 @@ -773,15 +773,6 @@ CloseHandle(hEvent); */ } -#ifdef HAVE_SMEM - /* - Send event to smem_event_connect_request for aborting - */ - if (!SetEvent(smem_event_connect_request)) - { - DBUG_PRINT("error",("Got error: %ld from SetEvent of smem_event_connect_request",GetLastError())); - } -#endif #endif #elif defined(OS2) pthread_cond_signal( &eventShutdown); // post semaphore @@ -835,6 +826,18 @@ else sql_print_error(ER(ER_GOT_SIGNAL),my_progname,sig); /* purecov: inspected */ +#if defined(HAVE_SMEM) && defined(__WIN__) + /* + Send event to smem_event_connect_request for aborting + */ + if (!SetEvent(smem_event_connect_request)) + { + DBUG_PRINT("error", + ("Got error: %ld from SetEvent of smem_event_connect_request", + GetLastError())); + } +#endif + #if defined(__NETWARE__) || (defined(USE_ONE_SIGNAL_HAND) && !defined(__WIN__) && !defined(OS2)) my_thread_init(); // If this is a new thread #endif @@ -1162,6 +1165,7 @@ err: sql_print_error("Fatal error: Can't change to run as user '%s' ; Please check that the user exists!\n",user); + unireg_abort(1); #endif return NULL; } @@ -2423,8 +2427,10 @@ { struct tm tm_tmp; localtime_r(&start_time,&tm_tmp); - strmov(system_time_zone, tzname[tm_tmp.tm_isdst != 0 ? 1 : 0]); - } + strmake(system_time_zone, tzname[tm_tmp.tm_isdst != 0 ? 1 : 0], + sizeof(system_time_zone)-1); + + } #endif /* We set SYSTEM time zone as reasonable default and @@ -3078,7 +3084,8 @@ if (opt_bootstrap) { - int error=bootstrap(stdin); + select_thread_in_use= 0; // Allow 'kill' to work + int error= bootstrap(stdin); end_thr_alarm(1); // Don't allow alarms unireg_abort(error ? 1 : 0); } @@ -4549,7 +4556,7 @@ "Specify number of autoincrement values that are prefetched.", (gptr*) &global_system_variables.ndb_autoincrement_prefetch_sz, (gptr*) &global_system_variables.ndb_autoincrement_prefetch_sz, - 0, GET_INT, REQUIRED_ARG, 32, 1, 256, 0, 0, 0}, + 0, GET_ULONG, REQUIRED_ARG, 32, 1, 256, 0, 0, 0}, {"ndb-force-send", OPT_NDB_FORCE_SEND, "Force send of buffers to ndb immediately without waiting for " "other threads.", @@ -6181,9 +6188,10 @@ case OPT_STORAGE_ENGINE: { if ((enum db_type)((global_system_variables.table_type= - ha_resolve_by_name(argument, strlen(argument)))) == DB_TYPE_UNKNOWN) + ha_resolve_by_name(argument, strlen(argument)))) == + DB_TYPE_UNKNOWN) { - fprintf(stderr,"Unknown table type: %s\n",argument); + fprintf(stderr,"Unknown/unsupported table type: %s\n",argument); exit(1); } break; @@ -6432,6 +6440,22 @@ if (opt_bdb) sql_print_warning("this binary does not contain BDB storage engine"); #endif + + /* + Check that the default storage engine is actually available. + */ + if (!ha_storage_engine_is_enabled((enum db_type) + global_system_variables.table_type)) + { + if (!opt_bootstrap) + { + sql_print_error("Default storage engine (%s) is not available", + ha_get_storage_engine((enum db_type) + global_system_variables.table_type)); + exit(1); + } + global_system_variables.table_type= DB_TYPE_MYISAM; + } if (argc > 0) {