adjust innertable information_schema.parameters
This commit is contained in:
		| @ -115,7 +115,8 @@ int ObInformationParametersTable::fill_row_cells(const ObRoutineInfo *routine_in | |||||||
|           break; |           break; | ||||||
|         } |         } | ||||||
|         case (CHARACTER_MAXIMUM_LENGTH): { |         case (CHARACTER_MAXIMUM_LENGTH): { | ||||||
|           if(common::ObStringTC == param_type.get_type_class()) { |           if(common::ObStringTC == param_type.get_type_class() | ||||||
|  |              || common::ObTextTC == param_type.get_type_class()) { | ||||||
|             cells[col_idx].set_uint64(static_cast<uint64_t>(param_type.get_length())); |             cells[col_idx].set_uint64(static_cast<uint64_t>(param_type.get_length())); | ||||||
|           } else { |           } else { | ||||||
|             cells[col_idx].set_null(); |             cells[col_idx].set_null(); | ||||||
| @ -123,8 +124,9 @@ int ObInformationParametersTable::fill_row_cells(const ObRoutineInfo *routine_in | |||||||
|           break; |           break; | ||||||
|         } |         } | ||||||
|         case (CHARACTER_OCTET_LENGTH): { |         case (CHARACTER_OCTET_LENGTH): { | ||||||
|           if(common::ObStringTC == param_type.get_type_class()  |           if((common::ObStringTC == param_type.get_type_class() | ||||||
|              && param_type.get_charset_type() != CHARSET_ANY) { |              && param_type.get_charset_type() != CHARSET_ANY) | ||||||
|  |              || common::ObTextTC == param_type.get_type_class()) { | ||||||
|             ObCollationType coll = param_type.get_collation_type(); |             ObCollationType coll = param_type.get_collation_type(); | ||||||
|             int64_t mbmaxlen = 0; |             int64_t mbmaxlen = 0; | ||||||
|             if (OB_FAIL(ObCharset::get_mbmaxlen_by_coll(coll, mbmaxlen))) { |             if (OB_FAIL(ObCharset::get_mbmaxlen_by_coll(coll, mbmaxlen))) { | ||||||
| @ -139,7 +141,8 @@ int ObInformationParametersTable::fill_row_cells(const ObRoutineInfo *routine_in | |||||||
|           break; |           break; | ||||||
|         } |         } | ||||||
|         case (NUMERIC_PRECISION): { |         case (NUMERIC_PRECISION): { | ||||||
|           if(common::ObNumberTC == param_type.get_type_class()) { |           if(common::ObNumberTC == param_type.get_type_class() | ||||||
|  |              || common::ObIntTC == param_type.get_type_class()) { | ||||||
|             cells[col_idx].set_uint64(static_cast<uint64_t>(param_type.get_precision())); |             cells[col_idx].set_uint64(static_cast<uint64_t>(param_type.get_precision())); | ||||||
|           } else { |           } else { | ||||||
|             cells[col_idx].set_null(); |             cells[col_idx].set_null(); | ||||||
| @ -149,14 +152,18 @@ int ObInformationParametersTable::fill_row_cells(const ObRoutineInfo *routine_in | |||||||
|         case (NUMERIC_SCALE): { |         case (NUMERIC_SCALE): { | ||||||
|           if(common::ObNumberTC == param_type.get_type_class()) { |           if(common::ObNumberTC == param_type.get_type_class()) { | ||||||
|             cells[col_idx].set_uint64(static_cast<uint64_t>(param_type.get_scale())); |             cells[col_idx].set_uint64(static_cast<uint64_t>(param_type.get_scale())); | ||||||
|  |           } else if(common::ObIntTC == param_type.get_type_class() | ||||||
|  |                     || common::ObFloatTC == param_type.get_type_class()) { | ||||||
|  |             cells[col_idx].set_uint64(0); | ||||||
|           } else { |           } else { | ||||||
|             cells[col_idx].set_null(); |             cells[col_idx].set_null(); | ||||||
|           } |           } | ||||||
|           break; |           break; | ||||||
|         } |         } | ||||||
|         case (DATETIME_PRECISION): { |         case (DATETIME_PRECISION): { | ||||||
|           if(common::ObDateTimeTC == param_type.get_type_class()) { |           if(common::ObDateTimeTC == param_type.get_type_class() | ||||||
|             cells[col_idx].set_uint64(static_cast<uint64_t>(param_type.get_precision())); |              || ObTimeTC == param_type.get_type_class()) { | ||||||
|  |             cells[col_idx].set_uint64(static_cast<uint64_t>(param_type.get_scale())); | ||||||
|           } else { |           } else { | ||||||
|             cells[col_idx].set_null(); |             cells[col_idx].set_null(); | ||||||
|           } |           } | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user
	 obdev
					obdev