我有以下纯粹的mysql问题。一些查询切断了第一个字母。从未见过这个:
mysql> select distinct connect_town from ean_publiek where special_connection='1';
+--------------------------+
| connect_town |
+--------------------------+
| ANDVOORT 2 |
| 'T LOO OLDEBROEK 8 |
| OUDSEND 8 |
+--------------------------+
3 rows in set (0.00 sec)`
现在ANDVOORT应该是ZANDVOORT,而OUDSEND应该是WOUDSEND,从
可以看出mysql> select * from ean_publiek where Connect_Postcode='2042JE';
+--------------------+--------------------+---------------------+------------------+--------------+------------------+----------------+---------------+------------+-------------------------------+
| Connect_EAN | Connect_Streetname | Connect_HouseNumber | Connect_HouseRef | Connect_Town | Connect_Postcode | Market_Segment | NetOP_EAN | NetOP_Name | Indication_Special_Connection |
| 871689294901618151 | Kerkstraat | 2 | E | ZANDVOORT | 2042JE | 27 | 8716892720002 | Stedin NB | 0
|
| 871689294901618168 | Kerkstraat | 2 | F | ZANDVOORT | 2042JE | 27 | 8716892720002 | Stedin NB | 0
|`
mysql来自windows 7下的wamp安装,其about屏幕显示以下详细信息:
WampServer Version 3.0.6 64bit Created by Romain Bourdon (2005) Maintainer / Upgrade to 2.5 by Herve Leclerc Upgrade to 3 by Otomatic (wampserver@otomatic.net) Multi styles for homepage by Jojaba Installer by Inno Setup: http://www.jrsoftware.org/isinfo.php Forum Wampserver: http://forum.wampserver.com/index.php
______________________ Versions used ______________________ Apache 2.4.23 - PHP 5.6.25 - MySQL 5.7.14 PHP 5.6.25 for CLI (Command-Line Interface)
该表已经从(非常大的)dmp文件创建并加载。
mysql> desc ean_publiek;
+-------------------------------+-----------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------------------------+-----------------+------+-----+---------+-------+
| Connect_EAN | char(18) | NO | MUL | NULL | |
| Connect_Streetname | char(24) | YES | MUL | NULL | |
| Connect_HouseNumber | int(5) unsigned | YES | MUL | NULL | |
| Connect_HouseRef | char(6) | YES | MUL | NULL | |
| Connect_Town | char(24) | YES | MUL | NULL | |
| Connect_Postcode | char(6) | YES | MUL | NULL | |
| Market_Segment | char(3) | YES | MUL | NULL | |
| NetOP_EAN | char(13) | YES | MUL | NULL | |
| NetOP_Name | char(24) | YES | MUL | NULL | |
| Indication_Special_Connection | char(1) | YES | MUL | NULL | |
+-------------------------------+-----------------+------+-----+---------+-------+
10 rows in set (0.00 sec)
问题当然是,我在哪里可以设置什么,以便选择不同的查询显示正确的结果?我在这个论坛上找到了一些关于阿拉伯语文本的参考,但这是荷兰语,而不是阿拉伯语。其他引用是关于缺少行的,这个问题与丢失的第一个字母有关,而不是第一行。
提前致谢!
@EDIT:试图回归原因,这不是关于明显的:没有'明显'同样的错误结果:
mysql> select connect_town from ean_publiek where indication_special_connection='1';
+--------------------------+
| connect_town |
+--------------------------+
| ANDVOORT 2 |
| 'T LOO OLDEBROEK 8 |
| 'T LOO OLDEBROEK 8 |
| OUDSEND 8 |
| OUDSEND 8 |
+--------------------------+
5 rows in set (0.00 sec)
其他尝试:问题似乎不是由选择的“特定字段”引起的,并且问题发生在城市列以上,在荷兰Connect_Postcode下面的示例中,总是形式为nnnnAB(4位数2)所有内容似乎都发生了变化,特别是“Connect_HouseRef”列似乎“窃取”了它右边列中的第一个字符,依此类推。
mysql> SELECT * from ean_publiek where Indication_special_connection='1';
| Connect_EAN | Connect_Streetname | Connect_HouseNumber | Connect_HouseRef | Connect_Town | Connect_Postcode | Market_Segment | NetOP_EAN | NetOP_Name | Indication_Special_Connection |
| 871689294901618281 | Kerkstraat | 10 | BC Z | ANDVOORT 2 | 042JE2 | 7 8 | 716892720002S | tedin NB 0 | 1 |
| 871687110001572501 | Vierschotenweg | 28 | B | 'T LOO OLDEBROEK 8 | 095PR2 | 3 8 | 716871000002L | iander NB 0 | 1 |
| 871687140022788551 | Vierschotenweg | 28 | B | 'T LOO OLDEBROEK 8 | 095PR2 | 7 8 | 716871000002L | iander NB 0 | 1 |
| 871687120000013011 | Iewal | 16 | 93 4W | OUDSEND 8 | 551PT2 | 3 8 | 716871000002L | iander NB 0 | 1 |
| 871687120000238476 | Midstrjitte | 30 | 93 4W | OUDSEND 8 | 551PJ2 | 3 8 | 716871000002L | iander NB 0 | 1 |
5 rows in set (0.02 sec)
mysql> select distinct connect_town from ean_publiek where connect_town like '%andvoort';
+-----------------+
| connect_town |
+-----------------+
| EEXTERZANDVOORT |
| ZANDVOORT |
+-----------------+
2 rows in set (24.16 sec)
mysql> select distinct connect_town from ean_publiek where connect_town = 'zandvoort';
+--------------+
| connect_town |
+--------------+
| ZANDVOORT |
+--------------+
1 row in set (0.00 sec)
mysql> select distinct connect_town from ean_publiek where connect_town like '%LOO OLDEBROEK';
+------------------+
| connect_town |
+------------------+
| 'T LOO OLDEBROEK |
+------------------+
1 row in set (0.09 sec)
我不是在做这件事,而且这不是一个家庭学习项目。这是一个工作项目。我怀疑这是我必须设置的一些奇怪的设置,它不表示不可打印的字符,它是从通过从测试服务器导出创建的转储文件的导入。
答案 0 :(得分:1)
通过在my.ini中使用更高的内存设置解决(过去称为my.cnf)。 MySql没有抱怨,错误日志中没有一行,这是一种冒犯。到目前为止,我只是幸运。所以,我是愚蠢的,因为我确实假设(那个wamp会神奇地总是起作用),并且假设是错误的,它很懒,我很抱歉。