[jifty-devel] Jifty fails to work with MySQL 4.1?

Jesse Vincent jesse at bestpractical.com
Sun Dec 10 11:53:52 EST 2006




On Sun, Dec 10, 2006 at 10:26:29AM -0500, Henry Baragar wrote:
> Agent,
> 
> I believe that SQLite does not fully implement the SQL standard, where mysql 
> (and others) do.  Hence, the pain you are experiencing.


(FWIW, it's no longer a reserved word in SQL2003). It's also not a
reserved word in Postgres or Oracle.

> The problem is that 'key' is a reserved word in SQL and may not be used as a 
> column name.

Yep. We're aware. kevin (jibsheet) is working on a change to Jifty::DBI
that will make it easy for us to store that column under a more proper
name in the database. (It will also make it much easier to migrate
legacy databases as the stored name will be able to differ from the
column name.

-j

> Regards,
> Henry
> 
> On Saturday, December 09 2006 10:22 pm, Agent Zhang wrote:
> > Hello,
> >
> > The SQL statements generated by Jifty is not compatible with MySQL 4.1?
> >
> > My models worked fine with SQLite, but when I switched to MySQL, it
> > really really hurt:
> >
> >     E:\agent\projects\Qooqle>jifty schema --setup
> >     INFO - Generating SQL for application Qooqle...
> >     INFO - Using Qooqle::Model::QQUser
> >     INFO - Using Qooqle::Model::Message
> >     INFO - Using Qooqle::Model::Session
> >     INFO - Using Jifty::Model::Session
> >     INFO - Using Jifty::Model::Metadata
> >     WARN - Use of uninitialized value in concatenation (.) or string
> > at E:/Perl/site
> >     /lib/IPC/PubSub/Cache/JiftyDBI/Stash.pm line 11.
> >     WARN - DBD::mysql::st execute failed: You have an error in your
> > SQL syntax; chec
> >     k the manual that corresponds to your MySQL server version for the
> > right syntax
> >     to use near 'NULL  ,
> >       val blob NULL  ,
> >       expiry int NULL  ,
> >       PRIMARY KEY (id)
> >     )' at line 3 at E:/Perl/site/lib/Jifty/DBI/Handle.pm line 485.
> >     WARN - Jifty::DBI::Handle::mysql=HASH(0x3be27c4) couldn't execute
> > the query 'CRE
> >     ATE TABLE _jifty_pubsub_items (
> >       id INTEGER NOT NULL  AUTO_INCREMENT,
> >       key text NULL  ,
> >       val blob NULL  ,
> >       expiry int NULL  ,
> >       PRIMARY KEY (id)
> >     )
> >     ' at E:/Perl/site/lib/Jifty/DBI/Handle.pm line 501.
> >     INFO - Set up version v0.0.1, jifty version 0.611230_100
> >
> > I think I'm already at the svn head of Jifty and Jifty::DBI.
> >
> > Thank you in advance. :)
> >
> > Cheers,
> > Agent
> > _______________________________________________
> > jifty-devel mailing list
> > jifty-devel at lists.jifty.org
> > http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel
> _______________________________________________
> jifty-devel mailing list
> jifty-devel at lists.jifty.org
> http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel
> 

-- 


More information about the jifty-devel mailing list