люди СО,
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
Работайте с двумя разными наборами символов в MySQL. ⇐ MySql
Форум по Mysql
-
Anonymous
1766904013
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!!
Подробнее здесь: [url]https://stackoverflow.com/questions/79856073/work-with-2-different-character-sets-in-mysql[/url]
Ответить
1 сообщение
• Страница 1 из 1
Перейти
- Кемерово-IT
- ↳ Javascript
- ↳ C#
- ↳ JAVA
- ↳ Elasticsearch aggregation
- ↳ Python
- ↳ Php
- ↳ Android
- ↳ Html
- ↳ Jquery
- ↳ C++
- ↳ IOS
- ↳ CSS
- ↳ Excel
- ↳ Linux
- ↳ Apache
- ↳ MySql
- Детский мир
- Для души
- ↳ Музыкальные инструменты даром
- ↳ Печатная продукция даром
- Внешняя красота и здоровье
- ↳ Одежда и обувь для взрослых даром
- ↳ Товары для здоровья
- ↳ Физкультура и спорт
- Техника - даром!
- ↳ Автомобилистам
- ↳ Компьютерная техника
- ↳ Плиты: газовые и электрические
- ↳ Холодильники
- ↳ Стиральные машины
- ↳ Телевизоры
- ↳ Телефоны, смартфоны, плашеты
- ↳ Швейные машинки
- ↳ Прочая электроника и техника
- ↳ Фототехника
- Ремонт и интерьер
- ↳ Стройматериалы, инструмент
- ↳ Мебель и предметы интерьера даром
- ↳ Cантехника
- Другие темы
- ↳ Разное даром
- ↳ Давай меняться!
- ↳ Отдам\возьму за копеечку
- ↳ Работа и подработка в Кемерове
- ↳ Давай с тобой поговорим...
Мобильная версия