← Back to team overview

credativ team mailing list archive

[Bug 906848] Re: [TRUNK] create database crash

 

** Changed in: openobject-server
   Importance: Undecided => Low

** Changed in: openobject-server
       Status: New => Confirmed

** Changed in: openobject-server
     Assignee: (unassigned) => OpenERP's Framework R&D (openerp-dev-framework)

-- 
You received this bug notification because you are a member of OpenERP
Framework Experts, which is subscribed to OpenERP Server.
https://bugs.launchpad.net/bugs/906848

Title:
  [TRUNK] create database crash

Status in OpenERP Server:
  Confirmed

Bug description:
  When I try to create a new empty database named like "openerp
  adfadsfad", it seems the name is truncated to the whitespace. As there
  is another db named "openerp" in the same server,  the server
  complains.

  A simple validation of this form can avoid the problem. In the GTK
  client the behavior seems correct: there is a warning message before
  trying to create the new db (incorrect db name, just normal characters
  and "-" allowed).

  [2011-12-20 11:49:24,528][template1] INFO:db.create:CREATE DATABASE openerp empty
  [2011-12-20 11:49:24,529][openerp empty] ERROR:db.create:CREATE DATABASE failed:
  Traceback (most recent call last):
    File "/home/openerp/source/server/trunk/openerp/service/web_services.py", line 59, in _initialize_db
      cr = sql_db.db_connect(db_name).cursor()
    File "/home/openerp/source/server/trunk/openerp/sql_db.py", line 464, in cursor
      return Cursor(self._pool, self.dbname, serialized=serialized)
    File "/home/openerp/source/server/trunk/openerp/sql_db.py", line 176, in __init__
      self._cnx = pool.borrow(dsn(dbname))
    File "/home/openerp/source/server/trunk/openerp/sql_db.py", line 368, in _locked
      return fun(self, *args, **kwargs)
    File "/home/openerp/source/server/trunk/openerp/sql_db.py", line 400, in borrow
      if not used and dsn_are_equals(cnx.dsn, dsn):
    File "/home/openerp/source/server/trunk/openerp/sql_db.py", line 494, in dsn_are_equals
      return key(first) == key(second)
    File "/home/openerp/source/server/trunk/openerp/sql_db.py", line 491, in key
      k = dict(x.split('=', 1) for x in dsn.strip().split())
  ValueError: dictionary update sequence element #2 has length 1; 2 is required

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/906848/+subscriptions