/ Checks whether a column declared as sorted is sorted indeed. */ /
| 2858 | /* Checks whether a column declared as sorted is sorted indeed. */ |
| 2859 | /***********************************************************************/ |
| 2860 | bool DOSCOL::CheckSorted(PGLOBAL g) |
| 2861 | { |
| 2862 | if (Sorted) |
| 2863 | { |
| 2864 | if (OldVal) { |
| 2865 | // Verify whether this column is sorted all right |
| 2866 | if (OldVal->CompareValue(Value) > 0) { |
| 2867 | // Column is no more in ascending order |
| 2868 | snprintf(g->Message, sizeof(g->Message), MSG(COL_NOT_SORTED), Name, To_Tdb->GetName()); |
| 2869 | Sorted = false; |
| 2870 | return true; |
| 2871 | } else |
| 2872 | OldVal->SetValue_pval(Value); |
| 2873 | |
| 2874 | } else |
| 2875 | OldVal = AllocateValue(g, Value); |
| 2876 | } |
| 2877 | return false; |
| 2878 | } // end of CheckSorted |
| 2879 | |
| 2880 | /***********************************************************************/ |
| 2881 | /* AddDistinctValue: Check whether this value already exist in the */ |
nothing calls this directly
no test coverage detected