diff options
author | unknown <msvensson@pilot.(none)> | 2007-06-19 11:31:34 +0200 |
---|---|---|
committer | unknown <msvensson@pilot.(none)> | 2007-06-19 11:31:34 +0200 |
commit | 75689af808d935de69a39138e35cde575c982251 (patch) | |
tree | c2668ecbca1fc441f2a39eb25cbb54f16181414a /sql/table.cc | |
parent | 3955e94c34d638df24c5d640558a5aee14342603 (diff) | |
parent | 54c531607df9b14f206fa8a44f39f2764f55ac82 (diff) | |
download | mariadb-git-75689af808d935de69a39138e35cde575c982251.tar.gz |
Merge bk-internal:/home/bk/mysql-5.1-maint
into pilot.(none):/data/msvensson/mysql/mysql-5.1-new-maint
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/t/mysqltest.test:
Auto merged
BitKeeper/deleted/.del-wait_for_slave_io_to_stop.inc:
Auto merged
Diffstat (limited to 'sql/table.cc')
-rw-r--r-- | sql/table.cc | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/sql/table.cc b/sql/table.cc index 745f3a2a34e..eab4d175fd8 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -343,10 +343,25 @@ int open_table_def(THD *thd, TABLE_SHARE *share, uint db_flags) strxmov(path, share->normalized_path.str, reg_ext, NullS); if ((file= my_open(path, O_RDONLY | O_SHARE, MYF(0))) < 0) { - if (strchr(share->table_name.str, '@')) + /* + We don't try to open 5.0 unencoded name, if + - non-encoded name contains '@' signs, + because '@' can be misinterpreted. + It is not clear if '@' is escape character in 5.1, + or a normal character in 5.0. + + - non-encoded db or table name contain "#mysql50#" prefix. + This kind of tables must have been opened only by the + my_open() above. + */ + if (strchr(share->table_name.str, '@') || + !strncmp(share->db.str, MYSQL50_TABLE_NAME_PREFIX, + MYSQL50_TABLE_NAME_PREFIX_LENGTH) || + !strncmp(share->table_name.str, MYSQL50_TABLE_NAME_PREFIX, + MYSQL50_TABLE_NAME_PREFIX_LENGTH)) goto err_not_open; - /* Try unecoded 5.0 name */ + /* Try unencoded 5.0 name */ uint length; strxnmov(path, sizeof(path)-1, mysql_data_home, "/", share->db.str, "/", @@ -726,7 +741,8 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head, { uint32 partition_info_len = uint4korr(next_chunk); #ifdef WITH_PARTITION_STORAGE_ENGINE - if ((share->partition_info_len= partition_info_len)) + if ((share->partition_info_buffer_size= + share->partition_info_len= partition_info_len)) { if (!(share->partition_info= (char*) memdup_root(&share->mem_root, next_chunk + 4, |