Andrew,

SELECT [STRAIGHT_JOIN]
       [SQL_SMALL_RESULT] [SQL_BIG_RESULT] [SQL_BUFFER_RESULT]
       [SQL_CACHE | SQL_NO_CACHE] [SQL_CALC_FOUND_ROWS] [HIGH_PRIORITY]
       [DISTINCT | DISTINCTROW | ALL]
    select_expression,...
    [INTO {OUTFILE | DUMPFILE} 'file_name' export_options]
    [FROM table_references
      [WHERE where_definition]
      [GROUP BY {unsigned_integer | col_name | formula} [ASC | DESC], ...
        [WITH ROLLUP]]
      [HAVING where_definition]
      [ORDER BY {unsigned_integer | col_name | formula} [ASC | DESC] ,...]
      [LIMIT [offset,] row_count | row_count OFFSET offset]
      [PROCEDURE procedure_name(argument_list)]
      [FOR UPDATE | LOCK IN SHARE MODE]]

I think the clause LOCK IN SHARE MODE has to be the very last.

Best regards,

Heikki Tuuri
Innobase Oy
http://www.innodb.com
Foreign keys, transactions, and row level locking for MySQL
InnoDB Hot Backup - hot backup tool for InnoDB which also backs up MyISAM
tables

Order MySQL technical support from https://order.mysql.com/

..............
Search Result 25
From: Andrew Kennard ([EMAIL PROTECTED])
Subject: InnoDB lock in share mode problems
This is the only article in this thread
View: Original Format
Newsgroups: mailing.database.mysql
Date: 2003-12-15 06:42:12 PST


Hi all

I'm new tot PHP/mySQL but have many years programming experience.

We've just setup a new webspace account with Demon Internet in the UK and
it has PHP/mySQL services

I'm just testing the InnoDB an am having a problem with the following
statement

SELECT * FROM invtest LOCK IN SHARE MODE

Which gives the following error:-

Error

SQL-query :

SELECT *
FROM invtest
LOCK IN SHARE MODE LIMIT 0 , 30

MySQL said:

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 'LIMIT 0,
30' at line 1


I can't seem to find anything about this limit clause/parameter in any of
the help files. Demon say 'Dunno mate we just provide the service !!!'

Any help with this would be most appreciated as I really need 'proper'
transactions for the project I'm about to start.

Thanks in advance

Andrew Kennard

PS the mySQL version they are running seems to be 4.0.9-gamma-log


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to