Работайте с двумя разными наборами символов в MySQL.MySql

Форум по Mysql
Ответить
Anonymous
 Работайте с двумя разными наборами символов в MySQL.

Сообщение Anonymous »

люди СО,
mysql> SELECT t.table_catalog AS catalog, t.table_schema, t.table_name, "" AS owner, CASE WHEN t.engine = 'InnoDB' THEN (SELECT st.table_id FROM information_schema.INNODB_TABLES st WHERE CONCAT(t.table_schema,'/', t.table_name) = st.name) ELSE (SELECT 0) END AS id FROM information_schema.tables t;

+---------+--------------------+------------------------------------------------------+-------+------+

| catalog | TABLE_SCHEMA | TABLE_NAME | owner | id |

+---------+--------------------+------------------------------------------------------+-------+------+

| def | draft | abcatcol | | 1093 |

| def | draft | abcatedt | | 1094 |

| def | draft | abcatfmt | | 1095 |

| def | draft | abcattbl | | 1112 |

| def | draft | abcatvld | | 1096 |

| def | draft | abcß | | NULL |

| def | draft | leagues | | 1098 |

| def | draft | leaguescorehitter | | 1101 |

| def | draft | leaguescorepitcher | | 1102 |

As you can see the table Id for the table `abcß` is NULL.

The reason is because of:

mysql> SELECT * FROM information_schema.INNODB_TABLES st;
+----------+------------------------------------------------------------+------+--------+------------+------------+---------------+------------+--------------+--------------------+
| TABLE_ID | NAME | FLAG | N_COLS | SPACE | ROW_FORMAT | ZIP_PAGE_SIZE | SPACE_TYPE | INSTANT_COLS | TOTAL_ROW_VERSIONS |
+----------+------------------------------------------------------------+------+--------+------------+------------+---------------+------------+--------------+--------------------+
| 1089 | draft/abc@1j | 33 | 5 | 24 | Dynamic | 0 | Single | 0 | 0 |

The table is created with the default `CREATE TABLE abcß` command. No character sets and no collations.

The mySQL version is 8.0.800 running on Gentoo Linux.

How to retrieve the table id for the above mentioned table?

The machine is set with en_US.UTF8 locale and mySQL is using everything by default.

TIA!!



Подробнее здесь: https://stackoverflow.com/questions/798 ... s-in-mysql
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «MySql»