List:General Discussion« Previous MessageNext Message »
From:Sasha Pachev Date:July 19 1999 10:19pm
Subject:Re: Using SQL to create new table based on select results
View as plain text  
Paul DuBois wrote:
> 
> >There's another way that should work in 3.23 according to the manual:
> >CREATE TABLE foo SELECT bar,..
> >which would automaticly create the cols from the select statement in the
> >new table.
> >Unfortunately it doesnt work :P I get a "permission denied" error when i
> >try that, but i can create a table as the same user if i skip the select
> >part...
> >
> >Sorry if this info was worthless, but maybe someone with 3.23 can help me
> >out :P
> 
> Hmm, I just tried it and was able to do it.  Maybe this is similar to
> the problem of SHOW TABLES no longer working unless you're the root user.
> Do you have MySQL root user privileges, and if so, can you try the same
> thing in mysql while connected as that user?
> 
> --
> Paul DuBois, paul@stripped
> 

It seems like Monty has made some major changes to check_grant() in
sql_acl.cc and it broke a couple of things - this code is rather
complex, I tried to understand it, but had not gotten very far yet :-)
Anyway, I think we would have to way for him to return from vacation :-)

-- 
Sasha Pachev
http://www.sashanet.com/ (home)
http://www.direct1.com/ (work)
Thread
Using SQL to create new table based on select resultsWilliam D. Webber20 Jul
  • Re: Using SQL to create new table based on select resultsBenjamin Pflugmann20 Jul
  • Re: Using SQL to create new table based on select resultsPaul DuBois20 Jul
  • Re: Using SQL to create new table based on select resultsSasha Pachev20 Jul
    • Re: Using SQL to create new table based on select resultsJohan Isacsson20 Jul
      • Re: Using SQL to create new table based on select resultsPaul DuBois20 Jul
        • Re: Using SQL to create new table based on select resultsJohan Isacsson20 Jul
    • Re: Using SQL to create new table based on select resultsSasha Pachev20 Jul
    • Re: Using SQL to create new table based on select resultssinisa20 Jul
Re: Using SQL to create new table based on select resultsKevin Smith20 Jul
Re: Using SQL to create new table based on select resultssinisa20 Jul
Re: Using SQL to create new table based on select resultsMichael Widenius2 Aug