Comments on: Checking for AUTO_INCREMENT capacity with single query https://shlomi-noach.github.io/blog/mysql/checking-for-auto_increment-capacity-with-single-query Blog by Shlomi Noach Tue, 31 Jul 2018 14:36:57 +0000 hourly 1 https://wordpress.org/?v=5.3.3 By: Using Prometheus to Check for auto_increment Value Exhaustion - Percona Database Performance Blog https://shlomi-noach.github.io/blog/mysql/checking-for-auto_increment-capacity-with-single-query/comment-page-1#comment-474676 Tue, 31 Jul 2018 14:36:57 +0000 https://shlomi-noach.github.io/blog/?p=3421#comment-474676 […] are several ways to check for auto_increment capacity; this is just one of them. But what really matters is how PMM […]

]]>
By: M https://shlomi-noach.github.io/blog/mysql/checking-for-auto_increment-capacity-with-single-query/comment-page-1#comment-337813 Mon, 07 Dec 2015 11:56:57 +0000 https://shlomi-noach.github.io/blog/?p=3421#comment-337813 Hi Shlomi,

great 10x for looking into it.And thank you for the great utilities that you have made.

BR
Martin

]]>
By: shlomi https://shlomi-noach.github.io/blog/mysql/checking-for-auto_increment-capacity-with-single-query/comment-page-1#comment-337812 Mon, 07 Dec 2015 11:54:37 +0000 https://shlomi-noach.github.io/blog/?p=3421#comment-337812 @Martin,

The answer lies in the strange output you got from your `SHOW CREATE TABLE`. How is it possible you have `AUTO_INCREMENT=18446744073709551615` for an INT column? There is nothing the query can do about this: I suggest reporting this as a bug to MySQL.

]]>
By: Martin https://shlomi-noach.github.io/blog/mysql/checking-for-auto_increment-capacity-with-single-query/comment-page-1#comment-337810 Mon, 07 Dec 2015 11:42:02 +0000 https://shlomi-noach.github.io/blog/?p=3421#comment-337810 Hi Shlomi,

10x for the fast response.Here is the requested information:

mysql> show create table ussd_ubrowser.ubrowser_phone_producers \G;
*************************** 1. row ***************************
Table: ubrowser_phone_producers
Create Table: CREATE TABLE `ubrowser_phone_producers` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(200) NOT NULL,
`ordClmn` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=18446744073709551615 DEFAULT CHARSET=latin1
1 row in set (0.00 sec)

mysql> show table status from ussd_ubrowser like 'ubrowser_phone_producers' \G;
*************************** 1. row ***************************
Name: ubrowser_phone_producers
Engine: MyISAM
Version: 10
Row_format: Dynamic
Rows: 6
Avg_row_length: 21
Data_length: 128
Max_data_length: 281474976710655
Index_length: 2048
Data_free: 0
Auto_increment: 18446744073709551615
Create_time: 2013-02-22 20:42:54
Update_time: 2013-02-22 20:42:54
Check_time: 2015-11-27 14:57:07
Collation: latin1_swedish_ci
Checksum: NULL
Create_options:
Comment:
1 row in set (0.01 sec)

]]>
By: shlomi https://shlomi-noach.github.io/blog/mysql/checking-for-auto_increment-capacity-with-single-query/comment-page-1#comment-337448 Fri, 04 Dec 2015 21:35:16 +0000 https://shlomi-noach.github.io/blog/?p=3421#comment-337448 @martin, I guess the answer is “this is a bug” and that I should be casting along the way. But in order to fix it, I would like to see the data you were working on. Nothing special, just the table definition (only PK is of interest) and the current PK value, etc.

Thanks!

]]>
By: Martin https://shlomi-noach.github.io/blog/mysql/checking-for-auto_increment-capacity-with-single-query/comment-page-1#comment-337397 Fri, 04 Dec 2015 14:02:53 +0000 https://shlomi-noach.github.io/blog/?p=3421#comment-337397 Hi 10x for the great article.But I have a question I have a result like this from running this query against one of the DB-s:

| ussd_ubrowser | ubrowser_phone_producers | id | int | int(11) | 0 | 2147483647 | 18446744073709551615 | 8589934596.0000 |

How is that possible,the Signed int to have more than 2147483647 and the output in AUTO_INCREMENT_RATIO is as seen above 8589934596.The version of MySQL that I use is quite old:

5.1.73 64Bit

BR
Martin

]]>
By: common_schema over traditional scripts | code.openark.org https://shlomi-noach.github.io/blog/mysql/checking-for-auto_increment-capacity-with-single-query/comment-page-1#comment-147017 Wed, 12 Dec 2012 11:56:30 +0000 https://shlomi-noach.github.io/blog/?p=3421#comment-147017 […] It turns out it takes very little effort to build a query which does the same. In which case it is also easy to build a view which provides the […]

]]>
By: shlomi https://shlomi-noach.github.io/blog/mysql/checking-for-auto_increment-capacity-with-single-query/comment-page-1#comment-36172 Wed, 06 Apr 2011 16:00:15 +0000 https://shlomi-noach.github.io/blog/?p=3421#comment-36172 ORDER BY is on you 🙂

]]>
By: Cédric https://shlomi-noach.github.io/blog/mysql/checking-for-auto_increment-capacity-with-single-query/comment-page-1#comment-36169 Wed, 06 Apr 2011 15:24:50 +0000 https://shlomi-noach.github.io/blog/?p=3421#comment-36169 Nice query, just add “ORDER BY 9 DESC” in my case.
Thx !

]]>
By: shlomi https://shlomi-noach.github.io/blog/mysql/checking-for-auto_increment-capacity-with-single-query/comment-page-1#comment-36060 Tue, 05 Apr 2011 08:27:42 +0000 https://shlomi-noach.github.io/blog/?p=3421#comment-36060 @Daniel,
thanks, updated.

]]>