Hi Massimo,

I just ran into the same issue on GAE SQL. Any update/ideas since the
last post? I'm happy to help code/debug/brainstorm.

Thanks,
Pallav

On Oct 19, 10:53 am, Massimo Di Pierro <massimo.dipie...@gmail.com>
wrote:
> This is another of those weird mysql issues
>
> CREATE TABLE IF NOT EXISTS web2py_filesystem (path VARCHAR(512),
> content LONGTEXT, PRIMARYKEY(path));
>
> results in DatabaseError: 1071: Specifiedkeywastoolong; maxkey
> length is 767 bytes
>
> I need to think about a workaround.... I have been running on
> google:sql and I did not run into this problem before.
>
> On Oct 18, 10:51 pm, Simon Ashley <gregs...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Having an issues connecting to the SQL cloud.
>
> > Have a simple application which works on SQLite.
> > Able to deploy to GAE using the following:
> >   db = DAL('gae')
>
> > However if its changed to:
> >   db = DAL('google:sql://cdmr01:csm/csmcel05',migrate_enabled=True)
> >   # cdmr01:csm is the sql cloud instance and csmcel05 the GAE
> > application; which we assume is correct.
>
> > It can't create the database failing with the following log:
>
> > E 2011-10-19 13:00:14.137
> > Traceback (most recent call last):
> >   File "/base/data/home/apps/s~csmcel05/1.354064527714710096/gluon/
> > restricted.py", line 192, in restricted
> >     exec ccode in environment
> >   File "/base/data/home/apps/s~csmcel05/1.354064527714710096/
> > applications/demurage/models/db.py", line 16, in <module>
> >     session.connect(request, response, db=db)
> >   File "/base/data/home/apps/s~csmcel05/1.354064527714710096/gluon/
> > globals.py", line 425, in connect
> >     migrate=table_migrate,
> >   File "/base/data/home/apps/s~csmcel05/1.354064527714710096/gluon/
> > dal.py", line 4534, in define_table
> >     polymodel=polymodel)
> >   File "/base/data/home/apps/s~csmcel05/1.354064527714710096/gluon/
> > dal.py", line 691, in create_table
> >     logfile = self.file_open(table._loggername, 'a')
> >   File "/base/data/home/apps/s~csmcel05/1.354064527714710096/gluon/
> > dal.py", line 2925, in file_open
> >     return DatabaseStoredFile(self.db,filename,mode)
> >   File "/base/data/home/apps/s~csmcel05/1.354064527714710096/gluon/
> > dal.py", line 2866, in __init__
> >     self.db.executesql("CREATE TABLE IF NOT EXISTS web2py_filesystem
> > (path VARCHAR(512), content LONGTEXT, PRIMARYKEY(path) )
> > ENGINE=InnoDB;")
> >   File "/base/data/home/apps/s~csmcel05/1.354064527714710096/gluon/
> > dal.py", line 4607, in executesql
> >     self._adapter.execute(query)
> >   File "/base/data/home/apps/s~csmcel05/1.354064527714710096/gluon/
> > dal.py", line 1339, in execute
> >     return self.log_execute(*a, **b)
> >   File "/base/data/home/apps/s~csmcel05/1.354064527714710096/gluon/
> > dal.py", line 1334, in log_execute
> >     ret = self.cursor.execute(*a, **b)
> >   File "/base/python_runtime/python_lib/versions/1/google/storage/
> > speckle/python/api/rdbms.py", line 287, in execute
> >     response = self._conn.MakeRequest('Exec', request)
> >   File "/base/python_runtime/python_lib/versions/1/google/storage/
> > speckle/python/api/rdbms.py", line 579, in MakeRequest
> >     response = self._MakeRetriableRequest(stub_method, request)
> >   File "/base/python_runtime/python_lib/versions/1/google/storage/
> > speckle/python/api/rdbms.py", line 610, in _MakeRetriableRequest
> >     sql_exception.message))
> > DatabaseError: 1071: Specifiedkeywastoolong; maxkeylength is 767
> > bytes
>
> > Any ideas or work arounds?
> > (would be good to have a sample application we know works, if the
> > issue is with the connection/routes /app configurations)

Reply via email to