List:Internals« Previous MessageNext Message »
From:Michael Widenius Date:September 6 2001 6:16pm
Subject:Some features to discuss
View as plain text  
Hi!

>>>>> "Paul" == Paul Cadach <paul@stripped> writes:

Paul> Hi,
Paul> I looking for features which, at my look, would be nice:
Paul> 1. When someone have restricted access to a table (with column-ed
Paul> restrictions), doing 'select * from ...' must expand '*' to un-restricted
Paul> columns only, not to all;

Sinisa has already provided a full answer to this.

Paul> 2. As I understand, table lock prevents access to locked table from other
Paul> connections, so if I lock table 'table1' and uses it in 'select * from
Paul> table1 t1, table1 t2 ...' nobody else will have access (read or write,
Paul> depends on lock type) to locked table 'table1'. So, question is: Why I must
Paul> specify table alias in LOCK TABLES command to lock tables for which I uses
Paul> aliases?

The reason for having the specify the alias is to allow you to do
things like this in the future:

LOCK TABLES t1 as t1_write write, t1 as t1_read READ, t2 WRITE;

..... do things

UNLOCK TABLES t1_write;

Another issue is that if you use a table twice in a SQL command, MySQL
needs to open the table twice;  By forcing the user to also specify
the table twice in the LOCK TABLES command we can pre-open tables
and make things work faster.

Regards,
Monty
Thread
Some features to discussPaul Cadach5 Sep
  • Re: Some features to discussSinisa Milivojevic5 Sep
  • Re: Some features to discussPaul Cadach5 Sep
    • Re: Some features to discussSinisa Milivojevic5 Sep
  • Some features to discussMichael Widenius6 Sep