| Bug #57795 | Simple queries return wrong result after update from 5.1.41 to 5.1.49 and 5.1.51 | ||
|---|---|---|---|
| Submitted: | 28 Oct 2010 9:20 | Modified: | 1 Nov 2010 9:09 |
| Reporter: | Martin Thorsen Ranang | Email Updates: | |
| Status: | Duplicate | Impact on me: | |
| Category: | MySQL Server: Optimizer | Severity: | S2 (Serious) |
| Version: | 5.1.49, 5.1.51 | OS: | Linux (Ubuntu 10.10 Maverick Meerkat) |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | query inconsistency, regression | ||
[28 Oct 2010 9:20]
Martin Thorsen Ranang
[28 Oct 2010 9:21]
Martin Thorsen Ranang
Simple script to repeat results.
Attachment: pure_sql.sql (text/x-sql), 3.39 KiB.
[28 Oct 2010 9:43]
Valeriy Kravchuk
Verified just as described:
...
C:\Program Files\MySQL\MySQL Server 5.1\bin>mysql -uroot -proot -P3310 test
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 24
Server version: 5.1.51-community MySQL Community Server (GPL)
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> SELECT activity.activity_id AS activity_activity_id,
-> activity.name AS activity_name
-> FROM activity, activity_participant AS activity_participant_1
-> WHERE activity.activity_id = 2
-> AND activity.activity_id = activity_participant_1.activity_id
-> AND 1 = activity_participant_1.user_id;
Empty set (0.00 sec)
mysql> SELECT activity.activity_id AS activity_activity_id,
-> activity.name AS activity_name
-> FROM activity, activity_participant AS activity_participant_1 FORCE INDEX
(activity_id)
-> WHERE activity.activity_id = 2
-> AND activity.activity_id = activity_participant_1.activity_id
-> AND 1 = activity_participant_1.user_id;
+----------------------+---------------+
| activity_activity_id | activity_name |
+----------------------+---------------+
| 2 | writing #1 |
+----------------------+---------------+
1 row in set (0.00 sec)
[28 Oct 2010 9:54]
Martin Thorsen Ranang
Hi, I just forgot to supply some basic system information:
$ uname -a
Linux mtr-laptop 2.6.35-22-generic #35-Ubuntu SMP Sat Oct 16 20:36:48 UTC 2010 i686 GNU/Linux
$ dpkg --status libc6 libgcc1 libstdc++6 |grep 'Package:\|Version:'
Package: libc6
Version: 2.12.1-0ubuntu8
Package: libgcc1
Version: 1:4.5.1-7ubuntu2
Package: libstdc++6
Version: 4.5.1-7ubuntu2
$ sudo lshw -sanitize |head -104
computer
description: Notebook
product: 17068GG
vendor: LENOVO
version: ThinkPad X60
serial: [REMOVED]
width: 32 bits
capabilities: smbios-2.4 dmi-2.4 smp-1.4 smp
configuration: administrator_password=disabled boot=normal chassis=notebook cpus=2 frontpanel_password=unknown keyboard_password=disabled power-on_password=disabled uuid=5FD0BA01-4896-11CB-8041-AAC48D558B25
*-core
description: Motherboard
product: 17068GG
vendor: LENOVO
physical id: 0
version: Not Available
serial: [REMOVED]
*-firmware
description: BIOS
vendor: LENOVO
physical id: 0
version: 7BETD6WW (2.17 ) (06/19/2008)
size: 144KiB
capacity: 1984KiB
capabilities: pci pcmcia pnp upgrade shadowing escd cdboot bootselect socketedrom edd acpi usb biosbootspecification
*-cpu:0
description: CPU
product: Genuine Intel(R) CPU T2400 @ 1.83GHz
vendor: Intel Corp.
physical id: 6
bus info: cpu@0
version: 6.14.8
serial: [REMOVED]
slot: None
size: 1833MHz
capacity: 1833MHz
width: 32 bits
clock: 167MHz
capabilities: boot fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx constant_tsc arch_perfmon bts aperfmperf pni monitor vmx est tm2 xtpr pdcm cpufreq
configuration: id=0
*-cache:0
description: L1 cache
physical id: a
slot: Internal L1 Cache
size: 64KiB
capacity: 64KiB
capabilities: synchronous internal write-back instruction
*-cache:1
description: L2 cache
physical id: c
slot: Internal L2 Cache
size: 2MiB
capacity: 2MiB
capabilities: burst internal write-back unified
*-logicalcpu:0
description: Logical CPU
physical id: 0.1
width: 32 bits
capabilities: logical
*-logicalcpu:1
description: Logical CPU
physical id: 0.2
width: 32 bits
capabilities: logical
*-cache
description: L1 cache
physical id: b
slot: Internal L1 Cache
size: 64KiB
capacity: 64KiB
capabilities: synchronous internal write-back data
*-memory
description: System Memory
physical id: 29
slot: System board or motherboard
size: 4GiB
*-bank:0
description: SODIMM DDR2 Synchronous
physical id: 0
slot: DIMM 1
size: 2GiB
width: 64 bits
*-bank:1
description: SODIMM DDR2 Synchronous
physical id: 1
slot: DIMM 2
size: 2GiB
width: 64 bits
*-cpu:1
physical id: 1
bus info: cpu@1
version: 6.14.8
serial: [REMOVED]
size: 1833MHz
capacity: 1833MHz
capabilities: vmx ht cpufreq
configuration: id=0
*-logicalcpu:0
description: Logical CPU
physical id: 0.1
capabilities: logical
*-logicalcpu:1
description: Logical CPU
physical id: 0.2
capabilities: logical
[28 Oct 2010 15:08]
Sergei Glukhov
The problem fixed in Bug#56423.
[1 Nov 2010 9:09]
Sergei Glukhov
The problem is not repeatable in latest 5.1 tree, it's fixed in Bug#56423. This bug is closed as duplicate.
