List:Internals« Previous MessageNext Message »
From:Ingo Strüwing Date:June 3 2005 2:04pm
Subject:Re: MySQL 5: views and definition storage
View as plain text  
Hi Martijn,

Am Freitag, den 03.06.2005, 13:47 +0200 schrieb Martijn Tonies:
...
> ALTER VIEW is already implemented (according to the documentation).
> 
> Store the original string in a BLOB field of a system table.  Anything
> beyond
> "AS". Store other properties in other fields.

But how should the output of a SHOW CREATE VIEW look like after an ALTER
VIEW?
If there are comments related to a dropped column, how can we know that
we have to drop the comment too?
What if the creator did not specify every column on a separate line, but
adds a comment which is realated to one of the columns only? I mean how
should the output look like when one of these columns is dropped?
What if the creator uses a very weird format for his CREATE VIEW and
ALTER VIEW? We would end up with a new parser that mainatins pointers
into the string so that we know which parts of the string have to be
replaced by the ALTER command. And still we would not necessarily get
the comments right.

So I personally think that we need to generate the output and cannot
retain comments.

And yes. To be clear, I want to say that everybody agrees that the
format of the string is ugly and should be improved. The problem is
known. But it is still a matter of priority.

What about storing the commented string in some table yourself?
 
Regards,
Ingo
-- 
Ingo Strüwing, Senior Software Developer
MySQL AB, www.mysql.com
Office: +49 30 43672407

Are you MySQL certified?  www.mysql.com/certification


Thread
MySQL 5: views and definition storageMartijn Tonies1 Jun
  • Re: MySQL 5: views and definition storageMartijn Tonies3 Jun
    • Re: MySQL 5: views and definition storageIngo Strüwing3 Jun
    • Re: MySQL 5: views and definition storageSanja Byelkin24 Jun
  • Re: MySQL 5: views and definition storageMartijn Tonies3 Jun
    • Re: MySQL 5: views and definition storageIngo Strüwing3 Jun
  • Re: MySQL 5: views and definition storageMartijn Tonies3 Jun
    • Re: MySQL 5: views and definition storageIngo Strüwing3 Jun
  • Re: MySQL 5: views and definition storageMartijn Tonies3 Jun
    • Re: MySQL 5: views and definition storageJim Winstead3 Jun
  • Re: MySQL 5: views and definition storageMartijn Tonies3 Jun
    • Re: MySQL 5: views and definition storageJim Winstead3 Jun
  • Re: MySQL 5: views and definition storageMartijn Tonies24 Jun