Skip to content

Commit 7abac01

Browse files
author
Richard Jones
committed
handle "schema" being reserved word in MySQL 5+ [SF#1397569]
1 parent 72e33d7 commit 7abac01

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Fixed:
2727
String search (sf bug 1373396)
2828
- tighten up Date parsing to not allow 'M/D/YY' (or 'D/M/YY) (sf bug
2929
1290550)
30+
- handle "schema" being reserved word in MySQL 5+ (sf bug 1397569)
3031

3132

3233
2005-10-07 0.9.0b1

doc/index.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ Martin Uzak,
153153
Darryl VanDorp,
154154
J Vickroy,
155155
William (Wilk),
156+
Tue Wennerberg,
156157
Matt Wilbert,
157158
Chris Withers.
158159

roundup/backends/back_mysql.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#$Id: back_mysql.py,v 1.62 2006-01-13 01:18:06 richard Exp $
1+
#$Id: back_mysql.py,v 1.63 2006-01-13 01:21:14 richard Exp $
22
#
33
# Copyright (c) 2003 Martynas Sklyzmantas, Andrey Lebedev <[email protected]>
44
#
@@ -173,6 +173,16 @@ def open_connection(self):
173173
self.sql('create index ids_name_idx on ids(name)')
174174
self.create_version_2_tables()
175175

176+
def load_dbschema(self):
177+
''' Load the schema definition that the database currently implements
178+
'''
179+
self.cursor.execute('select `schema` from `schema`')
180+
schema = self.cursor.fetchone()
181+
if schema:
182+
self.database_schema = eval(schema[0])
183+
else:
184+
self.database_schema = {}
185+
176186
def create_version_2_tables(self):
177187
# OTK store
178188
self.sql('''CREATE TABLE otks (otk_key VARCHAR(255),

0 commit comments

Comments
 (0)