Sergei Golubchik
7d3288129f
create sys_var::val_str(), sys_var::val_int(), sys_var::val_real().
...
Change Item_func_get_system_var::val_xxx functions to use that.
mysql-test/t/variables.test:
@@GLOBAL.INIT_CONNECT is never NULL anymore. Nor it ever was.
It was a bug that empty string system variables appeared as NULL
in the *integer context* (but not in a string, real, or decimal context!)
2013-04-09 23:27:19 +02:00
Sergei Golubchik
eda4c51241
cleanup
2013-04-09 23:27:14 +02:00
Sergei Golubchik
3ad01d00f2
error messages: name the storage engine explicitly,
...
instead of "used storage engine" and similar changes.
2013-04-09 23:27:07 +02:00
Sergei Golubchik
ffbd15eb32
post-review comments and other minor edits
2013-04-09 16:20:59 +02:00
Sergei Golubchik
7ec57f2279
add sequence and sql_discovery suites to the default list.
...
implement ./mtr --dry-run
2013-04-09 16:20:54 +02:00
Sergei Golubchik
050d7d6d75
optimize discovery for cases when the storage engine is known in advance
2013-04-09 16:20:48 +02:00
Sergei Golubchik
3a8e1a2205
mysql-test fixes
2013-04-09 16:19:22 +02:00
Sergei Golubchik
ee92b2114d
assisted discovery in federatedx
2013-04-09 16:19:18 +02:00
Sergei Golubchik
32ee15d851
Assisted discovery
2013-04-09 16:19:14 +02:00
Sergei Golubchik
60aed41222
fix internal plugin names
2013-04-09 16:19:10 +02:00
Sergei Golubchik
db7809e817
dead code, remove unused argument
2013-04-09 16:19:05 +02:00
Sergei Golubchik
a53200d4e7
remove HA_CREATE_INFO::frm_only - it's internal server flag,
...
not part of the SE API, and, again, mutually exclusive with
C_ORDINARY_CREATE and C_CREATE_SELECT.
2013-04-09 16:19:01 +02:00
Sergei Golubchik
0c4cf3c7e5
small cleanup
2013-04-09 16:18:56 +02:00
Sergei Golubchik
9c089b04b3
TABLE_SHARE::free_frm_image() method to free the memory
...
allocated by the same allocator as in TABLE_SHARE::read_frm_image()
2013-04-09 16:18:51 +02:00
Sergei Golubchik
37379ef0ed
limit frm size, when reading it in memory
2013-04-09 16:18:47 +02:00
Sergei Golubchik
e71cda83c6
cleanup: merge two mutually dependent function arguments into one,
...
eliminating reduncancy and a possibility of setting them to a pair of
invalid values.
2013-04-09 16:18:44 +02:00
Sergei Golubchik
336da6e270
cleanup
2013-04-09 16:18:37 +02:00
Sergei Golubchik
02c712aa54
* frm extra2 segment.
...
* persistent table versions in the extra2
* ha_archive::frm_compare using TABLE_SHARE::tabledef_version
* distinguish between "important" and "optional" extra2 frm values
* write engine-defined attributes (aka "table options") to extra2, not to extra,
but still read from the old location, if they're found there.
2013-04-09 16:18:33 +02:00
Sergei Golubchik
f6168bb67b
cleanup
2013-04-09 16:18:27 +02:00
Sergei Golubchik
f6108b1fab
comments
2013-04-09 16:18:21 +02:00
Sergei Golubchik
b10937ea24
update the comment
2013-04-09 16:18:10 +02:00
Sergei Golubchik
13b7bcd5d4
sequence engine
2013-04-09 16:17:16 +02:00
Sergei Golubchik
2d788ff5ca
test_sql_discovery storage engine
...
use it to test main test cases with need_full_discover_for_existence > 0
2013-04-09 16:07:35 +02:00
Sergei Golubchik
4853c7192d
discovery using sql CREATE TABLE statement
2013-04-09 16:07:17 +02:00
Sergei Golubchik
474f45b3dc
discover of table non-existance on drop
2013-04-09 16:06:54 +02:00
Sergei Golubchik
e06cb31719
CREATE TABLE and frm-less discovering engines.
...
Now CREATE TABLE does not write the frm file on disk,
if the engine can discover it
2013-04-09 15:57:09 +02:00
Sergei Golubchik
b3e70c4ae7
split mysql_create_frm() in create_frm_image() and writefrm()
2013-04-09 15:56:59 +02:00
Sergei Golubchik
cb5473cb2f
write frm pieces contiguously, don't align them on a 4K boundary
...
(in partition_archive.test frm size goes down 16 times :)
2013-04-09 15:56:52 +02:00
Sergei Golubchik
e671cba9ed
Instead of creating and writing frm into a file peacewise
...
(allocating and freeing buffers on the way), allocate
one frm buffer, prepare the frm image completely in memory,
and then write it down.
2013-04-09 15:56:43 +02:00
Sergei Golubchik
9ec326a8b1
cleanup frm creation:
...
* comments
* cosmetic changes, *(ptr+5) -> ptr[5]
* a couple of trivial functions -> inline
* remove unused argument from pack_header()
* create_frm() no longer creates frm file (the function used to prepare and
fill a memory buffer and call my_create at the end. Now it only prepares
a memory buffer). Renamed accordingly.
* don't call pack_screen twice, go for a smaller screen area in the first attempt
* remove useless calls to check_duplicate_warning()
* don't write unireg screens to .frm files
* remove make_new_entry(), it's basically dead code, always calculating
and writing into frm the same string value. replace the function call
with the constant string.
2013-04-09 15:56:28 +02:00
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