Even if you could block them, they would be easy to get around:
  SELECT * FROM tbl WHERE 1;

If you have long running queries, you should investigate the reasons (other 
than lack of WHERE).

* MyISAM locks the table for any writes.  This prevents a SELECT from starting 
or a select can prevent the INSERT/UPDATE/DELETE from starting.  Consider 
switching to InnoDB.

* How big is the table?  Why does the user want the whole table (if it is a 
plain SELECT *)?  If you are doing Data Warehousing, consider summary tables.

Let's see the big picture; I expect there is a way to solve the _real_ problem, 
which I guess is "performance".

> -----Original Message-----
> From: Arthur Fuller [mailto:fuller.art...@gmail.com]
> Sent: Sunday, September 23, 2012 3:39 PM
> To: Tim Pownall
> Cc: mysql@lists.mysql.com
> Subject: Re: How to block SELECT * FROM table; but not SELECT * FROMT
> table WHERE...;
> 
> Tim,
> 
> I think you misunderstood the question. Daniel wants to block Select
> queries that ask for all rwows, and permit only queries that ask for
> some rows, as restricted by the Where clause.
> 
> Unfortunately, I don't think that can be done. But I'm not certain of
> that; there might be a trick.
> 
> Arthur
> www.artfulsoftware.com
> 
> On Sun, Sep 23, 2012 at 3:50 PM, Tim Pownall <pownall...@gmail.com>
> wrote:
> 
> >  select * from table where column=value means it will return only
> rows
> > that match.  as long as you have proper indexing there should not be
> any issues.
> >
> > On Sun, Sep 23, 2012 at 1:23 PM, Luis Daniel Lucio Quiroz <
> > luis.daniel.lu...@gmail.com> wrote:
> >
> >

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

Reply via email to