~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_string.cc

  • Committer: Lee Bieber
  • Date: 2011-02-23 21:21:20 UTC
  • mfrom: (2195.1.4 build)
  • Revision ID: kalebral@gmail.com-20110223212120-jr9bo1nckyk4n5h4
Merge Olaf - remove register keyword
Merge Stewart - 646898: Query causes RAM usage spike    
Merge Stewart - 710818: SHOW TABLE doesn't use generator    
Merge Patrick - 723828: dbqp should integrate with the randgen

Show diffs side-by-side

added added

removed removed

Lines of Context:
433
433
    if (!s.length())
434
434
      return ((int) offset);    // Empty string is always found
435
435
 
436
 
    register const char *str = Ptr+offset;
437
 
    register const char *search=s.ptr();
 
436
    const char *str = Ptr+offset;
 
437
    const char *search=s.ptr();
438
438
    const char *end=Ptr+str_length-s.length()+1;
439
439
    const char *search_end=s.ptr()+s.length();
440
440
skip:
442
442
    {
443
443
      if (*str++ == *search)
444
444
      {
445
 
        register char *i,*j;
 
445
        char *i,*j;
446
446
        i=(char*) str; j=(char*) search+1;
447
447
        while (j != search_end)
448
448
          if (*i++ != *j++) goto skip;
463
463
  {
464
464
    if (!s.length())
465
465
      return offset;                            // Empty string is always found
466
 
    register const char *str = Ptr+offset-1;
467
 
    register const char *search=s.ptr()+s.length()-1;
 
466
    const char *str = Ptr+offset-1;
 
467
    const char *search=s.ptr()+s.length()-1;
468
468
 
469
469
    const char *end=Ptr+s.length()-2;
470
470
    const char *search_end=s.ptr()-1;
473
473
    {
474
474
      if (*str-- == *search)
475
475
      {
476
 
        register char *i,*j;
 
476
        char *i,*j;
477
477
        i=(char*) str; j=(char*) search-1;
478
478
        while (j != search_end)
479
479
          if (*i-- != *j--) goto skip;