1 | *** django/db/backends/mysql/client.py~ Wed Nov 19 05:44:06 2008
|
---|
2 | --- django/db/backends/mysql/client.py Wed Feb 25 15:08:18 2009
|
---|
3 | ***************
|
---|
4 | *** 1,12 ****
|
---|
5 | from django.db.backends import BaseDatabaseClient
|
---|
6 | from django.conf import settings
|
---|
7 | ! import os
|
---|
8 |
|
---|
9 | class DatabaseClient(BaseDatabaseClient):
|
---|
10 | executable_name = 'mysql'
|
---|
11 |
|
---|
12 | def runshell(self):
|
---|
13 | ! args = ['']
|
---|
14 | db = settings.DATABASE_OPTIONS.get('db', settings.DATABASE_NAME)
|
---|
15 | user = settings.DATABASE_OPTIONS.get('user', settings.DATABASE_USER)
|
---|
16 | passwd = settings.DATABASE_OPTIONS.get('passwd', settings.DATABASE_PASSWORD)
|
---|
17 | --- 1,12 ----
|
---|
18 | from django.db.backends import BaseDatabaseClient
|
---|
19 | from django.conf import settings
|
---|
20 | ! import subprocess
|
---|
21 |
|
---|
22 | class DatabaseClient(BaseDatabaseClient):
|
---|
23 | executable_name = 'mysql'
|
---|
24 |
|
---|
25 | def runshell(self):
|
---|
26 | ! args = [self.executable_name]
|
---|
27 | db = settings.DATABASE_OPTIONS.get('db', settings.DATABASE_NAME)
|
---|
28 | user = settings.DATABASE_OPTIONS.get('user', settings.DATABASE_USER)
|
---|
29 | passwd = settings.DATABASE_OPTIONS.get('passwd', settings.DATABASE_PASSWORD)
|
---|
30 | ***************
|
---|
31 | *** 28,31 ****
|
---|
32 | if db:
|
---|
33 | args += [db]
|
---|
34 |
|
---|
35 | ! os.execvp(self.executable_name, args)
|
---|
36 | --- 28,31 ----
|
---|
37 | if db:
|
---|
38 | args += [db]
|
---|
39 |
|
---|
40 | ! subprocess.call(args)
|
---|