blackbeam / mysql_async

Asyncronous Rust Mysql driver based on Tokio.
Apache License 2.0
372 stars 113 forks source link

Usability improvement: leading forward slash empty database #259

Closed altmannmarcelo closed 10 months ago

altmannmarcelo commented 10 months ago

A leading forward slash in the connection URL makes get_opts_db_name_from_url set db_name to Some("") rather than None. This makes code pulling the db from config requiring extra checks as db_name.is_some() will evaluate to true. Empty database parameter is invalid for MySQL.

CC: @glittershark