Changeset 7b2e4760 in trac.git
- Timestamp:
- Apr 11, 2022, 2:50:22 PM (2 years ago)
- Branches:
- 1.0-stable, 1.2-stable, 1.4-stable, 1.6-stable, trunk
- Children:
- 2d53395, c83148c1
- Parents:
- 8da64ce
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trac/db/mysql_backend.py
r8da64ce r7b2e4760 310 310 tables=', '.join(non_utf8bin))) 311 311 312 SUPPORTED_COLLATIONS = (('utf8', 'utf8_bin'), ('utf8mb4', 'utf8mb4_bin')) 312 SUPPORTED_COLLATIONS = ( 313 ('utf8mb4', 'utf8mb4_bin'), 314 ('utf8mb3', 'utf8_bin'), 315 ('utf8', 'utf8_bin'), 316 ) 313 317 314 318 def _verify_variables(self, db): … … 380 384 cursor.execute("SHOW VARIABLES WHERE " 381 385 " variable_name='character_set_database'") 382 self.charset = cursor.fetchone()[1] 386 charset = cursor.fetchone()[1] 387 if charset == 'utf8mb3': 388 charset = 'utf8' 389 self.charset = charset 383 390 if self.charset != 'utf8': 384 391 cnx.query("SET NAMES %s" % self.charset)
Note:
See TracChangeset
for help on using the changeset viewer.