Please say which problem or error message you exactly get. HeidiSQL tries to do the best to allow all kinds of characters in identifiers, as it mostly uses backticks for quoting. There are only some few exceptions where HeidiSQL does not quote identifiers, and even then there is an internal regular expression which checks for the characters which need quoting.
You bet. Here you go.
A) Here is how I'm seeing the problem for a space in a database name:
Step 1 - First create a database with a space in the name (using command line mysql tool):
mysql -u root -p
MariaDB [(none)]> create database `two words`;
Note this is: create database (back tick)two words(back tick)(semi-colon)
Step 2 - open HeidiSQL session
Session Manager: Databases pulldown: shows "two words"
Check it, then click "Open"
Step 3 - Show the problem
Left pane - list of databases shows it as two databases like this:
two
words
Step 4 - followthrough. Clicking each gives:
SQL Error (1049): Unknown database 'two'
and
SQL Error (1049): Unknown database 'words'
B) Here's how I'm seeing the index/key problem with a comma in a database field name:
Step 1 - Create field with a comma in it:
CREATE TABLE `foo,bar` (`oof,rab` INT NULL) COLLATE='utf8_general_ci' ENGINE=InnoDB;
Step 2 - Create an index for this field:
In table structure pane (middle,right) right click on oof,rab field and select create new index: key
click Save
Step 3 - View problem:
View Indexes tab. Open key oof,rab in view indexes tab, and it shows two components:
oof
rab