why different users get different count(*) from same table?

why different users get different count(*) from same table?

am 30.06.2009 08:21:58 von jinava

--0016367f985ee7bc8c046d8ad262
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Hi experts,

something strange here, use root and mysql (root and mysql are user
accounts) to select count(*) from same table, but the result is different.

login as root:

mysql -uroot -p information_schema

mysql> select * from tables where table_name='tb_staff'\G
*************************** 1. row ***************************
TABLE_CATALOG: NULL
TABLE_SCHEMA: dbsg
TABLE_NAME: tb_staff
TABLE_TYPE: BASE TABLE
ENGINE: MyISAM
VERSION: 10
ROW_FORMAT: Dynamic
*TABLE_ROWS: 0*
AVG_ROW_LENGTH: 0
DATA_LENGTH: 0
MAX_DATA_LENGTH: 281474976710655
INDEX_LENGTH: 1024
DATA_FREE: 0
AUTO_INCREMENT: 1
CREATE_TIME: 2009-05-31 16:13:07
UPDATE_TIME: 2009-05-31 16:13:07
CHECK_TIME: NULL
TABLE_COLLATION: latin1_swedish_ci
CHECKSUM: NULL
CREATE_OPTIONS:
TABLE_COMMENT:
1 row in set (0.00 sec)

then,


login as mysql:

mysql -umysql -p information_schema

mysql> select * from tables where table_name='tb_staff'\G
*************************** 1. row ***************************
TABLE_CATALOG: NULL
TABLE_SCHEMA: dbsg
TABLE_NAME: tb_staff
TABLE_TYPE: BASE TABLE
ENGINE: MyISAM
VERSION: 10
ROW_FORMAT: Dynamic
*TABLE_ROWS: 7519*
AVG_ROW_LENGTH: 223
DATA_LENGTH: 1680120
MAX_DATA_LENGTH: 281474976710655
INDEX_LENGTH: 79872
DATA_FREE: 0
AUTO_INCREMENT: 99022
CREATE_TIME: 2009-06-29 16:57:50
UPDATE_TIME: 2009-06-30 13:41:07
CHECK_TIME: 2009-06-30 11:15:48
TABLE_COLLATION: latin1_swedish_ci
CHECKSUM: NULL
CREATE_OPTIONS:
TABLE_COMMENT:
1 row in set (0.00 sec)

mysql>


Cheers
jinava

--0016367f985ee7bc8c046d8ad262--

Re: why different users get different count(*) from same table?

am 01.07.2009 14:52:21 von jinava

--00163646c2e2df919f046da46492
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Hi experts,

Something strange here, use root and mysql (root and mysql are user
accounts) to select count(*) from same table, but the result is different.

login as root:

mysql -uroot -p information_schema

mysql> select * from tables where table_name='tb_staff'\G
*************************** 1. row ***************************
TABLE_CATALOG: NULL
TABLE_SCHEMA: dbsg
TABLE_NAME: tb_staff
TABLE_TYPE: BASE TABLE
ENGINE: MyISAM
VERSION: 10
ROW_FORMAT: Dynamic
*TABLE_ROWS: 0*
AVG_ROW_LENGTH: 0
DATA_LENGTH: 0
MAX_DATA_LENGTH: 281474976710655
INDEX_LENGTH: 1024
DATA_FREE: 0
AUTO_INCREMENT: 1
CREATE_TIME: 2009-05-31 16:13:07
UPDATE_TIME: 2009-05-31 16:13:07
CHECK_TIME: NULL
TABLE_COLLATION: latin1_swedish_ci
CHECKSUM: NULL
CREATE_OPTIONS:
TABLE_COMMENT:
1 row in set (0.00 sec)

then,


login as mysql:

mysql -umysql -p information_schema

mysql> select * from tables where table_name='tb_staff'\G
*************************** 1. row ***************************
TABLE_CATALOG: NULL
TABLE_SCHEMA: dbsg
TABLE_NAME: tb_staff
TABLE_TYPE: BASE TABLE
ENGINE: MyISAM
VERSION: 10
ROW_FORMAT: Dynamic
*TABLE_ROWS: 7519*
AVG_ROW_LENGTH: 223
DATA_LENGTH: 1680120
MAX_DATA_LENGTH: 281474976710655
INDEX_LENGTH: 79872
DATA_FREE: 0
AUTO_INCREMENT: 99022
CREATE_TIME: 2009-06-29 16:57:50
UPDATE_TIME: 2009-06-30 13:41:07
CHECK_TIME: 2009-06-30 11:15:48
TABLE_COLLATION: latin1_swedish_ci
CHECKSUM: NULL
CREATE_OPTIONS:
TABLE_COMMENT:
1 row in set (0.00 sec)

mysql>


Cheers
jinava

--00163646c2e2df919f046da46492--

AW: why different users get different count(*) from same table?

am 01.07.2009 16:13:50 von Benedikt Schackenberg

Check your rights ;)

-----Ursprüngliche Nachricht-----
Von: jinava [mailto:jinava@gmail.com]=20
Gesendet: Mittwoch, 1. Juli 2009 14:52
An: mysql@lists.mysql.com
Betreff: Re: why different users get different count(*) from same table?

Hi experts,

Something strange here, use root and mysql (root and mysql are user
accounts) to select count(*) from same table, but the result is =
different.

login as root:

mysql -uroot -p information_schema

mysql> select * from tables where table_name=3D'tb_staff'\G
*************************** 1. row ***************************
TABLE_CATALOG: NULL
TABLE_SCHEMA: dbsg
TABLE_NAME: tb_staff
TABLE_TYPE: BASE TABLE
ENGINE: MyISAM
VERSION: 10
ROW_FORMAT: Dynamic
*TABLE_ROWS: 0*
AVG_ROW_LENGTH: 0
DATA_LENGTH: 0
MAX_DATA_LENGTH: 281474976710655
INDEX_LENGTH: 1024
DATA_FREE: 0
AUTO_INCREMENT: 1
CREATE_TIME: 2009-05-31 16:13:07
UPDATE_TIME: 2009-05-31 16:13:07
CHECK_TIME: NULL
TABLE_COLLATION: latin1_swedish_ci
CHECKSUM: NULL
CREATE_OPTIONS:
TABLE_COMMENT:
1 row in set (0.00 sec)

then,


login as mysql:

mysql -umysql -p information_schema

mysql> select * from tables where table_name=3D'tb_staff'\G
*************************** 1. row ***************************
TABLE_CATALOG: NULL
TABLE_SCHEMA: dbsg
TABLE_NAME: tb_staff
TABLE_TYPE: BASE TABLE
ENGINE: MyISAM
VERSION: 10
ROW_FORMAT: Dynamic
*TABLE_ROWS: 7519*
AVG_ROW_LENGTH: 223
DATA_LENGTH: 1680120
MAX_DATA_LENGTH: 281474976710655
INDEX_LENGTH: 79872
DATA_FREE: 0
AUTO_INCREMENT: 99022
CREATE_TIME: 2009-06-29 16:57:50
UPDATE_TIME: 2009-06-30 13:41:07
CHECK_TIME: 2009-06-30 11:15:48
TABLE_COLLATION: latin1_swedish_ci
CHECKSUM: NULL
CREATE_OPTIONS:
TABLE_COMMENT:
1 row in set (0.00 sec)

mysql>


Cheers
jinava


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg