ALT Linux Sisyphus discussions
 help / color / mirror / Atom feed
* [sisyphus] MySQL 5.1 из Дедала
@ 2009-07-05 13:21 Michael Bykov
  2009-07-05 13:42 ` Vladimir Lettiev
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Bykov @ 2009-07-05 13:21 UTC (permalink / raw)
  To: ALT Linux Sisyphus discussions

Салют,

сорри, про Дедал, наверное, оффтопик.

загадочное явление, мигрировал на 5.1, кажется без проблем. И вот те раз:

mysql> show fields from assets;
+-------------------+---------------+------+-----+---------+----------------+
| Field             | Type          | Null | Key | Default | Extra          |
+-------------------+---------------+------+-----+---------+----------------+
| accessible        | int(11)       | YES  |     | NULL    |                |
| current_amount    | int(11)       | YES  |     | NULL    |                |
| store_id          | int(11)       | YES  | MUL | 0       |                |
| group_id          | int(11)       | YES  | MUL | 0       |                |

select * from assets where store_id > 0;

всё отлично, select current_amount - всё отлично, но

mysql> select * from assets where accessible > 0;
ERROR 1064 (42000): You have an error in your SQL syntax; check the
manual that corresponds to your MySQL server version for the right
syntax to use near 'accessible > 0' at line 1

В чём может быть причина? Как поправить?

MySQL5.1-server-5.1.28-alt0.1.i586.rpm


М.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [sisyphus] MySQL 5.1 из Дедала
  2009-07-05 13:21 [sisyphus] MySQL 5.1 из Дедала Michael Bykov
@ 2009-07-05 13:42 ` Vladimir Lettiev
  2009-07-05 13:49   ` Michael Bykov
  0 siblings, 1 reply; 3+ messages in thread
From: Vladimir Lettiev @ 2009-07-05 13:42 UTC (permalink / raw)
  To: ALT Linux Sisyphus discussions

[-- Attachment #1: Type: text/plain, Size: 838 bytes --]

On Sun, Jul 05, 2009 at 05:21:43PM +0400, Michael Bykov wrote:
> 
> загадочное явление, мигрировал на 5.1, кажется без проблем. И вот те раз:
...
> mysql> select * from assets where accessible > 0;
> ERROR 1064 (42000): You have an error in your SQL syntax; check the
> manual that corresponds to your MySQL server version for the right
> syntax to use near 'accessible > 0' at line 1
> 
> В чём может быть причина? Как поправить?
> 
> MySQL5.1-server-5.1.28-alt0.1.i586.rpm

"accessible" зарезервированное слово в 5.1: http://dev.mysql.com/doc/mysqld-version-reference/en/mysqld-version-reference-reservedwords-5-1.html
надо переименовать имя столбца

-- 
Vladimir Lettiev aka crux

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [sisyphus] MySQL 5.1 из Дедала
  2009-07-05 13:42 ` Vladimir Lettiev
@ 2009-07-05 13:49   ` Michael Bykov
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Bykov @ 2009-07-05 13:49 UTC (permalink / raw)
  To: ALT Linux Sisyphus discussions

5 июля 2009 г. 17:42 пользователь Vladimir Lettiev (thecrux@gmail.com) написал:
> On Sun, Jul 05, 2009 at 05:21:43PM +0400, Michael Bykov wrote:
>>
>> загадочное явление, мигрировал на 5.1, кажется без проблем. И вот те раз:
> ...
>> mysql> select * from assets where accessible > 0;
>> ERROR 1064 (42000): You have an error in your SQL syntax; check the
>> manual that corresponds to your MySQL server version for the right
>> syntax to use near 'accessible > 0' at line 1
>>
>> В чём может быть причина? Как поправить?
>>
>> MySQL5.1-server-5.1.28-alt0.1.i586.rpm
>
> "accessible" зарезервированное слово в 5.1: http://dev.mysql.com/doc/mysqld-version-reference/en/mysqld-version-reference-reservedwords-5-1.html
> надо переименовать имя столбца

Ух-ты, спасибо!

М.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-07-05 13:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-05 13:21 [sisyphus] MySQL 5.1 из Дедала Michael Bykov
2009-07-05 13:42 ` Vladimir Lettiev
2009-07-05 13:49   ` Michael Bykov

ALT Linux Sisyphus discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/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 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
		sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
	public-inbox-index sisyphus

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


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