Bug #108994 Docs for util.loadDump loadIndexes should clarify deferTableIndexes dependency
Submitted: 3 Nov 2022 16:36 Modified: 4 Nov 2022 13:04
Reporter: Duke Lee Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:8.0 OS:Any
Assigned to: CPU Architecture:Any

[3 Nov 2022 16:36] Duke Lee
Description:
https://dev.mysql.com/doc/mysql-shell/8.0/en/mysql-shell-utilities-load-dump.html

I think the language for the loadIndexes option could be improved to indicate that it works in conjunction with the deferTableIndexes option.

The text states:

"When this option is set to false, secondary indexes are not created during the import, and you must create them afterwards."

However, this statement alone is not entirely correct because "secondary indexes are not created" is language that implies absolute operation, but it actually depends on the deferTableIndexes setting. For example, loadIndexes=false will actually only skip fulltext secondary indexes because deferTableIndexes default setting is "fulltext".

This option dependency is suggested in the line:

"Afterwards, you can create the secondary indexes by running the dump loading utility again with loadIndexes set to true and deferTableIndexes set to all."

But it's somewhat ambiguous that the operation of loadIndexes depends on deferTableIndexes.

How to repeat:
N/A

Suggested fix:
I think the line "When this option is set to false, secondary indexes are not created during the import, and you must create them afterwards." could be improved to something like:

"When this option is set to false, secondary indexes indicated by deferTableIndexes are not created during the import, and you must create them afterwards."
[3 Nov 2022 23:44] Duke Lee
I think I should highlight the example that I pointed out:

"For example, loadIndexes=false will actually only skip fulltext secondary indexes because deferTableIndexes default setting is 'fulltext'."

So --loadIndexes=false without specifying --deferTableIndexes will skip fulltext indexes but create all other secondary indexes presumably because --deferTableIndexes defaults to "fulltext".

I'm not sure if this is intended behavior. If it _is_ intended behavior, then I think clarification in the documentation would be very helpful. If it is _not_ intended behavior, then I would think it's a util.loadDump bug.
[4 Nov 2022 13:04] MySQL Verification Team
Hi Mr. Lee,

Thank you for the documentation bug.

Verified as reported.