The SQL_* constants in get_length_info() requires the ODBC PHP extension to be enabled. We won't use these constants anymore, as these constants are ODBC-specific, and such extension isn't a required one for MyBB or the Merge System. Sorry I didn't notice they're defined just before the function. Anyway, we'll replace them with more featureful ones.
SQLite's type affinity is a bit special among other two database systems.
We might also check Converter->check_column_length() which uses get_length_info().
Since https://github.com/mybb/mybb/issues/4166, the DB's
show_fields_from()
functions are reworked to have the same output of fields among different database systems. And as of MySQL 8.0.17, the display width for integer data types was deprecated (https://github.com/mybb/mybb/issues/4166#issuecomment-730332679 & https://dev.mysql.com/doc/refman/8.0/en/numeric-type-syntax.html). It means that we should make sure the Merge System'sget_length_info()
is compatible across the 3 database systems and correctConverter_Module->prepare_insert_array()
.Related reports involves: https://github.com/mybb/merge-system/pull/260 https://community.mybb.com/thread-234435.html
There are other things we should take care of:
TheSorry I didn't notice they're defined just before the function. Anyway, we'll replace them with more featureful ones.SQL_*
constants inget_length_info()
requires the ODBC PHP extension to be enabled. We won't use these constants anymore, as these constants are ODBC-specific, and such extension isn't a required one for MyBB or the Merge System.SQLite's type affinity is a bit special among other two database systems.
We might also check
Converter->check_column_length()
which usesget_length_info()
.