#include <item.h>
Collaboration diagram for DTCollation:

Public Member Functions | |
| DTCollation () | |
| DTCollation (CHARSET_INFO *collation_arg, Derivation derivation_arg) | |
| void | set (DTCollation &dt) |
| void | set (CHARSET_INFO *collation_arg, Derivation derivation_arg) |
| void | set (CHARSET_INFO *collation_arg) |
| void | set (Derivation derivation_arg) |
| bool | aggregate (DTCollation &dt, uint flags=0) |
| bool | set (DTCollation &dt1, DTCollation &dt2, uint flags=0) |
| const char * | derivation_name () const |
Public Attributes | |
| CHARSET_INFO * | collation |
| uint | nagg |
| uint | strong |
|
|
00069 {
00070 collation= &my_charset_bin;
00071 derivation= DERIVATION_NONE;
00072 nagg= 0;
00073 strong= 0;
00074 }
|
|
||||||||||||
|
00076 {
00077 collation= collation_arg;
00078 derivation= derivation_arg;
00079 nagg= 0;
00080 strong= 0;
00081 }
|
|
||||||||||||
|
00475 {
00476 nagg++;
00477 if (!my_charset_same(collation, dt.collation))
00478 {
00479 /*
00480 We do allow to use binary strings (like BLOBS)
00481 together with character strings.
00482 Binaries have more precedance than a character
00483 string of the same derivation.
00484 */
00485 if (collation == &my_charset_bin)
00486 {
00487 if (derivation <= dt.derivation)
00488 ; // Do nothing
00489 else
00490 {
00491 set(dt);
00492 strong= nagg;
00493 }
00494 }
00495 else if (dt.collation == &my_charset_bin)
00496 {
00497 if (dt.derivation <= derivation)
00498 {
00499 set(dt);
00500 strong= nagg;
00501 }
00502 else
00503 ; // Do nothing
00504 }
00505 else if ((flags & MY_COLL_ALLOW_SUPERSET_CONV) &&
00506 derivation < dt.derivation &&
00507 collation->state & MY_CS_UNICODE)
00508 {
00509 // Do nothing
00510 }
00511 else if ((flags & MY_COLL_ALLOW_SUPERSET_CONV) &&
00512 dt.derivation < derivation &&
00513 dt.collation->state & MY_CS_UNICODE)
00514 {
00515 set(dt);
00516 strong= nagg;
00517 }
00518 else if ((flags & MY_COLL_ALLOW_COERCIBLE_CONV) &&
00519 derivation < dt.derivation &&
00520 dt.derivation >= DERIVATION_COERCIBLE)
00521 {
00522 // Do nothing;
00523 }
00524 else if ((flags & MY_COLL_ALLOW_COERCIBLE_CONV) &&
00525 dt.derivation < derivation &&
00526 derivation >= DERIVATION_COERCIBLE)
00527 {
00528 set(dt);
00529 strong= nagg;
00530 }
00531 else
00532 {
00533 // Cannot apply conversion
00534 set(0, DERIVATION_NONE);
00535 return 1;
00536 }
00537 }
00538 else if (derivation < dt.derivation)
00539 {
00540 // Do nothing
00541 }
00542 else if (dt.derivation < derivation)
00543 {
00544 set(dt);
00545 strong= nagg;
00546 }
00547 else
00548 {
00549 if (collation == dt.collation)
00550 {
00551 // Do nothing
00552 }
00553 else
00554 {
00555 if (derivation == DERIVATION_EXPLICIT)
00556 {
00557 set(0, DERIVATION_NONE);
00558 return 1;
00559 }
00560 CHARSET_INFO *bin= get_charset_by_csname(collation->csname,
00561 MY_CS_BINSORT,MYF(0));
00562 set(bin, DERIVATION_NONE);
00563 }
00564 }
00565 return 0;
00566 }
|
|
|
00100 {
00101 switch(derivation)
00102 {
00103 case DERIVATION_IGNORABLE: return "IGNORABLE";
00104 case DERIVATION_COERCIBLE: return "COERCIBLE";
00105 case DERIVATION_IMPLICIT: return "IMPLICIT";
00106 case DERIVATION_EXPLICIT: return "EXPLICIT";
00107 case DERIVATION_NONE: return "NONE";
00108 default: return "UNKNOWN";
00109 }
00110 }
|
|
||||||||||||||||
|
|
|
|
00095 { derivation= derivation_arg; }
|
|
|
00093 { collation= collation_arg; }
|
|
||||||||||||
|
00088 {
00089 collation= collation_arg;
00090 derivation= derivation_arg;
00091 }
|
|
|
|
|
|
|
|
|
|
|
|
|
1.3.9.1