You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.7 KiB

26 years ago
26 years ago
26 years ago
26 years ago
26 years ago
26 years ago
26 years ago
26 years ago
26 years ago
  1. /* Copyright (C) 2000-2005 MySQL AB
  2. This program is free software; you can redistribute it and/or modify
  3. it under the terms of the GNU General Public License as published by
  4. the Free Software Foundation; version 2 of the License.
  5. This program is distributed in the hope that it will be useful,
  6. but WITHOUT ANY WARRANTY; without even the implied warranty of
  7. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  8. GNU General Public License for more details.
  9. You should have received a copy of the GNU General Public License
  10. along with this program; if not, write to the Free Software
  11. Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
  12. /**
  13. @file
  14. @brief
  15. Init and dummy functions for interface with unireg
  16. */
  17. #include "sql_priv.h"
  18. #include "init.h"
  19. #include "my_sys.h"
  20. #include "mysqld.h" // abort_loop, ...
  21. #include "my_time.h" // my_init_time
  22. #include "unireg.h" // SPECIAL_SAME_DB_NAME
  23. #include <m_ctype.h>
  24. void unireg_init(ulong options)
  25. {
  26. DBUG_ENTER("unireg_init");
  27. error_handler_hook = my_message_stderr;
  28. abort_loop=0;
  29. my_disable_async_io=1; /* aioread is only in shared library */
  30. wild_many='%'; wild_one='_'; wild_prefix='\\'; /* Change to sql syntax */
  31. current_pid=(ulong) getpid(); /* Save for later ref */
  32. my_init_time(); /* Init time-functions (read zone) */
  33. #ifndef EMBEDDED_LIBRARY
  34. my_abort_hook=unireg_abort; /* Abort with close of databases */
  35. #endif
  36. (void) strmov(reg_ext,".frm");
  37. reg_ext_length= 4;
  38. specialflag=SPECIAL_SAME_DB_NAME | options; /* Set options from argv */
  39. DBUG_VOID_RETURN;
  40. }