[MOD]in sql_error(), don't print arbitrarily long strings.
[MOD]in sql_error(), don't print arbitrarily long strings.

When an sql error occurs due to exceeded packet size, e.g.
trying to upload an image that is too big, then sql_error() prints
all data from the query, also the encoded binary image data. This
can occupy a client machine for quite some time, rendering the web
browser unresponsive, because the browser (firefox in my cas) is
loading special fonts for all the characters of the encoded string.

This change prevents sql_error() from printing strings that are
longer than 1024 characters. This limit is hard-coded and should
probably be made configurable.

Michael


git-svn-id: a7fabbc6a7c54ea5c67cbd16bd322330fd10cc35@15592 b456876b-0849-0410-b77d-98878d47e9d5

tikiorg/tiki,changi67/tiki,tikiorg/tiki,changi67/tiki,changi67/tiki,changi67/tiki,tikiorg/tiki,changi67/tiki,oregional/tiki,oregional/tiki,oregional/tiki,oregional/tiki,tikiorg/tiki