Inconsistent % Wildcard behaviour

Inconsistent % Wildcard behaviour

am 07.04.2004 16:07:01 von Andreas Pardeike

Hi,

If I run

drop table if exists t;
create table t (f varchar(32) not null);
alter table t add index (f);
insert into t VALUES ('Guldböcker'),('Presentböcker');
select count(*) from t where f like '%böcker%';
select count(*) from t where f like '%böcker';

I get "1" from the first select and "2" from the second
select. This seems like a bug.


INFO
mysqladmin Ver 8.40 Distrib 4.1.1-alpha, for pc-linux on i686
Server version 4.1.1-alpha-standard
Protocol version 10
Connection Localhost via UNIX socket
UNIX socket /var/lib/mysql/mysql.sock

> mysqladmin variables
| back_log | 50 =20=

=20=

=20=

| basedir | /usr/ =20=

=20=

=20=

| binlog_cache_size =20=

| 32768 =20=

=20=

|=20
character_set | latin1 =20=

=20=

=20=

| character_sets | latin1 big5=20
cp1251 cp1257 croat czech danish dec8 dos estonia euc_kr gb2312 gbk=20
german1 greek hebrew hp8 hungarian koi8_ru koi8_ukr latin2 latin5 swe7=20=

usa7 win1250 win1251 win1251ukr ujis sjis tis620 | concurrent_insert =20=

| ON =20=

=20=

|=20=

connect_timeout | 5 =20=

=20=

=20=

| datadir | /var/lib/mysql/ =20=

=20=

=20=

| delay_key_write =20=

| ON =20=

=20=

|=20
delayed_insert_limit | 100 =20=

=20=

=20=

| delayed_insert_timeout | 300 =20=

=20=

=20=

| delayed_queue_size =20=

| 1000 =20=

=20=

| flush =20=

| OFF =20=

=20=

=20=

| flush_time | 0 =20=

=20=

=20=

| have_bdb | NO =20=

=20=

=20=

| have_gemini =20=

| NO =20=

=20=

|=20
have_innodb | DISABLED =20=

=20=

=20=

| have_isam | YES =20=

=20=

=20=

| have_raid =20=

| NO =20=

=20=

|=20
have_openssl | NO =20=

=20=

=20=

| init_file | =20=

=20=

=20=

| innodb_additional_mem_pool_size=20=

| 1048576 =20=

=20=

|=20
innodb_buffer_pool_size | 8388608 =20=

=20=

=20=

| innodb_data_file_path | =20=

=20=

=20=

| innodb_data_home_dir =20=

| =20=

=20=

|=20
innodb_file_io_threads | 4 =20=

=20=

=20=

| innodb_force_recovery | 0 =20=

=20=

=20=

| innodb_thread_concurrency =20=

| 8 =20=

=20=

|=20
innodb_flush_log_at_trx_commit | 1 =20=

=20=

=20=

| innodb_fast_shutdown | ON =20=

=20=

=20=

| innodb_flush_method =20=

| =20=

=20=

|=20
innodb_lock_wait_timeout | 50 =20=

=20=

=20=

| innodb_log_arch_dir | =20=

=20=

=20=

| innodb_log_archive =20=

| OFF =20=

=20=

|=20
innodb_log_buffer_size | 1048576 =20=

=20=

=20=

| innodb_log_file_size | 5242880 =20=

=20=

=20=

| innodb_log_files_in_group =20=

| 2 =20=

=20=

|=20
innodb_log_group_home_dir | =20=

=20=

=20=

| innodb_mirrored_log_groups | 1 =20=

=20=

=20=

| interactive_timeout =20=

| 28800 =20=

=20=

|=20
join_buffer_size | 131072 =20=

=20=

=20=

| key_buffer_size | 8388600 =20=

=20=

=20=

| language =20=

| /usr/share/mysql/english/ =20=

=20=

|=20
large_files_support | ON =20=

=20=

=20=

| locked_in_memory | OFF =20=

=20=

=20=

| log =20=

| OFF =20=

=20=

| log_update =20=

| OFF =20=

=20=

=20=

| log_bin | OFF =20=

=20=

=20=

| log_slave_updates | OFF =20=

=20=

=20=

| log_long_queries =20=

| OFF =20=

=20=

|=20
long_query_time | 10 =20=

=20=

=20=

| low_priority_updates | OFF =20=

=20=

=20=

| lower_case_table_names =20=

| 0 =20=

=20=

|=20
max_allowed_packet | 1048576 =20=

=20=

=20=

| max_binlog_cache_size | 4294967295 =20=

=20=

=20=

| max_binlog_size =20=

| 1073741824 =20=

=20=

|=20
max_connections | 100 =20=

=20=

=20=

| max_connect_errors | 10 =20=

=20=

=20=

| max_delayed_threads =20=

| 20 =20=

=20=

|=20
max_heap_table_size | 16777216 =20=

=20=

=20=

| max_join_size | 4294967295 =20=

=20=

=20=

| max_sort_length =20=

| 1024 =20=

=20=

|=20
max_user_connections | 0 =20=

=20=

=20=

| max_tmp_tables | 32 =20=

=20=

=20=

| max_write_lock_count =20=

| 4294967295 =20=

=20=

|=20
myisam_max_extra_sort_file_size | 256 =20=

=20=

=20=

| myisam_max_sort_file_size | 2047 =20=

=20=

=20=

| myisam_recover_options =20=

| 0 =20=

=20=

|=20
myisam_sort_buffer_size | 8388608 =20=

=20=

=20=

| net_buffer_length | 16384 =20=

=20=

=20=

| net_read_timeout =20=

| 30 =20=

=20=

|=20
net_retry_count | 10 =20=

=20=

=20=

| net_write_timeout | 60 =20=

=20=

=20=

| open_files_limit =20=

| 0 =20=

=20=

| pid_file =20=

| /var/run/mysqld/mysqld.pid =20=

=20=

=20=

| port | 3306 =20=

=20=

=20=

| protocol_version | 10 =20=

=20=

=20=

| record_buffer =20=

| 131072 =20=

=20=

|=20
record_rnd_buffer | 131072 =20=

=20=

=20=

| query_buffer_size | 0 =20=

=20=

=20=

| safe_show_database =20=

| OFF =20=

=20=

| server_id =20=

| 0 =20=

=20=

=20=

| slave_net_timeout | 3600 =20=

=20=

=20=

| skip_locking | ON =20=

=20=

=20=

| skip_networking =20=

| OFF =20=

=20=

|=20
skip_show_database | OFF =20=

=20=

=20=

| slow_launch_time | 2 =20=

=20=

=20=

| socket =20=

| /var/lib/mysql/mysql.sock =20=

=20=

| sort_buffer=20=

| 2097144 =20=

=20=

=20=

| sql_mode | 0 =20=

=20=

=20=

| table_cache | 64 =20=

=20=

=20=

| table_type =20=

| MYISAM =20=

=20=

|=20
thread_cache_size | 0 =20=

=20=

=20=

| thread_stack | 65536 =20=

=20=

=20=

| transaction_isolation =20=

| READ-COMMITTED =20=

=20=

| timezone =20=

| CET =20=

=20=

=20=

| tmp_table_size | 33554432 =20=

=20=

=20=

| tmpdir | /tmp/ =20=

=20=

=20=

| version =20=

| 3.23.58 =20=

=20=

|=20
wait_timeout | 28800

Andreas Pardeike=


--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=3Dgcdmb-bugs@m.gmane.org

Re: Inconsistent % Wildcard behaviour

am 07.04.2004 18:05:38 von Sergei Golubchik

Hi!

On Apr 07, Andreas Pardeike wrote:
> Hi,
>
> If I run
>
> drop table if exists t;
> create table t (f varchar(32) not null);
> alter table t add index (f);
> insert into t VALUES ('Guldböcker'),('Presentböcker');
> select count(*) from t where f like '%böcker%';
> select count(*) from t where f like '%böcker';
>
> I get "1" from the first select and "2" from the second
> select. This seems like a bug.
>
>
> INFO
> mysqladmin Ver 8.40 Distrib 4.1.1-alpha, for pc-linux on i686
> Server version 4.1.1-alpha-standard

As far as I remember it was a bug that is already fixed in the
development tree (at least I failed to repeat it).
Should be out soon in 4.1.2.

Regards,
Sergei

--
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Sergei Golubchik
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Senior Software Developer
/_/ /_/\_, /___/\___\_\___/ Osnabrueck, Germany
<___/ www.mysql.com

--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org