diff options
author | unknown <heikki@hundin.mysql.fi> | 2003-02-19 19:38:38 +0200 |
---|---|---|
committer | unknown <heikki@hundin.mysql.fi> | 2003-02-19 19:38:38 +0200 |
commit | fe673a80b12da51ea3fe6d4c499112b6073335b4 (patch) | |
tree | 3e8b1e00b266ba7e43a094059250180d36039004 | |
parent | 35391c733e978128c4a43b6bb34580b1054a08a8 (diff) | |
download | mariadb-git-fe673a80b12da51ea3fe6d4c499112b6073335b4.tar.gz |
row0sel.c:
Print a warning if MySQL uses a partial-field key value prefix in a search; that would not work if the search flag would happen to be HA_READ_PREFIX_LAST
innobase/row/row0sel.c:
Print a warning if MySQL uses a partial-field key value prefix in a search; that would not work if the search flag would happen to be HA_READ_PREFIX_LAST
-rw-r--r-- | innobase/row/row0sel.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/innobase/row/row0sel.c b/innobase/row/row0sel.c index ea5b3020c08..ef12bd9362a 100644 --- a/innobase/row/row0sel.c +++ b/innobase/row/row0sel.c @@ -1926,7 +1926,19 @@ row_sel_convert_mysql_key_to_innobase( if (key_ptr > key_end) { /* The last field in key was not a complete - field but a prefix of it */ + field but a prefix of it. + + Print a warning about this! HA_READ_PREFIX_LAST + does not currently work in InnoDB with partial-field + key value prefixes. Since MySQL currently uses a + padding trick to calculate LIKE 'abc%' type queries + there should never be partial-field prefixes + in searches. */ + + ut_print_timestamp(stderr); + + fprintf(stderr, + " InnoDB: Warning: using a partial-field key prefix in search\n"); ut_ad(dfield_get_len(dfield) != UNIV_SQL_NULL); |