ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: "Mikhail Nikitin" <inform@uslugionline.ru>
To: <Mandrake-russian@altlinux.ru>
Subject: [mdk-re] MySQL SQL implementation bug?
Date: Mon Aug 27 17:53:12 2001
Message-ID: <013401c12eff$003165a0$01000001@darkstar> (raw)

Добрый день, господа!

Итак, есть проблема от которой становится не по себе:

Есть БД MySQL (mysql  Ver 11.15 Distrib 3.23.39, for unknown-freebsdelf4.3
(i386))
хотя платформа неважна.
Есть в базе данных таблица:

+-------+------------------+------+-----+---------+-------+
| Field | Type             | Null | Key | Default | Extra |
+-------+------------------+------+-----+---------+-------+
| name  | varchar(255)     |      | PRI |         |       |
| id    | int(10) unsigned |      |     | 0       |       |
| exact | enum('n','y')    |      |     | n       |       |
+-------+------------------+------+-----+---------+-------+

Короче говоря, есть поле name - текстовое, являющееся ключом.
Берем запрос "SELECT * FROM 'имя таблицы' WHERE name LIKE '%name%'";
или, говоря по-русски - делаем выборку всех записей, которые содержат в поле
name текст "name". Заметьте, что оно совпадает с названием поля.

И как вы думаете - что выдаст этот запрос?

Ответ: ВСЁ СОДЕРЖИМОЕ ТАБЛИЦЫ вне зависимости от содержания в записях
фрагмента 'name'. ЭТО НОРМАЛЬНО или это жирный Bug?

Михаил
--
I am the "ILOVEGNU" signature virus. Just copy me to your signature.
This email was infected under the terms of the GNU General Public License.





             reply	other threads:[~2001-08-27 17:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-27 17:53 Mikhail Nikitin [this message]
2001-08-27 20:46 ` Vlad Vostrykh
2001-08-27 20:53 ` Vadim V. Zhytnikov
2001-08-28 14:01   ` Mikhail Nikitin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='013401c12eff$003165a0$01000001@darkstar' \
    --to=inform@uslugionline.ru \
    --cc=Mandrake-russian@altlinux.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git