~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to server/item_timefunc.cc

  • Committer: Patrick Galbraith
  • Date: 2008-07-16 18:48:24 UTC
  • mto: (77.3.28 glibclient)
  • mto: This revision was merged to the branch mainline in revision 176.
  • Revision ID: patg@ishvara-20080716184824-nyd9po8rwk00l2qu
Dar, I forgot to commit this earlier.

* Removed my_sprintf from the files below
* Fixed some small issues that cause compile to fail (pedantic picky-ousity)

Show diffs side-by-side

added added

removed removed

Lines of Context:
752
752
        str->append(hours_i < 12 ? "AM" : "PM",2);
753
753
        break;
754
754
      case 'r':
755
 
        length= my_sprintf(intbuff, 
756
 
                   (intbuff, 
 
755
        length= sprintf(intbuff, 
757
756
                    ((l_time->hour % 24) < 12) ?
758
757
                    "%02d:%02d:%02d AM" : "%02d:%02d:%02d PM",
759
758
                    (l_time->hour+11)%12+1,
760
759
                    l_time->minute,
761
 
                    l_time->second));
 
760
                    l_time->second);
762
761
        str->append(intbuff, length);
763
762
        break;
764
763
      case 'S':
767
766
        str->append_with_prefill(intbuff, length, 2, '0');
768
767
        break;
769
768
      case 'T':
770
 
        length= my_sprintf(intbuff, 
771
 
                   (intbuff, 
 
769
        length= sprintf(intbuff, 
772
770
                    "%02d:%02d:%02d", 
773
771
                    l_time->hour, 
774
772
                    l_time->minute,
775
 
                    l_time->second));
 
773
                    l_time->second);
776
774
        str->append(intbuff, length);
777
775
        break;
778
776
      case 'U':
2848
2846
    char buf[28];
2849
2847
    char *ptr= int64_t10_to_str(hour, buf, args[0]->unsigned_flag ? 10 : -10);
2850
2848
    int len = (int)(ptr - buf) +
2851
 
      my_sprintf(ptr, (ptr, ":%02u:%02u", (uint)minute, (uint)second));
 
2849
      sprintf(ptr, ":%02u:%02u", (uint)minute, (uint)second);
2852
2850
    make_truncated_value_warning(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
2853
2851
                                 buf, len, MYSQL_TIMESTAMP_TIME,
2854
2852
                                 NullS);