protected function tweak_param_names($sql, array $params) {
        if (empty($params)) {
            return array($sql, $params);
        }

        $newparams = array();
        $searcharr = array(); // search => replace pairs
        foreach ($params as $name => $value) {
            // Keep the name within the 30 chars limit always (prefixing/replacing)
            if (strlen($name) <= 28) {
                $newname = 'o_' . $name;
            } else {
                $newname = 'o_' . substr($name, 2);
            }
            $newparams[$newname] = $value;
            $searcharr[':' . $name] = ':' . $newname;
        }
        // sort by length desc to avoid potential str_replace() overlap
        uksort($searcharr, array('oci_native_moodle_database', 'compare_by_length_desc'));

        $sql = str_replace(array_keys($searcharr), $searcharr, $sql);
        return array($sql, $newparams);
    }