print rollback sql from tmp_file
(self, filename)
| 122 | return True |
| 123 | |
| 124 | def print_rollback_sql(self, filename): |
| 125 | """print rollback sql from tmp_file""" |
| 126 | with open(filename, "rb") as f_tmp: |
| 127 | batch_size = 1000 |
| 128 | i = 0 |
| 129 | for line in reversed_lines(f_tmp): |
| 130 | print(line.rstrip()) |
| 131 | if i >= batch_size: |
| 132 | i = 0 |
| 133 | if self.back_interval: |
| 134 | print('SELECT SLEEP(%s);' % self.back_interval) |
| 135 | else: |
| 136 | i += 1 |
| 137 | |
| 138 | def __del__(self): |
| 139 | pass |
no test coverage detected