// adjustOverlongViewColname adjusts the overlong outputNames of a view to
// `new_exp_$off` where `$off` is the offset of the output column, $off starts from 1.
// There is still some MySQL compatible problems.
adjustOverlongViewColname adjusts the overlong outputNames of a view to
`new_exp_$off` where `$off` is the offset of the output column, $off starts from 1.
There is still some MySQL compatible problems.
// adjustOverlongViewColname adjusts the overlong outputNames of a view to // ` new_exp_$off ` where ` $off ` is the offset of the output column $off starts from 1 . // There is still some MySQL compatible problems .
func adjustOverlongViewColname(plan LogicalPlan) {
	outputNames := plan.OutputNames()
	for i := range outputNames {
		if outputName := outputNames[i].ColName.L; len(outputName) > mysql.MaxColumnNameLength {
			outputNames[i].ColName = model.NewCIStr(fmt.Sprintf("name_exp_%d", i+1))
		}
	}
}
func adjustOverlongViewColname ( plan LogicalPlan ) { outputNames := plan . OutputNames ( ) for i := range outputNames { if outputName := outputNames [ i ] . ColName . L ; len ( outputName ) > mysql . MaxColumnNameLength { outputNames [ i ] . ColName = model . NewCIStr ( fmt . Sprintf ( " " , i + 1 ) ) } } }
adjustOverlongViewColname adjusts the overlong outputNames of a view to
`new_exp_$off` where `$off` is the offset of the output column, $off starts from 1.
adjustOverlongViewColname adjusts the overlong outputNames of a view to ` new_exp_$off ` where ` $off ` is the offset of the output column $off starts from 1 .