Project

General

Profile

« Previous | Next » 

Revision 8077

lib/sql_io.py: mk_errors_table(): Create a unique index on the MD5 of the value and error instead of on the values directly, because some strings are too long to index (e.g. row 2537268 of MO.Specimen causes an error "index row size 3032 exceeds maximum 2712 for index [...] Values larger than 1/3 of a buffer page cannot be indexed")

View differences:

sql_io.py
222 222
        sql_gen.TypedCol('error', 'text', nullable=False),
223 223
        ]
224 224
    sql.create_table(db, errors_table_, typed_cols, has_pkey=False)
225
    index_cols = ['column', 'value', 'error_code', 'error']
225
    index_cols = ['column', sql_gen.CustomCode('md5(value)'), 'error_code',
226
        sql_gen.CustomCode('md5(error)')]
226 227
    sql.add_index(db, index_cols, errors_table_, unique=True)
227 228

  
228 229
##### Import

Also available in: Unified diff