1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

non-functional cleanup, clarifying CONVERT_IF_BIGGER_TO_BLOB

This commit is contained in:
Sergei Golubchik
2013-01-07 20:21:05 +01:00
parent ac45f3b38a
commit 78d9fdb134
11 changed files with 37 additions and 10 deletions

View File

@@ -853,8 +853,7 @@ bool subquery_types_allow_materialization(Item_in_subselect *in_subs)
create a blob column because item->max_length is too big.
The following check is copied from Item::make_string_field():
*/
if (inner->max_length / inner->collation.collation->mbmaxlen >
CONVERT_IF_BIGGER_TO_BLOB)
if (inner->too_big_for_varchar())
{
DBUG_RETURN(FALSE);
}
@@ -3865,6 +3864,7 @@ SJ_TMP_TABLE::create_sj_weedout_tmp_table(THD *thd)
fn_format(path, path, mysql_tmpdir, "", MY_REPLACE_EXT|MY_UNPACK_FILENAME);
/* STEP 2: Figure if we'll be using a key or blob+constraint */
/* it always has my_charset_bin, so mbmaxlen==1 */
if (uniq_tuple_length_arg >= CONVERT_IF_BIGGER_TO_BLOB)
using_unique_constraint= TRUE;