Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1
    • Fix Version/s: 2.2
    • Component/s: Database SQL/XMLDB
    • Labels:
    • Rank:
      19322

      Description

      In 1.7 we still supported ancient MySQL that did not support varchars longer than 255, unfortunately text filed can not be used everywhere thanks to restrictions in oracle and mssql.

      Places that could use longer varchars (in separate issues later):

      • user preference value - breaks very very often in gradebook
      • extrnal URLs (rss client block, user profile url)
      • any multilang field (course full name translated to 20 languages for example) - the multilang syntax has big overhead

      What is the proper limit now:

      It looks like the reasonable maximum is either 2048 or 4000 chars.

      Hopefully people with higher unicode chars do not use oracle, anyway anybody who counts string length in bytes these days is crazy...

        Issue Links

          Activity

          Petr Škoda created issue -
          Petr Škoda made changes -
          Field Original Value New Value
          Description In 1.7 we still supported ancient MySQL that did not support varchars longer than 255, unfortunately text filed can not be used everywhere thanks to restrictions in oracle and mssql.

          Do not forget to verify max index size - mysql has a silly 300 char limit (utf-8)...

          Places that could use longer varchars (in separate issues later):
          * user preference value - breaks very very often in gradebook
          * resource module urls (any urls) - browsers allow at least 2,048 chars
          In 1.7 we still supported ancient MySQL that did not support varchars longer than 255, unfortunately text filed can not be used everywhere thanks to restrictions in oracle and mssql.

          Note to self: Do not forget to verify max index size - mysql has a silly 7xx byte limit, we use 300 chars max...

          Places that could use longer varchars (in separate issues later):
          * user preference value - breaks very very often in gradebook
          * resource module urls (any urls) - browsers allow at least 2,048 chars

          What is the proper limit now:
          * mssql - NVARCHAR recommended <= 4000 chars, larger is treated as text http://msdn.microsoft.com/en-us/library/ms186939.aspx
          * oracle - VARCHAR2 has limit 4000bytes, that is a lousy 4000/3=1333 extreme utf-8chars, lets ignore this stupid database http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/sql_elements001.htm
          * mysql - VARCHAR 65,535 chars http://dev.mysql.com/doc/refman/5.0/en/char.html
          *postgresql - 1GB oh my! http://www.postgresql.org/docs/8.3/static/datatype-character.html

          It looks like the reasonable maximum is either 2048 or 4000 chars.

          Hopefully people with higher unicode chars do not use oracle, anyway anybody who counts string length in bytes these days is crazy...
          Petr Škoda made changes -
          Assignee Eloy Lafuente (stronk7) [ stronk7 ] Petr Škoda (skodak) [ skodak ]
          Petr Škoda made changes -
          Status Open [ 1 ] Development in progress [ 3 ]
          Petr Škoda made changes -
          Priority Minor [ 4 ] Major [ 3 ]
          Petr Škoda made changes -
          Description In 1.7 we still supported ancient MySQL that did not support varchars longer than 255, unfortunately text filed can not be used everywhere thanks to restrictions in oracle and mssql.

          Note to self: Do not forget to verify max index size - mysql has a silly 7xx byte limit, we use 300 chars max...

          Places that could use longer varchars (in separate issues later):
          * user preference value - breaks very very often in gradebook
          * resource module urls (any urls) - browsers allow at least 2,048 chars

          What is the proper limit now:
          * mssql - NVARCHAR recommended <= 4000 chars, larger is treated as text http://msdn.microsoft.com/en-us/library/ms186939.aspx
          * oracle - VARCHAR2 has limit 4000bytes, that is a lousy 4000/3=1333 extreme utf-8chars, lets ignore this stupid database http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/sql_elements001.htm
          * mysql - VARCHAR 65,535 chars http://dev.mysql.com/doc/refman/5.0/en/char.html
          *postgresql - 1GB oh my! http://www.postgresql.org/docs/8.3/static/datatype-character.html

          It looks like the reasonable maximum is either 2048 or 4000 chars.

          Hopefully people with higher unicode chars do not use oracle, anyway anybody who counts string length in bytes these days is crazy...
          In 1.7 we still supported ancient MySQL that did not support varchars longer than 255, unfortunately text filed can not be used everywhere thanks to restrictions in oracle and mssql.

          Note to self: Do not forget to verify max index size - mysql has a silly 7xx byte limit, we use 300 chars max...

          Places that could use longer varchars (in separate issues later):
          * user preference value - breaks very very often in gradebook
          * resource module urls (any urls) - browsers allow at least 2,048 chars

          What is the proper limit now:
          * mssql - NVARCHAR recommended <= 4000 chars, larger is treated as text http://msdn.microsoft.com/en-us/library/ms186939.aspx
          * oracle - VARCHAR2 has limit 4000bytes, that is a lousy 4000/3=1333 utf-8 chars, lets ignore this fast&stupid database http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/sql_elements001.htm
          * mysql - VARCHAR 65,535 chars http://dev.mysql.com/doc/refman/5.0/en/char.html
          *postgresql - 1GB oh my! http://www.postgresql.org/docs/8.3/static/datatype-character.html

          It looks like the reasonable maximum is either 2048 or 4000 chars.

          Hopefully people with higher unicode chars do not use oracle, anyway anybody who counts string length in bytes these days is crazy...
          Petr Škoda made changes -
          Description In 1.7 we still supported ancient MySQL that did not support varchars longer than 255, unfortunately text filed can not be used everywhere thanks to restrictions in oracle and mssql.

          Note to self: Do not forget to verify max index size - mysql has a silly 7xx byte limit, we use 300 chars max...

          Places that could use longer varchars (in separate issues later):
          * user preference value - breaks very very often in gradebook
          * resource module urls (any urls) - browsers allow at least 2,048 chars

          What is the proper limit now:
          * mssql - NVARCHAR recommended <= 4000 chars, larger is treated as text http://msdn.microsoft.com/en-us/library/ms186939.aspx
          * oracle - VARCHAR2 has limit 4000bytes, that is a lousy 4000/3=1333 utf-8 chars, lets ignore this fast&stupid database http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/sql_elements001.htm
          * mysql - VARCHAR 65,535 chars http://dev.mysql.com/doc/refman/5.0/en/char.html
          *postgresql - 1GB oh my! http://www.postgresql.org/docs/8.3/static/datatype-character.html

          It looks like the reasonable maximum is either 2048 or 4000 chars.

          Hopefully people with higher unicode chars do not use oracle, anyway anybody who counts string length in bytes these days is crazy...
          In 1.7 we still supported ancient MySQL that did not support varchars longer than 255, unfortunately text filed can not be used everywhere thanks to restrictions in oracle and mssql.

          Note to self: Do not forget to verify max index size - mysql has a silly 7xx byte limit, we use 300 chars max...

          Places that could use longer varchars (in separate issues later):
          * user preference value - breaks very very often in gradebook
          * resource module urls (any urls) - browsers allow at least 2,048 chars
          * any multilang field (course full name translated to 20 languages for example) - the multilang syntax has big overhead

          What is the proper limit now:
          * mssql - NVARCHAR recommended <= 4000 chars, larger is treated as text http://msdn.microsoft.com/en-us/library/ms186939.aspx
          * oracle - VARCHAR2 has limit 4000bytes, that is a lousy 4000/3=1333 utf-8 chars, lets ignore this fast&stupid database http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/sql_elements001.htm
          * mysql - VARCHAR 65,535 chars http://dev.mysql.com/doc/refman/5.0/en/char.html
          *postgresql - 1GB oh my! http://www.postgresql.org/docs/8.3/static/datatype-character.html

          It looks like the reasonable maximum is either 2048 or 4000 chars.

          Hopefully people with higher unicode chars do not use oracle, anyway anybody who counts string length in bytes these days is crazy...
          Petr Škoda made changes -
          Description In 1.7 we still supported ancient MySQL that did not support varchars longer than 255, unfortunately text filed can not be used everywhere thanks to restrictions in oracle and mssql.

          Note to self: Do not forget to verify max index size - mysql has a silly 7xx byte limit, we use 300 chars max...

          Places that could use longer varchars (in separate issues later):
          * user preference value - breaks very very often in gradebook
          * resource module urls (any urls) - browsers allow at least 2,048 chars
          * any multilang field (course full name translated to 20 languages for example) - the multilang syntax has big overhead

          What is the proper limit now:
          * mssql - NVARCHAR recommended <= 4000 chars, larger is treated as text http://msdn.microsoft.com/en-us/library/ms186939.aspx
          * oracle - VARCHAR2 has limit 4000bytes, that is a lousy 4000/3=1333 utf-8 chars, lets ignore this fast&stupid database http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/sql_elements001.htm
          * mysql - VARCHAR 65,535 chars http://dev.mysql.com/doc/refman/5.0/en/char.html
          *postgresql - 1GB oh my! http://www.postgresql.org/docs/8.3/static/datatype-character.html

          It looks like the reasonable maximum is either 2048 or 4000 chars.

          Hopefully people with higher unicode chars do not use oracle, anyway anybody who counts string length in bytes these days is crazy...
          In 1.7 we still supported ancient MySQL that did not support varchars longer than 255, unfortunately text filed can not be used everywhere thanks to restrictions in oracle and mssql.

          Note to self: Do not forget to verify max index size - mysql has a silly 7xx byte limit, we use 300 chars max...

          Places that could use longer varchars (in separate issues later):
          * user preference value - breaks very very often in gradebook
          * resource module urls (any urls) - browsers allow at least 2,048 chars
          * any multilang field (course full name translated to 20 languages for example) - the multilang syntax has big overhead

          What is the proper limit now:
          * mssql - NVARCHAR recommended <= 4000 chars, larger is treated as text http://msdn.microsoft.com/en-us/library/ms186939.aspx
          * oracle - VARCHAR2 has limit 4000bytes, that is a lousy 4000/3=1333 utf-8 chars, lets ignore this fast&stupid database http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/sql_elements001.htm
          * mysql - VARCHAR 65,535 chars http://dev.mysql.com/doc/refman/5.0/en/char.html
          * postgresql - 1GB oh my! http://www.postgresql.org/docs/8.3/static/datatype-character.html

          It looks like the reasonable maximum is either 2048 or 4000 chars.

          Hopefully people with higher unicode chars do not use oracle, anyway anybody who counts string length in bytes these days is crazy...
          Petr Škoda made changes -
          Link This issue is blocked by MDL-29314 [ MDL-29314 ]
          Petr Škoda made changes -
          Link This issue is blocked by MDL-29321 [ MDL-29321 ]
          Petr Škoda made changes -
          Link This issue is blocked by MDL-29322 [ MDL-29322 ]
          Petr Škoda made changes -
          Status Development in progress [ 3 ] Waiting for integration review [ 10010 ]
          Pull Master Diff URL https://github.com/skodak/moodle/compare/w36_MDL-29313_m22_varcharenforce...w36_MDL-29321_m22_largevarchar
          Pull Master Branch w36_MDL-29321_m22_largevarchar
          Pull from Repository git://github.com/skodak/moodle.git
          Fix Version/s 2.2 [ 10656 ]
          Testing Instructions 1/ run functional DB tests for all 4 supported databases
          Sam Hemelryk made changes -
          Currently in integration Yes
          Sam Hemelryk made changes -
          Integrator stronk7
          Michael de Raadt made changes -
          Labels triaged
          Petr Škoda made changes -
          Description In 1.7 we still supported ancient MySQL that did not support varchars longer than 255, unfortunately text filed can not be used everywhere thanks to restrictions in oracle and mssql.

          Note to self: Do not forget to verify max index size - mysql has a silly 7xx byte limit, we use 300 chars max...

          Places that could use longer varchars (in separate issues later):
          * user preference value - breaks very very often in gradebook
          * resource module urls (any urls) - browsers allow at least 2,048 chars
          * any multilang field (course full name translated to 20 languages for example) - the multilang syntax has big overhead

          What is the proper limit now:
          * mssql - NVARCHAR recommended <= 4000 chars, larger is treated as text http://msdn.microsoft.com/en-us/library/ms186939.aspx
          * oracle - VARCHAR2 has limit 4000bytes, that is a lousy 4000/3=1333 utf-8 chars, lets ignore this fast&stupid database http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/sql_elements001.htm
          * mysql - VARCHAR 65,535 chars http://dev.mysql.com/doc/refman/5.0/en/char.html
          * postgresql - 1GB oh my! http://www.postgresql.org/docs/8.3/static/datatype-character.html

          It looks like the reasonable maximum is either 2048 or 4000 chars.

          Hopefully people with higher unicode chars do not use oracle, anyway anybody who counts string length in bytes these days is crazy...
          In 1.7 we still supported ancient MySQL that did not support varchars longer than 255, unfortunately text filed can not be used everywhere thanks to restrictions in oracle and mssql.

          Note to self: Do not forget to verify max index size - mysql has a silly 7xx byte limit, we use 300 chars max...

          Places that could use longer varchars (in separate issues later):
          * user preference value - breaks very very often in gradebook
          * extrnal URLs (rss client block, user profile url)
          * any multilang field (course full name translated to 20 languages for example) - the multilang syntax has big overhead

          What is the proper limit now:
          * mssql - NVARCHAR recommended <= 4000 chars, larger is treated as text http://msdn.microsoft.com/en-us/library/ms186939.aspx
          * oracle - VARCHAR2 has limit 4000bytes, that is a lousy 4000/3=1333 utf-8 chars, lets ignore this fast&stupid database http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/sql_elements001.htm
          * mysql - VARCHAR 65,535 chars http://dev.mysql.com/doc/refman/5.0/en/char.html
          * postgresql - 1GB oh my! http://www.postgresql.org/docs/8.3/static/datatype-character.html

          It looks like the reasonable maximum is either 2048 or 4000 chars.

          Hopefully people with higher unicode chars do not use oracle, anyway anybody who counts string length in bytes these days is crazy...
          Petr Škoda made changes -
          Description In 1.7 we still supported ancient MySQL that did not support varchars longer than 255, unfortunately text filed can not be used everywhere thanks to restrictions in oracle and mssql.

          Note to self: Do not forget to verify max index size - mysql has a silly 7xx byte limit, we use 300 chars max...

          Places that could use longer varchars (in separate issues later):
          * user preference value - breaks very very often in gradebook
          * extrnal URLs (rss client block, user profile url)
          * any multilang field (course full name translated to 20 languages for example) - the multilang syntax has big overhead

          What is the proper limit now:
          * mssql - NVARCHAR recommended <= 4000 chars, larger is treated as text http://msdn.microsoft.com/en-us/library/ms186939.aspx
          * oracle - VARCHAR2 has limit 4000bytes, that is a lousy 4000/3=1333 utf-8 chars, lets ignore this fast&stupid database http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/sql_elements001.htm
          * mysql - VARCHAR 65,535 chars http://dev.mysql.com/doc/refman/5.0/en/char.html
          * postgresql - 1GB oh my! http://www.postgresql.org/docs/8.3/static/datatype-character.html

          It looks like the reasonable maximum is either 2048 or 4000 chars.

          Hopefully people with higher unicode chars do not use oracle, anyway anybody who counts string length in bytes these days is crazy...
          In 1.7 we still supported ancient MySQL that did not support varchars longer than 255, unfortunately text filed can not be used everywhere thanks to restrictions in oracle and mssql.

          Places that could use longer varchars (in separate issues later):
          * user preference value - breaks very very often in gradebook
          * extrnal URLs (rss client block, user profile url)
          * any multilang field (course full name translated to 20 languages for example) - the multilang syntax has big overhead

          What is the proper limit now:
          * mssql - NVARCHAR recommended <= 4000 chars, larger is treated as text http://msdn.microsoft.com/en-us/library/ms186939.aspx
          * oracle - VARCHAR2 has limit 4000bytes, that is a lousy 4000/3=1333 utf-8 chars, lets ignore this fast&stupid database http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/sql_elements001.htm
          * mysql - VARCHAR 65,535 chars http://dev.mysql.com/doc/refman/5.0/en/char.html
          * postgresql - 1GB oh my! http://www.postgresql.org/docs/8.3/static/datatype-character.html

          It looks like the reasonable maximum is either 2048 or 4000 chars.

          Hopefully people with higher unicode chars do not use oracle, anyway anybody who counts string length in bytes these days is crazy...
          Eloy Lafuente (stronk7) made changes -
          Status Waiting for integration review [ 10010 ] Integration review in progress [ 10004 ]
          Eloy Lafuente (stronk7) made changes -
          Status Integration review in progress [ 10004 ] Waiting for integration review [ 10010 ]
          Eloy Lafuente (stronk7) made changes -
          Currently in integration Yes
          Petr Škoda made changes -
          Parent MDL-29390 [ 47532 ]
          Issue Type New Feature [ 2 ] Sub-task [ 5 ]
          Petr Škoda made changes -
          Link This issue is blocked by MDL-29314 [ MDL-29314 ]
          Petr Škoda made changes -
          Link This issue is blocked by MDL-29321 [ MDL-29321 ]
          Petr Škoda made changes -
          Link This issue is blocked by MDL-29322 [ MDL-29322 ]
          Sam Hemelryk made changes -
          Currently in integration Yes
          Eloy Lafuente (stronk7) made changes -
          Status Waiting for integration review [ 10010 ] Integration review in progress [ 10004 ]
          Eloy Lafuente (stronk7) made changes -
          Status Integration review in progress [ 10004 ] Waiting for testing [ 10005 ]
          Sam Hemelryk made changes -
          Status Waiting for testing [ 10005 ] Testing in progress [ 10011 ]
          Tester samhemelryk
          Aparup Banerjee made changes -
          Attachment unittests.tar.gz [ 25307 ]
          Aparup Banerjee made changes -
          Link This issue has been marked as being related by MDL-29460 [ MDL-29460 ]
          Eloy Lafuente (stronk7) made changes -
          Status Testing in progress [ 10011 ] Tested [ 10006 ]
          Eloy Lafuente (stronk7) made changes -
          Status Tested [ 10006 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]
          Currently in integration Yes
          Integration date 21/Sep/10
          Eloy Lafuente (stronk7) made changes -
          Link This issue caused a regression MDL-29612 [ MDL-29612 ]

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: