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
* 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.artful@stripped]
> Sent: Sunday, September 23, 2012 3:39 PM
> To: Tim Pownall
> Cc: mysql@stripped
> Subject: Re: How to block SELECT * FROM table; but not SELECT * FROMT
> table WHERE...;
> 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.
> On Sun, Sep 23, 2012 at 3:50 PM, Tim Pownall <pownalltim@stripped>
> > select * from table where column=value means it will return only
> > 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.lucio@stripped> wrote: