MDEV-32627 Distinguish between absence of a keyword and empty value for the keyword
Distinguish them in two place: when constructing connection key in create_conn_key and spider_create_conn for both ordinary queries and spider_direct_sql For spider_create_conn and spider_udf_direct_sql_create_conn, the created conn gets assigned a field from the source object if and only if source->field is non-null. For spider_create_conn_keys and spider_udf_direct_sql_create_conn_key, we update the encoding so that absence of keyword and keyword with an empty value result in different keys. More specifically, if the i-th keyword has a value, the corresponding part in the conn key begins with the char \i, followed by the possibly empty value and ends with a \0. If the i-th keyword is not specified, then it does not get a mention in the conn key. As part of this change, we also update table param / option parsing to recognise a singleton empty string when creating an string list, instead of writing it off as NULL.
Showing
Please register or sign in to comment