Commit graph

77328 commits

Author SHA1 Message Date
Sergei Golubchik
84b882172d if discovery in recover_from_failed_open fails, don't bother to reopen 2013-04-09 15:51:04 +02:00
Sergei Golubchik
f597a6a694 HA_ERR_TABLE_DEF_CHANGED support in ha_archive 2013-04-09 15:50:55 +02:00
Sergei Golubchik
cdc01e29d3 remove dd_frm_type(), dd_frm_storage_engine(), dd_check_storage_engine_flag()
from everywhere - now RENAME, SHOW FULL TABLES, and TRUNCATE work with discovery.
improve error messages in truncate
2013-04-09 15:50:30 +02:00
Sergei Golubchik
15c936e4b3 open_table_def() no longer probes for the old pre-5.1 table file names.
SELECT * FROM `t-1` will no longer read "t-1.frm" file, use `#mysql50#t-1` for this.
2013-04-09 15:49:59 +02:00
Sergei Golubchik
9594107fb8 cleanups 2013-04-09 15:49:48 +02:00
Sergei Golubchik
5f69c8a594 ha_create_table: remove unused argument 2013-04-09 15:49:39 +02:00
Sergei Golubchik
556f568493 init_from_binary_frm_image: verify that we don't read beyond the image buffer 2013-04-09 15:49:30 +02:00
Sergei Golubchik
2481db063f move writing of the frm into init_from_binary_frm_image() 2013-04-09 15:49:21 +02:00
Sergei Golubchik
07b2523918 rename a handler method to more precisely reflect what kind of a hack it does 2013-04-09 15:49:13 +02:00
Sergei Golubchik
5d364e53cb handlerton::discover_table_names() can not discover only
"unknown" tables. Duplicates are possible - deal with them.
2013-04-09 15:49:00 +02:00
Sergei Golubchik
a489ae89b9 fix mysql_rm_table_no_locks() not to use dd_frm_type, because the frm file
may not exist (the table exists only in the engine).
2013-04-09 15:47:25 +02:00
Sergei Golubchik
e5a323e107 single table discovery: handlerton::discover_table() method.
fixes for need_full_discover_for_existence mode
2013-04-09 15:45:31 +02:00
Sergei Golubchik
f532653c29 remove ha_create_table_from_engine()
replace enum read_frm_op with a bitmap flags.
remove always-unused 'error' argument of get_table_share
2013-04-09 15:41:57 +02:00
Sergei Golubchik
6a839ff40d handlerton::discover_table_existence() method 2013-04-09 15:35:57 +02:00
Sergei Golubchik
934115184b convenience helpers for get_table_share() and tdc_open_view().
Pass db and table_name into a function instead of the table_list,
when only db and table name are needed.
2013-04-09 15:35:24 +02:00
Sergei Golubchik
b0a5dd73fa * remove ha_check_if_table_exists() and get_table_share_with_discover().
* rename check_if_table_exists() -> table_exists() and remove unneeded arguments
2013-04-09 15:35:15 +02:00
Sergei Golubchik
87a9d60ec6 revert
"
  revision-id: sanja@askmonty.org-20110511110948-4kdevwzomvk56y1w
  committer: sanja@askmonty.org
  branch nick: work-maria-5.1-CREATE-merge
  timestamp: Wed 2011-05-11 14:09:48 +0300
    Bugfix: New table creation/renaming block added if old encoded table present
"
the old behavior was less inconsistent than the new one.
In the new one the error message was sometimes different (under LOCK TABLES e.g.),
and there were race conditions (if this CREATE happened when a concurrent ALTER
has renamed the old table away but haven't put the new table in place)

The old one was like "(when using old table names) for DML #mysql50# prefix
is optional, for DDL it's required".
2013-04-09 15:35:07 +02:00
Sergei Golubchik
b9f42f4b7a rename open_binary_frm() to TABLE_SHARE::init_from_binary_frm_image()
simplify open_table_def()
2013-04-09 15:34:58 +02:00
Sergei Golubchik
474e5ecd1f Don't hold LOCK_open over open_table_def/open_binary_frm call 2013-04-09 15:34:49 +02:00
Sergei Golubchik
d71b75c90d moving LOCK_open into get_table_share() 2013-04-09 15:34:27 +02:00
Sergei Golubchik
163882665e * don't use 1-8 numbers for open_table_error codes, use an enum.
* print "table doesn't exist in engine" when a table doesn't exist in the engine,
  instead of "file not found" (if no file was involved)
* print a complete filename that cannot be found ('t1.MYI', not 't1')
* it's not an error for a DROP if a table doesn't exist in the engine (or some table
  files cannot be found) - if the DROP succeeded regardless
2013-04-09 15:34:17 +02:00
Sergei Golubchik
5ad68a0d2f don't use I_S constants for open_table_def and get_table_share,
have a specially defined enum with clearly named values
2013-04-09 15:34:09 +02:00
Sergei Golubchik
cda52b2cb2 remove dead HAVE_CRYPTED_FRM code
and now-unused read_string() function
2013-04-09 15:33:58 +02:00
Sergei Golubchik
0d1a595875 make the open_table_def to read the whole frm in memory
and let open_binary_frm to parse it from the buffer, not a file.
this avoids jumping back in forth in the frm file, and doing
intermediate buffer mallocs.
2013-04-09 15:33:49 +02:00
Sergei Golubchik
03dfb2c121 file-based table discovery for discovering storage engines
also:
* move few tests from archive/archive.test to archive/discover.test
* fix (unintentionally) bug#34104, updated result files
2013-04-09 15:31:29 +02:00
unknown
e5cbefeb89 MDEV-26, Global transaction ID.
Fix three more test failures seen in buildbot (one of them ported
from main tree).
2013-04-09 11:46:38 +02:00
Igor Babaev
1db675b6e8 Fixed mdev-4380.
Uninitialized field next_equal_field of the Field objects created
for the fields of a temporary table could hang the server.
2013-04-08 21:30:42 -07:00
Igor Babaev
ddb84f909c Fixed mdev-4378.
Uninitialized field cond_selectivity of the Field objects created
for the fields of a temporary table could cause an assertion abort.
2013-04-08 17:40:58 -07:00
Vladislav Vaintroub
5ae72bb73c MDEV-4356 : MariaDB does not start if bind-address gets resolved to more than single IP address.
MySQL bug http://bugs.mysql.com/bug.php?id=61713 was fixed in 5.5
  
Fix is to remove check for multiple entries returned by getaddrinfo(), and use the first entry that works  - i.e socket can be created.  

Unlike Oracle/MySQL's fix ,this one  is kept minimal : 
-  we do not prioritize IPv4 over IPv6,  orr other way around,  and just rely on operating system to sort getaddrinfo() entries in sensible order. There is RFC that defines  what is sensible order for getaddrinfo entries ( RFC 3484), and OS specific tweaks are also possible , like /etc/gai.conf o Linux.
-  also,  we do not force "0.0.0.0" address if bind-address is not given -  this would be a change in behavior of 5.5 at least on Windows, where passing NULL as  to getaddrinfo()  gives back IPv6-wildcard.
2013-04-07 20:32:39 +02:00
Sergei Golubchik
2a9662b401 find_files(): don't sort files in my_dir(), sort table names
after all engines have discovered their tables
  
side effect: correct alphabetical sorting as in ORDER BY ... COLLATE utf8_bin,
information_schema is no longer the first after find_files(),
tables like #mysql50#zzz are sorted first (as per table name),
not last (as per file name zzz).
2013-04-07 17:17:25 +02:00
Sergei Golubchik
8980e67693 * use Dynamic_array<> instead of List<> for the list of found tables in sql_show.cc
* make find_files static
2013-04-07 17:11:19 +02:00
Sergei Golubchik
69ba585a1e remove #if MYSQL_VERSION_ID
there is no "upstream" OQGraph version that needs to stay compatible
with different MariaDB releases.
2013-04-07 17:09:05 +02:00
Sergei Golubchik
58e62d701e * move bas_ext from the handler to the handlerton
* provide a default bas_ext value of the empty list
2013-04-07 17:08:49 +02:00
Sergei Golubchik
09ece94fac remove handlerton::find_files (new implementation is coming),
and handlerton::table_exists_in_engine (new implementation is coming),
and handlerton::license (redundant)
2013-04-07 15:57:38 +02:00
Sergei Golubchik
94753d8b94 small cleanup - remove prehistoric DB_TYPE_xxx values 2013-04-07 15:44:19 +02:00
Sergei Golubchik
0d405ed02f remove long time obsolete xyz_ci() copies of xyz() macros 2013-04-07 15:40:59 +02:00
Sergei Golubchik
73f79ac83f simpler fix for mysql bug #56085, no need to write an error interceptor,
when the function has a dedicated flag for this very use case.
2013-04-07 15:37:47 +02:00
Sergei Golubchik
028ce66c9e simplify test case 2013-04-07 15:36:37 +02:00
Sergei Golubchik
ccc9238335 s/st_ha_create_information/HA_CREATE_INFO/ 2013-04-07 15:35:39 +02:00
Sergei Golubchik
e727741614 typo fixed 2013-04-07 15:27:35 +02:00
Sergei Golubchik
8b4d967798 bugfix: MYSQL_THDVAR_STR plugins with PLUGIN_VAR_MEMALLOC didn't work
(PLUGIN_VAR_MEMALLOC ix 0x8000 and cannot be saved in a char as such)
2013-04-07 15:26:58 +02:00
Sergei Golubchik
0614af18a6 macro do {} while(0) safety 2013-04-07 15:20:58 +02:00
Sergei Golubchik
bbbd7cedf5 my_dir() cleanup
* replace pointer acrobatics with a struct
* make sorting explicit: MY_DONT_SORT -> MY_WANT_SORT
(if you want something to be done - say it. fixes all places where
my_dir() was used without thinking)
* typo s/number_off_files/number_of_files/
* directory_file_name() doesn't need to be extern
* remove #ifdef __BORLANDC__
* ignore '.' and '..' entries
2013-04-07 15:19:45 +02:00
Sergei Golubchik
fdcaa6cb32 clarify CREATE grammar 2013-04-07 14:54:43 +02:00
Sergei Golubchik
e7036ec1a2 mtr bug: files outside of both the suite dir and the overlay dir, were
treated as coming from the overlay.
  
(example: archive suite, test_sql_discovery overlay, mysql-test/include/have_archive.inc)
2013-04-07 14:51:16 +02:00
Sergei Golubchik
48bb551328 remove the service for installing the closed-source mysql thread pool plugin 2013-04-07 14:50:01 +02:00
Sergei Golubchik
78c0642073 consistency in declaring service symbols 2013-04-07 14:43:26 +02:00
Sergei Golubchik
daac5b511c cleanup 2013-04-07 14:41:05 +02:00
Sergei Golubchik
37ad8d06e1 cleanup 2013-04-07 14:40:45 +02:00
Sergei Golubchik
a6fa724b7f split THD::make_lex_string() in two 2013-04-07 14:36:53 +02:00