• unknown's avatar
    WL#1175: more default_week_formats for iso compatibility · 468dcb60
    unknown authored
    New formats added for 'week()' function and 'default_week_format' option(4 - 7).
    Next formats is supported now:
    *Value* *Meaning*
      `0'     Week starts on Sunday; First Sunday of the year starts week 1.
      	  Week() returns 0-53.
      `1'     Week starts on Monday; Weeks numbered according to ISO 8601:1988.
    	  Week() returns 0-53.
      `2'     Week starts on Sunday; First Sunday of the year starts week 1.
      	  Week() returns 1-53.
      `3'     Week starts on Monday; Weeks numbered according to ISO 8601:1988.
    	  Week() returns 1-53.
      `4'     Week starts on Sunday; Weeks numbered according to ISO 8601:1988.
    	  Week() returns 0-53.
      `5'     Week starts on Monday;  First Monday of the year starts week 1.
      	  Week() returns 0-53.
      `6'     Week starts on Sunday; Weeks numbered according to ISO 8601:1988.
    	  Week() returns 1-53.
      `7'     Week starts on Monday;  First Monday of the year starts week 1.
      	  Week() returns 1-53.
    
    
    mysql-test/r/func_time.result:
      Test for 'default_week_format' option and 'week' function
    mysql-test/t/func_time.test:
      Test for 'default_week_format' option and 'week' function
    sql/item_timefunc.cc:
      WL#1175 more default_week_formats for iso compatibility
    sql/mysql_priv.h:
      WL#1175 more default_week_formats for iso compatibility
    sql/mysqld.cc:
      WL#1175 more default_week_formats for iso compatibility
    sql/time.cc:
      WL#1175 more default_week_formats for iso compatibility
    468dcb60
item_timefunc.cc 28.8 KB