Skip to main content
Common Reference

thl list

The thl list command outputs a list of the sequence number information from the THL. By default, the entire THL as stored on disk is output. Command-line options enable you to select individual sequence numbers, sequence number ranges, or all the sequence information from a single file.

Usage
thl list [common-options] [options]

Where:

OptionDescriptionVersion
-charset [charset]
Specify the character set to be used to decode the character-based row data embedded within the THL event. Without this option, data is output as a hex value.
Can also be combined with -seqno,-event,-file,-from|-low,-to|-high,-first,-last
-event [eventid]Outputs THL for a given event.7.0.2
-file [filename]Outputs all THL in the specified file.
-first
Aliases: -first [n]
Outputs THL for the first THL entry available. If a positive integer also supplied, result will be the first n entries.
-from [seqno]
Aliases: -low [seqno]
Outputs all THL from the seqno provided to the last THL available. Can be combined with -from|-high to set a specific range.
-headersGenerates only the header information for the selected sequence numbers from the THL.
-hex
For SQL that may be in different character sets, the information can be optionally output in hex format to determine the contents and context of the statement, even though the statement itself may be unreadable on the command-line.
Can also be combined with -seqno,-event,-file,-from|-low,-to|-high,-first,-last
-jsonOnly valid with the -headers option, the header information is output for the selected sequence numbers from the THL in JSON format.
-last
Aliases: -last [n]
Outputs THL for the last THL entry available. If a positive integer also supplied, result will be the last n entries.
-no-checksumIgnores checksums within the THL.
-seqno [seqno]Outputs THL for a given sequence number.
-sizesShows the size information for a given THL event, describing either the size of the SQL, or the number of rows within the given event.
-sizesdetailShows detailed size information for a given THL event, describing either the size of the SQL, or the number of rows within the given event per fragment within each event, and with a summary for each event total.
-sizessummaryOutputs only the size summary information for the requested THL.
-specsShows the column specifications, such as identified type, length, and additional settings, when viewing events within row-based replication. This can be helpful when examining THL data in heterogeneous replication deployments.
-sqlPrints only the SQL for the selected sequence range.
-timezoneSpecify the timezone to use when display date or time values. When not specified, times are displayed using UTC.
-to [seqno]
Aliases: -high [seqno]
Outputs all THL from the first seqno available up to the seqno provided. Can be combined with -to|-low to set a specific range.

-charset [charset]

Specify the character set to be used to decode the character-based row data embedded within the THL event. Without this option, data is output as a hex value.
Can also be combined with -seqno,-event,-file,-from|-low,-to|-high,-first,-last

-event [eventid]

Version7.0.2
Outputs THL for a given event. For example:
shell> thl list -event mysql-bin.000015:0000000000030282
SEQ# = 99 / FRAG# = 0 (last frag)
- FILE = thl.data.0000000001
- TIME = 2025-02-21 09:11:28.0
- EPOCH# = 2
- EVENTID = mysql-bin.000015:0000000000030282;44
- SOURCEID = db1
...
If no match found, the following message will be displayed:
Event not found : Approximative match found between seqno 915 (mysql-bin.000017:0000000074628153;62)
and seqno 916 (mysql-bin.000017:0000000074628349;62)

-file [filename]

Outputs THL for a given file. For example:
shell> thl list -file thl.data.0000000001
...
SEQ# = 99 / FRAG# = 0 (last frag)
- FILE = thl.data.0000000001
- TIME = 2025-02-21 09:11:28.0
- EPOCH# = 2
- EVENTID = mysql-bin.000015:0000000000030282;44
- SOURCEID = db1
...

-first

Aliases-first [n]
Outputs THL for the first THL entry available. If a positive integer also supplied, result will be the first n entries.
shell> thl list -first
shell> thl list -first 10

-from [seqno]

Outputs all THL from the seqno provided to the last THL available. Can be combined with -from|-high to set a specific range.
shell> thl list -from 100
shell> thl list -from 100 -to 150
shell> thl list -low 100
shell> thl list -low 100 -high 150

-headers

Generates only the header information for the selected sequence numbers from the THL. For THL that contains a lot of SQL, obtaining the headers can be used to get basic content and context information without having to manually filter out the SQL in each fragment. For example:
shell> thl list -headers
...
SEQ# = 215 / FRAG# = 0 (last frag)
- FILE = thl.data.0000000001
- TIME = 2025-02-21 09:11:29.0
- EPOCH# = 2
- EVENTID = mysql-bin.000015:0000000000072471;44
- SOURCEID = db1
SEQ# = 216 / FRAG# = 0 (last frag)
- FILE = thl.data.0000000001
- TIME = 2025-02-21 09:12:04.0
- EPOCH# = 2
- EVENTID = mysql-bin.000015:0000000000072872;102
- SOURCEID = db1
...
Can also be combined with -seqno,-event,-file,-from|-low,-to|-high,-first,-last

-hex

For SQL that may be in different character sets, the information can be optionally output in hex format to determine the contents and context of the statement, even though the statement itself may be unreadable on the command-line.
Can also be combined with -seqno,-event,-file,-from|-low,-to|-high,-first,-last

-json

Only valid with the -headers option, the header information is output for the selected sequence numbers from the THL in JSON format. The field contents are identical, with each fragment of each THL sequence being contained in a JSON object, with the output consisting of an array of the these sequence objects. For example:
[
...
{
"seqno": 215,
"epoch": 2,
"frag": 0,
"lastFrag": true,
"time": "2025-02-21 09:11:29.0",
"eventId": "mysql-bin.000015:0000000000072471;44",
"sourceId": "db1",
"comments": ""
},
{
"seqno": 216,
"epoch": 2,
"frag": 0,
"lastFrag": true,
"time": "2025-02-21 09:12:04.0",
"eventId": "mysql-bin.000015:0000000000072872;102",
"sourceId": "db1",
"comments": ""
},
...
]
Can also be combined with -seqno,-event,-file,-from|-low,-to|-high,-first,-last

-last

Aliases-last [n]
Outputs THL for the last THL entry available. If a positive integer also supplied, result will be the last n entries.
shell> thl list -last
shell> thl list -last 10

-no-checksum

Ignores checksums within the THL. In the event of a checksum failure, use of this option will enable checksums to be ignored when the THL is being read.
Can also be combined with -seqno,-event,-file,-from|-low,-to|-high,-first,-last

-seqno [seqno]

Outputs THL for a given sequence number. For example:
shell> thl list -seqno 99
SEQ# = 99 / FRAG# = 0 (last frag)
- FILE = thl.data.0000000001
- TIME = 2025-02-21 09:11:28.0
- EPOCH# = 2
- EVENTID = mysql-bin.000015:0000000000030282;44
- SOURCEID = db1
...

-sizes

Shows the size information for a given THL event, describing either the size of the SQL, or the number of rows within the given event. For example:
shell> thl list -sizes
SEQ# Frag# Tstamp
...
10 0 2025-02-21 09:11:27.0 Event total: 1 chunks 24 bytes in SQL statements 0 rows
11 0 2025-02-21 09:11:28.0 Event total: 1 chunks 26 bytes in SQL statements 0 rows
12 0 2025-02-21 09:11:28.0 Event total: 1 chunks 24 bytes in SQL statements 0 rows
13 0 2025-02-21 09:11:28.0 Event total: 1 chunks 19 bytes in SQL statements 0 rows
14 0 2025-02-21 09:11:28.0 Event total: 1 chunks 24 bytes in SQL statements 0 rows
...
Summary information is also output identicating an overall count of the changes. For example:
Total ROW chunks: 203 with 224 updated rows (93%)
Total STATEMENT chunks: 14 with 1473 bytes (6%)
217 events processed
This information can be useful when viewing or monitoring the replication progress as it can help to indicate and identify the size of a specific transaction, particularly if the transaction is large. This can be particularly useful in combination with the-first and/or -last options.
For more detailed information on individual fragments within a sequence (and for large transactions there will be multiple fragments), use the thl list -seizesdetail command.

-sizesdetail

Shows detailed size information for a given THL event, describing either the size of the SQL, or the number of rows within the given event per fragment within each event, and with a summary for each event total. For very large THL event sizes this provide more detailed information about the size and makeup of the event. For example:
shell> thl list -sizesdetail -last
SEQ# Frag# Tstamp Chunks SQL Data Row Data
1604 0 2025-02-21 11:04:53.0 123 chunks SQL 0 bytes (0 avg bytes per chunk) Rows 45633 (371 avg rows per chunk)
1604 1 2025-02-21 11:04:53.0 123 chunks SQL 0 bytes (0 avg bytes per chunk) Rows 45633 (371 avg rows per chunk)
1604 2 2025-02-21 11:04:53.0 123 chunks SQL 0 bytes (0 avg bytes per chunk) Rows 45633 (371 avg rows per chunk)
1604 3 2025-02-21 11:04:53.0 123 chunks SQL 0 bytes (0 avg bytes per chunk) Rows 45633 (371 avg rows per chunk)
1604 4 2025-02-21 11:04:53.0 123 chunks SQL 0 bytes (0 avg bytes per chunk) Rows 45633 (371 avg rows per chunk)
1604 5 2025-02-21 11:04:53.0 123 chunks SQL 0 bytes (0 avg bytes per chunk) Rows 45633 (371 avg rows per chunk)
1604 6 2025-02-21 11:04:53.0 123 chunks SQL 0 bytes (0 avg bytes per chunk) Rows 45633 (371 avg rows per chunk)
1604 7 2025-02-21 11:04:53.0 123 chunks SQL 0 bytes (0 avg bytes per chunk) Rows 45633 (371 avg rows per chunk)
1604 8 2025-02-21 11:04:53.0 123 chunks SQL 0 bytes (0 avg bytes per chunk) Rows 45633 (371 avg rows per chunk)
1604 9 2025-02-21-29 11:04:53.0 123 chunks SQL 0 bytes (0 avg bytes per chunk) Rows 45633 (371 avg rows per chunk)
1604 10 2025-02-21 11:04:53.0 123 chunks SQL 0 bytes (0 avg bytes per chunk) Rows 45633 (371 avg rows per chunk)
1604 11 2025-02-21 11:04:53.0 7 chunks SQL 0 bytes (0 avg bytes per chunk) Rows 2535 (362 avg rows per chunk)
Event total: 1360 chunks 0 bytes in SQL statements 504498 rows
Summary information is also output identicating an overall count of the changes. For example:
Total ROW chunks: 69487 with 18257671 updated rows (100%)
Total STATEMENT chunks: 0 with 0 bytes (0%)
628 events processed
This information can be useful when viewing or monitoring the replication progress as it can help to indicate and identify the size of a specific transaction, particularly if the transaction is large. This can be particularly useful in combination with the-first and/or -last options.

-sizessummary

Outputs only the size summary information for the requested THL:
shell> thl list -sizessummary
Total ROW chunks: 69487 with 18257671 updated rows (100%)
Total STATEMENT chunks: 0 with 0 bytes (0%)
628 events processed

-specs

Shows the column specifications, such as identified type, length, and additional settings, when viewing events within row-based replication. This can be helpful when examining THL data in heterogeneous replication deployments. For example:
shell> thl list -seqno 216 -specs
SEQ# = 216 / FRAG# = 0 (last frag)
- FILE = thl.data.0000000001
- TIME = 2025-02-21 09:12:04.0
- EPOCH# = 2
- EVENTID = mysql-bin.000015:0000000000072872;102
- SOURCEID = db1
- METADATA = [mysql_server_id=10;mysql_thread_id=102;dbms_type=mysql;tz_aware=true;is_metadata=true;service=alpha;shard=tungsten_alpha;heartbeat=MASTER_ONLINE]
- GLOBAL OPTIONS = [autocommit=1;sql_auto_is_null=0;foreign_key_checks=1;unique_checks=1;sql_mode='NO_ENGINE_SUBSTITUTION,ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,IGNORE_SPACE,NO_ZERO_DATE,NO_ZERO_IN_DATE';character_set_client=33;collation_connection=33;collation_server=255]
- TYPE = com.continuent.tungsten.replicator.event.ReplDBMSEvent
- OPTIONS = [foreign_key_checks = 1, unique_checks = 1, time_zone = '+00:00', ##charset = UTF-8]
- SQL(0) =
- ACTION = UPDATE
- SCHEMA = tungsten_alpha
- TABLE = heartbeat
- ROW# = 0
- COL(index=1 name= type=4 [INTEGER] length=8 unsigned=false blob=false desc=) (size = 1) = 1
- COL(index=2 name= type=0 [NULL] length=0 unsigned=false blob=false desc=) (size = 0) = NULL
- COL(index=3 name= type=0 [NULL] length=0 unsigned=false blob=false desc=) (size = 0) = NULL
- COL(index=4 name= type=93 [TIMESTAMP] length=0 unsigned=false blob=false desc=) (size = 21) = 2025-02-21 09:12:04.0
- COL(index=5 name= type=0 [NULL] length=0 unsigned=false blob=false desc=) (size = 0) = NULL
- COL(index=6 name= type=0 [NULL] length=0 unsigned=false blob=false desc=) (size = 0) = NULL
- COL(index=7 name= type=4 [INTEGER] length=8 unsigned=false blob=false desc=) (size = 1) = 0
- COL(index=8 name= type=12 [VARCHAR] length=0 unsigned=false blob=false desc=) (size = 13) = MASTER_ONLINE
- KEY(index=1 name= type=4 [INTEGER] length=8 unsigned=false blob=false desc=) (size = 1) = 1
When identifying the different data types, the following effects should be noted:
  • CHAR and VARCHAR are identified as type 12, VARCHAR
  • SET is identified as an INTEGER
  • When the value is either NULL or 0 (Zero), date and time fields are shown as type 0,NULL
  • ENUM is identified as an OTHER
  • BLOB and TEXT are identified as type 2004, BLOB

-sql

Prints only the SQL for the selected sequence range. Use of this option can be useful if you want to extract the SQL and execute it directly by storing or piping the output.
Can also be combined with -seqno,-event,-file,-from|-low,-to|-high,-first,-last

-timezone

Specify the timezone to use when display date or time values. When not specified, times are displayed using UTC.

-to [seqno]

Outputs all THL from the seqno provided to the last THL available. Can be combined with -to|-low to set a specific range.
shell> thl list -to 150
shell> thl list -from 100 -to 150
shell> thl list -high 150
shell> thl list -low 100 -high 150